[SCM] pd-readanysf/master: renamed CFLAGS to protect them from being overwritten

zmoelnig-guest at users.alioth.debian.org zmoelnig-guest at users.alioth.debian.org
Thu Feb 10 12:45:28 UTC 2011


The following commit has been merged in the master branch:
commit 1405c080a56df3e9ab93da14a8bff2331aa9c0da
Author: IOhannes m zmölnig <zmoelnig at iem.at>
Date:   Thu Feb 10 13:34:24 2011 +0100

    renamed CFLAGS to protect them from being overwritten

diff --git a/debian/patches/makefile-CFLAGS.patch b/debian/patches/makefile-CFLAGS.patch
new file mode 100644
index 0000000..bdd94c0
--- /dev/null
+++ b/debian/patches/makefile-CFLAGS.patch
@@ -0,0 +1,90 @@
+Author: IOhannes m zmölnig
+Description: build-system might set the CFLAGS/LDFLAGS variables from
+outside, which will make make ignore the flags set inside the makefile
+(and thus fail); this patch renames CFLAGS to PD_CXXFLAGS (it's c++ after 
+all), likewise LDFLAGS
+
+--- pd-readanysf.orig/Makefile
++++ pd-readanysf/Makefile
+@@ -20,42 +20,44 @@
+ ##############################################
+ LBITS := $(shell getconf LONG_BIT)
+ ifeq ($(LBITS),64)
+-   # do 64 bit stuff here, like set some CFLAGS
+-CFLAGS =  -fPIC -I./  -I$(GAVLPATH) -I$(GAVLPATH)/gavl -I$(GAVLPATH)/gmerlin -I$(PDPATH) -Wall
++   # do 64 bit stuff here, like set some PD_CXXFLAGS
++PD_CXXFLAGS =  -fPIC -I./  -I$(GAVLPATH) -I$(GAVLPATH)/gavl -I$(GAVLPATH)/gmerlin -I$(PDPATH) -Wall
+ else
+    # do 32 bit stuff here
+-CFLAGS =  -I./  -I$(GAVLPATH)  -I$(GAVLPATH)/gavl -I$(GAVLPATH)/gmerlin -I$(PDPATH) -Wall
++PD_CXXFLAGS =  -I./  -I$(GAVLPATH)  -I$(GAVLPATH)/gavl -I$(GAVLPATH)/gmerlin -I$(PDPATH) -Wall
+ endif
+ 
+ 
+ ifeq ($(UNAME), Linux)
+ STRIP=strip --strip-unneeded
+ # optimizations?
+-#CFLAGS += -O1 -funroll-loops -fomit-frame-pointer \
++#PD_CXXFLAGS += -O1 -funroll-loops -fomit-frame-pointer \
+ #    -Wall -W -Wshadow \
+ #    -Wno-unused -Wno-parentheses -Wno-switch
+-LDFLAGS =  -L/usr/local/lib -lpthread  -lgavl -lgmerlin_avdec 
++PD_LDFLAGS =  -L/usr/local/lib -lpthread  -lgavl -lgmerlin_avdec 
+ else
+ # assume darwin here
+ STRIP=strip -x
+-CFLAGS += -I/sw/include -fast -fPIC
+-LDFLAGS = -bundle -undefined dynamic_lookup -L/sw/lib -lgavl -lgmerlin_avdec
+-#LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -undefined dynamic_lookup \
++PD_CXXFLAGS += -I/sw/include -fast -fPIC
++PD_LDFLAGS = -bundle -undefined dynamic_lookup -L/sw/lib -lgavl -lgmerlin_avdec
++#PD_LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -undefined dynamic_lookup \
+ #		-L/sw/lib -weak_framework Carbon -lc -L/sw/lib -lgavl -lgmerlin_avdec  
+ # os 10.4
+-#CFLAGS += -mmacosx-version-min=10.4  -arch i386  -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
+-#LDFLAGS =  -L/sw/lib -lgavl -lgmerlin_avdec \
++#PD_CXXFLAGS += -mmacosx-version-min=10.4  -arch i386  -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
++#PD_LDFLAGS =  -L/sw/lib -lgavl -lgmerlin_avdec \
+ #        -dynamiclib -undefined dynamic_lookup  -lsupc++ -mmacosx-version-min=10.4 \
+ #        -lSystem.B -arch i386  -isysroot /Developer/SDKs/MacOSX10.4u.sdk 
+ endif
+ 
+ 
++PD_CXXFLAGS += $(CXXFLAGS)
++PD_LDFLAGS += $(LDFLAGS)
+ 
+ 
+ all: $(TARGET) 
+ 
+ pd_linux: src/readanysf~.cpp  objs/FifoVideoFrames.o objs/FifoAudioFrames.o objs/ReadMedia.o
+-	g++  -shared  -o  readanysf~.pd_linux  $(CFLAGS) $(LDFLAGS) \
++	g++  -shared  -o  readanysf~.pd_linux  $(PD_CXXFLAGS) $(PD_LDFLAGS) \
+ 	src/readanysf~.cpp \
+ 	objs/FifoAudioFrames.o \
+ 	objs/FifoVideoFrames.o \
+@@ -63,7 +65,7 @@
+ 	$(STRIP) readanysf~.pd_linux
+ 
+ pd_darwin: src/readanysf~.cpp  objs/FifoVideoFrames.o objs/FifoAudioFrames.o objs/ReadMedia.o
+-	g++  $(LDFLAGS)  -o  readanysf~.pd_darwin  $(CFLAGS)  \
++	g++  $(PD_LDFLAGS)  -o  readanysf~.pd_darwin  $(PD_CXXFLAGS)  \
+ 	src/readanysf~.cpp \
+ 	objs/FifoAudioFrames.o \
+ 	objs/FifoVideoFrames.o \
+@@ -79,13 +81,13 @@
+ 	gzip readanysf~$(VERSION)_MacOSX-Intel.tar
+ 
+ objs/ReadMedia.o: src/ReadMedia.cpp src/ReadMedia.h objs/FifoAudioFrames.o objs/FifoVideoFrames.o objs/
+-	g++  -c -o objs/ReadMedia.o src/ReadMedia.cpp $(CFLAGS)
++	g++  -c -o objs/ReadMedia.o src/ReadMedia.cpp $(PD_CXXFLAGS)
+ 
+ objs/FifoAudioFrames.o: src/FifoAudioFrames.cpp src/FifoAudioFrames.h objs/
+-	g++  -c -o objs/FifoAudioFrames.o src/FifoAudioFrames.cpp $(CFLAGS)
++	g++  -c -o objs/FifoAudioFrames.o src/FifoAudioFrames.cpp $(PD_CXXFLAGS)
+ 
+ objs/FifoVideoFrames.o: src/FifoVideoFrames.cpp src/FifoVideoFrames.h objs/
+-	g++  -c -o objs/FifoVideoFrames.o src/FifoVideoFrames.cpp $(CFLAGS)
++	g++  -c -o objs/FifoVideoFrames.o src/FifoVideoFrames.cpp $(PD_CXXFLAGS)
+ 
+ clean:
+ 	if [ -d readanysf~$(VERSION)_MacOSX-Intel ]; then rm -rf readanysf~$(VERSION)_MacOSX-Intel; fi; 
diff --git a/debian/patches/series b/debian/patches/series
index 746143b..cf662db 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 makefile-objs-dir.patch
+makefile-CFLAGS.patch

-- 
pd-readanysf packaging



More information about the pkg-multimedia-commits mailing list