From c046689c718e5283d7589dc3c2d362160bb391b9 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Mon, 17 Dec 2018 09:54:19 +0100 Subject: [PATCH] tremor, add new recipe for vorbisidec package (#3157) * tremor, add new recipe for vorbisidec package --- .../tremor/patches/tremor-1.0.0~git.patchset | 60 ++++++++++++++ media-libs/tremor/tremor-1.0.0~git.recipe | 80 +++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 media-libs/tremor/patches/tremor-1.0.0~git.patchset create mode 100644 media-libs/tremor/tremor-1.0.0~git.recipe diff --git a/media-libs/tremor/patches/tremor-1.0.0~git.patchset b/media-libs/tremor/patches/tremor-1.0.0~git.patchset new file mode 100644 index 000000000..5edc0556d --- /dev/null +++ b/media-libs/tremor/patches/tremor-1.0.0~git.patchset @@ -0,0 +1,60 @@ +From f9f8a8244e49b32bd9a148a347680ecb1a775c19 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Thu, 27 Sep 2018 17:23:03 +0200 +Subject: add endian.h to check correct BYTE_ORDER + + +diff --git a/misc.h b/misc.h +index 1ae4d2e..b62fcac 100644 +--- a/misc.h ++++ b/misc.h +@@ -41,6 +41,10 @@ + #include + #endif + ++#if defined __HAIKU__ ++#include ++#endif ++ + #if BYTE_ORDER==LITTLE_ENDIAN + union magic { + struct { +-- +2.19.0 + + +From 15dca17e85569ce522f2f5c3ad1636c5d938b1de Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sun, 7 Oct 2018 09:13:25 +0200 +Subject: set correct @includedir@/tremor path for pkg-config + + +diff --git a/Makefile.am b/Makefile.am +index 0a4bb2c..7765599 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -31,7 +31,7 @@ iseeking_example_SOURCES = iseeking_example.c + iseeking_example_LDFLAGS = -static + iseeking_example_LDADD = libvorbisidec.la @OGG_LIBS@ + +-includedir = $(prefix)/include/tremor ++includedir = @includedir@/tremor + + include_HEADERS = ivorbiscodec.h ivorbisfile.h config_types.h + +diff --git a/vorbisidec.pc.in b/vorbisidec.pc.in +index 56fa656..3b56ae3 100644 +--- a/vorbisidec.pc.in ++++ b/vorbisidec.pc.in +@@ -3,7 +3,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=@includedir@ ++includedir=@includedir@/tremor + + Name: vorbisidec + Description: vorbisidec is the integer Ogg Vorbis library +-- +2.19.0 + diff --git a/media-libs/tremor/tremor-1.0.0~git.recipe b/media-libs/tremor/tremor-1.0.0~git.recipe new file mode 100644 index 000000000..9295df766 --- /dev/null +++ b/media-libs/tremor/tremor-1.0.0~git.recipe @@ -0,0 +1,80 @@ +SUMMARY="A fixed-point version of the Ogg Vorbis decoder (also known as libvorbisidec)" +DESCRIPTION="The Tremor Vorbis I stream and file decoder provides an \ +embeddable, integer-only library [libvorbisidec] intended for decoding all \ +current and future Vorbis I compliant streams. The Tremor libvorbisidec \ +library exposes an API intended to be as similar as possible to the familiar \ +vorbisfile library included with the open source Vorbis reference \ +libraries distributed for free by Xiph.org." +HOMEPAGE="https://wiki.xiph.org/Tremor/" +COPYRIGHT="1994-2018 Xiph.Org Foundation" +LICENSE="BSD (3-clause)" +REVISION="1" +srcGitRev="4b14e2579e91e22cd5dcc63553496ef6e7c5c222" +SOURCE_URI="https://github.com/jhot/libtremor/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="f122b4d9f00412929b407c00f19d1b713604d57fb9ba72a98f4a68e77639abd1" +SOURCE_FILENAME="tremor-$portVersion-$srcGitRev.tar.gz" +SOURCE_DIR="libtremor-$srcGitRev" +PATCHES="tremor-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +libVersion="1.0.3" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + tremor$secondaryArchSuffix = $portVersion + lib:libvorbisidec$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + " + +PROVIDES_devel=" + tremor${secondaryArchSuffix}_devel = $portVersion + devel:libvorbisidec$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + tremor$secondaryArchSuffix == $portVersion base + devel:libogg$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libogg$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoreconf + cmd:gcc$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + autoreconf -vfi + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + rm -f "$libDir"/libvorbisidec*.la + + prepareInstalledDevelLib libvorbisidec + fixPkgconfig + + # devel package + packageEntries devel \ + "$developDir" +} + +TEST() +{ + make check +}