]> Pileus Git - ~andy/sunrise/blob - sci-electronics/klayout/klayout-0.19.3.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / sci-electronics / klayout / klayout-0.19.3.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils multilib toolchain-funcs
8
9 DESCRIPTION="Viewer and editor for GDS and OASIS integrated circuit layouts"
10 HOMEPAGE="http://www.klayout.de/"
11 SRC_URI="http://www.klayout.de/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="ruby"
17
18 RDEPEND="x11-libs/qt-gui:4[qt3support]
19         ruby? ( dev-lang/ruby )"
20
21 DEPEND="${RDEPEND}"
22
23 src_prepare() {
24         epatch "${FILESDIR}/${P}-configureonly.patch"
25
26         # now we generate the stub build configuration file for the home-brew build system
27         cp "${FILESDIR}/${P}-Makefile.conf.linux-gentoo" "${S}/config/Makefile.conf.linux-gentoo" || die
28 }
29
30 src_configure() {
31         local rbinc rblib rbflags
32
33         if use ruby ; then
34
35                 # get the location of the ruby.h header file
36                 rbinc=$(ruby -rrbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyhdrdir']")
37
38                 # get the filename of libruby.so
39                 rblib=$(ruby -rrbconfig -e "puts Config::CONFIG['LIBRUBY']")
40
41                 rbflags="-rblib /usr/$(get_libdir)/${rblib} -rbinc ${rbinc}"
42
43         fi
44
45         ./build.sh \
46                 -platform linux-gentoo \
47                 -bin bin \
48                 -qtbin /usr/bin \
49                 -qtinc /usr/include/qt4 \
50                 -qtlib /usr/$(get_libdir)/qt4 \
51                 ${rbflags} || die "Configuration failed"
52 }
53
54 src_compile() {
55         cd build.linux-gentoo
56         tc-export CC CXX AR LD RANLIB
57         export AR="${AR} -r"
58         emake all || die "Build failed"
59 }
60
61 src_install() {
62         cd build.linux-gentoo
63         emake install || die "make install failed"
64
65         cd ..
66         dobin \
67                 bin/klayout \
68                 bin/strm2gds \
69                 bin/strm2oas \
70                 bin/strmclip \
71                 bin/strmcmp || die "Installation of binaries failed"
72
73         insinto /usr/share/${PN}/testdata/gds
74         doins testdata/gds/*.gds || die "Installation of gds testdata failed"
75         insinto /usr/share/${PN}/testdata/oasis
76         doins testdata/oasis/*.oas testdata/oasis/*.ot || die "Installation of oasis testdata failed"
77
78         if use ruby; then
79                 insinto /usr/share/${PN}
80                 doins -r testdata/ruby || die "Installation of ruby testdata failed"
81         fi
82 }