qu-prolog-10.0.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib qmake-utils
  5. MY_P=qp${PV}
  6. DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
  7. HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
  8. SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
  9. LICENSE="Apache-2.0 GPL-2+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="debug doc examples pedro qt4 readline threads"
  13. RDEPEND="
  14. !dev-util/mpatch
  15. !dev-util/rej
  16. qt4? ( dev-qt/qtgui:4 )
  17. pedro? ( net-misc/pedro )
  18. readline? ( app-misc/rlwrap )"
  19. DEPEND="${RDEPEND}
  20. dev-lang/perl"
  21. S="${WORKDIR}"/${MY_P}
  22. src_prepare() {
  23. epatch "${FILESDIR}"/${P}-configure.patch
  24. epatch "${FILESDIR}"/${P}-associated-item.patch
  25. epatch "${FILESDIR}"/${P}-gcc6.patch
  26. }
  27. src_configure() {
  28. econf \
  29. --libdir=/usr/$(get_libdir) \
  30. $(use_enable debug) \
  31. $(use_enable threads multiple-threads)
  32. if use qt4; then
  33. cd "${S}"/src/xqp || die
  34. eqmake4 xqp.pro
  35. fi
  36. }
  37. src_compile() {
  38. emake OPTIMISATION="${CXXFLAGS}"
  39. if use qt4; then
  40. cd "${S}"/src/xqp || die
  41. emake
  42. fi
  43. }
  44. src_install() {
  45. sed \
  46. -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
  47. -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
  48. dobin bin/{qc,qecat,qp,kq}
  49. into /usr/$(get_libdir)/${PN}
  50. dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
  51. use qt4 && dobin src/xqp/xqp
  52. insinto /usr/$(get_libdir)/${PN}/bin
  53. doins bin/rl_commands
  54. doins bin/{qc1.qup,qecat,qg,qp}.qx
  55. insinto /usr/$(get_libdir)/${PN}/library
  56. doins prolog/library/*.qo
  57. insinto /usr/$(get_libdir)/${PN}/compiler
  58. doins prolog/compiler/*.qo
  59. doman doc/man/man1/*.1
  60. dodoc README
  61. if use doc ; then
  62. docinto reference-manual
  63. dodoc doc/manual/*.html
  64. docinto user-guide
  65. dodoc doc/user/main.pdf
  66. fi
  67. if use examples ; then
  68. insinto /usr/share/doc/${PF}/examples
  69. doins examples/*.ql
  70. docinto examples
  71. newdoc examples/README README.examples
  72. fi
  73. }