glpk-4.61-r1.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools flag-o-matic toolchain-funcs
  5. DESCRIPTION="GNU Linear Programming Kit"
  6. LICENSE="GPL-3"
  7. HOMEPAGE="https://www.gnu.org/software/glpk/"
  8. SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
  9. SLOT="0/40"
  10. IUSE="doc examples gmp odbc mysql static-libs"
  11. KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
  12. RDEPEND="
  13. sci-libs/amd:0=
  14. sci-libs/colamd:=
  15. sys-libs/zlib:0=
  16. gmp? ( dev-libs/gmp:0= )
  17. mysql? ( virtual/mysql )
  18. odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. PATCHES=(
  22. "${FILESDIR}"/${PN}-4.60-debundle-system-libs.patch
  23. )
  24. src_prepare() {
  25. use odbc && [[ -z $(type -P odbc_config) ]] && \
  26. append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
  27. default
  28. eautoreconf
  29. }
  30. src_configure() {
  31. local myconf
  32. if use mysql || use odbc; then
  33. myconf="--enable-dl"
  34. else
  35. myconf="--disable-dl"
  36. fi
  37. econf ${myconf} \
  38. $(use_enable mysql) \
  39. $(use_enable odbc) \
  40. $(use_enable static-libs static) \
  41. $(use_with gmp)
  42. }
  43. src_install() {
  44. default
  45. if use examples; then
  46. insinto /usr/share/doc/${PF}
  47. doins -r examples
  48. docompress -x /usr/share/doc/${PF}/examples
  49. fi
  50. use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
  51. }