mlpack, bump to 4.6.2, bump boost requirement (#13019)

This commit is contained in:
Schrijvers Luc
2025-10-05 11:46:07 +02:00
committed by GitHub
parent a21427c8dd
commit 2ac067e918
2 changed files with 154 additions and 179 deletions

View File

@@ -1,179 +0,0 @@
SUMMARY="Scalable c++ machine learning library"
DESCRIPTION="mlpack is an intuitive, fast, scalable C++ machine learning \
library, meant to be a machine learning analog to LAPACK. It aims to implement \
a wide array of machine learning methods and functions as a \"swiss army \
knife\" for machine learning researchers."
HOMEPAGE="https://www.mlpack.org/"
COPYRIGHT="2011-2012 mlpack Team"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://github.com/mlpack/mlpack/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="7a7ad88c4c870b19e6c3946de23a1de1b0ee2768ddb83447bd72ea90d8cae49d"
SOURCE_FILENAME="mlpack-$portVersion.tar.gz"
SOURCE_URI_2="http://www.ensmallen.org/files/ensmallen-2.14.2.tar.gz"
CHECKSUM_SHA256_2="d067ce6aec567e1f49e47c6b59600a666f74755ff46228e8855cd21cb04188cc"
SOURCE_URI_3="http://mlpack.org/files/stb-2.22/stb_image.h#noarchive"
CHECKSUM_SHA256_3="0e28238d865510073b5740ae8eba8cd8032cc5b25f94e0f7505fac8036864909"
SOURCE_URI_4="http://mlpack.org/files/stb-1.13/stb_image_write.h#noarchive"
CHECKSUM_SHA256_4="0e8b3d80bc6eb8fdb64abc4db9fec608b489bc73418eaf14beda102a0699a4c9"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
mlpack$secondaryArchSuffix = $portVersion
lib:libmlpack$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libarmadillo$secondaryArchSuffix
lib:libboost_serialization$secondaryArchSuffix
lib:libboost_system$secondaryArchSuffix
lib:libboost_unit_test_framework$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libhdf5$secondaryArchSuffix
lib:liblapack$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
lib:libsuperlu$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
"
PROVIDES_cli="
mlpack${secondaryArchSuffix}_cli = $portVersion
cmd:mlpack_adaboost = $libVersionCompat
cmd:mlpack_approx_kfn = $libVersionCompat
cmd:mlpack_bayesian_linear_regression = $libVersionCompat
cmd:mlpack_cf = $libVersionCompat
cmd:mlpack_dbscan = $libVersionCompat
cmd:mlpack_decision_stump = $libVersionCompat
cmd:mlpack_decision_tree = $libVersionCompat
cmd:mlpack_det = $libVersionCompat
cmd:mlpack_emst = $libVersionCompat
cmd:mlpack_fastmks = $libVersionCompat
cmd:mlpack_gmm_generate = $libVersionCompat
cmd:mlpack_gmm_probability = $libVersionCompat
cmd:mlpack_gmm_train = $libVersionCompat
cmd:mlpack_hmm_generate = $libVersionCompat
cmd:mlpack_hmm_loglik = $libVersionCompat
cmd:mlpack_hmm_train = $libVersionCompat
cmd:mlpack_hmm_viterbi = $libVersionCompat
cmd:mlpack_hoeffding_tree = $libVersionCompat
cmd:mlpack_image_converter = $libVersionCompat
cmd:mlpack_kde = $libVersionCompat
cmd:mlpack_kernel_pca = $libVersionCompat
cmd:mlpack_kfn = $libVersionCompat
cmd:mlpack_kmeans = $libVersionCompat
cmd:mlpack_knn = $libVersionCompat
cmd:mlpack_krann = $libVersionCompat
cmd:mlpack_lars = $libVersionCompat
cmd:mlpack_linear_regression = $libVersionCompat
cmd:mlpack_linear_svm = $libVersionCompat
cmd:mlpack_lmnn = $libVersionCompat
cmd:mlpack_local_coordinate_coding = $libVersionCompat
cmd:mlpack_logistic_regression = $libVersionCompat
cmd:mlpack_lsh = $libVersionCompat
cmd:mlpack_mean_shift = $libVersionCompat
cmd:mlpack_nbc = $libVersionCompat
cmd:mlpack_nca = $libVersionCompat
cmd:mlpack_nmf = $libVersionCompat
cmd:mlpack_pca = $libVersionCompat
cmd:mlpack_perceptron = $libVersionCompat
cmd:mlpack_preprocess_binarize = $libVersionCompat
cmd:mlpack_preprocess_describe = $libVersionCompat
cmd:mlpack_preprocess_imputer = $libVersionCompat
cmd:mlpack_preprocess_one_hot_encoding = $libVersionCompat
cmd:mlpack_preprocess_scale = $libVersionCompat
cmd:mlpack_preprocess_split = $libVersionCompat
cmd:mlpack_radical = $libVersionCompat
cmd:mlpack_random_forest = $libVersionCompat
cmd:mlpack_range_search = $libVersionCompat
cmd:mlpack_softmax_regression = $libVersionCompat
cmd:mlpack_sparse_coding = $libVersionCompat
"
REQUIRES_cli="
mlpack$secondaryArchSuffix == $portVersion base
$REQUIRES
"
PROVIDES_devel="
mlpack${secondaryArchSuffix}_devel = $portVersion
devel:libmlpack$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
mlpack$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libarmadillo$secondaryArchSuffix
devel:libboost_serialization$secondaryArchSuffix >= 1.70.0
devel:libboost_system$secondaryArchSuffix >= 1.70.0
devel:libboost_unit_test_framework$secondaryArchSuffix >= 1.70.0
devel:libhdf5$secondaryArchSuffix
devel:liblapack$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
devel:libsuperlu$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:find
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage mlpack$secondaryArchSuffix \
$libDir/libmlpack.so.${portVersion%.*}
BUILD()
{
mkdir -p build/deps/stb
cp "$sourceDir3"/stb_image.h "$sourceDir4"/stb_image_write.h build/deps/stb
ln -s "$sourceDir2" build/deps/ensmallen-2.14.2 || true
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DBUILD_TESTS=OFF \
-DDEBUG=OFF \
-DPROFILE=OFF
# mlpack easily eats up all your ram, so don't do parallel jobs!
make
}
INSTALL()
{
cd build
make install $jobArgs
mkdir -p $includeDir
mv $prefix/include/* $includeDir/
rmdir $prefix/include
prepareInstalledDevelLib libmlpack
fixPkgconfig
packageEntries cli \
"$binDir"
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
# Switch it on first in BUILD()
# Takes way too much time to build the tests
cd build
make test
}

View File

@@ -0,0 +1,154 @@
SUMMARY="Scalable header only C++ machine learning library"
DESCRIPTION="mlpack is an intuitive, fast, scalable header only C++ machine learning \
library, meant to be a machine learning analog to LAPACK. It aims to implement a wide array of \
machine learning methods and functions as a \"swiss army knife\" for machine learning \
researchers."
HOMEPAGE="https://www.mlpack.org/"
COPYRIGHT="2011-2012 mlpack Team"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/mlpack/mlpack/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="2fe772da383a935645ced07a07b51942ca178d38129df3bf685890bc3c1752cf"
SOURCE_FILENAME="mlpack-$portVersion.tar.gz"
SOURCE_URI_2="http://mlpack.org/files/stb-2.22/stb_image.h#noarchive"
CHECKSUM_SHA256_2="0e28238d865510073b5740ae8eba8cd8032cc5b25f94e0f7505fac8036864909"
SOURCE_URI_3="http://mlpack.org/files/stb-1.13/stb_image_write.h#noarchive"
CHECKSUM_SHA256_3="0e8b3d80bc6eb8fdb64abc4db9fec608b489bc73418eaf14beda102a0699a4c9"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
mlpack$secondaryArchSuffix = $portVersion
devel:libmlpack$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libarmadillo$secondaryArchSuffix
lib:libboost_serialization$secondaryArchSuffix
lib:libboost_system$secondaryArchSuffix
lib:libboost_unit_test_framework$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libhdf5$secondaryArchSuffix
lib:liblapack$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
lib:libsuperlu$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
"
PROVIDES_cli="
mlpack${secondaryArchSuffix}_cli = $portVersion
cmd:mlpack_adaboost = $portVersion
cmd:mlpack_approx_kfn = $portVersion
cmd:mlpack_bayesian_linear_regression = $portVersion
cmd:mlpack_cf = $portVersion
cmd:mlpack_dbscan = $portVersion
cmd:mlpack_decision_stump = $portVersion
cmd:mlpack_decision_tree = $portVersion
cmd:mlpack_det = $portVersion
cmd:mlpack_emst = $portVersion
cmd:mlpack_fastmks = $portVersion
cmd:mlpack_gmm_generate = $portVersion
cmd:mlpack_gmm_probability = $portVersion
cmd:mlpack_gmm_train = $portVersion
cmd:mlpack_hmm_generate = $portVersion
cmd:mlpack_hmm_loglik = $portVersion
cmd:mlpack_hmm_train = $portVersion
cmd:mlpack_hmm_viterbi = $portVersion
cmd:mlpack_hoeffding_tree = $portVersion
cmd:mlpack_image_converter = $portVersion
cmd:mlpack_kde = $portVersion
cmd:mlpack_kernel_pca = $portVersion
cmd:mlpack_kfn = $portVersion
cmd:mlpack_kmeans = $portVersion
cmd:mlpack_knn = $portVersion
cmd:mlpack_krann = $portVersion
cmd:mlpack_lars = $portVersion
cmd:mlpack_linear_regression = $portVersion
cmd:mlpack_linear_svm = $portVersion
cmd:mlpack_lmnn = $portVersion
cmd:mlpack_local_coordinate_coding = $portVersion
cmd:mlpack_logistic_regression = $portVersion
cmd:mlpack_lsh = $portVersion
cmd:mlpack_mean_shift = $portVersion
cmd:mlpack_nbc = $portVersion
cmd:mlpack_nca = $portVersion
cmd:mlpack_nmf = $portVersion
cmd:mlpack_pca = $portVersion
cmd:mlpack_perceptron = $portVersion
cmd:mlpack_preprocess_binarize = $portVersion
cmd:mlpack_preprocess_describe = $portVersion
cmd:mlpack_preprocess_imputer = $portVersion
cmd:mlpack_preprocess_one_hot_encoding = $portVersion
cmd:mlpack_preprocess_scale = $portVersion
cmd:mlpack_preprocess_split = $portVersion
cmd:mlpack_radical = $portVersion
cmd:mlpack_random_forest = $portVersion
cmd:mlpack_range_search = $portVersion
cmd:mlpack_softmax_regression = $portVersion
cmd:mlpack_sparse_coding = $portVersion
"
REQUIRES_cli="
# mlpack$secondaryArchSuffix == $portVersion base
$REQUIRES
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:cereal$secondaryArchSuffix
devel:ensmallen$secondaryArchSuffix
devel:libarmadillo$secondaryArchSuffix
devel:libboost_serialization$secondaryArchSuffix >= 1.88.0
devel:libboost_system$secondaryArchSuffix >= 1.88.0
devel:libboost_unit_test_framework$secondaryArchSuffix >= 1.88.0
devel:libhdf5$secondaryArchSuffix
devel:liblapack$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
devel:libsuperlu$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:find
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
mkdir -p build/deps/stb
cp "$sourceDir2"/stb_image.h "$sourceDir3"/stb_image_write.h build/deps/stb
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DBUILD_TESTS=OFF \
-DDEBUG=OFF \
-DPROFILE=OFF \
-Wno-dev
# mlpack easily eats up all your ram, so don't do parallel jobs!
make
}
INSTALL()
{
cd build
make install $jobArgs
packageEntries cli \
"$binDir"
}
TEST()
{
# Switch it on first in BUILD()
# Takes way too much time to build the tests
cd build
make test
}