diff options
author | Martin Aumüller <aumuell@reserv.at> | 2023-11-03 00:08:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 00:08:22 +0100 |
commit | 7c79c744b6e70d90fc2b9567d4e070122c2258ef (patch) | |
tree | 37318cf58a6015ab030a118996272c001fbe688c | |
parent | 94d143763eeaf2adfcdea12f8a32e3d33552892d (diff) | |
download | spack-7c79c744b6e70d90fc2b9567d4e070122c2258ef.tar.gz spack-7c79c744b6e70d90fc2b9567d4e070122c2258ef.tar.bz2 spack-7c79c744b6e70d90fc2b9567d4e070122c2258ef.tar.xz spack-7c79c744b6e70d90fc2b9567d4e070122c2258ef.zip |
libtheora: fix build on macos (#40840)
* libtheora: regenerate Makefile.in during autoreconf
The patch to inhibit running of configure would exit autogen.sh so early
that it did not yet run autoconf/automake/...
Instead of patching autogen.sh, just pass -V as argument, as this is
passed on to configure and lets it just print its version instead of
configuring the build tree.
Also drop arguments from autogen.sh, as they are unused when configure
does not run.
* libtheora: fix build on macos
Apply upstream patches in order to avoid unresolved symbols during building of libtheoraenc.
These patches require re-running automake/autoconf/...
Error messages:
libtool: link: /Users/ma/git/spack/lib/spack/env/clang/clang -dynamiclib -o .libs/libtheoraenc.1.dylib .libs/apiwrapper.o .libs/fragment.o .libs/idct.o .libs/internal.o .libs/state.o .libs/quant.o .l
ibs/analyze.o .libs/fdct.o .libs/encfrag.o .libs/encapiwrapper.o .libs/encinfo.o .libs/encode.o .libs/enquant.o .libs/huffenc.o .libs/mathops.o .libs/mcenc.o .libs/rate.o .libs/tokenize.o -L/opt/spac
k/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib -logg -lm -Wl,-exported_symbols_list -Wl,/var/folders/zv/qr55pmd9065glf0mcltpx5bm000102/T/ma/spack-stage/spac
k-stage-libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/spack-src/lib/theoraenc.exp -install_name /opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib
/libtheoraenc.1.dylib -compatibility_version 3 -current_version 3.2
ld: warning: search path '/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/libtheora-1.1.1-uflq3jvysewnrmlj5x5tvltst65ho3v4/lib' not found
ld: Undefined symbols:
_th_comment_add, referenced from:
_theora_comment_add in apiwrapper.o
_th_comment_add_tag, referenced from:
_theora_comment_add_tag in apiwrapper.o
_th_comment_clear, referenced from:
_theora_comment_clear in apiwrapper.o
_th_comment_init, referenced from:
_theora_comment_init in apiwrapper.o
_th_comment_query, referenced from:
_theora_comment_query in apiwrapper.o
_th_comment_query_count, referenced from:
_theora_comment_query_count in apiwrapper.o
* libtheora: add git versions
stable as version name for theora-1.1 branch was chosen so that it sorts between 1.1.x and master
* libtheora: remove unused patch
thanks to @michaelkuhn for noticing
-rw-r--r-- | var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch | 23 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libtheora/package.py | 25 |
2 files changed, 19 insertions, 29 deletions
diff --git a/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch b/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch deleted file mode 100644 index 99992c39c2..0000000000 --- a/var/spack/repos/builtin/packages/libtheora/exit-prior-to-running-configure.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0060fd48c12a59a080974ca3754bf0eab9ab6d35 Mon Sep 17 00:00:00 2001 -From: Howard Pritchard <howardp@lanl.gov> -Date: Tue, 24 Nov 2020 15:14:41 -0700 -Subject: [PATCH] exit prior to running configure - -Signed-off-by: Howard Pritchard <howardp@lanl.gov> - -diff --git a/autogen.sh b/autogen.sh -index bbca69dc..4de1e783 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -112,6 +112,8 @@ if test -z "$*"; then - echo "to pass any to it, please specify them on the $0 command line." - fi - -+exit 0 -+ - echo "Generating configuration files for $package, please wait...." - - echo " $ACLOCAL $ACLOCAL_FLAGS" --- -2.18.2 - diff --git a/var/spack/repos/builtin/packages/libtheora/package.py b/var/spack/repos/builtin/packages/libtheora/package.py index 7c454a5250..6ec88aa91c 100644 --- a/var/spack/repos/builtin/packages/libtheora/package.py +++ b/var/spack/repos/builtin/packages/libtheora/package.py @@ -17,7 +17,10 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): homepage = "https://www.theora.org" url = "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz" + git = "https://gitlab.xiph.org/xiph/theora.git" + version("master", branch="master") + version("stable", branch="theora-1.1") version("1.1.1", sha256="f36da409947aa2b3dcc6af0a8c2e3144bc19db2ed547d64e9171c59c66561c61") version("1.1.0", sha256="3d7b4fb1c115f1a530afd430eed2e8861fa57c8b179ec2d5a5d8f1cd0c7a4268") @@ -43,12 +46,23 @@ class Libtheora(AutotoolsPackage, MSBuildPackage): "msbuild", "autotools", default="autotools" if sys.platform != "win32" else "msbuild" ) - patch("exit-prior-to-running-configure.patch", when="@1.1.1") patch("fix_encoding.patch", when="@1.1:") patch( "https://gitlab.xiph.org/xiph/theora/-/commit/7288b539c52e99168488dc3a343845c9365617c8.diff", sha256="e01ef71a1c19783a0b323b90a625e5c360ddb7ee03d2b6c201f1519f1704ea11", - when="^libpng@1.6:", + when="@:1.1.1 ^libpng@1.6:", + ) + # add -no-undefined + patch( + "https://gitlab.xiph.org/xiph/theora/-/commit/391ab0e99f2ad730231dbe5fc1154b990087f17d.diff", + sha256="d9bb5a9573819a27b3a925b1b66c33b36d9bca11b05d8aef88566eb6c8700690", + when="@:1.1.1", + ) + # link theoraenc to theoradec + patch( + "https://gitlab.xiph.org/xiph/theora/-/commit/133b951b60fd845eabbc38bf7acd998bb9be75fc.diff", + sha256="e01511aff0130a40c889868d3713a56458744f39d1bb5ad98c8058da50233aa7", + when="@:1.1.1", ) patch("libtheora-inc-external-ogg.patch", when="platform=windows") @@ -62,10 +76,9 @@ class AutotoolsBuilder(AutotoolsBuilder): def autoreconf(self, pkg, spec, prefix): sh = which("sh") - if self.spec.satisfies("target=aarch64:"): - sh("./autogen.sh", "prefix={0}".format(prefix), "--build=arm-linux") - else: - sh("./autogen.sh", "prefix={0}".format(prefix)) + # arguments are passed on to configure, let it just print its version + # and exit, so that configure can run in the configure build phase + sh("./autogen.sh", "-V") class MSBuildBuilder(MSBuildBuilder): |