mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
icecast: Rework dependencies
Remove private Tremor. (use libvorbisidec in repo) Remove need for libvorbis (add missing vorbis_comment functions) Remove openSSL (uses mbedTLS via libcurl) Add myself as co-maintainer. Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
@@ -1,104 +1,114 @@
|
||||
--- a/src/format_flac.c
|
||||
+++ b/src/format_flac.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct source_tag source_t;
|
||||
--- a/src/format_midi.c
|
||||
+++ b/src/format_midi.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct source_tag source_t;
|
||||
--- a/src/format_ogg.c
|
||||
+++ b/src/format_ogg.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
|
||||
#include "refbuf.h"
|
||||
#include "source.h"
|
||||
--- a/src/format_ogg.h
|
||||
+++ b/src/format_ogg.h
|
||||
@@ -18,7 +18,7 @@
|
||||
#ifndef __FORMAT_OGG_H__
|
||||
#define __FORMAT_OGG_H__
|
||||
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include "refbuf.h"
|
||||
#include "format.h"
|
||||
|
||||
--- a/src/format_speex.c
|
||||
+++ b/src/format_speex.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include <speex/speex_header.h>
|
||||
|
||||
typedef struct source_tag source_t;
|
||||
--- a/src/format_theora.c
|
||||
+++ b/src/format_theora.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include <theora/theora.h>
|
||||
|
||||
typedef struct source_tag source_t;
|
||||
--- a/src/format_vorbis.c
|
||||
+++ b/src/format_vorbis.c
|
||||
@@ -18,8 +18,8 @@
|
||||
#endif
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
-#include <ogg/ogg.h>
|
||||
#include <ogg/ogg.h>
|
||||
-#include <vorbis/codec.h>
|
||||
+#include <tremor/ogg.h>
|
||||
+#include <tremor/ivorbiscodec.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
|
||||
--- a/src/source.c
|
||||
+++ b/src/source.c
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#include <errno.h>
|
||||
@@ -34,6 +34,7 @@
|
||||
#define CATMODULE "format-vorbis"
|
||||
#include "logging.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
--- a/src/format_kate.c
|
||||
+++ b/src/format_kate.c
|
||||
@@ -19,7 +19,7 @@
|
||||
+int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <ogg/ogg.h>
|
||||
+#include <tremor/ogg.h>
|
||||
#ifdef HAVE_KATE
|
||||
#include <kate/oggkate.h>
|
||||
#endif
|
||||
typedef struct vorbis_codec_tag
|
||||
{
|
||||
@@ -583,3 +584,91 @@ static refbuf_t *process_vorbis_page (og
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+/* Some additional functions from vorbis missing from tremore */
|
||||
+
|
||||
+static void _v_writestring(oggpack_buffer *o,char *s, int bytes)
|
||||
+{
|
||||
+
|
||||
+ while(bytes--){
|
||||
+ oggpack_write(o,*s++,8);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc)
|
||||
+{
|
||||
+ char temp[]="Xiph.Org libVorbis I 20150104";
|
||||
+ int bytes = strlen(temp);
|
||||
+
|
||||
+ /* preamble */
|
||||
+ oggpack_write(opb,0x03,8);
|
||||
+ _v_writestring(opb,"vorbis", 6);
|
||||
+
|
||||
+ /* vendor */
|
||||
+ oggpack_write(opb,bytes,32);
|
||||
+ _v_writestring(opb,temp, bytes);
|
||||
+
|
||||
+ /* comments */
|
||||
+
|
||||
+ oggpack_write(opb,vc->comments,32);
|
||||
+ if(vc->comments){
|
||||
+ int i;
|
||||
+ for(i=0;i<vc->comments;i++){
|
||||
+ if(vc->user_comments[i]){
|
||||
+ oggpack_write(opb,vc->comment_lengths[i],32);
|
||||
+ _v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]);
|
||||
+ }else{
|
||||
+ oggpack_write(opb,0,32);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ oggpack_write(opb,1,1);
|
||||
+
|
||||
+ return(0);
|
||||
+}
|
||||
+
|
||||
+void vorbis_comment_add(vorbis_comment *vc,char *comment)
|
||||
+{
|
||||
+ vc->user_comments=_ogg_realloc(vc->user_comments,
|
||||
+ (vc->comments+2)*sizeof(*vc->user_comments));
|
||||
+ vc->comment_lengths=_ogg_realloc(vc->comment_lengths,
|
||||
+ (vc->comments+2)*sizeof(*vc->comment_lengths));
|
||||
+ vc->comment_lengths[vc->comments]=strlen(comment);
|
||||
+ vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1);
|
||||
+ strcpy(vc->user_comments[vc->comments], comment);
|
||||
+ vc->comments++;
|
||||
+ vc->user_comments[vc->comments]=NULL;
|
||||
+}
|
||||
+
|
||||
+void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *contents)
|
||||
+{
|
||||
+ char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */
|
||||
+ strcpy(comment, tag);
|
||||
+ strcat(comment, "=");
|
||||
+ strcat(comment, contents);
|
||||
+ vorbis_comment_add(vc, comment);
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op)
|
||||
+{
|
||||
+ oggpack_buffer opb;
|
||||
+
|
||||
+ oggpack_writeinit(&opb);
|
||||
+ if(_vorbis_pack_comment(&opb,vc)){
|
||||
+ oggpack_writeclear(&opb);
|
||||
+ return OV_EIMPL;
|
||||
+ }
|
||||
+
|
||||
+ op->packet = _ogg_malloc(oggpack_bytes(&opb));
|
||||
+ memcpy(op->packet, opb.buffer, oggpack_bytes(&opb));
|
||||
+
|
||||
+ op->bytes=oggpack_bytes(&opb);
|
||||
+ op->b_o_s=0;
|
||||
+ op->e_o_s=0;
|
||||
+ op->granulepos=0;
|
||||
+ op->packetno=1;
|
||||
+
|
||||
+ oggpack_writeclear(&opb);
|
||||
+ return 0;
|
||||
+}
|
||||
--- a/m4/vorbis.m4
|
||||
+++ b/m4/vorbis.m4
|
||||
@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_pref
|
||||
@@ -144,12 +154,3 @@
|
||||
|
||||
#
|
||||
# check if the installed Ogg is sufficiently new.
|
||||
@@ -42,7 +42,7 @@ LIBS="$LIBS $OGG_LIBS"
|
||||
LDFLAGS="$LDFLAGS $OGG_LDFLAGS"
|
||||
AC_TRY_LINK_FUNC(ogg_sync_init,
|
||||
[ xt_cv_lib_ogg=ok ],
|
||||
- [ AC_TRY_LINK([#include <ogg/ogg.h>],,
|
||||
+ [ AC_TRY_LINK([#include <tremor/ogg.h>],,
|
||||
[ xt_cv_lib_ogg="pre v1.0, needs updating" ],
|
||||
[ xt_cv_lib_ogg="not found" ])
|
||||
])
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -3,7 +3,7 @@
|
||||
AUTOMAKE_OPTIONS = foreign dist-zip
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
-SUBDIRS = src conf doc web admin win32 examples
|
||||
+SUBDIRS = src conf web admin
|
||||
|
||||
EXTRA_DIST = HACKING m4/acx_pthread.m4 m4/ogg.m4 \
|
||||
m4/theora.m4 m4/vorbis.m4 m4/speex.m4 \
|
||||
@@ -11,7 +11,7 @@ EXTRA_DIST = HACKING m4/acx_pthread.m4 m
|
||||
m4/xiph_types.m4 m4/xiph_xml2.m4
|
||||
|
||||
docdir = $(datadir)/doc/$(PACKAGE)
|
||||
-doc_DATA = README AUTHORS COPYING NEWS TODO ChangeLog
|
||||
+doc_DATA = README AUTHORS COPYING
|
||||
|
||||
debug:
|
||||
$(MAKE) all CFLAGS="@DEBUG@"
|
||||
@@ -0,0 +1,25 @@
|
||||
--- a/m4/xiph_openssl.m4
|
||||
+++ b/m4/xiph_openssl.m4
|
||||
@@ -30,13 +30,15 @@ else
|
||||
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 <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
|
||||
-CFLAGS="$xt_save_CFLAGS"
|
||||
-LIBS="$xt_save_LIBS"
|
||||
+if test "x$openssl_prefix" != "xno"; then
|
||||
+ xt_save_CFLAGS="$CFLAGS"
|
||||
+ xt_save_LIBS="$LIBS"
|
||||
+ CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
|
||||
+ LIBS="$OPENSSL_LIBS $LIBS"
|
||||
+ AC_TRY_LINK([#include <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
|
||||
+ CFLAGS="$xt_save_CFLAGS"
|
||||
+ LIBS="$xt_save_LIBS"
|
||||
+fi
|
||||
|
||||
if test "$openssl_ok" = "yes"; then
|
||||
AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.])
|
||||
Reference in New Issue
Block a user