1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib toolchain-funcs
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"
15 KEYWORDS="~amd64 ~x86"
18 RDEPEND="x11-libs/qt-gui:4[qt3support]
19 ruby? ( dev-lang/ruby )"
24 epatch "${FILESDIR}/${P}-configureonly.patch"
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
31 local rbinc rblib rbflags
35 # get the location of the ruby.h header file
36 rbinc=$(ruby -rrbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyhdrdir']")
38 # get the filename of libruby.so
39 rblib=$(ruby -rrbconfig -e "puts Config::CONFIG['LIBRUBY']")
41 rbflags="-rblib /usr/$(get_libdir)/${rblib} -rbinc ${rbinc}"
46 -platform linux-gentoo \
49 -qtinc /usr/include/qt4 \
50 -qtlib /usr/$(get_libdir)/qt4 \
51 ${rbflags} || die "Configuration failed"
56 tc-export CC CXX AR LD RANLIB
58 emake all || die "Build failed"
63 emake install || die "make install failed"
71 bin/strmcmp || die "Installation of binaries failed"
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"
79 insinto /usr/share/${PN}
80 doins -r testdata/ruby || die "Installation of ruby testdata failed"