/[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.4 - (show annotations) (download)
Tue Dec 11 17:47:40 2012 UTC (18 months, 4 weeks ago) by ago
Branch: MAIN
Changes since 1.3: +2 -2 lines
Add ~ppc, wrt bug #360573

(Portage version: 2.1.11.31/cvs/Linux ppc64, unsigned Manifest commit)

1 # Copyright 1999-2012 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.3 2012/12/11 17:46:53 ago Exp $
4
5 EAPI=4
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 ~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
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
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"
70 rm *gz
71 dolib.so lib*so*
72 use static-libs && dolib.a lib*a
73 insinto /usr/include
74 doins ../../inchi_main/inchi_api.h
75 }

  ViewVC Help
Powered by ViewVC 1.1.20