Hei hei, we use this as well but with my patches on top to build with cmake. See: https://github.com/LeSpocky/iniparser
Nicolas refused to merge this into the main tree, but maybe someone else finds it useful. I have working rules/iniparser.(in|make) here for build with cmake. Contact me if you're interested. Greets Alex Am 2013-02-18 10:09, schrieb Alexander Stein: > Signed-off-by: Alexander Stein <[email protected]> > --- > iniparser.make seems trivial and works, but I'm still uncertain, if > INIPARSER_CONF_TOOL := autoconf would be needed or not. There are new > packages setting this. But IIRC it should not be necessary. > > .../iniparser-3.1/0001-Add-extern-C-wrappers.patch | 61 > ++++++++++++++++++++++ > ...Add-files-for-autotools-based-compilation.patch | 60 +++++++++++++++++++++ > patches/iniparser-3.1/autogen.sh | 1 + > patches/iniparser-3.1/series | 5 ++ > rules/iniparser.in | 7 +++ > rules/iniparser.make | 47 +++++++++++++++++ > 6 files changed, 181 insertions(+) > create mode 100644 patches/iniparser-3.1/0001-Add-extern-C-wrappers.patch > create mode 100644 > patches/iniparser-3.1/0002-Add-files-for-autotools-based-compilation.patch > create mode 120000 patches/iniparser-3.1/autogen.sh > create mode 100644 patches/iniparser-3.1/series > create mode 100644 rules/iniparser.in > create mode 100644 rules/iniparser.make > > diff --git a/patches/iniparser-3.1/0001-Add-extern-C-wrappers.patch > b/patches/iniparser-3.1/0001-Add-extern-C-wrappers.patch > new file mode 100644 > index 0000000..d78e433 > --- /dev/null > +++ b/patches/iniparser-3.1/0001-Add-extern-C-wrappers.patch > @@ -0,0 +1,61 @@ > +From: Alexander Stein <[email protected]> > +Date: Mon, 18 Feb 2013 09:51:07 +0100 > +Subject: [PATCH] Add extern "C" wrappers > + > +Taken from Gentoo portage tree. > + > +Signed-off-by: Alexander Stein <[email protected]> > +--- > + src/dictionary.c | 8 ++++++++ > + src/iniparser.h | 8 ++++++++ > + 2 files changed, 16 insertions(+) > + > +diff --git a/src/dictionary.c b/src/dictionary.c > +index 3f0f5cf..7fcc355 100644 > +--- a/src/dictionary.c > ++++ b/src/dictionary.c > +@@ -32,6 +32,9 @@ > + > /*--------------------------------------------------------------------------- > + Private functions > + > ---------------------------------------------------------------------------*/ > ++#ifdef __cplusplus > ++extern "C" { > ++#endif > + > + /* Doubles the allocated size associated to a pointer */ > + /* 'size' is the current allocated size. */ > +@@ -394,5 +397,10 @@ int main(int argc, char *argv[]) > + dictionary_del(d); > + return 0 ; > + } > ++ > ++#ifdef __cplusplus > ++} > ++#endif > ++ > + #endif > + /* vim: set ts=4 et sw=4 tw=75 */ > +diff --git a/src/iniparser.h b/src/iniparser.h > +index ecd73bf..5421455 100644 > +--- a/src/iniparser.h > ++++ b/src/iniparser.h > +@@ -49,6 +49,10 @@ > + int iniparser_getnsec(dictionary * d); > + > + > ++#ifdef __cplusplus > ++extern "C" { > ++#endif > ++ > + > /*-------------------------------------------------------------------------*/ > + /** > + @brief Get name for section n in a dictionary. > +@@ -304,4 +308,8 @@ dictionary * iniparser_load(const char * ininame); > + > /*--------------------------------------------------------------------------*/ > + void iniparser_freedict(dictionary * d); > + > ++#ifdef __cplusplus > ++} > ++#endif > ++ > + #endif > diff --git > a/patches/iniparser-3.1/0002-Add-files-for-autotools-based-compilation.patch > b/patches/iniparser-3.1/0002-Add-files-for-autotools-based-compilation.patch > new file mode 100644 > index 0000000..0cc1718 > --- /dev/null > +++ > b/patches/iniparser-3.1/0002-Add-files-for-autotools-based-compilation.patch > @@ -0,0 +1,60 @@ > +From: Alexander Stein <[email protected]> > +Date: Mon, 18 Feb 2013 09:52:02 +0100 > +Subject: [PATCH] Add files for autotools based compilation > + > +Taken from Gentoo portage tree. > + > +Signed-off-by: Alexander Stein <[email protected]> > +--- > + Makefile.am | 10 ++++++++++ > + configure.ac | 24 ++++++++++++++++++++++++ > + 2 files changed, 34 insertions(+) > + create mode 100644 Makefile.am > + create mode 100644 configure.ac > + > +diff --git a/Makefile.am b/Makefile.am > +new file mode 100644 > +index 0000000..63ca53b > +--- /dev/null > ++++ b/Makefile.am > +@@ -0,0 +1,10 @@ > ++ACLOCAL_AMFLAGS = -I config > ++ > ++lib_LTLIBRARIES = libiniparser.la > ++ > ++libiniparser_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ > ++libiniparser_la_SOURCES = src/dictionary.c src/iniparser.c > ++ > ++include_HEADERS = src/dictionary.h src/iniparser.h > ++ > ++ > +diff --git a/configure.ac b/configure.ac > +new file mode 100644 > +index 0000000..2aa2d4e > +--- /dev/null > ++++ b/configure.ac > +@@ -0,0 +1,24 @@ > ++AC_PREREQ([2.65]) > ++AC_INIT([iniparser], [3.0], [[email protected]]) > ++ > ++AC_CONFIG_AUX_DIR(config) > ++AC_CONFIG_MACRO_DIR(config) > ++ > ++AM_INIT_AUTOMAKE([1.8 foreign]) > ++ > ++SHARED_VERSION_INFO="0" > ++AC_SUBST(SHARED_VERSION_INFO) > ++ > ++ > ++# Checks for programs. > ++AC_PROG_CC > ++ > ++LT_INIT > ++# Checks for header files. > ++AC_CHECK_HEADERS([ ctype.h stdio.h stdlib.h string.h ]) > ++ > ++# Checks for library functions. > ++AC_CHECK_FUNCS([strcmp]) > ++ > ++AC_CONFIG_FILES([Makefile]) > ++AC_OUTPUT > diff --git a/patches/iniparser-3.1/autogen.sh > b/patches/iniparser-3.1/autogen.sh > new file mode 120000 > index 0000000..9f8a4cb > --- /dev/null > +++ b/patches/iniparser-3.1/autogen.sh > @@ -0,0 +1 @@ > +../autogen.sh > \ No newline at end of file > diff --git a/patches/iniparser-3.1/series b/patches/iniparser-3.1/series > new file mode 100644 > index 0000000..352b5ea > --- /dev/null > +++ b/patches/iniparser-3.1/series > @@ -0,0 +1,5 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-Add-extern-C-wrappers.patch > +0002-Add-files-for-autotools-based-compilation.patch > +# a3c1900847ba70cdfd3a21aaa6e48824 - git-ptx-patches magic > diff --git a/rules/iniparser.in b/rules/iniparser.in > new file mode 100644 > index 0000000..7184391 > --- /dev/null > +++ b/rules/iniparser.in > @@ -0,0 +1,7 @@ > +## SECTION=system_libraries > + > +config INIPARSER > + tristate > + prompt "iniparser" > + help > + iniparser is a free stand-alone ini file parsing library. > diff --git a/rules/iniparser.make b/rules/iniparser.make > new file mode 100644 > index 0000000..b34aac2 > --- /dev/null > +++ b/rules/iniparser.make > @@ -0,0 +1,47 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2013 by Alexander Stein > <[email protected]> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_INIPARSER) += iniparser > + > +# > +# Paths and names > +# > +INIPARSER_VERSION := 3.1 > +INIPARSER_MD5 := 0aa4f995468ed390caf323f50a285bc3 > +INIPARSER := iniparser-$(INIPARSER_VERSION) > +INIPARSER_SUFFIX := tar.gz > +INIPARSER_URL := > http://ndevilla.free.fr/iniparser/$(INIPARSER).$(INIPARSER_SUFFIX) > +INIPARSER_SOURCE := $(SRCDIR)/$(INIPARSER).$(INIPARSER_SUFFIX) > +INIPARSER_DIR := $(BUILDDIR)/$(INIPARSER) > +INIPARSER_LICENSE := MIT > + > +# > ---------------------------------------------------------------------------- > +# Target-Install > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/iniparser.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, iniparser) > + @$(call install_fixup, iniparser,PRIORITY,optional) > + @$(call install_fixup, iniparser,SECTION,base) > + @$(call install_fixup, iniparser,AUTHOR,"Alexander Stein > <[email protected]>") > + @$(call install_fixup, iniparser,DESCRIPTION,missing) > + > + @$(call install_lib, iniparser, 0, 0, 0644, libiniparser) > + > + @$(call install_finish, iniparser) > + > + @$(call touch) > + > +# vim: syntax=make > -- > 1.8.1.2 -- »With the first link, the chain is forged. The first speech censured, the first thought forbidden, the first freedom denied, chains us all irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie) *** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 *** -- ptxdist mailing list [email protected]
