diff --git a/dev-libs/libgit2/libgit2_1.9-1.9.1.recipe b/dev-libs/libgit2/libgit2_1.9-1.9.1.recipe new file mode 100644 index 000000000..d11cc9306 --- /dev/null +++ b/dev-libs/libgit2/libgit2_1.9-1.9.1.recipe @@ -0,0 +1,136 @@ +SUMMARY="A portable, pure C implementation of the Git core methods" +DESCRIPTION="The library provides: +* SHA conversions, formatting and shortening +* abstracted ODB backend system +* commit, tag, tree and blob parsing, editing, and write-back +* tree traversal +* revision walking +* index file (staging area) manipulation +* reference management (including packed references) +* config file management +* high level repository management +* thread safety and reentrancy +* descriptive and detailed error messages +* ...and more (over 175 different API calls)" +HOMEPAGE="https://libgit2.github.com/" +COPYRIGHT="2005-2024 libgit2 project" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://github.com/libgit2/libgit2/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="14cab3014b2b7ad75970ff4548e83615f74d719afe00aa479b4a889c1e13fc00" +SOURCE_FILENAME="libgit2-$portVersion.tar.gz" +SOURCE_DIR="libgit2-$portVersion" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +commandBinDir=$binDir +commandSuffix=$secondaryArchSuffix +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%.*}" + +PROVIDES=" + libgit2_1.9$secondaryArchSuffix = $portVersion + lib:libgit2$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libpcre$secondaryArchSuffix + lib:libssh2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + libgit2_1.9${secondaryArchSuffix}_devel = $portVersion + devel:libgit2$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + libgit2_1.9$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + libgit2_1.5${secondaryArchSuffix}_devel + libgit2_1.8${secondaryArchSuffix}_devel + " + +PROVIDES_tools=" + libgit2_1.9${secondaryArchSuffix}_tools + cmd:git2$commandSuffix = $portVersion + " +REQUIRES_tools=" + libgit2_1.9$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libpcre$secondaryArchSuffix + lib:libssh2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +CONFLICTS_tools=" + libgit2_1.5${secondaryArchSuffix}_tools + libgit2_1.8${secondaryArchSuffix}_tools + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libcurl$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libpcre$secondaryArchSuffix + devel:libssh2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:curl_config$secondaryArchSuffix + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:python3.10 + cmd:pkg_config$secondaryArchSuffix + " + +defineDebugInfoPackage libgit2_1.9$secondaryArchSuffix \ + "$libDir"/libgit2.so.$libVersion + +BUILD() +{ + cmake -B build -S. \ + $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_BINDIR=$commandBinDir \ + -DUSE_ICONV=ON \ + -DUSE_SSH=ON \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TESTS=ON + + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + prepareInstalledDevelLib \ + libgit2 + fixPkgconfig + + packageEntries devel \ + $developDir \ + $libDir/cmake + + packageEntries tools \ + $commandBinDir +} + +TEST() +{ + ctest --test-dir build --output-on-failure +}