diff options
Diffstat (limited to 'sci-libs/galib')
-rw-r--r-- | sci-libs/galib/Manifest | 6 | ||||
-rw-r--r-- | sci-libs/galib/files/galib-2.4.7-Wformat-security.patch | 79 | ||||
-rw-r--r-- | sci-libs/galib/files/galib-2.4.7-fix-buildsystem.patch | 65 | ||||
-rw-r--r-- | sci-libs/galib/files/galib-2.4.7-fix-c++14.patch | 85 | ||||
-rw-r--r-- | sci-libs/galib/galib-2.4.7-r1.ebuild | 54 | ||||
-rw-r--r-- | sci-libs/galib/galib-2.4.7-r2.ebuild | 44 |
6 files changed, 46 insertions, 287 deletions
diff --git a/sci-libs/galib/Manifest b/sci-libs/galib/Manifest index d042e138f835..3696592f9864 100644 --- a/sci-libs/galib/Manifest +++ b/sci-libs/galib/Manifest @@ -1,6 +1,4 @@ -AUX galib-2.4.7-Wformat-security.patch 1804 BLAKE2B 555615507fd4d2f644d5de8a4e3232e70c8b77fc4d003b763748691e4c9469a1ccf1bf1e68f9b19f1e2348d6cef5a0f4d881e8e264c4685b6dfebf23e76d0bd7 SHA512 6846b2b15f8b348dfc83a7df6688e0c92ab5aa3eb2a6ff113609756cdcb12a679c82af730aebbdba5f9496c439e1e27cc9549812fd77ff9a6ca55812ff756dfb -AUX galib-2.4.7-fix-buildsystem.patch 1576 BLAKE2B 4e26b48f6c8d9ef40dfaa1f9df7060569ebd96619fc026e0235a45d568da22658650a9f97ceb3cb87c4c78c5512c67acb280344633e349869e839b245e61b1b9 SHA512 26c8634664b75ef94028dfbf51dce5417256290703f3717ce2fcf660b166012622db97447a7272781c44d02b3d1728470a0f64d4b1a089ad5e4d44eaebcf3004 -AUX galib-2.4.7-fix-c++14.patch 3951 BLAKE2B ce6ac176bce07bda353458b9c817ff55efb174334902cdd9d861763be083990d8a21d5aba2eb7966c73af87d040b0204c14d293e1c088cebf0b227d2ff6a7292 SHA512 2f843b121c06ee124f13cac106a492f495c2043a54030ebc7d67ccf386ea1eacd72dc14e5a4f925d0c1f345038d8d04ed6de96b0030bcb205714afed1e7103f4 +DIST galib-2.4.7-patches.tar.xz 4180 BLAKE2B 3e0f9bc5c7f3289c1839ef5c2151e72079e2ca19a884ce705bc723a379b76185bb5ebc83b5c465f6df2468e5ca8eaf18d3dbbd807ef9af5899f377d83a94535e SHA512 245fc139aed8f09ba39a0a78b0ed21ac6f8c7d33bdffe24f18f53f688beae00353ac0abfa3746ee733ee30efb1fbf4084b553e7a5b647f1a41fd019ab1218c1a DIST galib247.tgz 374912 BLAKE2B d6f0d757cee9a1c26eb4525862dc2e9761449492edb323ba30ea70cde95b72da2a90fad4a931ab1d07d8bc0fca2b62672357ee790b1e67f3e9b480d5aff26106 SHA512 9c2aca29f24d3f8401ba65c246a0ca7d1fa67e4f756a5258cdb0da111842ea2903c2d70cfd9d60823c9703bcb3415ca670a731924e99878d5536c2f7eb0faba4 -EBUILD galib-2.4.7-r1.ebuild 1145 BLAKE2B 309fc528f2f2db82f7a63937c3ac91cb44370ae3afdff8fde4a441fcc4056a8f5d8baab9f6e5f4ef57508eb417a27091b3506fdbebd90d908e3f7bd8d2ea6b46 SHA512 b60bbfa8f4f6d5a2d9beba8e1c9cfc3386bf5cff7616b138ff183d55c0bcdad539854e0ae42455150536ab96157fb870e4f9819acad79fe3154236c94613d608 +EBUILD galib-2.4.7-r2.ebuild 962 BLAKE2B 49576ede6a65e83a5011220b883105b29e49a94bc6c04a7f84131d92f0269e3ce564100a466398dcc86ed44861f2240c931d394a74e73115065b57bbb5f7eb2b SHA512 2109b685bc5499672347a1470049abd032b56dac4fefd7a02369061db7c395afea815bc6861ab12adf79da118f486ce90c99ef992d9f5a980ae1739ac52c60c8 MISC metadata.xml 506 BLAKE2B 84aac684f9ab79a2def8adde1112a3daaad74e87fc917cfe9a2aed8ddbe6d4daf662135258f54037317c8731de1ece30f4c074c0812bc76d545b07987916f2d7 SHA512 8761f36de9332f13124bb83972a2135f4172fc9a60aef28e730de84d23742a243871758313c0139a45fd7aeaeec673be3878cb0778c27f9c19932a9ba6ce14c0 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 +} |