diff --git a/debian/patches/Makefile-portaudio.patch b/debian/patches/Makefile-portaudio.patch index 10b1c01..627d358 100644 --- a/debian/patches/Makefile-portaudio.patch +++ b/debian/patches/Makefile-portaudio.patch @@ -5,26 +5,42 @@ Author: Chris Boot Forwarded: no -Last-Update: 2013-12-08 +Last-Update: 2013-12-28 --- a/Makefile +++ b/Makefile -@@ -1,6 +1,6 @@ +@@ -1,12 +1,13 @@ # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... - CFLAGS += -Wall $(OPTS) --LDFLAGS += -lasound -lpthread -lm -lrt -+LDFLAGS += -lpthread -lm -lrt + CFLAGS ?= -Wall -fPIC -O2 +-LDADD ?= -lasound -lpthread -lm -lrt ++LDADD ?= -lpthread -lm -lrt EXECUTABLE ?= squeezelite - SOURCES = main.c slimproto.c utils.c output.c buffer.c stream.c decode.c process.c resample.c flac.c pcm.c mad.c vorbis.c faad.c mpg.c ffmpeg.c -@@ -23,6 +23,12 @@ + # 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 + +@@ -21,6 +22,8 @@ + SOURCES_VIS = output_vis.c + + LINK_LINUX = -ldl ++LINK_ALSA = -lasound ++LINK_PORTAUDIO = -lportaudio + + LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123 + LINKALL_FF = -lavcodec -lavformat -lavutil +@@ -60,6 +63,12 @@ endif endif -+ifneq (,$(findstring -DPORTAUDIO, $(CFLAGS))) -+ LDFLAGS += -lportaudio ++ifneq (,$(findstring $(OPT_PORTAUDIO), $(OPTS))) ++ LDADD += $(LINK_PORTAUDIO) +else -+ LDFLAGS += -lasound ++ LDADD += $(LINK_ALSA) +endif + OBJECTS = $(SOURCES:.c=.o)