Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] build-style/cmake: set CMAKE_BUILD_TYPE to None
Date: Sun, 28 Mar 2021 05:53:02 +0200	[thread overview]
Message-ID: <20210328035302.cN_OP2Y5diz55kqmXREHKzIPIIT20Qidl_9QBKtbTjs@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29459@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages cmake-build-type-to-None
https://github.com/void-linux/void-packages/pull/29459

build-style/cmake: set CMAKE_BUILD_TYPE to None
- I'm going to build all packages with `build_style=cmake` and fix them one by one before merging this in.

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/29459.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-type-to-None-29459.patch --]
[-- Type: text/x-diff, Size: 119334 bytes --]

From 3cc7e3b966778c3ac31f22bb26a8543d6d0d2d2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 14 Mar 2021 20:18:03 +0700
Subject: [PATCH 01/64] build-style/cmake: set CMAKE_BUILD_TYPE to None

---
 common/build-style/cmake.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index 5100a96dfd7b..9d1a1a7a1941 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -52,7 +52,7 @@ _EOF
 		cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=cross_${XBPS_CROSS_TRIPLET}.cmake"
 	fi
 	cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr"
-	cmake_args+=" -DCMAKE_BUILD_TYPE=Release"
+	cmake_args+=" -DCMAKE_BUILD_TYPE=None"
 	cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}"
 
 	if [[ $build_helper = *"qemu"* ]]; then

From 787b9dfc68dd371af87477287282976842d0c4d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 15 Mar 2021 08:07:16 +0700
Subject: [PATCH 02/64] amdvlk: allow CMAKE_BUILD_TYPE=None

---
 .../patches/cmake-build-type-none.patch       | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 srcpkgs/amdvlk/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/amdvlk/patches/cmake-build-type-none.patch b/srcpkgs/amdvlk/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..7a629e58548e
--- /dev/null
+++ b/srcpkgs/amdvlk/patches/cmake-build-type-none.patch
@@ -0,0 +1,60 @@
+Index: llvm-project/llvm/CMakeLists.txt
+===================================================================
+--- llvm-project/llvm/CMakeLists.txt.orig
++++ llvm-project/llvm/CMakeLists.txt
+@@ -251,11 +251,6 @@ endif()
+ 
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+ 
+-if (CMAKE_BUILD_TYPE AND
+-    NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-  message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-endif()
+-
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+ 
+ set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
+Index: pal/cmake/Modules/AmdCmakeHelper.cmake
+===================================================================
+--- pal/cmake/Modules/AmdCmakeHelper.cmake.orig
++++ pal/cmake/Modules/AmdCmakeHelper.cmake
+@@ -37,11 +37,6 @@ if (CMAKE_CONFIGURATION_TYPES)
+ else()
+     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
+ 
+-    if (CMAKE_BUILD_TYPE AND
+-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-    endif()
+-
+     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+         set(CMAKE_BUILD_TYPE_DEBUG ON)
+         set(CMAKE_BUILD_TYPE_RELEASE OFF)
+Index: xgl/CMakeLists.txt
+===================================================================
+--- xgl/CMakeLists.txt.orig
++++ xgl/CMakeLists.txt
+@@ -181,11 +181,6 @@ if (CMAKE_CONFIGURATION_TYPES)
+ else()
+     string(TOUPPER "${CMAKE_BUILD_TYPE}" capital_CMAKE_BUILD_TYPE)
+ 
+-    if (CMAKE_BUILD_TYPE AND
+-        NOT capital_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+-        message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+-    endif()
+-
+     if(capital_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+         set(CMAKE_BUILD_TYPE_DEBUG ON)
+         set(CMAKE_BUILD_TYPE_RELEASE OFF)
+Index: xgl/icd/CMakeLists.txt
+===================================================================
+--- xgl/icd/CMakeLists.txt.orig
++++ xgl/icd/CMakeLists.txt
+@@ -84,7 +84,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Cl
+     endif()
+ 
+     if(CMAKE_BUILD_TYPE_RELEASE)
+-        target_compile_options(xgl PRIVATE -O3)
+         if(XGL_ENABLE_LTO)
+             if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+                 execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)

From ed3f21f52a93d4f91c0f76b5164904b53d843184 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 06:24:04 +0700
Subject: [PATCH 03/64] eigen*: set CMAKE_BUILD_TYPE to Release

We're going to set default CMAKE_BUILD_TYPE to None soon. Those packages
are header only libraries, no need to waste time on patching.
---
 srcpkgs/eigen/template    | 1 +
 srcpkgs/eigen3.2/template | 1 +
 2 files changed, 2 insertions(+)

diff --git a/srcpkgs/eigen/template b/srcpkgs/eigen/template
index ee825e95f273..072228c16915 100644
--- a/srcpkgs/eigen/template
+++ b/srcpkgs/eigen/template
@@ -3,6 +3,7 @@ pkgname=eigen
 version=3.3.9
 revision=1
 build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release"
 short_desc="C++ template library for linear algebra (version 3.x)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, GPL-3.0-or-later, LGPL-2.1-or-later, BSD-3-Clause"
diff --git a/srcpkgs/eigen3.2/template b/srcpkgs/eigen3.2/template
index 5715fc1b3a19..7b710534b5e5 100644
--- a/srcpkgs/eigen3.2/template
+++ b/srcpkgs/eigen3.2/template
@@ -4,6 +4,7 @@ version=3.2.10
 revision=3
 wrksrc="eigen-${version}"
 build_style=cmake
+configure_args="-DCMAKE_BUILD_TYPE=Release"
 short_desc="C++ template library for linear algebra (version 3.x)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MPL-2.0, GPL-3.0-or-later, LGPL-2.1-or-later, BSD-3-Clause"

From 6c9a7ad24cb0e2476e88aa3064a79694c97911fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 07:04:48 +0700
Subject: [PATCH 04/64] embree: don't ignore CXXFLAGS, fix build with ispc
 1.13+

---
 .../embree/patches/uintNN-is-part-of-ispc-1.13.patch | 12 ++++++++++++
 srcpkgs/embree/template                              |  6 ++----
 2 files changed, 14 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/embree/patches/uintNN-is-part-of-ispc-1.13.patch

diff --git a/srcpkgs/embree/patches/uintNN-is-part-of-ispc-1.13.patch b/srcpkgs/embree/patches/uintNN-is-part-of-ispc-1.13.patch
new file mode 100644
index 000000000000..5d0b02f3b2e5
--- /dev/null
+++ b/srcpkgs/embree/patches/uintNN-is-part-of-ispc-1.13.patch
@@ -0,0 +1,12 @@
+Index: embree-2.17.7/tutorials/common/common.isph
+===================================================================
+--- embree-2.17.7.orig/tutorials/common/common.isph
++++ embree-2.17.7/tutorials/common/common.isph
+@@ -16,7 +16,3 @@
+ 
+ #pragma once
+ 
+-typedef unsigned int64 uint64;
+-typedef unsigned int32 uint32;
+-typedef unsigned int16 uint16;
+-typedef unsigned int8  uint8;
diff --git a/srcpkgs/embree/template b/srcpkgs/embree/template
index 0bc72f46b6d8..849ec3c26c1d 100644
--- a/srcpkgs/embree/template
+++ b/srcpkgs/embree/template
@@ -4,6 +4,7 @@ version=2.17.7
 revision=2
 archs="x86_64"
 build_style=cmake
+configure_args="-DTBB_ROOT=/usr -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF"
 hostmakedepends="ispc"
 makedepends="libfreeglut-devel libXmu-devel tbb-devel MesaLib-devel libpng-devel
  libopenexr-devel libjpeg-turbo-devel libmagick-devel"
@@ -13,10 +14,7 @@ license="Apache-2.0"
 homepage="https://embree.github.io/"
 distfiles="https://github.com/$pkgname/$pkgname/archive/v$version.tar.gz"
 checksum=c0694f287fa1fbb382aba3a895702e248d92f7e89c0e5f64aefee965482ec04c
-
-nopie=y
-
-configure_args="-DTBB_ROOT=/usr -DENABLE_TUTORIALS=OFF"
+patch_args=-Np1
 
 embree-devel_package() {
 	depends="${sourcepkg}>=${version}_${revision}"

From eb98e5b12ecc7034962ea038027febdbad95face Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 07:35:19 +0700
Subject: [PATCH 05/64] ettercap: remove libressl patch, CMAKE_BUILD_TYPE=None

---
 .../patches/allow-build-type-none.patch       | 24 ++++++++++++++
 srcpkgs/ettercap/patches/libressl.patch       | 31 -------------------
 srcpkgs/ettercap/template                     |  9 ++++--
 3 files changed, 31 insertions(+), 33 deletions(-)
 create mode 100644 srcpkgs/ettercap/patches/allow-build-type-none.patch
 delete mode 100644 srcpkgs/ettercap/patches/libressl.patch

diff --git a/srcpkgs/ettercap/patches/allow-build-type-none.patch b/srcpkgs/ettercap/patches/allow-build-type-none.patch
new file mode 100644
index 000000000000..324d75086b05
--- /dev/null
+++ b/srcpkgs/ettercap/patches/allow-build-type-none.patch
@@ -0,0 +1,24 @@
+Index: ettercap-0.8.3.1/CMakeLists.txt
+===================================================================
+--- ettercap-0.8.3.1.orig/CMakeLists.txt
++++ ettercap-0.8.3.1/CMakeLists.txt
+@@ -22,19 +22,6 @@ option(LIBRARY_BUILD "Build for libetter
+ option(INSTALL_DESKTOP "Install ettercap desktop files" ON)
+ 
+ 
+-set(VALID_BUILD_TYPES Debug Release RelWithDebInfo)
+-
+-if(NOT CMAKE_BUILD_TYPE)
+-  # Default to using "Release" as our build type.
+-  set(CMAKE_BUILD_TYPE "Release" CACHE STRING
+-    "Choose the type of build, options are: ${VALID_BUILD_TYPES}." FORCE)
+-endif()
+-list(FIND VALID_BUILD_TYPES ${CMAKE_BUILD_TYPE} contains_valid)
+-if(contains_valid EQUAL -1)
+-  message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: '${CMAKE_BUILD_TYPE}'. Valid options are: ${VALID_BUILD_TYPES}")
+-endif()
+-unset(contains_valid)
+-
+ include(CMakeDependentOption)
+ 
+ # If SYSTEM_LIBS is set to off, then all SYSTEM_* options will be
diff --git a/srcpkgs/ettercap/patches/libressl.patch b/srcpkgs/ettercap/patches/libressl.patch
deleted file mode 100644
index 15e0d3c1c9e7..000000000000
--- a/srcpkgs/ettercap/patches/libressl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b2f7634c9dbc0ef68640f0571787d92300e9f9f9 Mon Sep 17 00:00:00 2001
-From: Stefan Strogin <stefan@steils.org>
-Date: Sat, 15 Aug 2020 07:18:31 +0300
-Subject: [PATCH] ec_sslwrap: fix compilation with LibreSSL
-
-Disable taking over SNI extension from ClientHello and SSL configuration
-operations until LibreSSL supports the required API.
-
-Fixes: https://github.com/Ettercap/ettercap/issues/1068
----
- src/ec_sslwrap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git src/ec_sslwrap.c src/ec_sslwrap.c
-index b9f26a142..1e4c24fc1 100644
---- src/ec_sslwrap.c
-+++ src/ec_sslwrap.c
-@@ -71,11 +71,11 @@
- #define TLS_server_method SSLv23_server_method
- #endif
- 
--#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_OPENSSL_1_1_0
- #endif
- 
--#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
-+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
- #define HAVE_OPENSSL_1_1_1
- #endif
- 
diff --git a/srcpkgs/ettercap/template b/srcpkgs/ettercap/template
index 7fe4c340a079..611b4e9aded7 100644
--- a/srcpkgs/ettercap/template
+++ b/srcpkgs/ettercap/template
@@ -3,8 +3,8 @@ pkgname=ettercap
 version=0.8.3.1
 revision=2
 build_style=cmake
-configure_args="-DENABLE_GTK=OFF"
-hostmakedepends="flex"
+configure_args="-DENABLE_GTK=OFF -DBUNDLED_LIBS=OFF"
+hostmakedepends="flex pkg-config"
 makedepends="geoip-devel ncurses-devel openssl-devel libcurl-devel
  libltdl-devel libnet-devel libpcap-devel pcre-devel"
 conf_files="/etc/${pkgname}/etter.conf"
@@ -15,5 +15,10 @@ homepage="http://ettercap.github.com/ettercap/"
 distfiles="https://github.com/Ettercap/ettercap/archive/v${version}.tar.gz"
 checksum=d0c3ef88dfc284b61d3d5b64d946c1160fd04276b448519c1ae4438a9cdffaf3
 lib32disabled=yes
+patch_args=-Np1
 
 CFLAGS="-fcommon"
+
+post_extract() {
+	rm -rf bundled_deps
+}

From 2dab7d0b759055e6f687ff2e759fe7f53b7f02f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 08:27:10 +0700
Subject: [PATCH 06/64] injeqt: disable coverage

---
 srcpkgs/injeqt/template | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/injeqt/template b/srcpkgs/injeqt/template
index 1e5777fc0f18..78eba09a0249 100644
--- a/srcpkgs/injeqt/template
+++ b/srcpkgs/injeqt/template
@@ -3,7 +3,8 @@ pkgname=injeqt
 version=1.2.0
 revision=2
 build_style=cmake
-hostmakedepends="pkg-config"
+configure_args="-DDISABLE_COVERAGE=ON"
+hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
 makedepends="qt5-devel"
 short_desc="Dependency injection framework for Qt"
 maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
@@ -12,9 +13,6 @@ homepage="https://github.com/vogel/injeqt/"
 distfiles="https://github.com/vogel/${pkgname}/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz"
 checksum=77540cedb0b26affe993dd18124d796059e34c80a51d9ae6433fdff1860db135
 
-if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-host-tools qt5-devel"
-fi
 CXXFLAGS="-fno-lifetime-dse -Wno-error=cast-align"
 
 injeqt-devel_package() {

From 8d4f5b3210b84785b994e4e1e9bc2cdc43478003 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 17 Mar 2021 22:26:37 +0700
Subject: [PATCH 07/64] kindd: build with CMAKE_BUILD_TYPE=None

---
 srcpkgs/kindd/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/kindd/template b/srcpkgs/kindd/template
index e634b0f69bf6..4416041de58c 100644
--- a/srcpkgs/kindd/template
+++ b/srcpkgs/kindd/template
@@ -15,7 +15,7 @@ distfiles="${homepage}/archive/${version}.tar.gz"
 checksum=e596f1b1577ff3e83a779e6181252ae2f09731f513d17dd6b95cbc2cf204654f
 
 do_install() {
-	vbin release/kindd
+	vbin build/core/kindd
 	vinstall assets/appconf/kindd.svg 644 usr/share/pixmaps
 	vinstall assets/appconf/kindd.desktop 644 usr/share/applications
 }

From cb3ad0df55b139c7fa5691cf7d48b8286ad3c025 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 18 Mar 2021 23:58:53 +0700
Subject: [PATCH 08/64] occt: allow CMAKE_BUILD_TYPE=None

---
 srcpkgs/occt/patches/cmake-build-type-none.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/occt/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..acb06fb55766
--- /dev/null
+++ b/srcpkgs/occt/patches/cmake-build-type-none.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D
+ 
+ set (CMAKE_SUPPRESS_REGENERATION TRUE)
+ 
+-set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
++set (CMAKE_CONFIGURATION_TYPES None Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
+ 
+ # macro: include patched file if it exists
+ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)

From ce9f8a2d147c6661920eb4269b20e7d7e930b533 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 19 Mar 2021 23:07:05 +0700
Subject: [PATCH 09/64] renderdoc: devendor zstd, lz4

---
 .../patches/build-type-none-is-release.patch  | 12 ++++
 .../renderdoc/patches/qmake-no-rpath.patch    | 13 ++++
 .../renderdoc/patches/unvendor-zstd-lz4.patch | 68 +++++++++++++++++++
 srcpkgs/renderdoc/template                    | 15 ++--
 4 files changed, 99 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/renderdoc/patches/build-type-none-is-release.patch
 create mode 100644 srcpkgs/renderdoc/patches/qmake-no-rpath.patch
 create mode 100644 srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch

diff --git a/srcpkgs/renderdoc/patches/build-type-none-is-release.patch b/srcpkgs/renderdoc/patches/build-type-none-is-release.patch
new file mode 100644
index 000000000000..f16b944bc12c
--- /dev/null
+++ b/srcpkgs/renderdoc/patches/build-type-none-is-release.patch
@@ -0,0 +1,12 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -315,6 +315,7 @@ set(RELEASE_MODE 0)
+ 
+ if(cmake_build_type_lower STREQUAL "release" OR
+    cmake_build_type_lower STREQUAL "relwithdebinfo" OR
++   cmake_build_type_lower STREQUAL "none" OR
+    cmake_build_type_lower STREQUAL "minsizerel")
+     add_definitions(-D_RELEASE)
+     message(STATUS "Building RenderDoc in Release mode: ${CMAKE_BUILD_TYPE}")
diff --git a/srcpkgs/renderdoc/patches/qmake-no-rpath.patch b/srcpkgs/renderdoc/patches/qmake-no-rpath.patch
new file mode 100644
index 000000000000..6e6325c53555
--- /dev/null
+++ b/srcpkgs/renderdoc/patches/qmake-no-rpath.patch
@@ -0,0 +1,13 @@
+Index: qrenderdoc/CMakeLists.txt
+===================================================================
+--- qrenderdoc/CMakeLists.txt.orig
++++ qrenderdoc/CMakeLists.txt
+@@ -144,7 +144,7 @@ endif()
+ # and finding dependencies from the cmake build
+ file(WRITE
+      ${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
+-     "CONFIG+=${QMAKE_CONFIG}\n"
++     "CONFIG+=${QMAKE_CONFIG} no_qt_rpath\n"
+      "\n"
+      "QMAKE_CC=${CMAKE_C_COMPILER}\n"
+      "QMAKE_CXX=${CMAKE_CXX_COMPILER}\n"
diff --git a/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch b/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch
new file mode 100644
index 000000000000..d4003ded9161
--- /dev/null
+++ b/srcpkgs/renderdoc/patches/unvendor-zstd-lz4.patch
@@ -0,0 +1,68 @@
+Index: renderdoc/CMakeLists.txt
+===================================================================
+--- renderdoc/CMakeLists.txt.orig
++++ renderdoc/CMakeLists.txt
+@@ -213,54 +213,10 @@ set(sources
+     3rdparty/pugixml/pugixml.cpp
+     3rdparty/pugixml/pugixml.hpp
+     3rdparty/pugixml/pugiconfig.hpp
+-    3rdparty/lz4/lz4.c
+-    3rdparty/lz4/lz4.h
+     3rdparty/miniz/miniz.c
+     3rdparty/miniz/miniz.h
+     3rdparty/superluminal/superluminal.cpp
+     3rdparty/superluminal/superluminal.h
+-    3rdparty/zstd/bitstream.h
+-    3rdparty/zstd/compiler.h
+-    3rdparty/zstd/cpu.h
+-    3rdparty/zstd/debug.c
+-    3rdparty/zstd/debug.h
+-    3rdparty/zstd/entropy_common.c
+-    3rdparty/zstd/error_private.c
+-    3rdparty/zstd/error_private.h
+-    3rdparty/zstd/fse.h
+-    3rdparty/zstd/fse_compress.c
+-    3rdparty/zstd/fse_decompress.c
+-    3rdparty/zstd/hist.c
+-    3rdparty/zstd/hist.h
+-    3rdparty/zstd/huf.h
+-    3rdparty/zstd/huf_compress.c
+-    3rdparty/zstd/huf_decompress.c
+-    3rdparty/zstd/mem.h
+-    3rdparty/zstd/pool.c
+-    3rdparty/zstd/pool.h
+-    3rdparty/zstd/threading.c
+-    3rdparty/zstd/threading.h
+-    3rdparty/zstd/xxhash.c
+-    3rdparty/zstd/xxhash.h
+-    3rdparty/zstd/zstd.h
+-    3rdparty/zstd/zstd_common.c
+-    3rdparty/zstd/zstd_compress.c
+-    3rdparty/zstd/zstd_compress_internal.h
+-    3rdparty/zstd/zstd_decompress.c
+-    3rdparty/zstd/zstd_double_fast.c
+-    3rdparty/zstd/zstd_double_fast.h
+-    3rdparty/zstd/zstd_errors.h
+-    3rdparty/zstd/zstd_fast.c
+-    3rdparty/zstd/zstd_fast.h
+-    3rdparty/zstd/zstd_internal.h
+-    3rdparty/zstd/zstd_lazy.c
+-    3rdparty/zstd/zstd_lazy.h
+-    3rdparty/zstd/zstd_ldm.c
+-    3rdparty/zstd/zstd_ldm.h
+-    3rdparty/zstd/zstd_opt.c
+-    3rdparty/zstd/zstd_opt.h
+-    3rdparty/zstd/zstdmt_compress.c
+-    3rdparty/zstd/zstdmt_compress.h
+     3rdparty/stb/stb_image.h
+     3rdparty/stb/stb_image_write.h
+     3rdparty/stb/stb_image_resize.h
+@@ -271,6 +227,8 @@ set(sources
+     3rdparty/tinyfiledialogs/tinyfiledialogs.c
+     3rdparty/tinyfiledialogs/tinyfiledialogs.h)
+ 
++list(APPEND RDOC_LIBRARIES -llz4 -lzstd)
++
+ if(ANDROID)
+     list(APPEND sources
+         data/embedded_files.h
diff --git a/srcpkgs/renderdoc/template b/srcpkgs/renderdoc/template
index 7240e9ebc307..4615d45c52c9 100644
--- a/srcpkgs/renderdoc/template
+++ b/srcpkgs/renderdoc/template
@@ -1,13 +1,14 @@
 # Template file for 'renderdoc'
 pkgname=renderdoc
 version=1.12
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DENABLE_GL=ON -DENABLE_GLES=ON -DENABLE_QRENDERDOC=ON
  -DENABLE_RENDERDOCCMD=ON -DENABLE_VULKAN=ON -DENABLE_XCB=ON -DENABLE_XLIB=ON
  -DENABLE_PYRENDERDOC=ON"
-hostmakedepends="bison autoconf automake pkg-config python3"
+hostmakedepends="bison autoconf automake pkg-config python3 swig"
 makedepends="libX11-devel libxcb-devel xcb-util-keysyms-devel qt5-devel
+ libzstd-devel liblz4-devel
  qt5-svg-devel qt5-x11extras-devel pcre-devel python3-devel"
 short_desc="Stand-alone graphics debugging tool for Vulkan and OpenGL"
 maintainer="Urs Schulz <voidpkgs@ursschulz.de>"
@@ -19,19 +20,14 @@ checksum=4dece1b4cb859a76533b28fcd50e17321acfaa81c3435500a006c4a5ba15fddb
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	makedepends+=" libexecinfo-devel"
 	LDLIBS="-lexecinfo"
+	broken="uses RTLD_DL_LINKMAP, RTLD_DEEPBIND, _r_debug"
 fi
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"
 fi
 
-case "$XBPS_TARGET_MACHINE" in
-	*-musl) broken="uses RTLD_DL_LINKMAP, RTLD_DEEPBIND, _r_debug" ;;
-esac
-
-if [ "$CROSS_BUILD" ]; then
-	broken="Cross-compilation can't find python3 interpreter"
-fi
+nocross="Cross-compilation can't find python3 interpreter"
 
 post_patch() {
 	[ -z "$XBPS_TARGET_NO_ATOMIC8" ] && return 0
@@ -40,4 +36,5 @@ post_patch() {
 
 post_install() {
 	vlicense LICENSE.md
+	vlicense docs/credits_acknowledgements.rst
 }

From afd5e743a33c4bd0fcc71624dbe73675e0d77fb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 20 Mar 2021 00:47:52 +0700
Subject: [PATCH 10/64] python3-occ: build with CMAKE_BUILD_TYPE=None

---
 srcpkgs/python3-occ/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template
index 705f37457943..3ea0ef5e6387 100644
--- a/srcpkgs/python3-occ/template
+++ b/srcpkgs/python3-occ/template
@@ -5,6 +5,7 @@ revision=1
 archs="i686* x86_64* armv7l* aarch64* ppc*"
 wrksrc="pythonocc-core-${version}"
 build_style=cmake
+configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None"
 hostmakedepends="python3 swig"
 makedepends="python3-devel occt-devel freetype-devel swig"
 depends="python3 occt freetype"

From 8c94db176853a0c53da72846a68ef9ea21ed6701 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 19 Mar 2021 23:38:10 +0700
Subject: [PATCH 11/64] widelands: allow CMAKE_BUILD_TYPE=None

---
 srcpkgs/widelands-data                        |  1 -
 .../patches/cmake-build-type-none.patch       | 63 +++++++++++++++++++
 .../widelands/patches/fix-install-path.patch  | 40 ++++++++++++
 srcpkgs/widelands/template                    | 21 +------
 4 files changed, 105 insertions(+), 20 deletions(-)
 delete mode 120000 srcpkgs/widelands-data
 create mode 100644 srcpkgs/widelands/patches/cmake-build-type-none.patch
 create mode 100644 srcpkgs/widelands/patches/fix-install-path.patch

diff --git a/srcpkgs/widelands-data b/srcpkgs/widelands-data
deleted file mode 120000
index e9fbf89517f2..000000000000
--- a/srcpkgs/widelands-data
+++ /dev/null
@@ -1 +0,0 @@
-widelands
\ No newline at end of file
diff --git a/srcpkgs/widelands/patches/cmake-build-type-none.patch b/srcpkgs/widelands/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..3d210854741b
--- /dev/null
+++ b/srcpkgs/widelands/patches/cmake-build-type-none.patch
@@ -0,0 +1,63 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -202,7 +202,7 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "RelWit
+   set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
+   option(OPTION_ASAN "Build with AddressSanitizer" ON)
+ else()
+-  message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
++  set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
+ endif()
+ 
+ wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11")
+@@ -353,7 +353,7 @@ endif (OPTION_BUILD_TESTS)
+ install (
+   FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION
+   DESTINATION ${WL_INSTALL_BASEDIR}
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug
+   COMPONENT CoreVersionFile
+ )
+ 
+@@ -378,7 +378,6 @@ install(
+     data/txts
+     data/world
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
+   COMPONENT CoreDataFiles
+ )
+ 
+@@ -386,7 +385,6 @@ install(
+   DIRECTORY
+     data/maps
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
+   COMPONENT MapFiles
+ )
+ 
+@@ -395,7 +393,6 @@ install(
+     data/music
+     data/sound
+   DESTINATION ${WL_INSTALL_DATADIR}
+-  CONFIGURATIONS Debug;Release
+   COMPONENT MusicFiles
+ )
+ 
+@@ -405,7 +402,7 @@ install(
+     CREDITS
+     ChangeLog
+   DESTINATION ${WL_INSTALL_BASEDIR}
+-  CONFIGURATIONS Debug;Release
++  CONFIGURATIONS Debug
+   COMPONENT CoreLicenseFiles
+ )
+ 
+@@ -424,7 +421,6 @@ install(
+   DIRECTORY
+     ${CMAKE_CURRENT_BINARY_DIR}/locale/
+   DESTINATION ${WL_INSTALL_DATADIR}/locale
+-  CONFIGURATIONS Debug;Release
+   COMPONENT CoreLanguageFiles
+ )
+ 
diff --git a/srcpkgs/widelands/patches/fix-install-path.patch b/srcpkgs/widelands/patches/fix-install-path.patch
new file mode 100644
index 000000000000..6bb461389f03
--- /dev/null
+++ b/srcpkgs/widelands/patches/fix-install-path.patch
@@ -0,0 +1,40 @@
+Index: cmake/WlFunctions.cmake
+===================================================================
+--- cmake/WlFunctions.cmake.orig
++++ cmake/WlFunctions.cmake
+@@ -289,5 +289,5 @@ function(wl_binary NAME)
+ 
+   #Quoting the CMake documentation on DESTINATION:
+   #"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
+-  install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
++  install(TARGETS ${NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ExecutableFiles)
+ endfunction()
+Index: xdg/CMakeLists.txt
+===================================================================
+--- xdg/CMakeLists.txt.orig
++++ xdg/CMakeLists.txt
+@@ -6,19 +6,19 @@ set(XDG_APPLICATION_ID "org.widelands.Wi
+ list(APPEND icon_sizes "16" "32" "48" "64" "128")
+ foreach (icon_size ${icon_sizes})
+   #install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
+-  install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ../share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
++  install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
+ endforeach (icon_size ${icon_sizes})
+ #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6           DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
+-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6           DESTINATION ../share/man/man6)
++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6           DESTINATION share/man/man6)
+ #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop     DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
+-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop     DESTINATION ../share/applications)
++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop     DESTINATION share/applications)
+ #install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
+-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ../share/metainfo)
++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo)
+ 
+ find_program(GTK_UPDATE_ICON_CACHE NAMES gtk-update-icon-cache)
+ if (GTK_UPDATE_ICON_CACHE)
+   #install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor ||: )")
+-  install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/../share/icons/hicolor ||: )")
++  install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor ||: )")
+ else (GTK_UPDATE_ICON_CACHE)
+   message(WARNING "gtk-update-icon-cache not found!")
+ endif (GTK_UPDATE_ICON_CACHE)
diff --git a/srcpkgs/widelands/template b/srcpkgs/widelands/template
index 6cee85087ea7..cfa2c10993e0 100644
--- a/srcpkgs/widelands/template
+++ b/srcpkgs/widelands/template
@@ -1,7 +1,7 @@
 # Template file for 'widelands'
 pkgname=widelands
 version=21
-revision=3
+revision=4
 wrksrc="${pkgname}-build${version}"
 build_style=cmake
 configure_args="-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
@@ -10,13 +10,13 @@ hostmakedepends="python3 pkg-config gettext"
 makedepends="boost-devel icu-devel minizip-devel gettext-devel
  glu-devel glew-devel SDL2-devel SDL2_gfx-devel SDL2_image-devel
  SDL2_net-devel SDL2_mixer-devel SDL2_ttf-devel"
-depends="${pkgname}-data-${version}_${revision}"
 short_desc="Real-time strategy game"
 maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
 license="GPL-2.0-or-later"
 homepage="http://www.widelands.org/"
 distfiles="https://github.com/widelands/widelands/archive/build${version}.tar.gz>${pkgname}-${version}.tar.gz"
 checksum=601e0e4c6f91b3fb0ece2cd1b83ecfb02344a1b9194fbb70ef3f70e06994e357
+replaces="widelands-data>=0"
 
 CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
 
@@ -29,22 +29,5 @@ if [ "$CROSS_BUILD" ]; then
 fi
 
 post_install() {
-	# For some reason the binary is installed as /usr/widelands - move it
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/${pkgname} ${DESTDIR}/usr/bin
-	vmkdir usr/share
-	mv ${DESTDIR}/share/* ${DESTDIR}/usr/share/
-	rmdir ${DESTDIR}/share
-
-	# Remove files not needed in the package
-	rm -f ${DESTDIR}/usr/COPYING ${DESTDIR}/usr/CREDITS ${DESTDIR}/usr/ChangeLog ${DESTDIR}/usr/VERSION
-
 	vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
 }
-
-widelands-data_package() {
-	short_desc+=" - data files"
-	pkg_install() {
-		vmove usr/share/widelands
-	}
-}

From 726575d47d33a165d9f3c42359df8e1cf1a6fc57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 20 Mar 2021 09:49:25 +0700
Subject: [PATCH 12/64] zziplib: fix SONAME when build with
 -DCMAKE_BUILD_TYPE=None

---
 .../cmake-build-type-none-soname.patch        | 35 +++++++++++++++++++
 srcpkgs/zziplib/template                      |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 srcpkgs/zziplib/patches/cmake-build-type-none-soname.patch

diff --git a/srcpkgs/zziplib/patches/cmake-build-type-none-soname.patch b/srcpkgs/zziplib/patches/cmake-build-type-none-soname.patch
new file mode 100644
index 000000000000..2d31b5b8a46a
--- /dev/null
+++ b/srcpkgs/zziplib/patches/cmake-build-type-none-soname.patch
@@ -0,0 +1,35 @@
+Index: zziplib-0.13.72/zzip/CMakeLists.txt
+===================================================================
+--- zziplib-0.13.72.orig/zzip/CMakeLists.txt
++++ zziplib-0.13.72/zzip/CMakeLists.txt
+@@ -190,15 +190,18 @@ target_include_directories (libzzipmmapp
+ endif()
+ 
+ set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip" RELEASE_POSTFIX "-${RELNUM}")
++set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip" NONE_POSTFIX "-${RELNUM}")
+ SET_TARGET_PROPERTIES(libzzip PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
+ 
+ if(ZZIPFSEEKO)
+ set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko" RELEASE_POSTFIX "-${RELNUM}")
++set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko" NONE_POSTFIX "-${RELNUM}")
+ SET_TARGET_PROPERTIES(libzzipfseeko PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
+ endif()
+ 
+ if(ZZIPMMAPPED)
+ set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped" RELEASE_POSTFIX "-${RELNUM}")
++set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped" NONE_POSTFIX "-${RELNUM}")
+ SET_TARGET_PROPERTIES(libzzipmmapped PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
+ endif()
+ 
+Index: zziplib-0.13.72/zzipwrap/CMakeLists.txt
+===================================================================
+--- zziplib-0.13.72.orig/zzipwrap/CMakeLists.txt
++++ zziplib-0.13.72/zzipwrap/CMakeLists.txt
+@@ -49,6 +49,7 @@ target_link_libraries(libzzipwrap libzzi
+ target_include_directories(libzzipwrap PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
+ 
+ set_target_properties(libzzipwrap PROPERTIES OUTPUT_NAME "zzipwrap" RELEASE_POSTFIX "-${RELNUM}")
++set_target_properties(libzzipwrap PROPERTIES OUTPUT_NAME "zzipwrap" NONE_POSTFIX "-${RELNUM}")
+ SET_TARGET_PROPERTIES(libzzipwrap PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
+ set_target_properties(libzzipwrap PROPERTIES DEFINE_SYMBOL "libzzip_EXPORTS")
+ 
diff --git a/srcpkgs/zziplib/template b/srcpkgs/zziplib/template
index ab5af234af62..2026f3e4a521 100644
--- a/srcpkgs/zziplib/template
+++ b/srcpkgs/zziplib/template
@@ -12,6 +12,7 @@ homepage="https://github.com/gdraheim/zziplib"
 changelog="https://raw.githubusercontent.com/gdraheim/zziplib/master/ChangeLog"
 distfiles="https://github.com/gdraheim/zziplib/archive/v${version}.tar.gz"
 checksum=93ef44bf1f1ea24fc66080426a469df82fa631d13ca3b2e4abaeab89538518dc
+patch_args=-Np1
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -DZZIPTEST=OFF"

From 788780b89a95f5b604d1f06839e54dc111811aa1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 21 Mar 2021 15:28:04 +0700
Subject: [PATCH 13/64] mellowplayer: fix build

---
 srcpkgs/mellowplayer/patches/no-werror.patch | 13 +++++++++++++
 srcpkgs/mellowplayer/template                | 13 +++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)
 create mode 100644 srcpkgs/mellowplayer/patches/no-werror.patch

diff --git a/srcpkgs/mellowplayer/patches/no-werror.patch b/srcpkgs/mellowplayer/patches/no-werror.patch
new file mode 100644
index 000000000000..7e678453a123
--- /dev/null
+++ b/srcpkgs/mellowplayer/patches/no-werror.patch
@@ -0,0 +1,13 @@
+Index: MellowPlayer-3.6.6/src/3rdparty/boost/di.hpp
+===================================================================
+--- MellowPlayer-3.6.6.orig/src/3rdparty/boost/di.hpp
++++ MellowPlayer-3.6.6/src/3rdparty/boost/di.hpp
+@@ -67,7 +67,7 @@ BOOST_DI_CFG_FWD
+ #pragma clang diagnostic error "-Wundefined-internal"
+ #pragma clang diagnostic ignored "-Wmissing-field-initializers"
+ #elif defined(__GCC__)
+-#pragma GCC diagnostic error "-Wdeprecated-declarations"
++#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+ #pragma GCC diagnostic push
+ #if (__GNUC__ < 6)
+ #pragma GCC diagnostic error "-Werror"
diff --git a/srcpkgs/mellowplayer/template b/srcpkgs/mellowplayer/template
index 2f8f13960ca6..cfd8a185556f 100644
--- a/srcpkgs/mellowplayer/template
+++ b/srcpkgs/mellowplayer/template
@@ -4,7 +4,7 @@ version=3.6.6
 revision=1
 wrksrc="MellowPlayer-${version}"
 build_style=cmake
-hostmakedepends="pkg-config qt5-tools qt5-qmake"
+hostmakedepends="pkg-config qt5-tools qt5-qmake qt5-host-tools"
 makedepends="qt5-declarative-devel qt5-quickcontrols2-devel
  qt5-plugin-mysql qt5-plugin-pgsql qt5-plugin-sqlite
  qt5-plugin-tds qt5-plugin-odbc
@@ -17,11 +17,12 @@ license="GPL-2.0-or-later"
 homepage="https://colinduquesnoy.gitlab.io/MellowPlayer/"
 distfiles="https://gitlab.com/ColinDuquesnoy/MellowPlayer/-/archive/${version}/MellowPlayer-${version}.tar.bz2"
 checksum=17b8b25ca6b3d27b223f8be6ad80186ae5bd17ce762eb04ecd8b0e82e687b327
+patch_args=-Np1
 
-if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-host-tools"
+if [ "$XBPS_WORDSIZE" != "$XBPS_TARGET_WORDSIZE" ]; then
+	broken="webengine can be built only if word size matches"
 fi
 
-case "$XBPS_TARGET_MACHINE" in
-	arm*) broken="qt5-webengine not available" ;;
-esac
+if [ "$XBPS_TARGET_ENDIAN" != "le" ]; then
+	broken="webengine only supports little endian"
+fi

From 82c17331775250c0edfdeb92e6292f53a974454a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 21 Mar 2021 15:43:09 +0700
Subject: [PATCH 14/64] ispc: fix CMAKE_BUILD_TYPE=None

---
 .../ispc/patches/cmake-build-type-none.patch   | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/ispc/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/ispc/patches/cmake-build-type-none.patch b/srcpkgs/ispc/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..411e353c7314
--- /dev/null
+++ b/srcpkgs/ispc/patches/cmake-build-type-none.patch
@@ -0,0 +1,18 @@
+Index: ispc-1.15.0/CMakeLists.txt
+===================================================================
+--- ispc-1.15.0.orig/CMakeLists.txt
++++ ispc-1.15.0/CMakeLists.txt
+@@ -157,13 +157,6 @@ set(OUTPUT_RELEASE Release/bin)
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin )
+ 
+ if(CMAKE_BUILD_TYPE)
+-    # Validate build type
+-    set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
+-
+-    string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG)
+-    if (${MATCHED_CONFIG} EQUAL -1)
+-         message(FATAL_ERROR "CMAKE_BUILD_TYPE (${CMAKE_BUILD_TYPE}) allows only the following values: ${CONFIGURATION_TYPES}")
+-    endif()
+ else(NOT CMAKE_BUILD_TYPE)
+     set(CMAKE_BUILD_TYPE "Release")
+     message(STATUS "Build type not specified: Use Release by default.")

From 9d83ee550ef1bb0b189f6611233c3aa3f0b24468 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 21 Mar 2021 15:56:50 +0700
Subject: [PATCH 15/64] darktable: fix CMAKE_BUILD_TYPE=None

---
 .../darktable/patches/cmake-build-type-none.patch  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/darktable/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/darktable/patches/cmake-build-type-none.patch b/srcpkgs/darktable/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..7101f9c1a0e7
--- /dev/null
+++ b/srcpkgs/darktable/patches/cmake-build-type-none.patch
@@ -0,0 +1,14 @@
+Index: src/external/rawspeed/cmake/build-type.cmake
+===================================================================
+--- src/external/rawspeed/cmake/build-type.cmake.orig
++++ src/external/rawspeed/cmake/build-type.cmake
+@@ -27,9 +27,6 @@ string(TOUPPER "${RAWSPEED_SPECIAL_BUILD
+ 
+ # is this one of the known build types?
+ list (FIND CMAKE_CONFIGURATION_TYPES_UPPERCASE ${CMAKE_BUILD_TYPE_UPPERCASE} BUILD_TYPE_IS_KNOWN)
+-if (${BUILD_TYPE_IS_KNOWN} EQUAL -1)
+- message(SEND_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE_UPPERCASE}. Please specify one of: ${CMAKE_CONFIGURATION_TYPES}")
+-endif()
+ 
+ # is this a special build?
+ list (FIND RAWSPEED_SPECIAL_BUILD_TYPES_UPPERCASE ${CMAKE_BUILD_TYPE_UPPERCASE} IS_SPECIAL_BUILD)

From 6c58109beec94dcf8d9d092101ae2b797139251b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 21 Mar 2021 15:33:29 +0700
Subject: [PATCH 16/64] hedgewars: merge -data back

---
 srcpkgs/hedgewars-data                        |  1 -
 .../patches/cmake-build-type-none.patch       | 30 +++++++++++++++++++
 srcpkgs/hedgewars/template                    | 23 +++++---------
 3 files changed, 38 insertions(+), 16 deletions(-)
 delete mode 120000 srcpkgs/hedgewars-data
 create mode 100644 srcpkgs/hedgewars/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/hedgewars-data b/srcpkgs/hedgewars-data
deleted file mode 120000
index b57dc45ebadc..000000000000
--- a/srcpkgs/hedgewars-data
+++ /dev/null
@@ -1 +0,0 @@
-hedgewars
\ No newline at end of file
diff --git a/srcpkgs/hedgewars/patches/cmake-build-type-none.patch b/srcpkgs/hedgewars/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..b4e0c186717c
--- /dev/null
+++ b/srcpkgs/hedgewars/patches/cmake-build-type-none.patch
@@ -0,0 +1,30 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -54,7 +54,7 @@ option(NOVERSIONINFOUPDATE "Disable upda
+ 
+ 
+ if(BUILD_ENGINE_C AND NOT NOVIDEOREC)
+-    if((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
++    if((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR (CMAKE_BUILD_TYPE STREQUAL "None"))
+         message("NOTE: Video recorder support disabled. It's incompatible with BUILD_ENGINE_C")
+         set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE)
+     else()
+@@ -93,7 +93,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR 1)
+ set(CPACK_PACKAGE_VERSION_MINOR 0)
+ set(CPACK_PACKAGE_VERSION_PATCH 0)
+ set(HEDGEWARS_PROTO_VER 59)
+-if((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
++if((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") OR (CMAKE_BUILD_TYPE STREQUAL "None"))
+     set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+ else()
+     set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-dev")
+@@ -114,6 +114,7 @@ include(${CMAKE_MODULE_PATH}/platform.cm
+ if(CMAKE_BUILD_TYPE)
+     if(NOT((CMAKE_BUILD_TYPE STREQUAL "Release") OR
+            (CMAKE_BUILD_TYPE STREQUAL "Debug") OR
++	   (CMAKE_BUILD_TYPE STREQUAL "None") OR
+            (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")))
+         set(CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release/RelWithDebInfo)" FORCE)
+         message(STATUS "Unknown build type ${CMAKE_BUILD_TYPE}, using default (${default_build_type})")
diff --git a/srcpkgs/hedgewars/template b/srcpkgs/hedgewars/template
index d2294cf572f5..f413a965ff2e 100644
--- a/srcpkgs/hedgewars/template
+++ b/srcpkgs/hedgewars/template
@@ -1,15 +1,15 @@
 # Template file for 'hedgewars'
 pkgname=hedgewars
 version=1.0.0
-revision=2
+revision=3
 wrksrc="${pkgname}-src-${version}"
 build_style=cmake
 configure_args="-DNOSERVER=1 -DDATA_INSTALL_DIR=/usr/share/${pkgname}
- -DPHYSFS_SYSTEM=1 -DCMAKE_VERBOSE_MAKEFILE=1 -DMINIMAL_FLAGS=1"
-hostmakedepends="lua51 pkg-config"
+ -DPHYSFS_SYSTEM=1 -DMINIMAL_FLAGS=1"
+hostmakedepends="lua51 pkg-config qt5-qmake qt5-host-tools"
 makedepends="ffmpeg-devel lua51-devel physfs-devel qt5-tools-devel SDL2_image-devel
  SDL2_mixer-devel SDL2_net-devel SDL2_ttf-devel"
-depends="hedgewars-data>=${version}_${revision} libfreeglut"
+depends="libfreeglut"
 short_desc="Funny turn-based artillery game, featuring fighting Hedgehogs!"
 maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
 license="GPL-2.0-only"
@@ -18,10 +18,9 @@ distfiles="https://hedgewars.org/download/releases/hedgewars-src-${version}.tar.
 checksum=211634e61f2e4beecc3c98c6f749601fcd08321fda1ba969b3b3832a004f155b
 nopie_files="/usr/bin/hwengine"
 nocross="Needs investigation: fails to link hwengine"
-
-if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qt5-devel"
-fi
+replaces="hedgewars-data>=0"
+export CMAKE_GENERATOR="Unix Makefiles"
+make_cmd=make
 
 case $XBPS_TARGET_MACHINE in
 	x86_64*)
@@ -38,6 +37,7 @@ esac
 
 if [ -n "$_use_c_engine" ]; then
 	hostmakedepends+=" glew-devel libatomic-devel ghc clang"
+	makedepends+=" glew-devel libatomic-devel"
 	configure_args+=" -DBUILD_ENGINE_C=1"
 	nopie_files+=" /usr/bin/hedgewars"
 fi
@@ -56,10 +56,3 @@ pre_configure() {
 post_install() {
 	vinstall ${DESTDIR}/usr/share/hedgewars/Data/misc/hedgewars.desktop 644 usr/share/applications
 }
-
-hedgewars-data_package() {
-	short_desc+=" - data files"
-	pkg_install() {
-		vmove usr/share/hedgewars/Data
-	}
-}

From 80124e3f4e8494f07b65486b3ea9ad38fb2ae925 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 21 Mar 2021 16:41:58 +0700
Subject: [PATCH 17/64] mariadb: fix for CMAKE_BUILD_TYPE=None

---
 srcpkgs/mariadb/template | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/srcpkgs/mariadb/template b/srcpkgs/mariadb/template
index 437ff757b383..78d5e2dbdbe8 100644
--- a/srcpkgs/mariadb/template
+++ b/srcpkgs/mariadb/template
@@ -34,35 +34,31 @@ replaces="mysql>=0"
 conf_files="/etc/mysql/my.cnf"
 system_accounts="mysql"
 mysql_homedir="/var/lib/mysql"
-CFLAGS="-w -fcommon"
+CFLAGS="-w -fcommon -DDBUG_OFF=1"
+CXXFLAGS="-DDBUG_OFF=1"
 
 pre_configure() {
 	# We need some host binaries before starting cross compilation.
 	if [ "$CROSS_BUILD" ]; then
+		mkdir -p build.native
 		# XXX still broken: jemalloc configure execs host bins.
-		CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake .
-		make comp_err comp_sql gen_lex_hash gen_lex_token
-		mkdir bin.host
-		cp extra/comp_err bin.host
-		cp scripts/comp_sql bin.host
-		cp sql/gen_lex_hash bin.host
-		cp sql/gen_lex_token bin.host
-		make clean
-		rm CMakeCache.txt
+		CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= \
+			cmake -S . -B build.native
+		make -C build.native comp_err comp_sql gen_lex_hash gen_lex_token
 	fi
 }
 
 pre_build() {
 	if [ "$CROSS_BUILD" ]; then
 		# CMake complains if those binaries ain't in build
-		cp bin.host/comp_err ${wrksrc}/extra
-		cp bin.host/comp_err ${wrksrc}/build/extra
-		cp bin.host/comp_sql ${wrksrc}/scripts
-		cp bin.host/comp_sql ${wrksrc}/build/scripts
-		cp bin.host/gen_lex_hash ${wrksrc}/sql
-		cp bin.host/gen_lex_hash ${wrksrc}/build/sql
-		cp bin.host/gen_lex_token ${wrksrc}/sql
-		cp bin.host/gen_lex_token ${wrksrc}/build/sql
+		cp build.native/extra/comp_err ${wrksrc}/extra
+		cp build.native/extra/comp_err ${wrksrc}/build/extra
+		cp build.native/scripts/comp_sql ${wrksrc}/scripts
+		cp build.native/scripts/comp_sql ${wrksrc}/build/scripts
+		cp build.native/sql/gen_lex_hash ${wrksrc}/sql
+		cp build.native/sql/gen_lex_hash ${wrksrc}/build/sql
+		cp build.native/sql/gen_lex_token ${wrksrc}/sql
+		cp build.native/sql/gen_lex_token ${wrksrc}/build/sql
 		export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql
 	fi
 	export LD_LIBRARY_PATH=${wrksrc}/build/storage/tokudb/ft-index/portability

From 52f92667dbe95fa97456fd440e0e7b629df95366 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 25 Mar 2021 07:58:28 +0700
Subject: [PATCH 18/64] EternalTerminal: remove -ggdb3

---
 .../EternalTerminal/patches/fix-cflags.patch    | 17 +++++++++++++++++
 srcpkgs/EternalTerminal/template                |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 srcpkgs/EternalTerminal/patches/fix-cflags.patch

diff --git a/srcpkgs/EternalTerminal/patches/fix-cflags.patch b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
new file mode 100644
index 000000000000..e6fcd432f7e7
--- /dev/null
+++ b/srcpkgs/EternalTerminal/patches/fix-cflags.patch
@@ -0,0 +1,17 @@
+Index: EternalTerminal-et-v6.0.13/CMakeLists.txt
+===================================================================
+--- EternalTerminal-et-v6.0.13.orig/CMakeLists.txt
++++ EternalTerminal-et-v6.0.13/CMakeLists.txt
+@@ -26,12 +26,6 @@ if(DISABLE_CRASH_LOG)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DELPP_DISABLE_DEFAULT_CRASH_HANDLING")
+ ENDIF(DISABLE_CRASH_LOG)
+ 
+-if(UNIX)
+-  # Enable debug info
+-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb3")
+-  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -ggdb3")
+-endif()
+-
+ # Enable C++-11
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/srcpkgs/EternalTerminal/template b/srcpkgs/EternalTerminal/template
index 7bac78d2ffd4..bc92e47743dd 100644
--- a/srcpkgs/EternalTerminal/template
+++ b/srcpkgs/EternalTerminal/template
@@ -13,6 +13,7 @@ homepage="https://eternalterminal.dev/"
 distfiles="https://github.com/MisterTea/EternalTerminal/archive/et-v${version}.tar.gz"
 checksum=728c3a444d666897c710e33fe473d8d289263a59574451b13aa53ec3c6ac88b3
 system_accounts="_eternal"
+patch_args=-Np1
 
 LDFLAGS="-lgflags"
 

From 9e9ab52094ef9e867fd5548c0811637a2b8f1379 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 25 Mar 2021 08:20:29 +0700
Subject: [PATCH 19/64] OTPClient: respect CFLAGS

---
 srcpkgs/OTPClient/patches/fix-cflags.patch | 17 +++++++++++++++++
 srcpkgs/OTPClient/template                 |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 srcpkgs/OTPClient/patches/fix-cflags.patch

diff --git a/srcpkgs/OTPClient/patches/fix-cflags.patch b/srcpkgs/OTPClient/patches/fix-cflags.patch
new file mode 100644
index 000000000000..ae70f441538f
--- /dev/null
+++ b/srcpkgs/OTPClient/patches/fix-cflags.patch
@@ -0,0 +1,17 @@
+Index: OTPClient-2.4.2/CMakeLists.txt
+===================================================================
+--- OTPClient-2.4.2.orig/CMakeLists.txt
++++ OTPClient-2.4.2/CMakeLists.txt
+@@ -11,11 +11,10 @@ option(BUILD_GUI "Build the GUI" ON)
+ option(BUILD_CLI "Build the CLI" ON)
+ 
+ set(CMAKE_C_STANDARD 11)
+-set(CMAKE_C_FLAGS "-Wall -Wextra -O3 -Wformat=2 -Wmissing-format-attribute -fstack-protector-strong -Wundef -Wmissing-format-attribute")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -fstack-protector-strong -Wundef -Wmissing-format-attribute")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always -Wstrict-prototypes -Wunreachable-code")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wchar-subscripts -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wcast-align")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=format-security -Werror=implicit-function-declaration -Wno-sign-compare")
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3")
+ if(CMAKE_COMPILER_IS_GNUCC)
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pie -fPIE")
+ endif()
diff --git a/srcpkgs/OTPClient/template b/srcpkgs/OTPClient/template
index e8c0099850b7..f5af76e655a6 100644
--- a/srcpkgs/OTPClient/template
+++ b/srcpkgs/OTPClient/template
@@ -12,3 +12,4 @@ license="GPL-3.0-or-later"
 homepage="https://github.com/paolostivanin/OTPClient"
 distfiles="https://github.com/paolostivanin/OTPClient/archive/v${version}.tar.gz"
 checksum=74bc4312aa1cd336ca983434e3bed951c5ead327091e7708e3beb08508813495
+patch_args=-Np1

From bb3e018479d51f68780e64c3bbe677d0126b8647 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 25 Mar 2021 08:30:31 +0700
Subject: [PATCH 20/64] crex: hardening

---
 srcpkgs/crex/patches/fix-cflags.patch | 20 ++++++++++++++++++++
 srcpkgs/crex/template                 |  7 ++-----
 2 files changed, 22 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/crex/patches/fix-cflags.patch

diff --git a/srcpkgs/crex/patches/fix-cflags.patch b/srcpkgs/crex/patches/fix-cflags.patch
new file mode 100644
index 000000000000..d191fb1e9ec0
--- /dev/null
+++ b/srcpkgs/crex/patches/fix-cflags.patch
@@ -0,0 +1,20 @@
+Index: crex-0.2.5/CMakeLists.txt
+===================================================================
+--- crex-0.2.5.orig/CMakeLists.txt
++++ crex-0.2.5/CMakeLists.txt
+@@ -13,9 +13,6 @@ endif(CCACHE_FOUND)
+ set (CMAKE_CXX_STANDARD 14)
+ set (CMAKE_CXX_STANDARD_REQUIRED ON)
+ 
+-set (CMAKE_CXX_FLAGS "-fdiagnostics-color=auto")
+-set (CMAKE_C_FLAGS "-fdiagnostics-color=auto")
+-
+ set (DEBUG_FLAGS "-Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -std=c++14 -g")
+ set (DEBUG_LINK_FLAGS "-fprofile-arcs -ftest-coverage -flto")
+ 
+@@ -56,4 +53,4 @@ target_link_libraries (
+   ${TARGET}
+ )
+ 
+-install (TARGETS ${TARGET} DESTINATION "/usr/local/bin")
++install (TARGETS ${TARGET} DESTINATION "/usr/bin")
diff --git a/srcpkgs/crex/template b/srcpkgs/crex/template
index a54697a93adc..2f455a0b0c72 100644
--- a/srcpkgs/crex/template
+++ b/srcpkgs/crex/template
@@ -1,7 +1,7 @@
 # Template file for 'crex'
 pkgname=crex
 version=0.2.5
-revision=1
+revision=2
 build_style=cmake
 short_desc="Explore, test, and check regular expressions in the terminal"
 maintainer="Piotr Wójcik <chocimier@tlen.pl>"
@@ -9,10 +9,7 @@ license="MIT"
 homepage="https://github.com/octobanana/crex"
 distfiles="https://github.com/octobanana/crex/archive/${version}.tar.gz"
 checksum=c6a166b7a1e696a7babeaf7c5728eece1624704a18357f827129fc95ef2ecc56
-
-pre_configure() {
-	sed -e 's|/local/|/|' -i CMakeLists.txt
-}
+patch_args=-Np1
 
 post_install() {
 	vlicense LICENSE

From 13db16ac214e02af93585d8795b075fdd1e872b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 25 Mar 2021 08:34:32 +0700
Subject: [PATCH 21/64] libbaseencode: hardening

---
 srcpkgs/libbaseencode/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/libbaseencode/template                 |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libbaseencode/patches/fix-cflags.patch

diff --git a/srcpkgs/libbaseencode/patches/fix-cflags.patch b/srcpkgs/libbaseencode/patches/fix-cflags.patch
new file mode 100644
index 000000000000..1bb86a0b15a4
--- /dev/null
+++ b/srcpkgs/libbaseencode/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: libbaseencode-1.0.9/CMakeLists.txt
+===================================================================
+--- libbaseencode-1.0.9.orig/CMakeLists.txt
++++ libbaseencode-1.0.9/CMakeLists.txt
+@@ -15,7 +15,7 @@ set(CMAKE_C_STANDARD 11)
+ set(BASEENCODE_HEADERS src/baseencode.h)
+ set(SOURCE_FILES src/base32.c src/base64.c)
+ 
+-set(CMAKE_C_FLAGS "-Wall -Werror -fPIC")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -fPIC")
+ 
+ add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES})
+ 
diff --git a/srcpkgs/libbaseencode/template b/srcpkgs/libbaseencode/template
index 384a189224df..d5929ad7bb51 100644
--- a/srcpkgs/libbaseencode/template
+++ b/srcpkgs/libbaseencode/template
@@ -1,7 +1,7 @@
 # Template file for 'libbaseencode'
 pkgname=libbaseencode
 version=1.0.9
-revision=1
+revision=2
 build_style=cmake
 short_desc="Library for encoding decoding data use base32 or base64"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -9,6 +9,7 @@ license="Apache-2.0"
 homepage="https://github.com/paolostivanin/libbaseencode"
 distfiles="https://github.com/paolostivanin/libbaseencode/archive/v${version}.tar.gz"
 checksum=a183d7cf30d931b2a078d6f0ef64616b71ab26f9258e5f4e191778c7ace7175d
+patch_args=-Np1
 
 libbaseencode-devel_package() {
 	depends="libbaseencode-${version}_${revision}"

From a0c7b43d7c569bdc9fc35f5d3cd9218d11be558e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 08:46:56 +0700
Subject: [PATCH 22/64] bibletime: clean build flags

---
 srcpkgs/bibletime/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/bibletime/template                 |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 srcpkgs/bibletime/patches/fix-cflags.patch

diff --git a/srcpkgs/bibletime/patches/fix-cflags.patch b/srcpkgs/bibletime/patches/fix-cflags.patch
new file mode 100644
index 000000000000..480c5ca4ac1e
--- /dev/null
+++ b/srcpkgs/bibletime/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: bibletime-3.0/cmake/BTApplication.cmake
+===================================================================
+--- bibletime-3.0.orig/cmake/BTApplication.cmake
++++ bibletime-3.0/cmake/BTApplication.cmake
+@@ -41,7 +41,7 @@ IF(WIN32)
+     ADD_COMPILE_OPTIONS("/Zi")
+ ELSE()
+     ADD_COMPILE_OPTIONS(
+-        "-ggdb" "-Wall" "-Wextra"
++        "-Wall" "-Wextra" "-DNDEBUG" "-DQT_NO_DEBUG"
+         "$<$<STREQUAL:$<CONFIGURATION>,Release>:-O2>"
+         "$<$<STREQUAL:$<CONFIGURATION>,Release>:-DNDEBUG>"
+         "$<$<STREQUAL:$<CONFIGURATION>,Release>:-DQT_NO_DEBUG>"
diff --git a/srcpkgs/bibletime/template b/srcpkgs/bibletime/template
index 224881c45516..85bcc7f22f87 100644
--- a/srcpkgs/bibletime/template
+++ b/srcpkgs/bibletime/template
@@ -18,6 +18,7 @@ license="GPL-2.0-or-later"
 homepage="http://bibletime.info"
 distfiles="https://github.com/bibletime/bibletime/releases/download/v${version}/bibletime-${version}.tar.xz"
 checksum=d6beef62ad44b255e3dc4c5e89214bf01a0e85c9136073b0be12fca3d2b22622
+patch_args=-Np1
 
 pre_build() {
 	. /etc/profile.d/10_openjdk11.sh

From 69f3474615c92360bfebbec338659dc74fc0e279 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 08:54:25 +0700
Subject: [PATCH 23/64] boomerang: clean build flags

---
 srcpkgs/boomerang/patches/fix-cflags.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/boomerang/patches/fix-cflags.patch

diff --git a/srcpkgs/boomerang/patches/fix-cflags.patch b/srcpkgs/boomerang/patches/fix-cflags.patch
new file mode 100644
index 000000000000..eb59766c1c5b
--- /dev/null
+++ b/srcpkgs/boomerang/patches/fix-cflags.patch
@@ -0,0 +1,21 @@
+Index: cmake-scripts/boomerang-flags.cmake
+===================================================================
+--- cmake-scripts/boomerang-flags.cmake
++++ cmake-scripts/boomerang-flags.cmake
+@@ -104,16 +104,6 @@ endif ()
+ 
+ 
+ if (NOT MSVC)
+-    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+-        BOOMERANG_ADD_COMPILE_FLAGS(-O0)
+-    elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
+-        # No special flags
+-    elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
+-        BOOMERANG_ADD_COMPILE_FLAGS(-Os)
+-    else () # Release
+-        BOOMERANG_ADD_COMPILE_FLAGS(-O3)
+-    endif ()
+-
+     if (BOOMERANG_ENABLE_COVERAGE)
+         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")

From bf46ecfc45425de178ee69dcd07ec13537f0a8ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 08:58:11 +0700
Subject: [PATCH 24/64] catimg: don't change our build-type

---
 srcpkgs/catimg/patches/fix-cflags.patch | 12 ++++++++++++
 srcpkgs/catimg/template                 |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/catimg/patches/fix-cflags.patch

diff --git a/srcpkgs/catimg/patches/fix-cflags.patch b/srcpkgs/catimg/patches/fix-cflags.patch
new file mode 100644
index 000000000000..9b9f1074ef20
--- /dev/null
+++ b/srcpkgs/catimg/patches/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: catimg-2.7.0/CMakeLists.txt
+===================================================================
+--- catimg-2.7.0.orig/CMakeLists.txt
++++ catimg-2.7.0/CMakeLists.txt
+@@ -11,7 +11,6 @@ endif()
+ #set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -g -std=c99 -Wno-unused-result")
+ #set(CMAKE_BUILD_TYPE Debug)
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wextra -Os -std=c99 -Wno-unused-result")
+-set(CMAKE_BUILD_TYPE Release)
+ 
+ set(SRC ${PROJECT_SOURCE_DIR}/src)
+ 
diff --git a/srcpkgs/catimg/template b/srcpkgs/catimg/template
index 374351c45379..6fbc5f1d9140 100644
--- a/srcpkgs/catimg/template
+++ b/srcpkgs/catimg/template
@@ -9,7 +9,7 @@ license="MIT"
 homepage="https://github.com/posva/catimg"
 distfiles="https://github.com/posva/catimg/archive/${version}.tar.gz"
 checksum=3a6450316ff62fb07c3facb47ea208bf98f62abd02783e88c56f2a6508035139
-
+patch_args=-Np1
 CFLAGS="-fcommon"
 
 post_install() {

From 252f3d16916f78f23f1723fb416840ee7e3f1c81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 09:09:37 +0700
Subject: [PATCH 25/64] libcotp: fix build flags

---
 srcpkgs/libcotp/patches/fix-cflags.patch | 14 ++++++++++++++
 srcpkgs/libcotp/template                 |  1 +
 2 files changed, 15 insertions(+)
 create mode 100644 srcpkgs/libcotp/patches/fix-cflags.patch

diff --git a/srcpkgs/libcotp/patches/fix-cflags.patch b/srcpkgs/libcotp/patches/fix-cflags.patch
new file mode 100644
index 000000000000..397b3960e9f4
--- /dev/null
+++ b/srcpkgs/libcotp/patches/fix-cflags.patch
@@ -0,0 +1,14 @@
+Index: libcotp-1.2.2/CMakeLists.txt
+===================================================================
+--- libcotp-1.2.2.orig/CMakeLists.txt
++++ libcotp-1.2.2/CMakeLists.txt
+@@ -25,8 +25,7 @@ set(CMAKE_C_STANDARD 11)
+ set(COTP_HEADERS src/cotp.h)
+ set(SOURCE_FILES src/otp.c)
+ 
+-set(CMAKE_C_FLAGS "-Wall -Wextra -O3 -Wno-format-truncation -fstack-protector-strong -fPIC")
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-format-truncation -fstack-protector-strong -fPIC")
+ 
+ add_library(cotp SHARED ${SOURCE_FILES})
+ 
diff --git a/srcpkgs/libcotp/template b/srcpkgs/libcotp/template
index 9e147ff7deb6..88337290d1e8 100644
--- a/srcpkgs/libcotp/template
+++ b/srcpkgs/libcotp/template
@@ -11,6 +11,7 @@ license="Apache-2.0"
 homepage="https://github.com/paolostivanin/libcotp"
 distfiles="https://github.com/paolostivanin/libcotp/archive/v${version}.tar.gz"
 checksum=25b45ffa4aece5cc689503ebea7356a2f760c194f0c41805934495d2fe7165b1
+patch_args=-Np1
 
 libcotp-devel_package() {
 	depends="libcotp-${version}_${revision}"

From 06fe3261c6d07a1eff4a72f0cbe1d71b1501702c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:06:07 +0700
Subject: [PATCH 26/64] loudgain: hardening

---
 srcpkgs/loudgain/patches/fix-cflags.patch | 20 ++++++++++++++++++++
 srcpkgs/loudgain/template                 |  3 ++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/loudgain/patches/fix-cflags.patch

diff --git a/srcpkgs/loudgain/patches/fix-cflags.patch b/srcpkgs/loudgain/patches/fix-cflags.patch
new file mode 100644
index 000000000000..25b2c969bef4
--- /dev/null
+++ b/srcpkgs/loudgain/patches/fix-cflags.patch
@@ -0,0 +1,20 @@
+Index: loudgain-0.6.8/CMakeLists.txt
+===================================================================
+--- loudgain-0.6.8.orig/CMakeLists.txt
++++ loudgain-0.6.8/CMakeLists.txt
+@@ -69,12 +69,12 @@ TARGET_LINK_LIBRARIES(loudgain
+ )
+ 
+ SET_TARGET_PROPERTIES(loudgain PROPERTIES
+-  COMPILE_FLAGS "-Wall -pedantic -g"
++  COMPILE_FLAGS "-Wall -pedantic"
+ )
+ 
+-SET(CMAKE_C_FLAGS "-std=gnu99 -D_GNU_SOURCE")
++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -D_GNU_SOURCE")
+ 
+-SET(CMAKE_CXX_FLAGS "-std=gnu++11 -D_GNU_SOURCE")
++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -D_GNU_SOURCE")
+ 
+ INSTALL(TARGETS loudgain DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+ 
diff --git a/srcpkgs/loudgain/template b/srcpkgs/loudgain/template
index f29167883439..00b2d20d27d6 100644
--- a/srcpkgs/loudgain/template
+++ b/srcpkgs/loudgain/template
@@ -1,7 +1,7 @@
 # Template file for 'loudgain'
 pkgname=loudgain
 version=0.6.8
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="libebur128-devel taglib-devel ffmpeg-devel"
@@ -11,6 +11,7 @@ license="BSD-2-Clause"
 homepage="https://github.com/Moonbase59/loudgain"
 distfiles="https://github.com/Moonbase59/loudgain/archive/v${version}.tar.gz"
 checksum=1137c193ad941b366e87c5d84ccc95a7aa8571affc060db0bd1cf72c489aeaee
+patch_args=-Np1
 
 post_install() {
 	vlicense COPYING

From 26bfb4b7bbab04b27cf8d4e066365730732c87a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:14:31 +0700
Subject: [PATCH 27/64] masterpassword-cli: hardening

---
 srcpkgs/masterpassword-cli/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/masterpassword-cli/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/masterpassword-cli/patches/fix-cflags.patch

diff --git a/srcpkgs/masterpassword-cli/patches/fix-cflags.patch b/srcpkgs/masterpassword-cli/patches/fix-cflags.patch
new file mode 100644
index 000000000000..a303f6954544
--- /dev/null
+++ b/srcpkgs/masterpassword-cli/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: platform-independent/cli-c/CMakeLists.txt
+===================================================================
+--- platform-independent/cli-c/CMakeLists.txt.orig
++++ platform-independent/cli-c/CMakeLists.txt
+@@ -15,8 +15,6 @@ option( BUILD_MPW_BENCH         "C CLI M
+ option( BUILD_MPW_TESTS         "C Master Password algorithm test suite (needs: mpw_sodium, mpw_xml)." OFF )
+ 
+ # Default build flags.
+-set( CMAKE_BUILD_TYPE           Release )
+-set( CMAKE_C_FLAGS              "-O3" )
+ 
+ # Version.
+ file( READ                      "VERSION" mpw_version )
diff --git a/srcpkgs/masterpassword-cli/template b/srcpkgs/masterpassword-cli/template
index ee2b8d41ae4b..8536228a602b 100644
--- a/srcpkgs/masterpassword-cli/template
+++ b/srcpkgs/masterpassword-cli/template
@@ -1,7 +1,7 @@
 # Template file for 'masterpassword-cli'
 pkgname=masterpassword-cli
 version=2.6
-revision=5
+revision=6
 wrksrc=MasterPassword-${version}-cli-3
 build_wrksrc=platform-independent/cli-c
 build_style=cmake

From df10ecb33dddef861d78297b4a6aeacfafe00e3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:20:13 +0700
Subject: [PATCH 28/64] msg2: hardening

---
 srcpkgs/msg2/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/msg2/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/msg2/patches/fix-cflags.patch

diff --git a/srcpkgs/msg2/patches/fix-cflags.patch b/srcpkgs/msg2/patches/fix-cflags.patch
new file mode 100644
index 000000000000..64404bf44fcb
--- /dev/null
+++ b/srcpkgs/msg2/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -3,7 +3,7 @@ project(msg2)
+ 
+ # Flags
+ set(CMAKE_CXX_STANDARD 17)
+-set(CMAKE_CXX_FLAGS "-Os -pipe -fPIC -fno-plt -fstack-protector-strong -Wall -Wshadow -pedantic -Wno-parentheses -Wfatal-errors")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC -fno-plt -fstack-protector-strong -Wall -Wshadow -pedantic -Wno-parentheses -Wfatal-errors")
+ 
+ # Add source files
+ add_executable(msg2 main.cpp)
diff --git a/srcpkgs/msg2/template b/srcpkgs/msg2/template
index b4f77400bf22..473b3c4ec4d2 100644
--- a/srcpkgs/msg2/template
+++ b/srcpkgs/msg2/template
@@ -1,7 +1,7 @@
 # Template file for 'msg2'
 pkgname=msg2
 version=1.2.0
-revision=1
+revision=2
 build_style=cmake
 short_desc="Output a blue arrow and a white message on the commandline"
 maintainer="Orphaned <orphan@voidlinux.org>"

From ba4736b1ab503e388fa2974fee7f6fe2c50a1c44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:22:55 +0700
Subject: [PATCH 29/64] ippusbxd: fix cflags -O2 not -o2

---
 srcpkgs/ippusbxd/patches/fix-cflags.patch | 12 ++++++++++++
 srcpkgs/ippusbxd/template                 |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ippusbxd/patches/fix-cflags.patch

diff --git a/srcpkgs/ippusbxd/patches/fix-cflags.patch b/srcpkgs/ippusbxd/patches/fix-cflags.patch
new file mode 100644
index 000000000000..5d36903c3ffd
--- /dev/null
+++ b/srcpkgs/ippusbxd/patches/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: src/CMakeLists.txt
+===================================================================
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required(VERSION 2.6)
+ project(ippusbxd)
+-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -o2 -g -std=c99 -Wall -Wextra -pedantic -pedantic-errors")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -pedantic -pedantic-errors")
+ 
+ 
+ # Compiler specific configuration
diff --git a/srcpkgs/ippusbxd/template b/srcpkgs/ippusbxd/template
index ce4ff2ea9125..e81064e8b91d 100644
--- a/srcpkgs/ippusbxd/template
+++ b/srcpkgs/ippusbxd/template
@@ -1,7 +1,7 @@
 # Template file for 'ippusbxd'
 pkgname=ippusbxd
 version=1.34
-revision=1
+revision=2
 build_wrksrc=src
 build_style=cmake
 make_cmd=make

From 06e3702ae03a246a2e076eb3855b7f77f68dfb37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:34:52 +0700
Subject: [PATCH 30/64] tlsh: respect -g

---
 srcpkgs/tlsh/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/tlsh/template                 |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 srcpkgs/tlsh/patches/fix-cflags.patch

diff --git a/srcpkgs/tlsh/patches/fix-cflags.patch b/srcpkgs/tlsh/patches/fix-cflags.patch
new file mode 100644
index 000000000000..8715563715c7
--- /dev/null
+++ b/srcpkgs/tlsh/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -125,7 +125,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Debug)
+     endif()
+ else(CMAKE_BUILD_TYPE STREQUAL Debug)
+     if(CMAKE_COMPILER_IS_GNUCXX)
+-        set(CMAKE_CXX_FLAGS "-O2 -fvisibility=internal")  ## Remove TlshImpl symbols
++        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=internal")  ## Remove TlshImpl symbols
+     endif()
+     if(MSVC)
+         set(CMAKE_CXX_FLAGS "/O2")        ## Optimize
diff --git a/srcpkgs/tlsh/template b/srcpkgs/tlsh/template
index 1f96834107cc..5df590d857c0 100644
--- a/srcpkgs/tlsh/template
+++ b/srcpkgs/tlsh/template
@@ -2,6 +2,7 @@
 pkgname=tlsh
 version=3.19.1
 revision=1
+revision=2
 build_style=cmake
 hostmakedepends="python3"
 makedepends="python3-devel"

From 1ae77853d0b654c3e60eeb28eaac2210135fdf4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:59:06 +0700
Subject: [PATCH 31/64] poppler: hardening + respect -g

---
 srcpkgs/poppler/patches/fix-cflags.patch | 21 +++++++++++++++++++++
 srcpkgs/poppler/template                 |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/poppler/patches/fix-cflags.patch

diff --git a/srcpkgs/poppler/patches/fix-cflags.patch b/srcpkgs/poppler/patches/fix-cflags.patch
new file mode 100644
index 000000000000..9e62b11010ba
--- /dev/null
+++ b/srcpkgs/poppler/patches/fix-cflags.patch
@@ -0,0 +1,21 @@
+Index: cmake/modules/PopplerMacros.cmake
+===================================================================
+--- cmake/modules/PopplerMacros.cmake.orig
++++ cmake/modules/PopplerMacros.cmake
+@@ -123,14 +123,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+   set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
+ 
+   set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
++  set(CMAKE_CXX_FLAGS                "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline ${_save_cxxflags}")
+   set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}")
+   set(_save_cflags "${CMAKE_C_FLAGS}")
+-  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE")
++  set(CMAKE_C_FLAGS                  "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g ${_save_cflags}")
+   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG ${_save_cflags}")
+   set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}")
diff --git a/srcpkgs/poppler/template b/srcpkgs/poppler/template
index ed0db8de7ab6..1aebd7f7e177 100644
--- a/srcpkgs/poppler/template
+++ b/srcpkgs/poppler/template
@@ -4,7 +4,7 @@
 #
 pkgname=poppler
 version=20.09.0
-revision=2
+revision=3
 build_style=cmake
 build_helper="gir"
 configure_args="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_CPP=ON

From 8aee7a43547075368182ae768d64b42be679e715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 21:59:29 +0700
Subject: [PATCH 32/64] poppler-qt5: hardening + respect -g

---
 srcpkgs/poppler-qt5/patches  | 1 +
 srcpkgs/poppler-qt5/template | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 120000 srcpkgs/poppler-qt5/patches

diff --git a/srcpkgs/poppler-qt5/patches b/srcpkgs/poppler-qt5/patches
new file mode 120000
index 000000000000..636e4ac2cbd9
--- /dev/null
+++ b/srcpkgs/poppler-qt5/patches
@@ -0,0 +1 @@
+../poppler/patches
\ No newline at end of file
diff --git a/srcpkgs/poppler-qt5/template b/srcpkgs/poppler-qt5/template
index 0dc45c05c58b..c2ec35dbbad3 100644
--- a/srcpkgs/poppler-qt5/template
+++ b/srcpkgs/poppler-qt5/template
@@ -5,7 +5,7 @@
 #
 pkgname=poppler-qt5
 version=20.09.0
-revision=1
+revision=2
 wrksrc="poppler-${version}"
 build_style=cmake
 configure_args="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_GLIB=OFF

From ac38c53aae1e29d713a05addce87b95e3e313733 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 11:17:35 +0700
Subject: [PATCH 33/64] artyfx: remove -O1 -g

---
 srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch | 4 ++--
 srcpkgs/artyfx/patches/respect-our-cflags.patch | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch b/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch
index 1a832155a566..47ef4dd9b84e 100644
--- a/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch
+++ b/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch
@@ -6,8 +6,8 @@
  
 -SET(CMAKE_C_FLAGS   "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
 -SET(CMAKE_CXX_FLAGS "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
-+SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -fPIC -g") # -fsanitize=address
-+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g") # -fsanitize=address
++SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -fPIC") # -fsanitize=address
++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # -fsanitize=address
 +
 +IF(BUILD_SSE)
 +	SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -msse -msse2 -mfpmath=sse")
diff --git a/srcpkgs/artyfx/patches/respect-our-cflags.patch b/srcpkgs/artyfx/patches/respect-our-cflags.patch
index ee9155c7729e..7a32fd9df73b 100644
--- a/srcpkgs/artyfx/patches/respect-our-cflags.patch
+++ b/srcpkgs/artyfx/patches/respect-our-cflags.patch
@@ -10,8 +10,8 @@ Index: CMakeLists.txt
 -SET(CMAKE_C_FLAGS "-g -Wall -O1 -Wno-unused-variable")
 -SET(CMAKE_CXX_FLAGS "-g -Wall -O1 -Wno-unused-variable -ftree-vectorize")
 +SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fPIC -shared -L./src/avtk -Wl,--no-undefined")
-+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -O1 -Wno-unused-variable")
-+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -O1 -Wno-unused-variable -ftree-vectorize")
++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall  -Wno-unused-variable")
++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall  -Wno-unused-variable -ftree-vectorize")
  
  
  # DSP sources

From 62b0cbc6a85dada677befcd9f9b76204fcfd74e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 11:27:28 +0700
Subject: [PATCH 34/64] coin3: build with CMAKE_BUILD_TYPE=None

---
 srcpkgs/coin3/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/coin3/template b/srcpkgs/coin3/template
index d5483ee048c3..8f7218c2e8c3 100644
--- a/srcpkgs/coin3/template
+++ b/srcpkgs/coin3/template
@@ -5,7 +5,7 @@ revision=1
 wrksrc="coin-Coin-${version}"
 build_style=cmake
 configure_args="-DCMAKE_INSTALL_INCLUDEDIR=/usr/include/Coin3
- -DCMAKE_BUILD_TYPE=Release -DCOIN_BUILD_TESTS=OFF -DCOIN_BUILD_DOCUMENTATION=ON"
+ -DCOIN_BUILD_TESTS=OFF -DCOIN_BUILD_DOCUMENTATION=ON"
 hostmakedepends="doxygen graphviz"
 makedepends="boost-devel glu-devel"
 short_desc="High-level 3D graphics toolkit"
@@ -15,6 +15,9 @@ homepage="https://coin3d.github.io/"
 distfiles="https://github.com/coin3d/coin/archive/Coin-${version}.tar.gz"
 checksum=b00d2a8e9d962397cf9bf0d9baa81bcecfbd16eef675a98c792f5cf49eb6e805
 
+CFLAGS=-DNDEBUG
+CXXFLAGS=-DNDEBUG
+
 if [ "$CROSS_BUILD" ]; then
 	# bypass runtime test (quote hashing is fine with gcc 9.3)
 	configure_args+=" -DHAVE_HASH_QUOTING_EXITCODE=0"

From 5e58fe98640176b01ba0e20517fff3c5a1ab86b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 11:46:46 +0700
Subject: [PATCH 35/64] conky: don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/conky/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/conky/template b/srcpkgs/conky/template
index 8b95a628edfb..f05c7d4a1bf2 100644
--- a/srcpkgs/conky/template
+++ b/srcpkgs/conky/template
@@ -5,7 +5,7 @@ version=1.12.1
 revision=1
 build_style=cmake
 conf_files="/etc/conky/conky.conf /etc/conky/conky_no_x11.conf"
-configure_args="-DCMAKE_BUILD_TYPE=Release -DMAINTAINER_MODE=ON -DRELEASE=ON
+configure_args="-DMAINTAINER_MODE=ON -DRELEASE=ON
  -DDOC_PATH=share/doc/${pkgname} -DBUILD_X11=ON -DBUILD_CURL=ON -DBUILD_XDBE=ON
  -DBUILD_RSS=ON -DBUILD_WEATHER_METAR=ON -DBUILD_IMLIB2=ON -DBUILD_WLAN=ON
  -DBUILD_LUA_CAIRO=ON -DBUILD_LUA_IMLIB2=ON -DBUILD_LUA_RSVG=ON

From caf51543d59a6f048c9057977dfebbefa6ce183d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 11:46:46 +0700
Subject: [PATCH 36/64] conky-cli: don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/conky-cli/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/conky-cli/template b/srcpkgs/conky-cli/template
index b61bdcca0504..7d512b65ab3e 100644
--- a/srcpkgs/conky-cli/template
+++ b/srcpkgs/conky-cli/template
@@ -6,7 +6,7 @@ revision=1
 wrksrc="${pkgname/-cli/}-${version}"
 build_style=cmake
 conf_files="/etc/conky/conky.conf /etc/conky/conky_no_x11.conf"
-configure_args="-DCMAKE_BUILD_TYPE=Release -DMAINTAINER_MODE=ON -DRELEASE=ON
+configure_args="-DMAINTAINER_MODE=ON -DRELEASE=ON
  -DDOC_PATH=share/doc/${pkgname} -DBUILD_X11=OFF -DBUILD_CURL=ON -DBUILD_XDBE=OFF
  -DBUILD_RSS=ON -DBUILD_WEATHER_METAR=OFF -DBUILD_IMLIB2=OFF -DBUILD_WLAN=ON
  -DBUILD_DOCS=ON"

From 0c4ab71b8e3ad99ff3cdd1371f1818d38b2280f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 11:48:25 +0700
Subject: [PATCH 37/64] crossguid: don't overwrite -O2

---
 srcpkgs/crossguid/fix-cflags.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/crossguid/fix-cflags.patch

diff --git a/srcpkgs/crossguid/fix-cflags.patch b/srcpkgs/crossguid/fix-cflags.patch
new file mode 100644
index 000000000000..983360a07ccf
--- /dev/null
+++ b/srcpkgs/crossguid/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.5.1)
+ project(CrossGuid)
+ 
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+ 
+ option(XG_TESTS "Build test runner" ON)
+ 

From 08a624f258bf87c33d55d3da98dbc94e23d31d30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:19:04 +0700
Subject: [PATCH 38/64] rapidjson: define -DNDEBUG

---
 srcpkgs/rapidjson/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/rapidjson/template b/srcpkgs/rapidjson/template
index 8597f8fb2706..99d92702cc9d 100644
--- a/srcpkgs/rapidjson/template
+++ b/srcpkgs/rapidjson/template
@@ -11,7 +11,7 @@ distfiles="https://github.com/miloyip/${pkgname}/archive/v${version}.tar.gz"
 checksum=bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
 
 # class-memaccess is required by https://github.com/Tencent/rapidjson/issues/1700
-CXXFLAGS="-Wno-type-limits -Wno-error=class-memaccess"
+CXXFLAGS="-Wno-type-limits -Wno-error=class-memaccess -DNDEBUG"
 
 post_patch() {
 	# Remove bin/jsonchecker, which is the JSON licensed files

From 4991790de1af4d9c9503fd96578c50c1415f1317 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:18:36 +0700
Subject: [PATCH 39/64] cura-engine: ignore -O3

---
 srcpkgs/cura-engine/patches/fix-cflags.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/cura-engine/patches/fix-cflags.patch

diff --git a/srcpkgs/cura-engine/patches/fix-cflags.patch b/srcpkgs/cura-engine/patches/fix-cflags.patch
new file mode 100644
index 000000000000..e48a665523b8
--- /dev/null
+++ b/srcpkgs/cura-engine/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -42,7 +42,7 @@ endif()
+ if(CMAKE_BUILD_TYPE_UPPER MATCHES "DEBUG")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG_INIT}")
+ else()
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE_INIT}")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG")
+ endif()
+ 
+ set(CMAKE_CXX_STANDARD 11)

From 990473961cdc768118943d0642389b24802446e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:22:29 +0700
Subject: [PATCH 40/64] dislocker: remove -O1

---
 srcpkgs/dislocker/patches/fix-cflags.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/dislocker/patches/fix-cflags.patch

diff --git a/srcpkgs/dislocker/patches/fix-cflags.patch b/srcpkgs/dislocker/patches/fix-cflags.patch
new file mode 100644
index 000000000000..1229efeeaf0c
--- /dev/null
+++ b/srcpkgs/dislocker/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: src/CMakeLists.txt
+===================================================================
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -71,7 +71,7 @@ if(NOT DEFINED WARN_FLAGS)
+ 	set (WARN_FLAGS "-Wall -Wextra" CACHE STRING "" FORCE)
+ endif()
+ if(NOT DEFINED HARDEN_FLAGS)
+-	set (HARDEN_FLAGS "-fstack-protector -fstrict-aliasing -D_FORTIFY_SOURCE=2 -O1" CACHE STRING "" FORCE)
++	set (HARDEN_FLAGS "-fstack-protector -fstrict-aliasing" CACHE STRING "" FORCE)
+ endif()
+ 
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

From 56b00cfa20092a8186bee75131541666ab9dcb98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:29:31 +0700
Subject: [PATCH 41/64] freeorion: remove -O3

---
 srcpkgs/freeorion/patches/fix-cflags.patch | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/freeorion/patches/fix-cflags.patch

diff --git a/srcpkgs/freeorion/patches/fix-cflags.patch b/srcpkgs/freeorion/patches/fix-cflags.patch
new file mode 100644
index 000000000000..c66d54599556
--- /dev/null
+++ b/srcpkgs/freeorion/patches/fix-cflags.patch
@@ -0,0 +1,18 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -432,13 +432,6 @@ if(MSVC)
+     )
+ endif()
+ 
+-target_compile_options(freeorionparseobj
+-    PRIVATE
+-        $<$<CXX_COMPILER_ID:Clang>:-ftemplate-depth=512>
+-        $<$<CXX_COMPILER_ID:AppleClang>:-ftemplate-depth=512>
+-        $<$<AND:$<NOT:$<BOOL:${BUILD_TESTING}>>,$<CXX_COMPILER_ID:GNU>>:-O3>
+-)
+-
+ target_compile_definitions(freeorionparseobj
+     PUBLIC
+         -DBOOST_ALL_DYN_LINK

From cf303ba9a06eae9be7aeb291f5a2e4230e140caf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Fri, 26 Mar 2021 09:01:12 +0700
Subject: [PATCH 42/64] cglm: fix build flags

---
 srcpkgs/cglm/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/cglm/template                 |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 srcpkgs/cglm/patches/fix-cflags.patch

diff --git a/srcpkgs/cglm/patches/fix-cflags.patch b/srcpkgs/cglm/patches/fix-cflags.patch
new file mode 100644
index 000000000000..c74de6ea62d7
--- /dev/null
+++ b/srcpkgs/cglm/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: cglm-0.7.6/CMakeLists.txt
+===================================================================
+--- cglm-0.7.6.orig/CMakeLists.txt
++++ cglm-0.7.6/CMakeLists.txt
+@@ -25,7 +25,7 @@ if(MSVC)
+ 	add_definitions(-DNDEBUG -D_WINDOWS -D_USRDLL -DCGLM_EXPORTS -DCGLM_DLL)
+ 	add_compile_options(/W3 /Ox /Gy /Oi /TC)
+ else()
+-  add_compile_options(-Wall -Werror -O3)
++  add_compile_options(-Wall)
+ endif()
+ 
+ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/srcpkgs/cglm/template b/srcpkgs/cglm/template
index f00a093edab9..311b4c79a7d3 100644
--- a/srcpkgs/cglm/template
+++ b/srcpkgs/cglm/template
@@ -9,6 +9,7 @@ license="MIT"
 homepage="https://github.com/recp/cglm"
 distfiles="https://github.com/recp/cglm/archive/v${version}.tar.gz"
 checksum=29ff8af4edc03697e36d3e6f99a80b884a80ee09d46055ce45765e5d6b2456d9
+patch_args=-Np1
 
 post_install() {
 	vlicense LICENSE

From 8f4704a4c93bed78f1e40d1d3a547b7fe2fce492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:36:19 +0700
Subject: [PATCH 43/64] glyr: don't force Release build

---
 srcpkgs/glyr/patches/fix-cflags.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/glyr/patches/fix-cflags.patch

diff --git a/srcpkgs/glyr/patches/fix-cflags.patch b/srcpkgs/glyr/patches/fix-cflags.patch
new file mode 100644
index 000000000000..498ffe09a38f
--- /dev/null
+++ b/srcpkgs/glyr/patches/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -60,7 +60,6 @@ exec_program(
+ IF(CMAKE_BUILD_TYPE STREQUAL "debug")
+     SET(GLYR_DEBUG TRUE)
+ ELSE()
+-    SET(CMAKE_BUILD_TYPE "release")
+     SET(GLYR_DEBUG FALSE)
+ ENDIF()
+ MESSAGE("-- Building Target: ${CMAKE_BUILD_TYPE}")

From 73dee710a647f5697229ef3c0d3bf45c0e64d612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 12:41:50 +0700
Subject: [PATCH 44/64] hugin: remove -O3

---
 srcpkgs/hugin/patches/fix-cflags.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 srcpkgs/hugin/patches/fix-cflags.patch

diff --git a/srcpkgs/hugin/patches/fix-cflags.patch b/srcpkgs/hugin/patches/fix-cflags.patch
new file mode 100644
index 000000000000..02fa56bef0e1
--- /dev/null
+++ b/srcpkgs/hugin/patches/fix-cflags.patch
@@ -0,0 +1,15 @@
+Index: src/celeste/CMakeLists.txt
+===================================================================
+--- src/celeste/CMakeLists.txt.orig
++++ src/celeste/CMakeLists.txt
+@@ -16,10 +16,6 @@
+ #    You should have received a copy of the GNU General Public License
+ #    along with Hugin  If not, see <http://www.gnu.org/licenses/>.
+  
+-IF(NOT WIN32)
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+-ENDIF(NOT WIN32)
+-
+ # a list of all files belonging to celeste library
+ 
+ SET(CELESTE_SRC

From b18cb1193ffe95ba7253c7410266b7c2404b3124 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 13:05:27 +0700
Subject: [PATCH 45/64] ledger: don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/ledger/patches/fix-cflags.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 srcpkgs/ledger/patches/fix-cflags.patch

diff --git a/srcpkgs/ledger/patches/fix-cflags.patch b/srcpkgs/ledger/patches/fix-cflags.patch
new file mode 100644
index 000000000000..179ab79cd148
--- /dev/null
+++ b/srcpkgs/ledger/patches/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -41,7 +41,6 @@ if (BUILD_DEBUG)
+   set(CMAKE_BUILD_TYPE Debug)
+   set(DEBUG_MODE 1)
+ else()
+-  set(CMAKE_BUILD_TYPE Release)
+   set(DEBUG_MODE 0)
+ endif()
+ 

From bd0e02ba2dcc674e79d987798571a3f9d4383215 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 13:18:24 +0700
Subject: [PATCH 46/64] libmygpo-qt: remove -ggdb3

---
 srcpkgs/libmygpo-qt/patches/fix-cflags.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/libmygpo-qt/patches/fix-cflags.patch

diff --git a/srcpkgs/libmygpo-qt/patches/fix-cflags.patch b/srcpkgs/libmygpo-qt/patches/fix-cflags.patch
new file mode 100644
index 000000000000..9940b6fc4323
--- /dev/null
+++ b/srcpkgs/libmygpo-qt/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -69,7 +69,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
+        -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
+        -Wold-style-cast -Woverloaded-virtual -Wnon-virtual-dtor  -Wall -Wextra
+        -Wformat=2 -Wundef -Wstack-protector -Wmissing-include-dirs
+-       -Winit-self -Wunsafe-loop-optimizations  -ggdb3 -fno-inline -DQT_STRICT_ITERATORS )
++       -Winit-self -Wunsafe-loop-optimizations  -fno-inline -DQT_STRICT_ITERATORS )
+     if ( NOT WIN32 )
+         add_definitions( -fvisibility=hidden )
+     endif()

From d76b6124f18c2dfeb3f6a4caf37a166c3fb09330 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 13:48:38 +0700
Subject: [PATCH 47/64] libogre: don't build vendored libraries

---
 srcpkgs/libogre/template | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/libogre/template b/srcpkgs/libogre/template
index 784e3a648bac..6dd88ea08c73 100644
--- a/srcpkgs/libogre/template
+++ b/srcpkgs/libogre/template
@@ -3,11 +3,8 @@ pkgname=libogre
 version=1.12.9
 revision=1
 build_style=cmake
-configure_args="-DCMAKE_INSTALL_PREFIX=/usr \
-	-DOGRE_INSTALL_SAMPLES=TRUE \
-	-DOGRE_INSTALL_DOCS=TRUE \
-	-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \
-	-DCMAKE_BUILD_TYPE=Release"
+configure_args="-DOGRE_INSTALL_SAMPLES=TRUE -DOGRE_INSTALL_DOCS=TRUE
+ -DOGRE_INSTALL_SAMPLES_SOURCE=TRUE -DOGRE_BUILD_DEPENDENCIES=FALSE"
 hostmakedepends="pkg-config graphviz doxygen dejavu-fonts-ttf"
 makedepends="boost-devel freetype-devel libXaw-devel libXrandr-devel
  MesaLib-devel zziplib-devel libcppunit-devel glu-devel libatomic-devel

From e1a2cfc1b044b10b79ddd75b5e5bbd0fbe77bcf9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 13:52:50 +0700
Subject: [PATCH 48/64] libopenglrecorder: remove -O3

---
 srcpkgs/libopenglrecorder/patches/fix-cflags.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/libopenglrecorder/patches/fix-cflags.patch

diff --git a/srcpkgs/libopenglrecorder/patches/fix-cflags.patch b/srcpkgs/libopenglrecorder/patches/fix-cflags.patch
new file mode 100644
index 000000000000..7c48a0d2d822
--- /dev/null
+++ b/srcpkgs/libopenglrecorder/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -21,7 +21,7 @@ if (UNIX OR MINGW)
+     if (CMAKE_BUILD_TYPE MATCHES Debug)
+         add_definitions(-std=gnu++0x -O0)
+     else()
+-        add_definitions(-std=gnu++0x -O3)
++        add_definitions(-std=gnu++0x)
+     endif()
+ endif()
+ 

From adb29ba44aa3143c71327c5fe347cbfddb3816bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 13:55:41 +0700
Subject: [PATCH 49/64] libvidstab: remove -O3

---
 srcpkgs/libvidstab/patches/fix-cflags.patch | 39 +++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 srcpkgs/libvidstab/patches/fix-cflags.patch

diff --git a/srcpkgs/libvidstab/patches/fix-cflags.patch b/srcpkgs/libvidstab/patches/fix-cflags.patch
new file mode 100644
index 000000000000..51c357efb101
--- /dev/null
+++ b/srcpkgs/libvidstab/patches/fix-cflags.patch
@@ -0,0 +1,39 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -25,7 +25,7 @@ else()
+     set(LIBSUFFIX "")
+ endif()
+ 
+-add_definitions( -Wall -O3 -g -Wno-pointer-sign -fPIC -std=gnu99)
++add_definitions( -Wall -Wno-pointer-sign -fPIC -std=gnu99)
+ # add_definitions(  -Wall -O0 -g -Wno-pointer-sign )
+ 
+ ### ORC is not used in any active code at the moment  ###
+Index: tests/CMakeLists.txt
+===================================================================
+--- tests/CMakeLists.txt.orig
++++ tests/CMakeLists.txt
+@@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
+ option(USE_OMP "use parallelization use OMP" ON)
+ 
+ #add_definitions( -Wall -O3 -Wno-pointer-sign -DTESTING  -std=gnu99)
+-add_definitions(  -Wall -O0 -g -Wno-pointer-sign -DTESTING -std=gnu99)
++add_definitions(  -Wall -Wno-pointer-sign -DTESTING -std=gnu99)
+ find_package(Orc)
+ if(ORC_FOUND)
+ add_definitions( -DUSE_ORC ${ORC_DEFINITIONS})
+Index: transcode/CMakeLists.txt
+===================================================================
+--- transcode/CMakeLists.txt.orig
++++ transcode/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
+ set(TRANSCODE_ROOT ../../transcode)
+ 
+ 
+-add_definitions( -Wall -O3 -Wno-pointer-sign -DTRANSCODE -std=gnu99)
++add_definitions( -Wall -Wno-pointer-sign -DTRANSCODE -std=gnu99)
+ #add_definitions(  -Wall -O0 -g -Wno-pointer-sign )
+ # I tried it with 0.4.14
+ #  0.4.10 did not work (not all opcode implemented)

From 6ab3a3cab4ec5c293f0832172c3b03b3be5c312e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 14:18:34 +0700
Subject: [PATCH 50/64] openlierox: don't overwrote CMAKE_BUILD_TYPE

---
 srcpkgs/openlierox/patches/fix-cflags.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/openlierox/patches/fix-cflags.patch

diff --git a/srcpkgs/openlierox/patches/fix-cflags.patch b/srcpkgs/openlierox/patches/fix-cflags.patch
new file mode 100644
index 000000000000..4fe6652fd0a2
--- /dev/null
+++ b/srcpkgs/openlierox/patches/fix-cflags.patch
@@ -0,0 +1,17 @@
+Index: CMakeOlxCommon.cmake
+===================================================================
+--- CMakeOlxCommon.cmake.orig
++++ CMakeOlxCommon.cmake
+@@ -36,12 +36,6 @@ OPTION(BREAKPAD "Google Breakpad support
+ OPTION(DISABLE_JOYSTICK "Disable joystick support" No)
+ OPTION(MINGW_CROSS_COMPILE "Cross-compile Windows .EXE using i686-w64-mingw32-gcc compiler" No)
+ 
+-IF (DEBUG)
+-	SET(CMAKE_BUILD_TYPE Debug)
+-ELSE (DEBUG)
+-	SET(CMAKE_BUILD_TYPE Release)
+-ENDIF (DEBUG)
+-
+ IF (DEDICATED_ONLY)
+ 	SET(X11 No)
+ 	SET(WITH_G15 No)

From 023e2038f71e66cfc4e27a5ca66b8b994a7517b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 14:25:12 +0700
Subject: [PATCH 51/64] opensonic: don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/opensonic/patches/fix-cflags.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/opensonic/patches/fix-cflags.patch

diff --git a/srcpkgs/opensonic/patches/fix-cflags.patch b/srcpkgs/opensonic/patches/fix-cflags.patch
new file mode 100644
index 000000000000..10d2c7c80e64
--- /dev/null
+++ b/srcpkgs/opensonic/patches/fix-cflags.patch
@@ -0,0 +1,17 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -25,12 +25,10 @@ SET(GAME_NAME "Open Sonic")
+ SET(GAME_VERSION "0.1.4")
+ SET(RTFM "Please read the user manual (readme.html) to get help.")
+ SET(ALLEGRO_RECOMMENDED_VERSION "4.4.1")
+-SET(CMAKE_BUILD_TYPE Release)
+ MESSAGE("${GAME_NAME} version ${GAME_VERSION}")
+ 
+ # configuring...
+ SET(DEFS "")
+-SET(CFLAGS_EXTRA "-g")
+ SET(CFLAGS "${CFLAGS} ${CMAKE_C_FLAGS}")
+ MESSAGE("Using CFLAGS='${CFLAGS}'")
+ 

From 1c28e25378861136ec3ddfdad4a444c84471bb04 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 15:17:28 +0700
Subject: [PATCH 52/64] rocksdb: don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/rocksdb/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/rocksdb/template b/srcpkgs/rocksdb/template
index e39329e5d6a6..5a6ca434f29b 100644
--- a/srcpkgs/rocksdb/template
+++ b/srcpkgs/rocksdb/template
@@ -3,8 +3,7 @@ pkgname=rocksdb
 version=5.18.3
 revision=2
 build_style=cmake
-configure_args="-DCMAKE_BUILD_TYPE=Release -DPORTABLE=1 -DWITH_TESTS=0
- -DUSE_RTTI=0 -DWITH_LZ4=1"
+configure_args="-DPORTABLE=1 -DWITH_TESTS=0 -DUSE_RTTI=0 -DWITH_LZ4=1"
 makedepends="liblz4-devel"
 short_desc="RocksDB is a embeddable, persistent key-value store for fast storage"
 maintainer="magenbluten <mb0@codemonkey.cc>"
@@ -12,6 +11,8 @@ license="GPL-2.0-or-later, Apache-2.0"
 homepage="https://github.com/facebook/rocksdb"
 distfiles="${homepage}/archive/v${version}.tar.gz"
 checksum=7fb6738263d3f2b360d7468cf2ebe333f3109f3ba1ff80115abd145d75287254
+CFLAGS=-DNDEBUG
+CXXFLAGS=-DNDEBUG
 
 if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
 	makedepends+=" libatomic-devel"

From d8b2bc24378ad0dd87176e0961f34c2468b6eb8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 15:19:47 +0700
Subject: [PATCH 53/64] rofs-filtered: hardening

---
 srcpkgs/rofs-filtered/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/rofs-filtered/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/rofs-filtered/patches/fix-cflags.patch

diff --git a/srcpkgs/rofs-filtered/patches/fix-cflags.patch b/srcpkgs/rofs-filtered/patches/fix-cflags.patch
new file mode 100644
index 000000000000..f64d3274f091
--- /dev/null
+++ b/srcpkgs/rofs-filtered/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -9,7 +9,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PA
+      "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+ 
+ add_definitions(-D_GNU_SOURCE)
+-set(CMAKE_C_FLAGS "-Wall -std=c99")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=c99")
+ 
+ # find fuse library
+ find_package (FUSE REQUIRED)
diff --git a/srcpkgs/rofs-filtered/template b/srcpkgs/rofs-filtered/template
index 332cd57a9902..e585877eaf59 100644
--- a/srcpkgs/rofs-filtered/template
+++ b/srcpkgs/rofs-filtered/template
@@ -1,7 +1,7 @@
 # Template file for 'rofs-filtered'
 pkgname=rofs-filtered
 version=1.7
-revision=1
+revision=2
 build_style=cmake
 makedepends="fuse-devel"
 short_desc="Filtered read only filesystem for FUSE"

From fa9f2ec55c5593ecd66b26fabf907d701a98441e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 15:40:26 +0700
Subject: [PATCH 54/64] seexpr-krita: don't overwrite CMAKE_BUILD_TYPE

---
 .../patches/cmake-build-type-none.patch       | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 srcpkgs/seexpr-krita/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/seexpr-krita/patches/cmake-build-type-none.patch b/srcpkgs/seexpr-krita/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..94bb1f37db75
--- /dev/null
+++ b/srcpkgs/seexpr-krita/patches/cmake-build-type-none.patch
@@ -0,0 +1,32 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -42,14 +42,6 @@ endif()
+ 
+ ## Choose build options
+ # Disney specific method of choosing variant
+-if (${FLAVOR} STREQUAL "optimize")
+-    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE)
+-endif()
+-
+-if (${FLAVOR} STREQUAL "debug")
+-    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE)
+-endif()
+-
+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+     execute_process(
+         COMMAND sh -c "echo `uname -s`-`uname -r | cut -d- -f1`-`uname -m`"
+@@ -212,12 +204,6 @@ else()
+ endif()
+ 
+ # Set to release if nothing else defined
+-if (NOT CMAKE_BUILD_TYPE)
+-  set(CMAKE_BUILD_TYPE "Release" CACHE STRING
+-      "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
+-      FORCE)
+-endif()
+-
+ if (ENABLE_QT5)
+     find_package(Qt5 5.9.0 COMPONENTS Core Gui Widgets REQUIRED)
+     set_package_properties(Qt5 PROPERTIES

From 96f1b6fcc5e79b75490aaecdc958c08ff7cf8e68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 15:50:53 +0700
Subject: [PATCH 55/64] speed-dreams: hardening

---
 srcpkgs/speed-dreams/template | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/speed-dreams/template b/srcpkgs/speed-dreams/template
index 722f0c5ed87a..df7164f9c808 100644
--- a/srcpkgs/speed-dreams/template
+++ b/srcpkgs/speed-dreams/template
@@ -1,13 +1,13 @@
 # Template file for 'speed-dreams'
 pkgname=speed-dreams
 version=2.2.2
-revision=2
+revision=3
 archs="i686* x86_64* ppc64le*"
 _rev=r6553
 create_wrksrc=yes
 build_style=cmake
-configure_args="-DSD_BINDIR=/usr/bin -DSD_DATADIR=/usr/share/speed-dreams-2 -DSD_LIBDIR=/usr/lib/speed-dreams-2
- -DOPTION_OFFICIAL_ONLY=ON -DCMAKE_CXX_FLAGS=-fpermissive -DCMAKE_C_FLAGS=-fpermissive"
+configure_args="-DSD_BINDIR=/usr/bin -DSD_DATADIR=/usr/share/speed-dreams-2
+ -DSD_LIBDIR=/usr/lib/speed-dreams-2 -DOPTION_OFFICIAL_ONLY=ON"
 hostmakedepends="pkg-config"
 makedepends="freealut-devel libenet-devel libfreeglut-devel libjpeg-turbo-devel
  libpng-devel libvorbis-devel libXrandr-devel osg-devel plib-devel SDL2-devel
@@ -26,6 +26,8 @@ checksum="32aa55c17f8dafc1c54fb0d0b7b993d2688d431899cfc5db9eeece148c6887d0
  0b7b417d007ab3b7f0f4dcfdc868aafee1722150b81af519e1cd4c082b408183"
 nocross=yes
 replaces="speed-dreams-data>=0"
+CFLAGS=-fpermissive
+CXXFLAGS=-fpermissive
 
 if [ "$XBPS_TARGET_LIBC" = musl ]; then
 	broken="Segmentation fault"

From e9a04e50205312c38c1b2faf5908b674d85cc603 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:04:09 +0700
Subject: [PATCH 56/64] traverso: hardening

---
 .../patches/cmake-build-type-none.patch       | 28 +++++++++++++++++++
 srcpkgs/traverso/template                     |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/traverso/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/traverso/patches/cmake-build-type-none.patch b/srcpkgs/traverso/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..75b3fd941eb8
--- /dev/null
+++ b/srcpkgs/traverso/patches/cmake-build-type-none.patch
@@ -0,0 +1,28 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -65,13 +65,7 @@ SET(TRAVERSO_DEFINES -DSTATIC_BUILD)
+ 
+ #BUILD SETUP
+ #None, Debug, Release, .. or custom ones
+-IF(WANT_DEBUG)
+-  SET(CMAKE_BUILD_TYPE DEBUG)
+-  SET(WANT_TRAVERSO_DEBUG ON)
+-ELSE(WANT_DEBUG)
+-  SET(CMAKE_BUILD_TYPE RELEASE)
+-  LIST(APPEND TRAVERSO_DEFINES -DQT_NO_DEBUG)
+-ENDIF(WANT_DEBUG)
++LIST(APPEND TRAVERSO_DEFINES -DQT_NO_DEBUG)
+ 
+ 
+ IF(WANT_TRAVERSO_DEBUG)
+@@ -326,7 +320,7 @@ ${Qt5Xml_INCLUDE_DIRS}
+ ${Qt5Xml_INCLUDES}
+ )
+ 
+-set(CMAKE_CXX_FLAGS "-fPIC")
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+ 
+ #Set up libraries to link with all found packages
+ LINK_LIBRARIES (
diff --git a/srcpkgs/traverso/template b/srcpkgs/traverso/template
index 105924d4f0c6..4b93460f63d7 100644
--- a/srcpkgs/traverso/template
+++ b/srcpkgs/traverso/template
@@ -1,7 +1,7 @@
 # Template file for 'traverso'
 pkgname=traverso
 version=0.49.6
-revision=1
+revision=2
 build_style=cmake
 configure_args="-DWANT_MP3_ENCODE=ON -DDETECT_HOST_CPU_FEATURES=OFF"
 hostmakedepends="pkg-config qt5-qmake qt5-host-tools"

From d8099af5c3ec6a2b449a10e97f7a1114f474cc3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:08:11 +0700
Subject: [PATCH 57/64] xstarter: hardening

---
 .../patches/cmake-build-type-none.patch       | 22 +++++++++++++++++++
 srcpkgs/xstarter/template                     |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xstarter/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/xstarter/patches/cmake-build-type-none.patch b/srcpkgs/xstarter/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..4f793e4c473c
--- /dev/null
+++ b/srcpkgs/xstarter/patches/cmake-build-type-none.patch
@@ -0,0 +1,22 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -5,16 +5,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+ 
+ project(xstarter)
+ 
+-if(NOT CMAKE_BUILD_TYPE)
+-  set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
+-endif()
+-
+ set(PROJECT_VERSION "0.8.0")
+-if (CMAKE_BUILD_TYPE STREQUAL Debug)
+-  set(CMAKE_C_FLAGS "-g -Wall -pedantic")
+-else()
+-  set(CMAKE_C_FLAGS "-Wall -pedantic -O3")
+-endif()
++set(CMAKE_C_FLAGS "-Wall -pedantic ${CMAKE_C_FLAGS}")
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin")
+ 
+ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
diff --git a/srcpkgs/xstarter/template b/srcpkgs/xstarter/template
index aa9a47e45e5c..4363d36e3c39 100644
--- a/srcpkgs/xstarter/template
+++ b/srcpkgs/xstarter/template
@@ -1,7 +1,7 @@
 # Template file for 'xstarter'
 pkgname=xstarter
 version=0.8.0
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="pkg-config"
 makedepends="glib-devel ncurses-devel"

From 3ccc901009fbec6e735559c5305652985aca2b32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:15:48 +0700
Subject: [PATCH 58/64] yabause-gtk: ignore -O3

---
 srcpkgs/yabause-gtk/patches/fix-cflags.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 srcpkgs/yabause-gtk/patches/fix-cflags.patch

diff --git a/srcpkgs/yabause-gtk/patches/fix-cflags.patch b/srcpkgs/yabause-gtk/patches/fix-cflags.patch
new file mode 100644
index 000000000000..52c1cae61799
--- /dev/null
+++ b/srcpkgs/yabause-gtk/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: src/CMakeLists.txt
+===================================================================
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -659,7 +659,7 @@ else ()
+ 	set(yabause_SOURCES ${yabause_SOURCES} sock-dummy.c thr-dummy.c)
+ endif ()
+ 
+-set(YAB_OPTIMIZATION "-O3" CACHE STRING "Override optimization level")
++set(YAB_OPTIMIZATION "" CACHE STRING "Override optimization level")
+ 
+ if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
+ 	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${YAB_OPTIMIZATION} -march=i686 -msse")

From 74b945bb8aa631470b6f9fbf691053aba84d95a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:26:47 +0700
Subject: [PATCH 59/64] ympd: hardening

---
 srcpkgs/ympd/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/ympd/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/ympd/patches/fix-cflags.patch

diff --git a/srcpkgs/ympd/patches/fix-cflags.patch b/srcpkgs/ympd/patches/fix-cflags.patch
new file mode 100644
index 000000000000..4720dd39e748
--- /dev/null
+++ b/srcpkgs/ympd/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -24,7 +24,7 @@ include_directories(${PROJECT_BINARY_DIR
+ 
+ include(CheckCSourceCompiles)
+ 
+-set(CMAKE_C_FLAGS "-std=gnu99 -Wall")
++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall")
+ set(CMAKE_C_FLAGS_DEBUG "-ggdb -pedantic")
+ if(WITH_IPV6)
+     set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS NS_ENABLE_IPV6)
diff --git a/srcpkgs/ympd/template b/srcpkgs/ympd/template
index 14437beb5384..450c079b2ca3 100644
--- a/srcpkgs/ympd/template
+++ b/srcpkgs/ympd/template
@@ -1,7 +1,7 @@
 # Template file for 'ympd'
 pkgname=ympd
 version=1.3.0
-revision=7
+revision=8
 build_style=cmake
 hostmakedepends="perl pkg-config"
 makedepends="libmpdclient-devel openssl-devel"

From d04863967110a5446ab006ce62a7b899de41344b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:29:31 +0700
Subject: [PATCH 60/64] z80ex: hardening

---
 srcpkgs/z80ex/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/z80ex/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/z80ex/patches/fix-cflags.patch

diff --git a/srcpkgs/z80ex/patches/fix-cflags.patch b/srcpkgs/z80ex/patches/fix-cflags.patch
new file mode 100644
index 000000000000..6743da255e5c
--- /dev/null
+++ b/srcpkgs/z80ex/patches/fix-cflags.patch
@@ -0,0 +1,13 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -11,7 +11,7 @@ option (OPSTEP_FAST_AND_ROUGH "Fast and
+ 
+ #ALL_CFLAGS := -fPIC -fno-common -ansi -pedantic -Wall -pipe -O2 -I. -I./include
+ if (CMAKE_COMPILER_IS_GNUCC)
+-    set (CMAKE_C_FLAGS "-fPIC -fno-common -ansi -pedantic -Wall -pipe -O2")
++    set (CMAKE_C_FLAGS "-fPIC -fno-common -ansi -pedantic -Wall -pipe ${CMAKE_C_FLAGS}")
+ endif ()
+ 
+ include_directories(BEFORE . include)
diff --git a/srcpkgs/z80ex/template b/srcpkgs/z80ex/template
index 00a24a6fb902..ae04241dcb5a 100644
--- a/srcpkgs/z80ex/template
+++ b/srcpkgs/z80ex/template
@@ -1,7 +1,7 @@
 # Template file for 'z80ex'
 pkgname=z80ex
 version=1.1.21
-revision=1
+revision=2
 build_style=cmake
 short_desc="ZiLOG Z80 CPU emulation library"
 maintainer="Diogo Leal <diogo@diogoleal.com>"

From 652c9126952f4f305709df6bc022cf354e7f3853 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 27 Mar 2021 19:17:13 +0700
Subject: [PATCH 61/64] scribus: don't overwrite cmake-build-type

---
 .../patches/cmake-build-type-none.patch       | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 srcpkgs/scribus/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/scribus/patches/cmake-build-type-none.patch b/srcpkgs/scribus/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..670c83cc48f5
--- /dev/null
+++ b/srcpkgs/scribus/patches/cmake-build-type-none.patch
@@ -0,0 +1,33 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -35,11 +35,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ 
+ 
+ #RPATH setup - more below too
+-if (WANT_NORPATH OR WANT_DISTROBUILD)
+-	set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+-else()
+-	set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+-endif()
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
+ set(CMAKE_SKIP_BUILD_RPATH TRUE)
+@@ -309,16 +304,6 @@ include (CMakeLists_Directories.cmake)
+ #Convert our simpler command line option to the CMake style
+ #None, Debug, Release, .. or custom ones
+ # set(WANT_DEBUG ON)
+-if(WANT_DEBUG)
+-	set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Set Debug Build Type" FORCE)
+-endif()
+-if (WANT_RELEASEWITHDEBUG)
+-	set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Set Release with Debug Info Build Type" FORCE)
+-endif()
+-if(NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
+-	set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Set Release Build Type" FORCE)
+-endif()
+-
+ 
+ 
+ #Based on our build type, setup our build options

From 53a3b7c0f26c6ee3733398de568504527403fb78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 28 Mar 2021 10:39:04 +0700
Subject: [PATCH 62/64] yoshimi: cleanup, don't overwrite CMAKE_BUILD_TYPE

---
 srcpkgs/yoshimi/patches/fix-cflags.patch | 12 ++++++++++++
 srcpkgs/yoshimi/template                 | 13 +------------
 2 files changed, 13 insertions(+), 12 deletions(-)
 create mode 100644 srcpkgs/yoshimi/patches/fix-cflags.patch

diff --git a/srcpkgs/yoshimi/patches/fix-cflags.patch b/srcpkgs/yoshimi/patches/fix-cflags.patch
new file mode 100644
index 000000000000..4baeb82ef4e3
--- /dev/null
+++ b/srcpkgs/yoshimi/patches/fix-cflags.patch
@@ -0,0 +1,12 @@
+Index: src/CMakeLists.txt
+===================================================================
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -262,7 +262,6 @@ if (BuildForDebug)
+     set (CMAKE_CXX_FLAGS_DEBUG ${BuildOptionsDebug})
+     message (STATUS "DEBUG Build, flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
+ else()
+-    set (CMAKE_BUILD_TYPE "Release")
+     set (CMAKE_CXX_FLAGS_RELEASE ${BuildOptionsRelease})
+     message (STATUS "RELEASE Build, flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
+ endif ()
diff --git a/srcpkgs/yoshimi/template b/srcpkgs/yoshimi/template
index 0096f7f05710..64a6c9ad433f 100644
--- a/srcpkgs/yoshimi/template
+++ b/srcpkgs/yoshimi/template
@@ -4,6 +4,7 @@ version=1.7.4
 revision=2
 build_wrksrc=src
 build_style=cmake
+configure_args="-DCMAKE_INSTALL_DATAROOTDIR=/usr/share"
 hostmakedepends="pkg-config fltk"
 makedepends="boost-devel jack-devel fltk-devel fftw-devel mxml-devel cairo-devel
  lv2 readline-devel ncurses-devel"
@@ -17,15 +18,3 @@ checksum=27a8e33bda72aafae604e14841bed6373fc9e00ff70c98f1e13215d6a8808318
 case "$XBPS_TARGET_MACHINE" in
 	*-musl) makedepends+=" argp-standalone";;
 esac
-
-configure_args="-DCMAKE_INSTALL_DATAROOTDIR=/usr/share"
-
-pre_configure() {
-	sed -i 's|ncurses|ncursesw|g' CMakeLists.txt
-
-	case "$XBPS_TARGET_MACHINE" in
-		i686*) ;;
-		x86_64*) ;;
-		*) sed -i -e "s|-msse -msse2 -mfpmath=sse||g" CMakeLists.txt;;
-	esac
-}

From 0746f95d9fe51142162b2c9954377170f49e6f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 28 Mar 2021 10:49:25 +0700
Subject: [PATCH 63/64] zulucrypt: remove -O3

---
 srcpkgs/zulucrypt/patches/fix-cflags.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/zulucrypt/patches/fix-cflags.patch

diff --git a/srcpkgs/zulucrypt/patches/fix-cflags.patch b/srcpkgs/zulucrypt/patches/fix-cflags.patch
new file mode 100644
index 000000000000..d77c539c6c13
--- /dev/null
+++ b/srcpkgs/zulucrypt/patches/fix-cflags.patch
@@ -0,0 +1,26 @@
+Index: external_libraries/tcplay/CMakeLists.txt
+===================================================================
+--- external_libraries/tcplay/CMakeLists.txt.orig
++++ external_libraries/tcplay/CMakeLists.txt
+@@ -13,7 +13,7 @@ set (SRCS_LINUX  crypto-gcrypt.c)
+ set (CFLAGS_LINUX  "-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE")
+ set (CFLAGS_WARN "-w")
+ set (CFLAGS_DEBUG  "-O0 -g3 -DDEBUG")
+-set (CFLAGS_OPT    "-O3")
++set (CFLAGS_OPT    "")
+ set (CFLAGS_VER    "-DMAJ_VER=${VERSION_MAJOR} -DMIN_VER=${VERSION_MINOR}")
+ set (CFLAGS_COMMON "-std=c99 -fPIC  ${CFLAGS_LINUX} ${CFLAGS_WARN} ${CFLAGS_VER}")
+ if ($ENV{DEBUG})
+Index: external_libraries/tcplay/Makefile.classic
+===================================================================
+--- external_libraries/tcplay/Makefile.classic.orig
++++ external_libraries/tcplay/Makefile.classic
+@@ -47,8 +47,6 @@ COMMON_CFLAGS= $(WARNFLAGS) -fPIC $(VER_
+ 
+ ifeq ($(DEBUG), yes)
+   COMMON_CFLAGS+= -O0 -g -DDEBUG
+-else
+-  COMMON_CFLAGS+= -O3
+ endif
+ 
+ ifeq (${SYSTEM}, linux)

From b7f331027935ec794fca1948d8d8decfd1ce85b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sun, 28 Mar 2021 10:43:24 +0700
Subject: [PATCH 64/64] zbackup: don't overwrite CMAKE_BUILD_TYPE

---
 .../patches/cmake-build-type-none.patch       | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/zbackup/patches/cmake-build-type-none.patch

diff --git a/srcpkgs/zbackup/patches/cmake-build-type-none.patch b/srcpkgs/zbackup/patches/cmake-build-type-none.patch
new file mode 100644
index 000000000000..6d6ebc8e124d
--- /dev/null
+++ b/srcpkgs/zbackup/patches/cmake-build-type-none.patch
@@ -0,0 +1,26 @@
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -6,8 +6,6 @@ project( zbackup )
+ 
+ set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
+ 
+-set( CMAKE_BUILD_TYPE Release )
+-
+ find_package( ZLIB REQUIRED )
+ include_directories( ${ZLIB_INCLUDE_DIRS} )
+ 
+Index: tartool/CMakeLists.txt
+===================================================================
+--- tartool/CMakeLists.txt.orig
++++ tartool/CMakeLists.txt
+@@ -4,8 +4,6 @@
+ cmake_minimum_required( VERSION 2.6.0 )
+ project( tartool )
+ 
+-set( CMAKE_BUILD_TYPE Release )
+-
+ add_executable( tartool tartool.cc ../file.cc ../dir.cc )
+ 
+ install( TARGETS tartool DESTINATION bin )

  parent reply	other threads:[~2021-03-28  3:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 13:19 [PR PATCH] [WIP] " sgn
2021-03-15  1:07 ` [PR PATCH] [Updated] " sgn
2021-03-16 23:26 ` sgn
2021-03-17 15:32 ` sgn
2021-03-21  9:45 ` sgn
2021-03-21  9:48 ` sgn
2021-03-21  9:48 ` [PR REVIEW] " sgn
2021-03-21  9:52 ` sgn
2021-03-21  9:55 ` sgn
2021-03-21  9:55 ` [PR REVIEW] " thypon
2021-03-21  9:55 ` thypon
2021-03-21  9:59 ` sgn
2021-03-23  9:15 ` [PR REVIEW] " Piraty
2021-03-25  0:45 ` [PR PATCH] [Updated] " sgn
2021-03-25  1:38 ` sgn
2021-03-26 15:13 ` sgn
2021-03-26 15:42 ` ericonr
2021-03-26 15:43 ` ericonr
2021-03-26 15:48 ` sgn
2021-03-26 16:01 ` [PR PATCH] [Updated] " sgn
2021-03-27  8:23 ` sgn
2021-03-27  8:24 ` sgn
2021-03-27  8:51 ` [PR PATCH] [Updated] " sgn
2021-03-27 12:30 ` sgn
2021-03-27 12:33 ` sgn
2021-03-28  3:40 ` [PR PATCH] [Updated] " sgn
2021-03-28  3:50 ` sgn
2021-03-28  3:53 ` sgn [this message]
2021-03-28  3:54 ` sgn
2021-03-29  0:48 ` [PR PATCH] [Updated] " sgn
2021-03-29 15:30 ` sgn
2021-04-03  3:00 ` sgn
2021-04-03  3:13 ` sgn
2021-04-03  3:13 ` [PR PATCH] [Merged]: " sgn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210328035302.cN_OP2Y5diz55kqmXREHKzIPIIT20Qidl_9QBKtbTjs@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).