From a54a643586b9286343d501e001b5ae072551a604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 15 Oct 2023 20:32:11 -0300 Subject: [PATCH] maxima: fix build with -o ~sbcl This is the default for aarch64. --- .../maxima/patches/use-shared-library.patch | 17 ++++++----- srcpkgs/maxima/template | 28 ++++++++----------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/srcpkgs/maxima/patches/use-shared-library.patch b/srcpkgs/maxima/patches/use-shared-library.patch index a8f986ac7033c..56dff9be517ea 100644 --- a/srcpkgs/maxima/patches/use-shared-library.patch +++ b/srcpkgs/maxima/patches/use-shared-library.patch @@ -1,21 +1,20 @@ ---- 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) +--- a/src/maxima.system ++++ b/src/maxima.system +@@ -88,12 +88,15 @@ ;; Convert dir/foo.fas to dir/foo.o (make-pathname :type "o" :defaults p)) -- files))) + 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 ++ (si::chdir "binary-ecl") ++ (defparameter c::*ld-rpath* "-Wl,-rpath=$ORIGIN") ++ (c::build-fasl "maxima" :lisp-files '("libmaxima-ecl.so") :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 ++ (c::build-program "maxima" :lisp-files '("libmaxima-ecl.so") :ld-flags (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" (find-package "MAXIMA"))))) diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template index ef46df5b713ce..43e0e25cc3ec2 100644 --- a/srcpkgs/maxima/template +++ b/srcpkgs/maxima/template @@ -3,8 +3,8 @@ pkgname=maxima version=5.47.0 revision=3 build_style=gnu-configure -configure_args="$(vopt_enable clisp) $(vopt_enable sbcl sbcl-exec) $(vopt_enable ecl)" -hostmakedepends="python3 perl texinfo patchelf $(vopt_if ecl ecl)" +configure_args="$(vopt_enable clisp) $(vopt_enable sbcl) $(vopt_enable ecl) + makeinfo_found=true" makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)" depends="$(vopt_if clisp clisp) rlwrap" checkdepends="gnuplot" @@ -41,26 +41,17 @@ esac vopt_conflict clisp sbcl -post_configure() { +pre_build() { # do not rebuild these files if they exist touch -c doc/info/*.html touch -c doc/info/maxima.info* touch -c doc/info/maxima_toc.html + touch -c doc/info/maxima-index.lisp + touch -c doc/info/maxima-index-html.lisp + touch -c interfaces/xmaxima/doc/xmaxima.info touch -c interfaces/xmaxima/doc/xmaxima.html } -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 "maxima-ecl: check that maxima.fas works (#34273)" @@ -93,6 +84,11 @@ do_check() { fi } +pre_install() { + # do not rebuild these files if they exist + touch -c interfaces/emacs/imaxima/imaxima.info +} + post_install() { vmkdir usr/share/doc ln -sf ../maxima/${version}/doc ${DESTDIR}/usr/share/doc/maxima @@ -103,7 +99,7 @@ post_install() { # info files are used for maxima help, and need to be uncompressed # removing this file prevents compression of info files - rm ${DESTDIR}/usr/share/info/dir + rm -f ${DESTDIR}/usr/share/info/dir } maxima-src_package() {