e-1.8.ebuild 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. MY_PN="E"
  5. MY_P="${MY_PN}-${PV}"
  6. DESCRIPTION="E is a theorem prover for full first-order logic with equality"
  7. HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
  8. SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
  9. LICENSE="GPL-2"
  10. SLOT="0/${PV}"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="doc examples isabelle"
  13. RDEPEND="isabelle? (
  14. >=sci-mathematics/isabelle-2011.1-r1:=
  15. )"
  16. DEPEND="${RDEPEND}"
  17. S="${WORKDIR}"/${MY_PN}
  18. src_configure() {
  19. ./configure --prefix="${ROOT}usr" \
  20. --man-prefix="${ROOT}share/man" \
  21. || die "E configure failed"
  22. sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
  23. -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
  24. -i "${S}/Makefile.vars" \
  25. || die "Could not add our flags to Makefile.vars"
  26. }
  27. src_install() {
  28. dobin "${S}/PROVER/eprover" \
  29. "${S}/PROVER/epclextract" \
  30. "${S}/PROVER/eproof" \
  31. "${S}/PROVER/eproof_ram" \
  32. "${S}/PROVER/eground" \
  33. "${S}/PROVER/e_ltb_runner" \
  34. "${S}/PROVER/e_axfilter" \
  35. "${S}/PROVER/checkproof" \
  36. "${S}/PROVER/ekb_create" \
  37. "${S}/PROVER/ekb_delete" \
  38. "${S}/PROVER/ekb_ginsert" \
  39. "${S}/PROVER/ekb_insert"
  40. doman "${S}/DOC/man/eprover.1" \
  41. "${S}/DOC/man/epclextract.1" \
  42. "${S}/DOC/man/eproof.1" \
  43. "${S}/DOC/man/eproof_ram.1" \
  44. "${S}/DOC/man/eground.1" \
  45. "${S}/DOC/man/e_ltb_runner.1" \
  46. "${S}/DOC/man/e_axfilter.1" \
  47. "${S}/DOC/man/checkproof.1" \
  48. "${S}/DOC/man/ekb_create.1" \
  49. "${S}/DOC/man/ekb_delete.1" \
  50. "${S}/DOC/man/ekb_ginsert.1" \
  51. "${S}/DOC/man/ekb_insert.1"
  52. if use doc; then
  53. pushd "${S}"/DOC || die "Could not cd to DOC"
  54. dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
  55. HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
  56. WISHLIST eprover.pdf
  57. dohtml *.html
  58. dohtml estyle.sty
  59. popd
  60. fi
  61. if use examples; then
  62. insinto /usr/share/${MY_PN}/examples
  63. doins -r EXAMPLE_PROBLEMS
  64. doins -r SIMPLE_APPS
  65. fi
  66. if use isabelle; then
  67. ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
  68. || die "isabelle getenv ISABELLE_HOME failed"
  69. [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
  70. cat <<- EOF >> "${S}/settings"
  71. E_HOME="${ROOT}usr/bin"
  72. E_VERSION="${PV}"
  73. EOF
  74. insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
  75. doins "${S}/settings"
  76. fi
  77. }
  78. pkg_postinst() {
  79. if use isabelle; then
  80. if [ -f "${ROOT}etc/isabelle/components" ]; then
  81. if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
  82. sed -e "/contrib\/${PN}-[0-9.]*/d" \
  83. -i "${ROOT}etc/isabelle/components"
  84. fi
  85. cat <<- EOF >> "${ROOT}etc/isabelle/components"
  86. contrib/${PN}-${PV}
  87. EOF
  88. fi
  89. fi
  90. }
  91. pkg_postrm() {
  92. if use isabelle; then
  93. if [ ! -f "${ROOT}usr/bin/eproof" ]; then
  94. if [ -f "${ROOT}etc/isabelle/components" ]; then
  95. # Note: this sed should only match the version of this ebuild
  96. # Which is what we want as we do not want to remove the line
  97. # of a new E being installed during an upgrade.
  98. sed -e "/contrib\/${PN}-${PV}/d" \
  99. -i "${ROOT}etc/isabelle/components"
  100. fi
  101. fi
  102. fi
  103. }