blob: f5b0f1fcc5cadfeedebe1bf1f90165602d3c864d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# 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 $
EAPI=4
inherit eutils toolchain-funcs
DESCRIPTION="A program and library for generating standard and non-standard InChI and InChIKeys"
HOMEPAGE="http://www.iupac.org/inchi/"
SRC_URI="
http://www.inchi-trust.org/sites/default/files/inchi-${PV}/INCHI-1-API.ZIP -> ${P}.zip
doc? ( http://www.inchi-trust.org/sites/default/files/inchi-${PV}/INCHI-1-DOC.ZIP -> ${P}-doc.zip )"
LICENSE="IUPAC-InChi"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="doc"
DEPEND="app-arch/unzip"
RDEPEND=""
S="${WORKDIR}"/INCHI-1-API
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.03-shared.patch
}
src_compile() {
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
popd
done
}
src_install() {
dodoc readme*.txt
if use doc ; then
cd "${WORKDIR}/INCHI-1-DOC/"
docinto doc
dodoc *.pdf readme.txt
fi
cd "${S}/INCHI/gcc/inchi-1"
dobin inchi-1
cd "${S}/INCHI_API/gcc_so_makefile/result"
rm *gz
dolib.so lib*
insinto /usr/include
doins ../../inchi_main/inchi_api.h
}
|