diff --git a/media-libs/taglib/patches/taglib-2.0.patchset b/media-libs/taglib/patches/taglib-2.0.patchset new file mode 100644 index 000000000..b0b3ec1f1 --- /dev/null +++ b/media-libs/taglib/patches/taglib-2.0.patchset @@ -0,0 +1,25 @@ +From c4f942af23f94a8204f0e2a07af4c2f03cc4b5d1 Mon Sep 17 00:00:00 2001 +From: Begasus +Date: Mon, 29 Jan 2024 15:39:05 +0100 +Subject: Fix for fcntl.h + + +diff --git a/tests/utils.h b/tests/utils.h +index ee2ec03..c33bde8 100644 +--- a/tests/utils.h ++++ b/tests/utils.h +@@ -32,7 +32,11 @@ + #else + #include + #include ++#ifdef __HAIKU__ ++#include ++#else + #include ++#endif + #include + #endif + #include +-- +2.42.1 + diff --git a/media-libs/taglib/taglib2.0-2.0.recipe b/media-libs/taglib/taglib2.0-2.0.recipe new file mode 100644 index 000000000..2f3a1e586 --- /dev/null +++ b/media-libs/taglib/taglib2.0-2.0.recipe @@ -0,0 +1,90 @@ +SUMMARY="An audio meta-data library" +DESCRIPTION="TagLib is a free library written in C++ for reading and editing \ +metadata that has been embedded into audio files. It is able to read and \ +edit all relevant metadata formats for audio files, including APEv2, ID3 and \ +Vorbis. It can find tags in multiple formats such as .mp3 .wma .wav .m4a \ +.flac etc. TagLib is platform independent." +HOMEPAGE="https://taglib.github.io/" +COPYRIGHT="2002-2016 Scott Wheeler" +LICENSE="GNU LGPL v2 + MPL v1.1" +REVISION="2" +SOURCE_URI="https://taglib.github.io/releases/taglib-$portVersion.tar.gz" +CHECKSUM_SHA256="e36ea877a6370810b97d84cf8f72b1e4ed205149ab3ac8232d44c850f38a2859" +SOURCE_DIR="taglib-$portVersion" +PATCHES="taglib-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="2.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + taglib2.0$secondaryArchSuffix = $portVersion + lib:libtag$secondaryArchSuffix = $libVersionCompat + lib:libtag_c$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + taglib2.0${secondaryArchSuffix}_devel = $portVersion + cmd:taglib_config$secondaryArchSuffix + devel:libtag$secondaryArchSuffix = $libVersionCompat + devel:libtag_c$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + taglib2.0$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + taglib${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:utfcpp + devel:libcppunit$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:make + cmd:sed + " + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ + $cmakeDirArgs \ + -DBUILD_SHARED_LIBS=TRUE + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + prepareInstalledDevelLibs \ + libtag \ + libtag_c + fixPkgconfig + + fixDevelopLibDirReferences $binDir/taglib-config + sed -i -e "s,\/.*/include,$includeDir," $binDir/taglib-config + + # devel package + packageEntries devel \ + $developDir \ + $binDir \ + $libDir/cmake +} + +TEST() +{ + make -Cbuild test +}