summaryrefslogtreecommitdiff
path: root/sci-mathematics/glpk
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/glpk')
-rw-r--r--sci-mathematics/glpk/Manifest2
-rw-r--r--sci-mathematics/glpk/glpk-5.0.ebuild76
2 files changed, 78 insertions, 0 deletions
diff --git a/sci-mathematics/glpk/Manifest b/sci-mathematics/glpk/Manifest
index 15763aa82869..f275c84a256a 100644
--- a/sci-mathematics/glpk/Manifest
+++ b/sci-mathematics/glpk/Manifest
@@ -2,5 +2,7 @@ AUX glpk-4.65-debundle-system-libs.patch 1930 BLAKE2B 0c265afe9338e75bb3d6536e9e
AUX glpk-4.65-fix-mysql-include-prefix.patch 1837 BLAKE2B ecd90024e07f29e8ebb6af80b520c8f192cfea21c90d8c247001389f2ccfcf24ad487981a0cc719d1ca99e266dd2a9d66f6416d4f2d5e7c80bdf807b9bb7b74e SHA512 c74281bf3e03e136d183b562b8f682a3e1957019a36ec0c6a048049f0d5f55361107a62e36eaa9e3306a1f13df10adf55c2f54f096b6e353108856e05d9ce799
AUX glpk-4.65-longstep_verbosity.patch 844 BLAKE2B c1d14e6dfd596694bf1da060129713eb70ceebd4b1742e8496b89c1e1bfefa5bfdf320ecb8d863aa5b5a0d9750bca8bf59b261608cc39b1d1a0b3fe3b10a7be4 SHA512 29d8e876c0d5fba14056e8f0639e3746c6f4c0eefcad284727921e0ca7184ad96b4363dfe9bfe67b74d6d9419f37d21e453e431bf53438b624c1ab0ef9fe1092
DIST glpk-4.65.tar.gz 4167110 BLAKE2B 4ccb5cd8301bdca2ccdecfc1648642afe26ff0a1ee9a75cb5a3906838086e5c41edfb16e7c55f4ad677d192f6a66b866f2d917c5be7103da7141bfb1f74e636b SHA512 997e8e599ff1718a08c66b86eadd0e01f4644899f1e95920f8ae91d66b4d8361021766b346845f4dcbcfe667b41ab72ea3d377017a0ebf85d7ece091cfd81375
+DIST glpk-5.0.tar.gz 4132649 BLAKE2B f8204f66a97af950c13ee72ee9541f305745741d1231325670ede14663cb6c28ec6fbc44b3625973f1924ca078183d1d43f494ad43a7b48b45be131882b00001 SHA512 4e92195fa058c707146f2690f3a38b46c33add948c852f67659ca005a6aa980bbf97be96528b0f8391690facb880ac2126cd60198c6c175e7f3f06cca7e29f9d
EBUILD glpk-4.65.ebuild 1832 BLAKE2B 9abcc5f63cf3754ffd725de49e19ebea55bc948011f553ac11f0972c22360d1446f45169f35a1c65efdc926b58c46e591aa9d61fe6b5eaa504fd42e53b0f4294 SHA512 966ad0b3f8046b081a6fdad455f88c2a96b4840f4acc6c4b8551d428599876ddbe694885f642885e8fbd9992ca2119e885b9c7889982aa622e0a86ac5cd004f8
+EBUILD glpk-5.0.ebuild 1788 BLAKE2B 1fa5282eb61c60562046d4b61d7f882bb2649db67fa393584a9cd10dc89946e9cd3efc13e403746093f3a38958a89e9ad3616cb41070fb742ae57392a305ec6b SHA512 3be203886d06acf5afe7aacd647e3628c4816ca91991ddbb48fb354e45f4563f5d75cb8bed5307d1d724a3326886079b2883dbf95ffa4af180ad3f7e19199234
MISC metadata.xml 998 BLAKE2B 11afba9ccdd6a53cee9432201eee2ae03483da71212f1c7f9907a775e6c2fcce068648fdae87965dab7550c9157c86697802707b582589626cf48e4236aa56e0 SHA512 1ef83c282b3a6143a1e85a1ecdc55463cf5617409dc990806917077c30e4acd2663b2772bf47aa96c572ee78dab76467c10b4ae9a2705220aa6e8e4936c4f7b5
diff --git a/sci-mathematics/glpk/glpk-5.0.ebuild b/sci-mathematics/glpk/glpk-5.0.ebuild
new file mode 100644
index 000000000000..83c12e1926e4
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-5.0.ebuild
@@ -0,0 +1,76 @@
+# 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"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/40"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="doc examples gmp odbc mysql"
+
+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
+)
+
+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} \
+ --disable-static \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(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
+
+ # no static archives
+ find "${D}" -name '*.la' -delete || die
+}