summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2015-08-10 18:25:30 +0200
committerSebastian Pipping <sping@gentoo.org>2015-08-10 19:06:19 +0200
commitbd4460074770ea6d83a310a2ebc4cb98540f3070 (patch)
tree17a4c7aec74acf1cac75fc4b091741e9a33e8a0f /dev-libs
parentLimit dev-libs/iniparser reverse dendencies to slot 0 (not slot 4) (diff)
downloadgentoo-bd4460074770ea6d83a310a2ebc4cb98540f3070.tar.gz
gentoo-bd4460074770ea6d83a310a2ebc4cb98540f3070.tar.bz2
gentoo-bd4460074770ea6d83a310a2ebc4cb98540f3070.zip
dev-libs/iniparser: 4.0 (bug #408558)
Package-Manager: portage-2.2.20
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/iniparser/Manifest1
-rw-r--r--dev-libs/iniparser/files/iniparser-4.0-cflags.patch28
-rw-r--r--dev-libs/iniparser/files/iniparser-4.0-soname.patch35
-rw-r--r--dev-libs/iniparser/iniparser-4.0.ebuild71
4 files changed, 135 insertions, 0 deletions
diff --git a/dev-libs/iniparser/Manifest b/dev-libs/iniparser/Manifest
index c3a2be8ae74..67f9115847e 100644
--- a/dev-libs/iniparser/Manifest
+++ b/dev-libs/iniparser/Manifest
@@ -1 +1,2 @@
DIST iniparser-3.1.tar.gz 39097 SHA256 aedf23881b834519aea5e861b2400606d211da049cd59d3cfb4568e0d9eff5c5 SHA512 8fd8324c5629fdc3e3eff00afb5f0832402ccc760c5b92db82aa29b340ec891419ca2c4fee3a4d4d67cf9bc51c76b095bc0c458e087c2b8e72ac36867c47ae86 WHIRLPOOL 1b8e6d5c34918cf51db605a7bc81eed75b521a57b403bbf26b572506735d78f58bad250512d53cfc08959c827713c8477a877b66b900a553a9c8099757df6d89
+DIST iniparser-4.0.tar.gz 41188 SHA256 e0bbd664bb3f0d64c21ac2d67a843b1c7a3a9710e96393344d170ab8b33e92ba SHA512 86080d4e4cb85e252f9c75116d9a548a2f08f2131e269834a0d16597da4e4c5790dff8304be082f2a8dcc75d17585e9a8fad3f0f4766bff8914f6ef2b0d6fa05 WHIRLPOOL 614ddb56f0aefc69ef98cf9b7bbdfe6300d0eaee048315550a9f38cecef05aa47a198859b929a520296f4ebef03377b12c41f062c3e95d32cacca1ef1b3797af
diff --git a/dev-libs/iniparser/files/iniparser-4.0-cflags.patch b/dev-libs/iniparser/files/iniparser-4.0-cflags.patch
new file mode 100644
index 00000000000..817b087e6d2
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-4.0-cflags.patch
@@ -0,0 +1,28 @@
+From 14370f5ce94cce077c798db6611ef65cd1822df2 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sat, 8 Aug 2015 19:04:08 +0200
+Subject: [PATCH 1/2] Respect user CFLAGS
+
+---
+ Makefile | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 78708a5..744405a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,11 +6,6 @@
+ CC ?= gcc
+
+ CFLAGS += -fPIC -Wall -Wextra -ansi -pedantic
+-ifndef DEBUG
+-CFLAGS += -O2
+-else
+-CFLAGS += -g
+-endif
+
+ # Ar settings to build the library
+ AR ?= ar
+--
+2.5.0
+
diff --git a/dev-libs/iniparser/files/iniparser-4.0-soname.patch b/dev-libs/iniparser/files/iniparser-4.0-soname.patch
new file mode 100644
index 00000000000..0536b671a5c
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-4.0-soname.patch
@@ -0,0 +1,35 @@
+From c3a112a89d3cbbfe0edc4fbac366a47986d6c118 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sat, 8 Aug 2015 19:10:27 +0200
+Subject: [PATCH 2/2] Adjust soname and make target non-phony
+
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 744405a..323e579 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,6 +14,7 @@ ARFLAGS = rcv
+ SHLD = ${CC} ${CFLAGS}
+ LDSHFLAGS = -shared -Wl,-Bsymbolic
+ LDFLAGS += -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
++SONAME_CURRENT = 1
+
+ # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
+ # RANLIB = ranlib
+@@ -52,8 +53,8 @@ libiniparser.a: $(OBJS)
+ $(QUIET_RANLIB)$(RANLIB) $@
+
+ libiniparser.so: $(OBJS)
+- $(QUIET_LINK)$(SHLD) $(LDSHFLAGS) $(LDFLAGS) -o $@.0 $(OBJS) \
+- -Wl,-soname=`basename $@`.0
++ $(QUIET_LINK)$(SHLD) $(LDSHFLAGS) $(LDFLAGS) -o $@ $(OBJS) \
++ -Wl,-soname=libiniparser4.so.$(SONAME_CURRENT)
+
+ clean:
+ $(RM) $(OBJS)
+--
+2.5.0
+
diff --git a/dev-libs/iniparser/iniparser-4.0.ebuild b/dev-libs/iniparser/iniparser-4.0.ebuild
new file mode 100644
index 00000000000..5631f413122
--- /dev/null
+++ b/dev-libs/iniparser/iniparser-4.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="A free stand-alone ini file parsing library"
+HOMEPAGE="https://github.com/ndevilla/iniparser"
+SRC_URI="https://github.com/ndevilla/iniparser/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+DOCS=( AUTHORS README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cflags.patch
+ "${FILESDIR}"/${P}-soname.patch
+)
+
+_newlib_so_with_symlinks() {
+ local source="${1}" base="${2}" current="${3}" revision="${4}" age="${5}"
+ local libdir="$(get_libdir)"
+
+ newlib.so ${source} ${base}.so.${current}.${revision}.${age}
+ for i in ".${current}" '' ; do
+ dosym ${base}.so.${current}.${revision}.${age} /usr/${libdir}/${base}.so${i}
+ done
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ rm -R html || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" V=1
+}
+
+src_install() {
+ newlib.a lib${PN}.a lib${PN}${SLOT}.a
+ _newlib_so_with_symlinks lib${PN}.so lib${PN}${SLOT} 1 0 0
+
+ insinto /usr/include/${PN}${SLOT}
+ doins src/*.h
+
+ if use doc; then
+ emake -C doc
+ dohtml -r html/*
+ fi
+
+ if use examples ; then
+ local examplesdir="/usr/share/doc/${PF}/examples"
+ insinto "${examplesdir}"
+ doins example/*
+ docompress -x "${examplesdir}"
+ fi
+
+ dodoc "${DOCS[@]}"
+}
+
+src_test() {
+ emake -C test CC="$(tc-getCC)" V=1
+}