[packages/vcmi] - disable lua/erm scripting on x32

baggins baggins at pld-linux.org
Sun Oct 29 02:47:58 CET 2023


commit ff45e169c963db8d2c5220140a0a11827df5d8d7
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 29 01:59:00 2023 +0200

    - disable lua/erm scripting on x32

 vcmi.spec | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/vcmi.spec b/vcmi.spec
index ade5d0c..7307533 100644
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -1,3 +1,12 @@
+#
+# Conditional build:
+%bcond_without	lua		# build LUA scripting
+#
+
+%ifarch x32
+%undefine	with_lua
+%endif
+
 Summary:	"Heroes 3: WoG recreated
 Summary(pl.UTF-8):	Gra "Heroes 3: WoG" stworzona od nowa
 Name:		vcmi
@@ -24,11 +33,7 @@ BuildRequires:	cmake >= 2.8.12
 BuildRequires:	ffmpeg-devel
 BuildRequires:	fuzzylite-devel
 BuildRequires:	libstdc++-devel
-%ifarch x32
-BuildRequires:	lua53-devel
-%else
-BuildRequires:	luajit-devel
-%endif
+%{?with_lua:BuildRequires:	luajit-devel}
 BuildRequires:	minizip-devel
 BuildRequires:	qt5-build >= 5
 BuildRequires:	rpmbuild(macros) >= 1.605
@@ -57,12 +62,8 @@ możliwościami.
 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 \
+	%cmake_on_off lua ENABLE_LUA \
+	%cmake_on_off lua ENABLE_ERM \
 	-DENABLE_EDITOR=ON \
 	-DFORCE_BUNDLED_FL=OFF
 
@@ -94,9 +95,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/%{name}/libvcmi.so
 %dir %{_libdir}/%{name}/AI
 %attr(755,root,root) %{_libdir}/%{name}/AI/lib*.so
+%if %{with lua}
 %dir %{_libdir}/%{name}/scripting
 %attr(755,root,root) %{_libdir}/%{name}/scripting/libvcmiERM.so
 %attr(755,root,root) %{_libdir}/%{name}/scripting/libvcmiLua.so
+%endif
 %{_datadir}/%{name}
 %{_desktopdir}/vcmiclient.desktop
 %{_desktopdir}/vcmieditor.desktop
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vcmi.git/commitdiff/ff45e169c963db8d2c5220140a0a11827df5d8d7



More information about the pld-cvs-commit mailing list