Accepting request 424889 from home:susnux:branches:games
Use system tinygettext library OBS-URL: https://build.opensuse.org/request/show/424889 OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=62
This commit is contained in:
parent
f10662fe1c
commit
aacfd5d10b
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 30 14:13:52 UTC 2016 - rpm@fthiessen.de
|
||||||
|
|
||||||
|
- Added system-tinygettext.patch
|
||||||
|
- Removed code for other distributions from spec file, sine we just
|
||||||
|
build for openSUSE.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 29 09:22:25 UTC 2016 - jengelh@inai.de
|
Fri Jul 29 09:22:25 UTC 2016 - jengelh@inai.de
|
||||||
|
|
||||||
|
107
0ad.spec
107
0ad.spec
@ -19,81 +19,42 @@
|
|||||||
Name: 0ad
|
Name: 0ad
|
||||||
Version: 0.0.20
|
Version: 0.0.20
|
||||||
Release: 0
|
Release: 0
|
||||||
|
Summary: A real-time strategy game of ancient warfare
|
||||||
|
License: GPL-2.0+ and LGPL-3.0+ and CC-BY-SA-3.0 and MIT and ISC and MPL-2.0 and BSD-3-Clause
|
||||||
|
Group: Amusements/Games/Strategy/Real Time
|
||||||
Url: http://play0ad.com/
|
Url: http://play0ad.com/
|
||||||
Source: http://sourceforge.net/projects/zero-ad/files/releases/%{name}-%{version}-alpha-unix-build.tar.xz
|
Source: http://sourceforge.net/projects/zero-ad/files/releases/%{name}-%{version}-alpha-unix-build.tar.xz
|
||||||
Source99: %{name}.changes
|
Source99: %{name}.changes
|
||||||
# PATCH-FIX-UPSTREAM fix-c++14-compat.patch - http://trac.wildfiregames.com/ticket/4073
|
# PATCH-FIX-UPSTREAM fix-c++14-compat.patch - http://trac.wildfiregames.com/ticket/4073
|
||||||
Patch0: fix-c++14-compat.patch
|
Patch0: fix-c++14-compat.patch
|
||||||
|
# PATCH-FEATURE-UPSTREAM system-tinygettext.patch -- http://trac.wildfiregames.com/ticket/4192
|
||||||
|
Patch1: system-tinygettext.patch
|
||||||
BuildRequires: boost-devel
|
BuildRequires: boost-devel
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: mozilla-nspr-devel
|
|
||||||
BuildRequires: xz
|
|
||||||
BuildRequires: pkgconfig(IL)
|
|
||||||
BuildRequires: pkgconfig(icu-i18n)
|
|
||||||
BuildRequires: pkgconfig(zlib)
|
|
||||||
%if 0%{?suse_version} >= 1220
|
|
||||||
BuildRequires: libXcursor-devel
|
BuildRequires: libXcursor-devel
|
||||||
%endif
|
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libminiupnpc-devel
|
BuildRequires: libminiupnpc-devel
|
||||||
BuildRequires: libpng-devel
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: mozilla-nspr-devel
|
||||||
BuildRequires: nasm
|
BuildRequires: nasm
|
||||||
BuildRequires: python
|
|
||||||
BuildRequires: subversion
|
|
||||||
BuildRequires: zip
|
|
||||||
BuildRequires: pkgconfig(gloox)
|
|
||||||
BuildRequires: pkgconfig(libcurl)
|
|
||||||
BuildRequires: pkgconfig(libxml-2.0)
|
|
||||||
BuildRequires: pkgconfig(vorbis)
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
BuildRequires: pkg-config
|
|
||||||
BuildRequires: update-desktop-files
|
|
||||||
BuildRequires: pkgconfig(libenet)
|
|
||||||
BuildRequires: pkgconfig(openal)
|
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
BuildRequires: wxWidgets-3_0-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} == 1110
|
|
||||||
BuildRequires: SDL-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: libSDL2-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora_version}
|
|
||||||
BuildRequires: SDL-devel
|
|
||||||
BuildRequires: desktop-file-utils
|
|
||||||
BuildRequires: libenet-devel
|
|
||||||
BuildRequires: openal-soft-devel
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: wxGTK-devel
|
BuildRequires: python
|
||||||
%endif
|
BuildRequires: update-desktop-files
|
||||||
|
BuildRequires: wxWidgets-3_0-devel
|
||||||
%if 0%{?mandriva_version}
|
BuildRequires: pkgconfig(IL)
|
||||||
BuildRequires: libenet-devel
|
BuildRequires: pkgconfig(gloox)
|
||||||
BuildRequires: libwxgtku2.8-devel
|
BuildRequires: pkgconfig(icu-i18n)
|
||||||
|
BuildRequires: pkgconfig(libcurl)
|
||||||
%if 0%{?mandriva_version} < 201000
|
BuildRequires: pkgconfig(libenet)
|
||||||
BuildRequires: libopenal-devel
|
BuildRequires: pkgconfig(libxml-2.0)
|
||||||
BuildRequires: openal-soft-devel
|
BuildRequires: pkgconfig(openal)
|
||||||
%endif
|
BuildRequires: pkgconfig(sdl2)
|
||||||
|
BuildRequires: pkgconfig(tinygettext)
|
||||||
%if 0%{?mandriva_version} == 201000
|
BuildRequires: pkgconfig(vorbis)
|
||||||
BuildRequires: libopenal1-soft
|
BuildRequires: pkgconfig(zlib)
|
||||||
%endif
|
Requires: 0ad-data = %{version}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%endif
|
|
||||||
|
|
||||||
Summary: A real-time strategy game of ancient warfare
|
|
||||||
License: GPL-2.0+ and LGPL-3.0+ and CC-BY-SA-3.0 and MIT and ISC and MPL-2.0 and BSD-3-Clause and Zlib and CPL-1.0
|
|
||||||
Group: Amusements/Games/Strategy/Real Time
|
|
||||||
Requires: 0ad-data = %version
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
0 A.D. (pronounced "zero ey-dee") is a real-time strategy (RTS) game
|
0 A.D. (pronounced "zero ey-dee") is a real-time strategy (RTS) game
|
||||||
@ -106,15 +67,24 @@ flexible game engine.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}-alpha
|
%setup -q -n %{name}-%{version}-alpha
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
# Fix usage of __DATE__ and __TIME__ macros
|
||||||
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE99}")"
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE99}")"
|
||||||
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
||||||
TIME="\"$(date -d "${modified}" "+%%T")\""
|
TIME="\"$(date -d "${modified}" "+%%T")\""
|
||||||
find . -name '*.[ch]' -o -name '*.cpp' | xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
|
find . "(" -name '*.[ch]' -o -name '*.cpp' ")" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" \{\} +
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export CPPFLAGS="%{optflags} -fpermissive"
|
export CPPFLAGS="%{optflags} -fpermissive"
|
||||||
build/workspaces/update-workspaces.sh %{?_smp_mflags} --bindir=%{_bindir} --datadir=%{_datadir}/%{name} --libdir=%{_libdir}/%{name}
|
build/workspaces/update-workspaces.sh \
|
||||||
|
%{?_smp_mflags} \
|
||||||
|
--bindir=%{_bindir} \
|
||||||
|
--datadir=%{_datadir}/%{name} \
|
||||||
|
--libdir=%{_libdir}/%{name} \
|
||||||
|
--with-system-tinygettext
|
||||||
|
|
||||||
pushd build/workspaces/gcc
|
pushd build/workspaces/gcc
|
||||||
make verbose=1 %{?_smp_mflags}
|
make verbose=1 %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
@ -132,13 +102,7 @@ install -Dm 0755 binaries/system/libnvtt.so %{buildroot}%{_libdir}/%{name}/libnv
|
|||||||
install -Dm 0644 build/resources/0ad.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
install -Dm 0644 build/resources/0ad.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||||
install -Dm 0644 build/resources/0ad.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
install -Dm 0644 build/resources/0ad.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%suse_update_desktop_file %{name}
|
%suse_update_desktop_file %{name}
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?fedora_version}
|
|
||||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
|
||||||
%endif
|
|
||||||
|
|
||||||
install -Dm 0755 build/resources/0ad.sh %{buildroot}%{_bindir}/0ad
|
install -Dm 0755 build/resources/0ad.sh %{buildroot}%{_bindir}/0ad
|
||||||
|
|
||||||
@ -148,6 +112,11 @@ mkdir -p %{buildroot}%{_datadir}/%{name}
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.txt
|
%doc README.txt
|
||||||
|
%if 0%{?suse_version} > 1320
|
||||||
|
%license LICENSE.txt
|
||||||
|
%else
|
||||||
|
%doc LICENSE.txt
|
||||||
|
%endif
|
||||||
%{_bindir}/0ad
|
%{_bindir}/0ad
|
||||||
%{_bindir}/pyrogenesis
|
%{_bindir}/pyrogenesis
|
||||||
%{_libdir}/%{name}/libCollada.so
|
%{_libdir}/%{name}/libCollada.so
|
||||||
|
84
system-tinygettext.patch
Normal file
84
system-tinygettext.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
diff -Nur 0ad-0.0.20-alpha/build/premake/extern_libs4.lua new/build/premake/extern_libs4.lua
|
||||||
|
--- 0ad-0.0.20-alpha/build/premake/extern_libs4.lua 2016-03-12 19:15:04.000000000 +0100
|
||||||
|
+++ new/build/premake/extern_libs4.lua 2016-08-30 16:09:37.759431993 +0200
|
||||||
|
@@ -634,7 +634,16 @@
|
||||||
|
},
|
||||||
|
tinygettext = {
|
||||||
|
compile_settings = function()
|
||||||
|
- add_third_party_include_paths("tinygettext")
|
||||||
|
+ if _OPTIONS["with-system-tinygettext"] then
|
||||||
|
+ pkgconfig_cflags("tinygettext")
|
||||||
|
+ else
|
||||||
|
+ add_third_party_include_paths("tinygettext")
|
||||||
|
+ end
|
||||||
|
+ end,
|
||||||
|
+ link_settings = function()
|
||||||
|
+ if _OPTIONS["with-system-tinygettext"] then
|
||||||
|
+ pkgconfig_libs("tinygettext")
|
||||||
|
+ end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
valgrind = {
|
||||||
|
diff -Nur 0ad-0.0.20-alpha/build/premake/premake4.lua new/build/premake/premake4.lua
|
||||||
|
--- 0ad-0.0.20-alpha/build/premake/premake4.lua 2016-03-12 19:15:04.000000000 +0100
|
||||||
|
+++ new/build/premake/premake4.lua 2016-08-30 16:08:19.490889266 +0200
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
newoption { trigger = "without-nvtt", description = "Disable use of NVTT" }
|
||||||
|
newoption { trigger = "without-pch", description = "Disable generation and usage of precompiled headers" }
|
||||||
|
newoption { trigger = "without-tests", description = "Disable generation of test projects" }
|
||||||
|
+newoption { trigger = "with-system-tinygettext", description = "Search standard paths for tinygettext, instead of using bundled copy" }
|
||||||
|
|
||||||
|
-- OS X specific options
|
||||||
|
newoption { trigger = "macosx-bundle", description = "Enable OSX bundle, the argument is the bundle identifier string (e.g. com.wildfiregames.0ad)" }
|
||||||
|
@@ -599,28 +600,31 @@
|
||||||
|
end
|
||||||
|
setup_static_lib_project("network", source_dirs, extern_libs, {})
|
||||||
|
|
||||||
|
- source_dirs = {
|
||||||
|
- "third_party/tinygettext/src",
|
||||||
|
- }
|
||||||
|
- extern_libs = {
|
||||||
|
- "iconv",
|
||||||
|
- "boost",
|
||||||
|
- }
|
||||||
|
- setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } )
|
||||||
|
-
|
||||||
|
- -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output
|
||||||
|
- if _ACTION == "vs2013" then
|
||||||
|
- buildoptions {
|
||||||
|
- "/wd4127",
|
||||||
|
- "/wd4309",
|
||||||
|
- "/wd4800",
|
||||||
|
- "/wd4100",
|
||||||
|
- "/wd4996",
|
||||||
|
- "/wd4099",
|
||||||
|
- "/wd4503"
|
||||||
|
+ if _OPTIONS["with-system-tinygettext"] then
|
||||||
|
+ table.insert(extern_libs, "tinygettext")
|
||||||
|
+ else
|
||||||
|
+ source_dirs = {
|
||||||
|
+ "third_party/tinygettext/src",
|
||||||
|
}
|
||||||
|
- end
|
||||||
|
+ extern_libs = {
|
||||||
|
+ "iconv",
|
||||||
|
+ "boost",
|
||||||
|
+ }
|
||||||
|
+ setup_third_party_static_lib_project("tinygettext", source_dirs, extern_libs, { } )
|
||||||
|
|
||||||
|
+ -- it's an external library and we don't want to modify its source to fix warnings, so we just disable them to avoid noise in the compile output
|
||||||
|
+ if _ACTION == "vs2013" then
|
||||||
|
+ buildoptions {
|
||||||
|
+ "/wd4127",
|
||||||
|
+ "/wd4309",
|
||||||
|
+ "/wd4800",
|
||||||
|
+ "/wd4100",
|
||||||
|
+ "/wd4996",
|
||||||
|
+ "/wd4099",
|
||||||
|
+ "/wd4503"
|
||||||
|
+ }
|
||||||
|
+ end
|
||||||
|
+ end
|
||||||
|
|
||||||
|
if not _OPTIONS["without-lobby"] then
|
||||||
|
source_dirs = {
|
Loading…
x
Reference in New Issue
Block a user