diff --git a/debian/patches/Makefile-portaudio.patch b/debian/patches/Makefile-portaudio.patch deleted file mode 100644 index 4df29d0..0000000 --- a/debian/patches/Makefile-portaudio.patch +++ /dev/null @@ -1,48 +0,0 @@ -Description: Simplify building of PortAudio based binary - -This Makefile patch conditionally adds libasound or libportaudio to the build -flags depending on whether -DPORTAUDIO is included in CFLAGS. - -Author: Chris Boot -Forwarded: no -Last-Update: 2013-12-28 - ---- a/Makefile -+++ b/Makefile -@@ -1,12 +1,13 @@ - # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... - CFLAGS ?= -Wall -fPIC -O2 --LDADD ?= -lasound -lpthread -lm -lrt -+LDADD ?= -lpthread -lm -lrt - EXECUTABLE ?= squeezelite - - # passing one or more of these in $(OPTS) enables optional feature inclusion - OPT_DSD = -DDSD - OPT_FF = -DFFMPEG - OPT_LINKALL = -DLINKALL -+OPT_PORTAUDIO = -DPORTAUDIO - OPT_RESAMPLE= -DRESAMPLE - OPT_VIS = -DVISEXPORT - OPT_IR = -DIR -@@ -23,6 +24,8 @@ - SOURCES_IR = ir.c - - LINK_LINUX = -ldl -+LINK_ALSA = -lasound -+LINK_PORTAUDIO = -lportaudio - - LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123 - LINKALL_FF = -lavcodec -lavformat -lavutil -@@ -69,6 +72,12 @@ - endif - endif - -+ifneq (,$(findstring $(OPT_PORTAUDIO), $(OPTS))) -+ LDADD += $(LINK_PORTAUDIO) -+else -+ LDADD += $(LINK_ALSA) -+endif -+ - OBJECTS = $(SOURCES:.c=.o) - - all: $(EXECUTABLE) diff --git a/debian/patches/Makefile-tweaks.patch b/debian/patches/Makefile-tweaks.patch deleted file mode 100644 index e76ce7f..0000000 --- a/debian/patches/Makefile-tweaks.patch +++ /dev/null @@ -1,87 +0,0 @@ -Description: Makefile tweaks for hardening build options - This patch changes the Makefile to add options to CFLAGS and LDFLAGS instead of - overriding the values from the environment, and ensures that CPPFLAGS is also - used when building C source. -Author: Chris Boot -Forwarded: not-needed -Last-Update: 2013-12-28 - ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,6 @@ - # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... --CFLAGS ?= -Wall -fPIC -O2 $(OPTS) --LDFLAGS ?= -lasound -lpthread -lm -lrt -+CFLAGS ?= -Wall -fPIC -O2 -+LDADD ?= -lasound -lpthread -lm -lrt - EXECUTABLE ?= squeezelite - - # passing one or more of these in $(OPTS) enables optional feature inclusion -@@ -34,38 +34,38 @@ - UNAME = $(shell uname -s) - - # add optional sources --ifneq (,$(findstring $(OPT_DSD), $(CFLAGS))) -+ifneq (,$(findstring $(OPT_DSD), $(OPTS))) - SOURCES += $(SOURCES_DSD) - endif --ifneq (,$(findstring $(OPT_FF), $(CFLAGS))) -+ifneq (,$(findstring $(OPT_FF), $(OPTS))) - SOURCES += $(SOURCES_FF) - endif --ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS))) -+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS))) - SOURCES += $(SOURCES_RESAMPLE) - endif --ifneq (,$(findstring $(OPT_VIS), $(CFLAGS))) -+ifneq (,$(findstring $(OPT_VIS), $(OPTS))) - SOURCES += $(SOURCES_VIS) - endif --ifneq (,$(findstring $(OPT_IR), $(CFLAGS))) -+ifneq (,$(findstring $(OPT_IR), $(OPTS))) - SOURCES += $(SOURCES_IR) - endif - - # add optional link options --ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS))) -- LDFLAGS += $(LINKALL) --ifneq (,$(findstring $(OPT_FF), $(CFLAGS))) -- LDFLAGS += $(LINKALL_FF) -+ifneq (,$(findstring $(OPT_LINKALL), $(OPTS))) -+ LDADD += $(LINKALL) -+ifneq (,$(findstring $(OPT_FF), $(OPTS))) -+ LDADD += $(LINKALL_FF) - endif --ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS))) -- LDFLAGS += $(LINKALL_RESAMPLE) -+ifneq (,$(findstring $(OPT_RESAMPLE), $(OPTS))) -+ LDADD += $(LINKALL_RESAMPLE) - endif --ifneq (,$(findstring $(OPT_IR), $(CFLAGS))) -- LDFLAGS += $(LINKALL_IR) -+ifneq (,$(findstring $(OPT_IR), $(OPTS))) -+ LDADD += $(LINKALL_IR) - endif - else - # if not LINKALL and linux add LINK_LINUX - ifeq ($(UNAME), Linux) -- LDFLAGS += $(LINK_LINUX) -+ LDADD += $(LINK_LINUX) - endif - endif - -@@ -74,12 +74,12 @@ - all: $(EXECUTABLE) - - $(EXECUTABLE): $(OBJECTS) -- $(CC) $(OBJECTS) $(LDFLAGS) -o $@ -+ $(CC) $(OBJECTS) $(LDFLAGS) $(LDADD) -o $@ - - $(OBJECTS): $(DEPS) - - .c.o: -- $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(OPTS) $< -c -o $@ - - clean: - rm -f $(OBJECTS) $(EXECUTABLE) diff --git a/debian/patches/ffmpeg4.0.patch b/debian/patches/ffmpeg4.0.patch deleted file mode 100644 index e4a0fa8..0000000 --- a/debian/patches/ffmpeg4.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -Description: Fix FTBFS with FFmpeg 4.0 -Author: James Cowgill -Bug-Debian: https://bugs.debian.org/888335 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/ffmpeg.c -+++ b/ffmpeg.c -@@ -264,7 +264,7 @@ static decode_state ff_decode(void) { - ff->mmsh_bytes_left = ff->mmsh_bytes_pad = ff->mmsh_packet_len = 0; - - if (!ff->readbuf) { -- ff->readbuf = AV(ff, malloc, READ_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); -+ ff->readbuf = AV(ff, malloc, READ_SIZE + AV_INPUT_BUFFER_PADDING_SIZE); - } - - avio = AVIO(ff, alloc_context, ff->readbuf, READ_SIZE, 0, NULL, _read_data, NULL, NULL); diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch deleted file mode 100644 index 002759c..0000000 --- a/debian/patches/ffmpeg_2.9.patch +++ /dev/null @@ -1,49 +0,0 @@ -Description: Replace deprecated FFmpeg API -Author: Andreas Cadhalpun -Last-Update: <2015-11-02> - ---- squeezelite-1.8.orig/ffmpeg.c -+++ squeezelite-1.8/ffmpeg.c -@@ -52,8 +52,8 @@ struct ff_s { - unsigned (* avcodec_version)(void); - AVCodec * (* avcodec_find_decoder)(int); - int attribute_align_arg (* avcodec_open2)(AVCodecContext *, const AVCodec *, AVDictionary **); -- AVFrame * (* avcodec_alloc_frame)(void); -- void (* avcodec_free_frame)(AVFrame **); -+ AVFrame * (* av_frame_alloc)(void); -+ void (* av_frame_free)(AVFrame **); - int attribute_align_arg (* avcodec_decode_audio4)(AVCodecContext *, AVFrame *, int *, const AVPacket *); - // ffmpeg symbols to be dynamically loaded from libavformat - unsigned (* avformat_version)(void); -@@ -324,7 +324,7 @@ static decode_state ff_decode(void) { - - AVCODEC(ff, open2, ff->codecC, codec, NULL); - -- ff->frame = AVCODEC(ff, alloc_frame); -+ ff->frame = AV(ff, frame_alloc); - - ff->avpkt = AV(ff, malloc, sizeof(AVPacket)); - if (ff->avpkt == NULL) { -@@ -520,9 +520,9 @@ static void _free_ff_data(void) { - if (ff->frame) { - // ffmpeg version dependant free function - #if !LINKALL -- ff->avcodec_free_frame ? AVCODEC(ff, free_frame, &ff->frame) : AV(ff, freep, &ff->frame); -+ ff->av_frame_free ? AV(ff, frame_free, &ff->frame) : AV(ff, freep, &ff->frame); - #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54,28,0) -- AVCODEC(ff, free_frame, &ff->frame); -+ AV(ff, frame_free, &ff->frame); - #else - AV(ff, freep, &ff->frame); - #endif -@@ -607,8 +607,8 @@ static bool load_ff() { - ff->avcodec_version = dlsym(handle_codec, "avcodec_version"); - ff->avcodec_find_decoder = dlsym(handle_codec, "avcodec_find_decoder"); - ff->avcodec_open2 = dlsym(handle_codec, "avcodec_open2"); -- ff->avcodec_alloc_frame = dlsym(handle_codec, "avcodec_alloc_frame"); -- ff->avcodec_free_frame = dlsym(handle_codec, "avcodec_free_frame"); -+ ff->av_frame_alloc = dlsym(handle_codec, "av_frame_alloc"); -+ ff->av_frame_free = dlsym(handle_codec, "av_frame_free"); - ff->avcodec_decode_audio4 = dlsym(handle_codec, "avcodec_decode_audio4"); - ff->av_init_packet = dlsym(handle_codec, "av_init_packet"); - ff->av_free_packet = dlsym(handle_codec, "av_free_packet"); diff --git a/debian/patches/series b/debian/patches/series index a8609c3..f74a4c9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1 @@ -Makefile-tweaks.patch -Makefile-portaudio.patch -ffmpeg_2.9.patch rename-logs.patch -ffmpeg4.0.patch