Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] maxima: fix build with -o ~sbcl
Date: Mon, 16 Oct 2023 16:32:19 +0200	[thread overview]
Message-ID: <20231016143219.6Qr0VmH4ID4GNq7dpJnpgGjJPh2p5NZtC9_RytTEcr4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46709@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages maxima
https://github.com/void-linux/void-packages/pull/46709

maxima: fix build with -o ~sbcl
This is the default for aarch64.

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Rework the patch `use-shared-library.patch` so the ecl binaries work as built, no need to use `patchelf` anymore. This way there should be no problem if maxima is needed to build the documentation.

OTOH, the documentation is currently shipped in the tarball, so we touch the correct files so that it won't be rebuilt.

This won't change the binary package, no need to revbump.

Cc: @dkwo 

Fixes: #46293

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/46709.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-maxima-46709.patch --]
[-- Type: text/x-diff, Size: 3797 bytes --]

From a1539319af062a97d06030e395849effe49f9fd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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                       | 22 ++++++++-----------
 2 files changed, 17 insertions(+), 22 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..eae9cad3a85e9 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,24 +41,20 @@ 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
+	# this one needs to be done after building
+	touch -c interfaces/emacs/imaxima/imaxima.info
 }
 
 do_check() {
@@ -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() {

  reply	other threads:[~2023-10-16 14:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  2:56 [PR PATCH] " tornaria
2023-10-16 14:32 ` tornaria [this message]
2023-10-16 14:33 ` tornaria
2023-10-16 18:01 ` dkwo
2023-10-16 18:01 ` dkwo
2023-10-16 18:05 ` tornaria
2023-10-16 18:29 ` dkwo
2023-10-16 18:57 ` dkwo
2023-10-16 19:38 ` tornaria
2023-10-16 22:01 ` dkwo
2023-10-16 22:17 ` tornaria
2023-10-17 15:16 ` dkwo
2023-10-17 15:17 ` dkwo
2023-10-17 15:18 ` dkwo
2023-10-17 15:59 ` [PR PATCH] [Merged]: " leahneukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231016143219.6Qr0VmH4ID4GNq7dpJnpgGjJPh2p5NZtC9_RytTEcr4@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).