You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.6 KiB
65 lines
1.6 KiB
2 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
2 years ago
|
EAPI=8
|
||
12 years ago
|
|
||
2 years ago
|
inherit toolchain-funcs
|
||
12 years ago
|
|
||
7 years ago
|
DESCRIPTION="Program and library for generating standard and non-standard InChI and InChIKeys"
|
||
12 years ago
|
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 )"
|
||
2 years ago
|
S="${WORKDIR}"/INCHI-1-API
|
||
12 years ago
|
|
||
|
LICENSE="IUPAC-InChi"
|
||
|
SLOT="0"
|
||
9 years ago
|
KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
|
||
2 years ago
|
IUSE="doc"
|
||
12 years ago
|
|
||
2 years ago
|
BDEPEND="app-arch/unzip"
|
||
12 years ago
|
|
||
2 years ago
|
PATCHES=(
|
||
|
"${FILESDIR}"/${PN}-1.03-shared.patch
|
||
|
)
|
||
12 years ago
|
|
||
2 years ago
|
src_configure() {
|
||
12 years ago
|
tc-export AR RANLIB
|
||
12 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
12 years ago
|
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
|
||
|
)
|
||
12 years ago
|
for dir in INCHI/gcc/inchi-1 INCHI_API/gcc_so_makefile; do
|
||
2 years ago
|
pushd ${dir} > /dev/null || die
|
||
12 years ago
|
emake \
|
||
12 years ago
|
"${common_opts[@]}"
|
||
2 years ago
|
popd > /dev/null || die
|
||
12 years ago
|
done
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dodoc readme*.txt
|
||
|
if use doc ; then
|
||
2 years ago
|
cd "${WORKDIR}"/INCHI-1-DOC || die
|
||
12 years ago
|
docinto doc
|
||
|
dodoc *.pdf readme.txt
|
||
|
fi
|
||
12 years ago
|
dobin "${S}"/INCHI/gcc/inchi-1/inchi-1
|
||
2 years ago
|
cd "${S}"/INCHI_API/gcc_so_makefile/result || die
|
||
9 years ago
|
rm *gz || die
|
||
12 years ago
|
dolib.so lib*so*
|
||
10 years ago
|
doheader ../../inchi_main/inchi_api.h
|
||
12 years ago
|
}
|