diff --git a/0001-CMake-Define-build-type-before-configuring-version-h.patch b/0001-CMake-Define-build-type-before-configuring-version-h.patch new file mode 100644 index 0000000..a4a2c9e --- /dev/null +++ b/0001-CMake-Define-build-type-before-configuring-version-h.patch @@ -0,0 +1,83 @@ +From 243cc8186ef01fd5d75d6fce6167b81201f2badb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= +Date: Sat, 11 Feb 2017 20:34:07 +0100 +Subject: [PATCH 1/2] CMake: Define build type before configuring version + header + +Otherwise with no manual CMAKE_BUILD_TYPE, we end up with an +empty string. + +(cherry picked from commit 6c2be7b3030442d0ffda2d712ef2159283de2f22) +--- + CMakeLists.txt | 48 ++++++++++++++++++++++++------------------------ + 1 file changed, 24 insertions(+), 24 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3958eeb..fea3b1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,6 +16,30 @@ if(UNIX AND NOT APPLE) + endif() + + ++### CMake config ++ ++if(NOT CMAKE_BUILD_TYPE) ++ set(CMAKE_BUILD_TYPE RelWithDebInfo) ++endif(NOT CMAKE_BUILD_TYPE) ++message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}") ++ ++set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}") ++ ++if(APPLE) ++ set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX") ++ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING ++ "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value") ++ set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.11.sdk" CACHE PATH ++ "The product will be built against the headers and libraries located inside the indicated SDK.") ++endif(APPLE) ++ ++if(LINUX) ++ option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF) ++endif(LINUX) ++ ++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/") ++ ++ + ### Version + + # Version for the current (stable) or next (development) release +@@ -65,30 +89,6 @@ message(STATUS "Version string: ${LUGARU_VERSION_STRING}") + configure_file(${SRCDIR}/Version.hpp.in ${SRCDIR}/Version.hpp ESCAPE_QUOTES @ONLY) + + +-### CMake config +- +-if(NOT CMAKE_BUILD_TYPE) +- set(CMAKE_BUILD_TYPE RelWithDebInfo) +-endif(NOT CMAKE_BUILD_TYPE) +-message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}") +- +-set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-parentheses -pedantic --std=gnu++11 ${CMAKE_CXX_FLAGS}") +- +-if(APPLE) +- set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX") +- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING +- "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value") +- set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.11.sdk" CACHE PATH +- "The product will be built against the headers and libraries located inside the indicated SDK.") +-endif(APPLE) +- +-if(LINUX) +- option(SYSTEM_INSTALL "Enable system-wide installation, with hardcoded data directory defined with CMAKE_INSTALL_DATADIR" OFF) +-endif(LINUX) +- +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/") +- +- + ### Sources + + set(LUGARU_SRCS +-- +2.9.3 + diff --git a/0002-ImageIO-fix-invalid-conversion.patch b/0002-ImageIO-fix-invalid-conversion.patch new file mode 100644 index 0000000..1757f43 --- /dev/null +++ b/0002-ImageIO-fix-invalid-conversion.patch @@ -0,0 +1,35 @@ +From 77ce05e2927c9e7209666181ead8f4ae94f881f4 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 12 Feb 2017 21:17:44 +0100 +Subject: [PATCH 2/2] ImageIO: fix invalid conversion + +Fixes: +Source/Utils/ImageIO.cpp:125:27: error: invalid conversion from 'int' to 'boolean' [-fpermissive] + cinfo.quantize_colors = 0; + ^ + +quantize_colors type is bool, so it must be initialized to TRUE or FALSE. + +Signed-off-by: Romain Naour + +(cherry picked from commit bb543993bb6f1eb76519a395d9a0a10ee777d160) +--- + Source/Utils/ImageIO.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/Utils/ImageIO.cpp b/Source/Utils/ImageIO.cpp +index 706c201..c19a63e 100644 +--- a/Source/Utils/ImageIO.cpp ++++ b/Source/Utils/ImageIO.cpp +@@ -122,7 +122,7 @@ static bool load_jpg(const char* file_name, ImageRec& tex) + (void)jpeg_read_header(&cinfo, TRUE); + + cinfo.out_color_space = JCS_RGB; +- cinfo.quantize_colors = 0; ++ cinfo.quantize_colors = FALSE; + (void)jpeg_calc_output_dimensions(&cinfo); + (void)jpeg_start_decompress(&cinfo); + +-- +2.9.3 + diff --git a/0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch b/0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch new file mode 100644 index 0000000..907dfb5 --- /dev/null +++ b/0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch @@ -0,0 +1,58 @@ +From a719d0ed00d8666feae6131f6d9d3b5604529fad Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Thu, 9 Mar 2017 08:04:51 -0500 +Subject: [PATCH] Dist: Linux: Add content ratings to AppStream + appdata/metainfo file + +Content ratings uses the Open Age Rating System, v1.0. + +This can be tweaked using the generator: https://odrs.gnome.org/oars + +(cherry picked from commit 030eaac41c5e9f3a7f2c0de8163d60b2a82facca) +--- + Dist/Linux/lugaru.appdata.xml | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/Dist/Linux/lugaru.appdata.xml b/Dist/Linux/lugaru.appdata.xml +index a9c45e5..90e9e1b 100644 +--- a/Dist/Linux/lugaru.appdata.xml ++++ b/Dist/Linux/lugaru.appdata.xml +@@ -1,5 +1,5 @@ + +- ++ + + lugaru.desktop + CC-BY-SA-4.0 +@@ -20,6 +20,28 @@ + his fellow rabbits from slavery. +

+ ++ ++ intense ++ intense ++ none ++ mild ++ none ++ none ++ none ++ none ++ none ++ none ++ mild ++ none ++ none ++ none ++ none ++ none ++ none ++ none ++ none ++ none ++ + + + https://osslugaru.gitlab.io/images/lugaru-banner.png +-- +2.9.3 + diff --git a/lugaru-1.1.tar.xz b/lugaru-1.1.tar.xz deleted file mode 100644 index 0717087..0000000 --- a/lugaru-1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e00f6fc611857926c67443580732b846619f9ff5cfe1801b011c7c5e738b82c -size 34387008 diff --git a/lugaru-1.2.tar.xz b/lugaru-1.2.tar.xz new file mode 100644 index 0000000..ea781c6 --- /dev/null +++ b/lugaru-1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3ea477caf78911c69939fbdc163f9f6517c7ef2267e716a0e050be1a166ef97 +size 34519308 diff --git a/lugaru.changes b/lugaru.changes index dcdd986..f2522b1 100644 --- a/lugaru.changes +++ b/lugaru.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri May 26 11:06:25 UTC 2017 - ngompa13@gmail.com + +- Update to official 1.2 release +- Backport patches from upstream v1.2 branch + * Added 0001-CMake-Define-build-type-before-configuring-version-h.patch + * Added 0002-ImageIO-fix-invalid-conversion.patch + * Added 0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch +- Reflow the description to look less awkward +- Remove empty and unnecessary conditional for openSUSE < 42.1 + ------------------------------------------------------------------- Tue Feb 21 00:50:00 UTC 2017 - jengelh@inai.de diff --git a/lugaru.spec b/lugaru.spec index 073a8ca..36d404d 100644 --- a/lugaru.spec +++ b/lugaru.spec @@ -2,7 +2,7 @@ # spec file for package lugaru # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2016 Neal Gompa . +# Copyright (c) 2017 Neal Gompa . # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,27 @@ Name: lugaru -Version: 1.1 +Version: 1.2 Release: 0 Summary: Third-person ninja rabbit fighting game License: GPL-2.0+ Group: Amusements/Games/Action/Other Url: https://osslugaru.gitlab.io/ Source: https://bitbucket.org/osslugaru/lugaru/downloads/%{name}-%{version}.tar.xz + +# PATCH-FIX-UPSTREAM 0001-CMake-Define-build-type-before-configuring-version-h.patch rverschelde@gmail.com -- Define build type before configuring version header +Patch0001: 0001-CMake-Define-build-type-before-configuring-version-h.patch +# PATCH-FIX-UPSTREAM 0002-ImageIO-fix-invalid-conversion.patch romain.naour@gmail.com -- ImageIO: fix invalid conversion +Patch0002: 0002-ImageIO-fix-invalid-conversion.patch +# PATCH-FIX-UPSTREAM 0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch ngompa13@gmail.com -- Add content ratings to AppStream data +Patch0003: 0003-Dist-Linux-Add-content-ratings-to-AppStream-appdata-.patch + # PATCH-FIX-OPENSUSE lugaru-1.1-do-not-install-documentation.patch ngompa13@gmail.com -- Don't try to install docs, as we're doing it ourselves -Patch0: lugaru-1.1-do-not-install-documentation.patch +Patch1000: lugaru-1.1-do-not-install-documentation.patch + +# For autosetup +BuildRequires: git-core + BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -57,19 +69,16 @@ Requires(postun): hicolor-icon-theme %description Lugaru is the predecessor to Overgrowth (http://www.wolfire.com/overgrowth). -It is a third-person action game. The main character, -Turner, is an anthropomorphic rebel bunny rabbit with impressive combat skills. In his quest to find -those responsible for slaughtering his village, he uncovers a far-reaching conspiracy involving the -corrupt leaders of the rabbit republic and the starving wolves from a nearby den. Turner takes it +It is a third-person action game. The main character, Turner, is an anthropomorphic +rebel bunny rabbit with impressive combat skills. In his quest to find those responsible +for slaughtering his village, he uncovers a far-reaching conspiracy involving the corrupt +leaders of the rabbit republic and the starving wolves from a nearby den. Turner takes it upon himself to fight against their plot and save his fellow rabbits from slavery. %package data Summary: Arch-independent data files for the Lugaru game License: CC-BY-SA-3.0 and CC-BY-SA-4.0 Group: Amusements/Games/Action/Other -%if 0%{?suse_version} && 0%{?suse_version} <= 1310 -%else -%endif Requires: %{name} = %{version} BuildArch: noarch @@ -77,8 +86,7 @@ BuildArch: noarch This package contains arch-independent data files for the game Lugaru. %prep -%setup -q -%patch0 -p1 +%autosetup -S git %build # Ensure that it looks in the right place for the game data