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/fampp2/, dev-libs/fampp2/files/
Date: Tue, 27 Sep 2016 21:28:50
Message-Id: 1475011709.0e2028487dc6c08de3ddb58fa873104981524c16.soap@gentoo
1 commit: 0e2028487dc6c08de3ddb58fa873104981524c16
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 27 21:21:26 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 27 21:28:29 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e202848
7
8 dev-libs/fampp2: Fix building with GCC 6 and -Werror=terminate
9
10 Gentoo-bug: 595308
11 * EAPI=6
12 * Fix buildsystem properly, remove all the seds
13 * Fix building with GCC 6, due to changed noexcept semantics
14 * Remove 'eutils.eclass'
15 * Disable building of static libraries
16
17 Package-Manager: portage-2.3.1
18
19 dev-libs/fampp2/fampp2-7.0.1-r1.ebuild | 57 ----------------
20 dev-libs/fampp2/fampp2-7.0.1-r2.ebuild | 61 +++++++++++++++++
21 .../files/fampp2-7.0.1-fix-buildsystem.patch | 78 ++++++++++++++++++++++
22 dev-libs/fampp2/files/fampp2-7.0.1-fix-gcc6.patch | 67 +++++++++++++++++++
23 .../fampp2/files/fampp2-7.0.1-libsigc++-2.6.patch | 46 +++++++++++++
24 5 files changed, 252 insertions(+), 57 deletions(-)
25
26 diff --git a/dev-libs/fampp2/fampp2-7.0.1-r1.ebuild b/dev-libs/fampp2/fampp2-7.0.1-r1.ebuild
27 deleted file mode 100644
28 index 665bb03..00000000
29 --- a/dev-libs/fampp2/fampp2-7.0.1-r1.ebuild
30 +++ /dev/null
31 @@ -1,57 +0,0 @@
32 -# Copyright 1999-2013 Gentoo Foundation
33 -# Distributed under the terms of the GNU General Public License v2
34 -# $Id$
35 -
36 -EAPI="5"
37 -
38 -inherit eutils flag-o-matic
39 -
40 -DESCRIPTION="C++ wrapper for fam"
41 -HOMEPAGE="https://sourceforge.net/projects/fampp/"
42 -SRC_URI="mirror://sourceforge/fampp/${P}.tar.bz2"
43 -
44 -LICENSE="GPL-2"
45 -SLOT="0"
46 -KEYWORDS="~amd64 ~x86"
47 -IUSE="examples stlport"
48 -
49 -RDEPEND="virtual/fam
50 - stlport? ( dev-libs/STLport )
51 - >=dev-libs/ferrisloki-2.0.3[stlport?]
52 - >=dev-libs/libsigc++-2.6:2
53 - dev-libs/glib:2
54 - x11-libs/gtk+:2"
55 -DEPEND="${DEPEND}
56 - virtual/pkgconfig"
57 -
58 -src_prepare() {
59 - # Fix compat with libsigc++-2.6
60 - find -name '*.h' -exec sed -i '/sigc++\/object.h/d' {} + || die
61 - find -name '*.hh' -exec sed -i '/sigc++\/object.h/d' {} + || die
62 - find -name '*.cpp' -exec sed -i '/sigc++\/object.h/d' {} + || die
63 - find -name '*.cpp' -exec sed -i '/sigc++\/object_slot.h/d' {} + || die
64 - append-cxxflags -std=c++11
65 -
66 - sed -ri \
67 - -e '/^C(XX)?FLAGS/s:-O0 -g::' \
68 - -e '/^LDFLAGS/s:-Wl,-O1 -Wl,--hash-style=both::' \
69 - configure || die "sed failed"
70 -}
71 -
72 -src_configure() {
73 - # glib and gtk+ are only required for some examples
74 - econf \
75 - --disable-glibtest \
76 - --disable-gtktest \
77 - --with-stlport=/usr/include/stlport \
78 - $(use_enable stlport)
79 -
80 - if ! use examples ; then
81 - sed -i -e '/^SUBDIRS/ s/examples//' Makefile.in || die "sed failed"
82 - fi
83 -}
84 -
85 -src_install() {
86 - default
87 - prune_libtool_files
88 -}
89
90 diff --git a/dev-libs/fampp2/fampp2-7.0.1-r2.ebuild b/dev-libs/fampp2/fampp2-7.0.1-r2.ebuild
91 new file mode 100644
92 index 00000000..8bed9bd
93 --- /dev/null
94 +++ b/dev-libs/fampp2/fampp2-7.0.1-r2.ebuild
95 @@ -0,0 +1,61 @@
96 +# Copyright 1999-2016 Gentoo Foundation
97 +# Distributed under the terms of the GNU General Public License v2
98 +# $Id$
99 +
100 +EAPI=6
101 +
102 +inherit autotools flag-o-matic
103 +
104 +DESCRIPTION="C++ wrapper for fam"
105 +HOMEPAGE="https://sourceforge.net/projects/fampp/"
106 +SRC_URI="mirror://sourceforge/fampp/${P}.tar.bz2"
107 +
108 +LICENSE="GPL-2"
109 +SLOT="0"
110 +KEYWORDS="~amd64 ~x86"
111 +IUSE="examples stlport"
112 +
113 +RDEPEND="virtual/fam
114 + stlport? ( dev-libs/STLport )
115 + >=dev-libs/ferrisloki-2.0.3[stlport?]
116 + >=dev-libs/libsigc++-2.6:2
117 + dev-libs/glib:2
118 + x11-libs/gtk+:2"
119 +DEPEND="${DEPEND}
120 + virtual/pkgconfig"
121 +
122 +PATCHES=(
123 + # Fix compat with libsigc++-2.6, #569700
124 + "${FILESDIR}/${PN}-7.0.1-libsigc++-2.6.patch"
125 + # Fix completely broken buildsystem
126 + "${FILESDIR}/${PN}-7.0.1-fix-buildsystem.patch"
127 + # Fix noexcept(true) for dtors in >=C++11 with GCC 6, #595308
128 + "${FILESDIR}/${PN}-7.0.1-fix-gcc6.patch"
129 +)
130 +
131 +src_prepare() {
132 + default
133 + mv configure.{in,ac} || die
134 + eautoreconf
135 +}
136 +
137 +src_configure() {
138 + # libsigc++-2.6 requires building with C++11
139 + append-cxxflags -std=c++11
140 +
141 + # glib and gtk+ are only required for some examples
142 + econf \
143 + --disable-static \
144 + --disable-glibtest \
145 + --disable-gtktest \
146 + --with-stlport="${EPREFIX}/usr/include/stlport" \
147 + $(use_enable stlport) \
148 + $(use_with examples)
149 +}
150 +
151 +src_install() {
152 + default
153 +
154 + # package provides .pc files
155 + find "${D}" -name '*.la' -delete || die
156 +}
157
158 diff --git a/dev-libs/fampp2/files/fampp2-7.0.1-fix-buildsystem.patch b/dev-libs/fampp2/files/fampp2-7.0.1-fix-buildsystem.patch
159 new file mode 100644
160 index 00000000..34067ff
161 --- /dev/null
162 +++ b/dev-libs/fampp2/files/fampp2-7.0.1-fix-buildsystem.patch
163 @@ -0,0 +1,78 @@
164 +Fix buildsystem, to avoid ugly and extremely brittle patching
165 +of the configure script and Makefile.in in the main ebuild.
166 +
167 +--- a/configure.in
168 ++++ b/configure.in
169 +@@ -1,8 +1,8 @@
170 ++AC_PREREQ([2.69])
171 ++AC_INIT([fampp2],[7.0.1])
172 +
173 +-# require autoconf 2.13
174 +-AC_PREREQ(2.13)
175 +-
176 +-AC_INIT(src/Fampp2.hh)
177 ++AC_CONFIG_MACRO_DIR([macros])
178 ++AC_CONFIG_SRCDIR([src/Fampp2.hh])
179 +
180 + FAMPPTWO_MAJOR=7
181 + FAMPPTWO_MINOR=0
182 +@@ -22,9 +22,8 @@
183 + VERSION=$FAMPP_VERSION
184 + PACKAGE=fampp2
185 +
186 +-AM_CONFIG_HEADER(config.h)
187 +-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
188 +-AM_MAINTAINER_MODE
189 ++AC_CONFIG_HEADERS([config.h])
190 ++AM_INIT_AUTOMAKE
191 +
192 + AC_CANONICAL_HOST
193 + AC_ISC_POSIX
194 +@@ -33,11 +32,7 @@
195 + AC_PROG_CPP
196 + AC_PROG_CXX
197 +
198 +-AC_STDC_HEADERS
199 +-#AC_ARG_PROGRAM
200 +-AC_DISABLE_FAST_INSTALL
201 +-AC_DISABLE_STATIC
202 +-AM_PROG_LIBTOOL
203 ++LT_INIT
204 +
205 +
206 + dnl Checks for libraries.
207 +@@ -58,15 +53,12 @@
208 + ###############################################################################
209 +
210 +
211 +-CFLAGS=" $STLPORT_CFLAGS $LOKI_CFLAGS $SIGC_CFLAGS $CFLAGS -O0 -g "
212 +-CXXFLAGS=" $STLPORT_CFLAGS $CXXFLAGS -O0 -g $LOKI_LIBS $SIGC_CFLAGS "
213 +-LDFLAGS=" $STLPORT_LIBS $SIGC_LIBS $LDFLAGS -Wl,-O1 -Wl,--hash-style=both"
214 +-AC_SUBST(CFLAGS)
215 +-AC_SUBST(CPPFLAGS)
216 +-AC_SUBST(LDFLAGS)
217 +-AC_SUBST(CXXFLAGS)
218 +-AC_SUBST(CXXCPPFLAGS)
219 ++CFLAGS="${CFLAGS} ${STLPORT_CFLAGS} ${LOKI_CFLAGS} ${SIGC_CFLAGS}"
220 ++CXXFLAGS="${CXXFLAGS} ${STLPORT_CFLAGS} ${LOKI_CFLAGS} ${SIGC_CFLAGS}"
221 ++LIBS="${LIBS} ${STLPORT_LIBS} ${LOKI_LIBS} ${SIGC_LIBS}"
222 +
223 ++AC_ARG_WITH([examples], [install examples])
224 ++AM_CONDITIONAL([EXAMPLES], [test "x$with_examples" = "xyes"])
225 +
226 + dnl if test "x${prefix}" = 'xNONE'; then
227 + dnl prefix=${ac_default_prefix};
228 +--- a/Makefile.am
229 ++++ b/Makefile.am
230 +@@ -1,7 +1,10 @@
231 + AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
232 +
233 + NULL=
234 +-SUBDIRS = src examples
235 ++SUBDIRS = src
236 ++if EXAMPLES
237 ++SUBDIRS += examples
238 ++endif
239 +
240 + EXTRA_DIST = fampp.spec fampp.spec.in fampp2.pc.in fampp2.pc
241 +
242
243 diff --git a/dev-libs/fampp2/files/fampp2-7.0.1-fix-gcc6.patch b/dev-libs/fampp2/files/fampp2-7.0.1-fix-gcc6.patch
244 new file mode 100644
245 index 00000000..659ecd5
246 --- /dev/null
247 +++ b/dev-libs/fampp2/files/fampp2-7.0.1-fix-gcc6.patch
248 @@ -0,0 +1,67 @@
249 +C++11 changed destructor semantics to be noexcept(true)
250 +by default, leading to potentially changed semantics.
251 +See also: https://bugs.gentoo.org/show_bug.cgi?id=595308
252 +
253 +--- a/src/Fampp2.cpp
254 ++++ b/src/Fampp2.cpp
255 +@@ -105,6 +105,9 @@
256 + // #include <unistd.h>
257 +
258 + FamppRequest::~FamppRequest()
259 ++#if __cplusplus >= 201103L
260 ++ noexcept(false)
261 ++#endif
262 + {
263 + // cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
264 + // cerr << "FamppRequest::~FamppRequest() this:" << (void*)this << endl;
265 +@@ -245,6 +248,9 @@
266 +
267 +
268 + FamppImplMethods::~FamppImplMethods()
269 ++#if __cplusplus >= 201103L
270 ++ noexcept(false)
271 ++#endif
272 + {
273 + if(0 != FAMClose( &theFAMConnection )) {
274 + throw FamppCloseFailedException();
275 +--- a/src/Fampp2.hh
276 ++++ b/src/Fampp2.hh
277 +@@ -168,7 +168,11 @@
278 + public:
279 +
280 +
281 +- ~FamppRequest();
282 ++ ~FamppRequest()
283 ++#if __cplusplus >= 201103L
284 ++ noexcept(false)
285 ++#endif
286 ++ ;
287 +
288 +
289 + void suspend();
290 +@@ -216,7 +220,11 @@
291 + protected:
292 +
293 + FamppImplMethods();
294 +- virtual ~FamppImplMethods();
295 ++ virtual ~FamppImplMethods()
296 ++#if __cplusplus >= 201103L
297 ++ noexcept(false)
298 ++#endif
299 ++ ;
300 +
301 +
302 + public:
303 +@@ -251,7 +259,11 @@
304 + public:
305 + FamppSingletonClass();
306 + FamppSingletonClass(const std::string appName);
307 +- ~FamppSingletonClass();
308 ++ ~FamppSingletonClass()
309 ++#if __cplusplus >= 201103L
310 ++ noexcept(false)
311 ++#endif
312 ++ ;
313 +
314 +
315 + void NextEvent();
316
317 diff --git a/dev-libs/fampp2/files/fampp2-7.0.1-libsigc++-2.6.patch b/dev-libs/fampp2/files/fampp2-7.0.1-libsigc++-2.6.patch
318 new file mode 100644
319 index 00000000..6b76a15
320 --- /dev/null
321 +++ b/dev-libs/fampp2/files/fampp2-7.0.1-libsigc++-2.6.patch
322 @@ -0,0 +1,46 @@
323 +Remove inclusion of libsigc++ headers obsoleted with version 2.6
324 +See also: https://bugs.gentoo.org/show_bug.cgi?id=569700
325 +
326 +--- a/examples/console_test/famppct.cpp
327 ++++ b/examples/console_test/famppct.cpp
328 +@@ -30,8 +30,6 @@
329 +
330 + #include <sigc++/sigc++.h>
331 + #include <sigc++/slot.h>
332 +-#include <sigc++/object.h>
333 +-#include <sigc++/object_slot.h>
334 +
335 + #include <gtk/gtk.h>
336 + #include <stdio.h>
337 +--- a/examples/gtk/famppgtk.cpp
338 ++++ b/examples/gtk/famppgtk.cpp
339 +@@ -31,8 +31,6 @@
340 +
341 + #include <sigc++/sigc++.h>
342 + #include <sigc++/slot.h>
343 +-#include <sigc++/object.h>
344 +-#include <sigc++/object_slot.h>
345 +
346 + #include <gtk/gtk.h>
347 + #include <stdio.h>
348 +--- a/src/Fampp2.cpp
349 ++++ b/src/Fampp2.cpp
350 +@@ -34,8 +34,6 @@
351 +
352 + #include <sigc++/sigc++.h>
353 + #include <sigc++/slot.h>
354 +-#include <sigc++/object.h>
355 +-#include <sigc++/object_slot.h>
356 +
357 +
358 + using namespace std;
359 +--- a/src/FamppEvents.hh
360 ++++ b/src/FamppEvents.hh
361 +@@ -36,7 +36,6 @@
362 +
363 + #include <fam.h>
364 + #include <sigc++/signal.h>
365 +-#include <sigc++/object.h>
366 + #include <SmartPtr.h>
367 + #include <Singleton.h>
368 + #include <Factory.h>