diff --git a/media-libs/libspng/libspng-0.7.4.recipe b/media-libs/libspng/libspng-0.7.4.recipe new file mode 100644 index 000000000..8a1a5c621 --- /dev/null +++ b/media-libs/libspng/libspng-0.7.4.recipe @@ -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 +}