1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic toolchain-funcs
8 DESCRIPTION="GNU Linear Programming Kit"
10 HOMEPAGE="https://www.gnu.org/software/glpk/"
11 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
14 IUSE="doc examples gmp odbc mysql static-libs"
15 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
17 BDEPEND="virtual/pkgconfig"
22 gmp? ( dev-libs/gmp:0= )
23 mysql? ( dev-db/mysql-connector-c )
24 odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
28 "${FILESDIR}/${PN}-4.65-fix-mysql-include-prefix.patch"
29 "${FILESDIR}/${PN}-4.65-debundle-system-libs.patch"
30 "${FILESDIR}/${PN}-4.65-longstep_verbosity.patch"
34 # TODO: the ODBC library is dlopen()ed, so we only want to append
35 # -I<foo> to the preprocessor flags, and not all of the CFLAGS that
36 # were used to build libiodbc. That fix and the pkg-config fallback
37 # should be sent upstream, and placed into CPPFLAGS rather than
38 # CFLAGS (as configure.ac does now).
39 use odbc && [[ -z $(type -P odbc_config) ]] && \
40 append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
48 if use mysql || use odbc; then
57 $(use_enable static-libs static) \
64 insinto "/usr/share/doc/${PF}"
66 docompress -x "/usr/share/doc/${PF}/examples"
68 use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt