glpk-4.54.ebuild 1.3 KB

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