diff options
author | Zaheer Abbas Merali <zaheermerali@gmail.com> | 2015-01-13 15:48:17 -0800 |
---|---|---|
committer | Zaheer Abbas Merali <zaheermerali@gmail.com> | 2015-01-13 15:48:17 -0800 |
commit | b87cd09ce8ff24014c29209e4b47e383198a286b (patch) | |
tree | e98eb186a21dc2a50b557931e2ce420273f282ef | |
parent | 7f5c8cc13136f99ff8e0c10db38bce2d8ecc1685 (diff) |
openh264: Move to v 1.3.1 of openh264
-rw-r--r-- | recipes/openh264.recipe | 7 | ||||
-rw-r--r-- | recipes/openh264/0001-Add-version-suffix.patch | 65 | ||||
-rw-r--r-- | recipes/openh264/0001-Set-LDFLAGS-after-the-object-files-in-shared-library.patch | 46 | ||||
-rw-r--r-- | recipes/openh264/versioned-shared-library.patch | 158 |
4 files changed, 68 insertions, 208 deletions
diff --git a/recipes/openh264.recipe b/recipes/openh264.recipe index 9f4ba42f..52d901d6 100644 --- a/recipes/openh264.recipe +++ b/recipes/openh264.recipe @@ -5,7 +5,7 @@ from cerbero.utils import shell class Recipe(recipe.Recipe): name = 'openh264' - version = '1.1' + version = '1.3.1' url = 'https://github.com/cisco/%(name)s/archive/v%(version)s.tar.gz' stype = SourceType.TARBALL btype = BuildType.MAKEFILE @@ -14,8 +14,7 @@ class Recipe(recipe.Recipe): # https://github.com/cisco/openh264/pull/1566 # However, upstream didn't want the library to be versioned on Android, so # we'll need to carry forward that bit for ourselves. - patches = [name + '/versioned-shared-library.patch', - name + '/0001-Set-LDFLAGS-after-the-object-files-in-shared-library.patch'] + patches = [name + '/0001-Add-version-suffix.patch'] files_libs = ['libopenh264'] files_devel = ['include/wels'] @@ -59,7 +58,7 @@ class Recipe(recipe.Recipe): # Fix hard-coded prefix {'PREFIX=/usr/local': "PREFIX=" + self.config.prefix}) shell.replace(os.path.join(self.build_dir, 'build', - 'platform-x86-common.mk'), + 'x86-common.mk'), # Use yasm instead of nasm, since that's what Cerbero # ships with {'ASM = nasm': "ASM = yasm"}) diff --git a/recipes/openh264/0001-Add-version-suffix.patch b/recipes/openh264/0001-Add-version-suffix.patch new file mode 100644 index 00000000..42924f75 --- /dev/null +++ b/recipes/openh264/0001-Add-version-suffix.patch @@ -0,0 +1,65 @@ +From 18b2d54c3ed52506ca31bb48a1516bb08d92eadd Mon Sep 17 00:00:00 2001 +From: Zaheer Abbas Merali <zaheermerali@gmail.com> +Date: Tue, 13 Jan 2015 11:15:25 -0800 +Subject: [PATCH] Add version suffix + +--- + Makefile | 2 +- + build/platform-android.mk | 5 +++-- + build/platform-freebsd.mk | 1 + + build/platform-linux.mk | 1 + + 4 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 4fa3095..3b9ff8b 100644 +--- a/Makefile ++++ b/Makefile +@@ -181,7 +181,7 @@ endif + endif + + ifneq (ios, $(OS)) +-libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) ++libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) + else + libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) + endif +diff --git a/build/platform-android.mk b/build/platform-android.mk +index aab007d..e95d270 100644 +--- a/build/platform-android.mk ++++ b/build/platform-android.mk +@@ -1,9 +1,10 @@ + ARCH = arm + include $(SRC_PATH)build/arch.mk ++SHAREDLIB_DIR = $(PREFIX)/lib + SHAREDLIBSUFFIX = so + # Android APK/JARs expect libraries to be unversioned +-SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX) +-SHLDFLAGS = ++SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) ++SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) + NDKLEVEL = 12 + ifeq ($(ARCH), arm) + ifneq ($(APP_ABI), armeabi) +diff --git a/build/platform-freebsd.mk b/build/platform-freebsd.mk +index 49be825..3d0feaa 100644 +--- a/build/platform-freebsd.mk ++++ b/build/platform-freebsd.mk +@@ -1,4 +1,5 @@ + include $(SRC_PATH)build/arch.mk ++SHAREDLIB_DIR = $(PREFIX)/lib + SHAREDLIBSUFFIX = so + SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) + SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) +diff --git a/build/platform-linux.mk b/build/platform-linux.mk +index bb0dd84..e98b972 100644 +--- a/build/platform-linux.mk ++++ b/build/platform-linux.mk +@@ -1,4 +1,5 @@ + include $(SRC_PATH)build/arch.mk ++SHAREDLIB_DIR = $(PREFIX)/lib + SHAREDLIBSUFFIX = so + SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) + SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) +-- +1.9.1 + diff --git a/recipes/openh264/0001-Set-LDFLAGS-after-the-object-files-in-shared-library.patch b/recipes/openh264/0001-Set-LDFLAGS-after-the-object-files-in-shared-library.patch deleted file mode 100644 index 95b8a6ef..00000000 --- a/recipes/openh264/0001-Set-LDFLAGS-after-the-object-files-in-shared-library.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 699ca1e0be3131b7fe55e38f218e379f146d55e6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st> -Date: Wed, 22 Oct 2014 09:40:16 +0300 -Subject: [PATCH] Set LDFLAGS after the object files in shared library linking - commands - -This makes sure that the built libopenh264.so actually links to -libpthread.so. ---- - Makefile | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 35f83b1..ed24a38 100644 ---- a/Makefile -+++ b/Makefile -@@ -174,7 +174,7 @@ $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROC - - $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) - $(QUIET)rm -f $@ -- $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) -+ $(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) - if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \ - ln -sfn $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) \ - $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX); \ -@@ -191,7 +191,7 @@ endif - - $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) - $(QUIET)rm -f $@ -- $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(MODULE_LDFLAGS) -+ $(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS) - - install-headers: - mkdir -p $(PREFIX)/include/wels -@@ -236,7 +236,7 @@ $(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $ - LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX) - $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) - $(QUIET)rm -f $@ -- $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) -+ $(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(CODEC_UNITTEST_LDFLAGS) - - binaries: codec_unittest$(EXEEXT) - BINARIES += codec_unittest$(EXEEXT) --- -2.1.4 - diff --git a/recipes/openh264/versioned-shared-library.patch b/recipes/openh264/versioned-shared-library.patch deleted file mode 100644 index 1c2b3c99..00000000 --- a/recipes/openh264/versioned-shared-library.patch +++ /dev/null @@ -1,158 +0,0 @@ -From cbde1a7ecad2f01208432d79f4f4ffa509918187 Mon Sep 17 00:00:00 2001 -From: Nirbheek Chauhan <nirbheek@centricular.com> -Date: Thu, 13 Nov 2014 18:48:33 +0530 -Subject: [PATCH] Makefile: Fix shared library building on various OSes - -Has to be versioned on OS != Windows, and should create .dll.a on Windows ---- - Makefile | 27 ++++++++++++++++++++------- - build/platform-android.mk | 3 +++ - build/platform-darwin.mk | 5 +++++ - build/platform-freebsd.mk | 3 +++ - build/platform-linux.mk | 3 +++ - build/platform-mingw_nt.mk | 3 +++ - 6 files changed, 37 insertions(+), 7 deletions(-) - -diff --git a/Makefile b/Makefile -index dfb0c93..7b34482 100644 ---- a/Makefile -+++ b/Makefile -@@ -46,8 +46,9 @@ CFLAGS += -fsanitize=address - LDFLAGS += -fsanitize=address - endif - --include build/platform-$(OS).mk -+SHAREDLIBVERSION=0 - -+include build/platform-$(OS).mk - - CFLAGS += - LDFLAGS += -@@ -168,20 +169,24 @@ endif - endif - - ifneq (ios, $(OS)) --libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) -+libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - else - libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) - endif - --LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) -+LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - - $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) - $(QUIET)rm -f $@ - $(QUIET_AR)$(AR) $(AR_OPTS) $+ - --$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) -+$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) - $(QUIET)rm -f $@ - $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) -+ if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \ -+ ln -sfn $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) \ -+ $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX); \ -+ fi - - ifeq ($(HAVE_GMP_API),Yes) - plugin: $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX) -@@ -192,7 +197,7 @@ plugin: - @echo "You do not have gmp-api. Run make gmp-bootstrap to get the gmp-api headers." - endif - --$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) -+$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS) - $(QUIET)rm -f $@ - $(QUIET_CXX)$(CXX) $(SHARED) $(LDFLAGS) $(CXX_LINK_O) $+ $(SHLDFLAGS) $(MODULE_LDFLAGS) - -@@ -204,9 +209,17 @@ install-static: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers - mkdir -p $(PREFIX)/lib - install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(PREFIX)/lib - --install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers -+install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) install-headers - mkdir -p $(PREFIX)/lib -- install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(PREFIX)/lib -+ mkdir -p $(PREFIX)/bin -+ install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) $(SHAREDLIB_DIR) -+ if [ -L $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) ]; then \ -+ cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(SHAREDLIB_DIR); \ -+ fi -+ if [ -f $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX).a ]; then \ -+ install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX).a \ -+ $(PREFIX)/lib; \ -+ fi - ifneq ($(EXTRA_LIBRARY),) - install -m 644 $(EXTRA_LIBRARY) $(PREFIX)/lib - endif -diff --git a/build/platform-android.mk b/build/platform-android.mk -index 31c5737..3e96701 100644 ---- a/build/platform-android.mk -+++ b/build/platform-android.mk -@@ -1,6 +1,9 @@ - ARCH = arm - include build/platform-arch.mk -+SHAREDLIB_DIR = $(PREFIX)/lib - SHAREDLIBSUFFIX = so -+SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) -+SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - NDKLEVEL = 12 - ifeq ($(ARCH), arm) - ifneq ($(APP_ABI), armeabi) -diff --git a/build/platform-darwin.mk b/build/platform-darwin.mk -index 40a0314..6b3ba63 100644 ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -1,5 +1,10 @@ - include build/platform-arch.mk -+SHAREDLIB_DIR = $(PREFIX)/lib - SHAREDLIBSUFFIX = dylib -+SHAREDLIBSUFFIXVER=$(SHAREDLIBVERSION).$(SHAREDLIBSUFFIX) -+SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ -+ -fno-common -headerpad_max_install_names -install_name \ -+ $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - SHARED = -dynamiclib - CFLAGS += -Wall -fPIC -MMD -MP - LDFLAGS += -lpthread -diff --git a/build/platform-freebsd.mk b/build/platform-freebsd.mk -index 66e2efd..272db46 100644 ---- a/build/platform-freebsd.mk -+++ b/build/platform-freebsd.mk -@@ -1,5 +1,8 @@ - include build/platform-arch.mk -+SHAREDLIB_DIR = $(PREFIX)/lib - SHAREDLIBSUFFIX = so -+SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) -+SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - CFLAGS += -fPIC - LDFLAGS += -lpthread - ifeq ($(ASM_ARCH), x86) -diff --git a/build/platform-linux.mk b/build/platform-linux.mk -index 4427d37..3eb00f2 100644 ---- a/build/platform-linux.mk -+++ b/build/platform-linux.mk -@@ -1,5 +1,8 @@ - include build/platform-arch.mk -+SHAREDLIB_DIR = $(PREFIX)/lib - SHAREDLIBSUFFIX = so -+SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION) -+SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) - CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP - LDFLAGS += -lpthread - ifeq ($(ASM_ARCH), x86) -diff --git a/build/platform-mingw_nt.mk b/build/platform-mingw_nt.mk -index e1c3771..90321ad 100644 ---- a/build/platform-mingw_nt.mk -+++ b/build/platform-mingw_nt.mk -@@ -1,5 +1,8 @@ - include build/platform-x86-common.mk -+SHAREDLIB_DIR = $(PREFIX)/bin - SHAREDLIBSUFFIX = dll -+SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX) -+SHLDFLAGS = -Wl,--out-implib,$(LIBPREFIX)$(PROJECT_NAME).dll.a - CFLAGS += -MMD -MP - LDFLAGS += - ifeq ($(ENABLE64BIT), Yes) --- -2.1.0 - |