logtalk-2.41.0.ebuild 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils versionator fdo-mime
  4. DESCRIPTION="Open source object-oriented logic programming language"
  5. HOMEPAGE="http://logtalk.org"
  6. MY_PV="lgt$(delete_all_version_separators)"
  7. SRC_URI="http://logtalk.org/files/${MY_PV}.tar.bz2"
  8. LICENSE="Artistic-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc ~x86"
  11. IUSE="gnupl qupl swipl xsbpl yappl xslt fop"
  12. DEPEND=""
  13. RDEPEND="
  14. gnupl? ( dev-lang/gprolog )
  15. qupl? ( !amd64? ( dev-lang/qu-prolog ) )
  16. swipl? ( dev-lang/swi-prolog )
  17. xsbpl? ( x86? ( dev-lang/xsb ) )
  18. yappl? ( dev-lang/yap )
  19. xslt? ( dev-libs/libxslt )
  20. fop? ( dev-java/fop )
  21. ${DEPEND}"
  22. S="${WORKDIR}/${MY_PV}"
  23. src_install() {
  24. # Look at scripts/install.sh for upstream installation process.
  25. # Install logtalk base
  26. mv scripts/logtalk_user_setup.sh integration/
  27. mkdir -p "${D}/usr/share/${P}"
  28. cp -r compiler configs contributions VERSION.txt \
  29. integration library wenv xml libpaths \
  30. examples settings.lgt "${D}/usr/share/${P}" \
  31. || die "Failed to install files"
  32. # Install mime file, the database will be updated later
  33. insinto /usr/share/mime/packages
  34. doins scripts/freedesktop/logtalk.xml
  35. # Install documentation
  36. dodoc BIBLIOGRAPHY.bib CUSTOMIZE.txt INSTALL.txt \
  37. LICENSE.txt QUICK_START.txt README.txt \
  38. RELEASE_NOTES.txt UPGRADING.txt VERSION.txt
  39. dohtml -r manuals/* || die "Failed to install html manual"
  40. rm -f man/man1/logtalk_backend_select.1
  41. rm -f man/man1/logtalk_version_select.1
  42. doman man/man1/*.1 || die "Failed to install man pages"
  43. # Integration symlinks
  44. dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
  45. /usr/bin/logtalk_user_setup
  46. use gnupl && dosym /usr/share/${P}/integration/gplgt.sh \
  47. /usr/bin/gplgt
  48. use qupl && ! use amd64 && dosym /usr/share/${P}/integration/qplgt.sh \
  49. /usr/bin/qplgt
  50. use swipl && dosym /usr/share/${P}/integration/swilgt.sh \
  51. /usr/bin/swilgt
  52. use xsbpl && use x86 && dosym /usr/share/${P}/integration/xsblgt.sh \
  53. /usr/bin/xsblgt
  54. use yappl && dosym /usr/share/${P}/integration/yaplgt.sh \
  55. /usr/bin/yaplgt
  56. dosym /usr/share/${P}/xml/lgt2xml.sh /usr/bin/lgt2xml
  57. use xslt && dosym /usr/share/${P}/xml/lgt2html.sh /usr/bin/lgt2html
  58. use xslt && dosym /usr/share/${P}/xml/lgt2txt.sh /usr/bin/lgt2txt
  59. use fop && dosym /usr/share/${P}/xml/lgt2pdf.sh /usr/bin/lgt2pdf
  60. # Install environment files
  61. echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
  62. doenvd 99logtalk
  63. }
  64. pkg_postinst() {
  65. fdo-mime_desktop_database_update
  66. ewarn "Before running logtalk, users should execute"
  67. ewarn "logtalk_user_setup *once*."
  68. ewarn "To start logtalk use one of the following:"
  69. use gnupl && ewarn "GNU Prolog: /usr/bin/gplgt"
  70. use qupl && ! use amd64 && ewarn "Qu Prolog: /usr/bin/qplgt"
  71. use swipl && ewarn "SWI Prolog: /usr/bin/swilgt"
  72. use xsbpl && use x86 && ewarn "XSB: /usr/bin/xsblgt"
  73. use yappl && ewarn "YAP: /usr/bin/yaplgt"
  74. ewarn ""
  75. ewarn "The environment has been set up to make the above"
  76. ewarn "integration scripts find files automatically for logtalk."
  77. ewarn "Please run 'etc-update && source /etc/profile' to update"
  78. ewarn "the environment now, otherwise it will be updated at next"
  79. ewarn "login."
  80. }
  81. pkg_postrm() {
  82. fdo-mime_desktop_database_update
  83. }