Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-lang/aldor/
Date: Wed, 04 Mar 2020 01:45:11
Message-Id: 1583286268.ddc30e856ca7ccaf89192d4eb5c809587a75d410.Alessandro-Barbieri@gentoo
1 commit: ddc30e856ca7ccaf89192d4eb5c809587a75d410
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Wed Mar 4 01:44:28 2020 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Wed Mar 4 01:44:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ddc30e85
7
8 dev-lang/aldor: many changes, WIP
9
10 Package-Manager: Portage-2.3.91, Repoman-2.3.20
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 dev-lang/aldor/aldor-1.2.0_p20190730.ebuild | 62 +++++++++++++++++++++--------
14 dev-lang/aldor/metadata.xml | 6 +++
15 2 files changed, 52 insertions(+), 16 deletions(-)
16
17 diff --git a/dev-lang/aldor/aldor-1.2.0_p20190730.ebuild b/dev-lang/aldor/aldor-1.2.0_p20190730.ebuild
18 index bb79cb1..e962d85 100644
19 --- a/dev-lang/aldor/aldor-1.2.0_p20190730.ebuild
20 +++ b/dev-lang/aldor/aldor-1.2.0_p20190730.ebuild
21 @@ -4,9 +4,8 @@
22 EAPI="7"
23
24 COMMIT="13e5b90eecc79ec6704efb333c4c100187520e80"
25 -AUTOTOOLS_AUTORECONF=1
26 -AUTOTOOLS_IN_SOURCE_BUILD=1
27
28 +#TODO: figure out if a java eclass is needed
29 inherit autotools elisp-common
30
31 DESCRIPTION="The Aldor Programming Language"
32 @@ -21,13 +20,24 @@ LICENSE="Apache-2.0"
33 SLOT="0"
34 KEYWORDS="~amd64"
35
36 -IUSE="doc emacs"
37 +IUSE="boehm-gc doc emacs java"
38
39 -RDEPEND="
40 +#is junit dep. only for test?
41 +#TODO: choose a slot for junit
42 +CDEPEND="
43 + boehm-gc? ( dev-libs/boehm-gc )
44 emacs? ( app-editors/emacs:= )
45 + java? ( dev-java/junit )
46 +"
47 +RDEPEND="
48 + ${CDEPEND}
49 + java? ( virtual/jre:1.8 )
50 "
51 DEPEND="
52 - ${RDEPEND}
53 + ${CDEPEND}
54 + java? ( virtual/jdk:1.8 )
55 +"
56 +BDEPEND="
57 virtual/yacc
58
59 doc? ( virtual/latex-base )
60 @@ -40,23 +50,42 @@ DOCS=( AUTHORS README.building README.binary-only README.library ../README.md )
61
62 src_unpack() {
63 unpack "${P}.tar.gz"
64 - use doc && cp "${DISTDIR}/libaldor.pdf.gz" "${S}" && gunzip "${S}/libaldor.pdf.gz" || die
65 + if use doc ; then
66 + cp "${DISTDIR}/libaldor.pdf.gz" "${S}"
67 + gunzip "${S}/libaldor.pdf.gz"
68 + fi
69 use emacs && cp "${DISTDIR}/aldor.el.nw" "${S}" || die
70 }
71
72 +src_prepare() {
73 + #TODO: respect CFLAGS and remove Werror
74 + eapply_user
75 + eautoreconf
76 +}
77 +
78 +src_configure() {
79 + local myconf=(
80 + --disable-static
81 + --enable-libraries
82 + --enable-shared
83 + $(use_enable java)
84 + $(use_with java java-junit)
85 + $(use_with boehm-gc)
86 + )
87 + econf "${myconf[@]}"
88 +}
89 +
90 src_compile() {
91 if use doc ; then
92 - ( cd aldorug; emake aldorug.pdf ) || die "make aldorug.pdf failed"
93 - ( cd lib/aldor/tutorial
94 + ( cd "${S}/aldorug"; emake aldorug.pdf ) || die "make aldorug.pdf failed"
95 + ( cd "${S}/lib/aldor/tutorial"
96 pdflatex tutorial.tex
97 pdflatex tutorial.tex ) || die "make tutorial.pdf failed"
98 - tar xzf "${DISTDIR}/algebra.html.tar.gz"
99 fi
100 -
101 + cd "${S}"
102 if use emacs ; then
103 notangle "aldor.el.nw" > aldor.el
104 - notangle -Rinit.el "aldor.el.nw" | \
105 - sed -e '1s/^.*$/;; aldor mode/' > 64aldor-gentoo.el
106 + notangle -Rinit.el "aldor.el.nw" | sed -e '1s/^.*$/;; aldor mode/' > 64aldor-gentoo.el
107 if use doc ; then
108 einfo "Documentation for the aldor emacs mode"
109 noweave "aldor.el.nw" > aldor-mode.tex
110 @@ -64,15 +93,16 @@ src_compile() {
111 pdflatex aldor-mode.tex || die "make aldor-mode.pdf failed"
112 fi
113 fi
114 + cd "${S}"
115 default
116 }
117
118 src_install() {
119 - if use doc ; then
120 - DOCS+=( aldorug/aldorug.pdf lib/aldor/tutorial/tutorial.pdf libaldor.pdf )
121 - fi
122 + use doc && DOCS+=( aldorug/aldorug.pdf lib/aldor/tutorial/tutorial.pdf libaldor.pdf )
123 +
124 if use emacs ; then
125 - DOCS+=( aldor-mode.pdf )
126 + use doc && DOCS+=( aldor-mode.pdf )
127 + #TODO: rename aldor.el
128 elisp-site-file-install aldor.el
129 elisp-site-file-install 64aldor-gentoo.el
130 fi
131
132 diff --git a/dev-lang/aldor/metadata.xml b/dev-lang/aldor/metadata.xml
133 index 4b9f701..fb22608 100644
134 --- a/dev-lang/aldor/metadata.xml
135 +++ b/dev-lang/aldor/metadata.xml
136 @@ -11,4 +11,10 @@ The Aldor language combines imperative, functional, and object-oriented features
137 <upstream>
138 <remote-id type="github">pippijn/aldor</remote-id>
139 </upstream>
140 + <use>
141 + <flag name="boehm-gc">Use Boehm Garbage Collector instead of built-in</flag>
142 + </use>
143 +
144 +
145 +
146 </pkgmetadata>