Accepting request 781677 from games

- Added "linker_pie_flag.patch" in order to link with "-pie".
    Replaces previous "fix-pie-warning.patch".
- "project_certs_fallback.patch" renamed to "certs_fallback.patch".
    Modified and adapted to Godot source code changes.
- Bash completion files "godot", "godot-headless", "godot-runner"
    and "godot-server" added.
- Package "godot-bash-completion" added.
- Location of documentation in man page adjusted.
- godot-rpmlintrc deleted with filter "no-manual-page-for-binary"
    because this warning doesn't seems to be thrown anymore.
- Build option "faster_build" introduced to speed up build
    during tests.
- Removed patch "fix-pie-warning.patch"
- Removed export_presets.cfg file as games should supply this file
- Update to v3.2
  Added:
  * Support for importing 3D scense using Assimp
  * Support for high-level multiplayer API and NAT traversal for 
    WebRTC
  * Support for enabling / disabling parts of the editor or specific 
    nodes
  * Added language server for GDScript
  * Added version control integration into the editor
  * Added a network profiler
  * Editor is now capped to 20FPS when the window is unfocused
  * Added MSAA support in the GLES2 renderer
  * Ability to define script templates on a per-project basis
  * Ability to limit the minimum and maximum window size
  * Minimap in the script editor
  * CSV files can now be imported as non-translation files
  * Multicast support in PacketPeerUDP
  * WebSocket improvements.
      * Support for SSL in WebSocketServer.
      * WebSocketClient can now use custom SSL certificates 
        (except on HTML5).
      * WebSocketClient can now define custom headers.
  * The editor now features a built-in Web server for testing HTML5 
    projects
  * Reimplemented support for embedding project data in the PCK file
  Changed:
  * Tabs and space indentation can no longer be mixed in the same 
    GDScript file
  * assert() in GDScript must now always be used with parentheses
  * UDP broadcasting is now disabled by default and must be enabled 
    by calling 
    set_broadcast_enabled(true) on the PacketPeerUDP instance
  * 3D collision shapes and RayCasts are now drawn in gray when disabled
  * The SCons build system now automatically detects the host platform
  * Exporting a project PCK or ZIP from the command line must now 
    be done with the new --export-pack command-line argument
  * Exported PCK files now contain the Godot patch version in their 
    header
  * "Set as Main Scene" context option for scenes in the FileSystem dock
  Removed:
  * Unused Panel panelf and panelnc styles.
  * thekla_atlas dependency, as light baking now relies on xatlas 
    for UV unwrapping.
  * Rating icons in the Asset Library
  * Some editor languages are no longer available due to missing 
    support for RTL and text shaping in Godot.
      * Arabic
      * Bengali
      * Persian
      * Hebrew
      * Hindi
      * Malayalam
      * Sinhalese
      * Tamil
      * Telugu
      * Urdu
  * Android: ARMv6 support.
  * iOS: ARMv7 support.
  Fixed:
  * The Project Manager now remembers the sorting option that was 
    previously set
  * Fixed issues with PBR environment mapping
  * Several fixes to the GLES2 renderer
  * Fixed importing BMP images
  * Exporting a project via the command-line now returns a non-zero 
    exit code if an error occurred during exporting
  * Fixed autocompletion in the script editor
  And more:
  https://github.com/godotengine/godot/blob/3.2/CHANGELOG.md

OBS-URL: https://build.opensuse.org/request/show/781677
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/godot?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2020-03-05 22:18:12 +00:00 committed by Git OBS Bridge
commit 7ce44b9d76
12 changed files with 361 additions and 162 deletions

66
certs_fallback.patch Normal file
View File

@ -0,0 +1,66 @@
From: cunix@mail.de
Date: 2019-04-29 16:00:00
Subject: System certs as fallback for project certs
References: https://github.com/godotengine/godot/pull/22066#issuecomment-421565719
https://github.com/godotengine/godot/pull/22066#issuecomment-422528664
https://github.com/godotengine/godot/issues/22232
Upstream: offered to upstream
If project has no value set for "network/ssl/certificates" (the default),
"default_certs" is not filled by function "load_default_certificates" because
we don't use builtin certs - BUILTIN_CERTS_ENABLED is not defined.
We use a distro specific "system_certs_path" as build option and apply it here
via "_SYSTEM_CERTS_PATH" (defined in included "core/io/certs_compressed.gen.h")
as fallback for certificates.
In result patch restores upstream behavior for certificate usage.
Difference is:
Where upstream by default uses hard coded certificates at build time, we hard
code path to the default certificates as "/var/lib/ca-certificates/ca-bundle.pem".
This bundle might be updated separately or admin can edit content of this file.
User can always define different path via Editor or Project settings.
See comments in patch for more details.
---
diff -r -U 5 a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp
--- a/modules/mbedtls/crypto_mbedtls.cpp
+++ b/modules/mbedtls/crypto_mbedtls.cpp
@@ -44,10 +44,12 @@
#define PEM_END_CRT "-----END CERTIFICATE-----\n"
#include "mbedtls/pem.h"
#include <mbedtls/debug.h>
+#include <string.h>
+
CryptoKey *CryptoKeyMbedTLS::create() {
return memnew(CryptoKeyMbedTLS);
}
Error CryptoKeyMbedTLS::load(String p_path) {
@@ -204,10 +206,21 @@
ERR_FAIL_COND(default_certs == NULL);
if (p_path != "") {
// Use certs defined in project settings.
default_certs->load(p_path);
+ } else if (strcmp(_SYSTEM_CERTS_PATH, "") != 0) {
+ // Use system certs only if user did not override in project settings
+ // and if _SYSTEM_CERTS_PATH is set.
+ // Should happen if Project Setting "network/ssl/certificates" is empty.
+ // Editor Setting "network/ssl/editor_ssl_certificates" is already set
+ // to "_SYSTEM_CERTS_PATH" by default -> This is caught by "if (p_path != "") {".
+ // But the same fallback might apply for certificates used by editor
+ // if user has set "network/ssl/editor_ssl_certificates" to "".
+ // "load_default_certificates" is only called twice with one of
+ // these parameters.
+ default_certs->load(_SYSTEM_CERTS_PATH);
}
#ifdef BUILTIN_CERTS_ENABLED
else {
// Use builtin certs only if user did not override it in project settings.
PoolByteArray out;

View File

@ -1,24 +0,0 @@
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.0.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
custom_template/release="/usr/bin/godot-runner"
custom_template/debug=""

View File

@ -1,13 +0,0 @@
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 28f5335..35892d8 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -160,7 +160,7 @@ def configure(env):
version = get_compiler_version(env)
if version != None and version[0] >= '6':
env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
+
# Do the same for clang should be fine with Clang 4 and higher
if using_clang(env):
version = get_compiler_version(env)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44cccbeec37490768429d5adf1495cd904a195f56b7157308c5650e075d9b89e
size 13197308

View File

@ -1 +0,0 @@
44cccbeec37490768429d5adf1495cd904a195f56b7157308c5650e075d9b89e release-3.1.2-stable/godot-3.1.2-stable.tar.xz

3
godot-3.2-stable.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:258e166a33f0d71aec59016d8e0d96342a0047a4d84aad2346c232bac8b3c0ce
size 14038472

View File

@ -0,0 +1 @@
258e166a33f0d71aec59016d8e0d96342a0047a4d84aad2346c232bac8b3c0ce godot-3.2-stable.tar.xz

View File

@ -1,2 +0,0 @@
# package server has no manual-page
addFilter("no-manual-page-for-binary godot-server")

View File

@ -1,3 +1,107 @@
-------------------------------------------------------------------
Wed Feb 12 12:00:00 UTC 2020 - cunix@mail.de
- Added "linker_pie_flag.patch" in order to link with "-pie".
Replaces previous "fix-pie-warning.patch".
- "project_certs_fallback.patch" renamed to "certs_fallback.patch".
Modified and adapted to Godot source code changes.
- Bash completion files "godot", "godot-headless", "godot-runner"
and "godot-server" added.
- Package "godot-bash-completion" added.
- Location of documentation in man page adjusted.
- godot-rpmlintrc deleted with filter "no-manual-page-for-binary"
because this warning doesn't seems to be thrown anymore.
- Build option "faster_build" introduced to speed up build
during tests.
-------------------------------------------------------------------
Sat Feb 1 04:33:27 UTC 2020 - Max Mitschke <maxmitschke@fastmail.com>
- Removed patch "fix-pie-warning.patch"
- Removed export_presets.cfg file as games should supply this file
- Update to v3.2
Added:
* Support for importing 3D scense using Assimp
* Support for high-level multiplayer API and NAT traversal for
WebRTC
* Support for enabling / disabling parts of the editor or specific
nodes
* Added language server for GDScript
* Added version control integration into the editor
* Added a network profiler
* Editor is now capped to 20FPS when the window is unfocused
* Added MSAA support in the GLES2 renderer
* Ability to define script templates on a per-project basis
* Ability to limit the minimum and maximum window size
* Minimap in the script editor
* CSV files can now be imported as non-translation files
* Multicast support in PacketPeerUDP
* WebSocket improvements.
* Support for SSL in WebSocketServer.
* WebSocketClient can now use custom SSL certificates
(except on HTML5).
* WebSocketClient can now define custom headers.
* The editor now features a built-in Web server for testing HTML5
projects
* Reimplemented support for embedding project data in the PCK file
Changed:
* Tabs and space indentation can no longer be mixed in the same
GDScript file
* assert() in GDScript must now always be used with parentheses
* UDP broadcasting is now disabled by default and must be enabled
by calling
set_broadcast_enabled(true) on the PacketPeerUDP instance
* 3D collision shapes and RayCasts are now drawn in gray when disabled
* The SCons build system now automatically detects the host platform
* Exporting a project PCK or ZIP from the command line must now
be done with the new --export-pack command-line argument
* Exported PCK files now contain the Godot patch version in their
header
* "Set as Main Scene" context option for scenes in the FileSystem dock
Removed:
* Unused Panel panelf and panelnc styles.
* thekla_atlas dependency, as light baking now relies on xatlas
for UV unwrapping.
* Rating icons in the Asset Library
* Some editor languages are no longer available due to missing
support for RTL and text shaping in Godot.
* Arabic
* Bengali
* Persian
* Hebrew
* Hindi
* Malayalam
* Sinhalese
* Tamil
* Telugu
* Urdu
* Android: ARMv6 support.
* iOS: ARMv7 support.
Fixed:
* The Project Manager now remembers the sorting option that was
previously set
* Fixed issues with PBR environment mapping
* Several fixes to the GLES2 renderer
* Fixed importing BMP images
* Exporting a project via the command-line now returns a non-zero
exit code if an error occurred during exporting
* Fixed autocompletion in the script editor
And more:
https://github.com/godotengine/godot/blob/3.2/CHANGELOG.md
-------------------------------------------------------------------
Mon Jan 13 16:00:00 UTC 2020 - cunix@mail.de

View File

@ -1,7 +1,7 @@
#
# spec file for package godot
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2017 Luke Jones, luke.nukem.jones@gmail.com
#
# All modifications and additions to the file contributed by third parties
@ -17,11 +17,14 @@
#
# faster_build only builds the editor to speed up the build.
%define faster_build 0
%define _buildshell /bin/bash
%define ca_bundle /var/lib/ca-certificates/ca-bundle.pem
%define ca_bundle %{_localstatedir}/lib/ca-certificates/ca-bundle.pem
Name: godot
Version: 3.1.2
Version: 3.2
Release: 0
Summary: Cross-Platform Game Engine with an Integrated Editor
License: MIT
@ -29,12 +32,10 @@ Group: Development/Tools/Other
URL: https://godotengine.org/
Source0: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz
Source1: https://downloads.tuxfamily.org/godotengine/%{version}/%{name}-%{version}-stable.tar.xz.sha256
Source2: export_presets.cfg
Source3: %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE Allows building all files with -lpie
Patch0: fix-pie-warning.patch
# Use system certificates as fallback for project certificates
Patch1: project_certs_fallback.patch
# Project policy does not allow "-no-pie"
Patch0: linker_pie_flag.patch
# Use system certificates as fallback for certificates
Patch1: certs_fallback.patch
BuildRequires: Mesa-devel
BuildRequires: fdupes
BuildRequires: gcc
@ -53,7 +54,6 @@ BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(ogg)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(opusfile)
BuildRequires: pkgconfig(theora)
@ -67,65 +67,105 @@ BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(zlib)
%if %{suse_version} > 1500
%if 0%{?suse_version} > 1500
BuildRequires: mbedtls-devel
BuildRequires: pkgconfig(bullet)
BuildRequires: pkgconfig(libwslay)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(miniupnpc)
%else
%if 0%{?is_opensuse}
# SLES seems not to have wslay and miniupnpc
BuildRequires: pkgconfig(libwslay)
BuildRequires: libminiupnpc-devel
%if 0%{?sle_version} >= 150200
BuildRequires: mbedtls-devel
%endif
%endif
%endif
Requires: ca-certificates
Recommends: ca-certificates-mozilla
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
Suggests: godot-headless = %{version}
Suggests: godot-runner = %{version}
Suggests: godot-server = %{version}
Recommends: %{name}-bash-completion
Suggests: %{name}-headless = %{version}
Suggests: %{name}-runner = %{version}
Suggests: %{name}-server = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# The following "Provides: bundled()" and comments were taken from the
# Fedora Godot specfile.
# Link: https://src.fedoraproject.org/rpms/godot/blob/master/f/godot.spec
# Git commit slightly newer than 2.87
# Can be unbundled if bullet 2.88+ is available
Provides: bundled(bullet) = 2.88
# Has some modifications for IPv6 support, upstream enet is unresponsive
# Should not be unbundled.
Provides: bundled(enet) = 1.3.13
# Upstream commit from 2016, newer than 1.0.0.27 which is last tag
# Could be unbundled if packaged.
# Godot upstream will soon deprecate this "libsimplewebm" module.
Provides: bundled(libwebm) = 1.0.2
Provides: bundled(enet) = 1.3.14
# Has custom changes to support seeking in zip archives
# Should not be unbundled.
Provides: bundled(minizip) = 1.2.11
# Could be unbundled if packaged.
# Version: git (25241c5, 2019)
Provides: bundled(cvtt)
Provides: bundled(etc2comp)
Provides: bundled(noto-sans-fonts)
Provides: bundled(hack-fonts)
Provides: bundled(google-droid-fonts)
Provides: bundled(glad)
Provides: bundled(jpeg-compressor)
Provides: bundled(libsimplewebm)
Provides: bundled(polyclipping)
Provides: bundled(FastLZ)
Provides: bundled(hqx)
Provides: bundled(open-simplex-noise-in-c)
Provides: bundled(pcg)
Provides: bundled(smaz)
Provides: bundled(polypartition)
Provides: bundled(curl_hostcheck)
Provides: bundled(yuv2rgb)
Provides: bundled(ifaddrs-android)
Provides: bundled(easing)
Provides: bundled(Tangent_Space_Normal_Maps)
Provides: bundled(stb)
Provides: bundled(pvrtccompressor)
Provides: bundled(tinyexr)
Provides: bundled(vhacd)
# Can be unbundled if packaged
Provides: bundled(nanosvg)
# Could be unbundled if packaged.
Provides: bundled(recastnavigation)
Provides: bundled(squish) = 1.15
Provides: bundled(xatlas)
# Can't be unbundled out-of-the-box as it uses experimental APIs available
# only to static linking. They're not critical features though and could
# maybe be patched away to link against a shared zstd.
Provides: bundled(zstd) = 1.4.4
## Need to update in Factory ##
Provides: bundled(assimp)
# Has custom changes made to library to aid in build configurations
Provides: bundled(libwebsockets) = 3.0.1
%if 0%{?suse_version} > 1500
%else
Provides: bundled(bullet) = 2.89
Provides: bundled(libzstd)
%if 0%{?sle_version} < 150200
Provides: bundled(mbedtls) = 2.16.4
%endif
%if !0%{?is_opensuse}
# SLES seems not to have miniupnpc and wslay
Provides: bundled(libwslay) = 1.1.0
Provides: bundled(miniupnpc)
%endif
%endif
%description
Godot is a game engine. It provides a set of tools and a visually
oriented workflow that can export games to PC, Mobile and Web
platforms.
%if !0%{?faster_build}
%package headless
Summary: Headless version of Godot editor useful for command line
Group: Development/Tools/Other
Requires: godot-rpm-macros
Requires: godot-runner
Requires: ca-certificates
Recommends: ca-certificates-mozilla
Suggests: %{name}-bash-completion
%description headless
This package is the headless version of the Godot editor that is suited for
@ -136,6 +176,7 @@ Summary: Shared binary to play games developed with the Godot engine
Group: Amusements/Games/Other
Requires: ca-certificates
Recommends: ca-certificates-mozilla
Suggests: %{name}-bash-completion
%description runner
This package contains a godot-runner binary for the Linux X11 platform,
@ -145,33 +186,77 @@ by pointing to the location of the game's data package.
%package server
Summary: Godot headless binary for servers
Group: Amusements/Games/Other
Requires: ca-certificates
Recommends: ca-certificates-mozilla
Suggests: %{name}-bash-completion
%description server
This package contains the headless binary for the Godot game engine
particularly suited for running dedicated servers.
%endif
%package bash-completion
Summary: Godot command line completion for Bash
Group: Amusements/Games/Other
BuildArch: noarch
Requires: bash-completion
Supplements: bash-completion
Supplements: %{name}
Enhances: %{name}-headless
Enhances: %{name}-runner
Enhances: %{name}-server
%description bash-completion
Bash command line completion support for %{name}, %{name}-headless,
%{name}-runner and %{name}-server
%prep
%setup -q -n %{name}-%{version}-stable
%patch0 -p1
%patch1 -p1
cp thirdparty/README.md thirdparty_README.md
# actual doc location in openSUSE
sed -i 's/\/usr\/share\/doc\/godot\//\/usr\/share\/doc\/packages\/godot\//' misc/dist/linux/godot.6
# disarm shebang
sed -i '1s/#!/##/' misc/dist/shell/godot.bash-completion
# bash completion for sub packages
cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-headless
cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-runner
cp misc/dist/shell/godot.bash-completion misc/dist/shell/godot-server
sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-headless/' misc/dist/shell/godot-headless
sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-runner/' misc/dist/shell/godot-runner
sed -i '$s/_complete_godot_bash godot/_complete_godot_bash godot-server/' misc/dist/shell/godot-server
%build
# Configuring build to use some distribution libraries
unbundle_libs=('certs' 'freetype' 'libogg' 'libpng' 'libtheora' 'libvorbis' \
'libwebp' 'opus' 'pcre2' 'zlib')
# Adding distribution name to build name
%if 0%{?suse_version}
%if 0%{?is_opensuse}
# Unbundle more libs for openSUSE
unbundle_libs+=('miniupnpc' 'wslay')
export BUILD_NAME="openSUSE"
%else
export BUILD_NAME="SUSE"
%endif
%endif
# Configuring build to use some distribution libraries
unbundle_libs=('certs' 'freetype' 'libogg' 'libpng' 'libtheora' 'libvorbis' \
'libwebp' 'opus' 'pcre2' 'zlib')
# Unbundle more libs for Tumbleweed
%if %{suse_version} > 1500
unbundle_libs+=('mbedtls' 'miniupnpc')
unbundle_libs+=('bullet' 'mbedtls' 'zstd')
%else
# Unbundle more libs for coming Leap
%if 0%{?sle_version} >= 150200 && 0%{?is_opensuse}
unbundle_libs+=('mbedtls')
%endif
%endif
# Unbundle libvpx only if it doesn't meet the minimum requirement.
@ -188,30 +273,20 @@ for thirdparty in "${unbundle_libs[@]}"; do
rm -rf thirdparty/$thirdparty
done
# Removing extra thirdparty libraries as they are either not needed or are
# provided by the distribution.
rm -rf thirdparty/rtaudio
# Keep empty certificates file needed as "source" by
# function "make_certs_header" in core/core_builders.py
mkdir -pv thirdparty/certs
touch thirdparty/certs/ca-certificates.crt
# Common build arguments for all targets
%if %{suse_version} >= 1500
%define use_lto use_lto=1
%else
%define use_lto use_lto=0
%endif
%define build_args %{?_smp_mflags} \\\
progress=yes verbose=yes udev=yes %{use_lto} \\\
CCFLAGS='%{optflags}' system_certs_path=%{ca_bundle} \\\
$system_libs
progress=yes verbose=yes udev=yes use_lto=1 \\\
CCFLAGS='%{optflags}' \\\
system_certs_path=%{ca_bundle} $system_libs
# Build graphical editor (tools)
scons %{build_args} platform=x11 tools=yes target=release_debug
%if !0%{?faster_build}
# Build headless version of the editor (with tools)
scons %{build_args} platform=server tools=yes target=release_debug
@ -220,11 +295,19 @@ scons %{build_args} platform=x11 tools=no target=release
# Build server version (without tools)
scons %{build_args} platform=server tools=no target=release
%endif
%install
# Installing the editor
install -D -p -m 755 bin/%{name}.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}
install -D -p -m 644 misc/dist/linux/godot.6 %{buildroot}/%{_mandir}/man6/%{name}.6%{?ext_man}
install -D -p -m 644 icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
install -D -p -m 644 icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -D -p -m 644 misc/dist/linux/org.godotengine.Godot.appdata.xml %{buildroot}%{_datadir}/appdata/org.godotengine.Godot.appdata.xml
%suse_update_desktop_file -i org.godotengine.Godot
%if !0%{?faster_build}
# Installing the headless editor
install -D -p -m 755 bin/%{name}_server.x11.opt.tools.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-headless
@ -233,20 +316,19 @@ install -D -p -m 755 bin/%{name}.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{
# Installing the server
install -D -p -m 755 bin/%{name}_server.x11.opt.%{__isa_bits} %{buildroot}%{_bindir}/%{name}-server
%endif
install -D -p -m 644 %{S:2} %{buildroot}%{_datadir}/%{name}/export_presets.cfg
install -D -p -m 644 misc/dist/linux/godot.6 %{buildroot}/%{_mandir}/man6/%{name}.6%{?ext_man}
install -D -p -m 644 icon.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
install -D -p -m 644 icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -D -p -m 644 misc/dist/linux/org.godotengine.Godot.appdata.xml %{buildroot}%{_datadir}/appdata/org.godotengine.Godot.appdata.xml
%suse_update_desktop_file -i org.godotengine.Godot
# Installing bash-completion
install -D -p -m 644 misc/dist/shell/godot.bash-completion %{buildroot}%{_datadir}/bash-completion/completions/%{name}
install -D -p -m 644 misc/dist/shell/godot-headless %{buildroot}%{_datadir}/bash-completion/completions/%{name}-headless
install -D -p -m 644 misc/dist/shell/godot-runner %{buildroot}%{_datadir}/bash-completion/completions/%{name}-runner
install -D -p -m 644 misc/dist/shell/godot-server %{buildroot}%{_datadir}/bash-completion/completions/%{name}-server
cp thirdparty/README.md thirdparty_README.md
%fdupes -s %{buildroot}/%{_prefix}
%files
%license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/256x256
%dir %{_datadir}/icons/hicolor/256x256/apps
@ -259,21 +341,28 @@ cp thirdparty/README.md thirdparty_README.md
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man6/%{name}.6%{?ext_man}
%if !0%{?faster_build}
%files headless
%license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md
%dir %{_datadir}/%{name}
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md
%{_bindir}/%{name}-headless
%{_datadir}/%{name}/export_presets.cfg
%files runner
%license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md
%{_bindir}/%{name}-runner
%files server
%license LICENSE.txt LOGO_LICENSE.md COPYRIGHT.txt thirdparty_README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md ISSUE_TEMPLATE.md README.md
%doc AUTHORS.md CHANGELOG.md CONTRIBUTING.md DONORS.md README.md CODE_OF_CONDUCT.md
%{_bindir}/%{name}-server
%endif
%files bash-completion
%license LICENSE.txt COPYRIGHT.txt
%{_datadir}/bash-completion/completions/%{name}
%{_datadir}/bash-completion/completions/%{name}-headless
%{_datadir}/bash-completion/completions/%{name}-runner
%{_datadir}/bash-completion/completions/%{name}-server
%changelog

30
linker_pie_flag.patch Normal file
View File

@ -0,0 +1,30 @@
From: cunix@mail.de
Date: 2020-02-12 12:00:00
Subject: linker should use "-pie" instead of "-no-pie"
References: https://github.com/godotengine/godot/pull/23542#issuecomment-436385853
https://github.com/godotengine/godot/pull/23542
https://github.com/godotengine/godot/issues/34533
Upstream: seems to do the opposite
Linker flag "-no-pie" is added by upstream.
rpmlint complains this violates project policy.
Patch replaces flag "-no-pie" with "-pie".
---
diff -r -U 5 a/platform/x11/detect.py b/platform/x11/detect.py
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -182,11 +182,11 @@
# Check for gcc version >= 6 before adding -no-pie
if using_gcc(env):
version = get_compiler_version(env)
if version != None and version[0] >= '6':
env.Append(CCFLAGS=['-fpie'])
- env.Append(LINKFLAGS=['-no-pie'])
+ env.Append(LINKFLAGS=['-pie'])
# Do the same for clang should be fine with Clang 4 and higher
if using_clang(env):
version = get_compiler_version(env)
if version != None and version[0] >= '4':
env.Append(CCFLAGS=['-fpie'])

View File

@ -1,51 +0,0 @@
From: cunix@bitmessage.ch
Date: 2019-04-29 16:00:00
Subject: System certs as fallback for project certs
References: https://github.com/godotengine/godot/pull/22066#issuecomment-421565719
https://github.com/godotengine/godot/pull/22066#issuecomment-422528664
https://github.com/godotengine/godot/issues/22232
Upstream: might be offered to upstream
If project has no value set for "network/ssl/certificates" (the default),
function "get_project_cert_array" returns no certificates because we don't
use builtin certs - BUILTIN_CERTS_ENABLED is not defined. Therefore the
editor shows an error.
We use a distro specific "system_certs_path" as build option and apply it here
via "_SYSTEM_CERTS_PATH" (defined in included "core/io/certs_compressed.gen.h")
as fallback for project certificates.
---
diff -r -U 5 a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -33,10 +33,12 @@
#include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h"
#include "core/os/file_access.h"
#include "core/project_settings.h"
+#include <string.h>
+
StreamPeerSSL *(*StreamPeerSSL::_create)() = NULL;
StreamPeerSSL *StreamPeerSSL::create() {
return _create();
@@ -96,10 +98,14 @@
ProjectSettings::get_singleton()->set_custom_property_info("network/ssl/certificates", PropertyInfo(Variant::STRING, "network/ssl/certificates", PROPERTY_HINT_FILE, "*.crt"));
if (certs_path != "") {
// Use certs defined in project settings.
return get_cert_file_as_array(certs_path);
+ } else if (strcmp(_SYSTEM_CERTS_PATH, "") != 0) {
+ // Use system certs only if user did not override it in project settings
+ // and if _SYSTEM_CERTS_PATH is set.
+ return get_cert_file_as_array(_SYSTEM_CERTS_PATH);
}
#ifdef BUILTIN_CERTS_ENABLED
else {
// Use builtin certs only if user did not override it in project settings.
out.resize(_certs_uncompressed_size + 1);