[SCM] handbrake/master: Set LDFLAGS in debian/rules instead of hard-coding them.
fabian-guest at users.alioth.debian.org
fabian-guest at users.alioth.debian.org
Mon Jun 11 08:22:58 UTC 2012
The following commit has been merged in the master branch:
commit c2f3f972331db489d9935abf080ee31841d74ccf
Author: Fabian Greffrath <fabian at greffrath.com>
Date: Mon Jun 11 10:25:16 2012 +0200
Set LDFLAGS in debian/rules instead of hard-coding them.
diff --git a/debian/patches/0003-Remove-embedded-downloaded-copies-of-various-librari.patch b/debian/patches/0003-Remove-embedded-downloaded-copies-of-various-librari.patch
index c2bd0d4..123a111 100644
--- a/debian/patches/0003-Remove-embedded-downloaded-copies-of-various-librari.patch
+++ b/debian/patches/0003-Remove-embedded-downloaded-copies-of-various-librari.patch
@@ -30,15 +30,6 @@ Signed-off-by: Rogério Theodoro de Brito <rbrito at ime.usp.br>
-lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype
endif
-@@ -108,7 +108,7 @@
- -mwindows -Wl,--export-dynamic -Wl,--exclude-libs,ALL
- else
- ghb_LDFLAGS = \
-- -Wl,--export-dynamic -Wl,--exclude-libs,ALL
-+ -Wl,--export-dynamic -Wl,--exclude-libs,ALL -Wl,-z,defs -Wl,--as-needed
- endif
-
- ghb_LDADD = $(HB_LIBS) $(GHB_LIBS)
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -8,8 +8,6 @@
diff --git a/debian/patches/0010-Remove-FAAC-dependency.patch b/debian/patches/0010-Remove-FAAC-dependency.patch
index ea8fdc7..69b60c9 100644
--- a/debian/patches/0010-Remove-FAAC-dependency.patch
+++ b/debian/patches/0010-Remove-FAAC-dependency.patch
@@ -24,6 +24,24 @@ to enter Debian.
13 files changed, 13 insertions(+), 362 deletions(-)
delete mode 100644 libhb/encfaac.c
+--- a/gtk/src/Makefile.am
++++ b/gtk/src/Makefile.am
+@@ -3,13 +3,13 @@
+ if MINGW
+ HB_LIBS= \
+ -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
+- -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
++ -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
+ -lx264 -lmp4v2 -lswscale -ltheora -lz \
+ -lbz2 -liberty -lpthreadGC2 -lbluray -lass -lfontconfig -lfreetype
+ else
+ HB_LIBS= \
+ -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
+- -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
++ -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
+ -lx264 -lmp4v2 -lswscale -ltheoraenc -ltheoradec -lz -lxml2 \
+ -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype
+ endif
--- a/gtk/src/audiohandler.c
+++ b/gtk/src/audiohandler.c
@@ -72,7 +72,7 @@
@@ -563,34 +581,12 @@ to enter Debian.
case HB_ACODEC_LAME: return hb_get_work( WORK_ENCLAME );
case HB_ACODEC_VORBIS: return hb_get_work( WORK_ENCVORBIS );
case HB_ACODEC_CA_AAC: return hb_get_work( WORK_ENC_CA_AAC );
---- a/gtk/src/Makefile.am
-+++ b/gtk/src/Makefile.am
-@@ -3,13 +3,13 @@
- if MINGW
- HB_LIBS= \
- -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
-- -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
-+ -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
- -lx264 -lmp4v2 -lswscale -ltheora -lz \
- -lbz2 -liberty -lpthreadGC2 -lbluray -lass -lfontconfig -lfreetype
- else
- HB_LIBS= \
- -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
-- -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
-+ -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
- -lx264 -lmp4v2 -lswscale -ltheoraenc -ltheoradec -lz -lxml2 \
- -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype
- endif
--- a/test/module.defs
+++ b/test/module.defs
-@@ -9,10 +9,9 @@
-
+@@ -10,7 +10,7 @@
TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI)
--TEST.libs = $(LIBHB.a) $(foreach n, \
-- $(CONTRIB.build/)lib/lib$(n).a )
-+TEST.libs = $(LIBHB.a)
-
+ TEST.libs = $(LIBHB.a)
-TEST.libs += -lass -lfaac -lmp3lame -lsamplerate -lvorbisenc -ltheoraenc -ltheoradec -lvorbis -lx264 -lmkv -lz -lbz2 -lpthread -ldl -lmp4v2 -lxml2 -ldca -la52 -lbluray -lavcodec -lavformat -lavutil -lswscale -lmpeg2 -ldvdnav -ldvdread
+TEST.libs += -lass -lmp3lame -lsamplerate -lvorbisenc -ltheoraenc -ltheoradec -lvorbis -lx264 -lmkv -lz -lbz2 -lpthread -ldl -lmp4v2 -lxml2 -ldca -la52 -lbluray -lavcodec -lavformat -lavutil -lswscale -lmpeg2 -ldvdnav -ldvdread
diff --git a/debian/patches/0012-FLAGS.patch b/debian/patches/0012-FLAGS.patch
index 3358399..7a4cf20 100644
--- a/debian/patches/0012-FLAGS.patch
+++ b/debian/patches/0012-FLAGS.patch
@@ -1,9 +1,20 @@
Author: Fabian Greffrath <fabian+debian at greffrath.com>
Subject: Consider CFLAGS, CPPFLAGS and LDFLAGS in libhb build.
+--- a/gtk/module.rules
++++ b/gtk/module.rules
+@@ -17,7 +17,7 @@
+ $(GTK.CONFIGURE.extra) \
+ PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig \
+ CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \
+- LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O) " \
++ LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe) " \
+ --prefix=$(PREFIX) \
+ --with-hb=$(call fn.ABSOLUTE,$(BUILD/))
+ $(TOUCH.exe) $@
--- a/make/include/gcc.defs
+++ b/make/include/gcc.defs
-@@ -67,15 +67,15 @@ GCC.args.L = -L$(1)
+@@ -67,15 +67,15 @@
GCC.args.l = -l$(1)
GCC.args.end = -Wl,--end-group
@@ -13,14 +24,14 @@ Subject: Consider CFLAGS, CPPFLAGS and LDFLAGS in libhb build.
GCC.args.extra.c_o =
-GCC.args.extra.dylib =
-GCC.args.extra.exe =
-+GCC.args.extra.dylib = $(LDFLAGS) -Wl,-z,defs -Wl,--as-needed
-+GCC.args.extra.exe = $(LDFLAGS) -Wl,-z,defs -Wl,--as-needed
++GCC.args.extra.dylib = $(LDFLAGS)
++GCC.args.extra.exe = $(LDFLAGS)
GCC.args.extra.hpp_o =
GCC.args.extra.cpp_o =
-GCC.args.extra.dylib++ =
-GCC.args.extra.exe++ =
-+GCC.args.extra.dylib++ = $(LDFLAGS) -Wl,-z,defs -Wl,--as-needed
-+GCC.args.extra.exe++ = $(LDFLAGS) -Wl,-z,defs -Wl,--as-needed
++GCC.args.extra.dylib++ = $(LDFLAGS)
++GCC.args.extra.exe++ = $(LDFLAGS)
###############################################################################
diff --git a/debian/rules b/debian/rules
index 41308b3..721684c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,7 @@ CXX:=ccache $(CXX)
CFLAGS = $(shell dpkg-buildflags --get CFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')
CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')
+LDFLAGS += -Wl,-z,defs -Wl,--as-needed
%:
dh $@ --builddirectory=build
@@ -16,7 +17,7 @@ override_dh_auto_configure:
./configure --prefix=/usr --build build \
--gcc=/usr/lib/ccache/gcc \
CC="$(CC)" CXX="$(CXX)" \
- CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"
+ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"
override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
--
handbrake packaging
More information about the pkg-multimedia-commits
mailing list