From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from webbox1416.server-home.net ([77.236.96.61]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1U7Npj-0000ag-Bp for ptxdist@pengutronix.de; Mon, 18 Feb 2013 11:20:29 +0100 From: Alexander Stein Date: Mon, 18 Feb 2013 11:18:34 +0100 Message-ID: <3509780.Az83yKQLAs@ws-stein> In-Reply-To: References: <1361178558-2983-1-git-send-email-alexander.stein@systec-electronic.com> MIME-Version: 1.0 Subject: Re: [ptxdist] [PATCH] iniparser: Add package Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi Alex, Am Montag, 18. Februar 2013, 10:58:19 schrieb Alexander Dahl: > 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. Does he even reject the C++ patch? Maybe you can post your ptxdist patches adding iniparser package, so the ptxdist community can opt for a build system. Regards, Alexander > Am 2013-02-18 10:09, schrieb Alexander Stein: > > Signed-off-by: Alexander Stein > > --- > > 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 > > +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 > > +--- > > + 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 > > +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 > > +--- > > + 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], [ndevilla@free.fr]) > > ++ > > ++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 > > +# > > +# 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 > > ") > > + @$(call install_fixup, iniparser,DESCRIPTION,missing) > > + > > + @$(call install_lib, iniparser, 0, 0, 0644, libiniparser) > > + > > + @$(call install_finish, iniparser) > > + > > + @$(call touch) > > + > > +# vim: syntax=make > > -- Dipl.-Inf. Alexander Stein SYS TEC electronic GmbH August-Bebel-Str. 29 D-07973 Greiz Tel: +49-3661-6279-0, Fax: +49-3661-6279-99 eMail: Alexander.Stein@systec-electronic.com Internet: http://www.systec-electronic.com Managing Director: Dipl.-Phys. Siegmar Schmidt Commercial registry: Amtsgericht Jena, HRB 205563 -- ptxdist mailing list ptxdist@pengutronix.de