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: Fri, 26 Mar 2021 17:01:18 +0100	[thread overview]
Message-ID: <20210326160118.zhh2i0OLewlMgmNPpU-o58k2CElJs9plrBQnhv19cdA@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: 74146 bytes --]

From 6bba5dd40c15240ad76ace09d23d777b465040ef 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/32] 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 77c730b123b94a1374cf0ef798d70b633fffb2e3 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/32] 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 c5dcd247ea1c0ae8e2a83457b4c5a9bdcd05f324 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/32] 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 3eea18f71241971bfe905f1ba4a917eeb5436fe6 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/32] 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 274f24869e6542463139b0bd98f5f9b442b7a5ca 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/32] 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 dae502a371be70e437826a4726cf398ce148e037 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/32] 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 4b7c6187ec6c4640ec9da85315e4c2393dfc1820 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/32] 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 5727dad7ecbfac1581934fe3664e3b1f3fa2bcb7 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/32] 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 20f059a77216f81625f772d4d238aab032c7f073 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/32] 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 6aacee04e09f823622647cff143a6d3ab2403eda 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/32] 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 f36567e806214b96fa6f1b40e49c0f26fbd71677 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/32] 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 e8b44331d198ba41b7d99b00d2194eb75207e65b 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/32] 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 0e7c8856f68c3ffc1691567e2ad65967425afbaa 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/32] 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 0ce1832319113c1a92f43c7aaa50bf23f5514cdf 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/32] 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 914acbd42098081f79b90a5d0756c0e9b76d3006 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/32] 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 e745e765d75fabb99f127940714e28720ee55c6d 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/32] 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 8e0fe63861ce4cb12009deaff8cb78ba64eba469 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/32] 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 fab84820a91e5a12b52327ba0d979a07f71841a0 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/32] 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 51f5739b2de15686b26fadcf32c51d7cc018f102 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/32] 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 84e9de6048876804dc062cd2ea7044517084f4b4 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/32] 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 6c422f8770ca53892e54ecfc3a28d940a7869049 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/32] 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 9f83619b22575994581f90ce253206dfcd118936 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/32] 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 41dbc96694adad5d7d20b3f1f94241aa2b719a06 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/32] 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 efe9b6ce70c7ecfe7d17e605b8edcef1e8d57b6a 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/32] 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 22b3a599845d51009ee8fdea58cc2e916a29b5c9 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/32] 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 ac42bb7ea627abae3810e20e08dddba3e387dd34 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/32] 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 945f5f78560865469f251f4403f78b61a287032f 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/32] 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 aca59ecccb28137ba6992ec1705ec5ed79a85dac 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/32] 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 a33f9ddbff33b5b942029ac6bb883ec571dee3b0 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/32] 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 2803dbd76ff0838b2287e1d76343cdcb967ca617 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/32] tlsh: respect -g

---
 srcpkgs/tlsh/patches/fix-cflags.patch | 13 +++++++++++++
 srcpkgs/tlsh/template                 |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
 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 7cb5c28b48b9..dfea27526e14 100644
--- a/srcpkgs/tlsh/template
+++ b/srcpkgs/tlsh/template
@@ -1,7 +1,7 @@
 # Template file for 'tlsh'
 pkgname=tlsh
 version=3.17.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="python3"
 makedepends="python3-devel"

From fc4f5d8f9f209542679424d6b6ccdcaac549ddde 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/32] 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 b03e1da70d9867657d421a45760437890a7f69c9 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/32] 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

  parent reply	other threads:[~2021-03-26 16:01 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 ` sgn [this message]
2021-03-27  8:23 ` [PR PATCH] [Updated] " 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
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=20210326160118.zhh2i0OLewlMgmNPpU-o58k2CElJs9plrBQnhv19cdA@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).