From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SG8Xe-0004hn-Q0 for ptxdist@pengutronix.de; Fri, 06 Apr 2012 14:45:26 +0200 Received: from jbe by dude.hi.pengutronix.de with local (Exim 4.77) (envelope-from ) id 1SG8Xe-00024a-OY for ptxdist@pengutronix.de; Fri, 06 Apr 2012 14:45:26 +0200 From: Juergen Beisert Date: Fri, 6 Apr 2012 14:45:18 +0200 Message-Id: <1333716320-7923-4-git-send-email-jbe@pengutronix.de> In-Reply-To: <1333716320-7923-1-git-send-email-jbe@pengutronix.de> References: <1333716320-7923-1-git-send-email-jbe@pengutronix.de> Subject: [ptxdist] [PATCH 3/5] ICECAST: add an audio streaming server Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Signed-off-by: Juergen Beisert --- generic/etc/icecast.xml | 180 ++++++++++++++++++++ generic/etc/init.d/icecast | 41 +++++ patches/icecast-2.3.2/autogen.sh | 1 + patches/icecast-2.3.2/enabled_silen_rules.diff | 24 +++ patches/icecast-2.3.2/fix_curl_detection.diff | 179 ++++++++++++++++++++ patches/icecast-2.3.2/fix_ogg_detection.diff | 115 +++++++++++++ patches/icecast-2.3.2/fix_openssl_detection.diff | 116 +++++++++++++ patches/icecast-2.3.2/fix_speex_detection.diff | 171 +++++++++++++++++++ patches/icecast-2.3.2/fix_theora_detection.diff | 160 ++++++++++++++++++ patches/icecast-2.3.2/fix_vorbis_detection.diff | 191 ++++++++++++++++++++++ patches/icecast-2.3.2/fix_xml_detection.diff | 102 ++++++++++++ patches/icecast-2.3.2/fix_yp_handling.diff | 60 +++++++ patches/icecast-2.3.2/series | 10 ++ patches/icecast-2.3.2/use_pkg_config.diff | 19 +++ rules/icecast.in | 50 ++++++ rules/icecast.make | 71 ++++++++ 16 files changed, 1490 insertions(+) create mode 100644 generic/etc/icecast.xml create mode 100644 generic/etc/init.d/icecast create mode 120000 patches/icecast-2.3.2/autogen.sh create mode 100644 patches/icecast-2.3.2/enabled_silen_rules.diff create mode 100644 patches/icecast-2.3.2/fix_curl_detection.diff create mode 100644 patches/icecast-2.3.2/fix_ogg_detection.diff create mode 100644 patches/icecast-2.3.2/fix_openssl_detection.diff create mode 100644 patches/icecast-2.3.2/fix_speex_detection.diff create mode 100644 patches/icecast-2.3.2/fix_theora_detection.diff create mode 100644 patches/icecast-2.3.2/fix_vorbis_detection.diff create mode 100644 patches/icecast-2.3.2/fix_xml_detection.diff create mode 100644 patches/icecast-2.3.2/fix_yp_handling.diff create mode 100644 patches/icecast-2.3.2/series create mode 100644 patches/icecast-2.3.2/use_pkg_config.diff create mode 100644 rules/icecast.in create mode 100644 rules/icecast.make diff --git a/generic/etc/icecast.xml b/generic/etc/icecast.xml new file mode 100644 index 0000000..3f7f349 --- /dev/null +++ b/generic/etc/icecast.xml @@ -0,0 +1,180 @@ + + + 100 + 2 + 5 + 524288 + 30 + 15 + 10 + + 1 + + 65535 + + + + + hackme + + hackme + + + admin + hackme + + + + + + + + + Aura + + + + 8000 + + + + + + + + + + + + + + + + + + + + 1 + + + + /usr/share/icecast + + + /var/log/icecast + /usr/share/icecast/web + /usr/share/icecast/admin + /var/run/icecast.pid + + + + + + + + + access.log + error.log + + 4 + 10000 + + + + + + 0 + + nobody + nogroup + + + diff --git a/generic/etc/init.d/icecast b/generic/etc/init.d/icecast new file mode 100644 index 0000000..8d3e40f --- /dev/null +++ b/generic/etc/init.d/icecast @@ -0,0 +1,41 @@ +#!/bin/sh + +ICECAST_PID=/var/run/icecast.pid +ICECAST_CONF=/etc/icecast.xml +ICECAST_LOG=/var/log/icecast + +create_dirs() { + if [ ! -e ${ICECAST_LOG} ]; then + mkdir -p ${ICECAST_LOG} + chown nobody.nogroup ${ICECAST_LOG} + fi +} + +case "$1" in + + start) + if [ -e ${ICECAST_PID} ]; then + echo "Icecast is already running" + exit 1 + fi + + create_dirs + icecast -c ${ICECAST_CONF} -b + ;; + stop) + if [ ! -e ${ICECAST_PID} ]; then + echo "Icecast is not running" + exit 1 + fi + + kill `cat ${ICECAST_PID}` + # icecast does not remove its own PID file + rm ${ICECAST_PID} + ;; + *) + echo "Usage: $0 {start|stop}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/patches/icecast-2.3.2/autogen.sh b/patches/icecast-2.3.2/autogen.sh new file mode 120000 index 0000000..9f8a4cb --- /dev/null +++ b/patches/icecast-2.3.2/autogen.sh @@ -0,0 +1 @@ +../autogen.sh \ No newline at end of file diff --git a/patches/icecast-2.3.2/enabled_silen_rules.diff b/patches/icecast-2.3.2/enabled_silen_rules.diff new file mode 100644 index 0000000..da51af0 --- /dev/null +++ b/patches/icecast-2.3.2/enabled_silen_rules.diff @@ -0,0 +1,24 @@ +From: Juergen Beisert +Subject: Enable silent rules +Signed-off-by: Juergen Beisert +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -5,6 +5,12 @@ AC_CONFIG_SRCDIR(src/main.c) + dnl Process this file with autoconf to produce a configure script. + + AM_INIT_AUTOMAKE ++ ++# default is more output while building the package ++m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) ++AM_SILENT_RULES([yes]) ++AM_CONDITIONAL(BUILD_SILENTLY, test "x$enable_silent_rules" = xyes) ++ + AM_CONFIG_HEADER(config.h) + AM_MAINTAINER_MODE + diff --git a/patches/icecast-2.3.2/fix_curl_detection.diff b/patches/icecast-2.3.2/fix_curl_detection.diff new file mode 100644 index 0000000..072e27f --- /dev/null +++ b/patches/icecast-2.3.2/fix_curl_detection.diff @@ -0,0 +1,179 @@ +From: Juergen Beisert +Subject: Fix libCURL detection +Signed-off-by: Juergen Beisert +--- + configure.in | 30 +++++++++++---------- + m4/xiph_curl.m4 | 78 -------------------------------------------------------- + src/Makefile.am | 10 +++++-- + 3 files changed, 23 insertions(+), 95 deletions(-) + +Index: icecast-2.3.2/m4/xiph_curl.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/xiph_curl.m4 ++++ /dev/null +@@ -1,78 +0,0 @@ +-dnl XIPH_PATH_CURL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Test for libcurl, and define CURL_CFLAGS and CURL_LIBS +-dnl +-dnl $Id: xiph_curl.m4 14776 2008-04-19 01:54:11Z karl $ +-dnl +-AC_DEFUN([XIPH_PATH_CURL], +-[dnl +-dnl Get the cflags and libraries +-dnl +-AC_ARG_WITH(curl, +- AC_HELP_STRING([--with-curl=PFX],[Prefix where libcurl is installed (optional)]), +- curl_prefix="$withval", curl_prefix="$CURL_PREFIX") +- +-if test "x$curl_prefix" = "xno" +-then +- AC_MSG_RESULT([libcurl support disabled by request]) +-else +- +-AC_ARG_WITH(curl-config, +- AC_HELP_STRING([--with-curl-config=curl-config],[Use curl-config to find libcurl]), +- CURL_CONFIG="$withval", [AC_PATH_PROGS(CURL_CONFIG, [curl-config], "")]) +- +-if test "x$curl_prefix" != "x" -a "x$curl_prefix" != "xyes"; then +- CURL_LIBS="-L$curl_prefix/lib -lcurl" +- CURL_CFLAGS="-I$curl_prefix/include" +-elif test "x$CURL_CONFIG" != "x"; then +- if ! test -x "$CURL_CONFIG"; then +- AC_MSG_ERROR([$CURL_CONFIG cannot be executed]) +- fi +- CURL_LIBS="$($CURL_CONFIG --libs)" +- CURL_CFLAGS="$($CURL_CONFIG --cflags)" +-else +- if test "x$prefix" = "xNONE"; then +- curl_prefix="/usr/local" +- else +- curl_prefix="$prefix" +- fi +- CURL_LIBS="-L$curl_prefix/lib -lcurl" +- CURL_CFLAGS="-I$curl_prefix/include" +-fi +- +-curl_ok="yes" +- +-xt_curl_CPPFLAGS="$CPPFLAGS" +-xt_curl_LIBS="$LIBS" +-CPPFLAGS="$CPPFLAGS $CURL_CFLAGS" +-LIBS="$CURL_LIBS $LIBS" +-dnl +-dnl Now check if the installed libcurl is sufficiently new. +-dnl +-AC_CHECK_HEADERS([curl/curl.h],, curl_ok="no") +-AC_MSG_CHECKING(for libcurl) +-if test "$curl_ok" = "yes" +-then +- AC_RUN_IFELSE(AC_LANG_SOURCE([ +-#include +-int main() +-{ +- return 0; +-} +-]),,[curl_ok="no"]) +-fi +-if test "$curl_ok" = "yes"; then +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.]) +- ifelse([$1], , :, [$1]) +-else +- AC_MSG_RESULT(no) +- CURL_LIBS="" +- CURL_CFLAGS="" +- ifelse([$2], , :, [$2]) +-fi +-CPPFLAGS="$xt_curl_CPPFLAGS" +-LIBS="$xt_curl_LIBS" +-fi +-AC_SUBST(CURL_CFLAGS) +-AC_SUBST(CURL_LIBS) +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -128,25 +128,27 @@ XIPH_VAR_APPEND([XIPH_CFLAGS],[$PTHREAD_ + XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$PTHREAD_CPPFLAGS]) + XIPH_VAR_PREPEND([XIPH_LIBS],[$PTHREAD_LIBS]) + +-XIPH_PATH_CURL([ +- AC_CHECK_DECL([CURLOPT_NOSIGNAL], +- [ AC_DEFINE([HAVE_AUTH_URL], 1, [Define to compile in auth URL support code]) +- AC_CHECK_FUNCS([curl_global_init]) +- ICECAST_OPTIONAL="$ICECAST_OPTIONAL auth_url.o" +- enable_curl="yes" +- XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$CURL_CFLAGS]) +- XIPH_VAR_PREPEND([XIPH_LIBS],[$CURL_LIBS]) +- ], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required)]) +- ], [#include +- ]) +- ],[ AC_MSG_NOTICE([libcurl not found]) +- ]) ++AC_MSG_CHECKING([for libcurl]) ++AC_ARG_WITH(curl, ++ AS_HELP_STRING([--with-curl], ++ [Use libcurl @<:@default=no@:>@]), ++ [], [with_curl=no]) ++ ++if test x$with_curl = xno; then ++ AC_MSG_RESULT([libcurl support disabled by request]) ++else ++ AC_MSG_RESULT([${with_curl}]) ++ PKG_CHECK_MODULES(CURL, libcurl) ++ AC_DEFINE(HAVE_CURL, 1, [Define if you have libcurl.]) ++fi ++AM_CONDITIONAL(BUILD_CURL, [test x$with_curl = xyes]) ++ + dnl -- YP support -- + AC_ARG_ENABLE([yp], + AC_HELP_STRING([--disable-yp],[disable YP directory support]), + enable_yp="$enableval", + enable_yp="yes") +-if test "x$enable_yp" = "xyes" -a "x$enable_curl" = xyes ++if test "x$enable_yp" = "xyes" -a x$with_curl = xyes + then + AC_DEFINE([USE_YP], 1, [Define to compile in YP support code]) + ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o" +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -18,8 +18,7 @@ icecast_SOURCES = cfgfile.c main.c loggi + xslt.c fserve.c event.c admin.c md5.c \ + format.c format_ogg.c format_mp3.c format_midi.c format_flac.c \ + auth.c auth_htpasswd.c format_kate.c format_skeleton.c +-EXTRA_icecast_SOURCES = yp.c \ +- auth_url.c ++EXTRA_icecast_SOURCES = yp.c + + if BUILD_VORBIS + icecast_SOURCES += format_vorbis.c +@@ -30,6 +29,9 @@ endif + if BUILD_SPEEX + icecast_SOURCES += format_speex.c + endif ++if BUILD_CURL ++icecast_SOURCES += auth_url.c ++endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +@@ -39,13 +41,15 @@ icecast_LDADD = @XSLT_LIBS@ \ + @VORBISENC_LIBS@ \ + @THEORA_LIBS@ \ + @SPEEX_LIBS@ \ ++ @CURL_LIBS@ \ + $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ + icecast_CFLAGS = @XSLT_CFLAGS@ \ + @VORBIS_CFLAGS@ \ + @VORBISFILE_CFLAGS@ \ + @VORBISENC_CFLAGS@ \ + @THEORA_CFLAGS@ \ +- @SPEEX_CFLAGS@ ++ @SPEEX_CFLAGS@ \ ++ @CURL_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ diff --git a/patches/icecast-2.3.2/fix_ogg_detection.diff b/patches/icecast-2.3.2/fix_ogg_detection.diff new file mode 100644 index 0000000..acee80d --- /dev/null +++ b/patches/icecast-2.3.2/fix_ogg_detection.diff @@ -0,0 +1,115 @@ +From: Juergen Beisert +Subject: Fix libOGG detection +Signed-off-by: Juergen Beisert +--- + configure.in | 1 + m4/ogg.m4 | 65 -------------------------------------------------------- + src/Makefile.am | 6 +++-- + 3 files changed, 5 insertions(+), 67 deletions(-) + +Index: icecast-2.3.2/m4/ogg.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/ogg.m4 ++++ /dev/null +@@ -1,65 +0,0 @@ +-# Configure paths for libogg +-# updated by Karl Heyes 10-Jun-2003 +-# Jack Moffitt 10-21-2000 +-# Shamelessly stolen from Owen Taylor and Manish Singh +- +-dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Test for libogg, and define OGG_CFLAGS OGG_LDFLAGS and OGG_LIBS +-dnl +-AC_DEFUN([XIPH_PATH_OGG], +-[dnl +-AC_ARG_VAR([OGG_PREFIX],[path to ogg installation]) +-AC_ARG_WITH(ogg, +- [AC_HELP_STRING([--with-ogg=PREFIX], +- [Prefix where libogg is installed (optional)])], +- ogg_prefix="$withval", +- ogg_prefix="$OGG_PREFIX" +- ) +-if test "x$ogg_prefix" = "x" -o "x$ogg_prefix" = "xyes"; then +- if test "x$prefix" = "xNONE"; then +- ogg_prefix=/usr/local +- else +- ogg_prefix="$prefix" +- fi +-fi +- +-XIPH_GCC_WARNING([-I$ogg_prefix/include],, +- [ OGG_CFLAGS="-I$ogg_prefix/include" +- OGG_LDFLAGS="-L$ogg_prefix/lib" +- ]) +-AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg, +-[dnl +-OGG_LIBS="-logg" +- +-# +-# check if the installed Ogg is sufficiently new. +-# +-ac_save_CFLAGS="$CFLAGS" +-ac_save_LIBS="$LIBS" +-ac_save_LDFLAGS="$LDFLAGS" +-CFLAGS="$CFLAGS $OGG_CFLAGS" +-LIBS="$LIBS $OGG_LIBS" +-LDFLAGS="$LDFLAGS $OGG_LDFLAGS" +-AC_TRY_LINK_FUNC(ogg_sync_init, +- [ xt_cv_lib_ogg=ok ], +- [ AC_TRY_LINK([#include ],, +- [ xt_cv_lib_ogg="pre v1.0, needs updating" ], +- [ xt_cv_lib_ogg="not found" ]) +- ]) +-CFLAGS="$ac_save_CFLAGS" +-LDFLAGS="$ac_save_LDFLAGS" +-LIBS="$ac_save_LIBS" +-]) +-if test "x$xt_cv_lib_ogg" = "xok"; then +- ifelse([$1],,,[$1]) +- AC_DEFINE([HAVE_OGG], [1], [Define if you have libogg installed]) +-else +- OGG_LIBS="" +- OGG_CFLAGS="" +- OGG_LDFLAGS="" +- ifelse([$2],,,[$2]) +-fi +-AC_SUBST(OGG_LIBS) +-AC_SUBST(OGG_CFLAGS) +-AC_SUBST(OGG_LDFLAGS) +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -59,6 +59,7 @@ dnl -- configure options -- + + # always required + PKG_CHECK_MODULES(XSLT, libxslt) ++PKG_CHECK_MODULES(OGG, ogg) + + # check for libvorbis + AC_MSG_CHECKING([for libvorbis]) +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -37,7 +37,8 @@ endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +-icecast_LDADD = @XSLT_LIBS@ \ ++icecast_LDADD = @OGG_LIBS@ \ ++ @XSLT_LIBS@ \ + @VORBIS_LIBS@ \ + @VORBISFILE_LIBS@ \ + @VORBISENC_LIBS@ \ +@@ -46,7 +47,8 @@ icecast_LDADD = @XSLT_LIBS@ \ + @CURL_LIBS@ \ + @OPENSSL_LIBS@ \ + $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ +-icecast_CFLAGS = @XSLT_CFLAGS@ \ ++icecast_CFLAGS = @OGG_CFLAGS@ \ ++ @XSLT_CFLAGS@ \ + @VORBIS_CFLAGS@ \ + @VORBISFILE_CFLAGS@ \ + @VORBISENC_CFLAGS@ \ diff --git a/patches/icecast-2.3.2/fix_openssl_detection.diff b/patches/icecast-2.3.2/fix_openssl_detection.diff new file mode 100644 index 0000000..bd794ee --- /dev/null +++ b/patches/icecast-2.3.2/fix_openssl_detection.diff @@ -0,0 +1,116 @@ +From: Juergen Beisert +Subject: Fix libOPENSSL detection +Signed-off-by: Juergen Beisert +--- + configure.in | 20 +++++++++++++------- + m4/xiph_openssl.m4 | 49 ------------------------------------------------- + src/Makefile.am | 4 +++- + 3 files changed, 16 insertions(+), 57 deletions(-) + +Index: icecast-2.3.2/m4/xiph_openssl.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/xiph_openssl.m4 ++++ /dev/null +@@ -1,49 +0,0 @@ +-dnl XIPH_PATH_OPENSSL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Karl Heyes +-dnl Test for openssl, and define OPENSSL_CFLAGS and OPENSSL_LIBS +-dnl +-AC_DEFUN([XIPH_PATH_OPENSSL], +-[dnl +-dnl Get the cflags and libraries +-dnl +-AC_ARG_WITH(openssl, +- AC_HELP_STRING([--with-openssl=PFX],[Prefix where openssl is installed (optional)]), +- openssl_prefix="$withval", openssl_prefix="") +- +-if test "x$openssl_prefix" != "x" -a "x$openssl_prefix" != "xyes"; then +- OPENSSL_LIBS="-L$openssl_prefix/lib -lssl" +- OPENSSL_CFLAGS="-I$openssl_prefix/include" +-else +- AC_PATH_PROG([PKGCONFIG], [pkg-config], [no]) +- if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists openssl`; then +- OPENSSL_CFLAGS=`$PKGCONFIG --cflags openssl` +- OPENSSL_LIBS=`$PKGCONFIG --libs openssl` +- else +- if test "x$prefix" = "xNONE"; then +- openssl_prefix="/usr/local" +- else +- openssl_prefix="$prefix" +- fi +- OPENSSL_LIBS="-L$openssl_prefix/lib -lssl" +- OPENSSL_CFLAGS="-I$openssl_prefix/include" +- fi +-fi +- +-# Now try linking to openssl +-xt_save_CFLAGS="$CFLAGS" +-xt_save_LIBS="$LIBS" +-CFLAGS="$CFLAGS $OPENSSL_CFLAGS" +-LIBS="$OPENSSL_LIBS $LIBS" +-AC_TRY_LINK([#include ], [void *a = SSL_new], [openssl_ok='yes']) +-CFLAGS="$xt_save_CFLAGS" +-LIBS="$xt_save_LIBS" +- +-if test "$openssl_ok" = "yes"; then +- AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) +- ifelse([$1], , :, [$1]) +-else +- OPENSSL_LIBS="" +- OPENSSL_CFLAGS="" +- ifelse([$2], , :, [$2]) +-fi +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -156,13 +156,19 @@ fi + AC_MSG_RESULT([${enable_yp}]) + AM_CONDITIONAL(BUILD_YP, [test "x$enable_yp" = xyes]) + +-XIPH_PATH_OPENSSL([ +- XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$OPENSSL_CFLAGS]) +- XIPH_VAR_APPEND([XIPH_LDFLAGS],[$OPENSSL_LDFLAGS]) +- XIPH_VAR_PREPEND([XIPH_LIBS],[$OPENSSL_LIBS]) +- ], +- [ AC_MSG_NOTICE([SSL disabled!]) +- ]) ++AC_MSG_CHECKING([for libopenssl]) ++AC_ARG_WITH(openssl, ++ AS_HELP_STRING([--with-openssl], ++ [Use libopenssl @<:@default=no@:>@]), ++ [], [with_openssl=no]) ++ ++if test x$with_openssl = xno; then ++ AC_MSG_RESULT([libopenssl support disabled by request]) ++else ++ AC_MSG_RESULT([${with_openssl}]) ++ PKG_CHECK_MODULES(OPENSSL, libssl) ++ AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.]) ++fi + + dnl Make substitutions + +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -44,6 +44,7 @@ icecast_LDADD = @XSLT_LIBS@ \ + @THEORA_LIBS@ \ + @SPEEX_LIBS@ \ + @CURL_LIBS@ \ ++ @OPENSSL_LIBS@ \ + $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ + icecast_CFLAGS = @XSLT_CFLAGS@ \ + @VORBIS_CFLAGS@ \ +@@ -51,7 +52,8 @@ icecast_CFLAGS = @XSLT_CFLAGS@ \ + @VORBISENC_CFLAGS@ \ + @THEORA_CFLAGS@ \ + @SPEEX_CFLAGS@ \ +- @CURL_CFLAGS@ ++ @CURL_CFLAGS@ \ ++ @OPENSSL_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ diff --git a/patches/icecast-2.3.2/fix_speex_detection.diff b/patches/icecast-2.3.2/fix_speex_detection.diff new file mode 100644 index 0000000..8eeb2b5 --- /dev/null +++ b/patches/icecast-2.3.2/fix_speex_detection.diff @@ -0,0 +1,171 @@ +From: Juergen Beisert +Subject: Fix libSPEEX detection +Signed-off-by: Juergen Beisert +--- + configure.in | 22 +++++++++----- + m4/speex.m4 | 84 -------------------------------------------------------- + src/Makefile.am | 10 ++++-- + 3 files changed, 21 insertions(+), 95 deletions(-) + +Index: icecast-2.3.2/m4/speex.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/speex.m4 ++++ /dev/null +@@ -1,84 +0,0 @@ +-# Configure paths for libspeex +-# updated by Karl Heyes 02-Feb-2004 +- +-dnl XIPH_PATH_SPEEX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Test for libspeex, and define SPEEX_CFLAGS SPEEX_LIBS +-dnl SPEEX_SPEEXENC_LIBS SPEEX_SPEEXFILE_LIBS SPEEX_LDFLAGS +-dnl +- +-AC_DEFUN([XIPH_PATH_SPEEX], +-[ +-AC_REQUIRE([XIPH_PATH_OGG]) +- +-dnl Get the cflags and libraries for speex +-dnl +-AC_ARG_VAR([SPEEX],[path to speex installation]) +-AC_ARG_WITH(speex, +- AC_HELP_STRING([--with-speex=PREFIX], +- [Prefix where libspeex is installed (optional)]), +- speex_prefix="$withval", +- speex_prefix="$SPEEX_PREFIX" +- ) +-if test "x$with_speex" = "xno" +-then +- AC_MSG_RESULT([Speex support disabled by request]) +-else +- if test "x$speex_prefix" = "x" -o "x$speex_prefix" = "xyes"; then +- if test "x$prefix" = "xNONE"; then +- speex_prefix="/usr/local" +- else +- speex_prefix="$prefix" +- fi +- fi +- +- SPEEX_CFLAGS="$OGG_CFLAGS" +- SPEEX_LDFLAGS="$OGG_LDFLAGS" +- if test "x$speex_prefix" != "x$ogg_prefix"; then +- XIPH_GCC_WARNING(-I"$speex_prefix/include",, +- [SPEEX_CFLAGS="$SPEEX_CFLAGS -I$speex_prefix/include" +- SPEEX_LDFLAGS="-L$speex_prefix/lib $SPEEX_LDFLAGS" +- ]) +- fi +- +- SPEEX_LIBS="-lspeex" +- +- xt_save_LIBS="$LIBS" +- xt_save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS $SPEEX_LDFLAGS" +- LIBS="$LIBS $SPEEX_LIBS" +- xt_have_speex="yes" +- AC_MSG_CHECKING([for libspeex]) +- AC_TRY_LINK_FUNC(ogg_stream_init, [AC_MSG_RESULT([ok])], +- [LIBS="$LIBS $OGG_LIBS" +- AC_TRY_LINK_FUNC(ogg_stream_init, +- [SPEEX_LIBS="$SPEEX_LIBS $OGG_LIBS"], +- [xt_have_speex="no"]) +- ]) +- if test "x$xt_have_speex" = "xyes" +- then +- AC_LINK_IFELSE([AC_LANG_PROGRAM( +- [#include ], +- [void *p = speex_packet_to_header;])], +- [], +- [xt_have_speex="no"]) +- fi +- +- LIBS="$xt_save_LIBS" +- LDFLAGS="$xt_save_LDFLAGS" +- +- if test "x$xt_have_speex" = "xyes" +- then +- AC_MSG_RESULT([ok]) +- AC_DEFINE([HAVE_SPEEX],[1],[Define if Speex support is available]) +- $1 +- else +- ifelse([$2], , AC_MSG_ERROR([Unable to link to libspeex]), [$2]) +- SPEEX_CFLAGS="" +- SPEEX_LDFLAGS="" +- SPEEX_LIBS="" +- fi +- AC_SUBST(SPEEX_CFLAGS) +- AC_SUBST(SPEEX_LDFLAGS) +- AC_SUBST(SPEEX_LIBS) +-fi +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -95,14 +95,20 @@ else + fi + AM_CONDITIONAL(BUILD_THEORA, [test x$with_theora = xyes]) + +-XIPH_PATH_SPEEX( +- [ XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$SPEEX_CFLAGS]) +- XIPH_VAR_PREPEND([XIPH_LIBS],[$SPEEX_LIBS]) +- XIPH_VAR_APPEND([XIPH_LDFLAGS],[$SPEEX_LDFLAGS]) +- ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_speex.o" +- ], +- [ AC_MSG_WARN([Speex support disabled!]) +- ]) ++AC_MSG_CHECKING([for libspeex]) ++AC_ARG_WITH(speex, ++ [AS_HELP_STRING([--with-speex], ++ [Use libspeex @<:@default=no@:>@])], ++ [], [with_speex=no]) ++ ++if test "x$with_speex" = "xno"; then ++ AC_MSG_RESULT([Speex support disabled by request]) ++else ++ AC_MSG_RESULT([${with_speex}]) ++ PKG_CHECK_MODULES(SPEEX, speex) ++ AC_DEFINE([HAVE_SPEEX],[1],[Define if Speex support is available]) ++fi ++AM_CONDITIONAL(BUILD_SPEEX, [test x$with_speex = xyes]) + + AC_CHECK_LIB(kate, kate_decode_init,[have_kate=yes],[have_kate=no], -logg) + if test "x$have_kate" == "xyes" +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -19,8 +19,7 @@ icecast_SOURCES = cfgfile.c main.c loggi + format.c format_ogg.c format_mp3.c format_midi.c format_flac.c \ + auth.c auth_htpasswd.c format_kate.c format_skeleton.c + EXTRA_icecast_SOURCES = yp.c \ +- auth_url.c \ +- format_speex.c ++ auth_url.c + + if BUILD_VORBIS + icecast_SOURCES += format_vorbis.c +@@ -28,6 +27,9 @@ endif + if BUILD_THEORA + icecast_SOURCES += format_theora.c + endif ++if BUILD_SPEEX ++icecast_SOURCES += format_speex.c ++endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +@@ -36,12 +38,14 @@ icecast_LDADD = @XSLT_LIBS@ \ + @VORBISFILE_LIBS@ \ + @VORBISENC_LIBS@ \ + @THEORA_LIBS@ \ ++ @SPEEX_LIBS@ \ + $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ + icecast_CFLAGS = @XSLT_CFLAGS@ \ + @VORBIS_CFLAGS@ \ + @VORBISFILE_CFLAGS@ \ + @VORBISENC_CFLAGS@ \ +- @THEORA_CFLAGS@ ++ @THEORA_CFLAGS@ \ ++ @SPEEX_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ diff --git a/patches/icecast-2.3.2/fix_theora_detection.diff b/patches/icecast-2.3.2/fix_theora_detection.diff new file mode 100644 index 0000000..809a3f2 --- /dev/null +++ b/patches/icecast-2.3.2/fix_theora_detection.diff @@ -0,0 +1,160 @@ +From: Juergen Beisert +Subject: Fix libTHEORA detection +Signed-off-by: Juergen Beisert +--- + configure.in | 23 ++++++++++------ + m4/theora.m4 | 77 -------------------------------------------------------- + src/Makefile.am | 9 +++++- + 3 files changed, 22 insertions(+), 87 deletions(-) + +Index: icecast-2.3.2/m4/theora.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/theora.m4 ++++ /dev/null +@@ -1,77 +0,0 @@ +-# Configure paths for libtheora +-# Karl Heyes 02-Feb-2004 +- +-dnl XIPH_PATH_THEORA([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Test for libtheora, and define THEORA_CFLAGS THEORA_LIBS +-dnl +- +-AC_DEFUN([XIPH_PATH_THEORA], +-[ +-AC_REQUIRE([XIPH_PATH_OGG]) +- +-dnl Get the cflags and libraries for theora +-dnl +-AC_ARG_VAR([THEORA],[path to theora installation]) +-AC_ARG_WITH(theora, +- AC_HELP_STRING([--with-theora=PREFIX], +- [Prefix where libtheora is installed (optional)]), +- theora_prefix="$withval", +- theora_prefix="$THEORA_PREFIX" +- ) +- +-if test "x$with_theora" = "xno" +-then +- AC_MSG_RESULT([Theora support disabled by request]) +-else +- if test "x$theora_prefix" = "x" -o "x$theora_prefix" = "xyes"; then +- if test "x$prefix" = "xNONE"; then +- theora_prefix="/usr/local" +- else +- theora_prefix="$prefix" +- fi +- fi +- +- THEORA_CFLAGS="$OGG_CFLAGS" +- THEORA_LDFLAGS="$OGG_LDFLAGS" +- if test "x$theora_prefix" != "x$ogg_prefix"; then +- XIPH_GCC_WARNING(-I"$theora_prefix/include",, +- [THEORA_CFLAGS="$THEORA_CFLAGS -I$theora_prefix/include" +- THEORA_LDFLAGS="-L$theora_prefix/lib $THEORA_LDFLAGS" +- ]) +- fi +- +- THEORA_LIBS="-ltheora -logg" +- +- ac_save_LIBS="$LIBS" +- ac_save_LDFLAGS="$LDFLAGS" +- LDFLAGS="$LDFLAGS $THEORA_LDFLAGS" +- LIBS="$LIBS $THEORA_LIBS" +- AC_MSG_CHECKING([for libtheora]) +- AC_TRY_LINK_FUNC(theora_decode_header, [xt_have_theora="yes"], +- [xt_have_theora="Not found"]) +- if test "x$xt_have_theora" = "xyes" +- then +- AC_TRY_LINK_FUNC(theora_packet_isheader, [xt_have_theora="yes"], +- [xt_have_theora="newer version required"]) +- fi +- +- LIBS="$ac_save_LIBS" +- LDFLAGS="$ac_save_LDFLAGS" +- +- if test "x$xt_have_theora" = "xyes" +- then +- AC_MSG_RESULT([ok]) +- AC_DEFINE([HAVE_THEORA],[1],[Define if Theora support is available]) +- $1 +- else +- THEORA_CFLAGS="" +- THEORA_LDFLAGS="" +- THEORA_LIBS="" +- AC_MSG_RESULT([$xt_have_theora]) +- $2 +- fi +-fi +-AC_SUBST(THEORA_CFLAGS) +-AC_SUBST(THEORA_LDFLAGS) +-AC_SUBST(THEORA_LIBS) +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -79,14 +79,21 @@ else + fi + AM_CONDITIONAL(BUILD_VORBIS, [test x$with_vorbis = xyes]) + +-XIPH_PATH_THEORA([ +- XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS]) +- XIPH_VAR_APPEND([XIPH_LDFLAGS],[$THEORA_LDFLAGS]) +- XIPH_VAR_PREPEND([XIPH_LIBS],[$THEORA_LIBS]) +- ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_theora.o" +- ], +- [ AC_MSG_WARN([Theora disabled!]) +- ]) ++AC_MSG_CHECKING([for libtheora]) ++AC_ARG_WITH(theora, ++ [AS_HELP_STRING([--with-theora], ++ [Use libtheora @<:@default=no@:>@])], ++ [], [with_theora=no]) ++ ++if test "x$with_theora" = "xno"; then ++ AC_MSG_RESULT([Theora support disabled by request]) ++else ++ AC_MSG_RESULT([${with_theora}]) ++ PKG_CHECK_MODULES(THEORA, theora) ++ ++ AC_DEFINE([HAVE_THEORA],[1],[Define if Theora support is available]) ++fi ++AM_CONDITIONAL(BUILD_THEORA, [test x$with_theora = xyes]) + + XIPH_PATH_SPEEX( + [ XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$SPEEX_CFLAGS]) +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -20,11 +20,14 @@ icecast_SOURCES = cfgfile.c main.c loggi + auth.c auth_htpasswd.c format_kate.c format_skeleton.c + EXTRA_icecast_SOURCES = yp.c \ + auth_url.c \ +- format_theora.c format_speex.c ++ format_speex.c + + if BUILD_VORBIS + icecast_SOURCES += format_vorbis.c + endif ++if BUILD_THEORA ++icecast_SOURCES += format_theora.c ++endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +@@ -32,11 +35,13 @@ icecast_LDADD = @XSLT_LIBS@ \ + @VORBIS_LIBS@ \ + @VORBISFILE_LIBS@ \ + @VORBISENC_LIBS@ \ ++ @THEORA_LIBS@ \ + $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ + icecast_CFLAGS = @XSLT_CFLAGS@ \ + @VORBIS_CFLAGS@ \ + @VORBISFILE_CFLAGS@ \ +- @VORBISENC_CFLAGS@ ++ @VORBISENC_CFLAGS@ \ ++ @THEORA_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ diff --git a/patches/icecast-2.3.2/fix_vorbis_detection.diff b/patches/icecast-2.3.2/fix_vorbis_detection.diff new file mode 100644 index 0000000..4273311 --- /dev/null +++ b/patches/icecast-2.3.2/fix_vorbis_detection.diff @@ -0,0 +1,191 @@ +From: Juergen Beisert +Subject: Fix libVORBIS detection +Signed-off-by: Juergen Beisert +--- + configure.in | 26 ++++++++++----- + m4/vorbis.m4 | 92 ------------------------------------------------------- + src/Makefile.am | 17 ++++++++-- + src/format_ogg.c | 2 + + 4 files changed, 34 insertions(+), 103 deletions(-) + +Index: icecast-2.3.2/m4/vorbis.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/vorbis.m4 ++++ /dev/null +@@ -1,92 +0,0 @@ +-# Configure paths for libvorbis +-# Jack Moffitt 10-21-2000 +-# updated by Karl Heyes 31-Mar-2003 +-# Shamelessly stolen from Owen Taylor and Manish Singh +- +-dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +-dnl Test for libvorbis, and define VORBIS_CFLAGS VORBIS_LIBS +-dnl VORBIS_VORBISENC_LIBS VORBIS_VORBISFILE_LIBS VORBIS_LDFLAGS +-dnl +- +-AC_DEFUN([XIPH_PATH_VORBIS], +-[dnl +-AC_REQUIRE([XIPH_PATH_OGG]) +- +-dnl Get the cflags and libraries for vorbis +-dnl +-AC_ARG_VAR([VORBIS_PREFIX],[path to vorbis installation]) +-AC_ARG_WITH(vorbis, +- AC_HELP_STRING([--with-vorbis=PREFIX], +- [Prefix where libvorbis is installed (optional)]), +- vorbis_prefix="$withval", +- vorbis_prefix="$VORBIS_PREFIX" +- ) +-if test "x$vorbis_prefix" = "x" -o "x$vorbis_prefix" = "xyes"; then +- if test "x$prefix" = "xNONE"; then +- vorbis_prefix="/usr/local" +- else +- vorbis_prefix="$prefix" +- fi +-fi +- +-VORBIS_CFLAGS="$OGG_CFLAGS" +-VORBIS_LDFLAGS="$OGG_LDFLAGS" +-if test "x$vorbis_prefix" != "x$ogg_prefix"; then +- XIPH_GCC_WARNING(-I"$vorbis_prefix/include",, +- [VORBIS_CFLAGS="$VORBIS_CFLAGS -I$vorbis_prefix/include" +- VORBIS_LDFLAGS="-L$vorbis_prefix/lib $VORBIS_LDFLAGS" +- ]) +-fi +- +-VORBIS_LIBS="-lvorbis" +-VORBISFILE_LIBS="-lvorbisfile" +-VORBISENC_LIBS="-lvorbisenc" +- +-xt_save_LIBS="$LIBS" +-xt_save_LDFLAGS="$LDFLAGS" +-xt_save_CPPFLAGS="$CPPFLAGS" +-CPPFLAGS="$CPPFLAGS $VORBIS_CFLAGS" +-LDFLAGS="$LDFLAGS $VORBIS_LDFLAGS" +-LIBS="$LIBS $VORBIS_LIBS" +-xt_lib_vorbis="not found" +-AC_MSG_CHECKING([for libvorbis]) +-AC_TRY_LINK_FUNC(ogg_stream_init, [xt_lib_vorbis=ok], +- [LIBS="$LIBS $OGG_LIBS -lm" +- AC_TRY_LINK_FUNC(vorbis_info_init, +- [xt_lib_vorbis=ok +- VORBIS_LIBS="$VORBIS_LIBS $OGG_LIBS -lm"], +- ) +- ]) +- +-if test "x$xt_lib_vorbis" = "xok"; then +-# +-# Now check if the installed Vorbis is sufficiently new. +-# +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +-#include +-#include +- ], [ +-struct ovectl_ratemanage_arg a; +-])],,[xt_lib_vorbis="old version found"]) +-AC_MSG_RESULT([$xt_lib_vorbis]) +-fi +-CPPFLAGS="$xt_save_CPPFLAGS" +-LIBS="$xt_save_LIBS" +-LDFLAGS="$xt_save_LDFLAGS" +- +-if test "x$xt_lib_vorbis" = "xok"; then +- ifelse([$1], ,[:], [$1]) +-else +- VORBIS_CFLAGS="" +- VORBIS_LDFLAGS="" +- VORBIS_LIBS="" +- VORBISFILE_LIBS="" +- VORBISENC_LIBS="" +- ifelse([$2], ,, [$2]) +-fi +-AC_SUBST(VORBIS_CFLAGS) +-AC_SUBST(VORBIS_LDFLAGS) +-AC_SUBST(VORBIS_LIBS) +-AC_SUBST(VORBISFILE_LIBS) +-AC_SUBST(VORBISENC_LIBS) +-]) +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -60,14 +60,24 @@ dnl -- configure options -- + # always required + PKG_CHECK_MODULES(XSLT, libxslt) + +-XIPH_PATH_VORBIS([ +- XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$VORBIS_CFLAGS]) +- XIPH_VAR_PREPEND([XIPH_LIBS],[$VORBIS_LIBS]) +- XIPH_VAR_APPEND([XIPH_LDFLAGS],[$VORBIS_LDFLAGS]) +- ICECAST_OPTIONAL="$ICECAST_OPTIONAL format_vorbis.o" +- ], +- [AC_MSG_ERROR([must have Ogg Vorbis v1.0 or above installed]) +- ]) ++# check for libvorbis ++AC_MSG_CHECKING([for libvorbis]) ++AC_ARG_WITH(vorbis, ++ [AS_HELP_STRING([--with-vorbis], ++ [Use libvorbis @<:@default=no@:>@])], ++ [], [with_vorbis=no]) ++ ++if test x$with_vorbis = xno; then ++ AC_MSG_RESULT([libvorbis support disabled by request]) ++else ++ AC_MSG_RESULT([${with_vorbis}]) ++ PKG_CHECK_MODULES(VORBIS, vorbis) ++ PKG_CHECK_MODULES(VORBISFILE, vorbisfile) ++ PKG_CHECK_MODULES(VORBISENC, vorbisenc) ++ ++ AC_DEFINE([HAVE_VORBIS], [1], [Define if you have libvorbis installed]) ++fi ++AM_CONDITIONAL(BUILD_VORBIS, [test x$with_vorbis = xyes]) + + XIPH_PATH_THEORA([ + XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS]) +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -20,12 +20,23 @@ icecast_SOURCES = cfgfile.c main.c loggi + auth.c auth_htpasswd.c format_kate.c format_skeleton.c + EXTRA_icecast_SOURCES = yp.c \ + auth_url.c \ +- format_vorbis.c format_theora.c format_speex.c ++ format_theora.c format_speex.c ++ ++if BUILD_VORBIS ++icecast_SOURCES += format_vorbis.c ++endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +-icecast_LDADD = $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ @XSLT_LIBS@ +-icecast_CFLAGS = @XSLT_CFLAGS@ ++icecast_LDADD = @XSLT_LIBS@ \ ++ @VORBIS_LIBS@ \ ++ @VORBISFILE_LIBS@ \ ++ @VORBISENC_LIBS@ \ ++ $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ ++icecast_CFLAGS = @XSLT_CFLAGS@ \ ++ @VORBIS_CFLAGS@ \ ++ @VORBISFILE_CFLAGS@ \ ++ @VORBISENC_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ +Index: icecast-2.3.2/src/format_ogg.c +=================================================================== +--- icecast-2.3.2.orig/src/format_ogg.c ++++ icecast-2.3.2/src/format_ogg.c +@@ -222,9 +222,11 @@ static int process_initial_page (format_ + ogg_info->error = 1; + return -1; + } ++#ifdef HAVE_VORBIS + codec = initial_vorbis_page (plugin, page); + if (codec) + break; ++#endif + #ifdef HAVE_THEORA + codec = initial_theora_page (plugin, page); + if (codec) diff --git a/patches/icecast-2.3.2/fix_xml_detection.diff b/patches/icecast-2.3.2/fix_xml_detection.diff new file mode 100644 index 0000000..96888ad --- /dev/null +++ b/patches/icecast-2.3.2/fix_xml_detection.diff @@ -0,0 +1,102 @@ +From: Juergen Beisert +Subject: Fix XSLT detection +Signed-off-by: Juergen Beisert +--- + configure.in | 5 +--- + m4/xiph_xml2.m4 | 58 -------------------------------------------------------- + src/Makefile.am | 3 +- + 3 files changed, 4 insertions(+), 62 deletions(-) + +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -57,9 +57,8 @@ XIPH_NET + + dnl -- configure options -- + +-XIPH_PATH_XSLT +-XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$XSLT_CFLAGS]) +-XIPH_VAR_PREPEND([XIPH_LIBS],[$XSLT_LIBS]) ++# always required ++PKG_CHECK_MODULES(XSLT, libxslt) + + XIPH_PATH_VORBIS([ + XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$VORBIS_CFLAGS]) +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -24,7 +24,8 @@ EXTRA_icecast_SOURCES = yp.c \ + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la +-icecast_LDADD = $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ ++icecast_LDADD = $(icecast_DEPENDENCIES) @XIPH_LIBS@ @KATE_LIBS@ @XSLT_LIBS@ ++icecast_CFLAGS = @XSLT_CFLAGS@ + + AM_CFLAGS = @XIPH_CFLAGS@ + AM_CPPFLAGS = @XIPH_CPPFLAGS@ +Index: icecast-2.3.2/m4/xiph_xml2.m4 +=================================================================== +--- icecast-2.3.2.orig/m4/xiph_xml2.m4 ++++ /dev/null +@@ -1,58 +0,0 @@ +-dnl XIPH_PATH_XML +-dnl Populate XML_CFLAGS and XML_LIBS with infomation for +-dnl linking with libxml2 +-AC_DEFUN([XIPH_PATH_XML], +-[dnl +-AC_MSG_RESULT([checking for XML configuration]) +-AC_ARG_VAR([XMLCONFIG],[XML configuration program]) +-AC_ARG_WITH(xml-config, +- [AC_HELP_STRING([--with-xml-config=PATH], +- [use xml-config in PATH to find libxml])], +- [XMLCONFIG="$withval"], +- [AC_PATH_PROGS(XMLCONFIG, [xml2-config xml-config], "")] +-) +-if test "x$XMLCONFIG" = "x"; then +- AC_MSG_ERROR([XML configuration could not be found]) +-fi +-if ! test -x "$XMLCONFIG"; then +- AC_MSG_ERROR([$XMLCONFIG cannot be executed]) +-fi +-XML_LIBS="$($XMLCONFIG --libs)" +-XML_CFLAGS="$($XMLCONFIG --cflags)" +-ac_xml_save_LIBS="$LIBS" +-ac_xml_save_CFLAGS="$CFLAGS" +-LIBS="$XML_LIBS $LIBS" +-CFLAGS="$CFLAGS $XML_CFLAGS" +-AC_CHECK_FUNC(xmlParseFile,, [AC_MSG_ERROR([Unable to link with libxml])]) +-CFLAGS="$ac_xml_save_CFLAGS" +-LIBS="$ac_xml_save_LIBS" +-]) +- +-dnl XIPH_PATH_XSLT +-dnl Populate XSLT_CFLAGS and XSLT_LIBS with infomation for +-dnl linking with libxml2 +-AC_DEFUN([XIPH_PATH_XSLT], +-[dnl +-AC_ARG_VAR([XSLTCONFIG],[XSLT configuration program]) +-AC_ARG_WITH(xslt-config, +- [AC_HELP_STRING([--with-xslt-config=PATH], +- [use xslt-config in PATH to find libxslt])], +- [XSLTCONFIG="$withval"], +- [AC_PATH_PROGS(XSLTCONFIG, [xslt-config], "")] +-) +-if test "x$XSLTCONFIG" = "x"; then +- AC_MSG_ERROR([XSLT configuration could not be found]) +-fi +-if ! test -x "$XSLTCONFIG"; then +- AC_MSG_ERROR([$XSLTCONFIG cannot be executed]) +-fi +-XSLT_LIBS="$($XSLTCONFIG --libs)" +-XSLT_CFLAGS="$($XSLTCONFIG --cflags)" +-ac_xslt_save_LIBS="$LIBS" +-ac_xslt_save_CFLAGS="$CFLAGS" +-LIBS="$XSLT_LIBS $LIBS" +-CFLAGS="$CFLAGS $XSLT_CFLAGS" +-AC_CHECK_FUNCS([xsltSaveResultToString]) +-CFLAGS="$ac_xslt_save_CFLAGS" +-LIBS="$ac_xslt_save_LIBS" +-]) diff --git a/patches/icecast-2.3.2/fix_yp_handling.diff b/patches/icecast-2.3.2/fix_yp_handling.diff new file mode 100644 index 0000000..69ef3af --- /dev/null +++ b/patches/icecast-2.3.2/fix_yp_handling.diff @@ -0,0 +1,60 @@ +From: Juergen Beisert +Subject: Fix "YP" handling in configure +Signed-off-by: Juergen Beisert +--- + configure.in | 15 ++++++++------- + src/Makefile.am | 4 +++- + 2 files changed, 11 insertions(+), 8 deletions(-) + +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -144,17 +144,18 @@ fi + AM_CONDITIONAL(BUILD_CURL, [test x$with_curl = xyes]) + + dnl -- YP support -- ++AC_MSG_CHECKING([whether YP should be used]) + AC_ARG_ENABLE([yp], + AC_HELP_STRING([--disable-yp],[disable YP directory support]), +- enable_yp="$enableval", +- enable_yp="yes") +-if test "x$enable_yp" = "xyes" -a x$with_curl = xyes +-then +- AC_DEFINE([USE_YP], 1, [Define to compile in YP support code]) +- ICECAST_OPTIONAL="$ICECAST_OPTIONAL yp.o" ++ [], [enable_yp=yes]) ++if test x$enable_yp = xyes -a x$with_curl = xyes; then ++ AC_DEFINE([USE_YP], 1, [Define to compile in YP support code]) + else +- AC_MSG_NOTICE([YP support disabled]) ++ enable_yp="no (missing CURL)" + fi ++AC_MSG_RESULT([${enable_yp}]) ++AM_CONDITIONAL(BUILD_YP, [test "x$enable_yp" = xyes]) ++ + XIPH_PATH_OPENSSL([ + XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$OPENSSL_CFLAGS]) + XIPH_VAR_APPEND([XIPH_LDFLAGS],[$OPENSSL_LDFLAGS]) +Index: icecast-2.3.2/src/Makefile.am +=================================================================== +--- icecast-2.3.2.orig/src/Makefile.am ++++ icecast-2.3.2/src/Makefile.am +@@ -18,7 +18,6 @@ icecast_SOURCES = cfgfile.c main.c loggi + xslt.c fserve.c event.c admin.c md5.c \ + format.c format_ogg.c format_mp3.c format_midi.c format_flac.c \ + auth.c auth_htpasswd.c format_kate.c format_skeleton.c +-EXTRA_icecast_SOURCES = yp.c + + if BUILD_VORBIS + icecast_SOURCES += format_vorbis.c +@@ -32,6 +31,9 @@ endif + if BUILD_CURL + icecast_SOURCES += auth_url.c + endif ++if BUILD_YP ++icecast_SOURCES += yp.c ++endif + + icecast_DEPENDENCIES = @ICECAST_OPTIONAL@ net/libicenet.la thread/libicethread.la \ + httpp/libicehttpp.la log/libicelog.la avl/libiceavl.la timing/libicetiming.la diff --git a/patches/icecast-2.3.2/series b/patches/icecast-2.3.2/series new file mode 100644 index 0000000..6483d31 --- /dev/null +++ b/patches/icecast-2.3.2/series @@ -0,0 +1,10 @@ +use_pkg_config.diff +enabled_silen_rules.diff +fix_xml_detection.diff +fix_vorbis_detection.diff +fix_theora_detection.diff +fix_speex_detection.diff +fix_curl_detection.diff +fix_yp_handling.diff +fix_openssl_detection.diff +fix_ogg_detection.diff diff --git a/patches/icecast-2.3.2/use_pkg_config.diff b/patches/icecast-2.3.2/use_pkg_config.diff new file mode 100644 index 0000000..49daf8c --- /dev/null +++ b/patches/icecast-2.3.2/use_pkg_config.diff @@ -0,0 +1,19 @@ +From: Juergen Beisert +Subject: To use PKG queries in if statements, place the main check on top of all +Signed-off-by: Juergen Beisert +--- + configure.in | 1 + + 1 file changed, 1 insertion(+) + +Index: icecast-2.3.2/configure.in +=================================================================== +--- icecast-2.3.2.orig/configure.in ++++ icecast-2.3.2/configure.in +@@ -26,6 +26,7 @@ else + fi + + dnl Checks for programs. ++PKG_PROG_PKG_CONFIG + + dnl Checks for libraries. + diff --git a/rules/icecast.in b/rules/icecast.in new file mode 100644 index 0000000..cc95309 --- /dev/null +++ b/rules/icecast.in @@ -0,0 +1,50 @@ +## SECTION=applications + +menuconfig ICECAST + tristate + prompt "icecast " + select LIBC_RT + select LIBC_PTHREAD + select LIBC_M + select LIBC_DL + select LIBXSLT + select LIBOGG + select LIBVORBIS if ICECAST_WITH_VORBIS + select LIBTHEORA if ICECAST_WITH_THEORA + select SPEEX if ICECAST_WITH_SPEEX + select LIBCURL if ICECAST_WITH_CURL + select OPENSSL if ICECAST_WITH_SSL + help + Xiph Streaming media server that supports multiple formats. + Icecast is a streaming media server which currently supports Ogg Vorbis + and MP3 audio streams. It can be used to create an Internet radio + station or a privately running jukebox and many things in between. + It is very versatile in that new formats can be added relatively + easily and supports open standards for commuincation and interaction. + +if ICECAST + +config ICECAST_WITH_VORBIS + bool + prompt "with VORBIS" + +config ICECAST_WITH_THEORA + bool + prompt "with THEORA" + +config ICECAST_WITH_SPEEX + bool + prompt "with SPEEX" + +config ICECAST_WITH_CURL + bool + prompt "with CURL" + help + Icecast may be compiled without curl, however this will disable all + directory server interaction (YP). + +config ICECAST_WITH_SSL + bool + prompt "with SSL" + +endif diff --git a/rules/icecast.make b/rules/icecast.make new file mode 100644 index 0000000..9001bd9 --- /dev/null +++ b/rules/icecast.make @@ -0,0 +1,71 @@ +# -*-makefile-*- +# +# Copyright (C) 2012 by Juergen Beisert +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_ICECAST) += icecast + +# +# Paths and names +# +ICECAST_VERSION := 2.3.2 +ICECAST_MD5 := ff516b3ccd2bcc31e68f460cd316093f +ICECAST := icecast-$(ICECAST_VERSION) +ICECAST_SUFFIX := tar.gz +ICECAST_URL := http://downloads.xiph.org/releases/icecast/$(ICECAST).$(ICECAST_SUFFIX) +ICECAST_SOURCE := $(SRCDIR)/$(ICECAST).$(ICECAST_SUFFIX) +ICECAST_DIR := $(BUILDDIR)/$(ICECAST) +ICECAST_LICENSE := GPLv2 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +ICECAST_CONF_TOOL := autoconf +ICECAST_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --enable-shared \ + --disable-static \ + $(GLOBAL_LARGE_FILE_OPTION) \ + --$(call ptx/endis, PTXCONF_ICECAST_WITH_CURL)-yp \ + --$(call ptx/wwo, PTXCONF_ICECAST_WITH_VORBIS)-vorbis \ + --$(call ptx/wwo, PTXCONF_ICECAST_WITH_THEORA)-theora \ + --$(call ptx/wwo, PTXCONF_ICECAST_WITH_SPEEX)-speex \ + --$(call ptx/wwo, PTXCONF_ICECAST_WITH_CURL)-curl \ + --$(call ptx/wwo, PTXCONF_ICECAST_WITH_SSL)-openssl + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/icecast.targetinstall: + @$(call targetinfo) + + @$(call install_init, icecast) + @$(call install_fixup, icecast,PRIORITY,optional) + @$(call install_fixup, icecast,SECTION,base) + @$(call install_fixup, icecast,AUTHOR,"Juergen Beisert ") + @$(call install_fixup, icecast,DESCRIPTION,missing) + + @$(call install_copy, icecast, 0, 0, 0755, -, /usr/bin/icecast) + @$(call install_alternative, icecast, 0, 0, 0644, /etc/icecast.xml) + @$(call install_tree, icecast, 0, 0, -, /usr/share/icecast) + + @$(call install_alternative, icecast, 0, 0, 0755, /etc/init.d/icecast) + +# RAM FS! Makes no sense +# @$(call install_copy, icecast, 65534, 65534, /var/log/icecast) + + @$(call install_finish, icecast) + + @$(call touch) + +# vim: syntax=make -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de