diff options
Diffstat (limited to 'sci-libs/inchi/inchi-1.04.ebuild')
-rw-r--r-- | sci-libs/inchi/inchi-1.04.ebuild | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/sci-libs/inchi/inchi-1.04.ebuild b/sci-libs/inchi/inchi-1.04.ebuild index f5b0f1fcc5ca..9c7b73f40103 100644 --- a/sci-libs/inchi/inchi-1.04.ebuild +++ b/sci-libs/inchi/inchi-1.04.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/inchi-1.04.ebuild,v 1.1 2012/03/04 13:22:18 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/inchi-1.04.ebuild,v 1.2 2012/10/24 14:48:55 jlec Exp $ EAPI=4 @@ -15,7 +15,7 @@ SRC_URI=" LICENSE="IUPAC-InChi" SLOT="0" KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="doc" +IUSE="doc static-libs" DEPEND="app-arch/unzip" RDEPEND="" @@ -23,25 +23,39 @@ RDEPEND="" S="${WORKDIR}"/INCHI-1-API src_prepare() { - epatch "${FILESDIR}"/${PN}-1.03-shared.patch + epatch \ + "${FILESDIR}"/${PN}-1.03-shared.patch \ + "${FILESDIR}"/${PN}-1.04-static.patch + tc-export AR RANLIB } src_compile() { + local dir common_opts + common_opts=( + C_COMPILER=$(tc-getCC) + CPP_COMPILER=$(tc-getCXX) + LINKER="$(tc-getCXX) ${LDFLAGS}" + SHARED_LINK="$(tc-getCC) ${LDFLAGS} -shared" + C_COMPILER_OPTIONS="\${P_INCL} -ansi -DCOMPILE_ANSI_ONLY ${CFLAGS} -c " + CPP_COMPILER_OPTIONS="\${P_INCL} -D_LIB -ansi ${CXXFLAGS} -frtti -c " + C_OPTIONS="${CFLAGS} -fPIC -c " + LINKER_OPTIONS="${LDFLAGS}" + CREATE_MAIN= + ISLINUX=1 + ) for dir in INCHI/gcc/inchi-1 INCHI_API/gcc_so_makefile; do pushd ${dir} > /dev/null emake \ - C_COMPILER=$(tc-getCC) \ - CPP_COMPILER=$(tc-getCXX) \ - LINKER="$(tc-getCXX) ${LDFLAGS}" \ - SHARED_LINK="$(tc-getCC) ${LDFLAGS} -shared" \ - C_COMPILER_OPTIONS="\${P_INCL} -ansi -DCOMPILE_ANSI_ONLY ${CFLAGS} -c " \ - CPP_COMPILER_OPTIONS="\${P_INCL} -D_LIB -ansi ${CXXFLAGS} -frtti -c " \ - C_OPTIONS="${CFLAGS} -fPIC -c " \ - LINKER_OPTIONS="${LDFLAGS}" \ - CREATE_MAIN= \ - ISLINUX=1 + "${common_opts[@]}" popd done + if use static-libs ; then + pushd INCHI_API/gcc_so_makefile > /dev/null + emake libinchi.a \ + "${common_opts[@]}" \ + STATIC=1 + popd + fi } src_install() { @@ -51,11 +65,11 @@ src_install() { docinto doc dodoc *.pdf readme.txt fi - cd "${S}/INCHI/gcc/inchi-1" - dobin inchi-1 + dobin "${S}"/INCHI/gcc/inchi-1/inchi-1 cd "${S}/INCHI_API/gcc_so_makefile/result" rm *gz - dolib.so lib* + dolib.so lib*so* + use static-libs && dolib.a lib*a insinto /usr/include doins ../../inchi_main/inchi_api.h } |