Update to 1.0

This commit is contained in:
survolog (Andrey Grigorev) 2022-04-22 15:44:06 +03:00
parent 2fb50fdd01
commit 734eb23679
4 changed files with 340 additions and 385 deletions

View file

@ -1,4 +1,2 @@
sources:
widelands-build18-src.tar.bz2: 369d765671bcbf1d7156c1ed0f914ceec0e814bb
widelands-build20.tar.bz2: a2fdedf81c08fd08809b8556c955a6a7f32c1eed
widelands-build21-source.tar.gz: 6e759c187db71afb6c4ea5e0d4d896a032f09696
widelands-1.0.tar.gz: b1ee28e42f46e27180c3ea08270b2b8d037b2a1f

View file

@ -1,342 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 018d9ea..5fedee1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -300,7 +300,6 @@ endif()
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")
IF (WIN32)
add_definitions(-DMINGW_HAS_SECURE_API -DWIN32_LEAN_AND_MEAN -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO)
diff --git a/cmake/WlFunctions.cmake b/cmake/WlFunctions.cmake
index 21a59bc..89244d7 100644
--- a/cmake/WlFunctions.cmake
+++ b/cmake/WlFunctions.cmake
@@ -289,5 +289,5 @@ function(wl_binary NAME)
#Quoting the CMake documentation on DESTINATION:
#"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
- install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
+ install(TARGETS ${NAME} DESTINATION games COMPONENT ExecutableFiles)
endfunction()
diff --git a/cmake/codecheck/CodeCheck.py b/cmake/codecheck/CodeCheck.py
index 672ae80..3711184 100755
--- a/cmake/codecheck/CodeCheck.py
+++ b/cmake/codecheck/CodeCheck.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
diff --git a/cmake/codecheck/rules/assert0.py b/cmake/codecheck/rules/assert0.py
index 5afabcc..f1a1c1a 100644
--- a/cmake/codecheck/rules/assert0.py
+++ b/cmake/codecheck/rules/assert0.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff --git a/cmake/codecheck/rules/garbage_after_include.py b/cmake/codecheck/rules/garbage_after_include.py
index cab17bc..7f2b56b 100644
--- a/cmake/codecheck/rules/garbage_after_include.py
+++ b/cmake/codecheck/rules/garbage_after_include.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff --git a/cmake/codecheck/rules/increment_decrement.py b/cmake/codecheck/rules/increment_decrement.py
index ae4f222..a0fe4d0 100644
--- a/cmake/codecheck/rules/increment_decrement.py
+++ b/cmake/codecheck/rules/increment_decrement.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff --git a/cmake/codecheck/run_tests.py b/cmake/codecheck/run_tests.py
index 6c47456..217da2a 100755
--- a/cmake/codecheck/run_tests.py
+++ b/cmake/codecheck/run_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
#
diff --git a/doc/sphinx/extract_rst.py b/doc/sphinx/extract_rst.py
index ee3094d..2250f49 100755
--- a/doc/sphinx/extract_rst.py
+++ b/doc/sphinx/extract_rst.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from glob import glob
diff --git a/regression_test.py b/regression_test.py
index d7ae42b..9d6099e 100755
--- a/regression_test.py
+++ b/regression_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from glob import glob
diff --git a/utils/build_deps.py b/utils/build_deps.py
index acf9aa2..c375600 100755
--- a/utils/build_deps.py
+++ b/utils/build_deps.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Simple script to check that the build dependencies in the CMakeLists.txt
diff --git a/utils/buildcat.py b/utils/buildcat.py
index 2568a5f..c08004b 100755
--- a/utils/buildcat.py
+++ b/utils/buildcat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
##############################################################################
diff --git a/utils/crop_animation.py b/utils/crop_animation.py
index 2265b8e..eee20a0 100755
--- a/utils/crop_animation.py
+++ b/utils/crop_animation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2010 by the Widelands Development Team
diff --git a/utils/detect_revision.py b/utils/detect_revision.py
index 0357897..958f9dd 100755
--- a/utils/detect_revision.py
+++ b/utils/detect_revision.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Tries to find out the repository revision of the current working directory
diff --git a/utils/file_utils.py b/utils/file_utils.py
index b2047a1..183f715 100755
--- a/utils/file_utils.py
+++ b/utils/file_utils.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
diff --git a/utils/find_unused_includes.py b/utils/find_unused_includes.py
index 75e7baf..f71d182 100755
--- a/utils/find_unused_includes.py
+++ b/utils/find_unused_includes.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# encoding: utf-8
"""Script to find unused includes.
diff --git a/utils/fix_formatting.py b/utils/fix_formatting.py
index 02f6059..c9b1483 100755
--- a/utils/fix_formatting.py
+++ b/utils/fix_formatting.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
diff --git a/utils/generate_glossary.py b/utils/generate_glossary.py
index 753b7fc..ee40580 100755
--- a/utils/generate_glossary.py
+++ b/utils/generate_glossary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
diff --git a/utils/glossary_checks.py b/utils/glossary_checks.py
index ddbf2cb..b2228e0 100755
--- a/utils/glossary_checks.py
+++ b/utils/glossary_checks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Runs a glossary check on all po files and writes the check results to
diff --git a/utils/macos/fix_dependencies.py b/utils/macos/fix_dependencies.py
index f8a47c1..122fb85 100755
--- a/utils/macos/fix_dependencies.py
+++ b/utils/macos/fix_dependencies.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""This tool was written out of frustration with
diff --git a/utils/make_spritemap.py b/utils/make_spritemap.py
index be919b4..ee4f781 100755
--- a/utils/make_spritemap.py
+++ b/utils/make_spritemap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import argparse
diff --git a/utils/optimize_pngs.py b/utils/optimize_pngs.py
index 0717493..a5f7d2f 100755
--- a/utils/optimize_pngs.py
+++ b/utils/optimize_pngs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from glob import glob
diff --git a/utils/pywi/tests.py b/utils/pywi/tests.py
index 1e81535..12159a3 100755
--- a/utils/pywi/tests.py
+++ b/utils/pywi/tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import config
import animation
"""Tests for various pywi modules."""
diff --git a/utils/rename_animation.py b/utils/rename_animation.py
index b25d437..06552c2 100755
--- a/utils/rename_animation.py
+++ b/utils/rename_animation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Tool to rename all files for a widelands animation in bulk."""
diff --git a/utils/run-clang-tidy.py b/utils/run-clang-tidy.py
index 5bbc444..6b9b01a 100755
--- a/utils/run-clang-tidy.py
+++ b/utils/run-clang-tidy.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
#
#===- run-clang-tidy.py - Parallel clang-tidy runner ---------*- python -*--===#
#
diff --git a/utils/syncstream/syncexcerpt-to-text.py b/utils/syncstream/syncexcerpt-to-text.py
index e2c05e3..adec2be 100755
--- a/utils/syncstream/syncexcerpt-to-text.py
+++ b/utils/syncstream/syncexcerpt-to-text.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
import struct
import sys
diff --git a/utils/test/test_lua-xgettext.py b/utils/test/test_lua-xgettext.py
index 24798c6..3b592f7 100644
--- a/utils/test/test_lua-xgettext.py
+++ b/utils/test/test_lua-xgettext.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from lua_xgettext import gettext, Lua_GetText, head
diff --git a/utils/test/test_make_spritemap.py b/utils/test/test_make_spritemap.py
index 28e9042..a494a1f 100644
--- a/utils/test/test_make_spritemap.py
+++ b/utils/test/test_make_spritemap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import make_spritemap
import numpy as np
diff --git a/utils/update_appdata.py b/utils/update_appdata.py
index fdbcfcc..bda0544 100755
--- a/utils/update_appdata.py
+++ b/utils/update_appdata.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from subprocess import call, Popen, PIPE
diff --git a/utils/update_authors.py b/utils/update_authors.py
index f09656e..56fb318 100755
--- a/utils/update_authors.py
+++ b/utils/update_authors.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import codecs
diff --git a/utils/update_copyright.py b/utils/update_copyright.py
index 760949f..ba1ae8c 100755
--- a/utils/update_copyright.py
+++ b/utils/update_copyright.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import os.path
diff --git a/utils/validate_json.py b/utils/validate_json.py
index cbe02a6..b3726c2 100755
--- a/utils/validate_json.py
+++ b/utils/validate_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import codecs
diff --git a/xdg/CMakeLists.txt b/xdg/CMakeLists.txt
index 889ef2d..f54e009 100644
--- a/xdg/CMakeLists.txt
+++ b/xdg/CMakeLists.txt
@@ -6,19 +6,19 @@ set(XDG_APPLICATION_ID "org.widelands.Widelands")
list(APPEND icon_sizes "16" "32" "48" "64" "128")
foreach (icon_size ${icon_sizes})
#install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
- install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ../share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
+ install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
endforeach (icon_size ${icon_sizes})
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ../share/man/man6)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION share/man/man6)
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ../share/applications)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION share/applications)
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ../share/metainfo)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo)
find_program(GTK_UPDATE_ICON_CACHE NAMES gtk-update-icon-cache)
if (GTK_UPDATE_ICON_CACHE)
#install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor ||: )")
- install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/../share/icons/hicolor ||: )")
+ install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor ||: )")
else (GTK_UPDATE_ICON_CACHE)
message(WARNING "gtk-update-icon-cache not found!")
endif (GTK_UPDATE_ICON_CACHE)

304
widelands-1.0-rosa.patch Normal file
View file

@ -0,0 +1,304 @@
diff -ur widelands-1.0/cmake/codecheck/CodeCheck.py widelands-1.0_patched/cmake/codecheck/CodeCheck.py
--- widelands-1.0/cmake/codecheck/CodeCheck.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/codecheck/CodeCheck.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
diff -ur widelands-1.0/cmake/codecheck/rules/assert0.py widelands-1.0_patched/cmake/codecheck/rules/assert0.py
--- widelands-1.0/cmake/codecheck/rules/assert0.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/codecheck/rules/assert0.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff -ur widelands-1.0/cmake/codecheck/rules/garbage_after_include.py widelands-1.0_patched/cmake/codecheck/rules/garbage_after_include.py
--- widelands-1.0/cmake/codecheck/rules/garbage_after_include.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/codecheck/rules/garbage_after_include.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff -ur widelands-1.0/cmake/codecheck/rules/increment_decrement.py widelands-1.0_patched/cmake/codecheck/rules/increment_decrement.py
--- widelands-1.0/cmake/codecheck/rules/increment_decrement.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/codecheck/rules/increment_decrement.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python -tt
+#!/usr/bin/python3 -tt
# encoding: utf-8
#
diff -ur widelands-1.0/cmake/codecheck/run_tests.py widelands-1.0_patched/cmake/codecheck/run_tests.py
--- widelands-1.0/cmake/codecheck/run_tests.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/codecheck/run_tests.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
#
diff -ur widelands-1.0/cmake/WlFunctions.cmake widelands-1.0_patched/cmake/WlFunctions.cmake
--- widelands-1.0/cmake/WlFunctions.cmake 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/cmake/WlFunctions.cmake 2022-04-20 12:32:09.761189490 +0300
@@ -325,5 +325,5 @@
#Quoting the CMake documentation on DESTINATION:
#"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
- install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
+ install(TARGETS ${NAME} DESTINATION games COMPONENT ExecutableFiles)
endfunction()
Только в widelands-1.0_patched/cmake: WlFunctions.cmake.orig
diff -ur widelands-1.0/CMakeLists.txt widelands-1.0_patched/CMakeLists.txt
--- widelands-1.0/CMakeLists.txt 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/CMakeLists.txt 2022-04-20 12:33:08.539767829 +0300
@@ -314,7 +314,6 @@
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")
endif()
diff -ur widelands-1.0/doc/sphinx/extract_rst.py widelands-1.0_patched/doc/sphinx/extract_rst.py
--- widelands-1.0/doc/sphinx/extract_rst.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/doc/sphinx/extract_rst.py 2022-04-20 12:32:09.761189490 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from glob import glob
diff -ur widelands-1.0/regression_test.py widelands-1.0_patched/regression_test.py
--- widelands-1.0/regression_test.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/regression_test.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from glob import glob
diff -ur widelands-1.0/utils/buildcat.py widelands-1.0_patched/utils/buildcat.py
--- widelands-1.0/utils/buildcat.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/buildcat.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
##############################################################################
diff -ur widelands-1.0/utils/build_deps.py widelands-1.0_patched/utils/build_deps.py
--- widelands-1.0/utils/build_deps.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/build_deps.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Simple script to check that the build dependencies in the CMakeLists.txt
diff -ur widelands-1.0/utils/detect_revision.py widelands-1.0_patched/utils/detect_revision.py
--- widelands-1.0/utils/detect_revision.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/detect_revision.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Tries to find out the repository revision of the current working directory
diff -ur widelands-1.0/utils/file_utils.py widelands-1.0_patched/utils/file_utils.py
--- widelands-1.0/utils/file_utils.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/file_utils.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
diff -ur widelands-1.0/utils/find_unused_includes.py widelands-1.0_patched/utils/find_unused_includes.py
--- widelands-1.0/utils/find_unused_includes.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/find_unused_includes.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# encoding: utf-8
"""Script to find unused includes.
diff -ur widelands-1.0/utils/fix_formatting.py widelands-1.0_patched/utils/fix_formatting.py
--- widelands-1.0/utils/fix_formatting.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/fix_formatting.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
diff -ur widelands-1.0/utils/generate_glossary.py widelands-1.0_patched/utils/generate_glossary.py
--- widelands-1.0/utils/generate_glossary.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/generate_glossary.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
diff -ur widelands-1.0/utils/glossary_checks.py widelands-1.0_patched/utils/glossary_checks.py
--- widelands-1.0/utils/glossary_checks.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/glossary_checks.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Runs a glossary check on all po files and writes the check results to
diff -ur widelands-1.0/utils/macos/fix_dependencies.py widelands-1.0_patched/utils/macos/fix_dependencies.py
--- widelands-1.0/utils/macos/fix_dependencies.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/macos/fix_dependencies.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""This tool was written out of frustration with
diff -ur widelands-1.0/utils/make_spritemap.py widelands-1.0_patched/utils/make_spritemap.py
--- widelands-1.0/utils/make_spritemap.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/make_spritemap.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import argparse
diff -ur widelands-1.0/utils/optimize_pngs.py widelands-1.0_patched/utils/optimize_pngs.py
--- widelands-1.0/utils/optimize_pngs.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/optimize_pngs.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Walk a directory and use command line tools to optimize all png files in
Только в widelands-1.0_patched/utils: optimize_pngs.py.orig
diff -ur widelands-1.0/utils/pywi/tests.py widelands-1.0_patched/utils/pywi/tests.py
--- widelands-1.0/utils/pywi/tests.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/pywi/tests.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import config
import animation
"""Tests for various pywi modules."""
diff -ur widelands-1.0/utils/rename_animation.py widelands-1.0_patched/utils/rename_animation.py
--- widelands-1.0/utils/rename_animation.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/rename_animation.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
"""Tool to rename all files for a widelands animation in bulk."""
diff -ur widelands-1.0/utils/run-clang-tidy.py widelands-1.0_patched/utils/run-clang-tidy.py
--- widelands-1.0/utils/run-clang-tidy.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/run-clang-tidy.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
#
#===- run-clang-tidy.py - Parallel clang-tidy runner ---------*- python -*--===#
#
diff -ur widelands-1.0/utils/syncstream/syncexcerpt-to-text.py widelands-1.0_patched/utils/syncstream/syncexcerpt-to-text.py
--- widelands-1.0/utils/syncstream/syncexcerpt-to-text.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/syncstream/syncexcerpt-to-text.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
import struct
import sys
diff -ur widelands-1.0/utils/test/test_lua-xgettext.py widelands-1.0_patched/utils/test/test_lua-xgettext.py
--- widelands-1.0/utils/test/test_lua-xgettext.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/test/test_lua-xgettext.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
from lua_xgettext import gettext, Lua_GetText, head
diff -ur widelands-1.0/utils/test/test_make_spritemap.py widelands-1.0_patched/utils/test/test_make_spritemap.py
--- widelands-1.0/utils/test/test_make_spritemap.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/test/test_make_spritemap.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import make_spritemap
import numpy as np
diff -ur widelands-1.0/utils/update_appdata.py widelands-1.0_patched/utils/update_appdata.py
--- widelands-1.0/utils/update_appdata.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/update_appdata.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import subprocess
Только в widelands-1.0_patched/utils: update_appdata.py.orig
diff -ur widelands-1.0/utils/update_authors.py widelands-1.0_patched/utils/update_authors.py
--- widelands-1.0/utils/update_authors.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/update_authors.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import codecs
diff -ur widelands-1.0/utils/update_copyright.py widelands-1.0_patched/utils/update_copyright.py
--- widelands-1.0/utils/update_copyright.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/update_copyright.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import os.path
diff -ur widelands-1.0/utils/validate_json.py widelands-1.0_patched/utils/validate_json.py
--- widelands-1.0/utils/validate_json.py 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/utils/validate_json.py 2022-04-20 12:32:09.764522742 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# encoding: utf-8
import codecs
diff -ur widelands-1.0/xdg/CMakeLists.txt widelands-1.0_patched/xdg/CMakeLists.txt
--- widelands-1.0/xdg/CMakeLists.txt 2021-06-14 12:22:20.000000000 +0300
+++ widelands-1.0_patched/xdg/CMakeLists.txt 2022-04-20 12:32:09.764522742 +0300
@@ -6,19 +6,19 @@
list(APPEND icon_sizes "16" "32" "48" "64" "128")
foreach (icon_size ${icon_sizes})
#install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
- install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ../share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
+ install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
endforeach (icon_size ${icon_sizes})
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ../share/man/man6)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION share/man/man6)
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ../share/applications)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION share/applications)
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ../share/metainfo)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo)
find_program(GTK_UPDATE_ICON_CACHE NAMES gtk-update-icon-cache)
if (GTK_UPDATE_ICON_CACHE)
#install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor ||: )")
- install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/../share/icons/hicolor ||: )")
+ install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor ||: )")
else (GTK_UPDATE_ICON_CACHE)
message(WARNING "gtk-update-icon-cache not found!")
endif (GTK_UPDATE_ICON_CACHE)

View file

@ -1,29 +1,31 @@
%define bld 21
Summary: Settlers II clone
Name: widelands
Version: %{bld}
Version: 1.0
Release: 1
Epoch: 1
License: GPLv2+
Group: Games/Strategy
Url: http://www.widelands.org/
Source0: https://launchpad.net/widelands/build20/build21/+download/%{name}-build%{bld}-source.tar.gz
Source0: https://launchpad.net/widelands/1.x/%{version}/+download/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source100: widelands.rpmlintrc
# gcc flags and python3.Sflo
Patch0: widelamds_bld21-rosa.patch
Patch0: widelands-1.0-rosa.patch
BuildRequires: cmake
BuildRequires: ctags
BuildRequires: doxygen
BuildRequires: optipng
BuildRequires: pngrewrite
BuildRequires: python3
BuildRequires: boost-devel
BuildRequires: gettext-devel
BuildRequires: jpeg-devel
BuildRequires: lua5.1-devel
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(python)
@ -33,12 +35,9 @@ BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(SDL2_net)
BuildRequires: pkgconfig(SDL2_ttf)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: python3
Requires: %{name}-basic-data = %{EVRD}
Requires: %{name}-maps = %{EVRD}
Requires: %{name}-i18n = %{EVRD}
Requires: %{name}-maps = %{EVRD}
Requires: %{name}-music = %{EVRD}
%description
@ -61,7 +60,7 @@ idea what Widelands is about.
%package -n %{name}-i18n
Summary: Translations for %{name}
Group: Games/Strategy
Requires: %{name} = %{version}
Requires: %{name} = %{EVRD}
BuildArch: noarch
%description -n %{name}-i18n
@ -70,12 +69,13 @@ Files to play %{name} in other languages than English.
%files -n %{name}-i18n
%{_gamesdatadir}/%{name}/i18n/
%{_gamesdatadir}/%{name}/locale/
#------------------------------------------------
%package -n %{name}-basic-data
Summary: Basic data set for %{name}
Group: Games/Strategy
Requires: %{name} = %{version}
Requires: %{name} = %{EVRD}
BuildArch: noarch
%description -n %{name}-basic-data
@ -83,29 +83,27 @@ Basic data set used by %{name}.
Without these files you will not be able to play.
%files -n %{name}-basic-data
%{_gamesdatadir}/%{name}/ai/
%{_gamesdatadir}/%{name}/campaigns/
%{_gamesdatadir}/%{name}/ChangeLog
%{_gamesdatadir}/%{name}/COPYING
%{_gamesdatadir}/%{name}/CREDITS
%{_gamesdatadir}/%{name}/ChangeLog
%{_gamesdatadir}/%{name}/VERSION
%{_gamesdatadir}/%{name}/ai/
%{_gamesdatadir}/%{name}/images/
%{_gamesdatadir}/%{name}/shaders/
%{_gamesdatadir}/%{name}/templates/
%{_gamesdatadir}/%{name}/campaigns/
%{_gamesdatadir}/%{name}/world/
%{_gamesdatadir}/%{name}/scripting/
%{_gamesdatadir}/%{name}/shaders/
%{_gamesdatadir}/%{name}/sound/
%{_gamesdatadir}/%{name}/templates/
%{_gamesdatadir}/%{name}/tribes/
%{_gamesdatadir}/%{name}/txts/
%{_gamesdatadir}/%{name}/VERSION
%{_gamesdatadir}/%{name}/world/
#------------------------------------------------
%package -n %{name}-maps
Summary: Maps for %{name}
Group: Games/Strategy
Requires: %{name} = %{version}
Requires: %{name} = %{EVRD}
BuildArch: noarch
%description -n %{name}-maps
@ -119,7 +117,7 @@ Maps for %{name}.
%package -n %{name}-music
Summary: Music for %{name}
Group: Games/Strategy
Requires: %{name} = %{version}
Requires: %{name} = %{EVRD}
BuildArch: noarch
%description -n %{name}-music
@ -131,39 +129,36 @@ These are not needed, but may improve fun while playing.
#------------------------------------------------
%prep
%setup -qn %{name}-build%{bld}
%patch0 -p1
%autosetup -p1
%build
%cmake -DCMAKE_BUILD_TYPE="Release" \
-DWL_INSTALL_PREFIX=%{_prefix} \
-DWL_INSTALL_BINDIR=%{_gamesbindir} \
-DWL_INSTALL_DATADIR=%{_gamesdatadir}/%{name} \
-DWL_INSTALL_LOCALEDIR=%{_datadir}/%{name}/locale \
-DBoost_USE_STATIC_LIBS=OFF
%cmake \
-DBoost_USE_STATIC_LIBS=OFF \
-DCMAKE_BUILD_TYPE="Release" \
-DWL_INSTALL_BINDIR=%{_gamesbindir} \
-DWL_INSTALL_DATADIR=%{_gamesdatadir}/%{name} \
-DWL_INSTALL_LOCALEDIR=%{_datadir}/%{name}/locale \
-DWL_INSTALL_PREFIX=%{_prefix}
%make
%install
%makeinstall_std -C build
#icons
for size in 16 32 48 64 128; do
install -D -m644 data/images/logos/wl-ico-${size}.png \
%{buildroot}%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
install -D -m644 data/images/logos/wl-ico-${size}.png \
%{buildroot}%{_iconsdir}/hicolor/${size}x${size}/apps/%{name}.png
done
# appdata
install -D -m0644 xdg/org.widelands.Widelands.appdata.xml \
%{buildroot}%{_appdatadir}/org.widelands.Widelands.appdata.xml
# man
%{buildroot}%{_appdatadir}/org.widelands.Widelands.appdata.xml
# man
install -D -m0644 xdg/widelands.6 \
%{buildroot}%{_mandir}/man6/widelands.6
%{buildroot}%{_mandir}/man6/widelands.6
# menu entry
install -m644 %{SOURCE1} -D %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -m644 %{SOURCE1} -D %{buildroot}/%{_datadir}/applications/%{name}.desktop
# use our desktop
rm -fr %{buildroot}/%{_datadir}/applications/org.widelands.Widelands.desktop