mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
158 lines
5.3 KiB
Bash
158 lines
5.3 KiB
Bash
SUMMARY="A cross-platform build system"
|
|
DESCRIPTION="CMake is a family of tools designed to build, test and package \
|
|
software. It is used to control the software compilation process using \
|
|
simple platform and compiler independent configuration files. CMake generates \
|
|
native makefiles and workspaces that can be used in the compiler environment \
|
|
of your choice."
|
|
HOMEPAGE="https://cmake.org/"
|
|
COPYRIGHT="2002-2026 Kitware, Inc., Insight Consortium"
|
|
LICENSE="CMake"
|
|
REVISION="1"
|
|
SOURCE_URI="https://cmake.org/files/v${portVersion%.*}/cmake-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="50ce77215cf266630fa5de97c360f4c313bb79f94b35236b63c1216de3196356"
|
|
PATCHES="cmake-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
cmake$secondaryArchSuffix = $portVersionCompat
|
|
cmd:ccmake = $portVersionCompat
|
|
cmd:cmake = $portVersionCompat
|
|
cmd:cpack = $portVersionCompat
|
|
cmd:ctest = $portVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcurl$secondaryArchSuffix
|
|
lib:libexpat$secondaryArchSuffix
|
|
lib:libform$secondaryArchSuffix # from ncurses.
|
|
lib:libncurses$secondaryArchSuffix
|
|
lib:librhash$secondaryArchSuffix
|
|
lib:libstdc++$secondaryArchSuffix
|
|
lib:libuv$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
# use the embedded copy to avoid circular deps.
|
|
# lib:libarchive$secondaryArchSuffix
|
|
# lib:libcppdap$secondaryArchSuffix
|
|
# lib:libjsoncpp$secondaryArchSuffix
|
|
# Theres are never linked to the resulting "cmds:"s. See note on BUILD_REQUIRES.
|
|
# lib:libbz2$secondaryArchSuffix
|
|
# lib:liblzma$secondaryArchSuffix
|
|
# lib:libnghttp2$secondaryArchSuffix
|
|
# lib:libzstd$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libcurl$secondaryArchSuffix
|
|
devel:libexpat$secondaryArchSuffix
|
|
devel:libncurses$secondaryArchSuffix
|
|
devel:librhash$secondaryArchSuffix
|
|
devel:libuv$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
# devel:nlohmann_json
|
|
# use the embedded copy to avoid circular deps.
|
|
# devel:libarchive$secondaryArchSuffix
|
|
# devel:libcppdap$secondaryArchSuffix
|
|
# devel:libjsoncpp$secondaryArchSuffix >= 25
|
|
# The following do not appear to be used, nor with --system-libs, nor by enabling them
|
|
# individually. Leaving them here just because they are mentioned in ./configure --help
|
|
# and during the build process' output.
|
|
# devel:libbz2$secondaryArchSuffix
|
|
# devel:liblzma$secondaryArchSuffix
|
|
# devel:libnghttp2$secondaryArchSuffix
|
|
# devel:libzstd$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:grep
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:sed
|
|
cmd:which
|
|
"
|
|
|
|
defineDebugInfoPackage cmake$secondaryArchSuffix \
|
|
$prefix/bin/ccmake \
|
|
$prefix/bin/cmake \
|
|
$prefix/bin/cpack \
|
|
$prefix/bin/ctest
|
|
|
|
BUILD()
|
|
{
|
|
export LDFLAGS="-lbsd"
|
|
|
|
# not an autotools configure
|
|
# --system-libs doesn't allow --no-system-* overrides
|
|
./configure --prefix=$prefix \
|
|
--datadir=/$relativeDataDir/cmake \
|
|
--docdir=/$relativeDocDir \
|
|
--mandir=/$relativeManDir \
|
|
--xdgdatadir=/$relativeDataDir \
|
|
--no-system-libs \
|
|
--system-curl \
|
|
--system-expat \
|
|
--system-librhash \
|
|
--system-libuv \
|
|
--system-zlib \
|
|
--bootstrap-system-libuv \
|
|
--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
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
}
|
|
|
|
# For reference: version 3.30.3
|
|
# x86_32 (for a build with cmake-gui). Took around 140 minutes.
|
|
# 72% tests passed, 189 tests failed out of 676
|
|
#
|
|
# version 4.1.2 (without cmake-gui): x86_64.
|
|
# 96% tests passed, 26 tests failed out of 626
|
|
# The following tests FAILED:
|
|
# 5 - kwsys.testSystemTools (Failed)
|
|
# 24 - FindPackageCMakeTest (Failed)
|
|
# 25 - FindPackageCpsTest (Failed)
|
|
# 57 - ExportImport (Failed) CUDA
|
|
# 66 - StagingPrefix (Failed)
|
|
# 80 - Module.ExternalData (Failed)
|
|
# 140 - InstallMode-COPY (Failed)
|
|
# 141 - InstallMode-REL_SYMLINK (Failed)
|
|
# 142 - InstallMode-REL_SYMLINK_OR_COPY (Failed)
|
|
# 143 - InstallMode-ABS_SYMLINK (Failed)
|
|
# 144 - InstallMode-ABS_SYMLINK_OR_COPY (Failed)
|
|
# 145 - InstallMode-SYMLINK (Failed)
|
|
# 146 - InstallMode-SYMLINK_OR_COPY (Failed)
|
|
# 221 - CTestTestTimeout (Failed)
|
|
# 408 - RunCMake.ParseImplicitLinkInfo (Failed)
|
|
# 419 - RunCMake.find_dependency (Failed)
|
|
# 467 - RunCMake.file (Failed)
|
|
# 469 - RunCMake.file-DOWNLOAD (Failed)
|
|
# 474 - RunCMake.find_library (Failed)
|
|
# 475 - RunCMake.find_package (Failed)
|
|
# 514 - RunCMake.no_install_prefix (Failed)
|
|
# 516 - RunCMake.CTestTimeout (Failed)
|
|
# 522 - RunCMake.FindPkgConfig (Failed)
|
|
# 544 - RunCMake.target_sources (Failed)
|
|
# 550 - RunCMake.CommandLine (Failed)
|
|
# 552 - RunCMake.install (Failed) ISPC
|
|
|
|
TEST()
|
|
{
|
|
# 2 tests crash (1 test case has 5 crashes, but passes the test?), exclude with -E
|
|
./bin/ctest --output-on-failure -E "(CMakeLib.testUVProcessChain|RunCMake.execute_process)"
|
|
# run individual crashing test(s) with -R
|
|
# ./bin/ctest -R "(CMakeLib.testUVProcessChain|RunCMake.execute_process)" --output-on-failure
|
|
}
|