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: Thu, 25 Mar 2021 01:45:16 +0100	[thread overview]
Message-ID: <20210325004516.yl1QeFSBHVTiBJbHcu1DD0yzAQ-mYVmyP2bMc5eypcI@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: 46620 bytes --]

From c0b78ace53e546c679ddac242002a2a5010f7bba 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/17] 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 7be8ff40535dfcd2c59c913e3174163665cb21b3 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/17] 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 7d7b4c8eb8e4a70daebc2fa0e7f1e9f8c02df5a2 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/17] 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 a60865874d618e70e7a7ea77fc5836a9504f0b8b 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/17] 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 3df90c8e8f65d6594eb1811b6dc03e9d34b09754 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/17] 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 e79e4f30aae357bd9041a6e0774ba05750e29128 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/17] 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 e12a376cb2af1613a7946543d571477e07d1b5e9 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/17] 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 696ea938a905a1bbe3ab2482a3e2cfa6523edfbc 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/17] 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 460078bac5369a33b061c6da1dff0c82fa6ac569 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/17] 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 25c169d53cb3ae195144d4a41a7b252a342d4380 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/17] 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 edca0503dc14719bd48836252f3dab366b6c5f06 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/17] 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 e8f5c10736617910048c849e657bff94d0292923 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/17] 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 ae883d60fc8ae070c8a3fab84aa9f1c27cc7cf6b 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/17] 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 3edb59146513e9e4ed8368017ae94f0b37d56f80 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/17] 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 7cf4758d5acb5f440fb52b44301865897a6f741c 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/17] 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 bffce4873ddcb17fc785be5cd6bad8dc085762bd 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/17] 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 8dce29e8dad8ccd73f9f0476e816046dae92ec81 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/17] 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

  parent reply	other threads:[~2021-03-25  0:45 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 ` sgn [this message]
2021-03-25  1:38 ` [PR PATCH] [Updated] " 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
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=20210325004516.yl1QeFSBHVTiBJbHcu1DD0yzAQ-mYVmyP2bMc5eypcI@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).