diff options
Diffstat (limited to 'sci-libs/inchi/inchi-1.06-r1.ebuild')
-rw-r--r-- | sci-libs/inchi/inchi-1.06-r1.ebuild | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/sci-libs/inchi/inchi-1.06-r1.ebuild b/sci-libs/inchi/inchi-1.06-r1.ebuild new file mode 100644 index 000000000000..48d6556426ff --- /dev/null +++ b/sci-libs/inchi/inchi-1.06-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Program and library for generating standard and non-standard InChI and InChIKeys" +HOMEPAGE="https://www.iupac.org/inchi/" +SRC_URI=" + https://www.inchi-trust.org/download/${PV//.}/INCHI-1-SRC.zip -> ${P}.zip + doc? ( https://www.inchi-trust.org/download/${PV//.}/INCHI-1-DOC.zip -> ${P}-doc.zip ) +" +S="${WORKDIR}/INCHI-1-SRC" + +LICENSE="IUPAC-InChi" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc" + +BDEPEND="app-arch/unzip" + +src_compile() { + local common_opts target_opts + + append-cflags \${P_INCL} -ansi -DCOMPILE_ANSI_ONLY -fPIC -c + append-cxxflags \${P_INCL} -ansi -frtti -c + + common_opts=( + C_COMPILER="$(tc-getCC)" + CPP_COMPILER="$(tc-getCXX)" + AR="$(tc-getAR)" + RANLIB="$(tc-getRANLIB)" + LINKER="$(tc-getCXX)" + SHARED_LINK="$(tc-getCC)" + SHARED_LINK_PARM="${LDFLAGS} -shared " + ISLINUX=1 + ) + + # Compile the library + target_opts=( + LINKER_OPTIONS="${LDFLAGS} " + C_OPTIONS="${CFLAGS} -DTARGET_API_LIB -D_LIB -D_XOPEN_SOURCE=500 " #874696 + CPP_OPTIONS="${CXXFLAGS} -DTARGET_API_LIB -D_LIB " + CREATE_MAIN= + ) + emake -C INCHI_API/libinchi/gcc "${common_opts[@]}" "${target_opts[@]}" + + pushd "INCHI_API/bin/Linux" || die + ln -s libinchi.so.1 libinchi.so || die + popd > /dev/null || die + + # Compile the executable + target_opts=( + LINKER_OPTIONS="${LDFLAGS} -L${S}/INCHI_API/bin/Linux -linchi " + C_COMPILER_OPTIONS="${CFLAGS} -DTARGET_EXE_STANDALONE " + CPP_COMPILER_OPTIONS="${CXXFLAGS} -DTARGET_EXE_STANDALONE " + CREATE_MAIN= + ) + emake -C INCHI_EXE/inchi-1/gcc "${common_opts[@]}" "${target_opts[@]}" + +} + +src_install() { + dodoc readme*.txt + if use doc ; then + pushd "${WORKDIR}/INCHI-1-DOC" || die + docinto doc + dodoc *.pdf readme.txt + popd || die + fi + dobin "${S}/INCHI_EXE/bin/Linux/inchi-1" + dolib.so "${S}/INCHI_API/bin/Linux/"lib*so* + doheader "${S}/INCHI_BASE/src/"{inchi_api,ixa}.h +} |