Date: Friday, October 21, 2022 @ 20:17:48
  Author: felixonmars
Revision: 1333290

archrelease: copy trunk to community-staging-x86_64

Added:
  widelands/repos/community-staging-x86_64/
  widelands/repos/community-staging-x86_64/PKGBUILD
    (from rev 1333289, widelands/trunk/PKGBUILD)
  widelands/repos/community-staging-x86_64/widelands-1.0-gcc12-werror.patch
    (from rev 1333289, widelands/trunk/widelands-1.0-gcc12-werror.patch)

----------------------------------+
 PKGBUILD                         |   57 +++++++++++++++++++++++++++++++++++++
 widelands-1.0-gcc12-werror.patch |   29 ++++++++++++++++++
 2 files changed, 86 insertions(+)

Copied: widelands/repos/community-staging-x86_64/PKGBUILD (from rev 1333289, 
widelands/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2022-10-21 20:17:48 UTC (rev 1333290)
@@ -0,0 +1,57 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Arkham <arkham at archlinux dot us>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=widelands
+pkgver=1.0
+epoch=1
+pkgrel=6
+pkgdesc="A realtime strategy game with emphasis on economy and transport"
+arch=('x86_64')
+url="https://widelands.org/";
+license=('GPL')
+depends=('sdl2_mixer' 'sdl2_image' 'sdl2_net' 'sdl2_ttf' 'sdl2_gfx' 'lua' 
'glew' 'python' 'dbus')
+makedepends=('cmake' 'boost' 'mesa' 'ninja' 'git')
+replaces=('widelands-data')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/widelands/widelands/archive/refs/tags/v${pkgver}.tar.gz";
+        widelands-1.0-gcc12-werror.patch
+        
https://github.com/widelands/widelands/commit/316eaea209754368a57f445ea4dd016ecf8eded6.patch)
+sha512sums=('1092750944a8669682097dfbd2b578cdb8fab377f32cb81ce8d85b9d9b2e8ae8c4c73500c0a89be649b360fd7e086e19595eba37cecb8d64679e46f7da13e46e'
+            
'a303972d15f2ad2fb895992358759f7a3006c81c875afbbbac4cf4ec76ca93d3ad93754b26eea2315bd9c82f2967912019759117c7004843d659d2d767c2f7ee'
+            
'1b236bf06173aeadd07a3b0074b5ec3e6577923e4c6595587504f73d2c729586f03cc5a8fd256a0cb98ed7f586deb09df534fc8300f15d3a259e64435838e317')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i "$srcdir"/widelands-1.0-gcc12-werror.patch # patch from Gentoo
+  patch -Np1 -i "$srcdir"/316eaea209754368a57f445ea4dd016ecf8eded6.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  cmake \
+      -GNinja \
+      -Bbuild \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DCMAKE_INSTALL_PREFIX=/usr \
+      -DWL_INSTALL_BASEDIR=/usr \
+      -DWL_INSTALL_DATADIR=/usr/share/widelands
+  ninja -C build
+}
+
+package() {
+  cd $pkgname-$pkgver
+
+  DESTDIR="$pkgdir" ninja -C build install
+
+  # Fix wrong locations of some installed files (upstream bug)
+  # See also FS#72240
+  mkdir -p "$pkgdir"/usr/bin
+  mv 
"$pkgdir"/usr/{widelands,wl_map_object_info,wl_map_info,wl_create_spritesheet} 
"$pkgdir"/usr/bin
+  mv "$pkgdir"/usr/{VERSION,ChangeLog,CREDITS} "$pkgdir"/usr/share/widelands
+  mv "$pkgdir"/share/* "$pkgdir"/usr/share/
+
+  mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
+  mv "$pkgdir"/usr/COPYING "$pkgdir"/usr/share/licenses/$pkgname
+
+}

Copied: 
widelands/repos/community-staging-x86_64/widelands-1.0-gcc12-werror.patch (from 
rev 1333289, widelands/trunk/widelands-1.0-gcc12-werror.patch)
===================================================================
--- community-staging-x86_64/widelands-1.0-gcc12-werror.patch                   
        (rev 0)
+++ community-staging-x86_64/widelands-1.0-gcc12-werror.patch   2022-10-21 
20:17:48 UTC (rev 1333290)
@@ -0,0 +1,29 @@
+Drop -Werror= (uninitialized cause issues from gcc-12) and also backport
+fix for the offending variable.
+
+Note: upstream changed how -Werror is handled next release, currently pass
+a hard non-specific -Werror and disables it for gcc-12 (review on bump, see
+commit/PR below).
+
+https://bugs.gentoo.org/859277
+https://github.com/widelands/widelands/pull/5415
+https://github.com/widelands/widelands/commit/e4da6d624
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -312,8 +312,2 @@
+ if(NOT MSVC)
+-  # Turn some warnings into errors.
+-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=format-security")
+-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=return-type")
+-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=shadow")
+-  wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized")
+-
+   wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11")
+--- a/src/editor/editorinteractive.h
++++ b/src/editor/editorinteractive.h
+@@ -87,4 +87,4 @@
+               EditorIncreaseResourcesTool increase_resources;
+-              EditorSetPortSpaceTool set_port_space;
+               EditorUnsetPortSpaceTool unset_port_space;
++              EditorSetPortSpaceTool set_port_space;
+               EditorSetOriginTool set_origin;

Reply via email to