summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-10-24 14:48:55 +0000
committerJustin Lecher <jlec@gentoo.org>2012-10-24 14:48:55 +0000
commit8aac783abd39a1f170b363198098d3ed4f4277bb (patch)
tree06dff3f93730bc3f2092ca1c9df165e15a135bc1 /sci-libs/inchi
parentBump the l10n to 3.5.7. (diff)
downloadgentoo-2-8aac783abd39a1f170b363198098d3ed4f4277bb.tar.gz
gentoo-2-8aac783abd39a1f170b363198098d3ed4f4277bb.tar.bz2
gentoo-2-8aac783abd39a1f170b363198098d3ed4f4277bb.zip
sci-libs/inchi: Imported bug fix for #439440 (Add USE=static-libs), kindly prepared by Reinis Danne
(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'sci-libs/inchi')
-rw-r--r--sci-libs/inchi/ChangeLog7
-rw-r--r--sci-libs/inchi/files/inchi-1.04-static.patch26
-rw-r--r--sci-libs/inchi/inchi-1.04.ebuild46
3 files changed, 62 insertions, 17 deletions
diff --git a/sci-libs/inchi/ChangeLog b/sci-libs/inchi/ChangeLog
index df78dc444673..ef8240c5a587 100644
--- a/sci-libs/inchi/ChangeLog
+++ b/sci-libs/inchi/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-libs/inchi
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/ChangeLog,v 1.2 2012/03/04 13:22:18 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/ChangeLog,v 1.3 2012/10/24 14:48:55 jlec Exp $
+
+ 24 Oct 2012; Justin Lecher <jlec@gentoo.org> inchi-1.04.ebuild,
+ +files/inchi-1.04-static.patch:
+ Imported bug fix for #439440 (Add USE=static-libs), kindly prepared by Reinis
+ Danne
*inchi-1.04 (04 Mar 2012)
diff --git a/sci-libs/inchi/files/inchi-1.04-static.patch b/sci-libs/inchi/files/inchi-1.04-static.patch
new file mode 100644
index 000000000000..a367c153824a
--- /dev/null
+++ b/sci-libs/inchi/files/inchi-1.04-static.patch
@@ -0,0 +1,26 @@
+--- INCHI_API/gcc_so_makefile/makefile 2012-05-13 14:52:53.587632989 +0300
++++ INCHI_API/gcc_so_makefile/makefile 2012-05-13 14:52:11.668635419 +0300
+@@ -209,6 +209,14 @@
+
+ else
+
++ifdef STATIC
++
++libinchi.a: $(INCHI_LIB_OBJS)
++ $(AR) rcs $(INCHI_LIB_PATHNAME).a $(INCHI_LIB_OBJS)
++ $(RANLIB) $(INCHI_LIB_PATHNAME).a
++
++else
++
+ $(INCHI_LIB_PATHNAME).so$(VERSION): $(INCHI_LIB_OBJS)
+ $(SHARED_LINK) $(SHARED_LINK_PARM) -o \
+ $(INCHI_LIB_PATHNAME).so$(VERSION) \
+@@ -219,6 +226,8 @@
+
+ endif
+
++endif
++
+ # === InChI Library compile rule =========
+
+ %.o: $(P_LIBR)%.c
diff --git a/sci-libs/inchi/inchi-1.04.ebuild b/sci-libs/inchi/inchi-1.04.ebuild
index f5b0f1fcc5ca..9c7b73f40103 100644
--- a/sci-libs/inchi/inchi-1.04.ebuild
+++ b/sci-libs/inchi/inchi-1.04.ebuild
@@ -1,6 +1,6 @@
# 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 $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/inchi/inchi-1.04.ebuild,v 1.2 2012/10/24 14:48:55 jlec Exp $
EAPI=4
@@ -15,7 +15,7 @@ SRC_URI="
LICENSE="IUPAC-InChi"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc"
+IUSE="doc static-libs"
DEPEND="app-arch/unzip"
RDEPEND=""
@@ -23,25 +23,39 @@ RDEPEND=""
S="${WORKDIR}"/INCHI-1-API
src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.03-shared.patch
+ epatch \
+ "${FILESDIR}"/${PN}-1.03-shared.patch \
+ "${FILESDIR}"/${PN}-1.04-static.patch
+ tc-export AR RANLIB
}
src_compile() {
+ 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
+ )
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
+ "${common_opts[@]}"
popd
done
+ if use static-libs ; then
+ pushd INCHI_API/gcc_so_makefile > /dev/null
+ emake libinchi.a \
+ "${common_opts[@]}" \
+ STATIC=1
+ popd
+ fi
}
src_install() {
@@ -51,11 +65,11 @@ src_install() {
docinto doc
dodoc *.pdf readme.txt
fi
- cd "${S}/INCHI/gcc/inchi-1"
- dobin inchi-1
+ dobin "${S}"/INCHI/gcc/inchi-1/inchi-1
cd "${S}/INCHI_API/gcc_so_makefile/result"
rm *gz
- dolib.so lib*
+ dolib.so lib*so*
+ use static-libs && dolib.a lib*a
insinto /usr/include
doins ../../inchi_main/inchi_api.h
}