Radix cross Linux

Radix Linux distribution for embedded systems.

637 Commits   4 Branches   3 Tags
author: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-17 13:45:07 +0000 committer: Andrey V.Kosteltsev <kx@radix.pro> 2016-10-17 13:45:07 +0000 commit: 1f83418228d9402a282f2120207a01adfcfaa1e9 parent: 4be8884d42e533c72eb658d3bc0e82f7ebca9b4a
Commit Summary:
OpenH264 - Cisco H.264 implementation
Diffstat:
14 files changed, 794 insertions, 1 deletion
diff --git a/libs/openh264/1.6.0-x86_32/Makefile b/libs/openh264/1.6.0-x86_32/Makefile
new file mode 100644
index 000000000..4e58741d6
--- /dev/null
+++ b/libs/openh264/1.6.0-x86_32/Makefile
@@ -0,0 +1,168 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC64)
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+CREATE_X86_32_PACKAGE = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/m/VideoLAN/x264
+
+REQUIRES           = libs/openh264/1.6.0
+REQUIRES          += libs/glibc/2.23-x86_32
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 1.6.0
+tar_xz_archive     = $(SRC_PACKAGE_PATH)/packages/m/openh264/openh264-$(version).tar.xz
+SRC_ARCHIVE        = $(tar_xz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/openh264-$(version)
+src_dir_name       = openh264-$(version)
+doc_dir_name       = openh264-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+OPENH264_32_PKG_NAME                = openh264-x32
+OPENH264_32_PKG_VERSION             = 1.6.0
+OPENH264_32_PKG_ARCH                = $(TOOLCHAIN)
+OPENH264_32_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+OPENH264_32_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+OPENH264_32_PKG_GROUP               = $(PKG_GROUP)
+###                                  |---handy-ruler-------------------------------|
+OPENH264_32_PKG_SHORT_DESCRIPTION   = Cisco H.264 implementation
+OPENH264_32_PKG_URL                 = $(BUG_URL)
+OPENH264_32_PKG_LICENSE             = BSD
+OPENH264_32_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(OPENH264_32_PKG_NAME)-pkg-description
+OPENH264_32_PKG_DESCRIPTION_FILE_IN = $(OPENH264_32_PKG_NAME)-pkg-description.in
+OPENH264_32_PKG_INSTALL_SCRIPT      = $(OPENH264_32_PKG_NAME)-pkg-install.sh
+
+OPENH264_32_PKG   = $(CURDIR)/$(TARGET_BUILD_DIR)/$(OPENH264_32_PKG_NAME)-package
+
+pkg_basename      = $(OPENH264_32_PKG_NAME)-$(OPENH264_32_PKG_VERSION)-$(OPENH264_32_PKG_ARCH)-$(OPENH264_32_PKG_DISTRO_NAME)-$(OPENH264_32_PKG_DISTRO_VERSION)
+
+pkg_archive       = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature     = $(call sign-name,$(pkg_archive))
+pkg_description   = $(call desc-name,$(pkg_archive))
+products          = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS     = $(build_target)
+BUILD_TARGETS    += $(install_target)
+
+PRODUCT_TARGETS   = $(products)
+
+ROOTFS_TARGETS    = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(OPENH264_32_PKG)
+
+
+ENABLE_X86_NASM = no
+
+
+TARGET_LIB_RPATH = /lib$(MULTILIB_X86_32_SUFFIX):/usr/lib$(MULTILIB_X86_32_SUFFIX):/usr/lib/../lib$(MULTILIB_X86_32_SUFFIX)
+
+
+ARCH = i386
+ARCH_INCLUDES = x86
+
+
+h264_environment  = OS=linux
+h264_environment += ARCH=$(ARCH)
+
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC64)),)
+ifneq ($(ENABLE_X86_NASM),yes)
+h264_environment += USE_ASM=No
+endif
+endif
+
+h264_environment += PREFIX=/usr
+h264_environment += LIBDIR_NAME=lib$(MULTILIB_X86_32_SUFFIX)
+h264_environment += SHAREDLIB_DIR=/usr/lib$(MULTILIB_X86_32_SUFFIX)
+
+h264_environment += CC='$(CROSS_PREFIX)gcc'
+h264_environment += CXX='$(CROSS_PREFIX)g++'
+h264_environment += CCAS='$(CROSS_PREFIX)gcc'
+h264_environment += LD='$(CROSS_PREFIX)ld'
+h264_environment += AR='$(CROSS_PREFIX)ar'
+h264_environment += STRIP='$(CROSS_PREFIX)strip'
+
+h264_environment += SRC_PATH='$(CURDIR)/$(SRC_DIR)/'
+
+h264_environment += CFLAGS_OPT='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -m32 -fPIC -Wno-parentheses'
+h264_environment += ASMFLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 $(CFLAGS) $(ARCH_FLAGS) -I$(CURDIR)/$(SRC_DIR)/codec/common/$(ARCH_INCLUDES)'
+h264_environment += LDFLAGS='--sysroot=$(TARGET_DEST_DIR) -m32 -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(LIBSUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) -lpthread -lstdc++'
+
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) $(h264_environment)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(OPENH264_32_PKG)/usr/bin/32
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot) $(h264_environment)
+	@( cd $(SRC_DIR) ; \
+	   cp -a h264{enc,dec} $(OPENH264_32_PKG)/usr/bin/32 ; \
+	 )
+	@rm -rf $(OPENH264_32_PKG)/usr/include
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(OPENH264_32_PKG))
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(MULTILIB_X86_32_SUFFIX)/pkgconfig ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" openh264.pc ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(OPENH264_32_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+	@touch $@
+
+$(OPENH264_32_PKG_DESCRIPTION_FILE): $(OPENH264_32_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(OPENH264_32_PKG_DESCRIPTION_FILE) $(OPENH264_32_PKG_INSTALL_SCRIPT)
+	@cp $(OPENH264_32_PKG_DESCRIPTION_FILE) $(OPENH264_32_PKG)/.DESCRIPTION
+	@cp $(OPENH264_32_PKG_INSTALL_SCRIPT) $(OPENH264_32_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(OPENH264_32_PKG)/.REQUIRES
+	@echo "pkgname=$(OPENH264_32_PKG_NAME)"                            >  $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(OPENH264_32_PKG_VERSION)"                          >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "arch=$(OPENH264_32_PKG_ARCH)"                               >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "distroname=$(OPENH264_32_PKG_DISTRO_NAME)"                  >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "distrover=$(OPENH264_32_PKG_DISTRO_VERSION)"                >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "group=$(OPENH264_32_PKG_GROUP)"                             >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(OPENH264_32_PKG_SHORT_DESCRIPTION)\"" >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "url=$(OPENH264_32_PKG_URL)"                                 >> $(OPENH264_32_PKG)/.PKGINFO ; \
+	 echo "license=$(OPENH264_32_PKG_LICENSE)"                         >> $(OPENH264_32_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(OPENH264_32_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/openh264/1.6.0-x86_32/PATCHES b/libs/openh264/1.6.0-x86_32/PATCHES
new file mode 100644
index 000000000..bc5603f28
--- /dev/null
+++ b/libs/openh264/1.6.0-x86_32/PATCHES
@@ -0,0 +1,2 @@
+
+../../../sources/packages/m/openh264/patches/openh264-1.6.0-make.patch -p0
diff --git a/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-description.in b/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-description.in
new file mode 100644
index 000000000..380d81852
--- /dev/null
+++ b/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+            |-----handy-ruler------------------------------------------------------|
+openh264-x32: openh264-x32 @VERSION@ (x86_32 Cisco H.264 implementation)
+openh264-x32:
+openh264-x32: OpenH264 is a codec library which supports H.264 encoding and
+openh264-x32: decoding. It is suitable for use in real time applications such
+openh264-x32: as WebRTC.
+openh264-x32:
+openh264-x32:
+openh264-x32: Homepage: http://www.openh264.org
+openh264-x32:
+openh264-x32:
+openh264-x32:
diff --git a/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-install.sh b/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-install.sh
new file mode 100755
index 000000000..8e8683cd6
--- /dev/null
+++ b/libs/openh264/1.6.0-x86_32/openh264-x32-pkg-install.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/libs/openh264/1.6.0/Makefile b/libs/openh264/1.6.0/Makefile
new file mode 100644
index 000000000..98e71cbc5
--- /dev/null
+++ b/libs/openh264/1.6.0/Makefile
@@ -0,0 +1,231 @@
+
+COMPONENT_TARGETS  = $(HARDWARE_PC32)
+COMPONENT_TARGETS += $(HARDWARE_PC64)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXQ)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BT1)
+
+
+NEED_ABS_PATH      = true
+COMPONENT_IS_3PP   = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES    = sources/packages/m/openh264
+
+ifeq ($(__USE_BUILT_GCC_LIBS__),yes)
+REQUIRES           = dev/gcc/5.3.0
+else
+REQUIRES          += libs/glibc/2.23
+endif
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version            = 1.6.0
+tar_xz_archive     = $(SRC_PACKAGE_PATH)/packages/m/openh264/openh264-$(version).tar.xz
+SRC_ARCHIVE        = $(tar_xz_archive)
+SRC_DIR            = $(TARGET_BUILD_DIR)/openh264-$(version)
+src_dir_name       = openh264-$(version)
+doc_dir_name       = openh264-$(version)
+src_done           = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target       = $(TARGET_BUILD_DIR)/.build_done
+install_target     = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = libs
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+OPENH264_PKG_NAME                = openh264
+OPENH264_PKG_VERSION             = 1.6.0
+OPENH264_PKG_ARCH                = $(TOOLCHAIN)
+OPENH264_PKG_DISTRO_NAME         = $(DISTRO_NAME)
+OPENH264_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
+OPENH264_PKG_GROUP               = $(PKG_GROUP)
+###                               |---handy-ruler-------------------------------|
+OPENH264_PKG_SHORT_DESCRIPTION   = Cisco H.264 implementation
+OPENH264_PKG_URL                 = $(BUG_URL)
+OPENH264_PKG_LICENSE             = BSD
+OPENH264_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(OPENH264_PKG_NAME)-pkg-description
+OPENH264_PKG_DESCRIPTION_FILE_IN = $(OPENH264_PKG_NAME)-pkg-description.in
+OPENH264_PKG_INSTALL_SCRIPT      = $(OPENH264_PKG_NAME)-pkg-install.sh
+
+OPENH264_PKG     = $(CURDIR)/$(TARGET_BUILD_DIR)/$(OPENH264_PKG_NAME)-package
+
+pkg_basename     = $(OPENH264_PKG_NAME)-$(OPENH264_PKG_VERSION)-$(OPENH264_PKG_ARCH)-$(OPENH264_PKG_DISTRO_NAME)-$(OPENH264_PKG_DISTRO_VERSION)
+
+pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_signature    = $(call sign-name,$(pkg_archive))
+pkg_description  = $(call desc-name,$(pkg_archive))
+products         = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS    = $(build_target)
+BUILD_TARGETS   += $(install_target)
+
+PRODUCT_TARGETS  = $(products)
+
+ROOTFS_TARGETS   = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(OPENH264_PKG)
+
+
+ENABLE_X86_NASM = no
+
+
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+ifneq ($(filter $(HARDWARE),$(HARDWARE_CB1X)      \
+                            $(HARDWARE_CB2X)      \
+                            $(HARDWARE_CB3X)      \
+                            $(HARDWARE_FFRK3288)  \
+                            $(HARDWARE_M201)      \
+                            $(HARDWARE_MXQ)       \
+                            $(HARDWARE_NIT6Q)     \
+                            $(HARDWARE_OMAP5UEVM) \
+                            $(HARDWARE_DRA7XXEVM)),)
+ARCH = arm
+ARCH_INCLUDES = arm
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC32)),)
+ARCH = i386
+ARCH_INCLUDES = x86
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC64)),)
+ARCH = x86_64
+ARCH_INCLUDES = x86
+endif
+ifneq ($(filter $(HARDWARE),$(HARDWARE_CI20) $(HARDWARE_BT1)),)
+ARCH = mips
+ARCH_INCLUDES =
+endif
+
+
+h264_environment  = OS=linux
+h264_environment += ARCH=$(ARCH)
+
+ifneq ($(filter $(HARDWARE),$(HARDWARE_PC32) $(HARDWARE_PC64)),)
+ifneq ($(ENABLE_X86_NASM),yes)
+h264_environment += USE_ASM=No
+endif
+endif
+
+h264_environment += PREFIX=/usr
+h264_environment += LIBDIR_NAME=lib$(LIBSUFFIX)
+h264_environment += SHAREDLIB_DIR=/usr/lib$(LIBSUFFIX)
+
+h264_environment += CC='$(CROSS_PREFIX)gcc'
+h264_environment += CXX='$(CROSS_PREFIX)g++'
+h264_environment += CCAS='$(CROSS_PREFIX)gcc'
+h264_environment += LD='$(CROSS_PREFIX)ld'
+h264_environment += AR='$(CROSS_PREFIX)ar'
+h264_environment += STRIP='$(CROSS_PREFIX)strip'
+
+h264_environment += SRC_PATH='$(CURDIR)/$(SRC_DIR)/'
+
+h264_environment += CFLAGS_OPT='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) $(ARCH_DEFS) $(HW_FLAGS) -fPIC -Wno-parentheses'
+h264_environment += ASMFLAGS='--sysroot=$(TARGET_DEST_DIR) $(CFLAGS) $(ARCH_FLAGS) -I$(CURDIR)/$(SRC_DIR)/codec/common/$(ARCH_INCLUDES)'
+h264_environment += LDFLAGS='--sysroot=$(TARGET_DEST_DIR) -Wl,-rpath,$(TARGET_LIB_RPATH) -L$(TARGET_DEST_DIR)/lib$(LIBSUFFIX) -L$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) -lpthread -lstdc++'
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+	$(UNPACK_SRC_ARCHIVE)
+	$(APPLY_PATCHES)
+	@touch $@
+
+$(build_target): $(src_done)
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) $(h264_environment)
+	@touch $@
+
+$(install_target): $(build_target)
+	@mkdir -p $(OPENH264_PKG)/usr/bin
+	@cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot) $(h264_environment)
+	@( cd $(SRC_DIR) ; \
+	   cp -a h264{enc,dec} $(OPENH264_PKG)/usr/bin ; \
+	 )
+	# ======= Install Documentation =======
+	@if [ -d $(OPENH264_PKG)/usr/share/man ]; then \
+	  ( cd $(OPENH264_PKG)/usr/share/man ; \
+	    for manpagedir in `find . -type d -name "man*"` ; do \
+	      ( cd $$manpagedir ; \
+	        for eachpage in `find . -type l -maxdepth 1` ; do \
+	          ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+	          rm $$eachpage ; \
+	        done ; \
+	        gzip -9 *.?  ; \
+	      ) \
+	    done \
+	  ) \
+	 fi
+	@mkdir -p $(OPENH264_PKG)/usr/doc/$(src_dir_name)
+	@cp -a $(SRC_DIR)/CONTRIBUTORS $(SRC_DIR)/LICENSE \
+	       $(OPENH264_PKG)/usr/doc/$(src_dir_name)
+	@mkdir -p $(OPENH264_PKG)/usr/share/doc/$(src_dir_name)
+	@( cd $(SRC_DIR) ; \
+	   cp -a CONTRIBUTORS LICENSE README.md RELEASES gmpopenh264.info \
+	         $(OPENH264_PKG)/usr/share/doc/$(src_dir_name) ; \
+	 )
+	@( cd $(SRC_DIR) ; \
+	   if [ -r ChangeLog ]; then \
+	     DOCSDIR=`echo $(OPENH264_PKG)/usr/share/doc/$(src_dir_name)` ; \
+	     cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+	     touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+	   fi \
+	 )
+	# ======= Install the same to $(TARGET_DEST_DIR) =======
+	$(call install-into-devenv, $(OPENH264_PKG))
+	# ======= tune pkg-config *.pc search path to the target destination for development =======
+	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" openh264.pc ; \
+	 )
+	# ======= Strip binaries =======
+	@( cd $(OPENH264_PKG) ; \
+	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+	   find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null \
+	 )
+	@touch $@
+
+$(OPENH264_PKG_DESCRIPTION_FILE): $(OPENH264_PKG_DESCRIPTION_FILE_IN)
+	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_signature)   : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(OPENH264_PKG_DESCRIPTION_FILE) $(OPENH264_PKG_INSTALL_SCRIPT)
+	@cp $(OPENH264_PKG_DESCRIPTION_FILE) $(OPENH264_PKG)/.DESCRIPTION
+	@cp $(OPENH264_PKG_INSTALL_SCRIPT) $(OPENH264_PKG)/.INSTALL
+	@$(BUILD_PKG_REQUIRES) $(OPENH264_PKG)/.REQUIRES
+	@echo "pkgname=$(OPENH264_PKG_NAME)"                            >  $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "pkgver=$(OPENH264_PKG_VERSION)"                          >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "arch=$(OPENH264_PKG_ARCH)"                               >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "distroname=$(OPENH264_PKG_DISTRO_NAME)"                  >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "distrover=$(OPENH264_PKG_DISTRO_VERSION)"                >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "group=$(OPENH264_PKG_GROUP)"                             >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "short_description=\"$(OPENH264_PKG_SHORT_DESCRIPTION)\"" >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "url=$(OPENH264_PKG_URL)"                                 >> $(OPENH264_PKG)/.PKGINFO ; \
+	 echo "license=$(OPENH264_PKG_LICENSE)"                         >> $(OPENH264_PKG)/.PKGINFO
+	@$(FAKEROOT) sh -c "cd $(OPENH264_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."
diff --git a/libs/openh264/1.6.0/PATCHES b/libs/openh264/1.6.0/PATCHES
new file mode 100644
index 000000000..bc5603f28
--- /dev/null
+++ b/libs/openh264/1.6.0/PATCHES
@@ -0,0 +1,2 @@
+
+../../../sources/packages/m/openh264/patches/openh264-1.6.0-make.patch -p0
diff --git a/libs/openh264/1.6.0/openh264-pkg-description.in b/libs/openh264/1.6.0/openh264-pkg-description.in
new file mode 100644
index 000000000..a45da2e32
--- /dev/null
+++ b/libs/openh264/1.6.0/openh264-pkg-description.in
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.  Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in.  You must
+# make exactly 11 lines for the formatting to be correct.  It's also
+# customary to leave one space after the ':'.
+
+        |-----handy-ruler------------------------------------------------------|
+openh264: openh264 @VERSION@ (Cisco H.264 implementation)
+openh264:
+openh264: OpenH264 is a codec library which supports H.264 encoding and
+openh264: decoding. It is suitable for use in real time applications such
+openh264: as WebRTC.
+openh264:
+openh264:
+openh264: Homepage: http://www.openh264.org
+openh264:
+openh264:
+openh264:
diff --git a/libs/openh264/1.6.0/openh264-pkg-install.sh b/libs/openh264/1.6.0/openh264-pkg-install.sh
new file mode 100755
index 000000000..b44c4e648
--- /dev/null
+++ b/libs/openh264/1.6.0/openh264-pkg-install.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+  NEW="$1"
+  OLD="`dirname $NEW`/`basename $NEW .new`"
+  # If there's no file by that name, mv it over:
+  if [ ! -r $OLD ]; then
+    mv $NEW $OLD
+  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+    rm $NEW
+  fi
+  # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+
+# arg 1:  the new package version
+pre_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+post_install() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+pre_update() {
+  /bin/true
+}
+
+# arg 1:  the new package version
+# arg 2:  the old package version
+post_update() {
+  post_install
+}
+
+# arg 1:  the old package version
+pre_remove() {
+  /bin/true
+}
+
+# arg 1:  the old package version
+post_remove() {
+  /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
diff --git a/sources/packages/m/openh264/Makefile b/sources/packages/m/openh264/Makefile
new file mode 100644
index 000000000..dea1e605f
--- /dev/null
+++ b/sources/packages/m/openh264/Makefile
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/m/openh264
+
+versions    = 1.6.0
+pkgname     = openh264
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/openh264-1.6.0-make.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) -i & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-1.6.0-make-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
diff --git a/sources/packages/m/openh264/create-1.6.0-make-patch/create.patch.sh b/sources/packages/m/openh264/create-1.6.0-make-patch/create.patch.sh
new file mode 100755
index 000000000..477fd2eec
--- /dev/null
+++ b/sources/packages/m/openh264/create-1.6.0-make-patch/create.patch.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.6.0
+
+tar --files-from=file.list -xJvf ../openh264-$VERSION.tar.xz
+mv openh264-$VERSION openh264-$VERSION-orig
+
+cp -rf ./openh264-$VERSION-new ./openh264-$VERSION
+
+diff -b --unified -Nr  openh264-$VERSION-orig  openh264-$VERSION > openh264-$VERSION-make.patch
+
+mv openh264-$VERSION-make.patch ../patches
+
+rm -rf ./openh264-$VERSION
+rm -rf ./openh264-$VERSION-orig
diff --git a/sources/packages/m/openh264/create-1.6.0-make-patch/file.list b/sources/packages/m/openh264/create-1.6.0-make-patch/file.list
new file mode 100644
index 000000000..18cd78f3d
--- /dev/null
+++ b/sources/packages/m/openh264/create-1.6.0-make-patch/file.list
@@ -0,0 +1,3 @@
+openh264-1.6.0/Makefile
+openh264-1.6.0/codec/common/generate_version.sh
+openh264-1.6.0/openh264.pc.in
diff --git a/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/Makefile b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/Makefile
new file mode 100644
index 000000000..f4dd56d9d
--- /dev/null
+++ b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/Makefile
@@ -0,0 +1,377 @@
+SRC_PATH=$(word 1, $(dir $(MAKEFILE_LIST)))
+vpath %.c $(SRC_PATH)
+vpath %.cc $(SRC_PATH)
+vpath %.cpp $(SRC_PATH)
+vpath %.asm $(SRC_PATH)
+vpath %.S $(SRC_PATH)
+vpath %.rc $(SRC_PATH)
+vpath %.pc.in $(SRC_PATH)
+
+OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:]. | sed -E 's/^(net|open|free)bsd/bsd/')
+ARCH=$(shell uname -m)
+LIBPREFIX=lib
+LIBSUFFIX=a
+CCAS=$(CC)
+CXX_O=-o $@
+CXX_LINK_O=-o $@
+AR_OPTS=cr $@
+STRIP=strip
+LINK_LOCAL_DIR=-L.
+LINK_LIB=-l$(1)
+CFLAGS_OPT=-O3
+CFLAGS_DEBUG=-g
+BUILDTYPE=Release
+V=Yes
+PREFIX=/usr/local
+SHARED=-shared
+OBJ=o
+DESTDIR=
+LIBDIR_NAME=lib
+SHAREDLIB_DIR=$(PREFIX)/lib
+PROJECT_NAME=openh264
+MODULE_NAME=gmpopenh264
+GMP_API_BRANCH=Firefox39
+CCASFLAGS=$(CFLAGS)
+STATIC_LDFLAGS=-lstdc++ -lpthread
+
+VERSION=1.6
+SHAREDLIBVERSION=3
+
+ifeq (,$(wildcard $(SRC_PATH)gmp-api))
+HAVE_GMP_API=No
+else
+HAVE_GMP_API=Yes
+endif
+
+ifeq (,$(wildcard $(SRC_PATH)gtest))
+HAVE_GTEST=No
+else
+HAVE_GTEST=Yes
+endif
+
+# Configurations
+ifeq ($(BUILDTYPE), Release)
+CFLAGS += $(CFLAGS_OPT)
+CFLAGS += -DNDEBUG
+USE_ASM = Yes
+ifeq ($(DEBUGSYMBOLS), True)
+CFLAGS += -g
+CXXFLAGS += -g
+DEBUGSYMBOLS_TAG := _debug_symbols
+PROCESS_FILES := True
+endif
+else
+CFLAGS += $(CFLAGS_DEBUG)
+USE_ASM = No
+endif
+
+ifeq ($(USE_ASAN), Yes)
+CFLAGS += -fsanitize=address
+LDFLAGS += -fsanitize=address
+endif
+
+STRIP_FLAGS := -S
+ifeq (linux, $((OS)))
+STRIP_FLAGS := -g
+endif
+
+# Make sure the all target is the first one
+all: libraries binaries
+
+include $(SRC_PATH)build/platform-$(OS).mk
+
+MODULE := $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
+
+CFLAGS += -DGENERATED_VERSION_HEADER
+LDFLAGS +=
+
+ifeq (Yes, $(GCOV))
+CFLAGS += -fprofile-arcs -ftest-coverage
+LDFLAGS += -lgcov
+endif
+
+#### No user-serviceable parts below this line
+ifneq ($(V),Yes)
+    QUIET_CXX  = @printf "CXX\t$@\n";
+    QUIET_CC   = @printf "CC\t$@\n";
+    QUIET_CCAS = @printf "CCAS\t$@\n";
+    QUIET_ASM  = @printf "ASM\t$@\n";
+    QUIET_AR   = @printf "AR\t$@\n";
+    QUIET_RC   = @printf "RC\t$@\n";
+    QUIET      = @
+endif
+
+
+INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc -Icodec/common/inc
+
+DECODER_INCLUDES += \
+    -I$(SRC_PATH)codec/decoder/core/inc \
+    -I$(SRC_PATH)codec/decoder/plus/inc
+
+ENCODER_INCLUDES += \
+    -I$(SRC_PATH)codec/encoder/core/inc \
+    -I$(SRC_PATH)codec/encoder/plus/inc \
+    -I$(SRC_PATH)codec/processing/interface
+
+PROCESSING_INCLUDES += \
+    -I$(SRC_PATH)codec/processing/interface \
+    -I$(SRC_PATH)codec/processing/src/common \
+    -I$(SRC_PATH)codec/processing/src/adaptivequantization \
+    -I$(SRC_PATH)codec/processing/src/downsample \
+    -I$(SRC_PATH)codec/processing/src/scrolldetection \
+    -I$(SRC_PATH)codec/processing/src/vaacalc
+
+GTEST_INCLUDES += \
+    -I$(SRC_PATH)gtest/googletest \
+    -I$(SRC_PATH)gtest/googletest/include
+
+CODEC_UNITTEST_INCLUDES += \
+    -I$(SRC_PATH)gtest/googletest/include \
+    -I$(SRC_PATH)codec/common/inc \
+    -I$(SRC_PATH)test
+
+CONSOLE_COMMON_INCLUDES += \
+    -I$(SRC_PATH)codec/console/common/inc
+
+H264DEC_INCLUDES += $(DECODER_INCLUDES) $(CONSOLE_COMMON_INCLUDES) -I$(SRC_PATH)codec/console/dec/inc
+H264DEC_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,decoder) $(call LINK_LIB,common) $(call LINK_LIB,console_common)
+H264DEC_DEPS = $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX) $(LIBPREFIX)console_common.$(LIBSUFFIX)
+
+H264ENC_INCLUDES += $(ENCODER_INCLUDES) $(CONSOLE_COMMON_INCLUDES) -I$(SRC_PATH)codec/console/enc/inc
+H264ENC_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,encoder) $(call LINK_LIB,processing) $(call LINK_LIB,common) $(call LINK_LIB,console_common)
+H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX) $(LIBPREFIX)console_common.$(LIBSUFFIX)
+
+CODEC_UNITTEST_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,gtest) $(call LINK_LIB,decoder) $(call LINK_LIB,encoder) $(call LINK_LIB,processing) $(call LINK_LIB,common) $(CODEC_UNITTEST_LDFLAGS_SUFFIX)
+CODEC_UNITTEST_DEPS = $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
+DECODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES)
+ENCODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(ENCODER_INCLUDES)
+PROCESSING_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(PROCESSING_INCLUDES)
+API_TEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES)
+COMMON_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES)
+MODULE_INCLUDES += -I$(SRC_PATH)gmp-api
+
+DECODER_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
+ENCODER_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
+PROCESSING_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
+API_TEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
+COMMON_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
+
+.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc $(PROJECT_NAME)-static.pc
+
+generate-version:
+	$(QUIET)sh $(SRC_PATH)codec/common/generate_version.sh $(SRC_PATH)
+
+codec/decoder/plus/src/welsDecoderExt.$(OBJ): | generate-version
+codec/encoder/plus/src/welsEncoderExt.$(OBJ): | generate-version
+
+clean:
+ifeq (android,$(OS))
+clean: clean_Android
+endif
+	$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so *.exe *.pdb *.exp *.pc *.res *.map
+
+gmp-bootstrap:
+	if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
+	cd gmp-api && git fetch origin && git checkout $(GMP_API_BRANCH)
+
+gtest-bootstrap:
+	git clone https://github.com/google/googletest.git gtest
+
+ifeq ($(HAVE_GTEST),Yes)
+
+ifneq (android,$(OS))
+ifneq (ios,$(OS))
+ifneq (msvc-wp,$(OS))
+BUILD_UT_EXE=Yes
+endif
+endif
+endif
+
+test: codec_unittest$(EXEEXT)
+ifeq ($(BUILD_UT_EXE), Yes)
+	./codec_unittest
+endif
+
+else
+test:
+	@echo "./gtest: No such file or directory."
+	@echo "You do not have gtest. Run make gtest-bootstrap to get gtest"
+endif
+
+include $(SRC_PATH)codec/common/targets.mk
+include $(SRC_PATH)codec/decoder/targets.mk
+include $(SRC_PATH)codec/encoder/targets.mk
+include $(SRC_PATH)codec/processing/targets.mk
+
+ifeq ($(HAVE_GMP_API),Yes)
+include $(SRC_PATH)module/targets.mk
+endif
+
+ifneq (android, $(OS))
+ifneq (ios, $(OS))
+ifneq (msvc-wp, $(OS))
+include $(SRC_PATH)codec/console/dec/targets.mk
+include $(SRC_PATH)codec/console/enc/targets.mk
+include $(SRC_PATH)codec/console/common/targets.mk
+endif
+endif
+endif
+
+libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
+
+# No point in building dylib for ios
+ifneq (ios, $(OS))
+libraries: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
+endif
+
+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) $+
+ifeq (True, $(PROCESS_FILES))
+	cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(LIBSUFFIX)
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
+endif
+
+$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
+	$(QUIET)rm -f $@
+	$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS)
+ifeq (True, $(PROCESS_FILES))
+	cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER)
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
+endif
+
+ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
+$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
+	$(QUIET)ln -sfn $+ $@
+ifeq (True, $(PROCESS_FILES))
+	$(QUIET)ln -sfn $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER) $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIX)
+endif
+endif
+
+ifeq ($(HAVE_GMP_API),Yes)
+plugin: $(MODULE)
+LIBRARIES += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER)
+else
+plugin:
+	@echo "./gmp-api: No such file or directory."
+	@echo "You do not have gmp-api.  Run make gmp-bootstrap to get the gmp-api headers."
+endif
+
+echo-plugin-name:
+	@echo $(MODULE)
+
+$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
+	$(QUIET)rm -f $@
+	$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS)
+ifeq (True, $(PROCESS_FILES))
+	cp $@ $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER)
+	$(STRIP) $(STRIP_FLAGS) $@ -o $@
+endif
+
+ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
+$(MODULE): $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER)
+	$(QUIET)ln -sfn $+ $@
+ifeq (True, $(PROCESS_FILES))
+	$(QUIET)ln -sfn $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER) $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIX)
+endif
+endif
+
+$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
+	@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBDIR_NAME@;$(LIBDIR_NAME);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
+
+$(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
+	@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBDIR_NAME@;$(LIBDIR_NAME);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
+
+install-headers:
+	mkdir -p $(DESTDIR)$(PREFIX)/include/wels
+	install -m 644 $(SRC_PATH)/codec/api/svc/codec*.h $(DESTDIR)$(PREFIX)/include/wels
+
+install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
+	mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
+	install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
+
+install-static: install-static-lib $(PROJECT_NAME)-static.pc
+	mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
+	install -m 644 $(PROJECT_NAME)-static.pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig/$(PROJECT_NAME).pc
+
+install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
+	mkdir -p $(DESTDIR)$(SHAREDLIB_DIR)
+	install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) $(DESTDIR)$(SHAREDLIB_DIR)
+	if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \
+		cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR); \
+	fi
+	mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
+	install -m 644 $(PROJECT_NAME).pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
+ifneq ($(EXTRA_LIBRARY),)
+	install -m 644 $(EXTRA_LIBRARY) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
+endif
+
+install: install-static-lib install-shared
+	@:
+
+ifneq ($(HAVE_GTEST),Yes)
+binaries:
+	@:
+else
+include $(SRC_PATH)build/gtest-targets.mk
+include $(SRC_PATH)test/api/targets.mk
+include $(SRC_PATH)test/decoder/targets.mk
+include $(SRC_PATH)test/encoder/targets.mk
+include $(SRC_PATH)test/processing/targets.mk
+include $(SRC_PATH)test/common/targets.mk
+
+LIBRARIES += $(LIBPREFIX)ut.$(LIBSUFFIX)
+$(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(COMMON_UNITTEST_OBJS) $(API_TEST_OBJS)
+	$(QUIET)rm -f $@
+	$(QUIET_AR)$(AR) $(AR_OPTS) $+
+
+
+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) $(CXX_LINK_O) $+ $(LDFLAGS) $(UTSHLDFLAGS) $(CODEC_UNITTEST_LDFLAGS)
+
+binaries: codec_unittest$(EXEEXT)
+BINARIES += codec_unittest$(EXEEXT)
+
+ifeq ($(BUILD_UT_EXE), Yes)
+# Build a normal command line executable
+codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) | res
+	$(QUIET)rm -f $@
+	$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
+
+res:
+	$(QUIET)if [ ! -e res ]; then ln -s $(SRC_PATH)res .; fi
+else
+
+# Build the unit test suite into a library that is included in a project file
+ifeq (ios,$(OS))
+codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
+else
+codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
+endif
+
+ifeq (android,$(OS))
+ifeq (./,$(SRC_PATH))
+codec_unittest$(EXEEXT):
+	cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
+
+clean_Android: clean_Android_ut
+clean_Android_ut:
+	-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
+endif
+endif
+
+endif
+endif
+
+-include $(OBJS:.$(OBJ)=.d)
+
+OBJDIRS = $(sort $(dir $(OBJS)))
+
+$(OBJDIRS):
+	$(QUIET)mkdir -p $@
+
+$(OBJS): | $(OBJDIRS)
diff --git a/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/codec/common/generate_version.sh b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/codec/common/generate_version.sh
new file mode 100755
index 000000000..13b150e70
--- /dev/null
+++ b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/codec/common/generate_version.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [ -f $SRC_PATH/.git-revision ] ; then
+  . $SRC_PATH/.git-revision
+  VER="`echo $REVISION | cut -c 1-7`"
+else
+  VER="x"
+fi
+GIT_VERSION='"'$VER'"'
+
+mkdir -p codec/common/inc
+cat $SRC_PATH/codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
+if cmp codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h > /dev/null 2>&1; then
+    # Identical to old version, don't touch it (to avoid unnecessary rebuilds)
+    rm codec/common/inc/version_gen.h.new
+    echo "Keeping existing codec/common/inc/version_gen.h"
+    exit 0
+fi
+mv codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h
+
+echo "Generated codec/common/inc/version_gen.h"
diff --git a/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/openh264.pc.in b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/openh264.pc.in
new file mode 100644
index 000000000..0155942a3
--- /dev/null
+++ b/sources/packages/m/openh264/create-1.6.0-make-patch/openh264-1.6.0-new/openh264.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+libdir=${prefix}/@LIBDIR_NAME@
+includedir=${prefix}/include
+
+Name: OpenH264
+Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.
+Version: @VERSION@
+Libs: -L${libdir} -lopenh264 @LIBS@
+Libs.private: @LIBS_PRIVATE@
+Cflags: -I${includedir}