I'm having a go at building an application that is not currently in Portage. The application is K3DSurf, which you can read about on the following Web page:
http://k3dsurf.sourceforge.net/
Now, I found an unofficial ebuild for k3dsurf-0.6.2.1 in the Gentoo Bugzilla:
- Code: Select all
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit kde qt3
DESCRIPTION="k3dsurf"
HOMEPAGE="http://k3dsurf.sf.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}-Unstable.zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~ppc ~sparc"
DEPEND="$(qt_min_version 3.3)"
S="${WORKDIR}/${P}-Unstable"
need-kde 3.3
src_compile() {
qmake || die
emake || die
}
src_install() {
dobin bin/k3dsurf
dodoc README COPYING
insopts -o root -g root -m 644
insinto /usr/share/pixmaps/k3dsurf
doins icon/*
make_desktop_entry k3dsurf "3-6D Mathematical model visualization" k3dsurf/catenoid_mini_32x32.png
}
In order to add my own ebuild, I needed to create my own overlay, so I added the following line to /etc/make.conf:
- Code: Select all
PORTDIR_OVERLAY=/usr/local/portage
I then created the directory /usr/local/portage/sci-mathematics/k3dsurf/ and created the following ebuild file containing the above-mentioned source:
/usr/local/portage/sci-mathematics/k3dsurf/k3dsurf-0.6.2.1.ebuild
Before you can emerge a package you have added to your overlay, you have to create a manifest file for it. So I did the following:
- Code: Select all
ebuild /usr/local/portage/sci-mathematics/k3dsurf/k3dsurf-0.6.2.1.ebuild manifest
which worked correctly.
Then I checked to see if the ebuild was detectable:
- Code: Select all
localhost k3dsurf # emerge -s k3dsurf
Searching...
[ Results for search key : k3dsurf ]
[ Applications found : 1 ]
* sci-mathematics/k3dsurf
Latest version available: 0.6.2.1
Latest version installed: [ Not Installed ]
Size of files: 1,329 kB
Homepage: http://k3dsurf.sf.net/
Description: k3dsurf
License: GPL-2
localhost k3dsurf # emerge -pv k3dsurf
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] sci-mathematics/k3dsurf-0.6.2.1 USE="arts xinerama -debug" 0 kB [1]
Total: 1 package (1 new), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage
localhost k3dsurf #
which looked 'good to go', so I decided to perform the emerge:
- Code: Select all
localhost k3dsurf # emerge -v k3dsurf
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] sci-mathematics/k3dsurf-0.6.2.1 USE="arts xinerama -debug" 0 kB [1]
Total: 1 package (1 new), Size of downloads: 0 kB
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage
>>> Verifying ebuild Manifests...
>>> Emerging (1 of 1) sci-mathematics/k3dsurf-0.6.2.1 to /
* k3dsurf-0.6.2.1-Unstable.zip MD5 ;-) ... [ ok ]
* k3dsurf-0.6.2.1-Unstable.zip RMD160 ;-) ... [ ok ]
* k3dsurf-0.6.2.1-Unstable.zip SHA1 ;-) ... [ ok ]
* k3dsurf-0.6.2.1-Unstable.zip SHA256 ;-) ... [ ok ]
* k3dsurf-0.6.2.1-Unstable.zip size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* checking k3dsurf-0.6.2.1-Unstable.zip ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking k3dsurf-0.6.2.1-Unstable.zip to /var/tmp/portage/sci-mathematics/k3dsurf-0.6.2.1/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sci-mathematics/k3dsurf-0.6.2.1/work/k3dsurf-0.6.2.1-Unstable ...
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
uic: File generated with too old version of Qt Designer
File 'newwindow2.ui' is not valid
make[1]: *** [ui_newwindow2.h] Error 1
make[1]: *** Waiting for unfinished jobs....
uic: File generated with too old version of Qt Designer
File 'IsoWindow.ui' is not valid
make[1]: *** [ui_IsoWindow.h] Error 1
uic: File generated with too old version of Qt Designer
File 'k3dsurf.ui' is not valid
make[1]: *** [ui_k3dsurf.h] Error 1
make: *** [sub-src-make_default] Error 2
*
* ERROR: sci-mathematics/k3dsurf-0.6.2.1 failed.
* Call stack:
* ebuild.sh, line 1687: Called dyn_compile
* ebuild.sh, line 1025: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* k3dsurf-0.6.2.1.ebuild, line 22: Called die
* The specific snippet of code:
* emake || die
* The die message:
* (no error message)
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sci-mathematics/k3dsurf-0.6.2.1/temp/build.log'.
* This ebuild is from an overlay: '/usr/local/portage/'
*
* Messages for package sci-mathematics/k3dsurf-0.6.2.1:
*
* ERROR: sci-mathematics/k3dsurf-0.6.2.1 failed.
* Call stack:
* ebuild.sh, line 1687: Called dyn_compile
* ebuild.sh, line 1025: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* k3dsurf-0.6.2.1.ebuild, line 22: Called die
* The specific snippet of code:
* emake || die
* The die message:
* (no error message)
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sci-mathematics/k3dsurf-0.6.2.1/temp/build.log'.
* This ebuild is from an overlay: '/usr/local/portage/'
*
localhost k3dsurf #
As you can see above, the build failed due to a problem with Qt. I contacted the author of K3DSurf and he told me "Your compilation issue comes from your Qt version: K3DSurf compiles only with Qt3.x not Qt4.x. You should install qt3.6 or qt3.7 and things will be ok."
Now, I currently have qt-4.3.1-r1 and qt-3.3.8-r4 installed. There is no qt-3.6 or qt-3.7 in Portage. But the ebuild source specifies the build-time dependency DEPEND="$(qt_min_version 3.3)", and I wondered whether this is not picking up even qt-3.3.8-r4, given the following:
- Code: Select all
localhost k3dsurf # DEPEND="$(qt_min_version 3.3)" && echo $DEPEND
bash: qt_min_version: command not found
Anyway, if you are an expert in ebuilds and/or Qt, I would appreciate your advice on how to proceed. Many thanks.
