File hedgewars-1.0.2-rpath.patch of Package hedgewars
Remove RPATH with non-system library path from binaries
This is essentially https://hg.hedgewars.org/hedgewars/rev/084af6d2685f rebased
on 1.0.2.
Here is the original patch description:
```
# HG changeset patch
# User Wuzzy <Wuzzy2@mail.ru>
# Date 1542668975 -3600
# Node ID 084af6d2685f989b3375603f740f47f8febae130
# Parent bdc7ba72bbade0e11c8d65bfc52822685b582e53
Thas else() in paths.cmake did not make sense. Hopefully this fixes Fedora build issues
```
This original patch was reverted later by 3342358bc2c3 with no detail given. Maybe it
was breaking build relying on $ORIGIN being in RPATH.
Anyway it just looks fine for standard RPM building and it fixes rpmlint errors
(E: binary-or-shlib-defines-rpath) so let's apply it.
--- hedgewars-src-1.0.2/cmake_modules/paths.cmake 2022-09-21 22:42:51.555822630 +0200
+++ hedgewars-src-1.0.2/cmake_modules/paths.cmake 2022-09-21 22:43:05.759823219 +0200
@@ -61,7 +61,7 @@ if(APPLE)
#install_name_tool for libraries
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR TRUE)
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Frameworks")
-else(APPLE AND NOT (${CMAKE_INSTALL_PREFIX} MATCHES "/usr"))
+elseif(NOT (${CMAKE_INSTALL_PREFIX} MATCHES "/usr"))
#paths where to find libraries (final slash not optional):
# - the first is relative to the executable
# - the second is the same directory of the executable (so it runs in bin/)