diff options
author | Matteo Bernardini | 2021-03-06 11:17:38 +0100 |
---|---|---|
committer | Matteo Bernardini | 2021-03-06 11:17:38 +0100 |
commit | ba295afbbb907833cfa6ac387484f96d170b9932 (patch) | |
tree | 199813d1c30184d4b602ea8b2d112792d6ab656e /games | |
parent | 3c59cb22425adf5d8a0d1a79baf00e6d9334c620 (diff) | |
download | slackbuilds-1aba4651fb533f9edf21ba7e796f965f4c941fe8.tar.gz |
20210306.1 global branch merge.current-20210306.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games')
119 files changed, 4450 insertions, 670 deletions
diff --git a/games/0ad-data/0ad-data.SlackBuild b/games/0ad-data/0ad-data.SlackBuild index ab69ec266e..213af0eaba 100644 --- a/games/0ad-data/0ad-data.SlackBuild +++ b/games/0ad-data/0ad-data.SlackBuild @@ -26,7 +26,7 @@ PRGNAM=0ad-data DATANAM=0ad -VERSION=${VERSION:-0.0.23b} +VERSION=${VERSION:-0.0.24b} RELEASE=${RELEASE:-alpha} ARCH=noarch BUILD=${BUILD:-1} diff --git a/games/0ad-data/0ad-data.info b/games/0ad-data/0ad-data.info index 1a3dd341a6..a3103e41c1 100644 --- a/games/0ad-data/0ad-data.info +++ b/games/0ad-data/0ad-data.info @@ -1,8 +1,8 @@ PRGNAM="0ad-data" -VERSION="0.0.23b" +VERSION="0.0.24b" HOMEPAGE="https://play0ad.com/" -DOWNLOAD="http://releases.wildfiregames.com/0ad-0.0.23b-alpha-unix-data.tar.xz" -MD5SUM="4eee6b207892552cd3e0a408b15c191d" +DOWNLOAD="http://releases.wildfiregames.com/0ad-0.0.24b-alpha-unix-data.tar.xz" +MD5SUM="69db2a228f1802a2e8f360bed4d21036" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/games/0ad/0ad.SlackBuild b/games/0ad/0ad.SlackBuild index 514f61c116..d8ff784b1b 100644 --- a/games/0ad/0ad.SlackBuild +++ b/games/0ad/0ad.SlackBuild @@ -25,7 +25,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=0ad -VERSION=${VERSION:-0.0.23b} +VERSION=${VERSION:-0.0.24b} RELEASE=${RELEASE:-alpha} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} @@ -72,30 +72,38 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +unset CPPFLAGS + export CFLAGS="$SLKCFLAGS" -export CXXFLAGS="$SLKCFLAGS -fpermissive" -# and yes, it's really necessary to set CPPFLAGS like this :( -export CPPFLAGS="$SLKCFLAGS -fpermissive" +export CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" export LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" +export SDL2_CONFIG="/usr/bin/sdl2-config" -# Fix boost names -sed -i 's/-mt//g' build/premake/extern_libs4.lua +# Fix boost names, include paths and remove isystem +sed -i 's|-mt||g' build/premake/extern_libs5.lua || exit 1 +sed -i 's|/usr/local/include|/usr/include|' build/premake/{extern_libs5.lua,premake5.lua} || exit 1 +sed -i 's|-isystem |-I|' build/premake/premake5/{src/tools/gcc.lua,tests/tools/test_gcc.lua} || exit 1 + +sed -i '/third_party/a #include <deque>' source/ps/CLogger.h || exit 1 +sed -i '/ps\/Profiler2/a #include <stack>' source/ps/Profiler2GPU.cpp || exit 1 #allow for ATLAS to be yes. [ "x$ATLAS" = "xyes" ]&& ATLAS="enable" # build/workspaces/update-workspaces.sh # have a root check, let's disable it. patch -p1 < $CWD/disable-root-check.patch -#apply a segfault fixing patch -#sourced from https://code.wildfiregames.com/file/data/nryu3qhun4v6uroyiqoc/PHID-FILE-osgvknec7zmfuja5xqq4/D1852.diff -patch -p2 < $CWD/D1852.diff + +echo "patch -p1 < $CWD/rust-1.50.0.patch" >> libraries/source/spidermonkey/patch.sh build/workspaces/update-workspaces.sh \ + --without-pch \ --bindir=/usr/games \ --datadir=/usr/share/games/0ad \ --libdir=/usr/lib${LIBDIRSUFFIX}/0ad \ --${ATLAS:-disable}-atlas +sed -i 's|-isystem |-I|g' build/workspaces/gcc/*.make || exit 1 + make CONFIG=Release -C build/workspaces/gcc mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/0ad diff --git a/games/0ad/0ad.info b/games/0ad/0ad.info index 848b05848e..ec46e6bed0 100644 --- a/games/0ad/0ad.info +++ b/games/0ad/0ad.info @@ -1,10 +1,10 @@ PRGNAM="0ad" -VERSION="0.0.23b" +VERSION="0.0.24b" HOMEPAGE="https://play0ad.com/" -DOWNLOAD="http://releases.wildfiregames.com/0ad-0.0.23b-alpha-unix-build.tar.xz" -MD5SUM="4fa111410ea55de7a013406ac1013668" +DOWNLOAD="http://releases.wildfiregames.com/0ad-0.0.24b-alpha-unix-build.tar.xz" +MD5SUM="c9d34029fe95d515a5284508cc1d646c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="0ad-data OpenAL enet gloox miniupnpc SDL2 libsodium" +REQUIRES="0ad-data enet fmt gloox miniupnpc" MAINTAINER="Tim Dickson" EMAIL="dickson.tim@googlemail.com" diff --git a/games/0ad/D1852.diff b/games/0ad/D1852.diff deleted file mode 100644 index 131c8210a0..0000000000 --- a/games/0ad/D1852.diff +++ /dev/null @@ -1,213 +0,0 @@ -Index: ps/trunk/source/ps/Replay.cpp -=================================================================== ---- ps/trunk/source/ps/Replay.cpp -+++ ps/trunk/source/ps/Replay.cpp -@@ -1,4 +1,4 @@ --/* Copyright (C) 2018 Wildfire Games. -+/* Copyright (C) 2019 Wildfire Games. - * This file is part of 0 A.D. - * - * 0 A.D. is free software: you can redistribute it and/or modify -@@ -72,7 +72,7 @@ - JS::RootedValue mods(cx, Mod::GetLoadedModsWithVersions(m_ScriptInterface)); - m_ScriptInterface.SetProperty(attribs, "mods", mods); - -- m_Directory = createDateIndexSubdirectory(VisualReplay::GetDirectoryName()); -+ m_Directory = createDateIndexSubdirectory(VisualReplay::GetDirectoryPath()); - debug_printf("Writing replay to %s\n", m_Directory.string8().c_str()); - - m_Stream = new std::ofstream(OsString(m_Directory / L"commands.txt").c_str(), std::ofstream::out | std::ofstream::trunc); -Index: ps/trunk/source/ps/VisualReplay.h -=================================================================== ---- ps/trunk/source/ps/VisualReplay.h -+++ ps/trunk/source/ps/VisualReplay.h -@@ -1,4 +1,4 @@ --/* Copyright (C) 2017 Wildfire Games. -+/* Copyright (C) 2019 Wildfire Games. - * This file is part of 0 A.D. - * - * 0 A.D. is free software: you can redistribute it and/or modify -@@ -29,12 +29,20 @@ - { - - /** -- * Returns the path to the sim-log directory (that contains the directories with the replay files. -- * -- * @param scriptInterface - the ScriptInterface in which to create the return data. -- * @return OsPath the absolute file path -+ * Returns the absolute path to the sim-log directory (that contains the directories with the replay files. -+ */ -+OsPath GetDirectoryPath(); -+ -+/** -+ * Returns the absolute path to the replay cache file. -+ */ -+OsPath GetCacheFilePath(); -+ -+/** -+ * Returns the absolute path to the temporary replay cache file used to -+ * always have a valid cache file in place even if bad things happen. - */ --OsPath GetDirectoryName(); -+OsPath GetTempCacheFilePath(); - - /** - * Replays the commands.txt file in the given subdirectory visually. -Index: ps/trunk/source/ps/VisualReplay.cpp -=================================================================== ---- ps/trunk/source/ps/VisualReplay.cpp -+++ ps/trunk/source/ps/VisualReplay.cpp -@@ -40,13 +40,19 @@ - */ - const u8 minimumReplayDuration = 3; - --static const OsPath tempCacheFileName = VisualReplay::GetDirectoryName() / L"replayCache_temp.json"; --static const OsPath cacheFileName = VisualReplay::GetDirectoryName() / L"replayCache.json"; -+OsPath VisualReplay::GetDirectoryPath() -+{ -+ return Paths(g_args).UserData() / "replays" / engine_version; -+} -+ -+OsPath VisualReplay::GetCacheFilePath() -+{ -+ return GetDirectoryPath() / L"replayCache.json"; -+} - --OsPath VisualReplay::GetDirectoryName() -+OsPath VisualReplay::GetTempCacheFilePath() - { -- const Paths paths(g_args); -- return OsPath(paths.UserData() / "replays" / engine_version); -+ return GetDirectoryPath() / L"replayCache_temp.json"; - } - - bool VisualReplay::StartVisualReplay(const OsPath& directory) -@@ -55,7 +61,7 @@ - ENSURE(!g_NetClient); - ENSURE(!g_Game); - -- const OsPath replayFile = VisualReplay::GetDirectoryName() / directory / L"commands.txt"; -+ const OsPath replayFile = VisualReplay::GetDirectoryPath() / directory / L"commands.txt"; - - if (!FileExists(replayFile)) - return false; -@@ -69,10 +75,10 @@ - JSContext* cx = scriptInterface.GetContext(); - JSAutoRequest rq(cx); - -- if (!FileExists(cacheFileName)) -+ if (!FileExists(GetCacheFilePath())) - return false; - -- std::ifstream cacheStream(OsString(cacheFileName).c_str()); -+ std::ifstream cacheStream(OsString(GetCacheFilePath()).c_str()); - CStr cacheStr((std::istreambuf_iterator<char>(cacheStream)), std::istreambuf_iterator<char>()); - cacheStream.close(); - -@@ -85,7 +91,7 @@ - } - - LOGWARNING("The replay cache file is corrupted, it will be deleted"); -- wunlink(cacheFileName); -+ wunlink(GetCacheFilePath()); - return false; - } - -@@ -95,12 +101,12 @@ - JSAutoRequest rq(cx); - - JS::RootedValue replaysRooted(cx, JS::ObjectValue(*replays)); -- std::ofstream cacheStream(OsString(tempCacheFileName).c_str(), std::ofstream::out | std::ofstream::trunc); -+ std::ofstream cacheStream(OsString(GetTempCacheFilePath()).c_str(), std::ofstream::out | std::ofstream::trunc); - cacheStream << scriptInterface.StringifyJSON(&replaysRooted); - cacheStream.close(); - -- wunlink(cacheFileName); -- if (wrename(tempCacheFileName, cacheFileName)) -+ wunlink(GetCacheFilePath()); -+ if (wrename(GetTempCacheFilePath(), GetCacheFilePath())) - LOGERROR("Could not store the replay cache"); - } - -@@ -139,7 +145,7 @@ - JS::RootedObject replays(cx, JS_NewArrayObject(cx, 0)); - DirectoryNames directories; - -- if (GetDirectoryEntries(GetDirectoryName(), nullptr, &directories) != INFO::OK) -+ if (GetDirectoryEntries(GetDirectoryPath(), nullptr, &directories) != INFO::OK) - return replays; - - bool newReplays = false; -@@ -155,7 +161,7 @@ - // Don't return, because we want to save our progress - break; - -- const OsPath replayFile = GetDirectoryName() / directory / L"commands.txt"; -+ const OsPath replayFile = GetDirectoryPath() / directory / L"commands.txt"; - - bool isNew = true; - replayCacheMap::iterator it = fileList.find(directory); -@@ -325,7 +331,7 @@ - JS::Value VisualReplay::LoadReplayData(const ScriptInterface& scriptInterface, const OsPath& directory) - { - // The directory argument must not be constant, otherwise concatenating will fail -- const OsPath replayFile = GetDirectoryName() / directory / L"commands.txt"; -+ const OsPath replayFile = GetDirectoryPath() / directory / L"commands.txt"; - - if (!FileExists(replayFile)) - return JS::NullValue(); -@@ -407,7 +413,7 @@ - if (replayDirectory.empty()) - return false; - -- const OsPath directory = GetDirectoryName() / replayDirectory; -+ const OsPath directory = GetDirectoryPath() / replayDirectory; - return DirectoryExists(directory) && DeleteDirectory(directory) == INFO::OK; - } - -@@ -420,7 +426,7 @@ - pCxPrivate->pScriptInterface->Eval("({})", &attribs); - - // Return empty object if file doesn't exist -- const OsPath replayFile = GetDirectoryName() / directoryName / L"commands.txt"; -+ const OsPath replayFile = GetDirectoryPath() / directoryName / L"commands.txt"; - if (!FileExists(replayFile)) - return attribs; - -@@ -483,7 +489,7 @@ - - bool VisualReplay::HasReplayMetadata(const OsPath& directoryName) - { -- const OsPath filePath(GetDirectoryName() / directoryName / L"metadata.json"); -+ const OsPath filePath(GetDirectoryPath() / directoryName / L"metadata.json"); - - if (!FileExists(filePath)) - return false; -@@ -503,7 +509,7 @@ - JSAutoRequest rq(cx); - JS::RootedValue metadata(cx); - -- std::ifstream* stream = new std::ifstream(OsString(GetDirectoryName() / directoryName / L"metadata.json").c_str()); -+ std::ifstream* stream = new std::ifstream(OsString(GetDirectoryPath() / directoryName / L"metadata.json").c_str()); - ENSURE(stream->good()); - CStr line; - std::getline(*stream, line); -Index: ps/trunk/source/ps/scripting/JSInterface_VisualReplay.cpp -=================================================================== ---- ps/trunk/source/ps/scripting/JSInterface_VisualReplay.cpp -+++ ps/trunk/source/ps/scripting/JSInterface_VisualReplay.cpp -@@ -1,4 +1,4 @@ --/* Copyright (C) 2018 Wildfire Games. -+/* Copyright (C) 2019 Wildfire Games. - * This file is part of 0 A.D. - * - * 0 A.D. is free software: you can redistribute it and/or modify -@@ -61,7 +61,7 @@ - - CStrW JSI_VisualReplay::GetReplayDirectoryName(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const CStrW& directoryName) - { -- return wstring_from_utf8(OsPath(VisualReplay::GetDirectoryName() / directoryName).string8()); -+ return wstring_from_utf8(OsPath(VisualReplay::GetDirectoryPath() / directoryName).string8()); - } - - void JSI_VisualReplay::RegisterScriptFunctions(const ScriptInterface& scriptInterface) diff --git a/games/0ad/rust-1.50.0.patch b/games/0ad/rust-1.50.0.patch new file mode 100644 index 0000000000..1652884065 --- /dev/null +++ b/games/0ad/rust-1.50.0.patch @@ -0,0 +1,40 @@ +diff -Naur mozjs-78.6.0.orig/.cargo/config.in mozjs-78.6.0/.cargo/config.in +--- mozjs-78.6.0.orig/.cargo/config.in 2020-11-28 17:33:01.000000000 +0100 ++++ mozjs-78.6.0/.cargo/config.in 2021-02-26 08:45:50.995837000 +0100 +@@ -3,9 +3,9 @@ + # Please do not edit. + + [source."https://github.com/shravanrn/nix/"] +-branch = "r0.13.1" + git = "https://github.com/shravanrn/nix/" + replace-with = "vendored-sources" ++rev = "4af6c367603869a30fddb5ffb0aba2b9477ba92e" + + [source."https://github.com/mozilla/rkv"] + git = "https://github.com/mozilla/rkv" +diff -Naur mozjs-78.6.0.orig/Cargo.lock mozjs-78.6.0/Cargo.lock +--- mozjs-78.6.0.orig/Cargo.lock 2020-11-28 17:33:01.000000000 +0100 ++++ mozjs-78.6.0/Cargo.lock 2021-02-26 08:47:06.265837000 +0100 +@@ -3200,7 +3200,7 @@ + [[package]] + name = "nix" + version = "0.13.1" +-source = "git+https://github.com/shravanrn/nix/?branch=r0.13.1#4af6c367603869a30fddb5ffb0aba2b9477ba92e" ++source = "git+https://github.com/shravanrn/nix/?rev=4af6c367603869a30fddb5ffb0aba2b9477ba92e#4af6c367603869a30fddb5ffb0aba2b9477ba92e" + dependencies = [ + "bitflags", + "cc", +diff -Naur mozjs-78.6.0.orig/Cargo.toml mozjs-78.6.0/Cargo.toml +--- mozjs-78.6.0.orig/Cargo.toml 2020-11-28 17:34:26.000000000 +0100 ++++ mozjs-78.6.0/Cargo.toml 2021-02-26 08:48:06.663837000 +0100 +@@ -60,8 +60,8 @@ + [patch.crates-io] + packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="3541e3818fdc7c2a24f87e3459151a4ce955a67a" } + rlbox_lucet_sandbox = { git = "https://github.com/PLSysSec/rlbox_lucet_sandbox/", rev="d510da5999a744c563b0acd18056069d1698273f" } +-nix = { git = "https://github.com/shravanrn/nix/", branch = "r0.13.1", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } +-spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu3", rev = "20191ad2f370afd6d247edcb9ff9da32d3bedb9c" } ++nix = { git = "https://github.com/shravanrn/nix/", rev="4af6c367603869a30fddb5ffb0aba2b9477ba92e" } ++spirv_cross = { git = "https://github.com/kvark/spirv_cross", branch = "wgpu4" } + # failure's backtrace feature might break our builds, see bug 1608157. + failure = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } + failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5fdcb6d2438bec8a6030812a80519a5" } diff --git a/games/RetroArch/RetroArch.SlackBuild b/games/RetroArch/RetroArch.SlackBuild index 256833c35a..e7d842eeef 100644 --- a/games/RetroArch/RetroArch.SlackBuild +++ b/games/RetroArch/RetroArch.SlackBuild @@ -141,6 +141,9 @@ patch -p1 < $CWD/gles.patch # Set $lib to a portable array eval "set -- $lib" +export CC=clang +export CXX=clang++ + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/games/alienarena/alienarena-7.66-no-qglBlitFramebufferEXT.patch b/games/alienarena/alienarena-7.66-no-qglBlitFramebufferEXT.patch new file mode 100644 index 0000000000..1f07e24f46 --- /dev/null +++ b/games/alienarena/alienarena-7.66-no-qglBlitFramebufferEXT.patch @@ -0,0 +1,22 @@ +diff -up alienarena-7.66/source/ref_gl/r_shadowmaps.c.no-qglBlitFramebufferEXT alienarena-7.66/source/ref_gl/r_shadowmaps.c +--- alienarena-7.66/source/ref_gl/r_shadowmaps.c.no-qglBlitFramebufferEXT 2013-11-05 14:46:37.611487279 -0500 ++++ alienarena-7.66/source/ref_gl/r_shadowmaps.c 2013-11-05 15:00:47.510933729 -0500 +@@ -95,12 +95,12 @@ void R_CheckFBOExtensions (void) + + //must check for ability to blit(Many old ATI drivers do not support) + //TODO: redundant with previous check? +- if(gl_state.hasFBOblit) { +- if(!qglBlitFramebufferEXT) { +- Com_Printf("glBlitFramebufferEXT not found...\n"); +- gl_state.hasFBOblit = false; +- } +- } ++ // if(gl_state.hasFBOblit) { ++ // if(!qglBlitFramebufferEXT) { ++ // Com_Printf("glBlitFramebufferEXT not found...\n"); ++ // gl_state.hasFBOblit = false; ++ // } ++ //} + } + + diff --git a/games/alienarena/alienarena.SlackBuild b/games/alienarena/alienarena.SlackBuild index 3241f2f1c9..1d3d42b012 100644 --- a/games/alienarena/alienarena.SlackBuild +++ b/games/alienarena/alienarena.SlackBuild @@ -29,7 +29,7 @@ TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,15 +59,19 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION-linux20130827.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$VERSION-svn4307 +tar -xvf $CWD/$PRGNAM-$VERSION-svn4307.tar.xz +cd $PRGNAM-$VERSION-svn4307 chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 < $CWD/alienarena-7.66-no-qglBlitFramebufferEXT.patch + +rm -rf source/unix/ode sed -i -e "s|crx|$PRGNAM|g" -e "s|\.codred|\.${PRGNAM}|g" Tools/LinuxScripts/* @@ -83,7 +87,7 @@ CXXFLAGS="$SLKCFLAGS" \ --with-zlib \ --enable-ansi-color \ --with-system-libode \ - --with-xf86dga \ + --without-xf86dga \ --with-icondir=/usr/share/pixmaps \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux @@ -91,13 +95,13 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/share/applications install -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications -cp -a COPYING Tools/* $PKG/usr/doc/$PRGNAM-$VERSION +cp -a Tools/* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild find $PKG/usr/doc -type f -exec chmod 0644 '{}' \; diff --git a/games/alienarena/alienarena.info b/games/alienarena/alienarena.info index a1fff59833..30878e5abc 100644 --- a/games/alienarena/alienarena.info +++ b/games/alienarena/alienarena.info @@ -1,8 +1,8 @@ PRGNAM="alienarena" VERSION="7.66" HOMEPAGE="http://icculus.org/alienarena/rpa/" -DOWNLOAD="http://red.planetarena.org/files/alienarena-7.66-linux20130827.tar.gz" -MD5SUM="50928622f614ccd9938943de5fd37c1a" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/alienarena-7.66-svn4307.tar.xz" +MD5SUM="bdaa12739a196df9fc1abc18a9ccfbbe" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="OpenAL ode" diff --git a/games/alienarena/checkout_code.sh b/games/alienarena/checkout_code.sh new file mode 100644 index 0000000000..d78a5c0e1a --- /dev/null +++ b/games/alienarena/checkout_code.sh @@ -0,0 +1,6 @@ +svn co svn://svn.icculus.org/alienarena/trunk +cd trunk +svn update -r 4307 +cd .. +mv trunk alienarena-7.66-svn4307 +tar --exclude-vcs -cJf alienarena-7.66-svn4307.tar.xz alienarena-7.66-svn4307 diff --git a/games/arx-libertatis/arx-libertatis-1.1.2-cmake3.5.patch b/games/arx-libertatis/arx-libertatis-1.1.2-cmake3.5.patch deleted file mode 100644 index 98f05e38cf..0000000000 --- a/games/arx-libertatis/arx-libertatis-1.1.2-cmake3.5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./cmake/VersionString.cmake.orig ./cmake/VersionString.cmake ---- ./cmake/VersionString.cmake.orig 2016-03-22 19:18:55.656290322 +0200 -+++ ./cmake/VersionString.cmake 2016-03-22 19:19:08.239813098 +0200 -@@ -33,7 +33,7 @@ function(version_file SRC DST VERSION_SO - - foreach(arg IN LISTS VERSION_SOURCES) - -- if(mode STREQUAL "variable") -+ if("${mode}" STREQUAL "variable") - set(mode "file") - else() - get_filename_component(arg "${arg}" ABSOLUTE) diff --git a/games/arx-libertatis/arx-libertatis.SlackBuild b/games/arx-libertatis/arx-libertatis.SlackBuild index 4ea8ad7a4f..7e6b7133b2 100644 --- a/games/arx-libertatis/arx-libertatis.SlackBuild +++ b/games/arx-libertatis/arx-libertatis.SlackBuild @@ -23,7 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=arx-libertatis -VERSION=${VERSION:-1.1.2} +VERSION=${VERSION:-1.2_dev_2019_07_22} +SRCVER=$(echo $VERSION | tr _ - ) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -59,9 +60,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.xz +cd $PRGNAM-$SRCVER chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,9 +70,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix build with cmake3.5 (patch thanks to Mageia) -patch -p1 < $CWD/arx-libertatis-1.1.2-cmake3.5.patch - mkdir -p build cd build cmake \ @@ -97,7 +95,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ARX_PUBLIC_LICENSE.txt AUTHORS CHANGELOG *.md VERSION $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE* AUTHORS CHANGELOG *.md COPYING VERSION $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/arx-libertatis/arx-libertatis.info b/games/arx-libertatis/arx-libertatis.info index f0955d2d2b..536e92699a 100644 --- a/games/arx-libertatis/arx-libertatis.info +++ b/games/arx-libertatis/arx-libertatis.info @@ -1,10 +1,10 @@ PRGNAM="arx-libertatis" -VERSION="1.1.2" +VERSION="1.2_dev_2019_07_22" HOMEPAGE="http://arx-libertatis.org" -DOWNLOAD="http://downloads.sourceforge.net/project/arx/arx-libertatis-1.1.2/arx-libertatis-1.1.2.tar.xz" -MD5SUM="543dfdaaaaf7c337227c1b6a3087589a" +DOWNLOAD="https://arx-libertatis.org/files/snapshots/arx-libertatis-1.2-dev-2019-07-22/arx-libertatis-1.2-dev-2019-07-22.tar.xz" +MD5SUM="eda328e8cf753678e924b3bd9c629d79" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="OpenAL zenity" +REQUIRES="OpenAL glm zenity" MAINTAINER="Dimitris Zlatanidis" EMAIL="d.zlatanidis@gmail.com" diff --git a/games/assaultcube/assaultcube-gcc6.patch b/games/assaultcube/assaultcube-gcc6.patch new file mode 100644 index 0000000000..521372ee9d --- /dev/null +++ b/games/assaultcube/assaultcube-gcc6.patch @@ -0,0 +1,301 @@ +From 752950989b4e286459ca9aee3d61a868d7b20fa4 Mon Sep 17 00:00:00 2001 +From: ac-stef <ac_stef@users.sf.net> +Date: Sat, 27 Feb 2016 21:28:23 +0100 +Subject: [PATCH] fix some errors and warnings for GCC 6 + +* do not use std::abs() because math.h includes one, that converts ints + to double. Use own iabs(), which directly uses labs() instead. +* don't use the word "gamma" as name for variables +* don't use a homebrew round() function +--- + source/src/bot/bot_waypoint.cpp | 12 ++++++------ + source/src/command.cpp | 2 +- + source/src/command.h | 1 + + source/src/crypto.cpp | 2 +- + source/src/editing.cpp | 6 +++--- + source/src/entity.h | 2 +- + source/src/main.cpp | 8 ++++---- + source/src/platform.h | 9 +-------- + source/src/protos.h | 3 ++- + source/src/rendercubes.cpp | 8 ++++---- + source/src/rendertext.cpp | 4 ++-- + source/src/tools.h | 3 +-- + source/src/world.cpp | 6 +++--- + source/src/worldocull.cpp | 2 +- + source/src/worldrender.cpp | 4 ++-- + 15 files changed, 33 insertions(+), 39 deletions(-) + +diff --git a/source/src/bot/bot_waypoint.cpp b/source/src/bot/bot_waypoint.cpp +index 520c686..7b265ef 100644 +--- a/source/src/bot/bot_waypoint.cpp ++++ b/source/src/bot/bot_waypoint.cpp +@@ -1221,7 +1221,7 @@ void CWaypointClass::CalcCost(node_s *pNode) + flCost += (1.0f-flFraction)*0.5f; + } + +- if ((abs(a) > 4) || (abs(b) > 4)) continue; ++ if ((iabs(a) > 4) || (iabs(b) > 4)) continue; + + vec from = to; + to.z -= (JUMP_HEIGHT - 1.0f); +@@ -1249,7 +1249,7 @@ void CWaypointClass::CalcCost(node_s *pNode) + flCost += (1.0f-flFraction)*0.5f; + } + +- if ((abs(a) > 4) || (abs(b) > 4)) continue; ++ if ((iabs(a) > 4) || (iabs(b) > 4)) continue; + + vec from = to; + to.z -= (JUMP_HEIGHT - 1.0f); +@@ -1671,12 +1671,12 @@ node_s *CWaypointClass::GetNearestTriggerFloodWP(vec v_origin, float flRange) + void CWaypointClass::GetNodeIndexes(const vec &v_origin, short *i, short *j) + { + // Function code by cheesy and PMB +- //*i = abs((int)((int)(v_origin.x + (2*ssize)) / SECTOR_SIZE)); +- //*j = abs((int)((int)(v_origin.y + (2*ssize)) / SECTOR_SIZE)); ++ //*i = iabs((int)((int)(v_origin.x + (2*ssize)) / SECTOR_SIZE)); ++ //*j = iabs((int)((int)(v_origin.y + (2*ssize)) / SECTOR_SIZE)); + //*i = (int)((v_origin.x) / ssize * MAX_MAP_GRIDS); + //*j = (int)((v_origin.y) / ssize * MAX_MAP_GRIDS); +- *i = abs((int)((v_origin.x) / MAX_MAP_GRIDS)); +- *j = abs((int)((v_origin.y) / MAX_MAP_GRIDS)); ++ *i = iabs((int)((v_origin.x) / MAX_MAP_GRIDS)); ++ *j = iabs((int)((v_origin.y) / MAX_MAP_GRIDS)); + + if (*i > MAX_MAP_GRIDS - 1) + *i = MAX_MAP_GRIDS - 1; +diff --git a/source/src/command.cpp b/source/src/command.cpp +index 668f3bf..2a5c90d 100644 +--- a/source/src/command.cpp ++++ b/source/src/command.cpp +@@ -499,7 +499,7 @@ char *executeret(const char *p) // all evaluation hap + if(lc<=seer_t1.length()) + { + int dt = seer_t1[seer_index] - seer_t1[lc]; +- if(abs(dt)<2) ++ if(iabs(dt)<2) + { + conoutf("SCRIPT EXECUTION warning [%d:%s]", &p, p); + seer_t2.add(seer_t1[seer_index]); +diff --git a/source/src/command.h b/source/src/command.h +index a3ca68a..2a3de0c 100644 +--- a/source/src/command.h ++++ b/source/src/command.h +@@ -86,6 +86,7 @@ enum { IEXC_CORE = 0, IEXC_CFG, IEXC_PROMPT, IEXC_MAPCFG, IEXC_MDLCFG, IEXC_NUM + #define VARNP(name, global, min, cur, max) int global = variable(#name, min, cur, max, &global, NULL, true) + #define VARF(name, min, cur, max, body) extern int name; void var_##name() { body; } int name = variable(#name, min, cur, max, &name, var_##name, false) + #define VARFP(name, min, cur, max, body) extern int name; void var_##name() { body; } int name = variable(#name, min, cur, max, &name, var_##name, true) ++#define VARNFP(name, global, min, cur, max, body) extern int global; void var_##name() { body; } int global = variable(#name, min, cur, max, &global, var_##name, true) + + #define FVARP(name, min, cur, max) float name = fvariable(#name, min, cur, max, &name, NULL, true) + #define FVAR(name, min, cur, max) float name = fvariable(#name, min, cur, max, &name, NULL, false) +diff --git a/source/src/crypto.cpp b/source/src/crypto.cpp +index 44041be..0684750 100644 +--- a/source/src/crypto.cpp ++++ b/source/src/crypto.cpp +@@ -778,7 +778,7 @@ static const char *hashchunktoa(tiger::chunk h) // portable solution instead o + const char *genpwdhash(const char *name, const char *pwd, int salt) + { + static string temp; +- formatstring(temp)("%s %d %s %s %d", pwd, salt, name, pwd, abs(PROTOCOL_VERSION)); ++ formatstring(temp)("%s %d %s %s %d", pwd, salt, name, pwd, iabs(PROTOCOL_VERSION)); + tiger::hashval hash; + tiger::hash((uchar *)temp, (int)strlen(temp), hash); + formatstring(temp)("%s %s %s", hashchunktoa(hash.chunks[0]), hashchunktoa(hash.chunks[1]), hashchunktoa(hash.chunks[2])); +diff --git a/source/src/editing.cpp b/source/src/editing.cpp +index 8d5e1ff..745aa98 100644 +--- a/source/src/editing.cpp ++++ b/source/src/editing.cpp +@@ -137,11 +137,11 @@ void checkselections() + void makesel(bool isnew) + { + block &cursel = sels.last(); //RR 10/12/12 - FIXEME, error checking should happen with "isnew", not here checking if it really is new. +- if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch)); ++ if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), iabs(lastx-cx)+1, iabs(lasty-cy)+1, max(lasth, ch)); + else + { + cursel.x = min(lastx, cx); cursel.y = min(lasty, cy); +- cursel.xs = abs(lastx-cx)+1; cursel.ys = abs(lasty-cy)+1; ++ cursel.xs = iabs(lastx-cx)+1; cursel.ys = iabs(lasty-cy)+1; + cursel.h = max(lasth, ch); + correctsel(cursel); + } +@@ -849,7 +849,7 @@ void movemap(int xo, int yo, int zo) // move whole map + } + if(xo || yo) + { +- block b = { max(-xo, 0), max(-yo, 0), ssize - abs(xo), ssize - abs(yo) }, *cp = blockcopy(b); ++ block b = { max(-xo, 0), max(-yo, 0), ssize - iabs(xo), ssize - iabs(yo) }, *cp = blockcopy(b); + cp->x = max(xo, 0); + cp->y = max(yo, 0); + blockpaste(*cp); +diff --git a/source/src/entity.h b/source/src/entity.h +index e2ad32d..84ac385 100644 +--- a/source/src/entity.h ++++ b/source/src/entity.h +@@ -538,7 +538,7 @@ class playerent : public dynent, public playerstate + { + const int maxskin[2] = { 4, 6 }; + t = team_base(t < 0 ? team : t); +- nextskin[t] = abs(s) % maxskin[t]; ++ nextskin[t] = iabs(s) % maxskin[t]; + } + }; + +diff --git a/source/src/main.cpp b/source/src/main.cpp +index 0d57c0c..c51cd74 100644 +--- a/source/src/main.cpp ++++ b/source/src/main.cpp +@@ -519,11 +519,11 @@ void setresdata(char *s, enet_uint32 c) + COMMANDF(screenres, "ii", (int *w, int *h) { screenres(*w, *h); }); + + static int curgamma = 100; +-VARFP(gamma, 30, 100, 300, ++VARNFP(gamma, vgamma, 30, 100, 300, + { +- if(gamma == curgamma) return; +- curgamma = gamma; +- float f = gamma/100.0f; ++ if(vgamma == curgamma) return; ++ curgamma = vgamma; ++ float f = vgamma/100.0f; + if(SDL_SetGamma(f,f,f)==-1) conoutf("Could not set gamma: %s", SDL_GetError()); + }); + +diff --git a/source/src/platform.h b/source/src/platform.h +index aece7e2..fd2eef1 100644 +--- a/source/src/platform.h ++++ b/source/src/platform.h +@@ -2,14 +2,6 @@ + #ifdef _FORTIFY_SOURCE + #undef _FORTIFY_SOURCE + #endif +- +- #define gamma __gamma +-#endif +- +-#include <math.h> +- +-#ifdef __GNUC__ +- #undef gamma + #endif + + #include <string.h> +@@ -19,6 +11,7 @@ + #include <ctype.h> + #include <time.h> + #include <limits.h> ++#include <math.h> + #ifdef __GNUC__ + #include <new> + #include <signal.h> +diff --git a/source/src/protos.h b/source/src/protos.h +index 1c07fad..97b0ee0 100644 +--- a/source/src/protos.h ++++ b/source/src/protos.h +@@ -1053,7 +1053,8 @@ struct servercommandline + { + demo_interm = true; + } +- else if(ai > 0) maxdemos = ai; break; ++ else if(ai > 0) maxdemos = ai; ++ break; + } + case 'W': demopath = a; break; + case 'r': maprot = a; break; +diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp +index 1940da8..2be7fb0 100644 +--- a/source/src/rendercubes.cpp ++++ b/source/src/rendercubes.cpp +@@ -216,9 +216,9 @@ void render_flat(int wtex, int x, int y, int size, int h, sqr *l1, sqr *l4, sqr + else // continue strip + { + int lighterr = lighterror*2; +- if((abs(ol1r-l3->r)<lighterr && abs(ol2r-l4->r)<lighterr // skip vertices if light values are close enough +- && abs(ol1g-l3->g)<lighterr && abs(ol2g-l4->g)<lighterr +- && abs(ol1b-l3->b)<lighterr && abs(ol2b-l4->b)<lighterr) || !wtex) ++ if((iabs(ol1r-l3->r)<lighterr && iabs(ol2r-l4->r)<lighterr // skip vertices if light values are close enough ++ && iabs(ol1g-l3->g)<lighterr && iabs(ol2g-l4->g)<lighterr ++ && iabs(ol1b-l3->b)<lighterr && iabs(ol2b-l4->b)<lighterr) || !wtex) + { + verts.setsize(verts.length()-2); + nquads--; +@@ -375,7 +375,7 @@ void render_square(int wtex, float floor1, float floor2, float ceil1, float ceil + { + int lighterr = lighterror*2; + if((!hf && !ohf) +- && ((abs(ol1r-l2->r)<lighterr && abs(ol1g-l2->g)<lighterr && abs(ol1b-l2->b)<lighterr) || !wtex)) // skip vertices if light values are close enough ++ && ((iabs(ol1r-l2->r)<lighterr && iabs(ol1g-l2->g)<lighterr && iabs(ol1b-l2->b)<lighterr) || !wtex)) // skip vertices if light values are close enough + { + verts.setsize(verts.length()-2); + nquads--; +diff --git a/source/src/rendertext.cpp b/source/src/rendertext.cpp +index 0ed23af..b55da4f 100644 +--- a/source/src/rendertext.cpp ++++ b/source/src/rendertext.cpp +@@ -330,7 +330,7 @@ static void text_color(char c, char *stack, int size, int &sp, bvec color, int a + if(c=='r') c = stack[(sp > 0) ? --sp : sp]; // restore color + else if(c == 'b') { if(allowblinkingtext && !ignoreblinkingbit) stack[sp] *= -1; } // blinking text - only if allowed + else stack[sp] = c; +- switch(abs(stack[sp])) ++ switch(iabs(stack[sp])) + { + case '0': color = bvec( 2, 255, 128 ); break; // green: player talk + case '1': color = bvec( 96, 160, 255 ); break; // blue: team chat +@@ -380,7 +380,7 @@ static void text_color(char c, char *stack, int size, int &sp, bvec color, int a + //default: color = bvec( 255, 255, 255 ); break; + } + int b = (int) (sinf(lastmillis / 200.0f) * 115.0f); +- b = stack[sp] > 0 ? 100 : min(abs(b), 100); ++ b = stack[sp] > 0 ? 100 : min(iabs(b), 100); + glColor4ub(color.x, color.y, color.z, (a * b) / 100); + } + } +diff --git a/source/src/tools.h b/source/src/tools.h +index 0aeacff..9eb5a38 100644 +--- a/source/src/tools.h ++++ b/source/src/tools.h +@@ -54,8 +54,7 @@ static inline T min(T a, T b) + { + return a < b ? a : b; + } +- +-static inline float round(float x) { return floor(x + 0.5f); } ++inline int iabs(int n) { return labs(n); } + + #define clamp(a,b,c) (max(b, min(a, c))) + #define rnd(x) ((int)(randomMT()&0xFFFFFF)%(x)) +diff --git a/source/src/world.cpp b/source/src/world.cpp +index 6a1c7bb..99a70eb 100644 +--- a/source/src/world.cpp ++++ b/source/src/world.cpp +@@ -79,9 +79,9 @@ void remip(const block &b, int level) + || o[i]->ceil!=o[3]->ceil + || o[i]->ftex!=o[3]->ftex + || o[i]->ctex!=o[3]->ctex +- || abs(o[i+1]->r-o[0]->r)>lighterr // perfect mip even if light is not exactly equal +- || abs(o[i+1]->g-o[0]->g)>lighterr +- || abs(o[i+1]->b-o[0]->b)>lighterr ++ || iabs(o[i+1]->r-o[0]->r)>lighterr // perfect mip even if light is not exactly equal ++ || iabs(o[i+1]->g-o[0]->g)>lighterr ++ || iabs(o[i+1]->b-o[0]->b)>lighterr + || o[i]->utex!=o[3]->utex + || o[i]->wtex!=o[3]->wtex) goto c; + } +diff --git a/source/src/worldrender.cpp b/source/src/worldrender.cpp +index 8fd3104..45aa606 100644 +--- a/source/src/worldrender.cpp ++++ b/source/src/worldrender.cpp +@@ -297,10 +297,10 @@ void distlod(int &low, int &high, int angle, float widef) + void render_world(float vx, float vy, float vh, float changelod, int yaw, int pitch, float fov, float fovy, int w, int h) + { + loopi(LARGEST_FACTOR) stats[i] = 0; +- min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+abs(pitch)/12; ++ min_lod = minimap || (player1->isspectating() && player1->spectatemode == SM_OVERVIEW) ? MAX_LOD : MIN_LOD+iabs(pitch)/12; + yaw = 360-yaw; + float widef = fov/75.0f; +- int cdist = abs(yaw%90-45); ++ int cdist = iabs(yaw%90-45); + if(cdist<7) // hack to avoid popup at high fovs at 45 yaw + { + min_lod = max(min_lod, (int)(MIN_LOD+(10-cdist)/1.0f*widef)); // less if lod worked better diff --git a/games/assaultcube/assaultcube.SlackBuild b/games/assaultcube/assaultcube.SlackBuild index 0f5f023de6..21563e48f1 100644 --- a/games/assaultcube/assaultcube.SlackBuild +++ b/games/assaultcube/assaultcube.SlackBuild @@ -67,6 +67,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/assaultcube-gcc6.patch + # Use custom SLKCFLAGS, remove end-of-line encoding and remove precompiled binaries. patch -p1 < $CWD/Makefile.patch sed -i 's/\r//g' changelog.txt diff --git a/games/berusky2/berusky2.SlackBuild b/games/berusky2/berusky2.SlackBuild index c6021d1496..eee4fade35 100644 --- a/games/berusky2/berusky2.SlackBuild +++ b/games/berusky2/berusky2.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=berusky2 -VERSION=${VERSION:-0.10} +VERSION=${VERSION:-20170630_974e2e5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -60,7 +60,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -69,6 +69,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +autoreconf -fi + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/games/berusky2/berusky2.info b/games/berusky2/berusky2.info index 58aeeb1346..7db48900d1 100644 --- a/games/berusky2/berusky2.info +++ b/games/berusky2/berusky2.info @@ -1,8 +1,8 @@ PRGNAM="berusky2" -VERSION="0.10" +VERSION="20170630_974e2e5" HOMEPAGE="http://anakreon.cz/?q=node/2" -DOWNLOAD="http://downloads.sourceforge.net/project/berusky2/berusky2-0.10/berusky2-0.10.tar.gz" -MD5SUM="3c2d5217f7a61a6fbc13d689b88ec4e4" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/berusky2-20170630_974e2e5.tar.xz" +MD5SUM="f4a1306eeff8a38591898cafa6d1934d" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="freealut berusky2-data" diff --git a/games/blobwars/blobwars.SlackBuild b/games/blobwars/blobwars.SlackBuild index 1808f6e6e5..14df961364 100644 --- a/games/blobwars/blobwars.SlackBuild +++ b/games/blobwars/blobwars.SlackBuild @@ -63,7 +63,7 @@ sed -i "s_blobwars/man_blobwars-$VERSION/man_" data/titleWidgets #doc dir fixed for slackware and help display bug. #note. the trailing / on the first make command is intentional. -make USEPAK=1 CFLAGS="$SLKCFLAGS" DOCDIR="/usr/doc/$PRGNAM-$VERSION/" +make USEPAK=1 CFLAGS="$SLKCFLAGS -Wno-error=format-truncation=" DOCDIR="/usr/doc/$PRGNAM-$VERSION/" make install USEPAK=1 DESTDIR=$PKG DOCDIR="/usr/doc/$PRGNAM-$VERSION" find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/games/bloodfrontier/bloodfrontier.SlackBuild b/games/bloodfrontier/bloodfrontier.SlackBuild index 0f85e8fca2..2470383f75 100644 --- a/games/bloodfrontier/bloodfrontier.SlackBuild +++ b/games/bloodfrontier/bloodfrontier.SlackBuild @@ -64,7 +64,7 @@ sed -i "s|X11R6/lib|lib${LIBDIRSUFFIX} -lX11|" src/Makefile make -C src \ CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS -Wno-narrowing" \ LDFLAGS="$SLKLDFLAGS" mkdir -p $PKG/usr/bin $PKG/usr/lib${LIBDIRSUFFIX}/bloodfrontier/bin diff --git a/games/brainparty/brainparty.SlackBuild b/games/brainparty/brainparty.SlackBuild index 71770366d2..8536a94331 100644 --- a/games/brainparty/brainparty.SlackBuild +++ b/games/brainparty/brainparty.SlackBuild @@ -51,6 +51,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Thanks debian +patch -p1 < $CWD/patches/gcc-6.patch + # Save directory patch. Data directory patch. Use custom SLKCFLAGS. patch -p1 < $CWD/patches/brainparty-0.5-savegame.patch patch -p1 < $CWD/patches/brainparty-0.5-data-directory.patch diff --git a/games/brainparty/patches/gcc-6.patch b/games/brainparty/patches/gcc-6.patch new file mode 100644 index 0000000000..67dfadd540 --- /dev/null +++ b/games/brainparty/patches/gcc-6.patch @@ -0,0 +1,47 @@ +Description: Fix FTBFS on GCC 6 by removing use of hash_set class +Author: James Cowgill <jcowgill@debian.org> +Bug-Debian: https://bugs.debian.org/811885 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/WordList.h ++++ b/WordList.h +@@ -18,24 +18,11 @@ + #ifndef __WORDLIST_H__ + #define __WORDLIST_H__ + ++#include <string> + #include <vector> +-#include <ext/hash_set> ++#include <unordered_set> + +-using namespace std; +-using namespace __gnu_cxx; +- +-namespace __gnu_cxx +-{ +- template<> struct hash< std::string > +- { +- size_t operator()( const std::string& x ) const +- { +- return hash< const char* >()( x.c_str() ); +- } +- }; +-} +- +-typedef hash_set<string, hash<string> > string_hash_set; ++typedef std::unordered_set<std::string> string_hash_set; + + class WordList { + private: +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,9 @@ else + OSXCOMPAT = + endif + ++# enable c++11 ++CXXFLAGS += -std=c++11 ++ + # object files have corresponding source files + CXX = g++ + diff --git a/games/chroma/chroma.SlackBuild b/games/chroma/chroma.SlackBuild index f46788b147..420528367e 100644 --- a/games/chroma/chroma.SlackBuild +++ b/games/chroma/chroma.SlackBuild @@ -11,7 +11,7 @@ TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -22,8 +22,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -46,10 +46,13 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Removed some inline declarations (incompatible with newer versions of gcc) +patch -p1 < $CWD/gcc.patch CFLAGS="$SLKCFLAGS" \ ./configure \ @@ -61,7 +64,7 @@ CFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/share/{applications,pixmaps} diff --git a/games/chroma/gcc.patch b/games/chroma/gcc.patch new file mode 100644 index 0000000000..22ef1b2ea7 --- /dev/null +++ b/games/chroma/gcc.patch @@ -0,0 +1,30 @@ +diff -Naur chroma-1.15.orig/sdlshadowdisplay.c chroma-1.15/sdlshadowdisplay.c +--- chroma-1.15.orig/sdlshadowdisplay.c 2013-04-20 08:07:00.000000000 +0200 ++++ chroma-1.15/sdlshadowdisplay.c 2017-08-02 12:07:56.327010753 +0200 +@@ -88,7 +88,7 @@ + void displayshadowed_level(struct level* plevel); + void displayshadowed_movers(struct level* plevel, int redraw); + +-inline void displayshadowed_piece(struct level* plevel, int p, int x, int y, int d) ++void displayshadowed_piece(struct level* plevel, int p, int x, int y, int d) + { + SDL_Surface *pimage; + +@@ -255,7 +255,7 @@ + } + } + +-inline void displayshadowed_pieceshadow(struct level* plevel, int p, int x, int y, int d) ++void displayshadowed_pieceshadow(struct level* plevel, int p, int x, int y, int d) + { + SDL_Surface *pimage; + +@@ -310,7 +310,7 @@ + SDL_BlitSurface(pimage, &srect, screen_surface, &drect); + } + +-inline void displayshadowed_piecebase(struct level* plevel, int x, int y) ++void displayshadowed_piecebase(struct level* plevel, int x, int y) + { + int p; + SDL_Surface *pimage; diff --git a/games/crrcsim/crrcsim.SlackBuild b/games/crrcsim/crrcsim.SlackBuild index ab12c3bab1..67fc8d4734 100644 --- a/games/crrcsim/crrcsim.SlackBuild +++ b/games/crrcsim/crrcsim.SlackBuild @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# https://aur.archlinux.org/packages/crrcsim/#comment-668700 +patch -p1 < $CWD/fix_bug.patch + # Boost libraries are now threadsafe; -mt has been dropped sed -i 's/boost_thread-mt/boost_thread/g' configure.ac ./autogen.sh diff --git a/games/crrcsim/fix_bug.patch b/games/crrcsim/fix_bug.patch new file mode 100644 index 0000000000..b8eadeece9 --- /dev/null +++ b/games/crrcsim/fix_bug.patch @@ -0,0 +1,12 @@ +diff -ru crrcsim-0.9.13.old/src/mod_video/crrc_animation.cpp crrcsim-0.9.13/src/mod_video/crrc_animation.cpp +--- crrcsim-0.9.13.old/src/mod_video/crrc_animation.cpp 2016-04-10 09:57:14.000000000 -0700 ++++ crrcsim-0.9.13/src/mod_video/crrc_animation.cpp 2018-10-30 16:13:09.055770007 -0700 +@@ -84,7 +84,7 @@ + else + { + std::cerr << "createAnimation: unknown animation type \'" +- << type << "\'" << std::cerr; ++ << type << "\'" << std::endl; + } + + if (anim != NULL) diff --git a/games/desmume/desmume.SlackBuild b/games/desmume/desmume.SlackBuild index 4e5fec368b..c410fec43c 100644 --- a/games/desmume/desmume.SlackBuild +++ b/games/desmume/desmume.SlackBuild @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=desmume -VERSION=${VERSION:-0.9.11} +VERSION=${VERSION:-20190129_3e73a55} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -60,7 +60,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -69,16 +69,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix end-of-line encoding. -for i in AUTHORS; do - cp -a $i ${i}.new - sed -i 's/\r//' ${i}.new - touch -r $i ${i}.new - mv ${i}.new $i -done +# https://github.com/TASVideos/desmume -# Fix missing header. -patch -p1 < $CWD/osmesa-header-fix.patch +cd $PRGNAM/src/frontend/posix +./autogen.sh CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -88,7 +82,6 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --enable-osmesa \ --enable-hud \ - --enable-gdb-stub \ --enable-wifi \ --enable-openal \ --enable-glade \ @@ -99,6 +92,8 @@ CXXFLAGS="$SLKCFLAGS" \ make make install DESTDIR=$PKG +cd ../../.. + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -106,7 +101,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS ChangeLog COPYING INSTALL README README.LIN ds*.txt \ + AUTHORS ChangeLog COPYING README README.LIN doc/ds*.txt \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/games/desmume/desmume.info b/games/desmume/desmume.info index b06dd8381e..3cbebdfbd0 100644 --- a/games/desmume/desmume.info +++ b/games/desmume/desmume.info @@ -1,8 +1,8 @@ PRGNAM="desmume" -VERSION="0.9.11" +VERSION="20190129_3e73a55" HOMEPAGE="http://desmume.org/" -DOWNLOAD="http://downloads.sourceforge.net/desmume/desmume-0.9.11.tar.gz" -MD5SUM="269b5d4ddc5715720469a9d0efc53044" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/desmume-20190129_3e73a55.tar.xz" +MD5SUM="d198b000834ed0e13a73051caa91ec7c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="OpenAL agg gtkglext soundtouch zziplib" diff --git a/games/desmume/osmesa-header-fix.patch b/games/desmume/osmesa-header-fix.patch deleted file mode 100644 index 7ba5bd070f..0000000000 --- a/games/desmume/osmesa-header-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur desmume-0.9.11.orig/src/gtk/osmesa_3Demu.cpp desmume-0.9.11/src/gtk/osmesa_3Demu.cpp ---- desmume-0.9.11.orig/src/gtk/osmesa_3Demu.cpp 2015-02-14 15:05:26.000000000 +0000 -+++ desmume-0.9.11/src/gtk/osmesa_3Demu.cpp 2015-05-09 02:00:11.279367208 +0000 -@@ -20,6 +20,7 @@ - - #ifdef HAVE_LIBOSMESA - #include <stdlib.h> -+#include <stdio.h> - #include <GL/osmesa.h> - #include "../OGLRender.h" - #include "osmesa_3Demu.h" diff --git a/games/dolphin-emu/dolphin-emu.SlackBuild b/games/dolphin-emu/dolphin-emu.SlackBuild index a254bf93aa..8d72963747 100644 --- a/games/dolphin-emu/dolphin-emu.SlackBuild +++ b/games/dolphin-emu/dolphin-emu.SlackBuild @@ -23,8 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=dolphin-emu -VERSION=${VERSION:-5.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-20181020_9c9d598} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then diff --git a/games/dolphin-emu/dolphin-emu.info b/games/dolphin-emu/dolphin-emu.info index 657b8e5cf0..43c7412c5e 100644 --- a/games/dolphin-emu/dolphin-emu.info +++ b/games/dolphin-emu/dolphin-emu.info @@ -1,10 +1,10 @@ PRGNAM="dolphin-emu" -VERSION="5.0" +VERSION="20181020_9c9d598" HOMEPAGE="https://dolphin-emu.org/" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="https://github.com/dolphin-emu/dolphin/archive/5.0/dolphin-5.0.tar.gz" -MD5SUM_x86_64="ed94272956adbec690808f6e4d8ff065" +DOWNLOAD_x86_64="http://ponce.cc/slackware/sources/repo/dolphin-20181020_9c9d598.tar.xz" +MD5SUM_x86_64="1d8b06556e7622fd404049fbb90849db" REQUIRES="" MAINTAINER="Larry Hajali" EMAIL="larryhaja[at]gmail[dot]com" diff --git a/games/etlegacy-from-source/README b/games/etlegacy-from-source/README new file mode 100644 index 0000000000..4d6185212f --- /dev/null +++ b/games/etlegacy-from-source/README @@ -0,0 +1,25 @@ +Wolfenstein Enemy Territory: Legacy is a project that aims to create +a fully compatible client and server for the popular online FPS game +Wolfenstein: Enemy Territory. + +It's based on its source code released under the GPLv3 license. + +The main goal of this project is to fix bugs, remove old dependencies +and make it playable on all major operating systems while still +remaining compatible with the ET 2.60b version and as many of its mods +as possible. + +This script builds the server with omni-bot support (x86 32bit only). +(http://www.omni-bot.com/) + +To play you *need* also the data files from the original game +(etlegacy-data). + +* WARNING * + +To have a client/server compatible with the existing ones (to play +on the existing online servers), build it on/for a 32bit platform. + +This version of the game is built from source: the resulting package +conflicts with the etlegacy SlackBuild you can find on SBo so install +only one of the two. diff --git a/games/etlegacy-from-source/doinst.sh b/games/etlegacy-from-source/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/games/etlegacy-from-source/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/games/etlegacy-from-source/etlegacy-from-source.SlackBuild b/games/etlegacy-from-source/etlegacy-from-source.SlackBuild new file mode 100644 index 0000000000..a5ebca6e9e --- /dev/null +++ b/games/etlegacy-from-source/etlegacy-from-source.SlackBuild @@ -0,0 +1,186 @@ +#!/bin/sh + +# Slackware build script for etlegacy-from-source +# Copyright 2013-2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=etlegacy-from-source +SRCNAM=etlegacy +VERSION=${VERSION:-20201029_886f0ef} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i*86) ARCH=i686 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +w_omnibot=1 +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=core2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + w_omnibot=0 +else + SLKCFLAGS="-O2" + w_omnibot=0 +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Fix location of the omnibot.zip, man install path +# and leave the relative path to binaries off +sed -i "s|share/man|man|" CMakeLists.txt +sed -i "s|^\.\/etl|etl|" misc/etl_bot.sh misc/etlded_bot.sh + +mkdir -p build/legacy +cd build + cp -a $CWD/omnibot-linux-latest.tar.gz legacy/ + cp -a $CWD/wolfadmin.tar.gz legacy/ + # We have to use bundled lua and sdl + cmake \ + -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX="/usr" \ + -DINSTALL_DEFAULT_BINDIR="bin" \ + -DINSTALL_DEFAULT_MODDIR="share/$SRCNAM" \ + -DINSTALL_DEFAULT_BASEDIR="/usr/share/$SRCNAM" \ + -DBUILD_CLIENT=1 \ + -DBUILD_SERVER=1 \ + -DBUILD_MOD=1 \ + -DBUILD_MOD_PK3=1 \ + -DBUILD_PAK3_PK3=1 \ + -DFEATURE_CURL=1 \ + -DFEATURE_OGG_VORBIS=1 \ + -DFEATURE_THEORA=1 \ + -DFEATURE_OPENAL=1 \ + -DFEATURE_FREETYPE=1 \ + -DFEATURE_TRACKER=0 \ + -DFEATURE_GETTEXT=1 \ + -DFEATURE_JANSSON=0 \ + -DFEATURE_DBMS=1 \ + -DFEATURE_LUA=1 \ + -DFEATURE_MULTIVIEW=1 \ + -DFEATURE_EDV=1 \ + -DFEATURE_ANTICHEAT=1 \ + -DFEATURE_RATING=1 \ + -DFEATURE_AUTOUPDATE=0 \ + -DFEATURE_LUASQL=1 \ + -DFEATURE_OMNIBOT=$w_omnibot \ + -DINSTALL_EXTRA=1 \ + -DINSTALL_OMNIBOT=$w_omnibot \ + -DINSTALL_GEOIP=1 \ + -DINSTALL_WOLFADMIN=1 \ + -DCROSS_COMPILE32=0 \ + -DFEATURE_OGG_VORBIS=1 \ + -DFEATURE_FREETYPE=1 \ + -DFEATURE_AUTOUPDATE=0 \ + -DFEATURE_IPV6=0 \ + -DFEATURE_GETTEXT=1 \ + -DFEATURE_RENDERER2=1 \ + -DFEATURE_RENDERER_GLES=0 \ + -DRENDERER_DYNAMIC=1 \ + -DBUNDLED_LIBS=1 \ + -DBUNDLED_SDL=1 \ + -DBUNDLED_LUA=1 \ + -DBUNDLED_OGG_VORBIS=1 \ + -DBUNDLED_THEORA=1 \ + -DBUNDLED_SQLITE3=1 \ + -DBUNDLED_JANSSON=0 \ + -DBUNDLED_ZLIB=1 \ + -DBUNDLED_MINIZIP=1 \ + -DBUNDLED_CURL=1 \ + -DBUNDLED_OPENAL=1 \ + -DBUNDLED_JPEG=1 \ + -DBUNDLED_GLEW=0 \ + -DBUNDLED_FREETYPE=1 \ + -DCMAKE_BUILD_TYPE=Release .. + + # JIC, sanitize the just-uncompressed stuff + chown -R root:root legacy + find -L legacy \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + make + make install DESTDIR=$PKG +cd .. + +# Move man pages in the proper place +mv $PKG/usr/share/man $PKG/usr/man + +# Install a script to open urls, and move two scripts to launch the client and +# the dedicated server with omnibot support in the binaries folder +install -m 0755 $CWD/files/openurl.sh $PKG/usr/bin/openurl.sh +mv $PKG/usr/share/$SRCNAM/etl*.sh $PKG/usr/bin/ +chmod 755 $PKG/usr/bin/etl*.sh + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +# Install an icon, a desktop file and man pages +install -m 0644 -D $CWD/files/$SRCNAM.svg \ + $PKG/usr/share/pixmaps/$SRCNAM.svg +install -m 0644 -D $CWD/files/$SRCNAM.desktop \ + $PKG/usr/share/applications/$SRCNAM.desktop +mkdir -p $PKG/usr/man/man6 +gzip -9 -c docs/linux/man/man6/etl.6 > $PKG/usr/man/man6/etl.6.gz +gzip -9 -c docs/linux/man/man6/etlded.6 > $PKG/usr/man/man6/etlded.6.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv \ + $PKG/usr/share/$SRCNAM/*.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cp README* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/etlegacy-from-source/etlegacy-from-source.info b/games/etlegacy-from-source/etlegacy-from-source.info new file mode 100644 index 0000000000..901378e2a2 --- /dev/null +++ b/games/etlegacy-from-source/etlegacy-from-source.info @@ -0,0 +1,16 @@ +PRGNAM="etlegacy" +VERSION="20201029_886f0ef" +HOMEPAGE="http://www.etlegacy.com" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/etlegacy-20201029_886f0ef.tar.xz \ + http://ponce.cc/slackware/sources/repo/omnibot-linux-latest.tar.gz \ + http://ponce.cc/slackware/sources/repo/wolfadmin.tar.gz \ + http://ponce.cc/slackware/sources/repo/GeoIP.dat.gz" +MD5SUM="e3104a3206e1d1ae0f02466e31df3bca \ + eddeb7d4033cebc269d00e06bbccbfb6 \ + c919afd544c1a0e9a08d5a0128247214 \ + 5ac81d5de50c557be104e4c43f851c36" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="%README% etlegacy-data zenity" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" diff --git a/games/etlegacy-from-source/files/etlegacy.desktop b/games/etlegacy-from-source/files/etlegacy.desktop new file mode 100644 index 0000000000..2618c0c13e --- /dev/null +++ b/games/etlegacy-from-source/files/etlegacy.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=ETLegacy +Comment=ET: Legacy (Collaborative online FPS) +Exec=etl +Icon=etl +Terminal=false +Type=Application +Categories=Game; +StartupNotify=false diff --git a/games/etlegacy-from-source/files/etlegacy.svg b/games/etlegacy-from-source/files/etlegacy.svg new file mode 100644 index 0000000000..51754d1889 --- /dev/null +++ b/games/etlegacy-from-source/files/etlegacy.svg @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="1.1" + width="273.6875" + height="173.40625" + viewBox="0 0 218.95 138.72526" + id="svg2"> + <metadata + id="metadata16"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs14"> + <linearGradient + id="linearGradient5430"> + <stop + id="stop5432" + style="stop-color:#df3323;stop-opacity:1" + offset="0" /> + <stop + id="stop5434" + style="stop-color:#3d0000;stop-opacity:1" + offset="1" /> + </linearGradient> + <linearGradient + x1="134.5764" + y1="2.2628517" + x2="134.5764" + y2="150.06567" + id="linearGradient5438" + xlink:href="#linearGradient5430" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.80000151,0,0,0.80000151,1.4747917,2.0250038)" + spreadMethod="pad" /> + </defs> + <path + d="m 141.47506,0 -2.025,0.025 -2.20001,0.025 -0.025,0 -0.05,0 c -0.56094,0.029611 -1.70494,0.1655976 -3.625,0.4000007 -1.92006,0.2344032 -4.43694,0.566477 -7.10002,1.0000019 -2.76457,0.4500476 -5.64229,1.0096873 -8.15001,1.6750032 -2.39466,0.6353177 -4.73741,1.1624015 -6.65002,3.0750058 -1.11785,1.1178567 -1.76614,2.3933294 -2.175,3.6250069 C 109.06614,8.5933348 108.41785,7.3178683 107.3,6.2000117 105.38739,4.2874074 103.04464,3.7603236 100.64998,3.1250059 98.142257,2.45969 95.264537,1.9000503 92.499964,1.4500027 89.859095,1.0200941 87.367626,0.683809 85.474951,0.4500008 83.582275,0.2161926 82.445337,0.0816673 81.924944,0.0500001 c -0.002,2.358e-4 -0.0219,2.018e-4 -0.025,0 -0.05436,-0.00354 -0.104368,0.00167 -0.15,0 -0.09126,-0.00334 -0.182568,0.00226 -0.300001,0 -0.234863,-0.00451 -0.536171,-0.022255 -0.825001,-0.025 -0.577661,-0.00549 -1.150002,0 -1.150002,0 l -2.000004,0 0,2.0000038 0,13.0000251 -72.650138,0 -4.82500917679,0 0,8.000015 L 3.3997953,26.45005 42.39987,65.450124 l 0.600001,0.575001 0.825001,0 35.650068,0 0,58.850115 0,4.85001 3.425006,-3.45001 13.575026,-13.62503 0,21.22504 0,4.85001 3.425005,-3.45 14.575033,-14.62503 0,4.22501 0,4.82501 3.42501,-3.40001 21.00004,-21.00004 0.575,-0.60001 0,-0.825 0,-37.850065 35.65006,0 0.825,0 0.6,-0.575001 39.00008,-39.000074 3.4,-3.425006 0,-8.000015 -4.82501,0 -72.65013,0 0,-13.0000251 z m -59.875116,4.0500076 0.075,0 c 0.01691,0.00103 1.091842,0.132738 1.725003,0.2000004 z m 55.700106,0 0.075,0 0.1,0 0,0.2250004 -2,0 c 0.72505,-0.076119 1.78584,-0.2215776 1.825,-0.2250004 z M 83.824948,4.3000081 c 0.505641,0.055705 0.521361,0.044253 1.175002,0.1250002 1.655203,0.2044728 3.853399,0.5170549 6.125012,0.8750017 C 88.120084,4.8294493 85.543799,4.4927178 83.824948,4.3000081 z m 50.925102,0.05 c -1.61252,0.1827352 -3.91957,0.4916419 -6.57501,0.9000017 2.14817,-0.332921 4.26472,-0.6314689 5.85001,-0.8250016 0.40573,-0.049532 0.36769,-0.034762 0.725,-0.075 z m -34.950073,2.675005 c 1.462323,0.389813 2.501633,0.7939944 3.350013,1.2250023 -0.15979,-0.072953 -0.27743,-0.1411677 -0.475,-0.2250004 -0.73852,-0.313363 -1.74502,-0.6878195 -2.875013,-1.0000019 z m 19.350043,0 c -1.12999,0.3121818 -2.13649,0.686639 -2.87501,1.0000019 -0.19757,0.083833 -0.31521,0.1520469 -0.475,0.2250004 0.84838,-0.4310079 1.88769,-0.8351893 3.35001,-1.2250023 z m -33.675069,1.550003 c 1.673843,0.2029118 3.290574,0.3746285 5.750011,0.7750014 2.615437,0.4257684 5.275002,0.9244885 7.350015,1.4750025 0.97355,0.25829 1.877973,0.600456 2.525003,0.875002 0.2086,0.08851 0.35117,0.155736 0.50001,0.225 0.0575,0.137843 0.13205,0.275764 0.2,0.475002 0.0976,0.286085 0.1654,0.634726 0.25,0.975001 -0.97037,0.241444 -2.243943,0.668929 -3.400013,1.825004 -1.3422,1.342202 -1.77999,2.924928 -1.975005,3.900007 -0.207144,1.03545 -0.201016,1.881533 -0.2,1.925004 2.4e-5,0.0011 0,0.05 0,0.05 l 0,16.950032 -65.325124,0 -3.000005,-3.000006 27.325051,0 0.825002,0 0.600001,-0.575001 4.000008,-4.000007 3.400006,-3.425007 -4.825009,0 -39.325074,0 -4.000008,-4.000007 58.47511,0 -5.57501,5.57501 -3.400007,3.425007 4.82501,0 13.000024,0 2.000004,0 0,-2.000004 z m 48.000099,0 0,21.4500409 0,2.000004 2,0 13.00002,0 4.82501,0 -3.4,-3.425007 -5.57501,-5.57501 58.47511,0 -4.00001,4.000007 -39.32508,0 -4.825,0 3.4,3.425007 4.00001,4.000007 0.6,0.575001 0.825,0 27.32505,0 -3,3.000006 -65.32513,0 0,-16.950032 c 0,0 -2e-5,-0.04888 0,-0.05 0.001,-0.04347 0.007,-0.889474 -0.2,-1.925004 -0.19501,-0.975067 -0.63279,-2.557801 -1.975,-3.900007 -1.15607,-1.156066 -2.42964,-1.583559 -3.40001,-1.825004 0.0846,-0.340275 0.15244,-0.688916 0.25,-0.975001 0.0679,-0.199238 0.14251,-0.337159 0.20001,-0.475002 0.14882,-0.06926 0.2914,-0.136491 0.5,-0.225 0.64703,-0.274545 1.55145,-0.616712 2.525,-0.875002 2.07501,-0.550514 4.73458,-1.0492341 7.35001,-1.4750025 2.45944,-0.4003729 4.07617,-0.5720896 5.75002,-0.7750014 z M 105.44999,10.75002 c 0.36286,0.911786 0.61428,1.899778 0.775,3.025006 0.11508,0.806639 0.13951,1.402629 0.2,1.950004 l 0.025,1.300002 -1.975,0 1.725,-0.025 0.1,-1.875003 c 0,0 0.031,-0.608393 -0.075,-1.350003 -0.13725,-0.96083 -0.38475,-1.897196 -0.65,-2.675005 -0.0439,-0.128608 -0.0802,-0.229896 -0.125,-0.350001 z m 8.05002,0 c -0.0448,0.120105 -0.0811,0.221393 -0.125,0.350001 -0.26525,0.777809 -0.51275,1.714175 -0.65,2.675005 0.16075,-1.125247 0.41213,-2.113214 0.775,-3.025006 z m -0.875,4.125008 -0.1,1.575003 0,-0.725001 c 0.0264,-0.239123 0.0753,-0.570767 0.1,-0.850002 z m -0.125,2.125004 1.975,0.025 -1,0 -0.975,0 z m -8.17502,0.025 c -0.041,0.0024 -0.4443,0.04387 -0.975,0.150001 -0.36337,0.07267 -0.66015,0.160047 -0.9,0.25 -0.0624,0.02341 -0.11939,0.02704 -0.175,0.05 0.33272,-0.161248 0.70162,-0.275325 1.075,-0.35 0.48654,-0.09731 0.975,-0.100001 0.975,-0.100001 z m 10.27502,0 c 0.17915,0.0019 0.4303,-0.01394 1,0.100001 0.37338,0.07468 0.74228,0.188751 1.075,0.35 -0.0556,-0.02295 -0.11256,-0.02659 -0.175,-0.05 -0.23984,-0.08995 -0.53662,-0.177325 -0.9,-0.25 -0.54393,-0.108764 -0.97882,-0.148809 -1,-0.150001 z m -13.67503,1.800004 c -0.0229,0.0556 -0.0266,0.112574 -0.05,0.175 -0.0899,0.239816 -0.17732,0.536711 -0.25,0.900002 -0.10298,0.515223 -0.12122,0.888151 -0.125,0.950002 2.7e-4,-0.09844 -0.0292,-0.429085 0.075,-0.950002 0.0747,-0.373381 0.18875,-0.742282 0.35,-1.075002 z m 17.10004,0 c 0.16124,0.332717 0.27532,0.701615 0.35,1.075002 0.1042,0.520844 0.0747,0.851573 0.075,0.950002 -0.004,-0.06189 -0.0219,-0.434562 -0.125,-0.950002 -0.0727,-0.36332 -0.16004,-0.660121 -0.25,-0.900002 -0.0234,-0.06244 -0.027,-0.119368 -0.05,-0.175 z m -13.55003,10.200019 c 0.0155,-0.0012 0.1,0 0.1,0 l 1.9,0 1.97501,0 0.025,0 2,0 0.025,0 2.97501,0 0.9,0 c 0,0 0.0845,-0.0012 0.1,0 l 0,0.1 0,8.900017 -10.00002,0 0,-8.900017 z m -23.000047,-7.150014 0,6.150012 -6.150011,0 5.57501,-5.57501 z m 56.000107,0 0.575,0.575002 5.57501,5.57501 -6.15001,0 z m -98.325187,24.150046 57.325109,0 0,38.000072 0,4.825009 3.425005,-3.400007 4.000013,-4.000007 0.575,-0.600001 0,-0.825002 0,-34.000064 10.00002,0 0,38.000072 0,4.825009 3.42501,-3.400007 4,-4.000007 0.575,-0.600001 0,-0.825002 0,-34.000064 57.32511,0 -4,4.000008 -42.32508,0 -2.00001,0 0,2.000003 0,41.325078 -9.00002,9.000014 0,-12.32502 0,-4.825009 -3.425,3.400006 -4.00001,4.000008 -0.575,0.600001 0,0.825002 0,7.325012 -10.00002,10.00002 0,-21.17504 0,-4.825009 -3.42501,3.400007 -13.575025,13.600022 0,-50.325092 0,-2.000003 -2.000004,0 -42.32508,0 z" + id="path3892" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + d="m 80.899942,3.4500065 0,13.5750255 c 0.0057,0.747658 -0.677344,1.430652 -1.425003,1.425003 l -74.4251406,0 36.1500686,36.150068 40.275076,0 c 0.747658,-0.0057 1.430651,0.677345 1.425003,1.425003 l 0,57.425104 14.575031,-14.625023 c 0.39153,-0.399953 1.03245,-0.531513 1.54988,-0.318145 0.51742,0.213376 0.87931,0.758473 0.87512,1.318146 l 0,22.625042 15.575033,-15.62503 c 0.39153,-0.39995 1.03246,-0.53151 1.54988,-0.31814 0.51743,0.21337 0.87932,0.75847 0.87512,1.31814 l 0,5.62501 18.15004,-18.15003 0,-39.275074 c -0.006,-0.747658 0.67734,-1.430652 1.425,-1.425003 l 40.27508,0 36.15007,-36.150068 -74.42514,0 c -0.74766,0.0057 -1.43066,-0.677345 -1.42501,-1.425003 l 0,-13.5500255 -0.75,0 0,-0.025 c -0.12117,0.00807 -1.49587,0.1472265 -3.35,0.3750007 -1.88147,0.2311324 -4.34424,0.5758045 -6.95002,1.0000019 -2.69691,0.4390327 -5.46733,0.9811276 -7.80001,1.600003 -2.41264,0.6400874 -3.98999,1.0649805 -5.12501,2.2000042 -1.33333,1.3333278 -1.65391,3.1773877 -1.92501,5.0750097 -0.12252,0.857658 -0.14082,1.502959 -0.2,2.025004 l -0.025,1.875003 1.55001,0 1,0 c 0.0252,0.0076 0.0502,0.01597 0.075,0.025 0,0 0.40683,0.02138 0.925,0.125 0.31902,0.0638 0.5829,0.143578 0.8,0.225001 0.10855,0.04071 0.21314,0.08552 0.3,0.125 0.0434,0.01974 0.0715,0.02167 0.125,0.05 0.0535,0.02833 0.0276,-0.07243 0.375,0.275001 0.34819,0.347604 0.24662,0.321414 0.275,0.375 0.0284,0.05358 0.0302,0.08154 0.05,0.125001 0.0395,0.08692 0.0843,0.191437 0.125,0.3 0.0814,0.217128 0.16121,0.481024 0.225,0.800002 0.10364,0.518223 0.125,0.925002 0.125,0.925002 0.009,0.02476 0.0174,0.04978 0.025,0.075 l 0,19.000036 c 0.006,0.747644 -0.67732,1.430629 -1.42496,1.425002 l -14.00002,0 c -0.74766,0.0057 -1.43065,-0.677344 -1.42501,-1.425002 l 0,-19.000036 c 0.008,-0.02522 0.016,-0.05024 0.025,-0.075 0,0 0.0214,-0.406945 0.125,-0.925002 0.0638,-0.318958 0.1436,-0.582921 0.225,-0.800002 0.0407,-0.10854 0.0855,-0.213147 0.125,-0.3 0.0198,-0.04342 0.0217,-0.0715 0.05,-0.125001 0.0283,-0.0535 -0.0723,-0.02764 0.275,-0.375 0.34793,-0.348311 0.32148,-0.246652 0.37501,-0.275001 0.0535,-0.02835 0.0816,-0.03026 0.125,-0.05 0.0869,-0.03949 0.19144,-0.08429 0.3,-0.125 0.21711,-0.08142 0.48099,-0.161197 0.8,-0.225001 0.51824,-0.103637 0.925,-0.125 0.925,-0.125 0.0247,-0.009 0.0498,-0.01737 0.075,-0.025 l 2,0 0.55,0 -0.025,-1.875003 c -0.0591,-0.521651 -0.0776,-1.167032 -0.2,-2.025004 -0.271,-1.897581 -0.59162,-3.7416741 -1.92496,-5.0750097 C 103.73996,7.4899926 102.16262,7.0650995 99.749977,6.4250121 97.417297,5.8061367 94.64688,5.2640418 91.949963,4.8250091 89.364134,4.4040604 86.933122,4.0566076 85.07495,3.8250072 83.216778,3.5934068 81.821792,3.4558999 81.724944,3.4500065 c -0.01664,2.946e-4 -0.03336,2.946e-4 -0.05,0 -5.04e-4,-3.11e-5 -0.05432,-0.00264 -0.05,0 -0.0108,-3.603e-4 -0.03648,3.705e-4 -0.05,0 -0.05408,-0.00148 -0.114734,0.00133 -0.2,0 -0.130649,-0.00204 -0.307376,0.00137 -0.475001,0 z" + id="path3885" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:url(#linearGradient5438);fill-opacity:1;stroke:none;stroke-width:4.00000763;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + d="m 79.474939,2.0250038 0,15.0000282 -77.850147,0 39.000074,39.000074 40.850077,0 0,60.850114 17.000034,-17.050032 c 0,8.683352 0,17.366702 0,26.050052 l 18.000033,-18.05004 0,9.05002 21.00004,-21.000039 0,-39.850075 40.85008,0 39.00007,-39.000074 -77.85014,0 0,-15.0000282 -2.19342,0.030005 c -0.56842,0.030005 -5.24819,0.5139758 -10.50661,1.3699977 -2.72494,0.4435953 -5.54482,0.9868914 -7.95001,1.6250031 -2.40519,0.6381117 -4.29291,1.1178968 -5.75001,2.5750049 -1.70711,1.7071081 -2.05238,3.9666185 -2.32501,5.8750105 -0.14279,0.999532 -0.19036,1.874272 -0.23268,2.199639 l -0.0423,3.325372 3.00001,0 1,0 c 0,0 0.30115,0.01525 0.725,0.1 0.42385,0.08477 0.84641,0.271405 0.875,0.300001 0.0286,0.02859 0.21523,0.451146 0.3,0.875001 0.0848,0.423855 0.1,0.725002 0.1,0.725002 l 0,19.000036 -14.00002,0 0,-19.000036 c 0,0 0.0153,-0.301147 0.1,-0.725002 0.0848,-0.423855 0.2714,-0.846406 0.3,-0.875001 0.0286,-0.02859 0.45115,-0.21523 0.875,-0.300001 0.4239,-0.08477 0.725,-0.1 0.725,-0.1 l 2,0 2.00001,0 -0.0424,-3.325372 c -0.0423,-0.325367 -0.0901,-1.200107 -0.23264,-2.199639 -0.27262,-1.908392 -0.61788,-4.1679025 -2.32499,-5.8750106 -1.4571,-1.4571081 -3.34482,-1.9368932 -5.75001,-2.5750049 C 97.719787,4.4118978 94.899905,3.8686017 92.174963,3.4250064 86.958546,2.5758217 82.355913,2.0923049 81.802928,2.0586543 81.714408,2.034763 79.474939,2.0250038 79.474939,2.0250038 z m 4.000008,4.250008 c 1.883196,0.2104537 4.619937,0.537548 8.075015,1.1000021 2.650061,0.4314048 5.361455,0.9443646 7.550015,1.5250029 2.188563,0.5806383 3.932123,1.4821112 3.975013,1.5250032 0.29289,0.292891 0.94763,2.033399 1.175,3.625006 0.0742,0.519018 0.05,0.975002 0.05,0.975002 0,0 -0.64839,0.0097 -1.34996,0.150001 -0.82616,0.165229 -1.90361,0.478597 -2.87501,1.450002 -0.971403,0.971405 -1.284773,2.048861 -1.450003,2.875006 -0.16527,0.826145 -0.15004,1.525003 -0.15004,1.525003 l 0,19.000036 -68.17513,0 -7.000014,-7.000014 32.175061,0 4.000008,-4.000007 -40.175076,0 -8.000015,-8.000015 68.175128,0 -9.000017,9.000017 13.000025,0 z m 52.000103,0 0,23.7500452 13.00002,0 -9.00001,-9.000017 68.17512,0 -8.00001,8.000015 -40.17508,0 4.00001,4.000007 32.17506,0 -7.00001,7.000014 -68.17513,0 0,-19.000036 c 0,0 0.0153,-0.698858 -0.15,-1.525003 -0.16523,-0.826145 -0.47859,-1.903601 -1.45,-2.875006 -0.97141,-0.971405 -2.04886,-1.284773 -2.87501,-1.450002 -0.74271,-0.148543 -1.25461,-0.148713 -1.375,-0.150001 0.034,-0.432859 8e-4,-0.455984 0.075,-0.975002 0.22737,-1.591607 0.88211,-3.332115 1.175,-3.625006 0.0429,-0.0429 1.78645,-0.9443649 3.97501,-1.5250032 2.18855,-0.5806383 4.89995,-1.0935981 7.55001,-1.5250029 3.45508,-0.5624541 6.19182,-0.8895484 8.07502,-1.1000021 z M 34.299854,44.025083 l 64.175123,0 0,40.000076 4.000013,-4.000008 0,-36.000068 14.00002,0 0,40.000076 4.00001,-4.000008 0,-36.000068 64.17512,0 -8.00001,8.000015 -43.17509,0 0,42.17508 -13.00002,13.000022 0,-17.17503 -4.00001,4.000007 0,8.175013 -14.00002,14.00003 0,-26.02505 -17.000039,17.02503 0,-55.175102 -43.175082,0 z" + id="stroke_curved_top_left" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <g + transform="translate(1.4749954,152.42528)" + id="g3771"> + <path + d="m 103,15 c 0,0 -2,0 -3,1 -1,1 -1,3 -1,3 M 80,2 c 0,0 20,2 23,5 2,2 2,8 2,8" + id="path3773" + style="fill:none;stroke:#000000;stroke-width:4.00000763;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" /> + <path + d="m 113,15 c 0,0 2,0 3,1 1,1 1,3 1,3 M 136,2 c 0,0 -20,2 -23,5 -2,2 -2,8 -2,8" + id="path3775" + style="fill:none;stroke:#000000;stroke-width:4.00000763;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" /> + <path + d="m 99,19 c 0,0 0,58 0,58 M 82,93 c 0,0 0,-41 0,-41 0,0 -42,0 -42,0 0,0 -35,-35 -35,-35 0,0 75,0 75,0 m 25,-2 c 0,0 -2,0 -2,0 M 80,2 c 0,0 0,24 0,24 m -27,3 c 0,0 -36,0 -36,0 m 91,11 c 0,0 -80,0 -80,0" + id="path3777" + style="fill:none;stroke:#000000;stroke-width:4.00000763;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" /> + <path + d="m 117,19 c 0,0 0,58 0,58 m 17,16 c 0,0 0,-41 0,-41 0,0 42,0 42,0 0,0 35,-35 35,-35 0,0 -75,0 -75,0 m -25,-2 c 0,0 2,0 2,0 M 136,2 c 0,0 0,24 0,24 m 27,3 c 0,0 36,0 36,0 m -91,11 c 0,0 80,0 80,0" + id="path3779" + style="fill:none;stroke:#000000;stroke-width:4.00000763;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" /> + <path + d="m 134,89 c 0,0 0,4 0,4 0,0 -17,17 -17,17 0,0 0,-9 0,-9 0,0 -18,18 -18,18 0,0 0,-26 0,-26 0,0 -17,17 -17,17 0,0 0,-17 0,-17 m 35,0 c 0,0 0,8 0,8" + id="path3781" + style="fill:none;stroke:#000000;stroke-width:4.00000763;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" /> + <path + d="m 138,2 c 0,0 0,-2 0,-2 0,0 -2,0 -2,0 0,0 0,2 0,2 0,0 2,0 2,0 z m -4,24 c 0,0 0,2 0,2 0,0 13,0 13,0 0,0 -9,-9 -9,-9 0,0 -4,0 -4,0 0,0 0,7 0,7 z m 30,5 c 0,0 -2,0 -2,0 0,0 -4,-4 -4,-4 0,0 6,0 6,0 0,0 0,4 0,4 z M 112,17 c 0,0 -3,0 -3,0 0,0 0,-3 0,-3 0,0 3,0 3,0 0,0 0,3 0,3 z" + id="path3783" + style="fill:#000000;fill-opacity:1;stroke:none" /> + <path + d="m 78,2 c 0,0 0,-2 0,-2 0,0 2,0 2,0 0,0 0,2 0,2 0,0 -2,0 -2,0 z m 4,24 c 0,0 0,2 0,2 0,0 -13,0 -13,0 0,0 9,-9 9,-9 0,0 4,0 4,0 0,0 0,7 0,7 z m -30,5 c 0,0 2,0 2,0 0,0 4,-4 4,-4 0,0 -6,0 -6,0 0,0 0,4 0,4 z m 52,-14 c 0,0 3,0 3,0 0,0 0,-3 0,-3 0,0 -3,0 -3,0 0,0 0,3 0,3 z" + id="path3785" + style="fill:#000000;fill-opacity:1;stroke:none" /> + <path + d="m 97,82 c 0,0 4,-4 4,-4 0,0 0,-1 0,-1 0,0 -4,0 -4,0 0,0 0,5 0,5 z m 18,0 c 0,0 4,-4 4,-4 0,0 0,-1 0,-1 0,0 -4,0 -4,0 0,0 0,5 0,5 z m 0,11 c 0,0 4,0 4,0 0,0 0,-5 0,-5 0,0 -4,4 -4,4 0,0 0,1 0,1 z" + id="path3787" + style="fill:#000000;fill-opacity:1;stroke:none" /> + </g> +</svg> diff --git a/games/etlegacy-from-source/files/get_tarball_from_git.sh b/games/etlegacy-from-source/files/get_tarball_from_git.sh new file mode 100644 index 0000000000..a0f1819819 --- /dev/null +++ b/games/etlegacy-from-source/files/get_tarball_from_git.sh @@ -0,0 +1,25 @@ +rm -fR /tmp/tmp-etlegacy +mkdir -p /tmp/tmp-etlegacy +cd /tmp/tmp-etlegacy +git clone git://github.com/etlegacy/etlegacy.git +cd etlegacy +git submodule init +git submodule update +cd libs +git archive master > ../../libs.tar +cd .. +COMMIT=$( git log -1 | head -1 | cut -c 8-14 ) +COMMDATE=$( git log -1 --date=short | grep ^Date | awk '{print $2}' | sed 's/-//g' ) +rm -f /tmp/etlegacy-${COMMDATE}_${COMMIT}.tar.xz +git archive master > ../src.tar +cd .. +mkdir etlegacy-${COMMDATE}_${COMMIT} +cd etlegacy-${COMMDATE}_${COMMIT} +tar xf ../src.tar +cd libs +tar xf ../../libs.tar +cd .. +cd .. +rm -f src.tar libs.tar scripts.tar +tar Jcf /tmp/etlegacy-${COMMDATE}_${COMMIT}.tar.xz etlegacy-${COMMDATE}_${COMMIT} +echo "/tmp/etlegacy-${COMMDATE}_${COMMIT}.tar.xz done." diff --git a/games/etlegacy-from-source/files/openurl.sh b/games/etlegacy-from-source/files/openurl.sh new file mode 100644 index 0000000000..274f12d08d --- /dev/null +++ b/games/etlegacy-from-source/files/openurl.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# use this script to customize the way the engine should open URLs + +for test_browser in firefox seamonkey opera +do + browser=`which $test_browser` + if [ "x$browser" != "x" ] + then + $browser -remote "openURL($1,new-window)" || $browser "$1" + exit + fi +done +# xterm -e lynx "$1" + +exit 0 diff --git a/games/etlegacy-from-source/slack-desc b/games/etlegacy-from-source/slack-desc new file mode 100644 index 0000000000..e6866b09b8 --- /dev/null +++ b/games/etlegacy-from-source/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +etlegacy-from-source: etlegacy-from-source (collaborative FPS) +etlegacy-from-source: +etlegacy-from-source: Wolfenstein Enemy Territory : Legacy is a project that aims to create +etlegacy-from-source: a fully compatible client and server for the popular online FPS game +etlegacy-from-source: Wolfenstein: Enemy Territory. +etlegacy-from-source: It's based on its source code released under the GPLv3 license. +etlegacy-from-source: The main goal of this project is to fix bugs, remove old dependencies +etlegacy-from-source: and make it playable on all major operating systems while still +etlegacy-from-source: remaining compatible with the ET 2.60b version and as many of its mods +etlegacy-from-source: as possible. This version is built from source. +etlegacy-from-source: homepage: http://www.etlegacy.com/ diff --git a/games/f1spirit/03_gcc6.patch b/games/f1spirit/03_gcc6.patch new file mode 100644 index 0000000000..fbae3bd832 --- /dev/null +++ b/games/f1spirit/03_gcc6.patch @@ -0,0 +1,12 @@ +diff -Naur f1spirit-0.rc9.1615.orig/sources/auxiliar.cpp f1spirit-0.rc9.1615/sources/auxiliar.cpp +--- f1spirit-0.rc9.1615.orig/sources/auxiliar.cpp 2009-02-06 10:54:49.000000000 +0100 ++++ f1spirit-0.rc9.1615/sources/auxiliar.cpp 2017-06-23 11:57:14.145689872 +0200 +@@ -93,7 +93,7 @@ + + if (tmp == 0 || + mask == 0) +- return false; ++ return 0; + + res = SDL_DisplayFormatAlpha(tmp); + diff --git a/games/f1spirit/f1spirit.SlackBuild b/games/f1spirit/f1spirit.SlackBuild index 8109ea68a7..4b9206d624 100644 --- a/games/f1spirit/f1spirit.SlackBuild +++ b/games/f1spirit/f1spirit.SlackBuild @@ -53,6 +53,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix for the newer gccs +patch -p1 < $CWD/03_gcc6.patch + make install PREFIX=$PKG/usr find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/games/freeorion/compilefix.diff b/games/freeorion/compilefix.diff deleted file mode 100644 index c4c207a520..0000000000 --- a/games/freeorion/compilefix.diff +++ /dev/null @@ -1,36 +0,0 @@ -diff -Naur freeorion-0.4.8/parse/ConditionParser.h freeorion-0.4.8.patched/parse/ConditionParser.h ---- freeorion-0.4.8/parse/ConditionParser.h 2018-08-23 05:41:14.000000000 -0400 -+++ freeorion-0.4.8.patched/parse/ConditionParser.h 2021-02-17 04:34:17.063751926 -0500 -@@ -1,6 +1,7 @@ - #ifndef _ConditionParser_h_ - #define _ConditionParser_h_ - -+#include "../universe/ValueRef.h" - #include "Lexer.h" - #include "ParseImpl.h" - #include "ValueRefParser.h" -diff -Naur freeorion-0.4.8/server/ServerApp.cpp freeorion-0.4.8.patched/server/ServerApp.cpp ---- freeorion-0.4.8/server/ServerApp.cpp 2018-08-23 05:41:14.000000000 -0400 -+++ freeorion-0.4.8.patched/server/ServerApp.cpp 2021-02-17 16:33:47.472827568 -0500 -@@ -1715,7 +1715,7 @@ - // make a link to new connection - m_player_empire_ids[player_connection->PlayerID()] = empire.first; - -- const OrderSet dummy; -+ OrderSet dummy; - const OrderSet& orders = orders_it->second ? *orders_it->second : dummy; - - auto player_info_map = GetPlayerInfoMap(); -diff -Naur freeorion-0.4.8/universe/Universe.h freeorion-0.4.8.patched/universe/Universe.h ---- freeorion-0.4.8/universe/Universe.h 2018-08-23 05:41:14.000000000 -0400 -+++ freeorion-0.4.8.patched/universe/Universe.h 2021-02-17 04:03:51.908917840 -0500 -@@ -3,7 +3,8 @@ - - - #include "EnumsFwd.h" --#include "ValueRefFwd.h" -+#include "ValueRef.h" -+#include "Condition.h" - #include "ObjectMap.h" - #include "UniverseObject.h" - #include "../util/Pending.h" diff --git a/games/freeorion/freeorion.SlackBuild b/games/freeorion/freeorion.SlackBuild index 550b76c64c..114e98bdc8 100644 --- a/games/freeorion/freeorion.SlackBuild +++ b/games/freeorion/freeorion.SlackBuild @@ -27,8 +27,8 @@ # along. PRGNAM=freeorion -VERSION=${VERSION:-0.4.8} -BUILD=${BUILD:-2} +VERSION=${VERSION:-0.4.10.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -77,8 +77,6 @@ find -L . \ export CC=/usr/bin/clang export CXX=/usr/bin/clang++ -patch -p1 < $CWD/compilefix.diff - mkdir -p build cd build cmake \ diff --git a/games/freeorion/freeorion.info b/games/freeorion/freeorion.info index 6796385b79..304d107f60 100644 --- a/games/freeorion/freeorion.info +++ b/games/freeorion/freeorion.info @@ -1,8 +1,8 @@ PRGNAM="freeorion" -VERSION="0.4.8" +VERSION="0.4.10.1" HOMEPAGE="http://www.freeorion.org" -DOWNLOAD="https://github.com/freeorion/freeorion/archive/v0.4.8/freeorion-0.4.8.tar.gz" -MD5SUM="df605a8b6c4de264f2319610dea99dbe" +DOWNLOAD="https://github.com/freeorion/freeorion/archive/v0.4.10.1/freeorion-0.4.10.1.tar.gz" +MD5SUM="6c1f5a2508bb60a6503709b355246488" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="SDL2 OpenAL" diff --git a/games/frogatto/frogatto.SlackBuild b/games/frogatto/frogatto.SlackBuild index c292542f79..ab84386732 100644 --- a/games/frogatto/frogatto.SlackBuild +++ b/games/frogatto/frogatto.SlackBuild @@ -69,13 +69,13 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix linking with boost libs -sed -i 's,-mt,,g' Makefile +# Fix linking with boost libs and remove -Werror +sed -i -e 's,-mt,,g' -e 's, -Werror,,' Makefile make \ OPTIMIZE=no \ USE_CCACHE=no \ - CXX=g++ \ + CXX=clang++ \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" diff --git a/games/gargoyle/gargoyle.SlackBuild b/games/gargoyle/gargoyle.SlackBuild index fd26829adf..d38d8dca90 100644 --- a/games/gargoyle/gargoyle.SlackBuild +++ b/games/gargoyle/gargoyle.SlackBuild @@ -59,7 +59,7 @@ jam -s DESTDIR=$PKG \ -s _BINDIR=/usr/libexec/gargoyle \ -s _APPDIR=/usr/libexec/gargoyle \ -s _LIBDIR=/usr/lib$LIBDIRSUFFIX/gargoyle \ - -s CCFLAGS="$SLKCFLAGS -fgnu89-inline" \ + -s CCFLAGS="$SLKCFLAGS -fgnu89-inline -fpermissive" \ -dx \ install diff --git a/games/glob2/c++14.patch b/games/glob2/c++14.patch new file mode 100644 index 0000000000..6465f659af --- /dev/null +++ b/games/glob2/c++14.patch @@ -0,0 +1,46 @@ +# HG changeset patch +# User Jonathan Wakely <jwakely@redhat.com> +# Date 1485875296 0 +# Node ID c9dc715624318e4fea4abb24e04f0ebdd9cd8d2a +# Parent c4da01699846179d8bf21e8dae2b973158ec0775 +Fix last argument to ChooseMapScreen constructor + +Since C++14 'false' is not a valid null pointer constant, so cannot be passed +to functions expecting pointer arguments. + +diff --git a/src/EditorMainMenu.cpp b/src/EditorMainMenu.cpp +--- a/src/EditorMainMenu.cpp ++++ b/src/EditorMainMenu.cpp +@@ -90,7 +90,7 @@ + } + else if (par1==LOADMAP) + { +- ChooseMapScreen chooseMapScreen("maps", "map", false, "games", "game", false); ++ ChooseMapScreen chooseMapScreen("maps", "map", false, "games", "game", NULL); + int rc=chooseMapScreen.execute(globalContainer->gfx, 40); + if (rc==ChooseMapScreen::OK) + { +diff --git a/src/LANMenuScreen.cpp b/src/LANMenuScreen.cpp +--- a/src/LANMenuScreen.cpp ++++ b/src/LANMenuScreen.cpp +@@ -62,7 +62,7 @@ + } + else if(par1 == HOST) + { +- ChooseMapScreen cms("maps", "map", false, "games", "game", false); ++ ChooseMapScreen cms("maps", "map", false, "games", "game", NULL); + int rc = cms.execute(globalContainer->gfx, 40); + if(rc == ChooseMapScreen::OK) + { +diff --git a/src/YOGClientLobbyScreen.cpp b/src/YOGClientLobbyScreen.cpp +--- a/src/YOGClientLobbyScreen.cpp ++++ b/src/YOGClientLobbyScreen.cpp +@@ -326,7 +326,7 @@ + + void YOGClientLobbyScreen::hostGame() + { +- ChooseMapScreen cms("maps", "map", false, "games", "game", false); ++ ChooseMapScreen cms("maps", "map", false, "games", "game", NULL); + int rc = cms.execute(globalContainer->gfx, 40); + if(rc == ChooseMapScreen::OK) + { diff --git a/games/glob2/glob2.SlackBuild b/games/glob2/glob2.SlackBuild index 6bb719cd26..435af508ff 100644 --- a/games/glob2/glob2.SlackBuild +++ b/games/glob2/glob2.SlackBuild @@ -71,6 +71,9 @@ find -L . \ patch -p1 < $CWD/fixes.patch +# From upstream +patch -p1 < $CWD/c++14.patch + mkdir -p $PKG/usr/bin \ $PKG/usr/share/games/$PRGNAM diff --git a/games/gnubg/gnubg.SlackBuild b/games/gnubg/gnubg.SlackBuild index 2e987b8125..6ba3010227 100644 --- a/games/gnubg/gnubg.SlackBuild +++ b/games/gnubg/gnubg.SlackBuild @@ -69,8 +69,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -./autogen.sh - LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ CFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/games/goonies/gcc6.patch b/games/goonies/gcc6.patch new file mode 100644 index 0000000000..f586243cf1 --- /dev/null +++ b/games/goonies/gcc6.patch @@ -0,0 +1,12 @@ +diff -Naur goonies-1.4.1528.orig/src/auxiliar.cpp goonies-1.4.1528/src/auxiliar.cpp +--- goonies-1.4.1528.orig/src/auxiliar.cpp 2009-03-12 09:43:32.000000000 +0100 ++++ goonies-1.4.1528/src/auxiliar.cpp 2017-06-23 10:24:12.765749591 +0200 +@@ -94,7 +94,7 @@ + + if (tmp == 0 || + mask == 0) +- return false; ++ return 0; + + res = SDL_DisplayFormatAlpha(tmp); + diff --git a/games/goonies/goonies.SlackBuild b/games/goonies/goonies.SlackBuild index a301b7f37d..ecbb660621 100644 --- a/games/goonies/goonies.SlackBuild +++ b/games/goonies/goonies.SlackBuild @@ -71,6 +71,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix for the newer compilers +patch -p1 < $CWD/gcc6.patch + # fix linker and installation paths patch -p1 < $CWD/makefile.patch diff --git a/games/img2xterm/img2xterm.SlackBuild b/games/img2xterm/img2xterm.SlackBuild index 21345282bd..0726604b35 100644 --- a/games/img2xterm/img2xterm.SlackBuild +++ b/games/img2xterm/img2xterm.SlackBuild @@ -50,6 +50,9 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# Fix an header path for imagemagick >= 7.x +sed -i "s|wand/MagickWand|MagickWand/MagickWand|" img2xterm.c + # Hardcoded stuffs. The LN line turns the absolute symlinks into # relative, so we don't end up with links to $PKG. sed -i \ diff --git a/games/innoextract/innoextract.SlackBuild b/games/innoextract/innoextract.SlackBuild index 115e82dc41..86e4032ac1 100644 --- a/games/innoextract/innoextract.SlackBuild +++ b/games/innoextract/innoextract.SlackBuild @@ -76,6 +76,7 @@ cd build -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release .. \ + -DBoost_NO_BOOST_CMAKE=ON \ -DCMAKE_INSTALL_MANDIR=man make make install DESTDIR=$PKG diff --git a/games/knights/README b/games/knights/README deleted file mode 100644 index e133dba217..0000000000 --- a/games/knights/README +++ /dev/null @@ -1,6 +0,0 @@ -knights (a simple chess board for KDE 4) - -Knights is a rewrite of the KDE3 Knights. You can play against computer -engines that support the XBoard protocol (like GnuChess), against -another player at the same computer, or on the Free Internet Chess -Server. It has automatic rule checking and some nice animations. diff --git a/games/knights/doinst.sh b/games/knights/doinst.sh deleted file mode 100644 index aea0f894eb..0000000000 --- a/games/knights/doinst.sh +++ /dev/null @@ -1,13 +0,0 @@ -if [ -x /usr/bin/update-desktop-database ]; then - /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 -fi - -if [ -x /usr/bin/update-mime-database ]; then - /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 -fi - -if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then - if [ -x /usr/bin/gtk-update-icon-cache ]; then - /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 - fi -fi diff --git a/games/knights/knights.SlackBuild b/games/knights/knights.SlackBuild deleted file mode 100644 index d4a1f1c9f8..0000000000 --- a/games/knights/knights.SlackBuild +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh - -# Slackware build script for knights - -# Copyright 2011, 2012 Chris Abela, Malta -# Copyright 2014 Ryan P.C. McQuen, <email removed>, WA -# Now maintained by B. Watson (yalhcru@gmail.com) -# -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIE -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# 20170810 bkw: -# - install HTML docs in /usr/doc, not /usr/share/doc -# - fix README and slack-desc typos -# - remove long-dead homepage link from slack-desc -# - BUILD=3 - -# 20170309 bkw: -# - take over maintenance -# - i486 => i586 -# - binary in /usr/games -# - BUILD=2 - -PRGNAM=knights -VERSION=${VERSION:-2.5.0} -BUILD=${BUILD:-3} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ - -DMAN_INSTALL_DIR=/usr/man \ - -DBIN_INSTALL_DIR=/usr/games \ - -DCMAKE_BUILD_TYPE=Release .. - make VERBOSE=1 - make install/strip DESTDIR=$PKG -cd .. - -# 20170309 bkw: I thought about doing this: -#chmod 644 $PKG/usr/share/applications/kde4/$PRGNAM.desktop -# ...but most of the existing files there from other packages are +x, -# not sure if KDE cares about the permissions but I'll leave it as-is. - -# 20170810 bkw: don't install to /usr/share/doc -mv $PKG/usr/share/doc $PKG/usr/doc - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a DESIGN README* $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/knights/knights.info b/games/knights/knights.info deleted file mode 100644 index b21e7877fa..0000000000 --- a/games/knights/knights.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="knights" -VERSION="2.5.0" -HOMEPAGE="http://opendesktop.org/content/show.php?content=122046" -DOWNLOAD="http://sourceforge.net/projects/slackbuildsdirectlinks/files/knights/knights-2.5.0.tar.bz2" -MD5SUM="58237998aeee8b6414f6e6f92d070395" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" diff --git a/games/knights/slack-desc b/games/knights/slack-desc deleted file mode 100644 index b2c120b2d3..0000000000 --- a/games/knights/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -knights: knights (a simple chess board for KDE 4) -knights: -knights: Knights is a rewrite of the KDE3 Knights. You can play against -knights: computer engines that support the XBoard protocol (like GnuChess), -knights: against another player at the same computer, or on the Free Internet -knights: Chess Server. It has automatic rule checking and some nice animations. -knights: -knights: -knights: -knights: -knights: diff --git a/games/m64py/m64py.SlackBuild b/games/m64py/m64py.SlackBuild index 6fcd6922c2..485b6d4314 100644 --- a/games/m64py/m64py.SlackBuild +++ b/games/m64py/m64py.SlackBuild @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=m64py -VERSION=${VERSION:-0.2.2} +VERSION=${VERSION:-0.2.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -76,7 +76,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS ChangeLog COPYING LICENSES PKG-INFO README.md \ + AUTHORS CHANGELOG COPYING LICENSES PKG-INFO README.rst \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/games/m64py/m64py.info b/games/m64py/m64py.info index a94a536ce8..ceb0ea20e0 100644 --- a/games/m64py/m64py.info +++ b/games/m64py/m64py.info @@ -1,10 +1,10 @@ PRGNAM="m64py" -VERSION="0.2.2" +VERSION="0.2.5" HOMEPAGE="http://m64py.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/project/m64py/m64py-0.2.2/m64py-0.2.2.tar.gz" -MD5SUM="78e8144e5f598f5a2b9fd926dd8788a8" +DOWNLOAD="http://downloads.sourceforge.net/m64py/m64py-0.2.5.tar.gz" +MD5SUM="201a5b08a7ed43db26af6067a064e116" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="mupen64plus" +REQUIRES="PySDL2 mupen64plus" MAINTAINER="M.Dinslage" EMAIL="daedra1980@gmail.com" diff --git a/games/micropolis/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild index 2f74efd4ae..b9617b5e6c 100644 --- a/games/micropolis/micropolis.SlackBuild +++ b/games/micropolis/micropolis.SlackBuild @@ -78,7 +78,7 @@ find . -iname \*makefile\* -o -iname \*.mk \ # comment out the next line to disable the airplane crash disaster sed -i -e 's/-DNO_AIRCRASH//' src/sim/makefile -make -j1 PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION SLKCFLAGS="$SLKCFLAGS" +make -j1 PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION SLKCFLAGS="$SLKCFLAGS -DTCL_IEEE_FP_MATH" make -j1 install PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG # Make .desktop file pass desktop-file-validate diff --git a/games/mupen64plus/fix_multiple_definition_errors.patch b/games/mupen64plus/fix_multiple_definition_errors.patch new file mode 100644 index 0000000000..5fa3372ab1 --- /dev/null +++ b/games/mupen64plus/fix_multiple_definition_errors.patch @@ -0,0 +1,11 @@ +diff -Naur mupen64plus-bundle-src-2.5.orig/source/mupen64plus-core/src/main/workqueue.h mupen64plus-bundle-src-2.5/source/mupen64plus-core/src/main/workqueue.h +--- mupen64plus-bundle-src-2.5.orig/source/mupen64plus-core/src/main/workqueue.h 2015-04-27 00:42:49.000000000 +0200 ++++ mupen64plus-bundle-src-2.5/source/mupen64plus-core/src/main/workqueue.h 2020-05-08 19:04:37.956818550 +0200 +@@ -27,7 +27,6 @@ + + struct work_struct; + +-struct work_struct *work; + typedef void (*work_func_t)(struct work_struct *work); + struct work_struct { + work_func_t func; diff --git a/games/mupen64plus/mupen64plus.SlackBuild b/games/mupen64plus/mupen64plus.SlackBuild index 58e16242cd..645a362fb8 100644 --- a/games/mupen64plus/mupen64plus.SlackBuild +++ b/games/mupen64plus/mupen64plus.SlackBuild @@ -51,6 +51,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# https://github.com/mupen64plus/mupen64plus-core/issues/712#issuecomment-588871449 +patch -p1 < $CWD/fix_multiple_definition_errors.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./m64p_build.sh V=1 diff --git a/games/neverball/gcc10.patch b/games/neverball/gcc10.patch new file mode 100644 index 0000000000..83e0a3a356 --- /dev/null +++ b/games/neverball/gcc10.patch @@ -0,0 +1,41 @@ +From a42492b8db06934c7a794630db92e3ff6ebaadaa Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Mon, 3 Feb 2020 20:25:57 +0000 +Subject: [PATCH] share/text.h: fix build failure against gcc-10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +cc .. -o neverball ... +ld: ball/st_save.o:(.bss+0x0): + multiple definition of `text_input'; share/text.o:(.bss+0x0): first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/708050 +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + share/text.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/share/text.h b/share/text.h +index baee7921a..8a2d6f591 100644 +--- a/share/text.h ++++ b/share/text.h +@@ -15,7 +15,7 @@ int text_length(const char *); + + /*---------------------------------------------------------------------------*/ + +-char text_input[MAXSTR]; ++extern char text_input[MAXSTR]; + + void text_input_start(void (*cb)(int typing)); + void text_input_stop(void); diff --git a/games/neverball/neverball.SlackBuild b/games/neverball/neverball.SlackBuild index c6bb39b7f9..38ecd9d032 100644 --- a/games/neverball/neverball.SlackBuild +++ b/games/neverball/neverball.SlackBuild @@ -72,6 +72,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +patch -p1 < $CWD/gcc10.patch + # Patch Makefile to change data directory and to make it compile # with appropriate flags patch -p1 < $CWD/Makefile.diff || exit 1 diff --git a/games/nlarn/nlarn.SlackBuild b/games/nlarn/nlarn.SlackBuild index d182511647..fef6664c4e 100644 --- a/games/nlarn/nlarn.SlackBuild +++ b/games/nlarn/nlarn.SlackBuild @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# set our CFLAGS, disable -Werror and use ncurses6-config +sed -i -e "s|-Werror ||" -e "s|-O2|$SLKCFLAGS|" -e "s|ncurses5|ncurses6|" Makefile + make find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/games/noteye/noteye.SlackBuild b/games/noteye/noteye.SlackBuild index 828e65f220..4ae54029b8 100644 --- a/games/noteye/noteye.SlackBuild +++ b/games/noteye/noteye.SlackBuild @@ -74,6 +74,9 @@ sed -i 's,-llua5.1,-llua,g' src/Makefile # store the writable high score file in /var, not /usr/share. sed -i 's,"hydrascores.sav","/var/games/hydrascores.sav",' hydra/hydra.cpp +# use clang++ as the code won't build with gcc >= 5.x +sed -i 's|g++ |clang++ |' src/Makefile + make -C src CFLAGS="$SLKCFLAGS" # The 'make install' target is bad and wrong. Don't use. diff --git a/games/openlierox/http_curl.patch b/games/openlierox/http_curl.patch deleted file mode 100644 index c74fcd3d22..0000000000 --- a/games/openlierox/http_curl.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- openlierox-0.58_rc3/include/HTTP.original.h 2014-04-19 19:58:09.213990582 +0300 -+++ openlierox-0.58_rc3/include/HTTP.h 2014-04-21 13:45:11.485876525 +0300 -@@ -21,7 +21,6 @@ - - #include <string> - #include <curl/curl.h> --#include <curl/types.h> - #include <curl/easy.h> - - #include "Networking.h" ---- openlierox-0.58_rc3/src/common/HTTP.original.cpp 2014-04-19 20:48:13.255434896 +0300 -+++ openlierox-0.58_rc3/src/common/HTTP.cpp 2014-04-21 13:48:08.493663623 +0300 -@@ -25,7 +25,6 @@ - #include <stdlib.h> - #endif - #include <curl/curl.h> --#include <curl/types.h> - #include <curl/easy.h> - - #include "LieroX.h" diff --git a/games/openlierox/openlierox.SlackBuild b/games/openlierox/openlierox.SlackBuild index 352f4ce332..3a407c408d 100644 --- a/games/openlierox/openlierox.SlackBuild +++ b/games/openlierox/openlierox.SlackBuild @@ -23,8 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=openlierox -VERSION=${VERSION:-0.58_rc3} -SRCVER=$(echo $VERSION | tr _ .) +VERSION=${VERSION:-20170313_3825306} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -61,7 +60,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -70,9 +69,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# curl/types.h removed because not supported from new CURL versions -patch -p1 < $CWD/http_curl.patch - mkdir -p build cd build cmake . \ diff --git a/games/openlierox/openlierox.info b/games/openlierox/openlierox.info index 44f5cb5814..f3115748bd 100644 --- a/games/openlierox/openlierox.info +++ b/games/openlierox/openlierox.info @@ -1,10 +1,10 @@ PRGNAM="openlierox" -VERSION="0.58_rc3" +VERSION="20170313_3825306" HOMEPAGE="http://www.openlierox.net/" -DOWNLOAD="https://github.com/albertz/openlierox/archive/0.58_rc3.tar.gz" -MD5SUM="4ce050ca069b1ebe2fb720b3a1c2c760" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/openlierox-20170313_3825306.tar.xz" +MD5SUM="7540eab45506561ccae1e75cf42a8fdd" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="HawkNL" +REQUIRES="HawkNL freealut" MAINTAINER="Dimitris Zlatanidis" EMAIL="d.zlatanidis@gmail.com" diff --git a/games/openttd/openttd.SlackBuild b/games/openttd/openttd.SlackBuild index 5e9956d310..4a15f32f59 100644 --- a/games/openttd/openttd.SlackBuild +++ b/games/openttd/openttd.SlackBuild @@ -89,7 +89,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -DU_USING_ICU_NAMESPACE=1" \ ./configure \ --prefix-dir=/usr \ --binary-dir=/games \ diff --git a/games/pingus/missing-header.patch b/games/pingus/missing-header.patch new file mode 100644 index 0000000000..cc1dcdbb85 --- /dev/null +++ b/games/pingus/missing-header.patch @@ -0,0 +1,22 @@ +From df6e2f445d3e2925a94d22faeb17be9444513e92 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely <jwakely@redhat.com> +Date: Mon, 30 Jan 2017 15:41:53 +0000 +Subject: [PATCH] Add missing header for std::function and std::bind + +--- + src/pingus/screens/demo_session.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/pingus/screens/demo_session.cpp b/src/pingus/screens/demo_session.cpp +index e3ec49a2c..f887e50f0 100644 +--- a/src/pingus/screens/demo_session.cpp ++++ b/src/pingus/screens/demo_session.cpp +@@ -18,6 +18,7 @@ + + #include <algorithm> + #include <iostream> ++#include <functional> + + #include "engine/gui/gui_manager.hpp" + #include "engine/gui/surface_button.hpp" + diff --git a/games/pingus/pingus.SlackBuild b/games/pingus/pingus.SlackBuild index e7abf19ddf..a548e5c2a2 100644 --- a/games/pingus/pingus.SlackBuild +++ b/games/pingus/pingus.SlackBuild @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks archlinux +patch -p1 < $CWD/missing-header.patch + mkdir -p build scons \ diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch new file mode 100644 index 0000000000..cfdcf9b7da --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch @@ -0,0 +1,75 @@ +From c769c9238ad62178f506038178714a1c35aa2769 Mon Sep 17 00:00:00 2001 +From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com> +Date: Tue, 16 Apr 2019 08:38:01 +0200 +Subject: [PATCH] Replace make_shared with new in some cases + +Replace make_shared for asio types that take a lib::ref as a parameter. +This should fix the ASIO change (boostorg/asio@59066d8) for 1.70, +while keeping it backwards compatible to older boost versions. +--- + websocketpp/transport/asio/connection.hpp | 7 ++++--- + websocketpp/transport/asio/endpoint.hpp | 3 +-- + websocketpp/transport/asio/security/none.hpp | 3 +-- + websocketpp/transport/asio/security/tls.hpp | 3 +-- + 4 files changed, 7 insertions(+), 9 deletions(-) + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index 60f88a79..1ccda8f3 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -311,9 +311,10 @@ class connection : public config::socket_type::socket_con_type { + * needed. + */ + timer_ptr set_timer(long duration, timer_handler callback) { +- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>( +- lib::ref(*m_io_service), +- lib::asio::milliseconds(duration) ++ timer_ptr new_timer( ++ new lib::asio::steady_timer( ++ *m_io_service, ++ lib::asio::milliseconds(duration)) + ); + + if (config::enable_multithreading) { +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index ddab2c74..4b719a97 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -195,8 +195,7 @@ class endpoint : public config::socket_type { + + m_io_service = ptr; + m_external_io_service = true; +- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>( +- lib::ref(*m_io_service)); ++ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); + + m_state = READY; + ec = lib::error_code(); +diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp +index 5c8293db..6c7d3524 100644 +--- a/websocketpp/transport/asio/security/none.hpp ++++ b/websocketpp/transport/asio/security/none.hpp +@@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> { + return socket::make_error_code(socket::error::invalid_state); + } + +- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>( +- lib::ref(*service)); ++ m_socket.reset(new lib::asio::ip::tcp::socket(*service)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, *m_socket); +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index c76fd9aa..04ac3790 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> { + if (!m_context) { + return socket::make_error_code(socket::error::invalid_tls_context); + } +- m_socket = lib::make_shared<socket_type>( +- _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); ++ m_socket.reset(new socket_type(*service, *m_context)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, get_socket()); diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch new file mode 100644 index 0000000000..64faab9d37 --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch @@ -0,0 +1,52 @@ +From f810ca2e800e9b55be41c5911cf1d1185fcd516b Mon Sep 17 00:00:00 2001 +From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com> +Date: Wed, 17 Apr 2019 10:06:18 +0000 +Subject: [PATCH] Fix missed entries; fix testing + +(Note: the CmakeLists.txt patch is cut off because we don't have it) + +--- + CMakeLists.txt | 2 +- + websocketpp/transport/asio/connection.hpp | 3 +-- + websocketpp/transport/asio/endpoint.hpp | 7 ++----- + 3 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index 1ccda8f3..57dda74a 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -462,8 +462,7 @@ class connection : public config::socket_type::socket_con_type { + m_io_service = io_service; + + if (config::enable_multithreading) { +- m_strand = lib::make_shared<lib::asio::io_service::strand>( +- lib::ref(*io_service)); ++ m_strand.reset(new lib::asio::io_service::strand(*io_service)); + } + + lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 4b719a97..94509adb 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -687,9 +687,7 @@ class endpoint : public config::socket_type { + * @since 0.3.0 + */ + void start_perpetual() { +- m_work = lib::make_shared<lib::asio::io_service::work>( +- lib::ref(*m_io_service) +- ); ++ m_work.reset(new lib::asio::io_service::work(*m_io_service)); + } + + /// Clears the endpoint's perpetual flag, allowing it to exit when empty +@@ -853,8 +851,7 @@ class endpoint : public config::socket_type { + + // Create a resolver + if (!m_resolver) { +- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>( +- lib::ref(*m_io_service)); ++ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); + } + + tcon->set_uri(u); diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch new file mode 100644 index 0000000000..8044977c10 --- /dev/null +++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch @@ -0,0 +1,18 @@ +diff -Naur pokerth-1.1.2-rc.orig/src/net/common/serveracceptwebhelper.cpp pokerth-1.1.2-rc/src/net/common/serveracceptwebhelper.cpp +--- pokerth-1.1.2-rc.orig/src/net/common/serveracceptwebhelper.cpp 2017-08-16 14:24:03.000000000 +0200 ++++ pokerth-1.1.2-rc/src/net/common/serveracceptwebhelper.cpp 2020-06-23 14:13:56.395204000 +0200 +@@ -58,10 +58,10 @@ + + m_webSocketServer->init_asio(m_ioService.get()); + +- m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, _1)); +- m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, _1)); +- m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, _1)); +- m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, _1, _2)); ++ m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, boost::placeholders::_1)); ++ m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, boost::placeholders::_1)); ++ m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, boost::placeholders::_1)); ++ m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, boost::placeholders::_1, boost::placeholders::_2)); + + m_webSocketServer->listen(serverPort); + m_webSocketServer->start_accept(); diff --git a/games/pokerth/pokerth.SlackBuild b/games/pokerth/pokerth.SlackBuild index 5412cb9fbe..72b320f642 100644 --- a/games/pokerth/pokerth.SlackBuild +++ b/games/pokerth/pokerth.SlackBuild @@ -1,7 +1,8 @@ #!/bin/sh -# Slackware build script for "pokerth". +# Slackware build script for pokerth. +# Copyright 2020 Matteo Bernardini <ponce@slackbuilds.org> # Copyright 2009-2015 Marcel Saegebarth <marc@mos6581.de> # Copyright 2012 Laurent Nardou <l.nardou@wanadoo.fr> # All rights reserved. @@ -26,14 +27,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=pokerth -SRCNAM=PokerTH -VERSION=${VERSION:-1.1.1} +VERSION=${VERSION:-20200721_a333185} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -44,8 +44,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -61,11 +61,11 @@ fi set -e rm -rf $PKG -rm -rf $TMP/$SRCNAM-$VERSION-src mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvf $CWD/$SRCNAM-$VERSION-src.tar.bz2 -cd $SRCNAM-$VERSION-src +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -73,18 +73,22 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# The headers to which this file points have moved in the newer libircclient... -# Thanks ponce. -sed -i "s|libircclient/||" src/net/common/ircthread.cpp +( cd src/third_party/websocketpp + patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch + patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch ) +patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.73-placeholders.patch -qmake pokerth.pro +qmake-qt5 QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro +make +mkdir -p $PKG/usr/bin +install -s -D -m 0755 bin/pokerth_server $PKG/usr/bin +install -s -D -m 0755 chatcleaner $PKG/usr/bin +make clean -make #CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" +qmake-qt5 CONFIG+="client" QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro +make make install DESTDIR=$PKG INSTALL_ROOT=$PKG -mkdir -p $PKG/usr/bin -install -s -D -m 0755 $TMP/$SRCNAM-$VERSION-src/bin/pokerth_server $PKG/usr/bin - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a COPYING INSTALL TODO ChangeLog \ $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/games/pokerth/pokerth.info b/games/pokerth/pokerth.info index 24588c1909..c0e9c26cbc 100644 --- a/games/pokerth/pokerth.info +++ b/games/pokerth/pokerth.info @@ -1,10 +1,10 @@ PRGNAM="pokerth" -VERSION="1.1.1" +VERSION="20200721_a333185" HOMEPAGE="https://www.pokerth.net" -DOWNLOAD="https://downloads.sourceforge.net/pokerth/PokerTH-1.1.1-src.tar.bz2" -MD5SUM="a7f76f95782099f966e5f2b6809f502a" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/pokerth-20200721_a333185.tar.xz" +MD5SUM="b96da9a09589dd45e7cf576c7190bdb1" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libgsasl libircclient tinyxml protobuf" -MAINTAINER="Marcel Saegebarth" -EMAIL="marc@mos6581.de" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" diff --git a/games/pysolfc/pillow6.patch b/games/pysolfc/pillow6.patch new file mode 100644 index 0000000000..80f0f1868e --- /dev/null +++ b/games/pysolfc/pillow6.patch @@ -0,0 +1,47 @@ +From fa20e7f834a1385f383f09a3aa8f4fb4bb86da18 Mon Sep 17 00:00:00 2001 +From: Shlomi Fish <shlomif@shlomifish.org> +Date: Fri, 5 Apr 2019 17:13:13 +0300 +Subject: [PATCH] Try fixing issue #108 - compat with pillow 6.0 + +See https://github.com/shlomif/PySolFC/issues/108 . +--- + pysollib/mfxutil.py | 2 +- + pysollib/ui/tktile/tkutil.py | 11 +++-------- + 2 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/pysollib/mfxutil.py b/pysollib/mfxutil.py +index a0d0aed4..f461ed10 100644 +--- a/pysollib/mfxutil.py ++++ b/pysollib/mfxutil.py +@@ -51,7 +51,7 @@ + from PIL import PpmImagePlugin # noqa: F401 + Image._initialized = 2 + USE_PIL = False +-if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7': ++if TOOLKIT == 'tk' and Image: + USE_PIL = True + + # debug +diff --git a/pysollib/ui/tktile/tkutil.py b/pysollib/ui/tktile/tkutil.py +index af43130a..0319e6d3 100644 +--- a/pysollib/ui/tktile/tkutil.py ++++ b/pysollib/ui/tktile/tkutil.py +@@ -353,15 +353,10 @@ def shadowImage(image, color='#3896f8', factor=0.3): + if not hasattr(image, '_pil_image'): + return None + im = image._pil_image +- if Image.VERSION >= '1.1.7': +- # use an alpha image +- sh = Image.new('RGBA', im.size, color) +- sh.putalpha(100) +- out = Image.composite(sh, im, im) +- return PIL_Image(image=out) ++ # use an alpha image + sh = Image.new('RGBA', im.size, color) +- tmp = Image.blend(im, sh, factor) +- out = Image.composite(tmp, im, im) ++ sh.putalpha(100) ++ out = Image.composite(sh, im, im) + return PIL_Image(image=out) + + diff --git a/games/pysolfc/pysolfc.SlackBuild b/games/pysolfc/pysolfc.SlackBuild index 02ef038041..1c2b20b606 100644 --- a/games/pysolfc/pysolfc.SlackBuild +++ b/games/pysolfc/pysolfc.SlackBuild @@ -76,6 +76,8 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +patch -p1 < $CWD/pillow6.patch + # 20181012 bkw: Slightly dirty hack, to combat a dirty hack from upstream. # Begin rant: # Basically, the old versions of pysol used the python 'random' library, diff --git a/games/qmc2/qmc2-qt5.15.patch b/games/qmc2/qmc2-qt5.15.patch new file mode 100644 index 0000000000..f2d8556c9c --- /dev/null +++ b/games/qmc2/qmc2-qt5.15.patch @@ -0,0 +1,10 @@ +--- qmc2/softwareimagewidget.cpp.orig 2020-07-08 07:27:41.029961948 +0000 ++++ qmc2/softwareimagewidget.cpp 2020-07-08 07:27:54.640148563 +0000 +@@ -3,6 +3,7 @@ + #include <QHash> + #include <QDir> + #include <QClipboard> ++#include <QPainterPath> + + #include "softwarelist.h" + #include "softwaresnapshot.h" diff --git a/games/qmc2/qmc2-types.patch b/games/qmc2/qmc2-types.patch new file mode 100644 index 0000000000..e5f960f8ce --- /dev/null +++ b/games/qmc2/qmc2-types.patch @@ -0,0 +1,952 @@ +diff --git a/lzma/7zArcIn.c b/lzma/7zArcIn.c
+index 59ef8499b..323a3155f 100644
+--- a/lzma/7zArcIn.c
++++ b/lzma/7zArcIn.c
+@@ -534,14 +534,14 @@ SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
+ f->NumPackStreams = numPackStreams;
+
+ for (i = 0; i < numInStreams; i++)
+- streamUsed[i] = False;
++ streamUsed[i] = false;
+
+ if (numBonds != 0)
+ {
+ Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX];
+
+ for (i = 0; i < numCoders; i++)
+- coderUsed[i] = False;
++ coderUsed[i] = false;
+
+ for (i = 0; i < numBonds; i++)
+ {
+@@ -550,12 +550,12 @@ SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
+ RINOK(SzReadNumber32(sd, &bp->InIndex));
+ if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex])
+ return SZ_ERROR_ARCHIVE;
+- streamUsed[bp->InIndex] = True;
++ streamUsed[bp->InIndex] = true;
+
+ RINOK(SzReadNumber32(sd, &bp->OutIndex));
+ if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex])
+ return SZ_ERROR_ARCHIVE;
+- coderUsed[bp->OutIndex] = True;
++ coderUsed[bp->OutIndex] = true;
+ }
+
+ for (i = 0; i < numCoders; i++)
+@@ -585,7 +585,7 @@ SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd)
+ RINOK(SzReadNumber32(sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+- streamUsed[index] = True;
++ streamUsed[index] = true;
+ f->PackStreams[i] = index;
+ }
+ }
+@@ -740,9 +740,9 @@ static SRes ReadUnpackInfo(CSzAr *p,
+ return SZ_ERROR_UNSUPPORTED;
+
+ for (i = 0; i < numInStreams; i++)
+- streamUsed[i] = False;
++ streamUsed[i] = false;
+ for (i = 0; i < numCoders; i++)
+- coderUsed[i] = False;
++ coderUsed[i] = false;
+
+ for (i = 0; i < numBonds; i++)
+ {
+@@ -751,12 +751,12 @@ static SRes ReadUnpackInfo(CSzAr *p,
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+- streamUsed[index] = True;
++ streamUsed[index] = true;
+
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numCoders || coderUsed[index])
+ return SZ_ERROR_ARCHIVE;
+- coderUsed[index] = True;
++ coderUsed[index] = true;
+ }
+
+ numPackStreams = numInStreams - numBonds;
+@@ -768,7 +768,7 @@ static SRes ReadUnpackInfo(CSzAr *p,
+ RINOK(SzReadNumber32(&sd, &index));
+ if (index >= numInStreams || streamUsed[index])
+ return SZ_ERROR_ARCHIVE;
+- streamUsed[index] = True;
++ streamUsed[index] = true;
+ }
+
+ for (i = 0; i < numCoders; i++)
+@@ -1750,7 +1750,7 @@ UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16
+ *(--dest) = 0;
+ return dest;
+ }
+- needSlash = False;
++ needSlash = false;
+ for (;;)
+ {
+ UInt32_7z parent = (UInt32_7z)(Int32)-1;
+@@ -1758,7 +1758,7 @@ UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16
+ SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen);
+ if (needSlash)
+ *(dest - 1) = '/';
+- needSlash = True;
++ needSlash = true;
+ dest -= curLen;
+
+ if SzBitWithVals_Check(&p->Parents, fileIndex)
+diff --git a/lzma/7zDec.c b/lzma/7zDec.c
+index 0fa265294..3a2242db4 100644
+--- a/lzma/7zDec.c
++++ b/lzma/7zDec.c
+@@ -66,7 +66,7 @@ static Byte ReadByte(void *pp)
+ if (size != 0)
+ return *p->cur++;;
+ }
+- p->extra = True;
++ p->extra = true;
+ return 0;
+ }
+
+@@ -80,7 +80,7 @@ static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, I
+ s.p.Read = ReadByte;
+ s.inStream = inStream;
+ s.begin = s.end = s.cur = NULL;
+- s.extra = False;
++ s.extra = false;
+ s.res = SZ_OK;
+ s.processed = 0;
+
+@@ -281,9 +281,9 @@ static Bool_7z IS_MAIN_METHOD(UInt32_7z m)
+ #ifdef _7ZIP_PPMD_SUPPPORT
+ case k_PPMD:
+ #endif
+- return True;
++ return true;
+ }
+- return False;
++ return false;
+ }
+
+ static Bool_7z IS_SUPPORTED_CODER(const CSzCoderInfo *c)
+diff --git a/lzma/7zTypes.h b/lzma/7zTypes.h
+index 4a0576ca7..ebf6cc80c 100644
+--- a/lzma/7zTypes.h
++++ b/lzma/7zTypes.h
+@@ -93,10 +93,8 @@ typedef UInt32_7z SizeT;
+ typedef size_t SizeT;
+ #endif
+
+-typedef int Bool_7z;
+-#define True 1
+-#define False 0
+-
++#include <stdbool.h>
++typedef bool Bool_7z;
+
+ #ifdef _WIN32
+ #define MY_STD_CALL __stdcall
+diff --git a/lzma/Bcj2Enc.c b/lzma/Bcj2Enc.c
+index a7b084623..4282a2e9b 100644
+--- a/lzma/Bcj2Enc.c
++++ b/lzma/Bcj2Enc.c
+@@ -64,7 +64,7 @@ static Bool_7z MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p)
+ {
+ p->state = BCJ2_STREAM_RC;
+ p->bufs[BCJ2_STREAM_RC] = buf;
+- return True;
++ return true;
+ }
+ *buf++ = (Byte)(p->cache + (Byte)(p->low >> 32));
+ p->cache = 0xFF;
+@@ -75,7 +75,7 @@ static Bool_7z MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p)
+ }
+ p->cacheSize++;
+ p->low = (UInt32_7z)p->low << 8;
+- return False;
++ return false;
+ }
+
+ static void Bcj2Enc_Encode_2(CBcj2Enc *p)
+@@ -172,14 +172,14 @@ static void Bcj2Enc_Encode_2(CBcj2Enc *p)
+ p->ip += (UInt32_7z)num + 1;
+ src++;
+
+- needConvert = False;
++ needConvert = false;
+
+ if ((SizeT)(p->srcLim - src) >= 4)
+ {
+ UInt32_7z relatVal = GetUi32(src);
+ if ((p->fileSize == 0 || (UInt32_7z)(p->ip + 4 + relatVal - p->fileIp) < p->fileSize)
+ && ((relatVal + p->relatLimit) >> 1) < p->relatLimit)
+- needConvert = True;
++ needConvert = true;
+ }
+
+ {
+diff --git a/lzma/CpuArch.c b/lzma/CpuArch.c
+index dc4dbdc25..43e300838 100644
+--- a/lzma/CpuArch.c
++++ b/lzma/CpuArch.c
+@@ -50,7 +50,7 @@ static UInt32_7z CheckFlag(UInt32_7z flag)
+ #endif
+ return flag;
+ }
+-#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False;
++#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return false;
+ #else
+ #define CHECK_CPUID_IS_SUPPORTED
+ #endif
+@@ -120,7 +120,7 @@ Bool_7z x86cpuid_CheckAndRead(Cx86cpuid *p)
+ CHECK_CPUID_IS_SUPPORTED
+ MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]);
+ MyCPUID(1, &p->ver, &p->b, &p->c, &p->d);
+- return True;
++ return true;
+ }
+
+ static const UInt32_7z kVendors[][3] =
+@@ -150,7 +150,7 @@ Bool_7z CPU_Is_InOrder()
+ int firm;
+ UInt32_7z family, model;
+ if (!x86cpuid_CheckAndRead(&p))
+- return True;
++ return true;
+
+ family = x86cpuid_GetFamily(p.ver);
+ model = x86cpuid_GetModel(p.ver);
+@@ -170,7 +170,7 @@ Bool_7z CPU_Is_InOrder()
+ case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA)));
+ case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF));
+ }
+- return True;
++ return true;
+ }
+
+ #if !defined(MY_CPU_AMD64) && defined(_WIN32)
+@@ -180,10 +180,10 @@ static Bool_7z CPU_Sys_Is_SSE_Supported()
+ OSVERSIONINFO vi;
+ vi.dwOSVersionInfoSize = sizeof(vi);
+ if (!GetVersionEx(&vi))
+- return False;
++ return false;
+ return (vi.dwMajorVersion >= 5);
+ }
+-#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False;
++#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return false;
+ #else
+ #define CHECK_SYS_SSE_SUPPORT
+ #endif
+@@ -193,7 +193,7 @@ Bool_7z CPU_Is_Aes_Supported()
+ Cx86cpuid p;
+ CHECK_SYS_SSE_SUPPORT
+ if (!x86cpuid_CheckAndRead(&p))
+- return False;
++ return false;
+ return (p.c >> 25) & 1;
+ }
+
+diff --git a/lzma/LzFind.c b/lzma/LzFind.c
+index 0f9a7bc41..c2417042a 100644
+--- a/lzma/LzFind.c
++++ b/lzma/LzFind.c
+@@ -314,7 +314,7 @@ void MatchFinder_Init_2(CMatchFinder *p, int readData)
+
+ void MatchFinder_Init(CMatchFinder *p)
+ {
+- MatchFinder_Init_2(p, True);
++ MatchFinder_Init_2(p, true);
+ }
+
+ static UInt32_7z MatchFinder_GetSubValue(CMatchFinder *p)
+diff --git a/lzma/LzFindMt.c b/lzma/LzFindMt.c
+index 3c2cdaf9c..ee1e2acc6 100644
+--- a/lzma/LzFindMt.c
++++ b/lzma/LzFindMt.c
+@@ -9,9 +9,9 @@
+
+ static void MtSync_Construct(CMtSync *p)
+ {
+- p->wasCreated = False;
+- p->csWasInitialized = False;
+- p->csWasEntered = False;
++ p->wasCreated = false;
++ p->csWasInitialized = false;
++ p->csWasEntered = false;
+ Thread_Construct(&p->thread);
+ Event_Construct(&p->canStart);
+ Event_Construct(&p->wasStarted);
+@@ -25,9 +25,9 @@ static void MtSync_GetNextBlock(CMtSync *p)
+ if (p->needStart)
+ {
+ p->numProcessedBlocks = 1;
+- p->needStart = False;
+- p->stopWriting = False;
+- p->exit = False;
++ p->needStart = false;
++ p->stopWriting = false;
++ p->exit = false;
+ Event_Reset(&p->wasStarted);
+ Event_Reset(&p->wasStopped);
+
+@@ -37,13 +37,13 @@ static void MtSync_GetNextBlock(CMtSync *p)
+ else
+ {
+ CriticalSection_Leave(&p->cs);
+- p->csWasEntered = False;
++ p->csWasEntered = false;
+ p->numProcessedBlocks++;
+ Semaphore_Release1(&p->freeSemaphore);
+ }
+ Semaphore_Wait(&p->filledSemaphore);
+ CriticalSection_Enter(&p->cs);
+- p->csWasEntered = True;
++ p->csWasEntered = true;
+ }
+
+ /* MtSync_StopWriting must be called if Writing was started */
+@@ -53,11 +53,11 @@ static void MtSync_StopWriting(CMtSync *p)
+ UInt32_7z myNumBlocks = p->numProcessedBlocks;
+ if (!Thread_WasCreated(&p->thread) || p->needStart)
+ return;
+- p->stopWriting = True;
++ p->stopWriting = true;
+ if (p->csWasEntered)
+ {
+ CriticalSection_Leave(&p->cs);
+- p->csWasEntered = False;
++ p->csWasEntered = false;
+ }
+ Semaphore_Release1(&p->freeSemaphore);
+
+@@ -68,7 +68,7 @@ static void MtSync_StopWriting(CMtSync *p)
+ Semaphore_Wait(&p->filledSemaphore);
+ Semaphore_Release1(&p->freeSemaphore);
+ }
+- p->needStart = True;
++ p->needStart = true;
+ }
+
+ static void MtSync_Destruct(CMtSync *p)
+@@ -76,7 +76,7 @@ static void MtSync_Destruct(CMtSync *p)
+ if (Thread_WasCreated(&p->thread))
+ {
+ MtSync_StopWriting(p);
+- p->exit = True;
++ p->exit = true;
+ if (p->needStart)
+ Event_Set(&p->canStart);
+ Thread_Wait(&p->thread);
+@@ -85,7 +85,7 @@ static void MtSync_Destruct(CMtSync *p)
+ if (p->csWasInitialized)
+ {
+ CriticalSection_Delete(&p->cs);
+- p->csWasInitialized = False;
++ p->csWasInitialized = false;
+ }
+
+ Event_Close(&p->canStart);
+@@ -94,7 +94,7 @@ static void MtSync_Destruct(CMtSync *p)
+ Semaphore_Close(&p->freeSemaphore);
+ Semaphore_Close(&p->filledSemaphore);
+
+- p->wasCreated = False;
++ p->wasCreated = false;
+ }
+
+ #define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; }
+@@ -105,7 +105,7 @@ static SRes MtSync_Create2(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj,
+ return SZ_OK;
+
+ RINOK_THREAD(CriticalSection_Init(&p->cs));
+- p->csWasInitialized = True;
++ p->csWasInitialized = true;
+
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canStart));
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStarted));
+@@ -114,10 +114,10 @@ static SRes MtSync_Create2(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj,
+ RINOK_THREAD(Semaphore_Create(&p->freeSemaphore, numBlocks, numBlocks));
+ RINOK_THREAD(Semaphore_Create(&p->filledSemaphore, 0, numBlocks));
+
+- p->needStart = True;
++ p->needStart = true;
+
+ RINOK_THREAD(Thread_Create(&p->thread, startAddress, obj));
+- p->wasCreated = True;
++ p->wasCreated = true;
+ return SZ_OK;
+ }
+
+@@ -129,7 +129,7 @@ static SRes MtSync_Create(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj,
+ return res;
+ }
+
+-void MtSync_Init(CMtSync *p) { p->needStart = True; }
++void MtSync_Init(CMtSync *p) { p->needStart = true; }
+
+ #define kMtMaxValForNormalize 0xFFFFFFFF
+
+@@ -391,7 +391,7 @@ static void BtFillBlock(CMatchFinderMt *p, UInt32_7z globalBlockIndex)
+ if (!sync->needStart)
+ {
+ CriticalSection_Enter(&sync->cs);
+- sync->csWasEntered = True;
++ sync->csWasEntered = true;
+ }
+
+ BtGetMatches(p, p->btBuf + (globalBlockIndex & kMtBtNumBlocksMask) * kMtBtBlockSize);
+@@ -406,7 +406,7 @@ static void BtFillBlock(CMatchFinderMt *p, UInt32_7z globalBlockIndex)
+ if (!sync->needStart)
+ {
+ CriticalSection_Leave(&sync->cs);
+- sync->csWasEntered = False;
++ sync->csWasEntered = false;
+ }
+ }
+
+@@ -503,7 +503,7 @@ void MatchFinderMt_Init(CMatchFinderMt *p)
+ p->hashBufPos = p->hashBufPosLimit = 0;
+
+ /* Init without data reading. We don't want to read data in this thread */
+- MatchFinder_Init_2(mf, False);
++ MatchFinder_Init_2(mf, false);
+
+ p->pointerToCurPos = Inline_MatchFinder_GetPointerToCurrentPos(mf);
+ p->btNumAvailBytes = 0;
+diff --git a/lzma/Lzma2Dec.c b/lzma/Lzma2Dec.c
+index 354b85c40..43bf57c8d 100644
+--- a/lzma/Lzma2Dec.c
++++ b/lzma/Lzma2Dec.c
+@@ -91,9 +91,9 @@ SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc)
+ void Lzma2Dec_Init(CLzma2Dec *p)
+ {
+ p->state = LZMA2_STATE_CONTROL;
+- p->needInitDic = True;
+- p->needInitState = True;
+- p->needInitProp = True;
++ p->needInitDic = true;
++ p->needInitState = true;
++ p->needInitProp = true;
+ LzmaDec_Init(&p->decoder);
+ }
+
+@@ -151,7 +151,7 @@ static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b)
+ return LZMA2_STATE_ERROR;
+ p->decoder.prop.lc = lc;
+ p->decoder.prop.lp = lp;
+- p->needInitProp = False;
++ p->needInitProp = false;
+ return LZMA2_STATE_DATA;
+ }
+ }
+@@ -230,14 +230,14 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
+ {
+ Bool_7z initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC);
+ if (initDic)
+- p->needInitProp = p->needInitState = True;
++ p->needInitProp = p->needInitState = true;
+ else if (p->needInitDic)
+ {
+ p->state = LZMA2_STATE_ERROR;
+ return SZ_ERROR_DATA;
+ }
+- p->needInitDic = False;
+- LzmaDec_InitDicAndState(&p->decoder, initDic, False);
++ p->needInitDic = false;
++ LzmaDec_InitDicAndState(&p->decoder, initDic, false);
+ }
+
+ if (srcSizeCur > destSizeCur)
+@@ -273,8 +273,8 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit,
+ }
+
+ LzmaDec_InitDicAndState(&p->decoder, initDic, initState);
+- p->needInitDic = False;
+- p->needInitState = False;
++ p->needInitDic = false;
++ p->needInitState = false;
+ p->state = LZMA2_STATE_DATA_CONT;
+ }
+
+diff --git a/lzma/Lzma2Enc.c b/lzma/Lzma2Enc.c
+index 23f541f21..16fbb0d3c 100644
+--- a/lzma/Lzma2Enc.c
++++ b/lzma/Lzma2Enc.c
+@@ -54,8 +54,8 @@ static SRes Lzma2EncInt_Init(CLzma2EncInt *p, const CLzma2EncProps *props)
+ RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize));
+ p->srcPos = 0;
+ p->props = propsEncoded[0];
+- p->needInitState = True;
+- p->needInitProp = True;
++ p->needInitState = true;
++ p->needInitProp = true;
+ return SZ_OK;
+ }
+
+@@ -102,7 +102,7 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
+ if (res != SZ_ERROR_OUTPUT_EOF)
+ return res;
+ res = SZ_OK;
+- useCopyBlock = True;
++ useCopyBlock = true;
+ }
+
+ if (useCopyBlock)
+@@ -132,7 +132,7 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
+ }
+ else
+ *packSizeRes = destPos;
+- /* needInitState = True; */
++ /* needInitState = true; */
+ }
+
+ LzmaEnc_RestoreState(p->enc);
+@@ -156,8 +156,8 @@ static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf,
+ if (p->needInitProp)
+ outBuf[destPos++] = p->props;
+
+- p->needInitProp = False;
+- p->needInitState = False;
++ p->needInitProp = false;
++ p->needInitState = false;
+ destPos += packSize;
+ p->srcPos += unpackSize;
+
+diff --git a/lzma/Lzma86Enc.c b/lzma/Lzma86Enc.c
+index e35950179..20f7c4ab1 100644
+--- a/lzma/Lzma86Enc.c
++++ b/lzma/Lzma86Enc.c
+@@ -56,7 +56,7 @@ int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen,
+
+ {
+ size_t minSize = 0;
+- Bool_7z bestIsFiltered = False;
++ Bool_7z bestIsFiltered = false;
+
+ /* passes for SZ_FILTER_AUTO:
+ 0 - BCJ + LZMA
+@@ -75,7 +75,7 @@ int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen,
+ if (curModeIsFiltered && !bestIsFiltered)
+ break;
+ if (useFilter && i == 0)
+- curModeIsFiltered = True;
++ curModeIsFiltered = true;
+
+ curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed,
+ curModeIsFiltered ? filteredStream : src, srcLen,
+diff --git a/lzma/LzmaDec.c b/lzma/LzmaDec.c
+index 867e3f6c9..412e2fa94 100644
+--- a/lzma/LzmaDec.c
++++ b/lzma/LzmaDec.c
+@@ -785,7 +785,7 @@ void LzmaDec_InitDicAndState(CLzmaDec *p, Bool_7z initDic, Bool_7z initState)
+ void LzmaDec_Init(CLzmaDec *p)
+ {
+ p->dicPos = 0;
+- LzmaDec_InitDicAndState(p, True, True);
++ LzmaDec_InitDicAndState(p, true, true);
+ }
+
+ static void LzmaDec_InitStateReal(CLzmaDec *p)
+diff --git a/lzma/LzmaEnc.c b/lzma/LzmaEnc.c
+index d4409f7f0..79a7ee944 100644
+--- a/lzma/LzmaEnc.c
++++ b/lzma/LzmaEnc.c
+@@ -904,8 +904,8 @@ static UInt32_7z ReadMatchDistances(CLzmaEnc *p, UInt32_7z *numDistancePairsRes)
+ }
+
+
+-#define MakeAsChar(p) (p)->backPrev = (UInt32_7z)(-1); (p)->prev1IsChar = False;
+-#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False;
++#define MakeAsChar(p) (p)->backPrev = (UInt32_7z)(-1); (p)->prev1IsChar = false;
++#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = false;
+ #define IsShortRep(p) ((p)->backPrev == 0)
+
+ static UInt32_7z GetRepLen1Price(CLzmaEnc *p, UInt32_7z state, UInt32_7z posState)
+@@ -956,7 +956,7 @@ static UInt32_7z Backward(CLzmaEnc *p, UInt32_7z *backRes, UInt32_7z cur)
+ p->opt[posMem].posPrev = posMem - 1;
+ if (p->opt[cur].prev2)
+ {
+- p->opt[posMem - 1].prev1IsChar = False;
++ p->opt[posMem - 1].prev1IsChar = false;
+ p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2;
+ p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2;
+ }
+@@ -1123,7 +1123,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = 0;
+ opt->backPrev = i;
+- opt->prev1IsChar = False;
++ opt->prev1IsChar = false;
+ }
+ }
+ while (--repLen >= 2);
+@@ -1158,7 +1158,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = 0;
+ opt->backPrev = distance + LZMA_NUM_REPS;
+- opt->prev1IsChar = False;
++ opt->prev1IsChar = false;
+ }
+ if (len == matches[offs])
+ {
+@@ -1276,7 +1276,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ curOpt->backs[3] = reps[3];
+
+ curPrice = curOpt->price;
+- nextIsChar = False;
++ nextIsChar = false;
+ data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
+ curByte = *data;
+ matchByte = *(data - (reps[0] + 1));
+@@ -1299,7 +1299,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ nextOpt->price = curAnd1Price;
+ nextOpt->posPrev = cur;
+ MakeAsChar(nextOpt);
+- nextIsChar = True;
++ nextIsChar = true;
+ }
+
+ matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
+@@ -1313,7 +1313,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ nextOpt->price = shortRepPrice;
+ nextOpt->posPrev = cur;
+ MakeAsShortRep(nextOpt);
+- nextIsChar = True;
++ nextIsChar = true;
+ }
+ }
+ numAvailFull = p->numAvail;
+@@ -1360,8 +1360,8 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur + 1;
+ opt->backPrev = 0;
+- opt->prev1IsChar = True;
+- opt->prev2 = False;
++ opt->prev1IsChar = true;
++ opt->prev2 = false;
+ }
+ }
+ }
+@@ -1392,7 +1392,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur;
+ opt->backPrev = repIndex;
+- opt->prev1IsChar = False;
++ opt->prev1IsChar = false;
+ }
+ }
+ while (--lenTest >= 2);
+@@ -1439,8 +1439,8 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur + lenTest + 1;
+ opt->backPrev = 0;
+- opt->prev1IsChar = True;
+- opt->prev2 = True;
++ opt->prev1IsChar = true;
++ opt->prev2 = true;
+ opt->posPrev2 = cur;
+ opt->backPrev2 = repIndex;
+ }
+@@ -1487,7 +1487,7 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice;
+ opt->posPrev = cur;
+ opt->backPrev = curBack + LZMA_NUM_REPS;
+- opt->prev1IsChar = False;
++ opt->prev1IsChar = false;
+ }
+ }
+
+@@ -1530,8 +1530,8 @@ static UInt32_7z GetOptimum(CLzmaEnc *p, UInt32_7z position, UInt32_7z *backRes)
+ opt->price = curAndLenPrice2;
+ opt->posPrev = cur + lenTest + 1;
+ opt->backPrev = 0;
+- opt->prev1IsChar = True;
+- opt->prev2 = True;
++ opt->prev1IsChar = true;
++ opt->prev2 = true;
+ opt->posPrev2 = cur;
+ opt->backPrev2 = curBack + LZMA_NUM_REPS;
+ }
+@@ -1681,14 +1681,14 @@ static SRes CheckErrors(CLzmaEnc *p)
+ if (p->matchFinderBase.result != SZ_OK)
+ p->result = SZ_ERROR_READ;
+ if (p->result != SZ_OK)
+- p->finished = True;
++ p->finished = true;
+ return p->result;
+ }
+
+ static SRes Flush(CLzmaEnc *p, UInt32_7z nowPos)
+ {
+ /* ReleaseMFStream(); */
+- p->finished = True;
++ p->finished = true;
+ if (p->writeEndMark)
+ WriteEndMarker(p, nowPos & p->pbMask);
+ RangeEnc_FlushData(&p->rc);
+@@ -2092,7 +2092,7 @@ static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32_7z keepWindowSize, ISzAlloc
+ break;
+ p->distTableSize = i * 2;
+
+- p->finished = False;
++ p->finished = false;
+ p->result = SZ_OK;
+ RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig));
+ LzmaEnc_Init(p);
+@@ -2164,7 +2164,7 @@ static size_t MyWrite(void *pp, const void *data, size_t size)
+ if (p->rem < size)
+ {
+ size = p->rem;
+- p->overflow = True;
++ p->overflow = true;
+ }
+ memcpy(p->data, data, size);
+ p->rem -= size;
+@@ -2198,10 +2198,10 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool_7z reInit,
+ outStream.funcTable.Write = MyWrite;
+ outStream.data = dest;
+ outStream.rem = *destLen;
+- outStream.overflow = False;
++ outStream.overflow = false;
+
+- p->writeEndMark = False;
+- p->finished = False;
++ p->writeEndMark = false;
++ p->finished = false;
+ p->result = SZ_OK;
+
+ if (reInit)
+@@ -2211,7 +2211,7 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool_7z reInit,
+ RangeEnc_Init(&p->rc);
+ p->rc.outStream = &outStream.funcTable;
+
+- res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
++ res = LzmaEnc_CodeOneBlock(p, true, desiredPackSize, *unpackSize);
+
+ *unpackSize = (UInt32_7z)(p->nowPos64 - nowPos64);
+ *destLen -= outStream.rem;
+@@ -2234,7 +2234,7 @@ static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress)
+
+ for (;;)
+ {
+- res = LzmaEnc_CodeOneBlock(p, False, 0, 0);
++ res = LzmaEnc_CodeOneBlock(p, false, 0, 0);
+ if (res != SZ_OK || p->finished)
+ break;
+ if (progress)
+@@ -2307,7 +2307,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte
+ outStream.funcTable.Write = MyWrite;
+ outStream.data = dest;
+ outStream.rem = *destLen;
+- outStream.overflow = False;
++ outStream.overflow = false;
+
+ p->writeEndMark = writeEndMark;
+ p->rc.outStream = &outStream.funcTable;
+diff --git a/lzma/MtCoder.c b/lzma/MtCoder.c
+index 5db0f4cb4..ab06fb7dd 100644
+--- a/lzma/MtCoder.c
++++ b/lzma/MtCoder.c
+@@ -156,8 +156,8 @@ static SRes CMtThread_Prepare(CMtThread *p)
+ MY_BUF_ALLOC(p->inBuf, p->inBufSize, p->mtCoder->blockSize)
+ MY_BUF_ALLOC(p->outBuf, p->outBufSize, p->mtCoder->destBlockSize)
+
+- p->stopReading = False;
+- p->stopWriting = False;
++ p->stopReading = false;
++ p->stopWriting = false;
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canRead));
+ RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canWrite));
+
+@@ -187,7 +187,7 @@ static SRes FullRead(ISeqInStream *stream, Byte *data, size_t *processedSize)
+ static SRes MtThread_Process(CMtThread *p, Bool_7z *stop)
+ {
+ CMtThread *next;
+- *stop = True;
++ *stop = true;
+ if (Event_Wait(&p->canRead) != 0)
+ return SZ_ERROR_THREAD;
+
+@@ -195,7 +195,7 @@ static SRes MtThread_Process(CMtThread *p, Bool_7z *stop)
+
+ if (p->stopReading)
+ {
+- next->stopReading = True;
++ next->stopReading = true;
+ return Event_Set(&next->canRead) == 0 ? SZ_OK : SZ_ERROR_THREAD;
+ }
+
+@@ -235,8 +235,8 @@ static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp)
+ {
+ MtCoder_SetError(p->mtCoder, res);
+ MtProgress_SetError(&p->mtCoder->mtProgress, res);
+- next->stopReading = True;
+- next->stopWriting = True;
++ next->stopReading = true;
++ next->stopWriting = true;
+ Event_Set(&next->canRead);
+ Event_Set(&next->canWrite);
+ return res;
+@@ -309,7 +309,7 @@ SRes MtCoder_Code(CMtCoder *p)
+ if (LoopThread_StartSubThread(&t->thread) != SZ_OK)
+ {
+ res = SZ_ERROR_THREAD;
+- p->threads[0].stopReading = True;
++ p->threads[0].stopReading = true;
+ break;
+ }
+ }
+diff --git a/lzma/Ppmd7.c b/lzma/Ppmd7.c
+index a61e5300e..6821ae868 100644
+--- a/lzma/Ppmd7.c
++++ b/lzma/Ppmd7.c
+@@ -111,10 +111,10 @@ Bool_7z Ppmd7_Alloc(CPpmd7 *p, UInt32_7z size, ISzAlloc *alloc)
+ + UNIT_SIZE
+ #endif
+ )) == 0)
+- return False;
++ return false;
+ p->Size = size;
+ }
+- return True;
++ return true;
+ }
+
+ static void InsertNode(CPpmd7 *p, void *node, unsigned indx)
+@@ -458,7 +458,7 @@ static void UpdateModel(CPpmd7 *p)
+
+ if (p->OrderFall == 0)
+ {
+- p->MinContext = p->MaxContext = CreateSuccessors(p, True);
++ p->MinContext = p->MaxContext = CreateSuccessors(p, true);
+ if (p->MinContext == 0)
+ {
+ RestartModel(p);
+@@ -480,7 +480,7 @@ static void UpdateModel(CPpmd7 *p)
+ {
+ if (fSuccessor <= successor)
+ {
+- CTX_PTR cs = CreateSuccessors(p, False);
++ CTX_PTR cs = CreateSuccessors(p, false);
+ if (cs == NULL)
+ {
+ RestartModel(p);
+diff --git a/lzma/Ppmd7Dec.c b/lzma/Ppmd7Dec.c
+index 6b2e0b81c..f653f41ed 100644
+--- a/lzma/Ppmd7Dec.c
++++ b/lzma/Ppmd7Dec.c
+@@ -14,7 +14,7 @@ Bool_7z Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p)
+ p->Code = 0;
+ p->Range = 0xFFFFFFFF;
+ if (p->Stream->Read((void *)p->Stream) != 0)
+- return False;
++ return false;
+ for (i = 0; i < 4; i++)
+ p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream);
+ return (p->Code < 0xFFFFFFFF);
+diff --git a/lzma/XzDec.c b/lzma/XzDec.c
+index 3dc8b4983..8e99f51a1 100644
+--- a/lzma/XzDec.c
++++ b/lzma/XzDec.c
+@@ -393,7 +393,7 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
+ {
+ SizeT destLenOrig = *destLen;
+ SizeT srcLenOrig = *srcLen;
+- Bool_7z allFinished = True;
++ Bool_7z allFinished = true;
+ *destLen = 0;
+ *srcLen = 0;
+ *status = CODER_STATUS_NOT_FINISHED;
+@@ -410,7 +410,7 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
+
+ for (;;)
+ {
+- Bool_7z processed = False;
++ Bool_7z processed = false;
+ unsigned i;
+ /*
+ if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY)
+@@ -456,7 +456,7 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
+ res = coder->Code(coder->p, destCur, &destLenCur, srcCur, &srcLenCur, srcFinishedCur, finishMode, &encodingWasFinished);
+
+ if (!encodingWasFinished)
+- allFinished = False;
++ allFinished = false;
+
+ if (i == 0)
+ {
+@@ -484,7 +484,7 @@ SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen,
+ return res;
+
+ if (destLenCur != 0 || srcLenCur != 0)
+- processed = True;
++ processed = true;
+ }
+ if (!processed)
+ break;
+@@ -573,7 +573,7 @@ SRes XzBlock_Parse(CXzBlock *p, const Byte *header)
+ SRes XzDec_Init(CMixCoder *p, const CXzBlock *block)
+ {
+ unsigned i;
+- Bool_7z needReInit = True;
++ Bool_7z needReInit = true;
+ unsigned numFilters = XzBlock_GetNumFilters(block);
+
+ if (numFilters == p->numCoders)
+@@ -650,7 +650,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
+ return SZ_OK;
+ }
+
+- res = MixCoder_Code(&p->decoder, dest, &destLen2, src, &srcLen2, False, finishMode, status);
++ res = MixCoder_Code(&p->decoder, dest, &destLen2, src, &srcLen2, false, finishMode, status);
+ XzCheck_Update(&p->check, dest, destLen2);
+
+ (*srcLen) += srcLen2;
+diff --git a/lzma/XzEnc.c b/lzma/XzEnc.c
+index 5ba898f8a..8f6242a25 100644
+--- a/lzma/XzEnc.c
++++ b/lzma/XzEnc.c
+@@ -313,10 +313,10 @@ static SRes SbEncInStream_Read(void *pp, void *data, size_t *size)
+ p->enc.readPos += processed;
+ if (processed == 0)
+ {
+- p->enc.readWasFinished = True;
+- p->enc.isFinalFinished = True;
++ p->enc.readWasFinished = true;
++ p->enc.isFinalFinished = true;
+ }
+- p->enc.needRead = False;
++ p->enc.needRead = false;
+ }
+
+ *size = sizeOriginal;
+@@ -402,7 +402,7 @@ void XzFilterProps_Init(CXzFilterProps *p)
+ p->id = 0;
+ p->delta = 0;
+ p->ip = 0;
+- p->ipDefined = False;
++ p->ipDefined = false;
+ }
+
+
+diff --git a/lzma/XzIn.c b/lzma/XzIn.c
+index 59aceb18a..22314b4cc 100644
+--- a/lzma/XzIn.c
++++ b/lzma/XzIn.c
+@@ -32,11 +32,11 @@ SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool_7z *isIndex, U
+ if (headerSize == 0)
+ {
+ *headerSizeRes = 1;
+- *isIndex = True;
++ *isIndex = true;
+ return SZ_OK;
+ }
+
+- *isIndex = False;
++ *isIndex = false;
+ *headerSizeRes = headerSize;
+ RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1));
+ return XzBlock_Parse(p, header);
diff --git a/games/qmc2/qmc2.SlackBuild b/games/qmc2/qmc2.SlackBuild index 72c2e64051..42ac1cde0a 100644 --- a/games/qmc2/qmc2.SlackBuild +++ b/games/qmc2/qmc2.SlackBuild @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/qmc2-qt5.15.patch +patch --binary -p1 < $CWD/qmc2-types.patch + CXX_FLAGS="$SLKCFLAGS" LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ make EMU=MESS PREFIX=/usr PRETTY=0 MACHINE=$ARCH make install EMU=MESS PREFIX=/usr DESTDIR=$PKG diff --git a/games/quakespasm/README b/games/quakespasm/README new file mode 100644 index 0000000000..0761ca3e56 --- /dev/null +++ b/games/quakespasm/README @@ -0,0 +1 @@ +This is an engine for iD software's Quake. diff --git a/games/quakespasm/doinst.sh b/games/quakespasm/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/games/quakespasm/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/games/quakespasm/quakespasm.SlackBuild b/games/quakespasm/quakespasm.SlackBuild new file mode 100644 index 0000000000..eceb66be24 --- /dev/null +++ b/games/quakespasm/quakespasm.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for quakespasm + +# Copyright 2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=quakespasm +VERSION=${VERSION:-0.93.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i686 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +DOCS="LICENSE.txt Quakespasm*" + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +cd Quake +make DO_USERDIRS=1 USE_SDL2=1 +cd .. +# manual installation +install -D -m0755 Quake/$PRGNAM $PKG/usr/games/$PRGNAM +install -D -m0644 Misc/QuakeSpasm_512.png $PKG/usr/share/pixmaps/$PRGNAM.png +install -D -m0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/quakespasm/quakespasm.desktop b/games/quakespasm/quakespasm.desktop new file mode 100644 index 0000000000..b143371c46 --- /dev/null +++ b/games/quakespasm/quakespasm.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Quakespasm +GenericName=Quakespasm port of ID Software's Quake +Exec=quakespasm +Terminal=false +Type=Application +Categories=Game; +Icon=quakespasm +StartupNotify=false diff --git a/games/quakespasm/quakespasm.info b/games/quakespasm/quakespasm.info new file mode 100644 index 0000000000..79c67d69d0 --- /dev/null +++ b/games/quakespasm/quakespasm.info @@ -0,0 +1,10 @@ +PRGNAM="quakespasm" +VERSION="0.93.1" +HOMEPAGE="https://quakespasm.sourceforge.net" +DOWNLOAD="https://downloads.sourceforge.net/quakespasm/quakespasm-0.93.1.tgz" +MD5SUM="cfb60350081c5526d2bb3320280c1f8c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="SDL2" +MAINTAINER="Matteo Bernardini" +EMAIL="ponce@slackbuilds.org" diff --git a/games/quakespasm/slack-desc b/games/quakespasm/slack-desc new file mode 100644 index 0000000000..5b7ef8a8db --- /dev/null +++ b/games/quakespasm/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +quakespasm: quakespasm (quake engine) +quakespasm: +quakespasm: This is an engine for iD software's Quake. +quakespasm: +quakespasm: homepage: https://quakespasm.sourceforge.net +quakespasm: +quakespasm: +quakespasm: +quakespasm: +quakespasm: +quakespasm: diff --git a/games/rlvm/gcc.patch b/games/rlvm/gcc.patch new file mode 100644 index 0000000000..fc4bedfb69 --- /dev/null +++ b/games/rlvm/gcc.patch @@ -0,0 +1,24 @@ +From 668863d2222b962ee8e7d9829e972ef05c990302 Mon Sep 17 00:00:00 2001 +From: Elliot Glaysher <glaysher@umich.edu> +Date: Sun, 22 May 2016 10:29:27 -0700 +Subject: [PATCH] Theoretical compile fix for gcc 4 series. + +Adds <iostream> to GraphicsObject. + +Closes #76. +--- + src/systems/base/graphics_object.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/systems/base/graphics_object.cc b/src/systems/base/graphics_object.cc +index 9490b3b0..af22177d 100644 +--- a/src/systems/base/graphics_object.cc ++++ b/src/systems/base/graphics_object.cc +@@ -36,6 +36,7 @@ + #include <boost/serialization/shared_ptr.hpp> + + #include <algorithm> ++#include <iostream> + #include <numeric> + #include <sstream> + #include <string> diff --git a/games/rlvm/rlvm.SlackBuild b/games/rlvm/rlvm.SlackBuild index cce10004ed..b4561a4ddd 100644 --- a/games/rlvm/rlvm.SlackBuild +++ b/games/rlvm/rlvm.SlackBuild @@ -59,6 +59,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# From upstream +patch -p1 < $CWD/gcc.patch + scons --release mkdir -p ${PKG}/usr/games ${PKG}/usr/bin diff --git a/games/roadfighter/gcc.patch b/games/roadfighter/gcc.patch new file mode 100644 index 0000000000..c7e3e3895a --- /dev/null +++ b/games/roadfighter/gcc.patch @@ -0,0 +1,11 @@ +--- src/auxiliar.cpp 2016-06-07 16:18:19.672015830 +0200 ++++ src/auxiliar.cpp 2016-06-07 16:18:41.678235683 +0200 +@@ -84,7 +84,7 @@ + mask=IMG_Load(name); + + if (tmp==0 || +- mask==0) return false; ++ mask==0) return 0; + + res=SDL_DisplayFormatAlpha(tmp); + diff --git a/games/roadfighter/roadfighter.SlackBuild b/games/roadfighter/roadfighter.SlackBuild index 2679ac6887..d6215675c6 100644 --- a/games/roadfighter/roadfighter.SlackBuild +++ b/games/roadfighter/roadfighter.SlackBuild @@ -74,6 +74,9 @@ find -L . \ # fix installation path patch -p1 < $CWD/makefile.patch +# fix building with the newer gcc +patch -p0 < $CWD/gcc.patch + make make install PREFIX=$PKG diff --git a/games/roccat-tools/roccat-tools.SlackBuild b/games/roccat-tools/roccat-tools.SlackBuild index 56530c5407..9dd0fbd809 100644 --- a/games/roccat-tools/roccat-tools.SlackBuild +++ b/games/roccat-tools/roccat-tools.SlackBuild @@ -105,7 +105,7 @@ LUA="-DWITH_LUA='$LUAVERSION'" mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS -isystem /usr/include/harfbuzz" \ -DCMAKE_INSTALL_PREFIX=/usr \ $HW \ $LUA \ diff --git a/games/scummvm/scummvm.SlackBuild b/games/scummvm/scummvm.SlackBuild index c0a8a400f7..45d0bc1a4c 100644 --- a/games/scummvm/scummvm.SlackBuild +++ b/games/scummvm/scummvm.SlackBuild @@ -76,9 +76,12 @@ find -L . \ # git commit 68758a87. patch -p1 < $CWD/fix-fluidsynth2-build.diff +# avoid linking breakage on i?86 +if [[ $ARCH == i?86 ]]; then linker=bfd; else linker=gold; fi + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -LDFLAGS="-fuse-ld=gold" \ +LDFLAGS="-fuse-ld=$linker" \ ./configure \ --prefix=/usr \ --bindir=/usr/games \ diff --git a/games/speed-dreams/speed-dreams-params-conversion.patch b/games/speed-dreams/speed-dreams-params-conversion.patch new file mode 100644 index 0000000000..16bd19d2f7 --- /dev/null +++ b/games/speed-dreams/speed-dreams-params-conversion.patch @@ -0,0 +1,22 @@ +--- src/libs/tgf/params.cpp.orig 2017-02-14 10:32:38.701066427 +0100 ++++ src/libs/tgf/params.cpp 2017-02-14 10:33:19.425879383 +0100 +@@ -3809,7 +3809,7 @@ + if( lastSlash != NULL && key ) + { + *key = lastSlash + 1; +- lastSlash = '\0'; ++ lastSlash = NULL; + } + else if( key ) + { +--- src/libs/tgfclient/openalmusicplayer.cpp.orig 2017-02-14 13:14:10.870735828 +0100 ++++ src/libs/tgfclient/openalmusicplayer.cpp 2017-02-14 13:15:11.592684153 +0100 +@@ -171,7 +171,7 @@ + { + char pcm[BUFFERSIZE]; + int size = 0; +- const char* error = '\0'; ++ const char* error = NULL; + + if (!_stream->read(pcm, BUFFERSIZE, &size, error)) { + GfLogError("OpenALMusicPlayer: Stream read error: %s\n", error); diff --git a/games/speed-dreams/speed-dreams.SlackBuild b/games/speed-dreams/speed-dreams.SlackBuild index 1812248a77..f304ab2256 100644 --- a/games/speed-dreams/speed-dreams.SlackBuild +++ b/games/speed-dreams/speed-dreams.SlackBuild @@ -57,6 +57,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks fedora +patch -p0 < $CWD/speed-dreams-params-conversion.patch + mkdir build cd build diff --git a/games/supertux/supertux-0.6.2_rc1-boost-1.73.patch b/games/supertux/supertux-0.6.2_rc1-boost-1.73.patch new file mode 100644 index 0000000000..55fa95b70f --- /dev/null +++ b/games/supertux/supertux-0.6.2_rc1-boost-1.73.patch @@ -0,0 +1,25 @@ +From dec7fb943c532f855e5c0ae2eb39d2d82a46a506 Mon Sep 17 00:00:00 2001 +From: Lars Wendler <polynomial-c@gentoo.org> +Date: Sat, 9 May 2020 03:04:02 +0200 +Subject: [PATCH] Fix build with boost-1.73 + +--- + src/editor/object_settings.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/editor/object_settings.hpp b/src/editor/object_settings.hpp +index bc9049a94..15b77b1e4 100644 +--- a/src/editor/object_settings.hpp ++++ b/src/editor/object_settings.hpp +@@ -22,6 +22,8 @@ + + #include "editor/object_option.hpp" + ++#include <algorithm> ++ + class Color; + enum class Direction; + enum class WalkMode; +-- +2.26.2 + diff --git a/games/supertux/supertux.SlackBuild b/games/supertux/supertux.SlackBuild index 122b06e07b..e3f5b251f2 100644 --- a/games/supertux/supertux.SlackBuild +++ b/games/supertux/supertux.SlackBuild @@ -25,7 +25,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=supertux -VERSION=${VERSION:-0.6.1} +VERSION=${VERSION:-0.6.2_rc.1} +SRCVERSION=$(echo $VERSION | tr _ - ) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -61,9 +62,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/SuperTux-v$VERSION-Source.tar.gz -cd SuperTux-v$VERSION-Source +rm -rf $PRGNAM-$SRCVERSION +tar xvf $CWD/SuperTux-v$SRCVERSION-Source.tar.gz +cd SuperTux-v$SRCVERSION-Source chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -71,6 +72,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/supertux-0.6.2_rc1-boost-1.73.patch + mkdir -p build cd build cmake \ diff --git a/games/supertux/supertux.info b/games/supertux/supertux.info index 6107a41d6f..b25959b728 100644 --- a/games/supertux/supertux.info +++ b/games/supertux/supertux.info @@ -1,8 +1,8 @@ PRGNAM="supertux" -VERSION="0.6.1" +VERSION="0.6.2_rc.1" HOMEPAGE="https://github.com/SuperTux/supertux" -DOWNLOAD="https://github.com/SuperTux/supertux/releases/download/v0.6.1/SuperTux-v0.6.1-Source.tar.gz" -MD5SUM="d7c9d70ef8501b4786908353202066e4" +DOWNLOAD="https://github.com/SuperTux/supertux/releases/download/v0.6.2-rc.1/SuperTux-v0.6.2-rc.1-Source.tar.gz" +MD5SUM="e4f1b5b112b729bfda801d058d09b7c0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="SDL2_image OpenAL physfs" diff --git a/games/supertuxkart/mesa-18.3.patch b/games/supertuxkart/mesa-18.3.patch new file mode 100644 index 0000000000..b144177255 --- /dev/null +++ b/games/supertuxkart/mesa-18.3.patch @@ -0,0 +1,23 @@ +From 3a3953f38c3555e87f3608d0291dbfccf34e9775 Mon Sep 17 00:00:00 2001 +From: Deve <deveee@gmail.com> +Date: Wed, 21 Nov 2018 21:07:55 +0100 +Subject: [PATCH] Fix for system glew + +--- + src/graphics/gl_headers.hpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/graphics/gl_headers.hpp b/src/graphics/gl_headers.hpp +index fc9867cb59..290805cafe 100644 +--- a/src/graphics/gl_headers.hpp ++++ b/src/graphics/gl_headers.hpp +@@ -25,6 +25,9 @@ + extern "C" { + #if !defined(USE_GLES2) + # include <GL/glew.h> ++// This is a workaround for mesa drivers that now use __gl_glext_h_ instead of ++// __glext_h_ in header file which is not defined in current glew version ++# define __gl_glext_h_ + #endif + } + #include <cinttypes> diff --git a/games/supertuxkart/supertuxkart.SlackBuild b/games/supertuxkart/supertuxkart.SlackBuild index 47fd592558..91241b3ecd 100644 --- a/games/supertuxkart/supertuxkart.SlackBuild +++ b/games/supertuxkart/supertuxkart.SlackBuild @@ -81,6 +81,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# From upstream +patch -p1 < $CWD/mesa-18.3.patch + mkdir -p build cd build cmake \ diff --git a/games/torcs/torcs.SlackBuild b/games/torcs/torcs.SlackBuild index 76ee0f1fae..479625aa7b 100644 --- a/games/torcs/torcs.SlackBuild +++ b/games/torcs/torcs.SlackBuild @@ -58,7 +58,7 @@ find -L . \ patch -p1 < $CWD/gcc7.diff CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBDIRSUFFIX \ diff --git a/games/trackballs/trackballs.info b/games/trackballs/trackballs.info index 85727281de..02cafdef1e 100644 --- a/games/trackballs/trackballs.info +++ b/games/trackballs/trackballs.info @@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/trackballs/trackballs/archive/v1.3.2/trackballs-1.3 MD5SUM="85b128afca8b55d8e7ae02c21fa0427e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="SDL2_mixer SDL2_image SDL2_ttf" +REQUIRES="SDL2_mixer SDL2_image SDL2_ttf guile2.2" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/games/vegastrike/cmake/FindGTK2.cmake b/games/vegastrike/cmake/FindGTK2.cmake new file mode 100644 index 0000000000..62f1614f8c --- /dev/null +++ b/games/vegastrike/cmake/FindGTK2.cmake @@ -0,0 +1,946 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindGTK2 +-------- + +Find the GTK2 widget libraries and several of its other optional components +like ``gtkmm``, ``glade``, and ``glademm``. + +Specify one or more of the following components as you call this find +module. See example below. + +* ``gtk`` +* ``gtkmm`` +* ``glade`` +* ``glademm`` + +Result Variables +^^^^^^^^^^^^^^^^ + +The following variables will be defined for your use + +``GTK2_FOUND`` + Were all of your specified components found? +``GTK2_INCLUDE_DIRS`` + All include directories +``GTK2_LIBRARIES`` + All libraries +``GTK2_TARGETS`` + All imported targets +``GTK2_DEFINITIONS`` + Additional compiler flags +``GTK2_VERSION`` + The version of GTK2 found (x.y.z) +``GTK2_MAJOR_VERSION`` + The major version of GTK2 +``GTK2_MINOR_VERSION`` + The minor version of GTK2 +``GTK2_PATCH_VERSION`` + The patch version of GTK2 + +Input Variables +^^^^^^^^^^^^^^^ + +Optional variables you can define prior to calling this module: + +``GTK2_DEBUG`` + Enables verbose debugging of the module +``GTK2_ADDITIONAL_SUFFIXES`` + Allows defining additional directories to search for include files + +Example Usage +^^^^^^^^^^^^^ + +Call :command:`find_package` once. Here are some examples to pick from: + +Require GTK 2.6 or later: + +.. code-block:: cmake + + find_package(GTK2 2.6 REQUIRED gtk) + +Require GTK 2.10 or later and Glade: + +.. code-block:: cmake + + find_package(GTK2 2.10 REQUIRED gtk glade) + +Search for GTK/GTKMM 2.8 or later: + +.. code-block:: cmake + + find_package(GTK2 2.8 COMPONENTS gtk gtkmm) + +Use the results: + +.. code-block:: cmake + + if(GTK2_FOUND) + include_directories(${GTK2_INCLUDE_DIRS}) + add_executable(mygui mygui.cc) + target_link_libraries(mygui ${GTK2_LIBRARIES}) + endif() +#]=======================================================================] + +# Version 1.6 (CMake 3.0) +# * Create targets for each library +# * Do not link libfreetype +# Version 1.5 (CMake 2.8.12) +# * 14236: Detect gthread library +# Detect pangocairo on windows +# Detect pangocairo with gtk module instead of with gtkmm +# * 14259: Use vc100 libraries with VS 11 +# * 14260: Export a GTK2_DEFINITIONS variable to set /vd2 when appropriate +# (i.e. MSVC) +# * Use the optimized/debug syntax for _LIBRARY and _LIBRARIES variables when +# appropriate. A new set of _RELEASE variables was also added. +# * Remove GTK2_SKIP_MARK_AS_ADVANCED option, as now the variables are +# marked as advanced by SelectLibraryConfigurations +# * Detect gmodule, pangoft2 and pangoxft libraries +# Version 1.4 (10/4/2012) (CMake 2.8.10) +# * 12596: Missing paths for FindGTK2 on NetBSD +# * 12049: Fixed detection of GTK include files in the lib folder on +# multiarch systems. +# Version 1.3 (11/9/2010) (CMake 2.8.4) +# * 11429: Add support for detecting GTK2 built with Visual Studio 10. +# Thanks to Vincent Levesque for the patch. +# Version 1.2 (8/30/2010) (CMake 2.8.3) +# * Merge patch for detecting gdk-pixbuf library (split off +# from core GTK in 2.21). Thanks to Vincent Untz for the patch +# and Ricardo Cruz for the heads up. +# Version 1.1 (8/19/2010) (CMake 2.8.3) +# * Add support for detecting GTK2 under macports (thanks to Gary Kramlich) +# Version 1.0 (8/12/2010) (CMake 2.8.3) +# * Add support for detecting new pangommconfig.h header file +# (Thanks to Sune Vuorela & the Debian Project for the patch) +# * Add support for detecting fontconfig.h header +# * Call find_package(Freetype) since it's required +# * Add support for allowing users to add additional library directories +# via the GTK2_ADDITIONAL_SUFFIXES variable (kind of a future-kludge in +# case the GTK developers change versions on any of the directories in the +# future). +# Version 0.8 (1/4/2010) +# * Get module working under MacOSX fink by adding /sw/include, /sw/lib +# to PATHS and the gobject library +# Version 0.7 (3/22/09) +# * Checked into CMake CVS +# * Added versioning support +# * Module now defaults to searching for GTK if COMPONENTS not specified. +# * Added HKCU prior to HKLM registry key and GTKMM specific environment +# variable as per mailing list discussion. +# * Added lib64 to include search path and a few other search paths where GTK +# may be installed on Unix systems. +# * Switched to lowercase CMake commands +# * Prefaced internal variables with _GTK2 to prevent collision +# * Changed internal macros to functions +# * Enhanced documentation +# Version 0.6 (1/8/08) +# Added GTK2_SKIP_MARK_AS_ADVANCED option +# Version 0.5 (12/19/08) +# Second release to cmake mailing list + +#============================================================= +# _GTK2_GET_VERSION +# Internal function to parse the version number in gtkversion.h +# _OUT_major = Major version number +# _OUT_minor = Minor version number +# _OUT_micro = Micro version number +# _gtkversion_hdr = Header file to parse +#============================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + +function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) + file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+") + if(_contents) + string(REGEX REPLACE ".*#define GTK_MAJOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_major} "${_contents}") + string(REGEX REPLACE ".*#define GTK_MINOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_minor} "${_contents}") + string(REGEX REPLACE ".*#define GTK_MICRO_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_micro} "${_contents}") + + if(NOT ${_OUT_major} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for GTK2_MAJOR_VERSION!") + endif() + if(NOT ${_OUT_minor} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for GTK2_MINOR_VERSION!") + endif() + if(NOT ${_OUT_micro} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for GTK2_MICRO_VERSION!") + endif() + + set(${_OUT_major} ${${_OUT_major}} PARENT_SCOPE) + set(${_OUT_minor} ${${_OUT_minor}} PARENT_SCOPE) + set(${_OUT_micro} ${${_OUT_micro}} PARENT_SCOPE) + else() + message(FATAL_ERROR "Include file ${_gtkversion_hdr} does not exist") + endif() +endfunction() + + +#============================================================= +# _GTK2_SIGCXX_GET_VERSION +# Internal function to parse the version number in +# sigc++config.h +# _OUT_major = Major version number +# _OUT_minor = Minor version number +# _OUT_micro = Micro version number +# _sigcxxversion_hdr = Header file to parse +#============================================================= + +function(_GTK2_SIGCXX_GET_VERSION _OUT_major _OUT_minor _OUT_micro _sigcxxversion_hdr) + file(STRINGS ${_sigcxxversion_hdr} _contents REGEX "#define SIGCXX_M[A-Z]+_VERSION[ \t]+") + if(_contents) + string(REGEX REPLACE ".*#define SIGCXX_MAJOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_major} "${_contents}") + string(REGEX REPLACE ".*#define SIGCXX_MINOR_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_minor} "${_contents}") + string(REGEX REPLACE ".*#define SIGCXX_MICRO_VERSION[ \t]+([0-9]+).*" "\\1" ${_OUT_micro} "${_contents}") + + if(NOT ${_OUT_major} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for SIGCXX_MAJOR_VERSION!") + endif() + if(NOT ${_OUT_minor} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for SIGCXX_MINOR_VERSION!") + endif() + if(NOT ${_OUT_micro} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for SIGCXX_MICRO_VERSION!") + endif() + + set(${_OUT_major} ${${_OUT_major}} PARENT_SCOPE) + set(${_OUT_minor} ${${_OUT_minor}} PARENT_SCOPE) + set(${_OUT_micro} ${${_OUT_micro}} PARENT_SCOPE) + else() + # The header does not have the version macros; assume it is ``0.0.0``. + set(${_OUT_major} 0) + set(${_OUT_minor} 0) + set(${_OUT_micro} 0) + endif() +endfunction() + + +#============================================================= +# _GTK2_FIND_INCLUDE_DIR +# Internal function to find the GTK include directories +# _var = variable to set (_INCLUDE_DIR is appended) +# _hdr = header file to look for +#============================================================= +function(_GTK2_FIND_INCLUDE_DIR _var _hdr) + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_FIND_INCLUDE_DIR( ${_var} ${_hdr} )") + endif() + + set(_gtk_packages + # If these ever change, things will break. + ${GTK2_ADDITIONAL_SUFFIXES} + glibmm-2.4 + glib-2.0 + atk-1.0 + atkmm-1.6 + cairo + cairomm-1.0 + gdk-pixbuf-2.0 + gdkmm-2.4 + giomm-2.4 + gtk-2.0 + gtkmm-2.4 + libglade-2.0 + libglademm-2.4 + harfbuzz + pango-1.0 + pangomm-1.4 + sigc++-2.0 + ) + + # + # NOTE: The following suffixes cause searching for header files in both of + # these directories: + # /usr/include/<pkg> + # /usr/lib/<pkg>/include + # + + set(_suffixes) + foreach(_d ${_gtk_packages}) + list(APPEND _suffixes ${_d}) + list(APPEND _suffixes ${_d}/include) # for /usr/lib/gtk-2.0/include + endforeach() + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "include suffixes = ${_suffixes}") + endif() + + if(CMAKE_LIBRARY_ARCHITECTURE) + set(_gtk2_arch_dir /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}) + if(GTK2_DEBUG) + message(STATUS "Adding ${_gtk2_arch_dir} to search path for multiarch support") + endif() + endif() + find_path(GTK2_${_var}_INCLUDE_DIR ${_hdr} + PATHS + ${_gtk2_arch_dir} + /usr/local/libx32 + /usr/local/lib64 + /usr/local/lib + /usr/libx32 + /usr/lib64 + /usr/lib + /opt/gnome/include + /opt/gnome/lib + /opt/openwin/include + /usr/openwin/lib + /sw/lib + /opt/local/lib + /usr/pkg/lib + /usr/pkg/include/glib + $ENV{GTKMM_BASEPATH}/include + $ENV{GTKMM_BASEPATH}/lib + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib + PATH_SUFFIXES + ${_suffixes} + ) + mark_as_advanced(GTK2_${_var}_INCLUDE_DIR) + + if(GTK2_${_var}_INCLUDE_DIR) + set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${GTK2_${_var}_INCLUDE_DIR} PARENT_SCOPE) + endif() + +endfunction() + +#============================================================= +# _GTK2_FIND_LIBRARY +# Internal function to find libraries packaged with GTK2 +# _var = library variable to create (_LIBRARY is appended) +#============================================================= +function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version) + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_FIND_LIBRARY( ${_var} ${_lib} ${_expand_vc} ${_append_version} )") + endif() + + # Not GTK versions per se but the versions encoded into Windows + # import libraries (GtkMM 2.14.1 has a gtkmm-vc80-2_4.lib for example) + # Also the MSVC libraries use _ for . (this is handled below) + set(_versions 2.20 2.18 2.16 2.14 2.12 + 2.10 2.8 2.6 2.4 2.2 2.0 + 1.20 1.18 1.16 1.14 1.12 + 1.10 1.8 1.6 1.4 1.2 1.0) + + set(_library) + set(_library_d) + + set(_library ${_lib}) + + if(_expand_vc AND MSVC) + # Add vc80/vc90/vc100 midfixes + if(MSVC_TOOLSET_VERSION LESS 110) + set(_library ${_library}-vc${MSVC_TOOLSET_VERSION}) + else() + # Up to gtkmm-win 2.22.0-2 there are no vc110 libraries but vc100 can be used + set(_library ${_library}-vc100) + endif() + set(_library_d ${_library}-d) + endif() + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "After midfix addition = ${_library} and ${_library_d}") + endif() + + set(_lib_list) + set(_libd_list) + if(_append_version) + foreach(_ver ${_versions}) + list(APPEND _lib_list "${_library}-${_ver}") + list(APPEND _libd_list "${_library_d}-${_ver}") + endforeach() + else() + set(_lib_list ${_library}) + set(_libd_list ${_library_d}) + endif() + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "library list = ${_lib_list} and library debug list = ${_libd_list}") + endif() + + # For some silly reason the MSVC libraries use _ instead of . + # in the version fields + if(_expand_vc AND MSVC) + set(_no_dots_lib_list) + set(_no_dots_libd_list) + foreach(_l ${_lib_list}) + string(REPLACE "." "_" _no_dots_library ${_l}) + list(APPEND _no_dots_lib_list ${_no_dots_library}) + endforeach() + # And for debug + set(_no_dots_libsd_list) + foreach(_l ${_libd_list}) + string(REPLACE "." "_" _no_dots_libraryd ${_l}) + list(APPEND _no_dots_libd_list ${_no_dots_libraryd}) + endforeach() + + # Copy list back to original names + set(_lib_list ${_no_dots_lib_list}) + set(_libd_list ${_no_dots_libd_list}) + endif() + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "While searching for GTK2_${_var}_LIBRARY, our proposed library list is ${_lib_list}") + endif() + + find_library(GTK2_${_var}_LIBRARY_RELEASE + NAMES ${_lib_list} + PATHS + /opt/gnome/lib + /usr/openwin/lib + $ENV{GTKMM_BASEPATH}/lib + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib + ) + + if(_expand_vc AND MSVC) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "While searching for GTK2_${_var}_LIBRARY_DEBUG our proposed library list is ${_libd_list}") + endif() + + find_library(GTK2_${_var}_LIBRARY_DEBUG + NAMES ${_libd_list} + PATHS + $ENV{GTKMM_BASEPATH}/lib + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib + ) + endif() + + select_library_configurations(GTK2_${_var}) + + set(GTK2_${_var}_LIBRARY ${GTK2_${_var}_LIBRARY} PARENT_SCOPE) + set(GTK2_${_var}_FOUND ${GTK2_${_var}_FOUND} PARENT_SCOPE) + + if(GTK2_${_var}_FOUND) + set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${GTK2_${_var}_LIBRARY}) + set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE) + endif() + + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "GTK2_${_var}_LIBRARY_RELEASE = \"${GTK2_${_var}_LIBRARY_RELEASE}\"") + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "GTK2_${_var}_LIBRARY_DEBUG = \"${GTK2_${_var}_LIBRARY_DEBUG}\"") + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "GTK2_${_var}_LIBRARY = \"${GTK2_${_var}_LIBRARY}\"") + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "GTK2_${_var}_FOUND = \"${GTK2_${_var}_FOUND}\"") + endif() + +endfunction() + + +function(_GTK2_ADD_TARGET_DEPENDS_INTERNAL _var _property) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_ADD_TARGET_DEPENDS_INTERNAL( ${_var} ${_property} )") + endif() + + string(TOLOWER "${_var}" _basename) + + if (TARGET GTK2::${_basename}) + foreach(_depend ${ARGN}) + set(_valid_depends) + if (TARGET GTK2::${_depend}) + list(APPEND _valid_depends GTK2::${_depend}) + endif() + if (_valid_depends) + set_property(TARGET GTK2::${_basename} APPEND PROPERTY ${_property} "${_valid_depends}") + endif() + set(_valid_depends) + endforeach() + endif() +endfunction() + +function(_GTK2_ADD_TARGET_DEPENDS _var) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_ADD_TARGET_DEPENDS( ${_var} )") + endif() + + string(TOLOWER "${_var}" _basename) + + if(TARGET GTK2::${_basename}) + get_target_property(_configs GTK2::${_basename} IMPORTED_CONFIGURATIONS) + _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} INTERFACE_LINK_LIBRARIES ${ARGN}) + foreach(_config ${_configs}) + _GTK2_ADD_TARGET_DEPENDS_INTERNAL(${_var} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN}) + endforeach() + endif() +endfunction() + +function(_GTK2_ADD_TARGET_INCLUDE_DIRS _var) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_ADD_TARGET_INCLUDE_DIRS( ${_var} )") + endif() + + string(TOLOWER "${_var}" _basename) + + if(TARGET GTK2::${_basename}) + foreach(_include ${ARGN}) + set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_include}") + endforeach() + endif() +endfunction() + +#============================================================= +# _GTK2_ADD_TARGET +# Internal function to create targets for GTK2 +# _var = target to create +#============================================================= +function(_GTK2_ADD_TARGET _var) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "_GTK2_ADD_TARGET( ${_var} )") + endif() + + string(TOLOWER "${_var}" _basename) + + cmake_parse_arguments(_${_var} "" "" "GTK2_DEPENDS;GTK2_OPTIONAL_DEPENDS;OPTIONAL_INCLUDES" ${ARGN}) + + if(GTK2_${_var}_FOUND) + if(NOT TARGET GTK2::${_basename}) + # Do not create the target if dependencies are missing + foreach(_dep ${_${_var}_GTK2_DEPENDS}) + if(NOT TARGET GTK2::${_dep}) + return() + endif() + endforeach() + + add_library(GTK2::${_basename} UNKNOWN IMPORTED) + + if(GTK2_${_var}_LIBRARY_RELEASE) + set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_RELEASE "${GTK2_${_var}_LIBRARY_RELEASE}" ) + endif() + + if(GTK2_${_var}_LIBRARY_DEBUG) + set_property(TARGET GTK2::${_basename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set_property(TARGET GTK2::${_basename} PROPERTY IMPORTED_LOCATION_DEBUG "${GTK2_${_var}_LIBRARY_DEBUG}" ) + endif() + + if(GTK2_${_var}_INCLUDE_DIR) + set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}_INCLUDE_DIR}") + endif() + + if(GTK2_${_var}CONFIG_INCLUDE_DIR AND NOT "x${GTK2_${_var}CONFIG_INCLUDE_DIR}" STREQUAL "x${GTK2_${_var}_INCLUDE_DIR}") + set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}") + endif() + + if(GTK2_DEFINITIONS) + set_property(TARGET GTK2::${_basename} PROPERTY INTERFACE_COMPILE_DEFINITIONS "${GTK2_DEFINITIONS}") + endif() + + if(_${_var}_GTK2_DEPENDS) + _GTK2_ADD_TARGET_DEPENDS(${_var} ${_${_var}_GTK2_DEPENDS} ${_${_var}_GTK2_OPTIONAL_DEPENDS}) + endif() + + if(_${_var}_OPTIONAL_INCLUDES) + foreach(_D ${_${_var}_OPTIONAL_INCLUDES}) + if(_D) + _GTK2_ADD_TARGET_INCLUDE_DIRS(${_var} ${_D}) + endif() + endforeach() + endif() + endif() + + set(GTK2_TARGETS ${GTK2_TARGETS} GTK2::${_basename}) + set(GTK2_TARGETS ${GTK2_TARGETS} PARENT_SCOPE) + + if(GTK2_USE_IMPORTED_TARGETS) + set(GTK2_${_var}_LIBRARY GTK2::${_basename} PARENT_SCOPE) + endif() + + endif() +endfunction() + + + +#============================================================= + +# +# main() +# + +set(GTK2_FOUND) +set(GTK2_INCLUDE_DIRS) +set(GTK2_LIBRARIES) +set(GTK2_TARGETS) +set(GTK2_DEFINITIONS) + +if(NOT GTK2_FIND_COMPONENTS) + # Assume they only want GTK + set(GTK2_FIND_COMPONENTS gtk) +endif() + +# +# If specified, enforce version number +# +if(GTK2_FIND_VERSION) + set(GTK2_FAILED_VERSION_CHECK true) + if(GTK2_DEBUG) + message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] " + "Searching for version ${GTK2_FIND_VERSION}") + endif() + _GTK2_FIND_INCLUDE_DIR(GTK gtk/gtk.h) + if(GTK2_GTK_INCLUDE_DIR) + _GTK2_GET_VERSION(GTK2_MAJOR_VERSION + GTK2_MINOR_VERSION + GTK2_PATCH_VERSION + ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h) + set(GTK2_VERSION + ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION}) + if(GTK2_FIND_VERSION_EXACT) + if(GTK2_VERSION VERSION_EQUAL GTK2_FIND_VERSION) + set(GTK2_FAILED_VERSION_CHECK false) + endif() + else() + if(GTK2_VERSION VERSION_EQUAL GTK2_FIND_VERSION OR + GTK2_VERSION VERSION_GREATER GTK2_FIND_VERSION) + set(GTK2_FAILED_VERSION_CHECK false) + endif() + endif() + else() + # If we can't find the GTK include dir, we can't do version checking + if(GTK2_FIND_REQUIRED AND NOT GTK2_FIND_QUIETLY) + message(FATAL_ERROR "Could not find GTK2 include directory") + endif() + return() + endif() + + if(GTK2_FAILED_VERSION_CHECK) + if(GTK2_FIND_REQUIRED AND NOT GTK2_FIND_QUIETLY) + if(GTK2_FIND_VERSION_EXACT) + message(FATAL_ERROR "GTK2 version check failed. Version ${GTK2_VERSION} was found, version ${GTK2_FIND_VERSION} is needed exactly.") + else() + message(FATAL_ERROR "GTK2 version check failed. Version ${GTK2_VERSION} was found, at least version ${GTK2_FIND_VERSION} is required") + endif() + endif() + + # If the version check fails, exit out of the module here + return() + endif() +endif() + +# +# On MSVC, according to https://wiki.gnome.org/gtkmm/MSWindows, the /vd2 flag needs to be +# passed to the compiler in order to use gtkmm +# +if(MSVC) + foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) + if(_GTK2_component STREQUAL "gtkmm") + set(GTK2_DEFINITIONS "/vd2") + elseif(_GTK2_component STREQUAL "glademm") + set(GTK2_DEFINITIONS "/vd2") + endif() + endforeach() +endif() + +# +# Find all components +# + +find_package(Freetype QUIET) +if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) + list(APPEND GTK2_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}) +endif() + +foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) + if(_GTK2_component STREQUAL "gtk") + # Left for compatibility with previous versions. + _GTK2_FIND_INCLUDE_DIR(FONTCONFIG fontconfig/fontconfig.h) + _GTK2_FIND_INCLUDE_DIR(X11 X11/Xlib.h) + + _GTK2_FIND_INCLUDE_DIR(GLIB glib.h) + _GTK2_FIND_INCLUDE_DIR(GLIBCONFIG glibconfig.h) + _GTK2_FIND_LIBRARY (GLIB glib false true) + _GTK2_ADD_TARGET (GLIB) + + _GTK2_FIND_INCLUDE_DIR(GOBJECT glib-object.h) + _GTK2_FIND_LIBRARY (GOBJECT gobject false true) + _GTK2_ADD_TARGET (GOBJECT GTK2_DEPENDS glib) + + _GTK2_FIND_INCLUDE_DIR(ATK atk/atk.h) + _GTK2_FIND_LIBRARY (ATK atk false true) + _GTK2_ADD_TARGET (ATK GTK2_DEPENDS gobject glib) + + _GTK2_FIND_LIBRARY (GIO gio false true) + _GTK2_ADD_TARGET (GIO GTK2_DEPENDS gobject glib) + + _GTK2_FIND_LIBRARY (GTHREAD gthread false true) + _GTK2_ADD_TARGET (GTHREAD GTK2_DEPENDS glib) + + _GTK2_FIND_LIBRARY (GMODULE gmodule false true) + _GTK2_ADD_TARGET (GMODULE GTK2_DEPENDS glib) + + _GTK2_FIND_INCLUDE_DIR(GDK_PIXBUF gdk-pixbuf/gdk-pixbuf.h) + _GTK2_FIND_LIBRARY (GDK_PIXBUF gdk_pixbuf false true) + _GTK2_ADD_TARGET (GDK_PIXBUF GTK2_DEPENDS gobject glib) + + _GTK2_FIND_INCLUDE_DIR(CAIRO cairo.h) + _GTK2_FIND_LIBRARY (CAIRO cairo false false) + _GTK2_ADD_TARGET (CAIRO) + + _GTK2_FIND_INCLUDE_DIR(HARFBUZZ hb.h) + _GTK2_FIND_LIBRARY (HARFBUZZ harfbuzz false false) + _GTK2_ADD_TARGET (HARFBUZZ) + + _GTK2_FIND_INCLUDE_DIR(PANGO pango/pango.h) + _GTK2_FIND_LIBRARY (PANGO pango false true) + _GTK2_ADD_TARGET (PANGO GTK2_DEPENDS gobject glib + GTK2_OPTIONAL_DEPENDS harfbuzz) + + _GTK2_FIND_LIBRARY (PANGOCAIRO pangocairo false true) + _GTK2_ADD_TARGET (PANGOCAIRO GTK2_DEPENDS pango cairo gobject glib) + + _GTK2_FIND_LIBRARY (PANGOFT2 pangoft2 false true) + _GTK2_ADD_TARGET (PANGOFT2 GTK2_DEPENDS pango gobject glib + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + _GTK2_FIND_LIBRARY (PANGOXFT pangoxft false true) + _GTK2_ADD_TARGET (PANGOXFT GTK2_DEPENDS pangoft2 pango gobject glib + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + _GTK2_FIND_INCLUDE_DIR(GDK gdk/gdk.h) + _GTK2_FIND_INCLUDE_DIR(GDKCONFIG gdkconfig.h) + if(UNIX) + if(APPLE) + _GTK2_FIND_LIBRARY (GDK gdk-quartz false true) + endif() + _GTK2_FIND_LIBRARY (GDK gdk-x11 false true) + else() + _GTK2_FIND_LIBRARY (GDK gdk-win32 false true) + endif() + _GTK2_ADD_TARGET (GDK GTK2_DEPENDS pango gdk_pixbuf gobject glib + GTK2_OPTIONAL_DEPENDS pangocairo cairo) + + _GTK2_FIND_INCLUDE_DIR(GTK gtk/gtk.h) + if(UNIX) + if(APPLE) + _GTK2_FIND_LIBRARY (GTK gtk-quartz false true) + endif() + _GTK2_FIND_LIBRARY (GTK gtk-x11 false true) + else() + _GTK2_FIND_LIBRARY (GTK gtk-win32 false true) + endif() + _GTK2_ADD_TARGET (GTK GTK2_DEPENDS gdk atk pangoft2 pango gdk_pixbuf gthread gobject glib + GTK2_OPTIONAL_DEPENDS gio pangocairo cairo) + + elseif(_GTK2_component STREQUAL "gtkmm") + + _GTK2_FIND_INCLUDE_DIR(SIGC++ sigc++/sigc++.h) + _GTK2_FIND_INCLUDE_DIR(SIGC++CONFIG sigc++config.h) + _GTK2_FIND_LIBRARY (SIGC++ sigc true true) + _GTK2_ADD_TARGET (SIGC++) + # Since sigc++ 2.5.1 c++11 support is required + if(GTK2_SIGC++CONFIG_INCLUDE_DIR) + _GTK2_SIGCXX_GET_VERSION(GTK2_SIGC++_VERSION_MAJOR + GTK2_SIGC++_VERSION_MINOR + GTK2_SIGC++_VERSION_MICRO + ${GTK2_SIGC++CONFIG_INCLUDE_DIR}/sigc++config.h) + if(NOT ${GTK2_SIGC++_VERSION_MAJOR}.${GTK2_SIGC++_VERSION_MINOR}.${GTK2_SIGC++_VERSION_MICRO} VERSION_LESS 2.5.1) + # These are the features needed by clients in order to include the + # project headers: + set_property(TARGET GTK2::sigc++ + PROPERTY INTERFACE_COMPILE_FEATURES cxx_alias_templates + cxx_auto_type + cxx_decltype + cxx_deleted_functions + cxx_noexcept + cxx_nullptr + cxx_right_angle_brackets + cxx_rvalue_references + cxx_variadic_templates) + endif() + endif() + + _GTK2_FIND_INCLUDE_DIR(GLIBMM glibmm.h) + _GTK2_FIND_INCLUDE_DIR(GLIBMMCONFIG glibmmconfig.h) + _GTK2_FIND_LIBRARY (GLIBMM glibmm true true) + _GTK2_ADD_TARGET (GLIBMM GTK2_DEPENDS gobject sigc++ glib) + + _GTK2_FIND_INCLUDE_DIR(GIOMM giomm.h) + _GTK2_FIND_INCLUDE_DIR(GIOMMCONFIG giommconfig.h) + _GTK2_FIND_LIBRARY (GIOMM giomm true true) + _GTK2_ADD_TARGET (GIOMM GTK2_DEPENDS gio glibmm gobject sigc++ glib) + + _GTK2_FIND_INCLUDE_DIR(ATKMM atkmm.h) + _GTK2_FIND_LIBRARY (ATKMM atkmm true true) + _GTK2_ADD_TARGET (ATKMM GTK2_DEPENDS atk glibmm gobject sigc++ glib) + + _GTK2_FIND_INCLUDE_DIR(CAIROMM cairomm/cairomm.h) + _GTK2_FIND_INCLUDE_DIR(CAIROMMCONFIG cairommconfig.h) + _GTK2_FIND_LIBRARY (CAIROMM cairomm true true) + _GTK2_ADD_TARGET (CAIROMM GTK2_DEPENDS cairo sigc++ + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + _GTK2_FIND_INCLUDE_DIR(PANGOMM pangomm.h) + _GTK2_FIND_INCLUDE_DIR(PANGOMMCONFIG pangommconfig.h) + _GTK2_FIND_LIBRARY (PANGOMM pangomm true true) + _GTK2_ADD_TARGET (PANGOMM GTK2_DEPENDS glibmm sigc++ pango gobject glib + GTK2_OPTIONAL_DEPENDS cairomm pangocairo cairo + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + _GTK2_FIND_INCLUDE_DIR(GDKMM gdkmm.h) + _GTK2_FIND_INCLUDE_DIR(GDKMMCONFIG gdkmmconfig.h) + _GTK2_FIND_LIBRARY (GDKMM gdkmm true true) + _GTK2_ADD_TARGET (GDKMM GTK2_DEPENDS pangomm gtk glibmm sigc++ gdk atk pangoft2 gdk_pixbuf pango gobject glib + GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + _GTK2_FIND_INCLUDE_DIR(GTKMM gtkmm.h) + _GTK2_FIND_INCLUDE_DIR(GTKMMCONFIG gtkmmconfig.h) + _GTK2_FIND_LIBRARY (GTKMM gtkmm true true) + _GTK2_ADD_TARGET (GTKMM GTK2_DEPENDS atkmm gdkmm pangomm gtk glibmm sigc++ gdk atk pangoft2 gdk_pixbuf pango gthread gobject glib + GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + elseif(_GTK2_component STREQUAL "glade") + + _GTK2_FIND_INCLUDE_DIR(GLADE glade/glade.h) + _GTK2_FIND_LIBRARY (GLADE glade false true) + _GTK2_ADD_TARGET (GLADE GTK2_DEPENDS gtk gdk atk gio pangoft2 gdk_pixbuf pango gobject glib + GTK2_OPTIONAL_DEPENDS pangocairo cairo + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + elseif(_GTK2_component STREQUAL "glademm") + + _GTK2_FIND_INCLUDE_DIR(GLADEMM libglademm.h) + _GTK2_FIND_INCLUDE_DIR(GLADEMMCONFIG libglademmconfig.h) + _GTK2_FIND_LIBRARY (GLADEMM glademm true true) + _GTK2_ADD_TARGET (GLADEMM GTK2_DEPENDS gtkmm glade atkmm gdkmm giomm pangomm glibmm sigc++ gtk gdk atk pangoft2 gdk_pixbuf pango gthread gobject glib + GTK2_OPTIONAL_DEPENDS giomm cairomm gio pangocairo cairo + OPTIONAL_INCLUDES ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} + ${GTK2_FONTCONFIG_INCLUDE_DIR} + ${GTK2_X11_INCLUDE_DIR}) + + else() + message(FATAL_ERROR "Unknown GTK2 component ${_component}") + endif() +endforeach() + +# +# Solve for the GTK2 version if we haven't already +# +if(NOT GTK2_FIND_VERSION AND GTK2_GTK_INCLUDE_DIR) + _GTK2_GET_VERSION(GTK2_MAJOR_VERSION + GTK2_MINOR_VERSION + GTK2_PATCH_VERSION + ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h) + set(GTK2_VERSION ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION}) +endif() + +# +# Try to enforce components +# + +set(_GTK2_did_we_find_everything true) # This gets set to GTK2_FOUND + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) + string(TOUPPER ${_GTK2_component} _COMPONENT_UPPER) + + set(GTK2_${_COMPONENT_UPPER}_FIND_QUIETLY ${GTK2_FIND_QUIETLY}) + + set(FPHSA_NAME_MISMATCHED 1) + if(_GTK2_component STREQUAL "gtk") + FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtk libraries were not found." + GTK2_GTK_LIBRARY + GTK2_GTK_INCLUDE_DIR + + GTK2_GDK_INCLUDE_DIR + GTK2_GDKCONFIG_INCLUDE_DIR + GTK2_GDK_LIBRARY + + GTK2_GLIB_INCLUDE_DIR + GTK2_GLIBCONFIG_INCLUDE_DIR + GTK2_GLIB_LIBRARY + ) + elseif(_GTK2_component STREQUAL "gtkmm") + FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtkmm libraries were not found." + GTK2_GTKMM_LIBRARY + GTK2_GTKMM_INCLUDE_DIR + GTK2_GTKMMCONFIG_INCLUDE_DIR + + GTK2_GDKMM_INCLUDE_DIR + GTK2_GDKMMCONFIG_INCLUDE_DIR + GTK2_GDKMM_LIBRARY + + GTK2_GLIBMM_INCLUDE_DIR + GTK2_GLIBMMCONFIG_INCLUDE_DIR + GTK2_GLIBMM_LIBRARY + + FREETYPE_INCLUDE_DIR_ft2build + FREETYPE_INCLUDE_DIR_freetype2 + ) + elseif(_GTK2_component STREQUAL "glade") + FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glade library was not found." + GTK2_GLADE_LIBRARY + GTK2_GLADE_INCLUDE_DIR + ) + elseif(_GTK2_component STREQUAL "glademm") + FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glademm library was not found." + GTK2_GLADEMM_LIBRARY + GTK2_GLADEMM_INCLUDE_DIR + GTK2_GLADEMMCONFIG_INCLUDE_DIR + ) + endif() + unset(FPHSA_NAME_MISMATCHED) + + if(NOT GTK2_${_COMPONENT_UPPER}_FOUND) + set(_GTK2_did_we_find_everything false) + endif() +endforeach() + +if(GTK2_USE_IMPORTED_TARGETS) + set(GTK2_LIBRARIES ${GTK2_TARGETS}) +endif() + + +if(_GTK2_did_we_find_everything AND NOT GTK2_VERSION_CHECK_FAILED) + set(GTK2_FOUND true) +else() + # Unset our variables. + set(GTK2_FOUND false) + set(GTK2_VERSION) + set(GTK2_VERSION_MAJOR) + set(GTK2_VERSION_MINOR) + set(GTK2_VERSION_PATCH) + set(GTK2_INCLUDE_DIRS) + set(GTK2_LIBRARIES) + set(GTK2_TARGETS) + set(GTK2_DEFINITIONS) +endif() + +if(GTK2_INCLUDE_DIRS) + list(REMOVE_DUPLICATES GTK2_INCLUDE_DIRS) +endif() diff --git a/games/vegastrike/cmake/FindPackageHandleStandardArgs.cmake b/games/vegastrike/cmake/FindPackageHandleStandardArgs.cmake new file mode 100644 index 0000000000..4fb08259a0 --- /dev/null +++ b/games/vegastrike/cmake/FindPackageHandleStandardArgs.cmake @@ -0,0 +1,466 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindPackageHandleStandardArgs +----------------------------- + +This module provides a function intended to be used in :ref:`Find Modules` +implementing :command:`find_package(<PackageName>)` calls. It handles the +``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``. +It also sets the ``<PackageName>_FOUND`` variable. The package is +considered found if all variables listed contain valid results, e.g. +valid filepaths. + +.. command:: find_package_handle_standard_args + + There are two signatures:: + + find_package_handle_standard_args(<PackageName> + (DEFAULT_MSG|<custom-failure-message>) + <required-var>... + ) + + find_package_handle_standard_args(<PackageName> + [FOUND_VAR <result-var>] + [REQUIRED_VARS <required-var>...] + [VERSION_VAR <version-var>] + [HANDLE_COMPONENTS] + [CONFIG_MODE] + [NAME_MISMATCHED] + [REASON_FAILURE_MESSAGE <reason-failure-message>] + [FAIL_MESSAGE <custom-failure-message>] + ) + + The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all + the variables ``<required-var>...`` are valid and any optional + constraints are satisfied, and ``FALSE`` otherwise. A success or + failure message may be displayed based on the results and on + whether the ``REQUIRED`` and/or ``QUIET`` option was given to + the :command:`find_package` call. + + The options are: + + ``(DEFAULT_MSG|<custom-failure-message>)`` + In the simple signature this specifies the failure message. + Use ``DEFAULT_MSG`` to ask for a default message to be computed + (recommended). Not valid in the full signature. + + ``FOUND_VAR <result-var>`` + Obsolete. Specifies either ``<PackageName>_FOUND`` or + ``<PACKAGENAME>_FOUND`` as the result variable. This exists only + for compatibility with older versions of CMake and is now ignored. + Result variables of both names are always set for compatibility. + + ``REQUIRED_VARS <required-var>...`` + Specify the variables which are required for this package. + These may be named in the generated failure message asking the + user to set the missing variable values. Therefore these should + typically be cache entries such as ``FOO_LIBRARY`` and not output + variables like ``FOO_LIBRARIES``. This option is mandatory if + ``HANDLE_COMPONENTS`` is not specified. + + ``VERSION_VAR <version-var>`` + Specify the name of a variable that holds the version of the package + that has been found. This version will be checked against the + (potentially) specified required version given to the + :command:`find_package` call, including its ``EXACT`` option. + The default messages include information about the required + version and the version which has been actually found, both + if the version is ok or not. + + ``HANDLE_COMPONENTS`` + Enable handling of package components. In this case, the command + will report which components have been found and which are missing, + and the ``<PackageName>_FOUND`` variable will be set to ``FALSE`` + if any of the required components (i.e. not the ones listed after + the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are + missing. + + ``CONFIG_MODE`` + Specify that the calling find module is a wrapper around a + call to ``find_package(<PackageName> NO_MODULE)``. This implies + a ``VERSION_VAR`` value of ``<PackageName>_VERSION``. The command + will automatically check whether the package configuration file + was found. + + ``REASON_FAILURE_MESSAGE <reason-failure-message>`` + Specify a custom message of the reason for the failure which will be + appended to the default generated message. + + ``FAIL_MESSAGE <custom-failure-message>`` + Specify a custom failure message instead of using the default + generated message. Not recommended. + + ``NAME_MISMATCHED`` + Indicate that the ``<PackageName>`` does not match + ``${CMAKE_FIND_PACKAGE_NAME}``. This is usually a mistake and raises a + warning, but it may be intentional for usage of the command for components + of a larger package. + +Example for the simple signature: + +.. code-block:: cmake + + find_package_handle_standard_args(LibXml2 DEFAULT_MSG + LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) + +The ``LibXml2`` package is considered to be found if both +``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid. +Then also ``LibXml2_FOUND`` is set to ``TRUE``. If it is not found +and ``REQUIRED`` was used, it fails with a +:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was +used or not. If it is found, success will be reported, including +the content of the first ``<required-var>``. On repeated CMake runs, +the same message will not be printed again. + +.. note:: + + If ``<PackageName>`` does not match ``CMAKE_FIND_PACKAGE_NAME`` for the + calling module, a warning that there is a mismatch is given. The + ``FPHSA_NAME_MISMATCHED`` variable may be set to bypass the warning if using + the old signature and the ``NAME_MISMATCHED`` argument using the new + signature. To avoid forcing the caller to require newer versions of CMake for + usage, the variable's value will be used if defined when the + ``NAME_MISMATCHED`` argument is not passed for the new signature (but using + both is an error).. + +Example for the full signature: + +.. code-block:: cmake + + find_package_handle_standard_args(LibArchive + REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR + VERSION_VAR LibArchive_VERSION) + +In this case, the ``LibArchive`` package is considered to be found if +both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid. +Also the version of ``LibArchive`` will be checked by using the version +contained in ``LibArchive_VERSION``. Since no ``FAIL_MESSAGE`` is given, +the default messages will be printed. + +Another example for the full signature: + +.. code-block:: cmake + + find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) + find_package_handle_standard_args(Automoc4 CONFIG_MODE) + +In this case, a ``FindAutmoc4.cmake`` module wraps a call to +``find_package(Automoc4 NO_MODULE)`` and adds an additional search +directory for ``automoc4``. Then the call to +``find_package_handle_standard_args`` produces a proper success/failure +message. +#]=======================================================================] + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) + +# internal helper macro +macro(_FPHSA_FAILURE_MESSAGE _msg) + set (__msg "${_msg}") + if (FPHSA_REASON_FAILURE_MESSAGE) + string(APPEND __msg "\n Reason given by package: ${FPHSA_REASON_FAILURE_MESSAGE}\n") + endif() + if (${_NAME}_FIND_REQUIRED) + message(FATAL_ERROR "${__msg}") + else () + if (NOT ${_NAME}_FIND_QUIETLY) + message(STATUS "${__msg}") + endif () + endif () +endmacro() + + +# internal helper macro to generate the failure message when used in CONFIG_MODE: +macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + # <PackageName>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: + if(${_NAME}_CONFIG) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing:${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") + else() + # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. + # List them all in the error message: + if(${_NAME}_CONSIDERED_CONFIGS) + set(configsText "") + list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) + math(EXPR configsCount "${configsCount} - 1") + foreach(currentConfigIndex RANGE ${configsCount}) + list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) + list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) + string(APPEND configsText "\n ${filename} (version ${version})") + endforeach() + if (${_NAME}_NOT_FOUND_MESSAGE) + if (FPHSA_REASON_FAILURE_MESSAGE) + string(PREPEND FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}\n ") + else() + set(FPHSA_REASON_FAILURE_MESSAGE "${${_NAME}_NOT_FOUND_MESSAGE}") + endif() + else() + string(APPEND configsText "\n") + endif() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:${configsText}") + + else() + # Simple case: No Config-file was found at all: + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") + endif() + endif() +endmacro() + + +function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) + + # Set up the arguments for `cmake_parse_arguments`. + set(options CONFIG_MODE HANDLE_COMPONENTS NAME_MISMATCHED) + set(oneValueArgs FAIL_MESSAGE REASON_FAILURE_MESSAGE VERSION_VAR FOUND_VAR) + set(multiValueArgs REQUIRED_VARS) + + # Check whether we are in 'simple' or 'extended' mode: + set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) + list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) + + unset(FPHSA_NAME_MISMATCHED_override) + if (DEFINED FPHSA_NAME_MISMATCHED) + # If the variable NAME_MISMATCHED variable is set, error if it is passed as + # an argument. The former is for old signatures, the latter is for new + # signatures. + list(FIND ARGN "NAME_MISMATCHED" name_mismatched_idx) + if (NOT name_mismatched_idx EQUAL "-1") + message(FATAL_ERROR + "The `NAME_MISMATCHED` argument may only be specified by the argument or " + "the variable, not both.") + endif () + + # But use the variable if it is not an argument to avoid forcing minimum + # CMake version bumps for calling modules. + set(FPHSA_NAME_MISMATCHED_override "${FPHSA_NAME_MISMATCHED}") + endif () + + if(${INDEX} EQUAL -1) + set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) + set(FPHSA_REQUIRED_VARS ${ARGN}) + set(FPHSA_VERSION_VAR) + else() + cmake_parse_arguments(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) + + if(FPHSA_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") + endif() + + if(NOT FPHSA_FAIL_MESSAGE) + set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") + endif() + + # In config-mode, we rely on the variable <PackageName>_CONFIG, which is set by find_package() + # when it successfully found the config-file, including version checking: + if(FPHSA_CONFIG_MODE) + list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) + list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) + set(FPHSA_VERSION_VAR ${_NAME}_VERSION) + endif() + + if(NOT FPHSA_REQUIRED_VARS AND NOT FPHSA_HANDLE_COMPONENTS) + message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") + endif() + endif() + + if (DEFINED FPHSA_NAME_MISMATCHED_override) + set(FPHSA_NAME_MISMATCHED "${FPHSA_NAME_MISMATCHED_override}") + endif () + + if (DEFINED CMAKE_FIND_PACKAGE_NAME + AND NOT FPHSA_NAME_MISMATCHED + AND NOT _NAME STREQUAL CMAKE_FIND_PACKAGE_NAME) + message(AUTHOR_WARNING + "The package name passed to `find_package_handle_standard_args` " + "(${_NAME}) does not match the name of the calling package " + "(${CMAKE_FIND_PACKAGE_NAME}). This can lead to problems in calling " + "code that expects `find_package` result variables (e.g., `_FOUND`) " + "to follow a certain pattern.") + endif () + +# now that we collected all arguments, process them + + if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") + set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") + endif() + + if (FPHSA_REQUIRED_VARS) + list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) + endif() + + string(TOUPPER ${_NAME} _NAME_UPPER) + string(TOLOWER ${_NAME} _NAME_LOWER) + + if(FPHSA_FOUND_VAR) + set(_FOUND_VAR_UPPER ${_NAME_UPPER}_FOUND) + set(_FOUND_VAR_MIXED ${_NAME}_FOUND) + if(FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_MIXED OR FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_UPPER) + set(_FOUND_VAR ${FPHSA_FOUND_VAR}) + else() + message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_FOUND_VAR_MIXED}\" and \"${_FOUND_VAR_UPPER}\" are valid names.") + endif() + else() + set(_FOUND_VAR ${_NAME_UPPER}_FOUND) + endif() + + # collect all variables which were not found, so they can be printed, so the + # user knows better what went wrong (#6375) + set(MISSING_VARS "") + set(DETAILS "") + # check if all passed variables are valid + set(FPHSA_FOUND_${_NAME} TRUE) + foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) + if(NOT ${_CURRENT_VAR}) + set(FPHSA_FOUND_${_NAME} FALSE) + string(APPEND MISSING_VARS " ${_CURRENT_VAR}") + else() + string(APPEND DETAILS "[${${_CURRENT_VAR}}]") + endif() + endforeach() + if(FPHSA_FOUND_${_NAME}) + set(${_NAME}_FOUND TRUE) + set(${_NAME_UPPER}_FOUND TRUE) + else() + set(${_NAME}_FOUND FALSE) + set(${_NAME_UPPER}_FOUND FALSE) + endif() + + # component handling + unset(FOUND_COMPONENTS_MSG) + unset(MISSING_COMPONENTS_MSG) + + if(FPHSA_HANDLE_COMPONENTS) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(${_NAME}_${comp}_FOUND) + + if(NOT DEFINED FOUND_COMPONENTS_MSG) + set(FOUND_COMPONENTS_MSG "found components:") + endif() + string(APPEND FOUND_COMPONENTS_MSG " ${comp}") + + else() + + if(NOT DEFINED MISSING_COMPONENTS_MSG) + set(MISSING_COMPONENTS_MSG "missing components:") + endif() + string(APPEND MISSING_COMPONENTS_MSG " ${comp}") + + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + string(APPEND MISSING_VARS " ${comp}") + endif() + + endif() + endforeach() + set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") + string(APPEND DETAILS "[c${COMPONENT_MSG}]") + endif() + + # version handling: + set(VERSION_MSG "") + set(VERSION_OK TRUE) + + # check with DEFINED here as the requested or found version may be "0" + if (DEFINED ${_NAME}_FIND_VERSION) + if(DEFINED ${FPHSA_VERSION_VAR}) + set(_FOUND_VERSION ${${FPHSA_VERSION_VAR}}) + + if(${_NAME}_FIND_VERSION_EXACT) # exact version required + # count the dots in the version string + string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${_FOUND_VERSION}") + # add one dot because there is one dot more than there are components + string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS) + if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT) + # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT + # is at most 4 here. Therefore a simple lookup table is used. + if (${_NAME}_FIND_VERSION_COUNT EQUAL 1) + set(_VERSION_REGEX "[^.]*") + elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2) + set(_VERSION_REGEX "[^.]*\\.[^.]*") + elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3) + set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*") + else () + set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") + endif () + string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${_FOUND_VERSION}") + unset(_VERSION_REGEX) + if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD) + set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + set(VERSION_OK FALSE) + else () + set(VERSION_MSG "(found suitable exact version \"${_FOUND_VERSION}\")") + endif () + unset(_VERSION_HEAD) + else () + if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _FOUND_VERSION) + set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + set(VERSION_OK FALSE) + else () + set(VERSION_MSG "(found suitable exact version \"${_FOUND_VERSION}\")") + endif () + endif () + unset(_VERSION_DOTS) + + else() # minimum version specified: + if (${_NAME}_FIND_VERSION VERSION_GREATER _FOUND_VERSION) + set(VERSION_MSG "Found unsuitable version \"${_FOUND_VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") + set(VERSION_OK FALSE) + else () + set(VERSION_MSG "(found suitable version \"${_FOUND_VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")") + endif () + endif() + + else() + + # if the package was not found, but a version was given, add that to the output: + if(${_NAME}_FIND_VERSION_EXACT) + set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") + else() + set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") + endif() + + endif() + else () + # Check with DEFINED as the found version may be 0. + if(DEFINED ${FPHSA_VERSION_VAR}) + set(VERSION_MSG "(found version \"${${FPHSA_VERSION_VAR}}\")") + endif() + endif () + + if(VERSION_OK) + string(APPEND DETAILS "[v${${FPHSA_VERSION_VAR}}(${${_NAME}_FIND_VERSION})]") + else() + set(${_NAME}_FOUND FALSE) + endif() + + + # print the result: + if (${_NAME}_FOUND) + FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") + else () + + if(FPHSA_CONFIG_MODE) + _FPHSA_HANDLE_FAILURE_CONFIG_MODE() + else() + if(NOT VERSION_OK) + set(RESULT_MSG) + if (_FIRST_REQUIRED_VAR) + string (APPEND RESULT_MSG "found ${${_FIRST_REQUIRED_VAR}}") + endif() + if (COMPONENT_MSG) + if (RESULT_MSG) + string (APPEND RESULT_MSG ", ") + endif() + string (APPEND RESULT_MSG "${FOUND_COMPONENTS_MSG}") + endif() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (${RESULT_MSG})") + else() + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}") + endif() + endif() + + endif () + + set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) + set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE) +endfunction() diff --git a/games/vegastrike/cmake/FindPackageMessage.cmake b/games/vegastrike/cmake/FindPackageMessage.cmake new file mode 100644 index 0000000000..0628b98169 --- /dev/null +++ b/games/vegastrike/cmake/FindPackageMessage.cmake @@ -0,0 +1,48 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindPackageMessage +------------------ + +.. code-block:: cmake + + find_package_message(<name> "message for user" "find result details") + +This function is intended to be used in FindXXX.cmake modules files. +It will print a message once for each unique find result. This is +useful for telling the user where a package was found. The first +argument specifies the name (XXX) of the package. The second argument +specifies the message to display. The third argument lists details +about the find result so that if they change the message will be +displayed again. The macro also obeys the QUIET argument to the +find_package command. + +Example: + +.. code-block:: cmake + + if(X11_FOUND) + find_package_message(X11 "Found X11: ${X11_X11_LIB}" + "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") + else() + ... + endif() +#]=======================================================================] + +function(find_package_message pkg msg details) + # Avoid printing a message repeatedly for the same find result. + if(NOT ${pkg}_FIND_QUIETLY) + string(REPLACE "\n" "" details "${details}") + set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) + if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") + # The message has not yet been printed. + message(STATUS "${msg}") + + # Save the find details in the cache to avoid printing the same + # message again. + set("${DETAILS_VAR}" "${details}" + CACHE INTERNAL "Details about finding ${pkg}") + endif() + endif() +endfunction() diff --git a/games/vegastrike/cmake/SelectLibraryConfigurations.cmake b/games/vegastrike/cmake/SelectLibraryConfigurations.cmake new file mode 100644 index 0000000000..4c0e9a8c0a --- /dev/null +++ b/games/vegastrike/cmake/SelectLibraryConfigurations.cmake @@ -0,0 +1,80 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +SelectLibraryConfigurations +--------------------------- + +.. code-block:: cmake + + select_library_configurations(basename) + +This macro takes a library base name as an argument, and will choose +good values for the variables + +:: + + basename_LIBRARY + basename_LIBRARIES + basename_LIBRARY_DEBUG + basename_LIBRARY_RELEASE + +depending on what has been found and set. + +If only ``basename_LIBRARY_RELEASE`` is defined, ``basename_LIBRARY`` will +be set to the release value, and ``basename_LIBRARY_DEBUG`` will be set +to ``basename_LIBRARY_DEBUG-NOTFOUND``. If only ``basename_LIBRARY_DEBUG`` +is defined, then ``basename_LIBRARY`` will take the debug value, and +``basename_LIBRARY_RELEASE`` will be set to ``basename_LIBRARY_RELEASE-NOTFOUND``. + +If the generator supports configuration types, then ``basename_LIBRARY`` +and ``basename_LIBRARIES`` will be set with debug and optimized flags +specifying the library to be used for the given configuration. If no +build type has been set or the generator in use does not support +configuration types, then ``basename_LIBRARY`` and ``basename_LIBRARIES`` +will take only the release value, or the debug value if the release one +is not set. +#]=======================================================================] + +# This macro was adapted from the FindQt4 CMake module and is maintained by Will +# Dicharry <wdicharry@stellarscience.com>. + +macro(select_library_configurations basename) + if(NOT ${basename}_LIBRARY_RELEASE) + set(${basename}_LIBRARY_RELEASE "${basename}_LIBRARY_RELEASE-NOTFOUND" CACHE FILEPATH "Path to a library.") + endif() + if(NOT ${basename}_LIBRARY_DEBUG) + set(${basename}_LIBRARY_DEBUG "${basename}_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "Path to a library.") + endif() + + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND + NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE AND + ( _isMultiConfig OR CMAKE_BUILD_TYPE ) ) + # if the generator is multi-config or if CMAKE_BUILD_TYPE is set for + # single-config generators, set optimized and debug libraries + set( ${basename}_LIBRARY "" ) + foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) + list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) + endforeach() + foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) + list( APPEND ${basename}_LIBRARY debug "${_libname}" ) + endforeach() + elseif( ${basename}_LIBRARY_RELEASE ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + elseif( ${basename}_LIBRARY_DEBUG ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG} ) + else() + set( ${basename}_LIBRARY "${basename}_LIBRARY-NOTFOUND") + endif() + + set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) + + if( ${basename}_LIBRARY ) + set( ${basename}_FOUND TRUE ) + endif() + + mark_as_advanced( ${basename}_LIBRARY_RELEASE + ${basename}_LIBRARY_DEBUG + ) +endmacro() diff --git a/games/vegastrike/patches/patch-0.5.1.r1_2 b/games/vegastrike/patches/patch-0.5.1.r1_2 index 7780674c0c..8f6d622177 100644 --- a/games/vegastrike/patches/patch-0.5.1.r1_2 +++ b/games/vegastrike/patches/patch-0.5.1.r1_2 @@ -1,6 +1,6 @@ -diff -ruN ./CMakeLists.txt ../c/CMakeLists.txt +diff -ruN ./CMakeLists.txt ../b/CMakeLists.txt --- ./CMakeLists.txt 2012-03-26 02:50:49.000000000 +0200 -+++ ../c/CMakeLists.txt 2020-09-03 16:25:55.870086658 +0200 ++++ ../b/CMakeLists.txt 2020-09-02 22:37:20.707393347 +0200 @@ -10,7 +10,7 @@ project (vsUTCS) @@ -10,7 +10,56 @@ diff -ruN ./CMakeLists.txt ../c/CMakeLists.txt include_directories(${vsUTCS_SOURCE_DIR}/src ${vsUTCS_SOURCE_DIR}/src/cmd -@@ -828,33 +828,33 @@ +@@ -685,14 +685,42 @@ + SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${vsUTCS_SOURCE_DIR}) + + +-find_package(PythonLibs REQUIRED) +-IF(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) +- SET(TST_INCLUDES ${PYTHON_INCLUDE_PATH}) ++#find_package(PythonLibs REQUIRED) ++#IF(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) ++# SET(TST_INCLUDES ${PYTHON_INCLUDE_PATH}) ++# SET(TST_LIBS ${PYTHON_LIBRARIES}) ++# SET(HAVE_PYTHON 1) ++#ELSE(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) ++# message(FATAL_ERROR "Can't find python") ++#ENDIF(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) ++ ++# Python 3 has a SASL compatibility issue which causes an error ++# on some installations that prefer Python 3 ++# -- Python 2.7 is default for now ++OPTION(USE_PYTHON_3 "Use Python 3 instead of Python 2.7 (default is 2.7)" OFF) ++IF (USE_PYTHON_3) ++ # We want at least Python 3.4, but we prefer newer versions ++ SET(Python_ADDITIONAL_VERSIONS 3.8 3.7 3.6 3.5 3.4) ++ELSE (USE_PYTHON_3) ++ SET(Python_ADDITIONAL_VERSIONS 2.7) ++ENDIF (USE_PYTHON_3) ++# If we don't unset cache variables ++# ccmake won't pick up changes to the USE_PYTHON_3 option ++UNSET(PYTHON_INCLUDE_DIR CACHE) ++UNSET(PYTHON_LIBRARY CACHE) ++# The python version we want is set via Python_ADDITIONAL_VERSIONS ++MESSAGE("++ Python release(s) searched for : ${Python_ADDITIONAL_VERSIONS}") ++FIND_PACKAGE(PythonLibs REQUIRED) ++MESSAGE("++ Python library : ${PYTHON_LIBRARY} (${PYTHONLIBS_VERSION_STRING})") ++MESSAGE("++ Python include dir : ${PYTHON_INCLUDE_DIR}") ++IF (PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS) ++ SET(TST_INCLUDES ${PYTHON_INCLUDE_DIRS}) + SET(TST_LIBS ${PYTHON_LIBRARIES}) + SET(HAVE_PYTHON 1) +-ELSE(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) +- message(FATAL_ERROR "Can't find python") +-ENDIF(PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_PATH) ++ELSE (PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS) ++ MESSAGE(FATAL_ERROR "Can't find python") ++ENDIF (PYTHONLIBS_FOUND OR PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS) ++ + + # Find Boost with boost_python library + OPTION(USE_SYSTEM_BOOST "Use system boost" OFF) +@@ -828,33 +856,33 @@ #Find FFMpeg @@ -68,7 +117,7 @@ diff -ruN ./CMakeLists.txt ../c/CMakeLists.txt IF(NOT BEOS) FIND_LIBRARY(UTIL_LIB util) -@@ -977,12 +977,12 @@ +@@ -977,12 +1005,12 @@ HAVE_AVFORMAT_H HAVE_AVCODEC_H HAVE_AVIO_H @@ -86,9 +135,9 @@ diff -ruN ./CMakeLists.txt ../c/CMakeLists.txt GTK2_ATK_INCLUDE_DIR GTK2_ATK_LIBRARY GTK2_CAIRO_INCLUDE_DIR -diff -ruN ./objconv/basemaker/base_maker_texture.cpp ../c/objconv/basemaker/base_maker_texture.cpp +diff -ruN ./objconv/basemaker/base_maker_texture.cpp ../b/objconv/basemaker/base_maker_texture.cpp --- ./objconv/basemaker/base_maker_texture.cpp 2010-03-10 03:56:23.000000000 +0100 -+++ ../c/objconv/basemaker/base_maker_texture.cpp 2020-09-03 16:25:55.871086646 +0200 ++++ ../b/objconv/basemaker/base_maker_texture.cpp 2020-09-02 15:08:07.760351554 +0200 @@ -6,9 +6,12 @@ #define XMD_H #define HAVE_BOOLEAN @@ -102,9 +151,9 @@ diff -ruN ./objconv/basemaker/base_maker_texture.cpp ../c/objconv/basemaker/base } #define strip_16 true -diff -ruN ./objconv/mesher/to_OgreMesh.cpp ../c/objconv/mesher/to_OgreMesh.cpp +diff -ruN ./objconv/mesher/to_OgreMesh.cpp ../b/objconv/mesher/to_OgreMesh.cpp --- ./objconv/mesher/to_OgreMesh.cpp 2011-06-02 01:47:36.000000000 +0200 -+++ ../c/objconv/mesher/to_OgreMesh.cpp 2020-09-03 16:25:55.872086633 +0200 ++++ ../b/objconv/mesher/to_OgreMesh.cpp 2020-09-02 15:08:07.762351529 +0200 @@ -1078,10 +1078,15 @@ Ogre::VertexDeclaration *newDcl = data->vertexDeclaration->getAutoOrganisedDeclaration( @@ -187,9 +236,9 @@ diff -ruN ./objconv/mesher/to_OgreMesh.cpp ../c/objconv/mesher/to_OgreMesh.cpp void DoneMeshes( void *outputcontext ) { -diff -ruN ./objconv/mesher/to_OgreMesh.h ../c/objconv/mesher/to_OgreMesh.h +diff -ruN ./objconv/mesher/to_OgreMesh.h ../b/objconv/mesher/to_OgreMesh.h --- ./objconv/mesher/to_OgreMesh.h 2010-02-25 16:22:25.000000000 +0100 -+++ ../c/objconv/mesher/to_OgreMesh.h 2020-09-03 16:25:55.873086621 +0200 ++++ ../b/objconv/mesher/to_OgreMesh.h 2020-09-02 15:08:07.763351517 +0200 @@ -20,7 +20,7 @@ float RadialSize( void *outputcontext ); //returns the size of the resulting mesh (it's maximum distance from 0,0,0). Useful for LODding. @@ -199,9 +248,9 @@ diff -ruN ./objconv/mesher/to_OgreMesh.h ../c/objconv/mesher/to_OgreMesh.h void AutoEdgeList( void *outputcontext ); //a good idea - prepares the mesh for stencil shadows void AutoTangents( void *outputcontext ); //prepares the mesh for normal mapping (only needed if the material uses normal mapping) } -diff -ruN ./setup/src/c/setup.cpp ../c/setup/src/c/setup.cpp +diff -ruN ./setup/src/c/setup.cpp ../b/setup/src/c/setup.cpp --- ./setup/src/c/setup.cpp 2011-03-15 01:28:47.000000000 +0100 -+++ ../c/setup/src/c/setup.cpp 2020-09-03 16:25:55.873086621 +0200 ++++ ../b/setup/src/c/setup.cpp 2020-09-02 15:08:07.764351504 +0200 @@ -110,10 +110,22 @@ return 1; } @@ -250,9 +299,9 @@ diff -ruN ./setup/src/c/setup.cpp ../c/setup/src/c/setup.cpp //Win32 data should be "." char tmppath[16384]; for (vector< string >::iterator vsit = data_paths.begin(); vsit != data_paths.end(); vsit++) { -diff -ruN ./setup/src/include/central.cpp ../c/setup/src/include/central.cpp +diff -ruN ./setup/src/include/central.cpp ../b/setup/src/include/central.cpp --- ./setup/src/include/central.cpp 2004-10-25 04:27:13.000000000 +0200 -+++ ../c/setup/src/include/central.cpp 2020-09-03 17:45:35.786329482 +0200 ++++ ../b/setup/src/include/central.cpp 2020-09-03 02:22:34.948442084 +0200 @@ -20,6 +20,8 @@ struct group GROUPS; struct global_settings CONFIG; @@ -271,9 +320,9 @@ diff -ruN ./setup/src/include/central.cpp ../c/setup/src/include/central.cpp } struct catagory *GetCatStruct(char *name) { -diff -ruN ./src/cmd/music.cpp ../c/src/cmd/music.cpp +diff -ruN ./src/cmd/music.cpp ../b/src/cmd/music.cpp --- ./src/cmd/music.cpp 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/cmd/music.cpp 2020-09-03 16:25:55.874086608 +0200 ++++ ../b/src/cmd/music.cpp 2020-09-02 15:08:07.765351492 +0200 @@ -448,7 +448,9 @@ if (foundcache) { *me->music_load_info = wherecache->second; @@ -285,9 +334,9 @@ diff -ruN ./src/cmd/music.cpp ../c/src/cmd/music.cpp } if (me->freeWav && docacheme) { me->freeWav = false; -diff -ruN ./src/cmd/unit.cpp ../c/src/cmd/unit.cpp +diff -ruN ./src/cmd/unit.cpp ../b/src/cmd/unit.cpp --- ./src/cmd/unit.cpp 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/cmd/unit.cpp 2020-09-03 16:25:55.875086596 +0200 ++++ ../b/src/cmd/unit.cpp 2020-09-02 15:56:51.644797969 +0200 @@ -80,6 +80,7 @@ template < class UnitType >GameUnit< UnitType >::GameUnit( int ) : sparkle_accum( 0 ) , phalos( new HaloSystem() ) @@ -311,9 +360,9 @@ diff -ruN ./src/cmd/unit.cpp ../c/src/cmd/unit.cpp } template < class UnitType >GameUnit< UnitType >::~GameUnit() -diff -ruN ./src/cmd/unit_collide.h ../c/src/cmd/unit_collide.h +diff -ruN ./src/cmd/unit_collide.h ../b/src/cmd/unit_collide.h --- ./src/cmd/unit_collide.h 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/cmd/unit_collide.h 2020-09-03 17:34:09.178913256 +0200 ++++ ../b/src/cmd/unit_collide.h 2020-09-02 21:27:47.524565312 +0200 @@ -94,9 +94,9 @@ { if ( !hugeobjects.empty() ) @@ -326,9 +375,30 @@ diff -ruN ./src/cmd/unit_collide.h ../c/src/cmd/unit_collide.h hb.clear(); acc_huge.clear(); act_huge.clear(); -diff -ruN ./src/cmd/unit_generic.cpp ../c/src/cmd/unit_generic.cpp +diff -ruN ./src/cmd/unit_generic.cpp ../b/src/cmd/unit_generic.cpp --- ./src/cmd/unit_generic.cpp 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/cmd/unit_generic.cpp 2020-09-03 16:25:55.879086546 +0200 ++++ ../b/src/cmd/unit_generic.cpp 2020-09-02 21:47:36.695698627 +0200 +@@ -630,13 +630,13 @@ + jump.drive = -1; + } + +-float copysign( float x, float y ) +-{ +- if (y > 0) +- return x; +- else +- return -x; +-} ++//float copysign( float x, float y ) ++//{ ++// if (y > 0) ++// return x; ++// else ++// return -x; ++//} + + float rand01() + { @@ -4903,16 +4903,26 @@ static const string LOAD_FAILED = "LOAD_FAILED"; @@ -423,9 +493,9 @@ diff -ruN ./src/cmd/unit_generic.cpp ../c/src/cmd/unit_generic.cpp if (tmpammo > mounts[jmod].ammo) { cancompletefully = true; if (touchme) -diff -ruN ./src/cmd/unit_jump.h ../c/src/cmd/unit_jump.h +diff -ruN ./src/cmd/unit_jump.h ../b/src/cmd/unit_jump.h --- ./src/cmd/unit_jump.h 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/cmd/unit_jump.h 2020-09-03 16:25:55.880086533 +0200 ++++ ../b/src/cmd/unit_jump.h 2020-09-02 15:08:07.766351479 +0200 @@ -108,7 +108,7 @@ (tester = *i) != NULL; ++i)
if (tester->isUnit() == UNITPTR && tester != this)
@@ -435,9 +505,21 @@ diff -ruN ./src/cmd/unit_jump.h ../c/src/cmd/unit_jump.h *( 4*( this->rSize()+tester->rSize() ) ) );
DealPossibleJumpDamage( this );
static int jumparrive = AUDCreateSound( vs_config->getVariable( "unitaudio", "jumparrive", "sfx43.wav" ), false );
-diff -ruN ./src/gfx/cockpit_xml.cpp ../c/src/gfx/cockpit_xml.cpp +diff -ruN ./src/cmd/unit_physics.h ../b/src/cmd/unit_physics.h +--- ./src/cmd/unit_physics.h 2012-03-19 09:20:14.000000000 +0100 ++++ ../b/src/cmd/unit_physics.h 2020-09-03 00:27:15.498947107 +0200 +@@ -41,7 +41,7 @@ + #include "networking/lowlevel/vsnet_clientstate.h"
+ #include "networking/netclient.h"
+
+-extern float copysign( float x, float y );
++//extern float copysign( float x, float y );
+
+ extern unsigned int apply_float_to_unsigned_int( float tmp ); //short fix
+
+diff -ruN ./src/gfx/cockpit_xml.cpp ../b/src/gfx/cockpit_xml.cpp --- ./src/gfx/cockpit_xml.cpp 2010-12-15 09:53:40.000000000 +0100 -+++ ../c/src/gfx/cockpit_xml.cpp 2020-09-03 16:30:00.313030701 +0200 ++++ ../b/src/gfx/cockpit_xml.cpp 2020-09-03 00:14:13.810719555 +0200 @@ -315,7 +315,7 @@ for (counter = 0; counter < 4; ++counter) if (!replaced[counter]) { @@ -447,9 +529,9 @@ diff -ruN ./src/gfx/cockpit_xml.cpp ../c/src/gfx/cockpit_xml.cpp } break; case UnitImages< void >::SHIELD4: -diff -ruN ./src/gfx/quadsquare.cpp ../c/src/gfx/quadsquare.cpp +diff -ruN ./src/gfx/quadsquare.cpp ../b/src/gfx/quadsquare.cpp --- ./src/gfx/quadsquare.cpp 2010-03-10 06:27:01.000000000 +0100 -+++ ../c/src/gfx/quadsquare.cpp 2020-09-03 16:25:55.881086521 +0200 ++++ ../b/src/gfx/quadsquare.cpp 2020-09-02 15:08:07.767351467 +0200 @@ -13,9 +13,9 @@ #include <float.h> #include <math.h> @@ -461,9 +543,9 @@ diff -ruN ./src/gfx/quadsquare.cpp ../c/src/gfx/quadsquare.cpp using std::vector; unsigned int*quadsquare::VertexAllocated; -diff -ruN ./src/gui/text_area.cpp ../c/src/gui/text_area.cpp +diff -ruN ./src/gui/text_area.cpp ../b/src/gui/text_area.cpp --- ./src/gui/text_area.cpp 2010-02-25 15:26:53.000000000 +0100 -+++ ../c/src/gui/text_area.cpp 2020-09-03 17:46:51.883378138 +0200 ++++ ../b/src/gui/text_area.cpp 2020-09-03 00:05:06.687559535 +0200 @@ -32,6 +32,8 @@ * }; */ @@ -482,9 +564,9 @@ diff -ruN ./src/gui/text_area.cpp ../c/src/gui/text_area.cpp if (type == 1) return search->name; else return search->description; -diff -ruN ./src/networking/lowlevel/packetmem.cpp ../c/src/networking/lowlevel/packetmem.cpp +diff -ruN ./src/networking/lowlevel/packetmem.cpp ../b/src/networking/lowlevel/packetmem.cpp --- ./src/networking/lowlevel/packetmem.cpp 2008-03-31 10:20:19.000000000 +0200 -+++ ../c/src/networking/lowlevel/packetmem.cpp 2020-09-03 16:25:55.881086521 +0200 ++++ ../b/src/networking/lowlevel/packetmem.cpp 2020-09-02 15:08:07.768351454 +0200 @@ -102,7 +102,7 @@ } else @@ -494,9 +576,21 @@ diff -ruN ./src/networking/lowlevel/packetmem.cpp ../c/src/networking/lowlevel/p _len = 0; } } -diff -ruN ./src/pk3.cpp ../c/src/pk3.cpp +diff -ruN ./src/physics.h ../b/src/physics.h +--- ./src/physics.h 2011-02-12 04:19:03.000000000 +0100 ++++ ../b/src/physics.h 2020-09-02 21:32:31.049020768 +0200 +@@ -27,7 +27,7 @@ + static const float oocc = (float) 0.0000000000000000111265005605; //1/c^2 + static const float c = (float) 299792458.0; + static const float co10 = (float) 29979245.8; +-float copysign( float x, float y ); ++//float copysign( float x, float y ); + + struct Force + { +diff -ruN ./src/pk3.cpp ../b/src/pk3.cpp --- ./src/pk3.cpp 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/pk3.cpp 2020-09-03 16:31:12.819124250 +0200 ++++ ../b/src/pk3.cpp 2020-09-02 23:06:42.933362491 +0200 @@ -356,7 +356,7 @@ } //if the file isn't in the archive @@ -506,9 +600,59 @@ diff -ruN ./src/pk3.cpp ../c/src/pk3.cpp int flength = GetFileLen( index ); buffer = new char[flength]; -diff -ruN ./src/vsfilesystem.cpp ../c/src/vsfilesystem.cpp +diff -ruN ./src/python/python_compile.h ../b/src/python/python_compile.h +--- ./src/python/python_compile.h 2010-02-25 16:44:43.000000000 +0100 ++++ ../b/src/python/python_compile.h 2020-09-02 21:07:32.272758050 +0200 +@@ -10,6 +10,7 @@ + #include "hashtable.h" + #include <string> + #include <compile.h> ++#include <boost/version.hpp> + + extern Hashtable< std::string, PyCodeObject, 1023 >compiled_python; + +@@ -40,8 +41,11 @@ + switch (type) + { + case MYSTRING: ++#if BOOST_VERSION <= 104500 + return PyString_FromString( objects.c_str() ); +- ++#else ++ return PyUnicode_FromString( objects.c_str() ); ++#endif + case MYLONG: + return PyLong_FromLong( objecti ); + +diff -ruN ./src/ship_commands.cpp ../b/src/ship_commands.cpp +--- ./src/ship_commands.cpp 2012-03-19 09:20:14.000000000 +0100 ++++ ../b/src/ship_commands.cpp 2020-09-03 00:11:42.010617317 +0200 +@@ -5,14 +5,14 @@ + #include "universe_util.h" + #include "gldrv/winsys.h" + +-static inline float fmin( float a, float b ) +-{ +- return (a < b) ? a : b; +-} +-static inline float fmax( float a, float b ) +-{ +- return (a > b) ? a : b; +-} ++//static inline float fmin( float a, float b ) ++//{ ++// return (a < b) ? a : b; ++//} ++//static inline float fmax( float a, float b ) ++//{ ++// return (a > b) ? a : b; ++//} + + class ShipCommands + { +diff -ruN ./src/vsfilesystem.cpp ../b/src/vsfilesystem.cpp --- ./src/vsfilesystem.cpp 2012-03-19 09:20:14.000000000 +0100 -+++ ../c/src/vsfilesystem.cpp 2020-09-03 16:25:55.882086508 +0200 ++++ ../b/src/vsfilesystem.cpp 2020-09-02 16:02:24.060642199 +0200 @@ -460,13 +460,15 @@ int vs_fprintf( FILE *fp, const char *format, ... ) diff --git a/games/vegastrike/vegastrike.SlackBuild b/games/vegastrike/vegastrike.SlackBuild index 77f7eebd21..4842fca4e9 100644 --- a/games/vegastrike/vegastrike.SlackBuild +++ b/games/vegastrike/vegastrike.SlackBuild @@ -84,6 +84,8 @@ tar xvf $CWD/$PRGSRCNAME$PRGSRCSUF cd $PRGSRCNAME +cp "$CWD/cmake"/*.cmake . + declare patchdir="$CWD/patches" patch -p0 < "$patchdir/patch-${VERSION}_$BUILD" @@ -113,6 +115,8 @@ cmake \ -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ -DCMAKE_SYSTEM_PROCESSOR=$ARCH \ -DDISABLE_SERVER=${DISABLE_SERVER:-ON} \ + -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST:-ON} \ + -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD:-11} \ .. make diff --git a/games/warmux/patches/return-null.patch b/games/warmux/patches/return-null.patch new file mode 100644 index 0000000000..851dfcbd16 --- /dev/null +++ b/games/warmux/patches/return-null.patch @@ -0,0 +1,11 @@ +--- src/interface/weapon_menu.cpp.orig 2016-05-09 15:22:36.895266463 +0200 ++++ src/interface/weapon_menu.cpp 2016-05-09 15:21:38.518476191 +0200 +@@ -391,7 +391,7 @@ + Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly) + { + if (!show) +- return false; ++ return NULL; + const std::vector<PolygonItem *>& items = poly->GetItem(); + WeaponMenuItem * tmp; + Interface::GetInstance()->SetCurrentOverflyWeapon(NULL); diff --git a/games/warmux/warmux.SlackBuild b/games/warmux/warmux.SlackBuild index 20cd3cd3a5..1c6d7ff6c7 100644 --- a/games/warmux/warmux.SlackBuild +++ b/games/warmux/warmux.SlackBuild @@ -80,6 +80,9 @@ patch -p1 < $CWD/patches/include-zlib.patch sed -i "s|SDLNet_Read32(buffer)|SDLNet_Read32(const_cast<char*>(buffer))|" \ lib/warmux/action/action.cpp +# Fix for gcc-6.x +patch -p0 < $CWD/patches/return-null.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -90,7 +93,7 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --program-prefix="" \ --program-suffix="" \ - --enable-fribidi \ + --disable-fribidi \ --enable-servers \ --build=$ARCH-slackware-linux diff --git a/games/widelands/widelands-gcc47.patch b/games/widelands/widelands-gcc47.patch deleted file mode 100644 index 9ea19c3571..0000000000 --- a/games/widelands/widelands-gcc47.patch +++ /dev/null @@ -1,12 +0,0 @@ -=== modified file 'src/main.cc' ---- src/main.cc 2012-02-15 21:25:34 +0000 -+++ src/main.cc 2012-05-02 07:43:01 +0000 -@@ -28,6 +28,7 @@ - #include <iostream> - #include <stdexcept> - #include <typeinfo> -+#include <unistd.h> - - #include <SDL_main.h> - - diff --git a/games/widelands/widelands.SlackBuild b/games/widelands/widelands.SlackBuild index 793f7a1215..bf77422829 100644 --- a/games/widelands/widelands.SlackBuild +++ b/games/widelands/widelands.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=widelands -VERSION=${VERSION:-build19} +VERSION=${VERSION:-build21} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -59,9 +59,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION-src -tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2 -cd $PRGNAM-$VERSION-src +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION-source.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,9 +69,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Fix compiling with gcc 4.7 -patch -p0 -i $CWD/widelands-gcc47.patch - mkdir -p build1 cd build1 cmake \ @@ -87,7 +84,7 @@ cd build1 cd .. mkdir -p $PKG/usr/bin -mv $PKG/usr/{widelands,wl_map_object_info,wl_render_richtext,wl_map_info} $PKG/usr/bin +mv $PKG/usr/{widelands,wl_map_object_info,wl_map_info,wl_create_spritesheet} $PKG/usr/bin mkdir -p $PKG/usr/share/applications install -m 0644 $CWD/widelands.desktop \ @@ -98,7 +95,6 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/{VERSION,ChangeLog,CREDITS,COPYING} $PKG/usr/doc/$PRGNAM-$VERSION -cp -a WL_RELEASE $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/widelands/widelands.info b/games/widelands/widelands.info index a98f31a43a..75ea359732 100644 --- a/games/widelands/widelands.info +++ b/games/widelands/widelands.info @@ -1,8 +1,8 @@ PRGNAM="widelands" -VERSION="build19" +VERSION="build21" HOMEPAGE="http://www.widelands.org" -DOWNLOAD="https://launchpad.net/widelands/build19/build19/+download/widelands-build19-src.tar.bz2" -MD5SUM="0ef7ccf021b8001056739f755500366d" +DOWNLOAD="https://launchpad.net/widelands/build21/build21/+download/widelands-build21-source.tar.gz" +MD5SUM="2933da247b2009f5608e92624d606851" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="SDL2_image SDL2_mixer SDL2_net SDL2_ttf lua" diff --git a/games/xu4/gcc7.patch b/games/xu4/gcc7.patch new file mode 100644 index 0000000000..29f2cceee4 --- /dev/null +++ b/games/xu4/gcc7.patch @@ -0,0 +1,90 @@ +--- xu4-20130612_svn/src/image_sdl.cpp.orig 2017-07-07 05:16:49.443617174 +0700 ++++ xu4-20130612_svn/src/image_sdl.cpp 2017-07-07 05:25:40.763657058 +0700 +@@ -349,7 +349,7 @@ + unsigned int y_finish = std::min(int(bottom), oy + span + 1); + for (y = y_start; y < y_finish; ++y) { + +- int divisor = 1 + span * 2 - abs(ox - x) - abs(oy - y); ++ int divisor = 1 + span * 2 - std::abs((long int) (ox - x)) - std::abs((long int) (oy - y)); + + unsigned int r, g, b, a; + getPixel(x, y, r, g, b, a); +--- xu4-20130612_svn/src/map.cpp.orig 2017-07-07 05:26:04.108658810 +0700 ++++ xu4-20130612_svn/src/map.cpp 2017-07-07 05:28:17.857668850 +0700 +@@ -123,14 +123,14 @@ + if (map && map->border_behavior == Map::BORDER_WRAP) { + MapCoords me = *this; + +- if (abs(me.x - c.x) > abs(me.x + map->width - c.x)) ++ if (std::abs((long int) (me.x - c.x)) > std::abs((long int) (me.x + map->width - c.x))) + me.x += map->width; +- else if (abs(me.x - c.x) > abs(me.x - map->width - c.x)) ++ else if (std::abs((long int) (me.x - c.x)) > std::abs((long int) (me.x - map->width - c.x))) + me.x -= map->width; + +- if (abs(me.y - c.y) > abs(me.y + map->width - c.y)) ++ if (std::abs((long int) (me.y - c.y)) > std::abs((long int) (me.y + map->width - c.y))) + me.y += map->height; +- else if (abs(me.y - c.y) > abs(me.y - map->width - c.y)) ++ else if (std::abs((long int) (me.y - c.y)) > std::abs((long int) (me.y - map->width - c.y))) + me.y -= map->height; + + dx = me.x - c.x; +--- xu4-20130612_svn/src/person.cpp.orig 2017-07-07 05:28:34.604670107 +0700 ++++ xu4-20130612_svn/src/person.cpp 2017-07-07 05:29:29.432674223 +0700 +@@ -221,7 +221,7 @@ + eventHandler->pushController(&getPlayerCtrl); + int player = getPlayerCtrl.waitFor(); + if (player != -1) { +- string player_str = to_string(player+1); ++ string player_str = to_string((long int) player+1); + script->setVar(script->getInputName(), player_str); + } + else script->unsetVar(script->getInputName()); +--- xu4-20130612_svn/src/script.cpp.orig 2017-07-07 05:29:46.242675485 +0700 ++++ xu4-20130612_svn/src/script.cpp 2017-07-07 05:31:00.015681023 +0700 +@@ -44,7 +44,7 @@ + + Script::Variable::Variable(const int &v) : set(true) { + i_val = v; +- s_val = to_string(v); ++ s_val = to_string((long int) v); + } + + int& Script::Variable::getInt() { return i_val; } +@@ -503,7 +503,7 @@ + } + // Get the current iterator for our loop + else if (item == "iterator") +- prop = to_string(this->iterator); ++ prop = to_string((long int) this->iterator); + else if ((pos = item.find("show_inventory:")) < item.length()) { + pos = item.find(":"); + string itemScript = item.substr(pos+1); +@@ -611,7 +611,7 @@ + if (content.empty()) + errorWarning("Error: empty math() function"); + +- prop = to_string(mathValue(content)); ++ prop = to_string((long int) mathValue(content)); + } + + /** +@@ -643,7 +643,7 @@ + + /* generate a random number */ + else if (funcName == "random") +- prop = to_string(xu4_random((int)strtol(content.c_str(), NULL, 10))); ++ prop = to_string((long int) xu4_random((int)strtol(content.c_str(), NULL, 10))); + + /* replaced with "true" if content is empty, or "false" if not */ + else if (funcName == "isempty") { +@@ -1391,7 +1391,7 @@ + string children_results; + + mathParseChildren(current, &children_results); +- *result = to_string(mathValue(children_results)); ++ *result = to_string((long int) mathValue(children_results)); + } + } + } diff --git a/games/xu4/xu4.SlackBuild b/games/xu4/xu4.SlackBuild index d4439ca2cc..08a91827bf 100644 --- a/games/xu4/xu4.SlackBuild +++ b/games/xu4/xu4.SlackBuild @@ -73,6 +73,9 @@ sed -i -e '/border\.png/s,^,//,' src/imagemgr.cpp # validate the game's XML files. So: sed -i '/#define *DEFAULT_VALIDATE_XML/s,1,0,' src/settings.h +# Patch for GCC 7 +patch -p1 < $CWD/gcc7.patch + # The -DNPERF stops u4 from creating a debug/ in the current dir. make -C src DEBUGCXXFLAGS="-DNPERF $SLKCFLAGS" prefix=/usr libdir=$PKGLIBDIR make -C src install prefix=$PKG/usr libdir=$PKGLIBDIR diff --git a/games/xye/xye.SlackBuild b/games/xye/xye.SlackBuild index 8487aecd40..fbe4eba763 100644 --- a/games/xye/xye.SlackBuild +++ b/games/xye/xye.SlackBuild @@ -72,7 +72,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -Wno-error=narrowing" \ ./configure \ --prefix=/usr \ --bindir=/usr/bin \ |