e-1.5.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright 1999-2012 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. for i in "${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. do
  41. dobin "${i}"
  42. done
  43. for i in "${S}/DOC/man/eprover.1" \
  44. "${S}/DOC/man/epclextract.1" \
  45. "${S}/DOC/man/eproof.1" \
  46. "${S}/DOC/man/eproof_ram.1" \
  47. "${S}/DOC/man/eground.1" \
  48. "${S}/DOC/man/e_ltb_runner.1" \
  49. "${S}/DOC/man/e_axfilter.1" \
  50. "${S}/DOC/man/checkproof.1" \
  51. "${S}/DOC/man/ekb_create.1" \
  52. "${S}/DOC/man/ekb_delete.1" \
  53. "${S}/DOC/man/ekb_ginsert.1" \
  54. "${S}/DOC/man/ekb_insert.1"
  55. do
  56. doman "${i}"
  57. done
  58. if use doc; then
  59. pushd "${S}"/DOC || die "Could not cd to DOC"
  60. dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
  61. HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
  62. WISHLIST eprover.pdf
  63. dohtml *.html
  64. insinto /usr/share/doc/${PF}/html
  65. doins estyle.sty
  66. popd
  67. fi
  68. if use examples; then
  69. dodir /usr/share/${MY_PN}/examples
  70. insinto /usr/share/${MY_PN}/examples
  71. doins -r EXAMPLE_PROBLEMS
  72. doins -r SIMPLE_APPS
  73. fi
  74. if use isabelle; then
  75. ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
  76. || die "isabelle getenv ISABELLE_HOME failed"
  77. [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
  78. dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
  79. cat <<- EOF >> "${S}/settings"
  80. E_HOME="${ROOT}usr/bin"
  81. E_VERSION="${PV}"
  82. EOF
  83. insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
  84. doins "${S}/settings"
  85. fi
  86. }
  87. pkg_postinst() {
  88. if use isabelle; then
  89. if [ -f "${ROOT}etc/isabelle/components" ]; then
  90. if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
  91. sed -e "/contrib\/${PN}-[0-9.]*/d" \
  92. -i "${ROOT}etc/isabelle/components"
  93. fi
  94. cat <<- EOF >> "${ROOT}etc/isabelle/components"
  95. contrib/${PN}-${PV}
  96. EOF
  97. fi
  98. fi
  99. }
  100. pkg_postrm() {
  101. if use isabelle; then
  102. if [ ! -f "${ROOT}usr/bin/eproof" ]; then
  103. if [ -f "${ROOT}etc/isabelle/components" ]; then
  104. # Note: this sed should only match the version of this ebuild
  105. # Which is what we want as we do not want to remove the line
  106. # of a new E being installed during an upgrade.
  107. sed -e "/contrib\/${PN}-${PV}/d" \
  108. -i "${ROOT}etc/isabelle/components"
  109. fi
  110. fi
  111. fi
  112. }