From 623ee73d661e5ed8475cb264511f683407d87365 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Apr 2020 03:41:30 +0100 Subject: gentoo Easter resync : 12.04.2020 --- .../files/glpk-4.65-debundle-system-libs.patch | 91 ++++++++++++++++++++++ .../files/glpk-4.65-fix-mysql-include-prefix.patch | 47 +++++++++++ .../glpk/files/glpk-4.65-longstep_verbosity.patch | 23 ++++++ 3 files changed, 161 insertions(+) create mode 100644 sci-mathematics/glpk/files/glpk-4.65-debundle-system-libs.patch create mode 100644 sci-mathematics/glpk/files/glpk-4.65-fix-mysql-include-prefix.patch create mode 100644 sci-mathematics/glpk/files/glpk-4.65-longstep_verbosity.patch (limited to 'sci-mathematics/glpk/files') diff --git a/sci-mathematics/glpk/files/glpk-4.65-debundle-system-libs.patch b/sci-mathematics/glpk/files/glpk-4.65-debundle-system-libs.patch new file mode 100644 index 000000000000..78af8b8d9431 --- /dev/null +++ b/sci-mathematics/glpk/files/glpk-4.65-debundle-system-libs.patch @@ -0,0 +1,91 @@ +diff --git a/configure.ac b/configure.ac +index 96c4cc5..29e11f9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -69,6 +69,11 @@ AC_PROG_LIBTOOL + dnl Check for math library + AC_CHECK_LIB([m], [exp]) + ++AC_CHECK_LIB([amd], [amd_1]) ++AC_CHECK_LIB([colamd], [colamd]) ++AC_CHECK_HEADER([amd.h]) ++AC_CHECK_LIB([z], [gzopen]) ++ + dnl Check for header + AC_CHECK_HEADER([sys/time.h], + AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A])) +diff --git a/src/Makefile.am b/src/Makefile.am +index eb5dc1b..b814627 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -6,10 +6,8 @@ lib_LTLIBRARIES = libglpk.la + + libglpk_la_CPPFLAGS = \ + -I$(srcdir) \ +--I$(srcdir)/amd \ + -I$(srcdir)/api \ + -I$(srcdir)/bflib \ +--I$(srcdir)/colamd \ + -I$(srcdir)/draft \ + -I$(srcdir)/env \ + -I$(srcdir)/intopt \ +@@ -18,8 +16,7 @@ libglpk_la_CPPFLAGS = \ + -I$(srcdir)/mpl \ + -I$(srcdir)/npp \ + -I$(srcdir)/proxy \ +--I$(srcdir)/simplex \ +--I$(srcdir)/zlib ++-I$(srcdir)/simplex + + libglpk_la_LDFLAGS = \ + -version-info 43:0:3 \ +@@ -27,18 +24,6 @@ libglpk_la_LDFLAGS = \ + ${NOUNDEFINED} + + libglpk_la_SOURCES = \ +-amd/amd_1.c \ +-amd/amd_2.c \ +-amd/amd_aat.c \ +-amd/amd_control.c \ +-amd/amd_defaults.c \ +-amd/amd_dump.c \ +-amd/amd_info.c \ +-amd/amd_order.c \ +-amd/amd_post_tree.c \ +-amd/amd_postorder.c \ +-amd/amd_preprocess.c \ +-amd/amd_valid.c \ + api/advbas.c \ + api/asnhall.c \ + api/asnlp.c \ +@@ -104,7 +89,6 @@ bflib/scf.c \ + bflib/scfint.c \ + bflib/sgf.c \ + bflib/sva.c \ +-colamd/colamd.c \ + draft/bfd.c \ + draft/bfx.c \ + draft/glpapi06.c \ +@@ -202,21 +186,6 @@ simplex/spxprim.c \ + simplex/spxprob.c \ + simplex/spychuzc.c \ + simplex/spychuzr.c \ +-simplex/spydual.c \ +-zlib/adler32.c \ +-zlib/compress.c \ +-zlib/crc32.c \ +-zlib/deflate.c \ +-zlib/gzclose.c \ +-zlib/gzlib.c \ +-zlib/gzread.c \ +-zlib/gzwrite.c \ +-zlib/inffast.c \ +-zlib/inflate.c \ +-zlib/inftrees.c \ +-zlib/trees.c \ +-zlib/uncompr.c \ +-zlib/zio.c \ +-zlib/zutil.c ++simplex/spydual.c + + ## eof ## diff --git a/sci-mathematics/glpk/files/glpk-4.65-fix-mysql-include-prefix.patch b/sci-mathematics/glpk/files/glpk-4.65-fix-mysql-include-prefix.patch new file mode 100644 index 000000000000..4dd6583d6dea --- /dev/null +++ b/sci-mathematics/glpk/files/glpk-4.65-fix-mysql-include-prefix.patch @@ -0,0 +1,47 @@ +From 5cff695e9eb8405efbdfa976f1fad965c55436e8 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Fri, 6 Mar 2020 16:24:10 -0500 +Subject: [PATCH 1/1] configure.ac: attempt mysql_config to find the MySQL + headers. + +When building with MySQL support, the configure script guesses that +the path to the MySQL headers is /usr/include/mysql. That is usually +correct, but when people install MySQL to a nonstandard location such +as /home/mjo/usr, it falls over. Fortunately, MySQL usually provides +an executable called "mysql_config" that can output the location of +its headers. + +In such a "local" installation, if I prepend /home/mjo/usr/bin to my +PATH, then running "mysql_config" will execute the mysql_config from +/home/mjo/usr/bin and will therefore output -I/home/mjo/usr/include as +the preprocessor flag that glpk needs. That's the right thing to do, +and it works just as well for a system install under /usr or +/usr/local. + +This commit attempts to find the headers using mysql_config first, +and falls back to the location /usr/include/mysql. + +Gentoo-bug: https://bugs.gentoo.org/597620 +--- + configure.ac | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 96c4cc5..d20a6ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -145,7 +145,10 @@ if test "$enable_mysql" = "yes"; then + AC_MSG_ERROR([--enable-mysql requires --enable-dl]) + fi + AC_MSG_RESULT([yes]) +- CPPFLAGS="-I/usr/include/mysql $CPPFLAGS" ++ # Guess at the include directory if mysql_config isn't in our PATH. ++ MYSQL_INCLUDE=$(mysql_config --include 2>/dev/null) ++ test -z "${MYSQL_INCLUDE}" && MYSQL_INCLUDE="-I/usr/include/mysql" ++ CPPFLAGS="${MYSQL_INCLUDE} $CPPFLAGS" + AC_DEFINE_UNQUOTED([MYSQL_DLNAME], ["$LIBMYSQL"], [N/A]) + else + AC_MSG_RESULT([no]) +-- +2.24.1 + diff --git a/sci-mathematics/glpk/files/glpk-4.65-longstep_verbosity.patch b/sci-mathematics/glpk/files/glpk-4.65-longstep_verbosity.patch new file mode 100644 index 000000000000..1b78ece3e695 --- /dev/null +++ b/sci-mathematics/glpk/files/glpk-4.65-longstep_verbosity.patch @@ -0,0 +1,23 @@ +http://lists.gnu.org/archive/html/bug-glpk/2018-03/msg00000.html + +diff --git a/src/draft/glpios03.c b/src/draft/glpios03.c +index 21d6a00..eb34ad0 100644 +--- a/src/draft/glpios03.c ++++ b/src/draft/glpios03.c +@@ -920,13 +920,10 @@ int ios_driver(glp_tree *T) + #if 0 + ((glp_iocp *)T->parm)->msg_lev = GLP_MSG_DBG; + #endif +-#if 1 /* 16/III-2016 */ ++#if 1 /* 01/III-2018 */ + if (((glp_iocp *)T->parm)->flip) +-#if 0 /* 20/I-2018 */ +- xprintf("WARNING: LONG-STEP DUAL SIMPLEX WILL BE USED\n"); +-#else +- xprintf("Long-step dual simplex will be used\n"); +-#endif ++ if (T->parm->msg_lev >= GLP_MSG_ALL) ++ xprintf("Long-step dual simplex will be used\n"); + #endif + /* on entry to the B&B driver it is assumed that the active list + contains the only active (i.e. root) subproblem, which is the -- cgit v1.2.3