From 2a51b43d43438febe493c39ba5ab8076e1b92355 Mon Sep 17 00:00:00 2001 From: aaronpuchert <> Date: Aug 12 2022 14:12:45 +0000 Subject: Update 0ad to version 0.0.25b / rev 7 via SR 994558 https://build.opensuse.org/request/show/994558 by user aaronpuchert + dimstar_suse - Fix rpmlint by adding premake-no-automatic-rpath.patch: don't let premake automatically add RPATHs, these are unnecessary. - Add distribution default link flags, especially -Wl,-z,now. --- diff --git a/.files b/.files index 2486e0b..b302f93 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 5672c84..4014641 100644 --- a/.rev +++ b/.rev @@ -47,4 +47,15 @@ 986050 + + 9dca495b9a752dd4142e81e949bfe49a + 0.0.25b + + dimstar_suse + - Fix rpmlint by adding premake-no-automatic-rpath.patch: don't let + premake automatically add RPATHs, these are unnecessary. +- Add distribution default link flags, especially -Wl,-z,now. + + 994558 + diff --git a/0ad.changes b/0ad.changes index b036540..554481d 100644 --- a/0ad.changes +++ b/0ad.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Aug 10 21:06:44 UTC 2022 - Aaron Puchert + +- Fix rpmlint by adding premake-no-automatic-rpath.patch: don't let + premake automatically add RPATHs, these are unnecessary. +- Add distribution default link flags, especially -Wl,-z,now. + +------------------------------------------------------------------- Sun Jun 26 11:24:08 UTC 2022 - Berthold Gunreben - s390x CPU not implemented. diff --git a/0ad.spec b/0ad.spec index 61c11e6..79d32a9 100644 --- a/0ad.spec +++ b/0ad.spec @@ -46,6 +46,8 @@ Patch1: no-version-check.patch Patch2: PrepareZoneForGC.patch # PATCH-FIX-UPSTREAM -- Don't define M_PIf if glibc already provides it Patch3: glibc-2.35.patch +# PATCH-FIX-OPENSUSE -- Skip automatic addition of an RPATH. +Patch4: premake-no-automatic-rpath.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libXcursor-devel @@ -97,6 +99,7 @@ flexible game engine. %setup -q -n %{name}-%{version}-alpha %patch0 -p1 %patch3 -p1 +%patch4 -p1 %if %{with system_mozjs} %patch1 -p1 %patch2 -p1 @@ -107,6 +110,8 @@ export CFLAGS="%{optflags}" # bundled Collada uses CCFLAGS export CCFLAGS="%{optflags}" export CPPFLAGS="%{optflags} -fpermissive" +# Copied from macros.cmake. +export LDFLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" build/workspaces/update-workspaces.sh \ %{?_smp_mflags} \ --bindir=%{_bindir} \ diff --git a/premake-no-automatic-rpath.patch b/premake-no-automatic-rpath.patch new file mode 100644 index 0000000..a50ec47 --- /dev/null +++ b/premake-no-automatic-rpath.patch @@ -0,0 +1,46 @@ +diff --git a/build/premake/premake5/src/scripts.c b/build/premake/premake5/src/scripts.c +index 9ed203c..144ea46 100644 +--- a/build/premake/premake5/src/scripts.c ++++ b/build/premake/premake5/src/scripts.c +@@ -5184,17 +5184,8 @@ static const unsigned char builtin_script_37[] = { + 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 44, 32, 102, 117, 108, 108, 112, + 97, 116, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 40, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 112, 97, 116, + 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 41, 32, 116, 104, 101, 110, 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 112, +- 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 115, 105, 98, 108, +-105, 110, 103, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, 99, 111, 110, 102, 105, 103, 46, 103, 101, 116, 108, 105, 110, 107, 115, 40, 99, 102, +-103, 44, 32, 34, 115, 105, 98, 108, 105, 110, 103, 115, 34, 44, 32, 34, 111, 98, 106, 101, 99, 116, 34, 41, 41, 32, 100, 111, 10, 105, 102, 32, +- 40, 115, 105, 98, 108, 105, 110, 103, 46, 107, 105, 110, 100, 32, 61, 61, 32, 112, 46, 83, 72, 65, 82, 69, 68, 76, 73, 66, 41, 32, 116, 104, +-101, 110, 10, 108, 111, 99, 97, 108, 32, 102, 117, 108, 108, 112, 97, 116, 104, 32, 61, 32, 115, 105, 98, 108, 105, 110, 103, 46, 108, 105, 110, 107, +-116, 97, 114, 103, 101, 116, 46, 100, 105, 114, 101, 99, 116, 111, 114, 121, 10, 108, 111, 99, 97, 108, 32, 114, 112, 97, 116, 104, 32, 61, 32, 112, +- 97, 116, 104, 46, 103, 101, 116, 114, 101, 108, 97, 116, 105, 118, 101, 40, 99, 102, 103, 46, 98, 117, 105, 108, 100, 116, 97, 114, 103, 101, 116, 46, +-100, 105, 114, 101, 99, 116, 111, 114, 121, 44, 32, 102, 117, 108, 108, 112, 97, 116, 104, 41, 10, 105, 102, 32, 110, 111, 116, 32, 40, 116, 97, 98, +-108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 114, 112, 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 41, 32, 116, 104, 101, 110, +- 10, 116, 97, 98, 108, 101, 46, 105, 110, 115, 101, 114, 116, 40, 114, 112, 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 10, 101, 110, 100, +- 10, 101, 110, 100, 10, 101, 110, 100, 10, 102, 111, 114, 32, 95, 44, 32, 114, 112, 97, 116, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, ++ 97, 116, 104, 115, 44, 32, 114, 112, 97, 116, 104, 41, 10, 101, 110, 100, 10, 101, 110, 100, ++ 10, 102, 111, 114, 32, 95, 44, 32, 114, 112, 97, 116, 104, 32, 105, 110, 32, 105, 112, 97, 105, 114, 115, 40, + 114, 112, 97, 116, 104, 115, 41, 32, 100, 111, 10, 105, 102, 32, 116, 97, 98, 108, 101, 46, 99, 111, 110, 116, 97, 105, 110, 115, 40, 111, 115, 46, + 103, 101, 116, 83, 121, 115, 116, 101, 109, 84, 97, 103, 115, 40, 99, 102, 103, 46, 115, 121, 115, 116, 101, 109, 41, 44, 32, 34, 100, 97, 114, 119, + 105, 110, 34, 41, 32, 116, 104, 101, 110, 10, 114, 112, 97, 116, 104, 32, 61, 32, 34, 64, 108, 111, 97, 100, 101, 114, 95, 112, 97, 116, 104, 47, +diff --git a/build/premake/premake5/src/tools/gcc.lua b/build/premake/premake5/src/tools/gcc.lua +index abd4c55..89f73b5 100644 +--- a/build/premake/premake5/src/tools/gcc.lua ++++ b/build/premake/premake5/src/tools/gcc.lua +@@ -296,17 +296,6 @@ + end + end + +- -- Automatically add linked shared libraries path relative to target directory +- for _, sibling in ipairs(config.getlinks(cfg, "siblings", "object")) do +- if (sibling.kind == p.SHAREDLIB) then +- local fullpath = sibling.linktarget.directory +- local rpath = path.getrelative(cfg.buildtarget.directory, fullpath) +- if not (table.contains(rpaths, rpath)) then +- table.insert(rpaths, rpath) +- end +- end +- end +- + for _, rpath in ipairs(rpaths) do + if table.contains(os.getSystemTags(cfg.system), "darwin") then + rpath = "@loader_path/" .. rpath