mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
cmake: bump version, build GUI with cmake instead of bootstrapping cmake again (#11210)
* cmake: optimize bootstrap
This commit is contained in:
@@ -9,7 +9,7 @@ COPYRIGHT="2002-2024 Kitware, Inc., Insight Consortium"
|
||||
LICENSE="CMake"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cmake.org/files/v${portVersion%.*}/cmake-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="6d5de15b6715091df7f5441007425264bdd477809f80333fdf95f846aaff88e4"
|
||||
CHECKSUM_SHA256="9f55e1a40508f2f29b7e065fa08c29f82c402fa0402da839fffe64a25755a86d"
|
||||
PATCHES="cmake-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
@@ -70,7 +70,9 @@ BUILD_PREREQUIRES="
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:which
|
||||
"
|
||||
|
||||
defineDebugInfoPackage cmake$secondaryArchSuffix \
|
||||
@@ -85,6 +87,7 @@ BUILD()
|
||||
export LDFLAGS="-lbsd"
|
||||
|
||||
# not an autotools configure
|
||||
# --system-libs doesn't allow --no-system-* overrides
|
||||
./configure --prefix=$prefix \
|
||||
--datadir=/$relativeDataDir/cmake \
|
||||
--docdir=/$relativeDocDir \
|
||||
@@ -98,6 +101,9 @@ BUILD()
|
||||
--system-librhash \
|
||||
--system-libuv \
|
||||
--system-zlib \
|
||||
--bootstrap-system-libuv \
|
||||
--bootstrap-system-jsoncpp \
|
||||
--bootstrap-system-librhash \
|
||||
--parallel=${jobArgs#-j}
|
||||
# These do not seem to be used anyway (libarchive at least links to libz/libzstd):
|
||||
# --system-bzip2 --system-liblzma --system-zstd, --system-nghttp2
|
||||
@@ -116,8 +122,8 @@ INSTALL()
|
||||
# x86_32 (for a build with cmake-gui). Took around 140 minutes.
|
||||
# 72% tests passed, 189 tests failed out of 676
|
||||
#
|
||||
# x86_64 (for a build with cmake-gui). Took around 120 minutes.
|
||||
# 72% tests passed, 190 tests failed out of 676
|
||||
# version 3.30.5: x86_64.
|
||||
# 70% tests passed, 190 tests failed out of 627
|
||||
# The following tests FAILED:
|
||||
# 6 - kwsys.testSystemTools (Failed)
|
||||
# 26 - FindPackageTest (Failed)
|
||||
@@ -177,7 +183,7 @@ INSTALL()
|
||||
# 363 - RunCMake.Make (Failed)
|
||||
# 364 - RunCMake.CTest (Failed)
|
||||
# 366 - RunCMake.ABI (Failed)
|
||||
# 368 - RunCMake.AutogenQt6 (Failed)
|
||||
# 368 - RunCMake.AutogenNoQt (Failed)
|
||||
# 369 - RunCMake.BuildDepends (Failed)
|
||||
# 372 - RunCMake.CMakeDependentOption (Failed)
|
||||
# 376 - RunCMake.CompilerChange (Failed)
|
||||
@@ -270,46 +276,45 @@ INSTALL()
|
||||
# 523 - RunCMake.configure_file (Failed)
|
||||
# 524 - RunCMake.CTestTimeout (Failed)
|
||||
# 527 - RunCMake.CXXModules (Failed)
|
||||
# 531 - RunCMake.File_Archive (Failed)
|
||||
# 532 - RunCMake.File_Configure (Failed)
|
||||
# 533 - RunCMake.File_Generate (Failed)
|
||||
# 534 - RunCMake.ExportWithoutLanguage (Failed)
|
||||
# 536 - RunCMake.target_link_libraries (Failed)
|
||||
# 540 - RunCMake.target_link_libraries-LINK_LIBRARY (Failed)
|
||||
# 541 - RunCMake.target_link_libraries-LINK_GROUP (Failed)
|
||||
# 546 - RunCMake.target_compile_features (Failed)
|
||||
# 547 - RunCMake.target_compile_options (Failed)
|
||||
# 549 - RunCMake.target_sources (Failed)
|
||||
# 551 - RunCMake.CheckSourceCompiles (Failed)
|
||||
# 552 - RunCMake.CheckSourceRuns (Failed)
|
||||
# 553 - RunCMake.CheckModules (Failed)
|
||||
# 554 - RunCMake.CheckIPOSupported (Failed)
|
||||
# 555 - RunCMake.CommandLine (Timeout)
|
||||
# 556 - RunCMake.CommandLineTar (Failed)
|
||||
# 557 - RunCMake.install (Failed)
|
||||
# 558 - RunCMake.file-GET_RUNTIME_DEPENDENCIES (Failed)
|
||||
# 560 - RunCMake.CPackConfig (Failed)
|
||||
# 562 - RunCMake.ExternalProject (Failed)
|
||||
# 565 - RunCMake.CTestCommandLine (Failed)
|
||||
# 568 - RunCMake.IfacePaths_INCDIRS (Failed)
|
||||
# 580 - RunCMake.CPack_7Z (Failed)
|
||||
# 581 - RunCMake.CPack_TBZ2 (Failed)
|
||||
# 582 - RunCMake.CPack_TGZ (Failed)
|
||||
# 583 - RunCMake.CPack_TXZ (Failed)
|
||||
# 584 - RunCMake.CPack_TZ (Failed)
|
||||
# 585 - RunCMake.CPack_ZIP (Failed)
|
||||
# 586 - RunCMake.CPack_STGZ (Failed)
|
||||
# 587 - RunCMake.CPack_External (Failed)
|
||||
# 592 - RunCMake.UnityBuild (Failed)
|
||||
# 593 - RunCMake.CMakePresets (Failed)
|
||||
# 594 - RunCMake.CMakePresetsBuild (Failed)
|
||||
# 595 - RunCMake.CMakePresetsTest (Failed)
|
||||
# 596 - RunCMake.CMakePresetsPackage (Failed)
|
||||
# 597 - RunCMake.CMakePresetsWorkflow (Failed)
|
||||
# 598 - RunCMake.VerifyHeaderSets (Failed)
|
||||
# 599 - RunCMake.set_tests_properties (Failed)
|
||||
# 667 - CMake.String (Failed)
|
||||
# (667 passed on 32 bits).
|
||||
# 530 - RunCMake.FindPkgConfig (Failed)
|
||||
# 532 - RunCMake.File_Archive (Failed)
|
||||
# 533 - RunCMake.File_Configure (Failed)
|
||||
# 534 - RunCMake.File_Generate (Failed)
|
||||
# 535 - RunCMake.ExportWithoutLanguage (Failed)
|
||||
# 537 - RunCMake.target_link_libraries (Failed)
|
||||
# 541 - RunCMake.target_link_libraries-LINK_LIBRARY (Failed)
|
||||
# 542 - RunCMake.target_link_libraries-LINK_GROUP (Failed)
|
||||
# 547 - RunCMake.target_compile_features (Failed)
|
||||
# 548 - RunCMake.target_compile_options (Failed)
|
||||
# 550 - RunCMake.target_sources (Failed)
|
||||
# 552 - RunCMake.CheckSourceCompiles (Failed)
|
||||
# 553 - RunCMake.CheckSourceRuns (Failed)
|
||||
# 554 - RunCMake.CheckModules (Failed)
|
||||
# 555 - RunCMake.CheckIPOSupported (Failed)
|
||||
# 556 - RunCMake.CommandLine (Timeout)
|
||||
# 557 - RunCMake.CommandLineTar (Failed)
|
||||
# 558 - RunCMake.install (Failed)
|
||||
# 559 - RunCMake.file-GET_RUNTIME_DEPENDENCIES (Failed)
|
||||
# 561 - RunCMake.CPackConfig (Failed)
|
||||
# 563 - RunCMake.ExternalProject (Failed)
|
||||
# 566 - RunCMake.CTestCommandLine (Failed)
|
||||
# 569 - RunCMake.IfacePaths_INCDIRS (Failed)
|
||||
# 581 - RunCMake.CPack_7Z (Failed)
|
||||
# 582 - RunCMake.CPack_TBZ2 (Failed)
|
||||
# 583 - RunCMake.CPack_TGZ (Failed)
|
||||
# 584 - RunCMake.CPack_TXZ (Failed)
|
||||
# 585 - RunCMake.CPack_TZ (Failed)
|
||||
# 586 - RunCMake.CPack_ZIP (Failed)
|
||||
# 587 - RunCMake.CPack_STGZ (Failed)
|
||||
# 588 - RunCMake.CPack_External (Failed)
|
||||
# 593 - RunCMake.UnityBuild (Failed)
|
||||
# 594 - RunCMake.CMakePresets (Failed)
|
||||
# 595 - RunCMake.CMakePresetsBuild (Failed)
|
||||
# 596 - RunCMake.CMakePresetsTest (Failed)
|
||||
# 597 - RunCMake.CMakePresetsPackage (Failed)
|
||||
# 598 - RunCMake.CMakePresetsWorkflow (Failed)
|
||||
# 599 - RunCMake.VerifyHeaderSets (Failed)
|
||||
# 600 - RunCMake.set_tests_properties (Failed)
|
||||
TEST()
|
||||
{
|
||||
# At least 6 tests crash, so it might be wise to add an "auto-kill" rule to debugger settings.
|
||||
@@ -11,7 +11,7 @@ COPYRIGHT="2002-2024 Kitware, Inc., Insight Consortium"
|
||||
LICENSE="CMake"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://cmake.org/files/v${portVersion%.*}/cmake-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="6d5de15b6715091df7f5441007425264bdd477809f80333fdf95f846aaff88e4"
|
||||
CHECKSUM_SHA256="9f55e1a40508f2f29b7e065fa08c29f82c402fa0402da839fffe64a25755a86d"
|
||||
SOURCE_DIR="cmake-$portVersion"
|
||||
PATCHES="cmake-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="cmake.rdef.in"
|
||||
@@ -27,7 +27,7 @@ PROVIDES="
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmake$secondaryArchSuffix >= 3 # for the dataDir/cmake files.
|
||||
cmake$secondaryArchSuffix
|
||||
lib:libarchive$secondaryArchSuffix
|
||||
lib:libcppdap$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
@@ -55,7 +55,6 @@ BUILD_REQUIRES="
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libexpat$secondaryArchSuffix
|
||||
devel:libjsoncpp$secondaryArchSuffix >= 25
|
||||
devel:libform$secondaryArchSuffix # needed for building ccmake.
|
||||
devel:libQt6Core$secondaryArchSuffix
|
||||
devel:libQt6Gui$secondaryArchSuffix
|
||||
devel:libQt6Widgets$secondaryArchSuffix
|
||||
@@ -65,6 +64,7 @@ BUILD_REQUIRES="
|
||||
devel:nlohmann_json
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmake$secondaryArchSuffix == $portVersion
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:grep
|
||||
cmd:ld$secondaryArchSuffix
|
||||
@@ -78,27 +78,34 @@ defineDebugInfoPackage cmake_gui$secondaryArchSuffix \
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export LDFLAGS="-lbsd"
|
||||
cmake -Bbuild-gui -S. $cmakeDirArgs \
|
||||
-DCMAKE_INSTALL_BINDIR=bin \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
|
||||
-DBUILD_CursesDialog=OFF \
|
||||
-DBUILD_QtDialog=ON \
|
||||
-DCMAKE_USE_SYSTEM_BZIP2=ON \
|
||||
-DCMAKE_USE_SYSTEM_CPPDAP=ON \
|
||||
-DCMAKE_USE_SYSTEM_CURL=ON \
|
||||
-DCMAKE_USE_SYSTEM_EXPAT=ON \
|
||||
-DCMAKE_USE_SYSTEM_FORM=ON \
|
||||
-DCMAKE_USE_SYSTEM_JSONCPP=ON \
|
||||
-DCMAKE_USE_SYSTEM_LIBARCHIVE=ON \
|
||||
-DCMAKE_USE_SYSTEM_LIBLZMA=ON \
|
||||
-DCMAKE_USE_SYSTEM_LIBRHASH=ON \
|
||||
-DCMAKE_USE_SYSTEM_LIBUV=ON \
|
||||
-DCMAKE_USE_SYSTEM_NGHTTP2=ON \
|
||||
-DCMAKE_USE_SYSTEM_ZLIB=ON \
|
||||
-DCMAKE_USE_SYSTEM_ZSTD=ON
|
||||
|
||||
# not an autotools configure
|
||||
./configure --prefix=$prefix \
|
||||
--datadir=/$relativeDataDir/cmake \
|
||||
--docdir=/$relativeDocDir \
|
||||
--mandir=/$relativeManDir \
|
||||
--xdgdatadir=/$relativeDataDir \
|
||||
--system-libs \
|
||||
--qt-gui \
|
||||
--parallel=${jobArgs#-j}
|
||||
|
||||
make $jobArgs
|
||||
make -Cbuild-gui/Source/QtDialog $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# As we only provide /bin/cmake-gui on this package (The rest is provided by cmake base),
|
||||
# just copy that binary, instead of doing "make install" and then removing what we don't need.
|
||||
mkdir -p $prefix/bin
|
||||
cp bin/cmake-gui $prefix/bin
|
||||
# make install tries to use a local cmake, which isn't built, use the system version instead
|
||||
ln -sf /boot/system/bin/cmake build-gui/bin
|
||||
|
||||
make -Cbuild-gui/Source/QtDialog install
|
||||
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
Reference in New Issue
Block a user