dev-lang/mono: bump to 5.16, drop multilib, clean old
[gentoo.git] / dev-lang / logtalk / logtalk-3.18.0.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit eutils xdg-utils
7
8 DESCRIPTION="Open source object-oriented logic programming language"
9 HOMEPAGE="http://logtalk.org"
10 SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
11 LICENSE="Apache-2.0"
12
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE="fop xslt"
16
17 DEPEND=""
18 RDEPEND="${DEPEND}
19         xslt? ( dev-libs/libxslt )
20         fop? ( dev-java/fop )"
21
22 src_prepare() {
23         epatch "${FILESDIR}"/${P}-portage.patch
24
25         eapply_user
26 }
27
28 src_install() {
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 \
36                 tests-sample.lgt \
37                 "${D}/usr/share/${P}" \
38                 || die "Failed to install files"
39
40         # Install mime file, the database will be updated later
41         insinto /usr/share/mime/packages
42         doins scripts/freedesktop/logtalk.xml
43
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
48
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"
52
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 \
57                 /usr/bin/bplgt
58         dosym ../share/${P}/integration/cxlgt.sh \
59                 /usr/bin/cxlgt
60         dosym ../share/${P}/integration/eclipselgt.sh \
61                 /usr/bin/eclipselgt
62         dosym ../share/${P}/integration/gplgt.sh \
63                 /usr/bin/gplgt
64         dosym ../share/${P}/integration/jiplgt.sh \
65                 /usr/bin/jiplgt
66         dosym ../share/${P}/integration/lplgt.sh \
67                 /usr/bin/lplgt
68         dosym ../share/${P}/integration/qplgt.sh \
69                 /usr/bin/qplgt
70         dosym ../share/${P}/integration/quintuslgt.sh \
71                 /usr/bin/quintuslgt
72         dosym ../share/${P}/integration/sicstuslgt.sh \
73                 /usr/bin/sicstuslgt
74         dosym ../share/${P}/integration/swilgt.sh \
75                 /usr/bin/swilgt
76         dosym ../share/${P}/integration/xsblgt.sh \
77                 /usr/bin/xsblgt
78         dosym ../share/${P}/integration/xsbmtlgt.sh \
79                 /usr/bin/xsbmtlgt
80         dosym ../share/${P}/integration/yaplgt.sh \
81                 /usr/bin/yaplgt
82
83         dosym ../share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
84                 /usr/bin/lgt2xml
85         use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2html.sh \
86                 /usr/bin/lgt2html
87         use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
88                 /usr/bin/lgt2txt
89         use xslt && dosym ../share/${P}/tools/lgtdoc/xml/lgt2md.sh \
90                 /usr/bin/lgt2md
91         use fop  && dosym ../share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
92                 /usr/bin/lgt2pdf
93
94         # Install environment files
95         echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
96         doenvd 99logtalk
97 }
98
99 pkg_postinst() {
100         xdg_mimeinfo_database_update
101         xdg_desktop_database_update
102
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"
118         ewarn ""
119
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"
124         ewarn "login."
125 }
126
127 pkg_postrm() {
128         xdg_mimeinfo_database_update
129         xdg_desktop_database_update
130 }