diff --git a/0ad.spec b/0ad.spec index cd467df..cbebc15 100644 --- a/0ad.spec +++ b/0ad.spec @@ -10,6 +10,8 @@ %global dbg %{nil} %endif +%bcond_with system_mozjs38 + # Remember to rerun licensecheck after every update: # https://bugzilla.redhat.com/show_bug.cgi?id=818401#c46 # http://trac.wildfiregames.com/ticket/1682 @@ -23,7 +25,7 @@ Name: 0ad Version: 0.0.23b -Release: 9%{?dist} +Release: 10%{?dist} # BSD License: # build/premake/* # libraries/source/miniupnpc/* (not built/used) @@ -102,12 +104,14 @@ BuildRequires: wxGTK3-devel BuildRequires: /usr/bin/appstream-util BuildRequires: /usr/bin/python +%if %{without system_mozjs38} # bundled mozjs BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(zlib) BuildRequires: readline-devel BuildRequires: /usr/bin/zip +%endif # bundled mozjs: For build time tests only BuildRequires: python2-devel @@ -115,7 +119,9 @@ BuildRequires: perl-devel ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le +%if %{without system_mozjs38} Provides: bundled(mozjs) = 38 +%endif # Only do fcollada debug build with enabling debug maintainer mode # It also prevents assumption there that it is building in x86 @@ -164,6 +170,9 @@ build/workspaces/update-workspaces.sh \ --bindir=%{_bindir} \ --datadir=%{_datadir}/%{name} \ --libdir=%{_libdir}/%{name} \ +%if %{with system_mozjs38} + --with-system-mozjs38 \ +%endif %if %{with system_nvtt} --with-system-nvtt \ %endif @@ -191,10 +200,13 @@ for name in nvcore nvimage nvmath nvtt; do done %endif +%if %{without system_mozjs38} %if %{with debug} - install -p -m 755 binaries/system/libmozjs38-ps-debug.so %{buildroot}%{_libdir}/%{name}/libmozjs38-ps-debug.so +name=mozjs38-ps-debug %else - install -p -m 755 binaries/system/libmozjs38-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs38-ps-release.so +name=mozjs38-ps-release +%endif +install -p -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so %endif install -d -m 755 %{buildroot}%{_datadir}/metainfo @@ -244,6 +256,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/0ad.desktop %{_mandir}/man6/*.6* %changelog +* Mon Sep 30 2019 pcpa - 0.0.23b-10 +- Add build conditional for system mozjs38 + * Wed Sep 11 2019 Kalev Lember - 0.0.23b-9 - Correctly install bundled mozjs38 (#1751250) - Exclude private libraries from autogenerated provides and requires