/[gentoo-x86]/sci-libs/inchi/inchi-1.04.ebuild
Gentoo

Contents of /sci-libs/inchi/inchi-1.04.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Sat May 30 15:38:38 2015 UTC (5 years, 2 months ago) by zlogene
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
arm stable wrt bug #534610

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xC42EB5D6)

1 jlec 1.6 # Copyright 1999-2015 Gentoo Foundation
2 jlec 1.1 # Distributed under the terms of the GNU General Public License v2
3 zlogene 1.11 # $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/inchi-1.04.ebuild,v 1.10 2015/01/26 10:34:22 ago Exp $
4 jlec 1.1
5 jlec 1.6 EAPI=5
6 jlec 1.1
7     inherit eutils toolchain-funcs
8    
9     DESCRIPTION="A program and library for generating standard and non-standard InChI and InChIKeys"
10     HOMEPAGE="http://www.iupac.org/inchi/"
11     SRC_URI="
12     http://www.inchi-trust.org/sites/default/files/inchi-${PV}/INCHI-1-API.ZIP -> ${P}.zip
13     doc? ( http://www.inchi-trust.org/sites/default/files/inchi-${PV}/INCHI-1-DOC.ZIP -> ${P}-doc.zip )"
14    
15     LICENSE="IUPAC-InChi"
16     SLOT="0"
17 zlogene 1.11 KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
18 jlec 1.2 IUSE="doc static-libs"
19 jlec 1.1
20     DEPEND="app-arch/unzip"
21     RDEPEND=""
22    
23     S="${WORKDIR}"/INCHI-1-API
24    
25     src_prepare() {
26 jlec 1.2 epatch \
27     "${FILESDIR}"/${PN}-1.03-shared.patch \
28     "${FILESDIR}"/${PN}-1.04-static.patch
29     tc-export AR RANLIB
30 jlec 1.1 }
31    
32     src_compile() {
33 jlec 1.2 local dir common_opts
34     common_opts=(
35     C_COMPILER=$(tc-getCC)
36     CPP_COMPILER=$(tc-getCXX)
37     LINKER="$(tc-getCXX) ${LDFLAGS}"
38     SHARED_LINK="$(tc-getCC) ${LDFLAGS} -shared"
39     C_COMPILER_OPTIONS="\${P_INCL} -ansi -DCOMPILE_ANSI_ONLY ${CFLAGS} -c "
40     CPP_COMPILER_OPTIONS="\${P_INCL} -D_LIB -ansi ${CXXFLAGS} -frtti -c "
41     C_OPTIONS="${CFLAGS} -fPIC -c "
42     LINKER_OPTIONS="${LDFLAGS}"
43     CREATE_MAIN=
44     ISLINUX=1
45     )
46 jlec 1.1 for dir in INCHI/gcc/inchi-1 INCHI_API/gcc_so_makefile; do
47 jlec 1.6 pushd ${dir} > /dev/null
48 jlec 1.1 emake \
49 jlec 1.2 "${common_opts[@]}"
50 jlec 1.6 popd > /dev/null
51 jlec 1.1 done
52 jlec 1.2 if use static-libs ; then
53     pushd INCHI_API/gcc_so_makefile > /dev/null
54     emake libinchi.a \
55     "${common_opts[@]}" \
56     STATIC=1
57 jlec 1.6 popd > /dev/null
58 jlec 1.2 fi
59 jlec 1.1 }
60    
61     src_install() {
62     dodoc readme*.txt
63     if use doc ; then
64     cd "${WORKDIR}/INCHI-1-DOC/"
65     docinto doc
66     dodoc *.pdf readme.txt
67     fi
68 jlec 1.2 dobin "${S}"/INCHI/gcc/inchi-1/inchi-1
69 jlec 1.6 cd "${S}/INCHI_API/gcc_so_makefile/result" || die
70     rm *gz ||┬ádie
71 jlec 1.2 dolib.so lib*so*
72     use static-libs && dolib.a lib*a
73 jlec 1.6 doheader ../../inchi_main/inchi_api.h
74 jlec 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20