mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
maxima: use a shared lib
This commit is contained in:
parent
ab0d3102b5
commit
6e408b8a2a
2 changed files with 55 additions and 16 deletions
21
srcpkgs/maxima/patches/use-shared-library.patch
Normal file
21
srcpkgs/maxima/patches/use-shared-library.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--- a/src/maxima.system 2021-12-02 00:26:23.955984864 -0300
|
||||||
|
+++ b/src/maxima.system 2021-12-02 00:31:22.299541969 -0300
|
||||||
|
@@ -87,13 +87,15 @@
|
||||||
|
(let ((obj (mapcar #'(lambda (p)
|
||||||
|
;; Convert dir/foo.fas to dir/foo.o
|
||||||
|
(make-pathname :type "o" :defaults p))
|
||||||
|
- files)))
|
||||||
|
- (c::build-fasl "binary-ecl/maxima" :lisp-files obj
|
||||||
|
+ files))
|
||||||
|
+ (lib '("binary-ecl/libmaxima-ecl.so")))
|
||||||
|
+ (c::build-shared-library "binary-ecl/maxima-ecl" :lisp-files obj)
|
||||||
|
+ (c::build-fasl "binary-ecl/maxima" :lisp-files lib
|
||||||
|
:ld-flags
|
||||||
|
(let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
|
||||||
|
(find-package "MAXIMA")))))
|
||||||
|
(if (and x (not (string= x ""))) (split-string x))))
|
||||||
|
- (c::build-program "binary-ecl/maxima" :lisp-files obj
|
||||||
|
+ (c::build-program "binary-ecl/maxima" :lisp-files lib
|
||||||
|
:ld-flags
|
||||||
|
(let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
|
||||||
|
(find-package "MAXIMA")))))
|
|
@ -4,7 +4,7 @@ version=5.45.1
|
||||||
revision=2
|
revision=2
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
|
configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)"
|
||||||
hostmakedepends="python3 perl emacs texinfo"
|
hostmakedepends="python3 perl emacs texinfo patchelf"
|
||||||
makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
|
makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)"
|
||||||
depends="$(vopt_if clisp clisp) rlwrap"
|
depends="$(vopt_if clisp clisp) rlwrap"
|
||||||
checkdepends="gnuplot"
|
checkdepends="gnuplot"
|
||||||
|
@ -24,6 +24,29 @@ desc_option_ecl="Build with ECL"
|
||||||
build_options_default="sbcl ecl"
|
build_options_default="sbcl ecl"
|
||||||
vopt_conflict clisp sbcl
|
vopt_conflict clisp sbcl
|
||||||
|
|
||||||
|
post_build() {
|
||||||
|
if [ "$build_option_ecl" ]; then
|
||||||
|
# everything will go in the same directory, use rpath=$ORIGIN
|
||||||
|
patchelf --remove-rpath src/binary-ecl/libmaxima-ecl.so
|
||||||
|
patchelf --set-rpath \$ORIGIN \
|
||||||
|
src/binary-ecl/{maxima,maxima.fas}
|
||||||
|
patchelf \
|
||||||
|
--replace-needed binary-ecl/libmaxima-ecl.so libmaxima-ecl.so \
|
||||||
|
src/binary-ecl/{maxima,maxima.fas}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_check() {
|
||||||
|
if [ "$build_option_ecl" ]; then
|
||||||
|
echo "Check that maxima.fas works"
|
||||||
|
ecl --eval "(require 'maxima \"src/binary-ecl/maxima.fas\")" \
|
||||||
|
--eval "(quit)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# now run the testsuite
|
||||||
|
make ${makejobs} check
|
||||||
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vmkdir usr/share/doc
|
vmkdir usr/share/doc
|
||||||
ln -sf ../maxima/${version}/doc ${DESTDIR}/usr/share/doc/maxima
|
ln -sf ../maxima/${version}/doc ${DESTDIR}/usr/share/doc/maxima
|
||||||
|
@ -68,25 +91,20 @@ xmaxima_package() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subpackages="maxima-src maxima-emacs xmaxima"
|
|
||||||
|
|
||||||
if [ "$build_option_ecl" ]; then
|
|
||||||
subpackages+=" maxima-ecl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
maxima-ecl_package() {
|
maxima-ecl_package() {
|
||||||
short_desc+=" - compiled with ECL"
|
short_desc+=" - compiled with ECL"
|
||||||
depends="${sourcepkg}-${version}_${revision}"
|
depends="${sourcepkg}-${version}_${revision}"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
# this is /usr/lib/ecl-${ecl_version}
|
BINARY_ECL=/usr/lib/maxima/${version}/binary-ecl
|
||||||
# ideally we would just place it in /usr/lib/ecl but this
|
vmove ${BINARY_ECL}
|
||||||
# doesn't just work
|
vinstall src/binary-ecl/libmaxima-ecl.so 755 ${BINARY_ECL}
|
||||||
# Maybe we can have the ecl package ship a symlink:
|
vinstall src/binary-ecl/maxima.fas 755 ${BINARY_ECL}
|
||||||
# /usr/lib/ecl -> /usr/lib/ecl-${ecl_version}
|
|
||||||
# and have this package just install in /usr/lib/ecl
|
# symlink maxima.fas in ECLDIR
|
||||||
ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
|
ECLDIR=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
|
||||||
vmkdir $ECLDIR
|
vmkdir ${ECLDIR}
|
||||||
vinstall src/binary-ecl/maxima.fas 755 $ECLDIR
|
ln -sr ${PKGDESTDIR}/${BINARY_ECL}/maxima.fas ${PKGDESTDIR}/${ECLDIR}
|
||||||
vmove usr/lib/maxima/${version}/binary-ecl
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subpackages="maxima-src maxima-emacs xmaxima $(vopt_if ecl maxima-ecl)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue