From: Jan Rękorajski Date: Sat, 28 Oct 2023 22:34:23 +0000 (+0200) Subject: - fix builtin paths X-Git-Tag: auto/th/vcmi-1.3.0-1~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=2aca582912113b70997dd0b747b9d8133b1719b3;hp=5cc9205dab8e98cf88cfdb041d77a452804caddb;p=packages%2Fvcmi.git - fix builtin paths - fix lua scripting build --- diff --git a/absolute-dirs.patch b/absolute-dirs.patch new file mode 100644 index 0000000..e36491d --- /dev/null +++ b/absolute-dirs.patch @@ -0,0 +1,18 @@ +--- vcmi-1.3.0/CMakeLists.txt~ 2023-08-04 10:19:09.000000000 +0200 ++++ vcmi-1.3.0/CMakeLists.txt 2023-10-29 00:06:06.784096469 +0200 +@@ -517,11 +517,11 @@ + endif() + + # following constants only used for platforms using XDG (Linux, BSD, etc) +- add_definitions(-DM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_DIR}") +- add_definitions(-DM_BIN_DIR="${CMAKE_INSTALL_PREFIX}/${BIN_DIR}") +- add_definitions(-DM_LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}") ++ add_definitions(-DM_DATA_DIR="${DATA_DIR}") ++ add_definitions(-DM_BIN_DIR="${BIN_DIR}") ++ add_definitions(-DM_LIB_DIR="${LIB_DIR}") + +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}") ++ set(CMAKE_INSTALL_RPATH "${LIB_DIR}") + endif() + endif() + diff --git a/vcmi.spec b/vcmi.spec index 4a7a8ec..ade5d0c 100644 --- a/vcmi.spec +++ b/vcmi.spec @@ -10,6 +10,7 @@ Source0: https://github.com/vcmi/vcmi/archive/%{version}/%{name}-%{version}.tar. Source1: http://download.vcmi.eu/core.zip # Source1-md5: 5cf75d588cc53b93aceb809a6068ae37 Patch0: erm.patch +Patch1: absolute-dirs.patch URL: http://www.vcmi.eu/ BuildRequires: Qt5Network-devel >= 5 BuildRequires: Qt5Widgets-devel >= 5 @@ -23,6 +24,11 @@ BuildRequires: cmake >= 2.8.12 BuildRequires: ffmpeg-devel BuildRequires: fuzzylite-devel BuildRequires: libstdc++-devel +%ifarch x32 +BuildRequires: lua53-devel +%else +BuildRequires: luajit-devel +%endif BuildRequires: minizip-devel BuildRequires: qt5-build >= 5 BuildRequires: rpmbuild(macros) >= 1.605 @@ -45,12 +51,18 @@ możliwościami. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build install -d build cd build %cmake .. \ +%ifarch x32 + -DLUA_INCLUDE_DIR:PATH=/usr/include/lua5.3 \ + -DLUA_LIBRARY:FILEPATH=/usr/libx32/liblua5.3.so \ +%endif -DENABLE_ERM=ON \ + -DENABLE_LUA=ON \ -DENABLE_EDITOR=ON \ -DFORCE_BUNDLED_FL=OFF