summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch')
-rw-r--r--media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch b/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch
new file mode 100644
index 000000000..5bcc70d61
--- /dev/null
+++ b/media-libs/zita-resampler/files/zita-resampler-1.6.0-Makefile.patch
@@ -0,0 +1,90 @@
+diff --git a/apps/Makefile b/apps/Makefile
+index f009937..42f7125 100644
+--- a/apps/Makefile
++++ b/apps/Makefile
+@@ -18,6 +18,7 @@
+ # ----------------------------------------------------------------------------
+
+
++CXX ?= g++
+ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+ LIBDIR = lib$(SUFFIX)
+@@ -25,26 +26,26 @@ DISTDIR = zresample-$(VERSION)
+ VERSION = 1.6.0
+ MANDIR = /usr/share/man/man1
+ LDFLAGS += -L$(PREFIX)/$(LIBDIR)
+-CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\"
+-CXXFLAGS += -O3 -ffast-math -Wall
+-CXXFLAGS += -march=native
++CPPFLAGS += -MMD -MP -DVERSION=\"$(VERSION)\" -I../libs
++CXXFLAGS += -ffast-math -Wall
++
+
+
+ all: zresample zretune zresample.1.gz zretune.1.gz
+
+
+ ZRESAMPLE_O = zresample.o audiofile.o dither.o
+-zresample: LDLIBS += -lzita-resampler -lsndfile -lrt
++zresample: LDLIBS += ../libs/libzita-resampler.so.$(VERSION) -lsndfile -lrt
+ zresample: $(ZRESAMPLE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRESAMPLE_O) $(LDLIBS)
+ $(ZRESAMPLE_O):
+ -include $(ZRESAMPLE_O:%.o=%.d)
+
+
+ ZRETUNE_O = zretune.o audiofile.o dither.o
+-zretune: LDLIBS += -lzita-resampler -lsndfile -lrt
++zretune: LDLIBS += ../libs/libzita-resampler.so.$(VERSION) -lsndfile -lrt
+ zretune: $(ZRETUNE_O)
+- g++ $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
++ $(CXX) $(LDFLAGS) -o $@ $(ZRETUNE_O) $(LDLIBS)
+ $(ZRETUNE_O):
+ -include $(ZRETUNE_O:%.o=%.d)
+
+diff --git a/libs/Makefile b/libs/Makefile
+index 15b0471..62867b9 100644
+--- a/libs/Makefile
++++ b/libs/Makefile
+@@ -20,9 +20,10 @@
+
+ # Modify as required.
+ #
++CXX ?= g++
+ PREFIX = /usr/local
+ SUFFIX := $(shell uname -m | sed -e 's/^unknown/$//' -e 's/^i.86/$//' -e 's/^x86_64/$/64/')
+-LIBDIR = lib$(SUFFIX)
++LIBDIR ?= lib$(SUFFIX)
+
+ MAJVERS = 1
+ MINVERS = 6.0
+@@ -31,8 +32,7 @@ DISTDIR = zita-resampler-$(VERSION)
+
+
+ CPPFLAGS += -I. -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
+-CXXFLAGS += -Wall -fPIC -O2 -ffast-math
+-CXXFLAGS += -march=native
++CXXFLAGS += -Wall -fPIC -ffast-math
+ LDFLAGS +=
+ LDLIBS +=
+
+@@ -47,7 +47,7 @@ ZITA-RESAMPLER_H = zita-resampler/resampler.h zita-resampler/resampler-table.h \
+
+
+ $(ZITA-RESAMPLER_MIN): $(ZITA-RESAMPLER_O)
+- g++ -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
++ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(ZITA-RESAMPLER_MAJ) -o $(ZITA-RESAMPLER_MIN) $(ZITA-RESAMPLER_O) $(ZITA-RESAMPLER_DEP)
+
+ $(ZITA-RESAMPLER_O): $(ZITA-RESAMPLER_H)
+
+@@ -58,7 +58,7 @@ install: $(ZITA-RESAMPLER_MIN)
+ install -m 644 $(ZITA-RESAMPLER_H) $(DESTDIR)$(PREFIX)/include/zita-resampler
+ install -m 644 $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ ln -sf $(ZITA-RESAMPLER_MIN) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(ZITA-RESAMPLER_SO)
+- ldconfig
++ /sbin/ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
+
+ uninstall:
+ /bin/rm -rf $(DESTDIR)$(PREFIX)/include/zita-resampler