dev-qt/qtxml: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-lang / mozart / mozart-1.4.0-r3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit elisp-common eutils
7
8 PATCHSET_VER="5"
9 MY_P="mozart-${PV}.20080704"
10
11 DESCRIPTION="Advanced development platform for intelligent, distributed applications"
12 HOMEPAGE="https://mozart.github.io/ https://github.com/mozart/mozart"
13 SRC_URI="
14         mirror://sourceforge/project/mozart-oz/v1/1.4.0-2008-07-02-tar/${MY_P}-src.tar.gz
15         mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
16         doc? ( mirror://sourceforge/project/mozart-oz/v1/1.4.0-2008-07-02-tar/${MY_P}-doc.tar.gz )"
17
18 SLOT="0"
19 LICENSE="Mozart"
20 KEYWORDS="-amd64 ppc -ppc64 x86"
21 IUSE="doc emacs examples gdbm static tcl threads tk"
22
23 RDEPEND="
24         dev-lang/perl
25         dev-libs/gmp:0=
26         sys-libs/zlib
27         emacs? ( >=app-editors/emacs-23.1:* )
28         gdbm? ( sys-libs/gdbm  )
29         tcl? (
30                 tk? (
31                         dev-lang/tk:0=
32                         dev-lang/tcl:0=
33                 )
34         )"
35 DEPEND="${RDEPEND}
36         sys-devel/bison
37         sys-devel/flex"
38
39 SITEFILE=50${PN}-gentoo.el
40
41 S="${WORKDIR}"/${MY_P}
42
43 src_prepare() {
44         EPATCH_FORCE=yes
45         EPATCH_SUFFIX=patch
46         epatch "${WORKDIR}"/${PV}
47 }
48
49 src_configure() {
50         local myconf="\
51                         --without-global-oz \
52                         --enable-opt=none"
53
54         if use tcl && use tk ; then
55                 myconf="${myconf} --enable-wish"
56         else
57                 myconf="${myconf} --disable-wish"
58         fi
59
60         econf \
61                 ${myconf} \
62                 --disable-doc \
63                 --enable-contrib \
64                 --disable-contrib-micq \
65                 $(use_enable doc contrib-doc) \
66                 $(use_enable gdbm contrib-gdbm) \
67                 $(use_enable tk contrib-tk) \
68                 $(use_enable emacs compile-elisp) \
69                 $(use_enable static link-static) \
70                 $(use_enable threads threaded)
71 }
72
73 src_compile() {
74         emake bootstrap
75 }
76
77 src_test() {
78         # Mozart tests must be run single-threaded
79         cd "${S}"/share/test || die
80         emake -j1 boot-oztest
81         emake -j1 boot-check
82 }
83
84 src_install() {
85         emake \
86                 PREFIX="${D}"/usr/lib/mozart \
87                 ELISPDIR="${D}${SITELISP}/${PN}" \
88                 install
89
90         dosym /usr/lib/mozart/bin/convertTextPickle /usr/bin/convertTextPickle
91         dosym /usr/lib/mozart/bin/oldpickle2text /usr/bin/oldpickle2text
92         dosym /usr/lib/mozart/bin/ozc /usr/bin/ozc
93         dosym /usr/lib/mozart/bin/ozd /usr/bin/ozd
94         dosym /usr/lib/mozart/bin/ozengine /usr/bin/ozengine
95         dosym /usr/lib/mozart/bin/ozl /usr/bin/ozl
96         dosym /usr/lib/mozart/bin/ozplatform /usr/bin/ozplatform
97         dosym /usr/lib/mozart/bin/oztool /usr/bin/oztool
98         dosym /usr/lib/mozart/bin/pickle2text /usr/bin/pickle2text
99         dosym /usr/lib/mozart/bin/text2pickle /usr/bin/text2pickle
100
101         if use emacs; then
102                 dosym /usr/lib/mozart/bin/oz /usr/bin/oz
103                 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
104         fi
105
106         dodoc "${S}"/README
107         use doc && dohtml -r "${WORKDIR}"/mozart/doc/*
108
109         if use examples; then
110                 cd "${S}"/share || die
111                 insinto /usr/share/doc/${PF}
112                 doins -r examples demo
113                 rm -rf $(find "${ED}"/usr/share/doc/${PF}/examples \
114                         -name Makefile -o -name Makefile.in) || die
115         fi
116 }
117
118 pkg_postinst() {
119         use emacs && elisp-site-regen
120 }
121
122 pkg_postrm() {
123         use emacs && elisp-site-regen
124 }