From 4f13adbb411db44dbf8d87580b76b82333d867d0 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Fri, 21 Dec 2018 09:16:18 +0100 Subject: [PATCH] libshout: add extra options (#3478) --- media-libs/libshout/libshout-2.4.1.recipe | 33 +++++++++++++++---- .../patches/libshout-2.4.1-gcc2.patchset | 29 ++++++++++++++++ .../libshout/patches/libshout-2.4.1.patchset | 22 +++++++++++++ 3 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 media-libs/libshout/patches/libshout-2.4.1-gcc2.patchset create mode 100644 media-libs/libshout/patches/libshout-2.4.1.patchset diff --git a/media-libs/libshout/libshout-2.4.1.recipe b/media-libs/libshout/libshout-2.4.1.recipe index bd879525c..ea5ad348d 100644 --- a/media-libs/libshout/libshout-2.4.1.recipe +++ b/media-libs/libshout/libshout-2.4.1.recipe @@ -10,9 +10,14 @@ COPYRIGHT="2002-2012 the Icecast team 2014 Brendan Cully 1995-1997 by Sam Rushing" LICENSE="GNU LGPL v2.1" -REVISION="3" +REVISION="4" SOURCE_URI="http://downloads.xiph.org/releases/libshout/libshout-$portVersion.tar.gz" CHECKSUM_SHA256="f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d" +PATCHES="libshout-$portVersion.patchset" +if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then + PATCHES+=" + libshout-$portVersion-gcc2.patchset" +fi ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" @@ -23,6 +28,10 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + lib:libspeex$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libtheora$secondaryArchSuffix lib:libvorbis$secondaryArchSuffix " @@ -32,10 +41,18 @@ PROVIDES_devel=" " REQUIRES_devel=" libshout$secondaryArchSuffix == $portVersion base + devel:libogg$secondaryArchSuffix + devel:libspeex$secondaryArchSuffix + devel:libtheora$secondaryArchSuffix + devel:libvorbis$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel + devel:libogg$secondaryArchSuffix + devel:libspeex$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libtheora$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix " BUILD_PREREQUIRES=" @@ -49,8 +66,17 @@ BUILD_PREREQUIRES=" cmd:pkg_config$secondaryArchSuffix " +defineDebugInfoPackage libshout$secondaryArchSuffix \ + $libDir/libshout.so.3.2.0 + +PATCH() +{ + echo "AC_CONFIG_MACRO_DIRS([m4])" >> configure.ac +} + BUILD() { + export LIBS="-lnetwork" autoreconf -fi runConfigure ./configure make $jobArgs @@ -70,8 +96,3 @@ INSTALL() $developDir \ $dataDir } - -TEST() -{ - make check -} diff --git a/media-libs/libshout/patches/libshout-2.4.1-gcc2.patchset b/media-libs/libshout/patches/libshout-2.4.1-gcc2.patchset new file mode 100644 index 000000000..e39bc0d8f --- /dev/null +++ b/media-libs/libshout/patches/libshout-2.4.1-gcc2.patchset @@ -0,0 +1,29 @@ +From c154290e54c5f90a68d56c057beccc9cc3a5524d Mon Sep 17 00:00:00 2001 +From: begasus +Date: Mon, 17 Dec 2018 19:22:38 +0100 +Subject: gcc2 fix + + +diff --git a/src/codec_theora.c b/src/codec_theora.c +index fc1819c..2323d9a 100644 +--- a/src/codec_theora.c ++++ b/src/codec_theora.c +@@ -56,6 +56,7 @@ int _shout_open_theora(ogg_codec_t *codec, ogg_page *page) + + (void)page; + ++ { + theora_data_t *theora_data = calloc(1, sizeof(theora_data_t)); + if (! theora_data) + return SHOUTERR_MALLOC; +@@ -76,6 +77,7 @@ int _shout_open_theora(ogg_codec_t *codec, ogg_page *page) + codec->free_data = free_theora_data; + codec->headers = 1; + theora_data->initial_frames = 0; ++ } + + return SHOUTERR_SUCCESS; + } +-- +2.19.1 + diff --git a/media-libs/libshout/patches/libshout-2.4.1.patchset b/media-libs/libshout/patches/libshout-2.4.1.patchset new file mode 100644 index 000000000..ff4723358 --- /dev/null +++ b/media-libs/libshout/patches/libshout-2.4.1.patchset @@ -0,0 +1,22 @@ +From 2ee70a871c7803db827ed63337b58f222f39e067 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Tue, 18 Dec 2018 12:35:04 +0100 +Subject: comment out pthread_attr_setinheritsched + + +diff --git a/src/common/thread/thread.c b/src/common/thread/thread.c +index e29ea20..6238ff2 100644 +--- a/src/common/thread/thread.c ++++ b/src/common/thread/thread.c +@@ -299,7 +299,7 @@ thread_type *thread_create_c(char *name, void *(*start_routine)(void *), + start->thread = thread; + + pthread_attr_setstacksize (&attr, 512*1024); +- pthread_attr_setinheritsched (&attr, PTHREAD_INHERIT_SCHED); ++ //pthread_attr_setinheritsched (&attr, PTHREAD_INHERIT_SCHED); + if (detached) + { + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); +-- +2.19.1 +