Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/iniparser/, dev-libs/iniparser/files/
Date: Sat, 29 Aug 2020 16:32:35
Message-Id: 1598718697.442ca7e2f4ea1011d26b4ac95f337bda7cd309eb.soap@gentoo
1 commit: 442ca7e2f4ea1011d26b4ac95f337bda7cd309eb
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 16:31:37 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 16:31:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=442ca7e2
7
8 dev-libs/iniparser: Port SLOT=0 to EAPI 7
9
10 * Rebase patches
11
12 Closes: https://bugs.gentoo.org/739468
13 Package-Manager: Portage-3.0.4, Repoman-3.0.1
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 .../iniparser/files/iniparser-3.0-autotools.patch | 4 +-
17 dev-libs/iniparser/files/iniparser-3.0b-cpp.patch | 30 ++++++-------
18 .../files/iniparser-4.0-out-of-bounds-read.patch | 15 +------
19 dev-libs/iniparser/iniparser-3.1-r2.ebuild | 50 +++++++++++++---------
20 4 files changed, 47 insertions(+), 52 deletions(-)
21
22 diff --git a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
23 index 89c7f63d29a..361c96a7d4f 100644
24 --- a/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
25 +++ b/dev-libs/iniparser/files/iniparser-3.0-autotools.patch
26 @@ -1,5 +1,5 @@
27 --- /dev/null
28 -+++ Makefile.am
29 ++++ b/Makefile.am
30 @@ -0,0 +1,8 @@
31 +ACLOCAL_AMFLAGS = -I config
32 +
33 @@ -10,7 +10,7 @@
34 +
35 +include_HEADERS = src/dictionary.h src/iniparser.h
36 --- /dev/null
37 -+++ configure.ac
38 ++++ b/configure.ac
39 @@ -0,0 +1,24 @@
40 +AC_PREREQ([2.65])
41 +AC_INIT([iniparser], [3.0], [ndevilla@××××.fr])
42
43 diff --git a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
44 index cb331b81309..b7cd17d2d22 100644
45 --- a/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
46 +++ b/dev-libs/iniparser/files/iniparser-3.0b-cpp.patch
47 @@ -1,9 +1,8 @@
48 -diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
49 ---- iniparser3.0b/src/dictionary.c 2007-11-24 05:39:18.000000000 +0800
50 -+++ iniparser3.0b-patched/src/dictionary.c 2009-04-01 21:38:09.000000000 +0800
51 -@@ -38,6 +38,9 @@
52 +--- a/src/dictionary.c
53 ++++ b/src/dictionary.c
54 +@@ -32,6 +32,9 @@
55 /*---------------------------------------------------------------------------
56 - Private functions
57 + Private functions
58 ---------------------------------------------------------------------------*/
59 +#ifdef __cplusplus
60 +extern "C" {
61 @@ -11,9 +10,9 @@ diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
62
63 /* Doubles the allocated size associated to a pointer */
64 /* 'size' is the current allocated size. */
65 -@@ -401,5 +404,10 @@
66 - dictionary_del(d);
67 - return 0 ;
68 +@@ -394,5 +397,10 @@
69 + dictionary_del(d);
70 + return 0 ;
71 }
72 +
73 +#ifdef __cplusplus
74 @@ -22,12 +21,11 @@ diff -ur iniparser3.0b/src/dictionary.c iniparser3.0b-patched/src/dictionary.c
75 +
76 #endif
77 /* vim: set ts=4 et sw=4 tw=75 */
78 -diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h
79 ---- iniparser3.0b/src/iniparser.h 2007-11-24 05:38:19.000000000 +0800
80 -+++ iniparser3.0b-patched/src/iniparser.h 2009-04-01 21:38:02.000000000 +0800
81 -@@ -41,6 +41,10 @@
82 - #define iniparser_getstr(d, k) iniparser_getstring(d, k, NULL)
83 - #define iniparser_setstr iniparser_setstring
84 +--- a/src/iniparser.h
85 ++++ b/src/iniparser.h
86 +@@ -49,6 +49,10 @@
87 + int iniparser_getnsec(dictionary * d);
88 +
89
90 +#ifdef __cplusplus
91 +extern "C" {
92 @@ -35,8 +33,8 @@ diff -ur iniparser3.0b/src/iniparser.h iniparser3.0b-patched/src/iniparser.h
93 +
94 /*-------------------------------------------------------------------------*/
95 /**
96 - @brief Get number of sections in a dictionary
97 -@@ -277,4 +281,8 @@
98 + @brief Get name for section n in a dictionary.
99 +@@ -304,4 +308,8 @@
100 /*--------------------------------------------------------------------------*/
101 void iniparser_freedict(dictionary * d);
102
103
104 diff --git a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
105 index 962566cd5b7..f6488810ac1 100644
106 --- a/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
107 +++ b/dev-libs/iniparser/files/iniparser-4.0-out-of-bounds-read.patch
108 @@ -1,17 +1,6 @@
109 -From 4f870752abbb756911d7b11405d49e9769d082bd Mon Sep 17 00:00:00 2001
110 -From: Emmanuel Leblond <emmanuel.leblond@×××××.com>
111 -Date: Fri, 8 Apr 2016 22:13:36 +0200
112 -Subject: [PATCH] Fix #68 when reading file with only \0 char
113 -
114 ----
115 - src/iniparser.c | 2 +-
116 - 1 file changed, 1 insertion(+), 1 deletion(-)
117 -
118 -diff --git a/src/iniparser.c b/src/iniparser.c
119 -index be37fec..fb1b549 100644
120 --- a/src/iniparser.c
121 +++ b/src/iniparser.c
122 -@@ -678,7 +678,7 @@ dictionary * iniparser_load(const char * ininame)
123 +@@ -663,7 +663,7 @@
124 while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {
125 lineno++ ;
126 len = (int)strlen(line)-1;
127 @@ -19,4 +8,4 @@ index be37fec..fb1b549 100644
128 + if (len<=0)
129 continue;
130 /* Safety check against buffer overflows */
131 - if (line[len]!='\n' && !feof(in)) {
132 + if (line[len]!='\n') {
133
134 diff --git a/dev-libs/iniparser/iniparser-3.1-r2.ebuild b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
135 index 357f9b4f3b5..5c50f4305ea 100644
136 --- a/dev-libs/iniparser/iniparser-3.1-r2.ebuild
137 +++ b/dev-libs/iniparser/iniparser-3.1-r2.ebuild
138 @@ -1,47 +1,55 @@
139 # Copyright 1999-2020 Gentoo Authors
140 # Distributed under the terms of the GNU General Public License v2
141
142 -EAPI=4
143 +EAPI=7
144
145 -AUTOTOOLS_AUTORECONF=1
146 -inherit autotools-utils autotools-multilib
147 +inherit autotools multilib-minimal
148
149 DESCRIPTION="A free stand-alone ini file parsing library"
150 HOMEPAGE="http://ndevilla.free.fr/iniparser/"
151 -
152 SRC_URI="http://ndevilla.free.fr/iniparser/${P}.tar.gz"
153 +
154 LICENSE="MIT"
155 SLOT="0"
156 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
157 -IUSE="doc examples static-libs"
158 -
159 -DEPEND="doc? ( app-doc/doxygen )
160 - sys-devel/libtool"
161 -RDEPEND=""
162 -
163 +IUSE="doc examples"
164 # the tests are rather examples than tests, no point in running them
165 RESTRICT="test"
166
167 -S="${WORKDIR}/${PN}"
168 +BDEPEND="doc? ( app-doc/doxygen )"
169
170 -DOCS=( AUTHORS README )
171 +S="${WORKDIR}/${PN}"
172
173 PATCHES=(
174 - "${FILESDIR}/${PN}-3.0b-cpp.patch"
175 - "${FILESDIR}/${PN}-3.0-autotools.patch"
176 - "${FILESDIR}/${PN}-4.0-out-of-bounds-read.patch"
177 + "${FILESDIR}"/${PN}-3.0b-cpp.patch
178 + "${FILESDIR}"/${PN}-3.0-autotools.patch
179 + "${FILESDIR}"/${PN}-4.0-out-of-bounds-read.patch
180 )
181
182 -src_install() {
183 - autotools-multilib_src_install
184 +src_prepare() {
185 + default
186 + eautoreconf
187 +}
188 +
189 +multilib_src_configure() {
190 + ECONF_SOURCE="${S}" econf \
191 + --disable-static
192 +}
193
194 +multilib_src_install_all() {
195 if use doc; then
196 emake -C doc
197 - dohtml -r html/*
198 + HTML_DOCS=( html/. )
199 fi
200
201 - if use examples ; then
202 - insinto /usr/share/doc/${PF}/examples
203 - doins test/*.{c,ini,py}
204 + einstalldocs
205 +
206 + if use examples; then
207 + docinto examples
208 + dodoc test/*.{c,ini,py}
209 + docompress -x /usr/share/doc/${PF}/examples
210 fi
211 +
212 + # no static archives
213 + find "${ED}" -name '*.la' -delete || die
214 }