libspng: new recipe

This commit is contained in:
Jérôme Duval
2025-01-25 15:38:22 +01:00
parent 1a85e3a862
commit 1af65b99f6

View File

@@ -0,0 +1,66 @@
SUMMARY="Simple Portable Network Graphics library"
DESCRIPTION="libspng is a C library for reading and writing Portable Network Graphics (PNG) \
format files with a focus on security and ease of use."
HOMEPAGE="https://github.com/randy408/libspng/"
COPYRIGHT="2018-2023 Randy"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/randy408/libspng/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="47ec02be6c0a6323044600a9221b049f63e1953faf816903e7383d4dc4234487"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libspng$secondaryArchSuffix = $portVersion
lib:libspng$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
libspng${secondaryArchSuffix}_devel = $portVersion
devel:libspng$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libspng$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:meson
"
BUILD()
{
meson setup build . --buildtype release \
--prefix $prefix \
--includedir $includeDir \
--libdir $libDir \
--default-library shared
meson compile -C build $jobArgs
}
INSTALL()
{
meson install -C build
prepareInstalledDevelLibs libspng
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}