/[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 - (show 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 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/inchi-1.04.ebuild,v 1.10 2015/01/26 10:34:22 ago Exp $
4
5 EAPI=5
6
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 KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
18 IUSE="doc static-libs"
19
20 DEPEND="app-arch/unzip"
21 RDEPEND=""
22
23 S="${WORKDIR}"/INCHI-1-API
24
25 src_prepare() {
26 epatch \
27 "${FILESDIR}"/${PN}-1.03-shared.patch \
28 "${FILESDIR}"/${PN}-1.04-static.patch
29 tc-export AR RANLIB
30 }
31
32 src_compile() {
33 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 for dir in INCHI/gcc/inchi-1 INCHI_API/gcc_so_makefile; do
47 pushd ${dir} > /dev/null
48 emake \
49 "${common_opts[@]}"
50 popd > /dev/null
51 done
52 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 popd > /dev/null
58 fi
59 }
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 dobin "${S}"/INCHI/gcc/inchi-1/inchi-1
69 cd "${S}/INCHI_API/gcc_so_makefile/result" || die
70 rm *gz || die
71 dolib.so lib*so*
72 use static-libs && dolib.a lib*a
73 doheader ../../inchi_main/inchi_api.h
74 }

  ViewVC Help
Powered by ViewVC 1.1.20