1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils xdg-utils
8 DESCRIPTION="Open source object-oriented logic programming language"
9 HOMEPAGE="http://logtalk.org"
10 SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
14 KEYWORDS="~amd64 ~ppc ~x86"
19 xslt? ( dev-libs/libxslt )
20 fop? ( dev-java/fop )"
23 epatch "${FILESDIR}"/${P}-portage.patch
29 # Look at scripts/install.sh for upstream installation process.
30 # Install logtalk base
31 mv scripts/logtalk_user_setup.sh integration/
32 mkdir -p "${D}/usr/share/${P}"
33 cp -r adapters coding contributions core docs examples integration \
34 library manuals paths scratch tests tools VERSION.txt \
35 loader-sample.lgt settings-sample.lgt tester-sample.lgt \
37 "${D}/usr/share/${P}" \
38 || die "Failed to install files"
40 # Install mime file, the database will be updated later
41 insinto /usr/share/mime/packages
42 doins scripts/freedesktop/logtalk.xml
44 # Install documentation
45 dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CONTRIBUTING.md \
46 CUSTOMIZE.md INSTALL.md LICENSE.txt QUICK_START.md \
47 README.md RELEASE_NOTES.md UPGRADING.md VERSION.txt
49 rm -f man/man1/logtalk_backend_select.1
50 rm -f man/man1/logtalk_version_select.1
51 doman man/man1/*.1 || die "Failed to install man pages"
53 # Integration symlinks
54 dosym ../share/${P}/integration/logtalk_user_setup.sh \
55 /usr/bin/logtalk_user_setup
56 dosym ../share/${P}/integration/bplgt.sh \
58 dosym ../share/${P}/integration/cxlgt.sh \
60 dosym ../share/${P}/integration/eclipselgt.sh \
62 dosym ../share/${P}/integration/gplgt.sh \
64 dosym ../share/${P}/integration/jiplgt.sh \
66 dosym ../share/${P}/integration/lplgt.sh \
68 dosym ../share/${P}/integration/qplgt.sh \
70 dosym ../share/${P}/integration/quintuslgt.sh \
72 dosym ../share/${P}/integration/sicstuslgt.sh \
74 dosym ../share/${P}/integration/swilgt.sh \
76 dosym ../share/${P}/integration/xsblgt.sh \
78 dosym ../share/${P}/integration/xsbmtlgt.sh \
80 dosym ../share/${P}/integration/yaplgt.sh \
83 dosym ../share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
85 use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2html.sh \
87 use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
89 use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2md.sh \
91 use fop && dosym ../share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
94 # Install environment files
95 echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
100 xdg_mimeinfo_database_update
101 xdg_desktop_database_update
103 ewarn "The following integration scripts are installed"
104 ewarn "for running logtalk with selected Prolog compilers:"
105 ewarn "B-Prolog: /usr/bin/bplgt"
106 ewarn "CxProlog: /usr/bin/cxlgt"
107 ewarn "ECLiPSe: /usr/bin/eclipselgt"
108 ewarn "GNU Prolog: /usr/bin/gplgt"
109 ewarn "JIProlog: /usr/bin/jiplgt"
110 ewarn "Lean Prolog: /usr/bin/lplgt"
111 ewarn "Qu-Prolog: /usr/bin/qplgt"
112 ewarn "Quintus Prolog: /usr/bin/quintuslgt"
113 ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
114 ewarn "SWI Prolog: /usr/bin/swilgt"
115 ewarn "XSB: /usr/bin/xsblgt"
116 ewarn "XSB MT: /usr/bin/xsbmtlgt"
117 ewarn "YAP: /usr/bin/yaplgt"
120 ewarn "The environment has been set up to make the above"
121 ewarn "integration scripts find files automatically for logtalk."
122 ewarn "Please run 'etc-update && source /etc/profile' to update"
123 ewarn "the environment now, otherwise it will be updated at next"
128 xdg_mimeinfo_database_update
129 xdg_desktop_database_update