1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils fdo-mime
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 )
24 epatch "${FILESDIR}"/${PN}-3.03.0-no-user-docs.patch
28 # Look at scripts/install.sh for upstream installation process.
29 # Install logtalk base
30 mv scripts/logtalk_user_setup.sh integration/
31 mkdir -p "${D}/usr/share/${P}"
32 cp -r adapters coding contributions core examples integration \
33 library paths scratch tests tools VERSION.txt \
34 loader-sample.lgt settings-sample.lgt tester-sample.lgt \
36 "${D}/usr/share/${P}" \
37 || die "Failed to install files"
39 # Install mime file, the database will be updated later
40 insinto /usr/share/mime/packages
41 doins scripts/freedesktop/logtalk.xml
43 # Install documentation
44 dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
45 INSTALL.md LICENSE.txt QUICK_START.md README.md \
46 RELEASE_NOTES.md UPGRADING.md VERSION.txt
49 || die "Failed to install html core documentation"
51 || die "Failed to install html manual"
54 rm -f man/man1/logtalk_backend_select.1
55 rm -f man/man1/logtalk_version_select.1
56 doman man/man1/*.1 || die "Failed to install man pages"
58 # Integration symlinks
59 dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
60 /usr/bin/logtalk_user_setup
61 dosym /usr/share/${P}/integration/bplgt.sh \
63 dosym /usr/share/${P}/integration/cxlgt.sh \
65 dosym /usr/share/${P}/integration/eclipselgt.sh \
67 dosym /usr/share/${P}/integration/gplgt.sh \
69 dosym /usr/share/${P}/integration/lplgt.sh \
71 dosym /usr/share/${P}/integration/qplgt.sh \
73 dosym /usr/share/${P}/integration/quintuslgt.sh \
75 dosym /usr/share/${P}/integration/sicstuslgt.sh \
77 dosym /usr/share/${P}/integration/swilgt.sh \
79 dosym /usr/share/${P}/integration/xsblgt.sh \
81 dosym /usr/share/${P}/integration/xsbmtlgt.sh \
83 dosym /usr/share/${P}/integration/yaplgt.sh \
86 dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
88 use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
90 use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
92 use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
94 use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
97 # Install environment files
98 echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
103 fdo-mime_desktop_database_update
105 ewarn "The following integration scripts are installed"
106 ewarn "for running logtalk with selected Prolog compilers:"
107 ewarn "B-Prolog: /usr/bin/bplgt"
108 ewarn "CxProlog: /usr/bin/cxlgt"
109 ewarn "ECLiPSe: /usr/bin/eclipselgt"
110 ewarn "GNU Prolog: /usr/bin/gplgt"
111 ewarn "Lean Prolog: /usr/bin/lplgt"
112 ewarn "Qu-Prolog: /usr/bin/qplgt"
113 ewarn "Quintus Prolog: /usr/bin/quintuslgt"
114 ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
115 ewarn "SWI Prolog: /usr/bin/swilgt"
116 ewarn "XSB: /usr/bin/xsblgt"
117 ewarn "XSB MT: /usr/bin/xsbmtlgt"
118 ewarn "YAP: /usr/bin/yaplgt"
121 ewarn "The environment has been set up to make the above"
122 ewarn "integration scripts find files automatically for logtalk."
123 ewarn "Please run 'etc-update && source /etc/profile' to update"
124 ewarn "the environment now, otherwise it will be updated at next"
129 fdo-mime_desktop_database_update