From d2f31427f4af69479892ffe901b0aa2482e3488d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 22 Jun 2023 23:06:20 +0700 Subject: [PATCH 1/2] New package: cmake-bootstrap-3.26.4 --- common/build-style/cmake.sh | 1 + common/environment/build-style/cmake.sh | 9 +- .../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 + 9 files changed, 260 insertions(+), 3 deletions(-) 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/common/build-style/cmake.sh b/common/build-style/cmake.sh index 43750ad20dcd..6b71ea66a224 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 19b8f35a01da..e9f6766c008a 100644 --- a/common/environment/build-style/cmake.sh +++ b/common/environment/build-style/cmake.sh @@ -1,7 +1,10 @@ if [ "$CHROOT_READY" ]; then - if [ "$pkgname" != cmake ]; then - hostmakedepends+=" cmake" - fi + # Ideally, everything should be built with cmake, + # problematic package will be built with cmake-bootstrap explicitly. + case "$(printf ' %s' $pkgname $hostmakedepends; echo ' ')" in + *" cmake-bootstrap "*|*" cmake "*) ;; + *) hostmakedepends+=" cmake" + esac if [ "${make_cmd:-ninja}" = ninja ]; then hostmakedepends+=" ninja" fi 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 000000000000..7b6ce9c16962 --- /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 000000000000..2102feee211f --- /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 000000000000..0329b5efd2f5 --- /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 000000000000..4b41aea2450b --- /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 000000000000..150f87dcaae5 --- /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 000000000000..4bec57d2aa6d --- /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 " +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 000000000000..fa692de2a9c9 --- /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 4b1765ca1388ee8039ae543fd82bb6b26d444bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 22 Jun 2023 23:06:20 +0700 Subject: [PATCH 2/2] 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 000000000000..b6868d450eb7 --- /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 6f3ac554b361..000000000000 --- 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 612a72d91f41..000000000000 --- a/srcpkgs/cmake-gui/template +++ /dev/null @@ -1,40 +0,0 @@ -# Template file for 'cmake-gui' -pkgname=cmake-gui -version=3.26.4 -revision=1 -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 " -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 c7f49c6a2d18..000000000000 --- 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 000000000000..32a210ff2330 --- /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 6a2fc292f2b4..d963543faa82 100644 --- a/srcpkgs/cmake/template +++ b/srcpkgs/cmake/template @@ -1,15 +1,16 @@ # Template file for 'cmake' pkgname=cmake version=3.26.4 -revision=1 +revision=2 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 " @@ -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 + } }