glpk-4.48.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils flag-o-matic toolchain-funcs autotools-utils
  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"
  10. IUSE="doc examples gmp odbc mysql static-libs"
  11. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
  12. RDEPEND="
  13. gmp? ( dev-libs/gmp:0 )
  14. mysql? ( virtual/mysql )
  15. odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )"
  16. DEPEND="${RDEPEND}
  17. virtual/pkgconfig"
  18. PATCHES=(
  19. "${FILESDIR}"/${PN}-4.52.1-mariadb-5.5.patch
  20. )
  21. src_configure() {
  22. local myeconfargs=(
  23. $(use_enable mysql)
  24. $(use_enable odbc)
  25. $(use_with gmp)
  26. )
  27. if use mysql || use odbc; then
  28. myeconfargs+=( --enable-dl )
  29. else
  30. myeconfargs+=( --disable-dl )
  31. fi
  32. [[ -z $(type -P odbc-config) ]] && \
  33. append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
  34. autotools-utils_src_configure
  35. }
  36. src_install() {
  37. autotools-utils_src_install
  38. if use examples; then
  39. insinto /usr/share/doc/${PF}
  40. doins -r examples
  41. fi
  42. use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
  43. }