From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] CMake: a bootstrap package to remove all possible circles with cmake
Date: Mon, 31 Jul 2023 04:31:35 +0200 [thread overview]
Message-ID: <20230731023135.hg92I2hrr9EU3AtRf1Tfiec69YW_jKMIrzlqEgPwwsE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44563@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
There is an updated pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages cmake-split-bootstrap-path
https://github.com/void-linux/void-packages/pull/44563
CMake: a bootstrap package to remove all possible circles with cmake
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44563.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-split-bootstrap-path-44563.patch --]
[-- Type: text/x-diff, Size: 21618 bytes --]
From 533926a97ddf323095e79b3873bae67a930f1ac9 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, 22 Jun 2023 23:06:20 +0700
Subject: [PATCH 1/3] New package: cmake-bootstrap-3.26.4
---
.../patches/ignore-crape-compiler-test.patch | 13 ++
.../cmake-bootstrap/patches/linux-gate.patch | 14 ++
.../cmake-bootstrap/patches/musl-test.patch | 15 +++
.../patches/no-run-cmake-bootstrap.patch | 13 ++
.../cmake-bootstrap/patches/not-needed.patch | 127 ++++++++++++++++++
srcpkgs/cmake-bootstrap/template | 69 ++++++++++
srcpkgs/cmake-bootstrap/update | 2 +
7 files changed, 253 insertions(+)
create mode 100644 srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch
create mode 100644 srcpkgs/cmake-bootstrap/patches/linux-gate.patch
create mode 100644 srcpkgs/cmake-bootstrap/patches/musl-test.patch
create mode 100644 srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch
create mode 100644 srcpkgs/cmake-bootstrap/patches/not-needed.patch
create mode 100644 srcpkgs/cmake-bootstrap/template
create mode 100644 srcpkgs/cmake-bootstrap/update
diff --git a/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch b/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch
new file mode 100644
index 0000000000000..7b6ce9c16962b
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch
@@ -0,0 +1,13 @@
+diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+index dcdc7f1b96..37e13b6c5c 100644
+--- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
++++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake
+@@ -11,7 +11,7 @@ project(Minimal NONE)
+ set(targets
+ aix-C-XL-13.1.3 aix-CXX-XL-13.1.3
+ aix-C-XLClang-16.1.0.1 aix-CXX-XLClang-16.1.0.1
+- craype-C-Cray-8.7 craype-CXX-Cray-8.7 craype-Fortran-Cray-8.7
++ craype-Fortran-Cray-8.7
+ craype-C-Cray-9.0-hlist-ad craype-CXX-Cray-9.0-hlist-ad craype-Fortran-Cray-9.0-hlist-ad
+ craype-C-GNU-7.3.0 craype-CXX-GNU-7.3.0 craype-Fortran-GNU-7.3.0
+ craype-C-Intel-18.0.2.20180210 craype-CXX-Intel-18.0.2.20180210
diff --git a/srcpkgs/cmake-bootstrap/patches/linux-gate.patch b/srcpkgs/cmake-bootstrap/patches/linux-gate.patch
new file mode 100644
index 0000000000000..2102feee211f2
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/patches/linux-gate.patch
@@ -0,0 +1,14 @@
+https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8229
+diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
+index 0ba35b6b79..0cd49ab4ba 100644
+--- a/Modules/GetPrerequisites.cmake
++++ b/Modules/GetPrerequisites.cmake
+@@ -730,7 +730,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
+
+ if(gp_tool MATCHES "ldd$")
+ set(gp_cmd_args "")
+- set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+([^\t\(]+)( \(.+\))?${eol_char}$")
++ set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+(/[^\t\(]+)( \(.+\))?${eol_char}$")
+ set(gp_regex_error "not found${eol_char}$")
+ set(gp_regex_fallback "^[\t ]*([^\t ]+) => ([^\t ]+).*${eol_char}$")
+ set(gp_regex_cmp_count 1)
diff --git a/srcpkgs/cmake-bootstrap/patches/musl-test.patch b/srcpkgs/cmake-bootstrap/patches/musl-test.patch
new file mode 100644
index 0000000000000..0329b5efd2f52
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/patches/musl-test.patch
@@ -0,0 +1,15 @@
+--- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake.orig 2020-12-05 13:27:21.098078774 +0700
++++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake 2020-12-05 13:29:19.931553018 +0700
+@@ -33,9 +33,9 @@
+ [[librunpath_parent_unresolved\.so]]
+ [[librunpath_unresolved\.so]]
+ )
+-check_contents(deps/udeps1.txt "^${_check}$")
+-check_contents(deps/udeps2.txt "^${_check}$")
+-check_contents(deps/udeps3.txt "^${_check}$")
++check_contents(deps/udeps1.txt "^(libc.so;)?${_check}$")
++check_contents(deps/udeps2.txt "^(libc.so;)?${_check}$")
++check_contents(deps/udeps3.txt "^(libc.so;)?${_check}$")
+ set(_check
+ "^libconflict\\.so:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/conflict/libconflict\\.so;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/conflict2/libconflict\\.so\n$"
+ )
diff --git a/srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch b/srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch
new file mode 100644
index 0000000000000..4b41aea2450b4
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch
@@ -0,0 +1,13 @@
+We will run cmake ourselves with our flags
+Index: cmake-3.20.3/bootstrap
+===================================================================
+--- cmake-3.20.3.orig/bootstrap
++++ cmake-3.20.3/bootstrap
+@@ -1968,6 +1968,7 @@ export CFLAGS
+ export CXXFLAGS
+ export LDFLAGS
+
++exit 0
+ # Run bootstrap CMake to configure real CMake
+ cmake_options="-DCMAKE_BOOTSTRAP=1"
+ if test -n "${cmake_verbose}"; then
diff --git a/srcpkgs/cmake-bootstrap/patches/not-needed.patch b/srcpkgs/cmake-bootstrap/patches/not-needed.patch
new file mode 100644
index 0000000000000..150f87dcaae5d
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/patches/not-needed.patch
@@ -0,0 +1,127 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c1d50cab4..793e52ad9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -522,12 +522,9 @@ if(BUILD_TESTING)
+ endif()
+
+ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+- # Install license file as it requires.
+- install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
+-
+ # Install script directories.
+ install(
+- DIRECTORY Help Modules Templates
++ DIRECTORY Modules Templates
+ DESTINATION ${CMAKE_DATA_DIR}
+ FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
+@@ -543,9 +540,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+ REGEX "Help/(dev|guide)($|/)" EXCLUDE
+ )
+
+- # Install auxiliary files integrating with other tools.
+- add_subdirectory(Auxiliary)
+-
+ # Optionally sign installed binaries.
+ if(CMake_INSTALL_SIGNTOOL)
+ configure_file(Source/CMakeInstallSignTool.cmake.in Source/CMakeInstallSignTool.cmake @ONLY)
+diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
+index 2b8eedd4e..c3fb1b9ce 100644
+--- a/Source/kwsys/CMakeLists.txt
++++ b/Source/kwsys/CMakeLists.txt
+@@ -615,11 +615,6 @@ if(KWSYS_INSTALL_DOC_DIR)
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
+ )
+ endif()
+-
+- # Install the license under the documentation directory.
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt
+- DESTINATION ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}
+- ${KWSYS_INSTALL_LICENSE_OPTIONS})
+ endif()
+
+ #-----------------------------------------------------------------------------
+diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
+index 82f9b0b70..445fca05f 100644
+--- a/Utilities/cmcurl/CMakeLists.txt
++++ b/Utilities/cmcurl/CMakeLists.txt
+@@ -1579,8 +1579,6 @@ target_link_libraries(curltest cmcurl)
+ if(BUILD_TESTING AND CMAKE_CURL_TEST_URL)
+ add_test(curl curltest ${CMAKE_CURL_TEST_URL})
+ endif()
+-
+-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl)
+ #-----------------------------------------------------------------------------
+
+ if(0) # This code not needed for building within CMake.
+diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
+index 027de5c58..1d3e27cd0 100644
+--- a/Utilities/cmlibarchive/CMakeLists.txt
++++ b/Utilities/cmlibarchive/CMakeLists.txt
+@@ -2077,5 +2077,3 @@ add_subdirectory(cat)
+ add_subdirectory(tar)
+ add_subdirectory(cpio)
+ ENDIF()
+-
+-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibarchive)
+diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt
+index 3121fbe4c..122422b0e 100644
+--- a/Utilities/cmliblzma/CMakeLists.txt
++++ b/Utilities/cmliblzma/CMakeLists.txt
+@@ -185,5 +185,3 @@ ELSEIF((CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC"
+ # Disable the old GNU compiler optimizer.
+ SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-O0")
+ ENDIF()
+-
+-INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma)
+diff --git a/Utilities/cmlibrhash/CMakeLists.txt b/Utilities/cmlibrhash/CMakeLists.txt
+index 9f532ad48..63eb93926 100644
+--- a/Utilities/cmlibrhash/CMakeLists.txt
++++ b/Utilities/cmlibrhash/CMakeLists.txt
+@@ -36,5 +36,3 @@ include_directories(
+ )
+
+ add_library(cmlibrhash ${librhash_sources})
+-
+-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibrhash)
+diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt
+index ad3d43382..b31321e3f 100644
+--- a/Utilities/cmlibuv/CMakeLists.txt
++++ b/Utilities/cmlibuv/CMakeLists.txt
+@@ -364,5 +364,3 @@ include_directories(
+ add_library(cmlibuv STATIC ${uv_sources})
+ target_link_libraries(cmlibuv ${uv_libraries})
+ set_property(TARGET cmlibuv PROPERTY COMPILE_DEFINITIONS ${uv_defines})
+-
+-install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmlibuv)
+diff --git a/Utilities/cmnghttp2/CMakeLists.txt b/Utilities/cmnghttp2/CMakeLists.txt
+index 6d0c76ff3..2b46fdf6c 100644
+--- a/Utilities/cmnghttp2/CMakeLists.txt
++++ b/Utilities/cmnghttp2/CMakeLists.txt
+@@ -49,5 +49,3 @@ target_include_directories(cmnghttp2 PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib/includes
+ )
+-
+-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmnghttp2)
+diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt
+index ecbace6f2..d947b3f3a 100644
+--- a/Utilities/cmzlib/CMakeLists.txt
++++ b/Utilities/cmzlib/CMakeLists.txt
+@@ -24,5 +24,3 @@ add_library(cmzlib
+ uncompr.c
+ zutil.c
+ )
+-
+-install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmzlib)
+diff --git a/Utilities/cmzstd/CMakeLists.txt b/Utilities/cmzstd/CMakeLists.txt
+index 981e3d501..78b073b17 100644
+--- a/Utilities/cmzstd/CMakeLists.txt
++++ b/Utilities/cmzstd/CMakeLists.txt
+@@ -46,5 +46,3 @@ add_library(cmzstd STATIC
+
+ # BMI2 instructions are not supported in older environments.
+ set_property(TARGET cmzstd PROPERTY COMPILE_DEFINITIONS DYNAMIC_BMI2=0)
+-
+-install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmzstd)
diff --git a/srcpkgs/cmake-bootstrap/template b/srcpkgs/cmake-bootstrap/template
new file mode 100644
index 0000000000000..4bec57d2aa6d9
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/template
@@ -0,0 +1,69 @@
+# Template file for 'cmake-bootstrap'
+pkgname=cmake-bootstrap
+version=3.26.4
+revision=1
+build_style=cmake
+configure_args="-DCMake_INSTALL_INFIX=libexec/xbps-src/
+ -DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=OFF
+ -DCMAKE_USE_OPENSSL=OFF -DBUILD_CursesDialog=OFF -DBUILD_QtDialog=OFF
+ -DCMAKE_USE_SYSTEM_LIBRARIES=OFF
+ -DKWSYS_LFS_WORKS=1"
+short_desc="CMake for xbps-src"
+maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
+license="BSD-3-Clause, ICU"
+homepage="https://www.cmake.org"
+distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz"
+checksum=313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208
+repository="bootstrap"
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ configure_args+=" -DCMake_NO_SELF_BACKTRACE=1"
+fi
+
+pre_configure() {
+ local f
+ rm -rf build
+ mkdir build
+ cd build
+ CC=$CC_FOR_BUILD CFLAGS="$CFLAGS_FOR_BUILD" \
+ CXX=$CXX_FOR_BUILD CXXFLAGS="$CXXFLAGS_FOR_BUILD" \
+ LD=$LD_FOR_BUILD LDFLAGS="$LDFLAGS_FOR_BUILD" \
+ ../bootstrap --system-libs --generator=Ninja \
+ ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}
+ # Make sure build directory is clean
+ for f in *; do
+ if [ "$f" != Bootstrap.cmk ]; then
+ return 1
+ fi
+ done
+ cd ${wrksrc}
+ PATH="${wrksrc}/build/Bootstrap.cmk:$PATH"
+}
+
+do_check() {
+ mkdir -p /tmp/fake-bin
+ ln -sf /usr/bin/bsdtar /tmp/fake-bin/tar
+ PATH=$PATH:/tmp/fake-bin
+ cd build
+ ./bin/ctest
+}
+
+post_install() {
+ # We installs license manually because cmake forgets some of them.
+ test ! -d ${DESTDIR}/usr/libexec/xbps-src/share/doc
+ {
+ cat Copyright.txt
+ printf '%s\n' '' =============================== "FreeBSD ELF library"
+ sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h
+ for _lib in bzip2 curl expat jsoncpp libarchive libuv nghttp2 zstd
+ do
+ printf '%s\n' '' =============================== "$_lib"
+ for _file in COPYING LICENSE NOTICE; do
+ if [ -f "Utilities/cm${_lib}/${_file}" ]; then
+ cat "Utilities/cm${_lib}/${_file}"
+ fi
+ done
+ done
+ }>license
+ vlicense license
+}
diff --git a/srcpkgs/cmake-bootstrap/update b/srcpkgs/cmake-bootstrap/update
new file mode 100644
index 0000000000000..fa692de2a9c9a
--- /dev/null
+++ b/srcpkgs/cmake-bootstrap/update
@@ -0,0 +1,2 @@
+site='https://cmake.org/files/LatestRelease/cmake-latest-files-v1.json'
+pkgname=cmake
From 0ee4cbe30be1d45c102a3a83f622009cec73cdbb 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, 22 Jun 2023 23:11:58 +0700
Subject: [PATCH 2/3] build-style/cmake: support build with cmake-bootstrap
---
common/build-style/cmake.sh | 1 +
common/environment/build-style/cmake.sh | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index 43750ad20dcdc..6b71ea66a224a 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -72,6 +72,7 @@ _EOF
cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
+ PATH="$PATH:/usr/libexec/xbps-src/bin"
# Remove -pipe: https://gitlab.kitware.com/cmake/cmake/issues/19590
CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" \
cmake ${cmake_args} ${configure_args} \
diff --git a/common/environment/build-style/cmake.sh b/common/environment/build-style/cmake.sh
index 19b8f35a01da1..d301133843648 100644
--- a/common/environment/build-style/cmake.sh
+++ b/common/environment/build-style/cmake.sh
@@ -1,6 +1,6 @@
if [ "$CHROOT_READY" ]; then
- if [ "$pkgname" != cmake ]; then
- hostmakedepends+=" cmake"
+ if [ "$pkgname" != cmake-bootstrap ]; then
+ hostmakedepends+=" cmake-bootstrap"
fi
if [ "${make_cmd:-ninja}" = ninja ]; then
hostmakedepends+=" ninja"
From ae07e856b04fed917524a88b7951f2c6a2709066 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, 22 Jun 2023 23:06:20 +0700
Subject: [PATCH 3/3] cmake: no longer replaces cmake-bootstrap
---
srcpkgs/cmake-gui | 1 +
srcpkgs/cmake-gui/patches | 1 -
srcpkgs/cmake-gui/template | 40 --------------------
srcpkgs/cmake-gui/update | 1 -
srcpkgs/cmake/patches/no-license.patch | 30 +++++++++++++++
srcpkgs/cmake/template | 51 ++++++++++++--------------
6 files changed, 54 insertions(+), 70 deletions(-)
create mode 120000 srcpkgs/cmake-gui
delete mode 120000 srcpkgs/cmake-gui/patches
delete mode 100644 srcpkgs/cmake-gui/template
delete mode 120000 srcpkgs/cmake-gui/update
create mode 100644 srcpkgs/cmake/patches/no-license.patch
diff --git a/srcpkgs/cmake-gui b/srcpkgs/cmake-gui
new file mode 120000
index 0000000000000..b6868d450eb7b
--- /dev/null
+++ b/srcpkgs/cmake-gui
@@ -0,0 +1 @@
+cmake
\ No newline at end of file
diff --git a/srcpkgs/cmake-gui/patches b/srcpkgs/cmake-gui/patches
deleted file mode 120000
index 6f3ac554b3614..0000000000000
--- a/srcpkgs/cmake-gui/patches
+++ /dev/null
@@ -1 +0,0 @@
-../cmake/patches
\ No newline at end of file
diff --git a/srcpkgs/cmake-gui/template b/srcpkgs/cmake-gui/template
deleted file mode 100644
index 6aea8d3e7afb9..0000000000000
--- a/srcpkgs/cmake-gui/template
+++ /dev/null
@@ -1,40 +0,0 @@
-# Template file for 'cmake-gui'
-pkgname=cmake-gui
-version=3.26.4
-revision=3
-build_style=cmake
-configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
- -DSPHINX_MAN=1 -DCMAKE_MAN_DIR=/share/man
- -DBUILD_QtDialog=ON -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
-hostmakedepends="qt6-base python3-Sphinx qt6-tools"
-makedepends="jsoncpp-devel libarchive-devel libcurl-devel libuv-devel
- ncurses-devel qt6-base-devel rhash-devel qt6-tools-devel"
-depends="desktop-file-utils shared-mime-info cmake>=${version}"
-checkdepends="pax pkg-config git"
-short_desc="Cross-platform, open-source build system - Qt GUI"
-maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
-license="BSD-3-Clause"
-homepage="https://www.cmake.org"
-distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz"
-checksum=313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208
-
-do_check() {
- cd build
- ./bin/ctest
-}
-
-do_install() {
- # We are only interested in cmake-gui.
- vbin build/bin/cmake-gui
- vman build/Utilities/Sphinx/man/cmake-gui.1
-
- for res in 32 64 128 ; do
- vinstall Source/QtDialog/CMakeSetup${res}.png 0644 \
- usr/share/icons/hicolor/${res}x${res}/apps/
- done
-
- vinstall Source/QtDialog/cmakecache.xml 0644 usr/share/mime
- vinstall Source/QtDialog/cmake-gui.desktop 0644 usr/share/applications
-
- vlicense Copyright.txt
-}
diff --git a/srcpkgs/cmake-gui/update b/srcpkgs/cmake-gui/update
deleted file mode 120000
index c7f49c6a2d189..0000000000000
--- a/srcpkgs/cmake-gui/update
+++ /dev/null
@@ -1 +0,0 @@
-../cmake/update
\ No newline at end of file
diff --git a/srcpkgs/cmake/patches/no-license.patch b/srcpkgs/cmake/patches/no-license.patch
new file mode 100644
index 0000000000000..32a210ff23309
--- /dev/null
+++ b/srcpkgs/cmake/patches/no-license.patch
@@ -0,0 +1,30 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c1d50cab4..c4c2f7ce8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -522,9 +522,6 @@ if(BUILD_TESTING)
+ endif()
+
+ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+- # Install license file as it requires.
+- install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR})
+-
+ # Install script directories.
+ install(
+ DIRECTORY Help Modules Templates
+diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
+index 2b8eedd4e..c3fb1b9ce 100644
+--- a/Source/kwsys/CMakeLists.txt
++++ b/Source/kwsys/CMakeLists.txt
+@@ -615,11 +615,6 @@ if(KWSYS_INSTALL_DOC_DIR)
+ COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME}
+ )
+ endif()
+-
+- # Install the license under the documentation directory.
+- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt
+- DESTINATION ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE}
+- ${KWSYS_INSTALL_LICENSE_OPTIONS})
+ endif()
+
+ #-----------------------------------------------------------------------------
diff --git a/srcpkgs/cmake/template b/srcpkgs/cmake/template
index 20da7a8678ea8..bdddd4c77ed94 100644
--- a/srcpkgs/cmake/template
+++ b/srcpkgs/cmake/template
@@ -1,15 +1,16 @@
# Template file for 'cmake'
pkgname=cmake
version=3.26.4
-revision=3
+revision=4
build_style=cmake
configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
-DSPHINX_MAN=1 -DCMAKE_MAN_DIR=/share/man
+ -DBUILD_CursesDialog=ON -DBUILD_QtDialog=ON
-DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=1
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
-hostmakedepends="gcc-fortran python3-Sphinx"
+hostmakedepends="gcc-fortran python3-Sphinx qt6-base qt6-tools cmake-bootstrap"
makedepends="expat-devel libarchive-devel libcurl-devel libuv-devel
- ncurses-devel rhash-devel jsoncpp-devel"
+ ncurses-devel rhash-devel jsoncpp-devel qt6-base-devel qt6-tools-devel"
checkdepends="pax pkg-config git"
short_desc="Cross-platform, open-source build system"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
@@ -17,42 +18,36 @@ license="BSD-3-Clause, ICU"
homepage="https://www.cmake.org"
distfiles="https://www.cmake.org/files/v${version%.*}/${pkgname}-${version}.tar.gz"
checksum=313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208
-replaces="cmake-bootstrap>=0"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" -DCMake_NO_SELF_BACKTRACE=1"
fi
-pre_configure() {
- local f
- mkdir -p build
- cd build
- CC=$CC_FOR_BUILD CFLAGS="$CFLAGS_FOR_BUILD" \
- CXX=$CXX_FOR_BUILD CXXFLAGS="$CXXFLAGS_FOR_BUILD" \
- LD=$LD_FOR_BUILD LDFLAGS="$LDFLAGS_FOR_BUILD" \
- ../bootstrap --no-system-libs \
- --generator=Ninja \
- ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}
- # Make sure build directory is clean
- for f in *; do
- if [ "$f" != Bootstrap.cmk ]; then
- return 1
- fi
- done
- cd ${wrksrc}
- PATH="${wrksrc}/build/Bootstrap.cmk:$PATH"
-}
-
do_check() {
cd build
./bin/ctest
}
post_install() {
- rm -rf ${DESTDIR}/usr/share/doc/cmake
+ # No license would be installed
+ # or something were bundled without our knowledge
+ test ! -d ${DESTDIR}/usr/share/doc
sed -n -e '/Copyright/,/authorization[.]/p' \
- Source/CursesDialog/form/fld_arg.c >fld.LICENSE
- vlicense fld.LICENSE
+ Source/CursesDialog/form/fld_arg.c >fld.license
+ vlicense fld.license
+ sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h >elf.license
+ vlicense elf.license
vlicense Copyright.txt
- vlicense Utilities/KWIML/Copyright.txt KWIML-Copyright.txt
+}
+
+cmake-gui_package() {
+ depends="desktop-file-utils shared-mime-info cmake>=${version}"
+ pkg_install() {
+ vmove usr/bin/cmake-gui
+ vmove usr/share/man/man1/cmake-gui.1
+
+ vmove usr/share/applications
+ vmove usr/share/icons
+ vmove usr/share/mime
+ }
}
next prev parent reply other threads:[~2023-07-31 2:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 16:09 [PR PATCH] " sgn
2023-06-22 16:12 ` [PR PATCH] [Updated] " sgn
2023-06-22 16:30 ` Duncaen
2023-06-22 16:33 ` [PR REVIEW] " Duncaen
2023-06-29 15:38 ` sgn
2023-06-29 15:38 ` sgn
2023-07-28 16:07 ` [PR PATCH] [Updated] " sgn
2023-07-31 2:31 ` sgn [this message]
2023-08-16 13:04 ` sgn
2023-08-16 14:35 ` sgn
2023-08-17 0:12 ` sgn
2023-08-17 11:26 ` sgn
2023-08-17 12:59 ` [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=20230731023135.hg92I2hrr9EU3AtRf1Tfiec69YW_jKMIrzlqEgPwwsE@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).