public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Reinis Danne" <rei4dan@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/inchi/, sci-libs/inchi/files/
Date: Fri, 19 Oct 2012 18:00:01 +0000 (UTC)	[thread overview]
Message-ID: <1350669526.a83a18119d43577b88868f855185748f96492729.rei4dan@gentoo> (raw)

commit:     a83a18119d43577b88868f855185748f96492729
Author:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
AuthorDate: Fri Oct 19 17:58:46 2012 +0000
Commit:     Reinis Danne <rei4dan <AT> gmail <DOT> com>
CommitDate: Fri Oct 19 17:58:46 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a83a1811

inchi: Add static-libs USE flag

---
 sci-libs/inchi/ChangeLog                     |   10 +++
 sci-libs/inchi/files/inchi-1.03-shared.patch |   20 ++++++
 sci-libs/inchi/files/inchi-1.04-static.patch |   25 ++++++++
 sci-libs/inchi/inchi-1.04.ebuild             |   81 ++++++++++++++++++++++++++
 sci-libs/inchi/metadata.xml                  |    8 +++
 5 files changed, 144 insertions(+), 0 deletions(-)

diff --git a/sci-libs/inchi/ChangeLog b/sci-libs/inchi/ChangeLog
new file mode 100644
index 0000000..2f71821
--- /dev/null
+++ b/sci-libs/inchi/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-libs/inchi
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*inchi-1.04 (19 Oct 2012)
+
+  19 Oct 2012; Reinis Danne <rei4dan@gmail.com> +files/inchi-1.03-shared.patch,
+  +inchi-1.04.ebuild, +files/inchi-1.04-static.patch, +metadata.xml:
+  Add static-libs USE flag.
+

diff --git a/sci-libs/inchi/files/inchi-1.03-shared.patch b/sci-libs/inchi/files/inchi-1.03-shared.patch
new file mode 100644
index 0000000..6f4619d
--- /dev/null
+++ b/sci-libs/inchi/files/inchi-1.03-shared.patch
@@ -0,0 +1,20 @@
+ INCHI_API/gcc_so_makefile/makefile |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/INCHI_API/gcc_so_makefile/makefile b/INCHI_API/gcc_so_makefile/makefile
+index dd8e53c..cd617ad 100644
+--- a/INCHI_API/gcc_so_makefile/makefile
++++ b/INCHI_API/gcc_so_makefile/makefile
+@@ -213,9 +213,11 @@ $(INCHI_LIB_PATHNAME).so$(VERSION): $(INCHI_LIB_OBJS)
+ 	$(SHARED_LINK) $(SHARED_LINK_PARM) -o \
+   $(INCHI_LIB_PATHNAME).so$(VERSION) \
+   $(INCHI_LIB_OBJS) \
+-  -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION)
++  -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION) -lm
+ 	ln -fs $(INCHI_LIB_NAME).so$(VERSION) \
+   $(INCHI_LIB_PATHNAME).so$(MAIN_VERSION)
++	ln -fs $(INCHI_LIB_NAME).so$(VERSION) \
++  $(INCHI_LIB_PATHNAME).so
+ 
+ endif
+ 

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 0000000..93996fd
--- /dev/null
+++ b/sci-libs/inchi/files/inchi-1.04-static.patch
@@ -0,0 +1,25 @@
+--- 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,13 @@
+ 
+ else
+ 
++ifdef STATIC
++
++libinchi.a: $(INCHI_LIB_OBJS)
++	ar rcs $(INCHI_LIB_PATHNAME).a $(INCHI_LIB_OBJS)
++
++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
new file mode 100644
index 0000000..569b506
--- /dev/null
+++ b/sci-libs/inchi/inchi-1.04.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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 static-libs"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S="${WORKDIR}"/INCHI-1-API
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PN}-1.03-shared.patch
+	epatch "${FILESDIR}"/${PN}-1.04-static.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
+	if use static-libs ; then
+		pushd INCHI_API/gcc_so_makefile > /dev/null
+		emake libinchi.a \
+            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 \
+			STATIC=1
+		popd
+	fi
+}
+
+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*
+	if use static-libs ; then
+		dolib.a lib*.a
+	fi
+	insinto /usr/include
+	doins ../../inchi_main/inchi_api.h
+}

diff --git a/sci-libs/inchi/metadata.xml b/sci-libs/inchi/metadata.xml
new file mode 100644
index 0000000..b785994
--- /dev/null
+++ b/sci-libs/inchi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<herd>sci-chemistry</herd>
+	<longdescription>
+		Program v1.04 implementing IUPAC (Standard) InChI/InChIKey version 1.
+	</longdescription>
+</pkgmetadata>


             reply	other threads:[~2012-10-19 18:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 18:00 Reinis Danne [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-10-24 14:51 [gentoo-commits] proj/sci:master commit in: sci-libs/inchi/, sci-libs/inchi/files/ Justin Lecher
2012-10-24 14:51 Justin Lecher
2012-03-04 13:25 Justin Lecher
2011-03-26 16:03 Justin Lecher
2011-03-25 16:38 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350669526.a83a18119d43577b88868f855185748f96492729.rei4dan@gentoo \
    --to=rei4dan@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox