summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-03-06 16:50:06 -0500
committerMichael Orlitzky <mjo@gentoo.org>2020-03-06 21:13:24 -0500
commit20a34c28e3afae7c20221d6fb76ae83d119c1375 (patch)
tree9bdaff3f686a9b25765f1fd0323963a8cb9861aa /sci-mathematics/glpk
parentmail-mta/opensmtpd: remove ancient ~6.0.3_p1 version (diff)
downloadgentoo-20a34c28e3afae7c20221d6fb76ae83d119c1375.tar.gz
gentoo-20a34c28e3afae7c20221d6fb76ae83d119c1375.tar.bz2
gentoo-20a34c28e3afae7c20221d6fb76ae83d119c1375.zip
sci-mathematics/glpk: new version 4.65.
This new upstream version fixes a few minor ebuild issues: * I've attempted to fix the MySQL include location in a more standard way, by using mysql_config (bug 597620). Another solution was already present in v4.63, so I've marked this bug as resolved. * The virtual/mysql dependency was replaced, per bug 666060. This will be completely resolved when v4.65 goes stable and v4.63 is removed. We also include a new patch, from upstream, to quiet some overly-verbose output. The patch to debundle the system libraries was forward-ported to the new version thanks to Fran├žois Bissey, who maintained an ebuild for v4.65 in the sage-on-gentoo overlay until now. Bug: https://bugs.gentoo.org/666060 Closes: https://bugs.gentoo.org/597620 Closes: https://bugs.gentoo.org/711648 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/glpk')
-rw-r--r--sci-mathematics/glpk/Manifest1
-rw-r--r--sci-mathematics/glpk/files/glpk-4.65-debundle-system-libs.patch91
-rw-r--r--sci-mathematics/glpk/files/glpk-4.65-fix-mysql-include-prefix.patch47
-rw-r--r--sci-mathematics/glpk/files/glpk-4.65-longstep_verbosity.patch23
-rw-r--r--sci-mathematics/glpk/glpk-4.65.ebuild69
5 files changed, 231 insertions, 0 deletions
diff --git a/sci-mathematics/glpk/Manifest b/sci-mathematics/glpk/Manifest
index e7dae3fabf9..6c89c63e486 100644
--- a/sci-mathematics/glpk/Manifest
+++ b/sci-mathematics/glpk/Manifest
@@ -1 +1,2 @@
DIST glpk-4.63.tar.gz 4131787 BLAKE2B 791fa1a1424011668019e180fc245c0319f601255f596affe87afa0df47d9d615a8accd794d51c15bff5fe4fe6409369362f6c9e82bdde67903177b8da55e891 SHA512 3ee9b9ec5322282a9c62b2ee209fc7760383a6a764ef3816445ffb66f15ed4d00309bff1b98d50c243b58aa74f83072afde45c389799e637e11e86f4db45276c
+DIST glpk-4.65.tar.gz 4167110 BLAKE2B 4ccb5cd8301bdca2ccdecfc1648642afe26ff0a1ee9a75cb5a3906838086e5c41edfb16e7c55f4ad677d192f6a66b866f2d917c5be7103da7141bfb1f74e636b SHA512 997e8e599ff1718a08c66b86eadd0e01f4644899f1e95920f8ae91d66b4d8361021766b346845f4dcbcfe667b41ab72ea3d377017a0ebf85d7ece091cfd81375
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 00000000000..78af8b8d943
--- /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 <sys/time.h> 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 00000000000..4dd6583d6de
--- /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 <michael@orlitzky.com>
+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 00000000000..1b78ece3e69
--- /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
diff --git a/sci-mathematics/glpk/glpk-4.65.ebuild b/sci-mathematics/glpk/glpk-4.65.ebuild
new file mode 100644
index 00000000000..258796fa21a
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.65.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/40"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( dev-db/mysql-connector-c )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.65-fix-mysql-include-prefix.patch"
+ "${FILESDIR}/${PN}-4.65-debundle-system-libs.patch"
+ "${FILESDIR}/${PN}-4.65-longstep_verbosity.patch"
+)
+
+src_prepare() {
+ # TODO: the ODBC library is dlopen()ed, so we only want to append
+ # -I<foo> to the preprocessor flags, and not all of the CFLAGS that
+ # were used to build libiodbc. That fix and the pkg-config fallback
+ # should be sent upstream, and placed into CPPFLAGS rather than
+ # CFLAGS (as configure.ac does now).
+ use odbc && [[ -z $(type -P odbc_config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ else
+ myconf="--disable-dl"
+ fi
+
+ econf ${myconf} \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_enable static-libs static) \
+ $(use_with gmp)
+}
+
+src_install() {
+ default
+ if use examples; then
+ insinto "/usr/share/doc/${PF}"
+ doins -r examples
+ docompress -x "/usr/share/doc/${PF}/examples"
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}