summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2010-04-11 08:18:38 +0000
committerTiziano Müller <dev-zero@gentoo.org>2010-04-11 08:18:38 +0000
commitc0a243482028ddcf5e5b5ad77f61bdb4567f3d49 (patch)
treec577917d7300e7a5a4d7eba8bce8cca7703de020 /dev-libs/iniparser
parentstable on ia64. wrt bug #302064. (diff)
downloadgentoo-2-c0a243482028ddcf5e5b5ad77f61bdb4567f3d49.tar.gz
gentoo-2-c0a243482028ddcf5e5b5ad77f61bdb4567f3d49.tar.bz2
gentoo-2-c0a243482028ddcf5e5b5ad77f61bdb4567f3d49.zip
Respect CC properly (bug #296050, thanks to Jeroen Roovers). Make headers C++ compatible (bug #264508, thanks to Lei Qing).
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/iniparser')
-rw-r--r--dev-libs/iniparser/ChangeLog12
-rw-r--r--dev-libs/iniparser/files/iniparser-3.0b-cpp.patch47
-rw-r--r--dev-libs/iniparser/files/iniparser-3.0b-makefile.patch49
-rw-r--r--dev-libs/iniparser/iniparser-3.0b-r1.ebuild5
-rw-r--r--dev-libs/iniparser/iniparser-3.0b-r2.ebuild58
5 files changed, 167 insertions, 4 deletions
diff --git a/dev-libs/iniparser/ChangeLog b/dev-libs/iniparser/ChangeLog
index 9899154c3ffa..db9d66599605 100644
--- a/dev-libs/iniparser/ChangeLog
+++ b/dev-libs/iniparser/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-libs/iniparser
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/iniparser/ChangeLog,v 1.15 2009/12/27 08:02:24 josejx Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/iniparser/ChangeLog,v 1.16 2010/04/11 08:18:38 dev-zero Exp $
+
+*iniparser-3.0b-r2 (11 Apr 2010)
+
+ 11 Apr 2010; Tiziano Müller <dev-zero@gentoo.org>
+ iniparser-3.0b-r1.ebuild, +iniparser-3.0b-r2.ebuild,
+ +files/iniparser-3.0b-cpp.patch, +files/iniparser-3.0b-makefile.patch:
+ Respect CC properly (bug #296050, thanks to Jeroen Roovers). Make headers
+ C++ compatible (bug #264508, thanks to Lei Qing).
27 Dec 2009; Joseph Jezak <josejx@gentoo.org> iniparser-3.0b-r1.ebuild:
Marked ppc/ppc64 stable for bug #291428.
diff --git a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
new file mode 100644
index 000000000000..cb331b813093
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
@@ -0,0 +1,47 @@
+diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
+--- iniparser3.0b/src/dictionary.c 2007-11-24 05:39:18.000000000 +0800
++++ iniparser3.0b-patched/src/dictionary.c 2009-04-01 21:38:09.000000000 +0800
+@@ -38,6 +38,9 @@
+ /*---------------------------------------------------------------------------
+ Private functions
+ ---------------------------------------------------------------------------*/
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Doubles the allocated size associated to a pointer */
+ /* 'size' is the current allocated size. */
+@@ -401,5 +404,10 @@
+ dictionary_del(d);
+ return 0 ;
+ }
++
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+ /* vim: set ts=4 et sw=4 tw=75 */
+diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h
+--- iniparser3.0b/src/iniparser.h 2007-11-24 05:38:19.000000000 +0800
++++ iniparser3.0b-patched/src/iniparser.h 2009-04-01 21:38:02.000000000 +0800
+@@ -41,6 +41,10 @@
+ #define iniparser_getstr(d, k) iniparser_getstring(d, k, NULL)
+ #define iniparser_setstr iniparser_setstring
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /*-------------------------------------------------------------------------*/
+ /**
+ @brief Get number of sections in a dictionary
+@@ -277,4 +281,8 @@
+ /*--------------------------------------------------------------------------*/
+ void iniparser_freedict(dictionary * d);
+
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
diff --git a/dev-libs/iniparser/files/iniparser-3.0b-makefile.patch b/dev-libs/iniparser/files/iniparser-3.0b-makefile.patch
new file mode 100644
index 000000000000..6f834030ddb9
--- /dev/null
+++ b/dev-libs/iniparser/files/iniparser-3.0b-makefile.patch
@@ -0,0 +1,49 @@
+diff -Naur iniparser3.0b.orig/Makefile iniparser3.0b/Makefile
+--- iniparser3.0b.orig/Makefile 2010-04-07 08:02:48.771242264 +0200
++++ iniparser3.0b/Makefile 2010-04-07 08:10:51.403895732 +0200
+@@ -3,16 +3,16 @@
+ #
+
+ # Compiler settings
+-CC = gcc
+-CFLAGS = -O2 -fPIC -Wall -ansi -pedantic
++CC ?= gcc
++CFLAGS += -fPIC -Wall -ansi -pedantic
+
+ # Ar settings to build the library
+-AR = ar
++AR ?= ar
+ ARFLAGS = rcv
+
+ SHLD = ${CC} ${CFLAGS}
+-LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+-LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
++LDSHFLAGS = -shared -Wl,-Bsymbolic
++LDFLAGS += -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+
+ # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX)
+ # RANLIB = ranlib
+@@ -28,7 +28,7 @@
+ COMPILE.c=$(CC) $(CFLAGS) -c
+ .c.o:
+ @(echo "compiling $< ...")
+- @($(COMPILE.c) -o $@ $<)
++ $(COMPILE.c) -o $@ $<
+
+
+ SRCS = src/iniparser.c \
+@@ -40,11 +40,11 @@
+ default: libiniparser.a libiniparser.so
+
+ libiniparser.a: $(OBJS)
+- @($(AR) $(ARFLAGS) libiniparser.a $(OBJS))
+- @($(RANLIB) libiniparser.a)
++ $(AR) $(ARFLAGS) libiniparser.a $(OBJS)
++ $(RANLIB) libiniparser.a
+
+ libiniparser.so: $(OBJS)
+- @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
++ $(SHLD) $(LDSHFLAGS) $(LDFLAGS) -o $@.0 $(OBJS) \
+ -Wl,-soname=`basename $@`.0
+
+ clean:
diff --git a/dev-libs/iniparser/iniparser-3.0b-r1.ebuild b/dev-libs/iniparser/iniparser-3.0b-r1.ebuild
index cd67bfb5ef16..6baf03d23886 100644
--- a/dev-libs/iniparser/iniparser-3.0b-r1.ebuild
+++ b/dev-libs/iniparser/iniparser-3.0b-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/iniparser/iniparser-3.0b-r1.ebuild,v 1.14 2009/12/27 08:02:24 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/iniparser/iniparser-3.0b-r1.ebuild,v 1.15 2010/04/11 08:18:38 dev-zero Exp $
inherit eutils multilib toolchain-funcs
@@ -25,6 +25,7 @@ src_unpack() {
}
src_compile() {
+ echo "CFLAGS: ${CFLAGS}"
sed -i \
-e "s|\(CFLAGS =\) -O2|\1 ${CFLAGS}|" \
-e "s|\(LDFLAGS =\)|\1 ${LDFLAGS}|" \
diff --git a/dev-libs/iniparser/iniparser-3.0b-r2.ebuild b/dev-libs/iniparser/iniparser-3.0b-r2.ebuild
new file mode 100644
index 000000000000..79ef1e5349a2
--- /dev/null
+++ b/dev-libs/iniparser/iniparser-3.0b-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/iniparser/iniparser-3.0b-r2.ebuild,v 1.1 2010/04/11 08:18:38 dev-zero Exp $
+
+EAPI="2"
+
+inherit eutils multilib
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="A free stand-alone ini file parsing library."
+HOMEPAGE="http://ndevilla.free.fr/iniparser/"
+SRC_URI="http://ndevilla.free.fr/iniparser/${MY_P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="examples static-libs"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-fix-set-functions.patch" \
+ "${FILESDIR}/${P}-cpp.patch" \
+ "${FILESDIR}/${P}-makefile.patch"
+
+ sed -i \
+ -e "s|/usr/lib|/usr/$(get_libdir)|g" \
+ Makefile || die "sed failed"
+}
+
+src_compile() {
+ local targets="libiniparser.so"
+ use static-libs && targets="${targets} libiniparser.a"
+
+ emake ${targets} || die "emake failed"
+}
+
+src_install() {
+ dolib libiniparser.so.0
+ dosym libiniparser.so.0 /usr/$(get_libdir)/libiniparser.so
+
+ use static-libs && dolib libiniparser.a
+
+ insinto /usr/include
+ doins src/*.h
+
+ dodoc AUTHORS README
+ dohtml html/*
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}
+ doins test/*.c
+ fi
+}