dev-lang/aldor: fixes

try to respect AR
force boehm-gc
add algebra documentation

Closes: https://bugs.gentoo.org/784887
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-07-02 01:32:35 +02:00
parent 2b52c84c21
commit b02deb470a
5 changed files with 306 additions and 29 deletions

View File

@@ -1,3 +1,4 @@
DIST aldor-1.2.0_p20190730.tar.gz 3037647 BLAKE2B 579350d9b6407506a396f42dd2408693dced58f1786cbf7b81b9ddc1b9b986f7f471b3d961c22ccbe9b7566a240de5a9af11f5cfdae1e69d25adb0fb0d1f7090 SHA512 39b1b6f9cd2e09de691c179dcce26e1d43205099f7fa9a9cd1a1ac5340fc85a616eab5887d310b5f9991e7296cfdfdf55b38cadabb7ceb7b6b135a09a5ee53d5
DIST aldor.el.nw 50217 BLAKE2B 12c822b608d995832028cc6c67126c71f05e50d941c0b22fd82fd95a1f968e64150f721982ff8e42f897811c17d2ee0b3135f5c9f57701f99bdce1f8be3fb82c SHA512 6a01873530269ff21afd494a00a8159e48e6199e9aff38259156b8ee8ce21256394629225d857d7d087fd02d1bed3d0de76812656f294f9eb322bed594f4d65e
DIST algebra.pdf 1618732 BLAKE2B baefdde2c4ece8f4e426724be1abb417a89de4f30b1a3885ab4d9bc911ab3d06bf57ab1b4f1ee04bc229957cf29d07bbd04e84473f80d359cc0d01eeb858618d SHA512 48cd108ff97fd28085c4c498a00dfba8e30736e97829f70a41ee03928bf12e3da8ff4c065ef3aa4d49689136ce54d701e6519e830941d81584f67bad13a76fea
DIST libaldor.pdf.gz 434487 BLAKE2B 629dbf284db72afb98a8bc1a44df63dc0a3394fdd4361ec48a0d4811f8e931384fc257ad8f3931b7966aee25b0a015062ef8c8ab4e0ebf5978b5deda58c00ab6 SHA512 9ed1f067dd4ee11e5a440f31a9a29eb9248fcfb4349005f42c230a97190853d17e423ce677894a478644ca4964d0ba857465adfe405092c1e6512ced452eedc3

View File

@@ -5,29 +5,35 @@ EAPI="7"
COMMIT="13e5b90eecc79ec6704efb333c4c100187520e80"
inherit autotools elisp-common java-pkg-opt-2
inherit autotools elisp-common flag-o-matic java-pkg-opt-2
DESCRIPTION="The Aldor Programming Language"
HOMEPAGE="http://pippijn.github.io/aldor"
SRC_URI="
https://github.com/pippijn/aldor/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
doc? ( http://aldor.org/docs/libaldor.pdf.gz )
doc? (
http://aldor.org/docs/libaldor.pdf.gz
https://github.com/pippijn/aldor/files/5469932/algebra.pdf
)
emacs? ( http://hemmecke.de/aldor/aldor.el.nw )
"
S="${WORKDIR}/${PN}-${COMMIT}/aldor"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
#force boehm-gc for now, without it won't build ...
IUSE="+boehm-gc doc emacs java"
IUSE="doc emacs java"
PATCHES=( "${FILESDIR}/respect-flags.diff" )
PATCHES=(
"${FILESDIR}/${PN}-respect-cflags.patch"
"${FILESDIR}/${PN}-respect-ar.patch"
)
#is junit dep. only for test?
#TODO: choose a slot for junit
CDEPEND="
boehm-gc? ( dev-libs/boehm-gc )
dev-libs/boehm-gc
emacs? ( app-editors/emacs:= )
java? ( dev-java/junit:= )
"
@@ -46,8 +52,6 @@ BDEPEND="
emacs? ( app-text/noweb )
"
S="${WORKDIR}/${PN}-${COMMIT}/aldor"
DOCS=( AUTHORS README.building README.binary-only README.library ../README.md )
src_unpack() {
@@ -60,7 +64,8 @@ src_unpack() {
}
src_prepare() {
use boehm-gc && sed -i 's|-L /usr/X11/lib|-L /usr/X11/lib -lgc|' aldor/src/aldor.conf || die
#should be conditional with boehm-gc
sed -i 's|-L /usr/X11/lib|-L /usr/X11/lib -lgc|' aldor/src/aldor.conf || die
default
eautoreconf
@@ -68,28 +73,31 @@ src_prepare() {
src_configure() {
#install headers in a subfolder to avoid collisions with another packages
#force boehm-gc for now, without it won't build ...
local myconf=(
--prefix="${EPREFIX}/usr"
--includedir="${EPREFIX}/usr/include/aldor"
--disable-static
--enable-libraries
--enable-shared
--includedir="${EPREFIX}/usr/include/aldor"
--prefix="${EPREFIX}/usr"
--with-boehm-gc
$(use_enable java)
$(use_with java java-junit)
$(use_with boehm-gc)
)
econf "${myconf[@]}"
}
src_compile() {
if use doc ; then
cd "${S}/aldorug"
pushd "${S}/aldorug"
emake aldorug.pdf || die "make aldorug.pdf failed"
popd
cd "${S}/lib/aldor/tutorial"
pushd "${S}/lib/aldor/tutorial"
pdflatex tutorial.tex || die "make tutorial.pdf failed"
popd
fi
cd "${S}"
if use emacs ; then
notangle "aldor.el.nw" > aldor.el
notangle -Rinit.el "aldor.el.nw" | sed -e '1s/^.*$/;; aldor mode/' > 64aldor-gentoo.el
@@ -99,12 +107,11 @@ src_compile() {
pdflatex aldor-mode.tex || die "make aldor-mode.pdf failed"
fi
fi
cd "${S}"
default
}
src_install() {
use doc && DOCS+=( aldorug/aldorug.pdf lib/aldor/tutorial/tutorial.pdf libaldor.pdf )
use doc && DOCS+=( aldorug/aldorug.pdf lib/aldor/tutorial/tutorial.pdf libaldor.pdf "${DISTDIR}/algebra.pdf" )
if use emacs ; then
use doc && DOCS+=( aldor-mode.pdf )

View File

@@ -0,0 +1,273 @@
--- a/aldor/lib/libfoam/al/Makefile.in
+++ b/aldor/lib/libfoam/al/Makefile.in
@@ -38,7 +38,7 @@
all: libfoam.al
libfoam.al: runtime.ao
- $(AM_V_AR)ar cr $@ $<
+ $(AM_V_AR)${AR} cr $@ $<
all:
@grep 'fiFileInitializer(' runtime.c | grep -v rtexns > runtime-gets.txt || true
--- a/aldor/tools/unix/doranlib
+++ b/aldor/tools/unix/doranlib
@@ -4,6 +4,6 @@
hpux*) ;;
irix*) ;;
sun4os5*) ;;
-axposf*) ar tls $* > /dev/null ;;
+axposf*) ${AR} tls $* > /dev/null ;;
*) ranlib $*;;
esac
--- a/aldor/tools/unix/mkasys
+++ b/aldor/tools/unix/mkasys
@@ -12,8 +12,8 @@
echo "Dumping .ao files from $lib \n\tinto current directory."
-aos=`ar -t $lib`
-ar -x $lib
+aos=`${AR} -t $lib`
+${AR} -x $lib
for i in $aos
do
--- a/aldor/tools/unix/mklib.sh
+++ b/aldor/tools/unix/mklib.sh
@@ -17,13 +17,13 @@
fi
echo "Rebuilding $afile for $sys"
-for x in `ar t $alfile`;
+for x in `${AR} t $alfile`;
do
echo $x
uniar x $alfile $x
aldor -Csys=$sys -csmax=0 -fo -O $x
ofile=`basename $x .ao`.o
if [ ! -f $ofile ] ; then echo "Compile failed. exiting." ; exit 1 ; fi
- ar r $afile $ofile
+ ${AR} r $afile $ofile
rm $x $ofile
done
--- a/lib/algebra/src/test/Makefile.in
+++ b/lib/algebra/src/test/Makefile.in
@@ -26,7 +26,7 @@
$(addsuffix .test,$(tests)): %.test: %.ao
cp $(SUBLIB_DEPEND).al lib$(libraryname)_$*.al; \
- ar r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
+ ${AR} r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
$(DBG) $(aldorexedir)/aldor \
-Nfile=$(aldorsrcdir)/aldor.conf \
-Y. \
--- a/lib/axllib/test/ar2.sh
+++ b/lib/axllib/test/ar2.sh
@@ -20,11 +20,11 @@
$ALDOR -R $TMPDIR -F ao -F o triv[0-3].as 2>&1 | grep -v 'warning: conflicting types for built-in function' | grep -v "GC:"
echo '== Building an archive containing triv*.ao'
-ar cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
+${AR} cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
rm -f $TMPDIR/triv*.ao
echo '== Building an archive containing triv*.o'
-ar cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.$OBJ
+${AR} cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.$OBJ
rm -f $TMPDIR/triv*.$OBJ
echo '== Creating a client for the archive'
--- a/lib/axllib/test/ar3.sh
+++ b/lib/axllib/test/ar3.sh
@@ -20,7 +20,7 @@
$ALDOR -Mno-ALDOR_W_CantUseArchive $LM -l axllib -R $TMPDIR -F ao -F o triv*.as 2>&1 | grep -v "GC:" | grep -v "warning: conflicting types for built-in function"
echo '== Building an archive containing triv*.ao'
-ar cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
+${AR} cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
rm -f $TMPDIR/triv*.ao
echo '== Building an archive containing triv*.o'
@@ -28,7 +28,7 @@
if [ "$PL" = "win32msvc - Win32 [+] " ]; then
lib /nologo /out:`cygpath -m $TMPDIR`/lib/libtriv.lib `cygpath -m $TMPDIR`/triv*.obj
else
- ar cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
+ ${AR} cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
ranlib $TMPDIR/lib/libtriv.a
fi
--- a/lib/axllib/test/ar4.sh
+++ b/lib/axllib/test/ar4.sh
@@ -20,8 +20,8 @@
$ALDOR -Mno-ALDOR_W_CantUseArchive $LM -l axllib -R $TMPDIR -F ao -F o triv*.as 2>&1 | grep -v "GC:" | grep -v "warning: conflicting types for built-in function"
echo '== Building an archive containing triv*.ao'
-ar cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
-ar d $TMPDIR/lib/libtriv.al triv0.ao
+${AR} cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
+${AR} d $TMPDIR/lib/libtriv.al triv0.ao
rm -f $TMPDIR/triv*.ao
echo '== Building an archive containing triv*.o'
@@ -30,8 +30,8 @@
lib /nologo /out:`cygpath -m $TMPDIR`/lib/libtriv.lib `cygpath -m $TMPDIR`/triv*.obj
lib /nologo `cygpath -m $TMPDIR`/lib/libtriv.lib /REMOVE:`cygpath -m $TMPDIR`/triv0.obj
else
- ar cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
- ar d $TMPDIR/lib/libtriv.a triv0.o
+ ${AR} cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
+ ${AR} d $TMPDIR/lib/libtriv.a triv0.o
doranlib $TMPDIR/lib/libtriv.a
fi
rm -f $TMPDIR/triv*.o
--- a/lib/axllib/test/ar5.sh
+++ b/lib/axllib/test/ar5.sh
@@ -20,8 +20,8 @@
$ALDOR -laxllib -R $TMPDIR -F ao -F o triv*.as 2>&1 | grep -v "GC:" | grep -v "warning: conflicting types for built-in function"
echo '== Building an archive containing triv*.ao'
-ar cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
-ar d $TMPDIR/lib/libtriv.al triv4.ao
+${AR} cr $TMPDIR/lib/libtriv.al $TMPDIR/triv*.ao
+${AR} d $TMPDIR/lib/libtriv.al triv4.ao
rm -f $TMPDIR/triv*.ao
echo '== Building an archive containing triv*.o'
@@ -29,8 +29,8 @@
lib /nologo /out:`cygpath -m $TMPDIR`/lib/libtriv.lib `cygpath -m $TMPDIR`/triv*.obj
lib /nologo `cygpath -m $TMPDIR`/lib/libtriv.lib /remove:`cygpath -m $TMPDIR`/triv4.obj
else
- ar cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
- ar d $TMPDIR/lib/libtriv.a triv4.o
+ ${AR} cr $TMPDIR/lib/libtriv.a $TMPDIR/triv*.o
+ ${AR} d $TMPDIR/lib/libtriv.a triv4.o
doranlib $TMPDIR/lib/libtriv.a
fi
rm -f $TMPDIR/triv*.o
--- a/lib/axllib/test/ar6.sh
+++ b/lib/axllib/test/ar6.sh
@@ -18,7 +18,7 @@
$ALDOR -R $TMPDIR -Y $TMPDIR -F ao numeral*.as | grep -v "GC:"
echo '== Building an archive containing numeral*.ao'
-ar cr $TMPDIR/lib/libnum.al $TMPDIR/numeral*.ao
+${AR} cr $TMPDIR/lib/libnum.al $TMPDIR/numeral*.ao
rm -f $TMPDIR/numeral*.ao
echo '== Creating a client for the archive'
--- a/lib/axllib/test/arrepl0.sh
+++ b/lib/axllib/test/arrepl0.sh
@@ -14,12 +14,12 @@
LOBREP=${LIB}/librepl.a
LOBREPLIB=${LIB}/librepl.lib
-ar rcv ${LOBREP} /dev/null
+${AR} rcv ${LOBREP} /dev/null
# 'ar rcv' avoids the archive creation warning from ar.
-ar rcv ${LAXLREP} /dev/null 2>&1 | grep -v 'ar: writing'
+${AR} rcv ${LAXLREP} /dev/null 2>&1 | grep -v 'ar: writing'
#if [ "$P" != "win" ]; then
-# ar rcv ${LOBREP} /dev/null 2>&1 | grep -v 'ar: writing'
+# ${AR} rcv ${LOBREP} /dev/null 2>&1 | grep -v 'ar: writing'
#fi
#
--- a/lib/axllib/test/arrepl1.sh
+++ b/lib/axllib/test/arrepl1.sh
@@ -14,8 +14,8 @@
LOBREPLIB=${LIB}/librepl.lib
# 'ar rcv' avoids the archive creation warning from ar.
-ar rcv ${LAXLREP} /dev/null 2>&1 | grep -v 'ar: writing'
-ar rcv ${LOBREP} /dev/null 2>&1 | grep -v 'ar: writing'
+${AR} rcv ${LAXLREP} /dev/null 2>&1 | grep -v 'ar: writing'
+${AR} rcv ${LOBREP} /dev/null 2>&1 | grep -v 'ar: writing'
#
# The perl -p -e 's/-R *[^ ]* //g' removes the use of a -R option with an
--- a/lib/axllib/test/bug1213.sh
+++ b/lib/axllib/test/bug1213.sh
@@ -24,7 +24,7 @@
print << (foo bar "No problems!") << newline;
EOF
aldor -Fao file_with_a_long_name.as another_file_with_a_long_name.as
-ar rcv libfoo.al file_with_a_long_name.ao another_file_with_a_long_name.ao 2>&1 | grep -v 'ar: writing'
+${AR} rcv libfoo.al file_with_a_long_name.ao another_file_with_a_long_name.ao 2>&1 | grep -v 'ar: writing'
echo ""
echo "-----------------------------------------------------------------"
aldor -ginterp -lfoo footest.as
--- a/lib/buildlib.am
+++ b/lib/buildlib.am
@@ -10,9 +10,9 @@
lib$(libraryname).al: $(foreach i,$(SUBDIRS),$i/_sublib_$(libraryname).al)
$(AM_V_AR) \
for l in $+; do \
- ar x $$l; \
- ar cr $@ $$(ar t $$l);\
- rm $$(ar t $$l); \
+ ${AR} x $$l; \
+ ${AR} cr $@ $$(${AR} t $$l);\
+ rm $$(${AR} t $$l); \
done
$(libraryname).jar: $(foreach i, $(JAVA_SUBDIRS),$i/$(libraryname).jar)
--- a/lib/buildlib.mk
+++ b/lib/buildlib.mk
@@ -121,21 +121,21 @@
$(AM_V_ALDOR)set -e; \
rm -f $*.c $*.ao; \
cp $(SUBLIB_DEPEND).al lib$(libraryname)_$*.al; \
- ar r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
+ ${AR} r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
$(AM_DBG) $(aldorexedir)/aldor $(aldor_args); \
rm lib$(libraryname)_$*.al
$(SUBLIB_DEPEND).al: $(foreach l,$(library_deps),$(librarylibdir)/$l/$(SUBLIB).al) Makefile.deps
$(AM_V_AR)set -e; \
- ar cr $@; \
+ ${AR} cr $@; \
for l in $(filter %.al,$+); do \
if [ ! -f $$l ]; then \
echo "missing $$l"; \
exit 1; \
fi; \
- ar x $$l; \
- ar r $@ $$(ar t $$l); \
- rm $$(ar t $$l); \
+ ${AR} x $$l; \
+ ${AR} r $@ $$(${AR} t $$l); \
+ rm $$(${AR} t $$l); \
done
$(addsuffix .fm,$(alldomains)): %.fm: %.ao
@@ -149,7 +149,7 @@
$(AM_V_ALDOR)set -e; \
rm -f $*.c $*.ao; \
cp $(SUBLIB_DEPEND).al lib$(libraryname)_$*.al; \
- ar r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
+ ${AR} r lib$(libraryname)_$*.al $(addsuffix .ao, $(shell $(UNIQ) $*.dep)); \
$(AM_DBG) $(aldorexedir)/aldor -gloop \
$(aldor_common_args) \
-Y. \
@@ -200,7 +200,7 @@
$(SUBLIB).al:
$(AM_V_AR) \
rm -f $@; \
- ar cr $@ $(addsuffix .ao, $(shell $(UNIQ) $(@:.al=.dep)))
+ ${AR} cr $@ $(addsuffix .ao, $(shell $(UNIQ) $(@:.al=.dep)))
all: Makefile $(SUBLIB).al
all: $(addsuffix .fm,$(library))
--- a/lib/debuglib/test/cmds.compile
+++ b/lib/debuglib/test/cmds.compile
@@ -6,7 +6,7 @@
cd
cd base/linux/srclib
-ar rv ../lib/libfoam.a *.o
+${AR} rv ../lib/libfoam.a *.o
cd
cd aldor/1.0rc0/lib/libdebug

View File

@@ -1,6 +1,5 @@
diff -ur a/aldor/src/Makefile.am b/aldor/src/Makefile.am
--- a/aldor/src/Makefile.am 2019-07-30 01:13:14.000000000 +0200
+++ b/aldor/src/Makefile.am 2020-03-04 21:14:57.582054633 +0100
--- a/aldor/src/Makefile.am
+++ b/aldor/src/Makefile.am
@@ -40,12 +40,12 @@
javagen_LDADD = libphase.a libstruct.a libgen.a libport.a -lm
@@ -33,9 +32,8 @@ diff -ur a/aldor/src/Makefile.am b/aldor/src/Makefile.am
#
# Special rules
diff -ur a/m4/strict_compile.m4 b/m4/strict_compile.m4
--- a/m4/strict_compile.m4 2019-07-30 01:13:14.000000000 +0200
+++ b/m4/strict_compile.m4 2020-03-04 21:17:33.394968306 +0100
--- a/m4/strict_compile.m4
+++ b/m4/strict_compile.m4
@@ -12,7 +12,7 @@
ALDOR_CC_OPTION(-Wno-sign-compare,cfg_no_sign_compare)
AC_MSG_CHECKING(Strict options for C compiler)

View File

@@ -6,14 +6,12 @@
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">Aldor is a programming language. It is the successor of A# as the extension language of the Axiom computer algebra system.
<longdescription lang="en">
Aldor is a programming language. It is the successor of A# as the extension language of the Axiom computer algebra system.
The Aldor language combines imperative, functional, and object-oriented features. It has an elaborate dependent type system, allowing types to be used as first-class values. Aldor's syntax is heavily influenced by Pascal, but it is optionally indentation-sensitive, like Python. In its current implementation, it is compiled, but an interactive listener is provided.
</longdescription>
<upstream>
<remote-id type="github">pippijn/aldor</remote-id>
</upstream>
<use>
<flag name="boehm-gc">Use Boehm Garbage Collector instead of built-in</flag>
</use>
<!--<use><flag name="boehm-gc">Use Boehm Garbage Collector instead of built-in</flag></use>-->
</pkgmetadata>