From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] build-style/cmake: set CMAKE_BUILD_TYPE to None
Date: Wed, 17 Mar 2021 16:32:07 +0100 [thread overview]
Message-ID: <20210317153207.Jy-Mugzjpd5Su6del4MZrlMbzGq59kihQ0p_MYdr8U8@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: 458 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
[WIP] 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.
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: 13860 bytes --]
From 38577478b61f8cf8e7d300578df40151fcd04374 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 1/7] 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 a3d53690f5213acda1647a4ca80b15b9ee3313a2 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 2/7] 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 3c2548422548a672a02786f33e430b9a54a95a24 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 3/7] 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 | 2 ++
srcpkgs/eigen3.2/template | 1 +
2 files changed, 3 insertions(+)
diff --git a/srcpkgs/eigen/template b/srcpkgs/eigen/template
index ee825e95f273..28e8d458b639 100644
--- a/srcpkgs/eigen/template
+++ b/srcpkgs/eigen/template
@@ -3,6 +3,8 @@ pkgname=eigen
version=3.3.9
revision=1
build_style=cmake
+# This is header only library, don't waste time to patch
+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 a884a100aaa65e4edec63b535e7cbb219ea32f8b 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 4/7] 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 da785dda6fbfcc5a0b48a9d1e8a9e3d5600e98e9 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 5/7] 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 6111ce52d7b5b9bb3e245823a52f7a44460af11a 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 6/7] 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 a3a2d1f3208478b2a2a21f246e16abd7aeeba130 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 7/7] 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
}
next prev parent reply other threads:[~2021-03-17 15:32 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 13:19 [PR PATCH] " sgn
2021-03-15 1:07 ` [PR PATCH] [Updated] " sgn
2021-03-16 23:26 ` sgn
2021-03-17 15:32 ` sgn [this message]
2021-03-21 9:45 ` sgn
2021-03-21 9:48 ` sgn
2021-03-21 9:48 ` [PR REVIEW] " sgn
2021-03-21 9:52 ` sgn
2021-03-21 9:55 ` sgn
2021-03-21 9:55 ` [PR REVIEW] " thypon
2021-03-21 9:55 ` thypon
2021-03-21 9:59 ` sgn
2021-03-23 9:15 ` [PR REVIEW] " Piraty
2021-03-25 0:45 ` [PR PATCH] [Updated] " sgn
2021-03-25 1:38 ` sgn
2021-03-26 15:13 ` sgn
2021-03-26 15:42 ` ericonr
2021-03-26 15:43 ` ericonr
2021-03-26 15:48 ` sgn
2021-03-26 16:01 ` [PR PATCH] [Updated] " sgn
2021-03-27 8:23 ` sgn
2021-03-27 8:24 ` sgn
2021-03-27 8:51 ` [PR PATCH] [Updated] " sgn
2021-03-27 12:30 ` sgn
2021-03-27 12:33 ` sgn
2021-03-28 3:40 ` [PR PATCH] [Updated] " sgn
2021-03-28 3:50 ` sgn
2021-03-28 3:53 ` sgn
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=20210317153207.Jy-Mugzjpd5Su6del4MZrlMbzGq59kihQ0p_MYdr8U8@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).