* [gentoo-commits] repo/gentoo:master commit in: sci-libs/galib/files/, sci-libs/galib/
@ 2016-09-25 22:24 David Seifert
0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2016-09-25 22:24 UTC (permalink / raw
To: gentoo-commits
commit: 7903e76836b83a49ddac62b9bc9c4aaa1238fbe2
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 25 22:22:40 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 22:23:23 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7903e768
sci-libs/galib: Allow for compiling with GCC 6
Gentoo-bug: 594504
* Patch by Peter Levine
* EAPI=6
* [QA] Fix -Wformat-security errors
* Fix build system to honour CXX, AR, RANLIB properly
Package-Manager: portage-2.3.1
.../galib/files/galib-2.4.7-Wformat-security.patch | 79 ++++++++++++++++++++
.../galib/files/galib-2.4.7-fix-buildsystem.patch | 65 +++++++++++++++++
sci-libs/galib/files/galib-2.4.7-fix-c++14.patch | 85 ++++++++++++++++++++++
sci-libs/galib/galib-2.4.7-r1.ebuild | 55 ++++++++++++++
4 files changed, 284 insertions(+)
diff --git a/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch b/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
new file mode 100644
index 00000000..faa7dcf
--- /dev/null
+++ b/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
@@ -0,0 +1,79 @@
+Fix -Wformat-security issues, as we do not want to install potentially
+dangerous example C++ files on user systems:
+* ex18.C: In function ‘int main(int, char**)’:
+* ex18.C:92:27: warning: format not a string literal and no format arguments [-Wformat-security]
+* sprintf(filename, argv[i]);
+
+--- a/examples/ex18.C
++++ b/examples/ex18.C
+@@ -89,7 +89,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename, argv[i]);
++ sprintf(filename, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex3.C
++++ b/examples/ex3.C
+@@ -71,7 +71,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename, argv[i]);
++ sprintf(filename, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex5.C
++++ b/examples/ex5.C
+@@ -308,7 +308,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename1, argv[i]);
++ sprintf(filename1, "%s", argv[i]);
+ continue;
+ }
+ }
+@@ -318,7 +318,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename2, argv[i]);
++ sprintf(filename2, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex7.C
++++ b/examples/ex7.C
+@@ -68,7 +68,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(datafile, argv[i]);
++ sprintf(datafile, "%s", argv[i]);
+ continue;
+ }
+ }
+@@ -78,7 +78,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(parmfile, argv[i]);
++ sprintf(parmfile, "%s", argv[i]);
+ params.read(parmfile);
+ continue;
+ }
+--- a/ga/gaerror.C
++++ b/ga/gaerror.C
+@@ -21,7 +21,7 @@
+ static STD_OSTREAM *__gaErrStream = & STD_CERR;
+ #endif
+ static GABoolean __gaErrFlag = gaTrue;
+-static char *__gaErrStr[] = {
++static const char *__gaErrStr[] = {
+ "error reading from file: ",
+ "error writing to file: ",
+ "unexpected EOF encountered during read.",
diff --git a/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch b/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch
new file mode 100644
index 00000000..3ed7ad8
--- /dev/null
+++ b/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch
@@ -0,0 +1,65 @@
+Fix the build system, removing hardcoded values for toolchain variables.
+
+--- a/examples/makefile
++++ b/examples/makefile
+@@ -6,7 +6,6 @@
+ # want to compile. See the README for a description of what each example does.
+ # -----------------------------------------------------------------------------
+
+-include ../makevars
+
+ # Set these paths to the location of the GA library and headers.
+ #GA_INC_DIR= /usr/local/include
+@@ -14,8 +13,6 @@
+ GA_INC_DIR= ..
+ GA_LIB_DIR= ../ga
+
+-INC_DIRS= -I$(GA_INC_DIR)
+-LIB_DIRS= -L$(GA_LIB_DIR)
+
+ EXS=randtest\
+ ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9\
+@@ -24,7 +21,7 @@
+
+ .SUFFIXES: .C
+ .C.o:
+- $(CXX) $(CXXFLAGS) $(INC_DIRS) -c $<
++ $(CXX) $(CXXFLAGS) -I.. -c $<
+
+ all: $(EXS)
+
+@@ -34,7 +31,7 @@
+
+ # Use this for gnu make
+ $(EXS): %: %.o
+- $(CXX) $@.o -o $@ $(LIB_DIRS) -lga -lm $(CXX_LIBS)
++ $(CXX) $@.o -o $@ -L../ga/ -lga -lm $(CXX_LIBS)
+
+ clean:
+ $(RM) $(EXS)
+--- a/ga/makefile
++++ b/ga/makefile
+@@ -14,7 +14,7 @@
+
+ $(LIB): $(OBJS)
+ $(PRELINK)
+- $(AR) $(LIB) $?
++ $(AR) rv $(LIB) $?
+ $(RANLIB) $(LIB)
+ echo "$(CXX) $(CXXFLAGS)" > BUILD
+ @echo $(LIB) is now up-to-date
+--- a/makevars
++++ b/makevars
+@@ -31,12 +31,7 @@
+ # verified 06mar07 on linux-x86 (debian with gcc 3.3.5)
+ # verified 06mar07 on linux-x86 (ubuntu with gcc 4.0.3)
+ # verified 06mar07 on macosx-ppc (macosx 10.4.8 with gcc 4.0.1)
+-CXX = g++
+-CXXFLAGS = -g -Wall
+-LD = g++ -w
+-AR = ar rv
+ INSTALL = install -c
+-RANLIB = echo no ranlib
+
+ # gcc2
+ # verified 28dec04 on linux-x86 (redhat 6.2 with gcc 2.95.2)
diff --git a/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch b/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch
new file mode 100644
index 00000000..babc84b
--- /dev/null
+++ b/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch
@@ -0,0 +1,85 @@
+Fix building with C++14, which errors out due to stricter two-phase lookup.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594504
+
+Patch by Peter Levine
+
+--- a/ga/GA1DArrayGenome.C
++++ b/ga/GA1DArrayGenome.C
+@@ -222,8 +222,8 @@
+ aset = new GAAlleleSet<T>[1];
+ aset[0] = s;
+
+- initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
+- mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
++ GAGenome::initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
+ comparator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_COMPARATOR);
+ crossover(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_CROSSOVER);
+ }
+@@ -238,8 +238,8 @@
+ for(int i=0; i<naset; i++)
+ aset[i] = sa.set(i);
+
+- initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
+- mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
++ GAGenome::initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
+ comparator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_COMPARATOR);
+ crossover(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_CROSSOVER);
+ }
+--- a/ga/GA2DArrayGenome.C
++++ b/ga/GA2DArrayGenome.C
+@@ -269,10 +269,10 @@
+ aset = new GAAlleleSet<T>[1];
+ aset[0] = s;
+
+- initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
+- mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
+- comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
+- crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
++ GAGenome::initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
++ GAGenome::comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
++ GAGenome::crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
+ }
+
+ template <class T>
+@@ -286,10 +286,10 @@
+ for(int i=0; i<naset; i++)
+ aset[i] = sa.set(i);
+
+- initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
+- mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
+- comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
+- crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
++ GAGenome::initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
++ GAGenome::comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
++ GAGenome::crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
+ }
+
+
+--- a/ga/GA3DArrayGenome.C
++++ b/ga/GA3DArrayGenome.C
+@@ -322,8 +322,8 @@
+ aset = new GAAlleleSet<T>[1];
+ aset[0] = s;
+
+- initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
+- mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
++ GAGenome::initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
+ comparator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_COMPARATOR);
+ crossover(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_CROSSOVER);
+ }
+@@ -339,8 +339,8 @@
+ for(int i=0; i<naset; i++)
+ aset[i] = sa.set(i);
+
+- initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
+- mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
++ GAGenome::initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
++ GAGenome::mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
+ comparator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_COMPARATOR);
+ crossover(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_CROSSOVER);
+ }
diff --git a/sci-libs/galib/galib-2.4.7-r1.ebuild b/sci-libs/galib/galib-2.4.7-r1.ebuild
new file mode 100644
index 00000000..61d387b
--- /dev/null
+++ b/sci-libs/galib/galib-2.4.7-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit toolchain-funcs
+
+MY_PV="${PV//\./}"
+
+DESCRIPTION="Library for genetic algorithms in C++ programs"
+HOMEPAGE="http://lancet.mit.edu/ga/"
+SRC_URI="http://lancet.mit.edu/ga/dist/galib${MY_PV}.tgz"
+
+LICENSE="BSD examples? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+S="${WORKDIR}/${PN}${MY_PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.4.7-fix-buildsystem.patch"
+ "${FILESDIR}/${PN}-2.4.7-fix-c++14.patch"
+ "${FILESDIR}/${PN}-2.4.7-Wformat-security.patch"
+)
+
+src_prepare() {
+ default
+ sed -e "s:/include:${EPREFIX}/usr/include:" \
+ -e "s:/lib:${EPREFIX}/usr/$(get_libdir):" \
+ -i makevars || die
+}
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ lib
+ emake -C examples clean
+}
+
+src_install() {
+ dodir /usr/$(get_libdir)
+
+ use doc && HTML_DOCS+=( doc/. )
+ if use examples; then
+ dodoc -r examples
+ find "${ED%/}/usr/share/doc/${PF}/examples" -iname 'makefile*' -delete || die
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ default
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/galib/files/, sci-libs/galib/
@ 2017-09-30 5:11 Michael Palimaka
0 siblings, 0 replies; 3+ messages in thread
From: Michael Palimaka @ 2017-09-30 5:11 UTC (permalink / raw
To: gentoo-commits
commit: 8d730bc7b0bef4be83fc8740af77acffc6d52280
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 30 05:10:13 2017 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Sep 30 05:11:24 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d730bc7
sci-libs/galib: remove 2.4.6/2.4.7
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sci-libs/galib/Manifest | 1 -
sci-libs/galib/files/galib-2.4.6-gcc4-gentoo.patch | 23 ---------
sci-libs/galib/files/galib-2.4.6-makefile.patch | 12 -----
sci-libs/galib/galib-2.4.6.ebuild | 37 ---------------
sci-libs/galib/galib-2.4.7.ebuild | 55 ----------------------
5 files changed, 128 deletions(-)
diff --git a/sci-libs/galib/Manifest b/sci-libs/galib/Manifest
index af2e1d51d80..83c5cf4fbcc 100644
--- a/sci-libs/galib/Manifest
+++ b/sci-libs/galib/Manifest
@@ -1,2 +1 @@
-DIST galib246.tgz 378431 SHA256 441150c728d401a93ed6d9e745eae85f9ddbd413cfe06396f1a426cd31c7cc00 SHA512 3c2451c9124cfe7b4b11f67f0aa7f9cbd9819b6e50c3a48478c3f429c8d8a66a57c92a0dd3a720e68d81a6f80c86ef34c27303c3b3292ee28842c74e74f8289d WHIRLPOOL adff31eebb01dd5f94229743dc6623d82efca260911d7d91cfcfac9c59f831625d95d33301f85044ccd41ac487c1d3d2fb9fe0c95eca620a42aabc60ddf40dc3
DIST galib247.tgz 374912 SHA256 ea76b66ce4db4db2ed86e20d6d3ff144abaf73e33620104246639d9b2a465329 SHA512 9c2aca29f24d3f8401ba65c246a0ca7d1fa67e4f756a5258cdb0da111842ea2903c2d70cfd9d60823c9703bcb3415ca670a731924e99878d5536c2f7eb0faba4 WHIRLPOOL 027e1d8999bb09e31da717fb3fb84f023d4488cc161c173e55fdc545b58583f386b6bb9cab631c30f84eae8a8b58c4e669049507bc0ca8561a8ecfba2e57f480
diff --git a/sci-libs/galib/files/galib-2.4.6-gcc4-gentoo.patch b/sci-libs/galib/files/galib-2.4.6-gcc4-gentoo.patch
deleted file mode 100644
index ed2621649ee..00000000000
--- a/sci-libs/galib/files/galib-2.4.6-gcc4-gentoo.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -Naur galib246/ga/gaconfig.h galib246-new/ga/gaconfig.h
---- galib246/ga/gaconfig.h 2005-01-31 10:46:09.000000000 -0500
-+++ galib246-new/ga/gaconfig.h 2006-09-26 19:38:09.000000000 -0400
-@@ -192,7 +192,9 @@
-
- // determine the compiler
- #if defined(__GNUG__) || defined(__GNUC__)
--#if __GNUC__ == 3
-+#if __GNUC__ == 4
-+#define GALIB_COMPILER "gcc4"
-+#elif __GNUC__ == 3
- #define GALIB_COMPILER "gcc3"
- #elif __GNUC__ == 2
- #define GALIB_COMPILER "gcc2"
-@@ -365,7 +367,7 @@
- #define GALIB_USE_PID
- #define GALIB_USE_EMPTY_TEMPLATES
- #define GALIB_NEED_INSTANTIATION_PREFIX
--#if __GNUC__ == 3
-+#if __GNUC__ >= 3
- #define GALIB_USE_ANSI_HEADERS
- #define GALIB_USE_STD_NAMESPACE
- #define GALIB_USE_COMP_OPERATOR_TEMPLATES
diff --git a/sci-libs/galib/files/galib-2.4.6-makefile.patch b/sci-libs/galib/files/galib-2.4.6-makefile.patch
deleted file mode 100644
index a2ced027a4a..00000000000
--- a/sci-libs/galib/files/galib-2.4.6-makefile.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- galib246/ga/makefile.sources 2000-02-03 14:00:46.000000000 -0600
-+++ galib246-new/ga/makefile.sources 2006-04-30 09:30:13.000000000 -0500
-@@ -8,7 +8,8 @@
- GA1DBinStrGenome.h GA2DBinStrGenome.h GA3DBinStrGenome.h GABin2DecGenome.h \
- GA1DArrayGenome.h GA2DArrayGenome.h GA3DArrayGenome.h \
- GAStringGenome.h GARealGenome.h \
-- GATreeBASE.h GATree.h GATreeGenome.h GAListBASE.h GAList.h GAListGenome.h
-+ GATreeBASE.h GATree.h GATreeGenome.h GAListBASE.h GAList.h GAListGenome.h \
-+ std_stream.h
- SRCS= garandom.C gaerror.C GAParameter.C GAStatistics.C \
- GABaseGA.C GASStateGA.C GASimpleGA.C GAIncGA.C GADemeGA.C GADCrowdingGA.C \
- GASelector.C GAScaling.C GAPopulation.C GAGenome.C \
diff --git a/sci-libs/galib/galib-2.4.6.ebuild b/sci-libs/galib/galib-2.4.6.ebuild
deleted file mode 100644
index d0612ad4a3a..00000000000
--- a/sci-libs/galib/galib-2.4.6.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-inherit eutils
-
-MYPV="${PV//\./}"
-
-DESCRIPTION="Library for genetic algorithms in C++ programs"
-HOMEPAGE="http://lancet.mit.edu/ga/"
-SRC_URI="http://lancet.mit.edu/ga/dist/galib${MYPV}.tgz"
-
-LICENSE="BSD GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 x86"
-IUSE=""
-
-S="${WORKDIR}/galib${MYPV}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch \
- "${FILESDIR}"/${P}-makefile.patch \
- "${FILESDIR}"/${P}-gcc4-gentoo.patch
-}
-
-src_compile() {
- emake CXXFLAGS="${CXXFLAGS}" || die "make failed"
-}
-
-src_install() {
- dodir /usr/lib /usr/include
- emake LIB_DEST_DIR="${D}"/usr/lib/ HDR_DEST_DIR="${D}"/usr/include/ install || die
- dohtml -r doc/*
- dodoc RELEASE-NOTES README
- cp -r examples "${D}"/usr/share/doc/${PF}/
-}
diff --git a/sci-libs/galib/galib-2.4.7.ebuild b/sci-libs/galib/galib-2.4.7.ebuild
deleted file mode 100644
index eaca1b7b9fb..00000000000
--- a/sci-libs/galib/galib-2.4.7.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-inherit multilib
-
-MYPV="${PV//\./}"
-
-DESCRIPTION="Library for genetic algorithms in C++ programs"
-HOMEPAGE="http://lancet.mit.edu/ga/"
-SRC_URI="http://lancet.mit.edu/ga/dist/galib${MYPV}.tgz"
-
-LICENSE="BSD examples? ( GPL-2 )"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples"
-
-S="${WORKDIR}/galib${MYPV}"
-
-src_prepare() {
- sed -i \
- -e 's:/include:${EPREFIX}/usr/include:' \
- -e "s:/lib:${EPREFIX}/usr/$(get_libdir):" \
- -e '/^CXX/d' \
- -e '/^CXXFLAGS/d' \
- -e '/^LD/d' \
- makevars || die "sed makevars failed"
-}
-
-src_compile() {
- emake lib
-}
-
-src_install() {
- dodir /usr/$(get_libdir)
- default
-
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r doc/*
- fi
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- cd examples
- make clean
- sed -i \
- -e '/^include/d' \
- -e '/^INC_DIRS/d' \
- -e '/^LIB_DIRS/d' \
- makefile || die "sed makefile failed"
- doins -r *
- fi
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/galib/files/, sci-libs/galib/
@ 2023-07-29 15:36 David Seifert
0 siblings, 0 replies; 3+ messages in thread
From: David Seifert @ 2023-07-29 15:36 UTC (permalink / raw
To: gentoo-commits
commit: 8a895d669694fbdfc3cc9ceae8559f7b3d9a272c
Author: Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sat Jul 29 15:36:13 2023 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jul 29 15:36:13 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a895d66
sci-libs/galib: Fix ISO C++17 does not allow register storage class
Closes: https://github.com/gentoo/gentoo/pull/32041
Closes: https://bugs.gentoo.org/898276
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
sci-libs/galib/Manifest | 1 +
.../galib/files/galib-2.4.7-Wformat-security.patch | 79 --------------------
.../galib/files/galib-2.4.7-fix-buildsystem.patch | 65 -----------------
sci-libs/galib/files/galib-2.4.7-fix-c++14.patch | 85 ----------------------
sci-libs/galib/galib-2.4.7-r1.ebuild | 54 --------------
sci-libs/galib/galib-2.4.7-r2.ebuild | 44 +++++++++++
6 files changed, 45 insertions(+), 283 deletions(-)
diff --git a/sci-libs/galib/Manifest b/sci-libs/galib/Manifest
index a81b53228554..9a0f9f379530 100644
--- a/sci-libs/galib/Manifest
+++ b/sci-libs/galib/Manifest
@@ -1 +1,2 @@
+DIST galib-2.4.7-patches.tar.xz 4180 BLAKE2B 3e0f9bc5c7f3289c1839ef5c2151e72079e2ca19a884ce705bc723a379b76185bb5ebc83b5c465f6df2468e5ca8eaf18d3dbbd807ef9af5899f377d83a94535e SHA512 245fc139aed8f09ba39a0a78b0ed21ac6f8c7d33bdffe24f18f53f688beae00353ac0abfa3746ee733ee30efb1fbf4084b553e7a5b647f1a41fd019ab1218c1a
DIST galib247.tgz 374912 BLAKE2B d6f0d757cee9a1c26eb4525862dc2e9761449492edb323ba30ea70cde95b72da2a90fad4a931ab1d07d8bc0fca2b62672357ee790b1e67f3e9b480d5aff26106 SHA512 9c2aca29f24d3f8401ba65c246a0ca7d1fa67e4f756a5258cdb0da111842ea2903c2d70cfd9d60823c9703bcb3415ca670a731924e99878d5536c2f7eb0faba4
diff --git a/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch b/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
deleted file mode 100644
index faa7dcff446d..000000000000
--- a/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Fix -Wformat-security issues, as we do not want to install potentially
-dangerous example C++ files on user systems:
-* ex18.C: In function ‘int main(int, char**)’:
-* ex18.C:92:27: warning: format not a string literal and no format arguments [-Wformat-security]
-* sprintf(filename, argv[i]);
-
---- a/examples/ex18.C
-+++ b/examples/ex18.C
-@@ -89,7 +89,7 @@
- exit(1);
- }
- else{
-- sprintf(filename, argv[i]);
-+ sprintf(filename, "%s", argv[i]);
- continue;
- }
- }
---- a/examples/ex3.C
-+++ b/examples/ex3.C
-@@ -71,7 +71,7 @@
- exit(1);
- }
- else{
-- sprintf(filename, argv[i]);
-+ sprintf(filename, "%s", argv[i]);
- continue;
- }
- }
---- a/examples/ex5.C
-+++ b/examples/ex5.C
-@@ -308,7 +308,7 @@
- exit(1);
- }
- else{
-- sprintf(filename1, argv[i]);
-+ sprintf(filename1, "%s", argv[i]);
- continue;
- }
- }
-@@ -318,7 +318,7 @@
- exit(1);
- }
- else{
-- sprintf(filename2, argv[i]);
-+ sprintf(filename2, "%s", argv[i]);
- continue;
- }
- }
---- a/examples/ex7.C
-+++ b/examples/ex7.C
-@@ -68,7 +68,7 @@
- exit(1);
- }
- else{
-- sprintf(datafile, argv[i]);
-+ sprintf(datafile, "%s", argv[i]);
- continue;
- }
- }
-@@ -78,7 +78,7 @@
- exit(1);
- }
- else{
-- sprintf(parmfile, argv[i]);
-+ sprintf(parmfile, "%s", argv[i]);
- params.read(parmfile);
- continue;
- }
---- a/ga/gaerror.C
-+++ b/ga/gaerror.C
-@@ -21,7 +21,7 @@
- static STD_OSTREAM *__gaErrStream = & STD_CERR;
- #endif
- static GABoolean __gaErrFlag = gaTrue;
--static char *__gaErrStr[] = {
-+static const char *__gaErrStr[] = {
- "error reading from file: ",
- "error writing to file: ",
- "unexpected EOF encountered during read.",
diff --git a/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch b/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch
deleted file mode 100644
index 3ed7ad84e6d4..000000000000
--- a/sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Fix the build system, removing hardcoded values for toolchain variables.
-
---- a/examples/makefile
-+++ b/examples/makefile
-@@ -6,7 +6,6 @@
- # want to compile. See the README for a description of what each example does.
- # -----------------------------------------------------------------------------
-
--include ../makevars
-
- # Set these paths to the location of the GA library and headers.
- #GA_INC_DIR= /usr/local/include
-@@ -14,8 +13,6 @@
- GA_INC_DIR= ..
- GA_LIB_DIR= ../ga
-
--INC_DIRS= -I$(GA_INC_DIR)
--LIB_DIRS= -L$(GA_LIB_DIR)
-
- EXS=randtest\
- ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9\
-@@ -24,7 +21,7 @@
-
- .SUFFIXES: .C
- .C.o:
-- $(CXX) $(CXXFLAGS) $(INC_DIRS) -c $<
-+ $(CXX) $(CXXFLAGS) -I.. -c $<
-
- all: $(EXS)
-
-@@ -34,7 +31,7 @@
-
- # Use this for gnu make
- $(EXS): %: %.o
-- $(CXX) $@.o -o $@ $(LIB_DIRS) -lga -lm $(CXX_LIBS)
-+ $(CXX) $@.o -o $@ -L../ga/ -lga -lm $(CXX_LIBS)
-
- clean:
- $(RM) $(EXS)
---- a/ga/makefile
-+++ b/ga/makefile
-@@ -14,7 +14,7 @@
-
- $(LIB): $(OBJS)
- $(PRELINK)
-- $(AR) $(LIB) $?
-+ $(AR) rv $(LIB) $?
- $(RANLIB) $(LIB)
- echo "$(CXX) $(CXXFLAGS)" > BUILD
- @echo $(LIB) is now up-to-date
---- a/makevars
-+++ b/makevars
-@@ -31,12 +31,7 @@
- # verified 06mar07 on linux-x86 (debian with gcc 3.3.5)
- # verified 06mar07 on linux-x86 (ubuntu with gcc 4.0.3)
- # verified 06mar07 on macosx-ppc (macosx 10.4.8 with gcc 4.0.1)
--CXX = g++
--CXXFLAGS = -g -Wall
--LD = g++ -w
--AR = ar rv
- INSTALL = install -c
--RANLIB = echo no ranlib
-
- # gcc2
- # verified 28dec04 on linux-x86 (redhat 6.2 with gcc 2.95.2)
diff --git a/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch b/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch
deleted file mode 100644
index babc84b63524..000000000000
--- a/sci-libs/galib/files/galib-2.4.7-fix-c++14.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-Fix building with C++14, which errors out due to stricter two-phase lookup.
-See also: https://bugs.gentoo.org/show_bug.cgi?id=594504
-
-Patch by Peter Levine
-
---- a/ga/GA1DArrayGenome.C
-+++ b/ga/GA1DArrayGenome.C
-@@ -222,8 +222,8 @@
- aset = new GAAlleleSet<T>[1];
- aset[0] = s;
-
-- initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
-- mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
-+ GAGenome::initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
- comparator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_COMPARATOR);
- crossover(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_CROSSOVER);
- }
-@@ -238,8 +238,8 @@
- for(int i=0; i<naset; i++)
- aset[i] = sa.set(i);
-
-- initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
-- mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
-+ GAGenome::initializer(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_MUTATOR);
- comparator(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_COMPARATOR);
- crossover(GA1DArrayAlleleGenome<T>::DEFAULT_1DARRAY_ALLELE_CROSSOVER);
- }
---- a/ga/GA2DArrayGenome.C
-+++ b/ga/GA2DArrayGenome.C
-@@ -269,10 +269,10 @@
- aset = new GAAlleleSet<T>[1];
- aset[0] = s;
-
-- initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
-- mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
-- comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
-- crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
-+ GAGenome::initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
-+ GAGenome::comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
-+ GAGenome::crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
- }
-
- template <class T>
-@@ -286,10 +286,10 @@
- for(int i=0; i<naset; i++)
- aset[i] = sa.set(i);
-
-- initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
-- mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
-- comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
-- crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
-+ GAGenome::initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
-+ GAGenome::comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
-+ GAGenome::crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
- }
-
-
---- a/ga/GA3DArrayGenome.C
-+++ b/ga/GA3DArrayGenome.C
-@@ -322,8 +322,8 @@
- aset = new GAAlleleSet<T>[1];
- aset[0] = s;
-
-- initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
-- mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
-+ GAGenome::initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
- comparator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_COMPARATOR);
- crossover(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_CROSSOVER);
- }
-@@ -339,8 +339,8 @@
- for(int i=0; i<naset; i++)
- aset[i] = sa.set(i);
-
-- initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
-- mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
-+ GAGenome::initializer(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_INITIALIZER);
-+ GAGenome::mutator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_MUTATOR);
- comparator(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_COMPARATOR);
- crossover(GA3DArrayAlleleGenome<T>::DEFAULT_3DARRAY_ALLELE_CROSSOVER);
- }
diff --git a/sci-libs/galib/galib-2.4.7-r1.ebuild b/sci-libs/galib/galib-2.4.7-r1.ebuild
deleted file mode 100644
index cb0d9e5d4d9a..000000000000
--- a/sci-libs/galib/galib-2.4.7-r1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-MY_PV="${PV//\./}"
-
-DESCRIPTION="Library for genetic algorithms in C++ programs"
-HOMEPAGE="http://lancet.mit.edu/ga/"
-SRC_URI="http://lancet.mit.edu/ga/dist/galib${MY_PV}.tgz"
-
-LICENSE="BSD examples? ( GPL-2 )"
-SLOT="0"
-KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples"
-
-S="${WORKDIR}/${PN}${MY_PV}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.4.7-fix-buildsystem.patch"
- "${FILESDIR}/${PN}-2.4.7-fix-c++14.patch"
- "${FILESDIR}/${PN}-2.4.7-Wformat-security.patch"
-)
-
-src_prepare() {
- default
- sed -e "s:/include:${EPREFIX}/usr/include:" \
- -e "s:/lib:${EPREFIX}/usr/$(get_libdir):" \
- -i makevars || die
-}
-
-src_compile() {
- emake \
- CXX="$(tc-getCXX)" \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)" \
- lib
- emake -C examples clean
-}
-
-src_install() {
- dodir /usr/$(get_libdir)
-
- use doc && HTML_DOCS+=( doc/. )
- if use examples; then
- dodoc -r examples
- find "${ED%/}/usr/share/doc/${PF}/examples" -iname 'makefile*' -delete || die
- docompress -x /usr/share/doc/${PF}/examples
- fi
-
- default
-}
diff --git a/sci-libs/galib/galib-2.4.7-r2.ebuild b/sci-libs/galib/galib-2.4.7-r2.ebuild
new file mode 100644
index 000000000000..a4bd3d281306
--- /dev/null
+++ b/sci-libs/galib/galib-2.4.7-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_PV="${PV//\./}"
+
+DESCRIPTION="Library for genetic algorithms in C++ programs"
+HOMEPAGE="http://lancet.mit.edu/ga/"
+SRC_URI="
+ http://lancet.mit.edu/ga/dist/galib${MY_PV}.tgz
+ https://dev.gentoo.org/~soap/distfiles/${P}-patches.tar.xz"
+S="${WORKDIR}/${PN}${MY_PV}"
+
+LICENSE="BSD examples? ( GPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+PATCHES=( "${WORKDIR}"/patches )
+
+src_configure() {
+ tc-export AR CXX
+ export LIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ export INCDIR="${EPREFIX}"/usr/include
+}
+
+src_compile() {
+ emake lib
+ emake -C examples clean
+}
+
+src_install() {
+ use doc && HTML_DOCS=( doc/. )
+ if use examples; then
+ dodoc -r examples
+ find "${ED}"/usr/share/doc/${PF}/examples -iname 'makefile*' -delete || die
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ default
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-29 15:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-29 15:36 [gentoo-commits] repo/gentoo:master commit in: sci-libs/galib/files/, sci-libs/galib/ David Seifert
-- strict thread matches above, loose matches on Subject: below --
2017-09-30 5:11 Michael Palimaka
2016-09-25 22:24 David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox