glpk-4.60.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2016 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}"/${P}-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_with gmp)
  41. }
  42. src_install() {
  43. default
  44. if use examples; then
  45. insinto /usr/share/doc/${PF}
  46. doins -r examples
  47. docompress -x /usr/share/doc/${PF}/examples
  48. fi
  49. use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
  50. }