pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

openh264: update to 2.1.1



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Tue Nov 16 15:42:17 2021 +0100
Changeset:	167ace2e2cda4aa209027580b632806a74c28682

Modified Files:
	openh264/DESCR
	openh264/Makefile
	openh264/PLIST
	openh264/buildlink3.mk
	openh264/distinfo
Added Files:
	openh264/patches/patch-build_platform-bsd.mk
	openh264/patches/patch-build_platform-darwin.mk
	openh264/patches/patch-build_platform-linux.mk
	openh264/patches/patch-codec_common_generate__version.sh
Removed Files:
	openh264/files/gmpopenh264.js

Log Message:
openh264: update to 2.1.1

- avoid building browser plugin for now. not much use to us
  because we're pkgsrc and not pkgbin and thus don't get to be
  exempt
- avoid overriding pkgsrc's own stack protector settings
- avoid running git to determine the version
- use TOOL_DEPENDS for nasm

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=167ace2e2cda4aa209027580b632806a74c28682

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 openh264/DESCR                                     |  1 -
 openh264/Makefile                                  | 38 ++++------------------
 openh264/PLIST                                     |  6 ++--
 openh264/buildlink3.mk                             |  3 +-
 openh264/distinfo                                  | 10 ++++--
 openh264/files/gmpopenh264.js                      |  3 --
 openh264/patches/patch-build_platform-bsd.mk       | 15 +++++++++
 openh264/patches/patch-build_platform-darwin.mk    | 15 +++++++++
 openh264/patches/patch-build_platform-linux.mk     | 15 +++++++++
 .../patch-codec_common_generate__version.sh        | 28 ++++++++++++++++
 10 files changed, 89 insertions(+), 45 deletions(-)

diffs:
diff --git a/openh264/DESCR b/openh264/DESCR
index 0996ece0a7..cd9441b8d0 100644
--- a/openh264/DESCR
+++ b/openh264/DESCR
@@ -1,3 +1,2 @@
 OpenH264 is a codec library which supports H.264 encoding and decoding.
 It is suitable for use in real time applications such as WebRTC.
-This package also contains the OpenH264 plugin for www/firefox.
diff --git a/openh264/Makefile b/openh264/Makefile
index 05c9eef9e1..124d52d529 100644
--- a/openh264/Makefile
+++ b/openh264/Makefile
@@ -1,55 +1,29 @@
 # $NetBSD$
 
-VERSION=	1.5
-MINOR=		.0
-DISTNAME=	openh264-${VERSION}${MINOR}
-CATEGORIES=	www multimedia
+DISTNAME=	openh264-2.1.1
+CATEGORIES=	multimedia
 MASTER_SITES=	${MASTER_SITE_GITHUB:=cisco/}
 GITHUB_TAG=	v${PKGVERSION_NOREV}
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://github.com/cisco/openh264/
+HOMEPAGE=	https://github.com/cisco/openh264
 COMMENT=	H.264 encoder/decoder library from Cisco
 LICENSE=	2-clause-bsd
 
 USE_TOOLS+=	gmake pkg-config
 USE_LANGUAGES=	c c++
 
-
-BUILD_TARGET=		all plugin
 PKGCONFIG_OVERRIDE+=	openh264.pc.in
 
-PLIST_SUBST+=	VERSION=${VERSION:Q}
+MAKE_FLAGS+=	ENABLEPIC=Yes
 MAKE_FLAGS+=	PREFIX=${PREFIX}
 MAKE_FLAGS+=	ARCH=${MACHINE_ARCH}
-MAKE_FLAGS+=	HAVE_GMP_API=Yes
-CFLAGS+=	-I${BUILDLINK_PREFIX.gmp-api}/include/gmp-api
-
-PLUGIN_DIR=		lib/firefox/gmp-gmpopenh264/${VERSION}
-INSTALLATION_DIRS=	${PLUGIN_DIR}
-
-SUBST_CLASSES+=		jsvars
-SUBST_STAGE.jsvars=	pre-configure
-SUBST_MESSAGE.jsvars=	Fixing mozilla configuration settings
-SUBST_FILES.jsvars=	gmpopenh264.js
-SUBST_VARS.jsvars=	VERSION
-SUBST_VARS.jsvars+=	LASTUPDATE_TIMESTAMP
-
-LASTUPDATE_TIMESTAMP!=	date +%s
+MAKE_FLAGS+=	HAVE_GMP_API=No
 
 .include "../../mk/bsd.prefs.mk"
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-TOOL_DEPENDS+=		nasm>=2.07:../../devel/nasm
+TOOL_DEPENDS+=	nasm>=2.07:../../devel/nasm
 .endif
 
-post-extract:
-	cp ${FILESDIR}/gmpopenh264.js ${WRKSRC}
-
-post-install:
-	${INSTALL_DATA} ${WRKSRC}/gmpopenh264.info ${DESTDIR}${PREFIX}/${PLUGIN_DIR}
-	${INSTALL_DATA} ${WRKSRC}/libgmpopenh264.so.1 ${DESTDIR}${PREFIX}/${PLUGIN_DIR}/libgmpopenh264.so
-	${INSTALL_DATA} ${WRKSRC}/gmpopenh264.js ${DESTDIR}${PREFIX}/${PLUGIN_DIR}/gmpopenh264.js
-
-.include "../../multimedia/gmp-api/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/openh264/PLIST b/openh264/PLIST
index 168d19f425..55ef03f0d1 100644
--- a/openh264/PLIST
+++ b/openh264/PLIST
@@ -3,10 +3,8 @@ include/wels/codec_api.h
 include/wels/codec_app_def.h
 include/wels/codec_def.h
 include/wels/codec_ver.h
-lib/firefox/gmp-gmpopenh264/${VERSION}/gmpopenh264.info
-lib/firefox/gmp-gmpopenh264/${VERSION}/gmpopenh264.js
-lib/firefox/gmp-gmpopenh264/${VERSION}/libgmpopenh264.so
 lib/libopenh264.a
 lib/libopenh264.so
-lib/libopenh264.so.1
+lib/libopenh264.so.${PKGVERSION}
+lib/libopenh264.so.6
 lib/pkgconfig/openh264.pc
diff --git a/openh264/buildlink3.mk b/openh264/buildlink3.mk
index 33a19ee075..d08b8379de 100644
--- a/openh264/buildlink3.mk
+++ b/openh264/buildlink3.mk
@@ -6,9 +6,8 @@ BUILDLINK_TREE+=	openh264
 OPENH264_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.openh264+=	openh264>=1.5.0
-BUILDLINK_PKGSRCDIR.openh264?=	../../wip/openh264
+BUILDLINK_PKGSRCDIR.openh264?=		../../wip/openh264
 
-#.include "../../multimedia/gmp-api/buildlink3.mk"
 .endif	# OPENH264_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-openh264
diff --git a/openh264/distinfo b/openh264/distinfo
index b74d0def3c..6ea6ec290a 100644
--- a/openh264/distinfo
+++ b/openh264/distinfo
@@ -1,5 +1,9 @@
 $NetBSD$
 
-RMD160 (openh264-1.5.0.tar.gz) = 1a554f03e9e9dee0e8c44064d08ad557e2ca8083
-SHA512 (openh264-1.5.0.tar.gz) = 30599fed5e928af7dfec079d101a22885e52874c1d7db91ff289b989a9a20548b6bbd5d25e4e546efedd4e5aba97cbc42b1e847970b93116d86efc7af394aeaf
-Size (openh264-1.5.0.tar.gz) = 37851166 bytes
+BLAKE2s (openh264-2.1.1.tar.gz) = f5fe24f48be8904ba3cf47772d815efce6cccabcb33a6f29918800fe842693fa
+SHA512 (openh264-2.1.1.tar.gz) = f9c2925fa902c6278da40f68b967d25e62db7ce3541e8f5e7a0ee174204b6ecc7026b5853885c361f48ca01d71bacd585fb5b91f01f0c054ece80943f1afcf79
+Size (openh264-2.1.1.tar.gz) = 60239654 bytes
+SHA1 (patch-build_platform-bsd.mk) = f641958f3fd878ff6e06ef361a7b2debb759cfb8
+SHA1 (patch-build_platform-darwin.mk) = e935c97831801e7f8fa21cd1df43b59d17ccb940
+SHA1 (patch-build_platform-linux.mk) = db176a29a2ff1f7c1100d25d535e24a74f5229c9
+SHA1 (patch-codec_common_generate__version.sh) = 5f0d3b33c6730e3da824acb503ceb4c84347a320
diff --git a/openh264/files/gmpopenh264.js b/openh264/files/gmpopenh264.js
deleted file mode 100644
index 7b921baa52..0000000000
--- a/openh264/files/gmpopenh264.js
+++ /dev/null
@@ -1,3 +0,0 @@
-pref("media.gmp-gmpopenh264.autoupdate", false);
-pref("media.gmp-gmpopenh264.lastUpdate", @LASTUPDATE_TIMESTAMP@);
-pref("media.gmp-gmpopenh264.version", "@VERSION@");
diff --git a/openh264/patches/patch-build_platform-bsd.mk b/openh264/patches/patch-build_platform-bsd.mk
new file mode 100644
index 0000000000..8f4402a8e9
--- /dev/null
+++ b/openh264/patches/patch-build_platform-bsd.mk
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Remove stack protector, let pkgsrc apply it itself.
+
+--- build/platform-bsd.mk.orig	2020-05-21 08:30:24.000000000 +0000
++++ build/platform-bsd.mk
+@@ -3,7 +3,7 @@ SHAREDLIBSUFFIX = so
+ SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX).$(FULL_VERSION)
+ SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX).$(SHAREDLIB_MAJORVERSION)
+ SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
+-CFLAGS += -fPIC -fstack-protector-all
++CFLAGS += -fPIC
+ LDFLAGS += -lpthread
+ STATIC_LDFLAGS += -lpthread -lm
+ ifeq ($(ASM_ARCH), x86)
diff --git a/openh264/patches/patch-build_platform-darwin.mk b/openh264/patches/patch-build_platform-darwin.mk
new file mode 100644
index 0000000000..91036e49b0
--- /dev/null
+++ b/openh264/patches/patch-build_platform-darwin.mk
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Remove stack protector, let pkgsrc apply it itself.
+
+--- build/platform-darwin.mk.orig	2020-05-21 08:30:24.000000000 +0000
++++ build/platform-darwin.mk
+@@ -10,7 +10,7 @@ SHLDFLAGS = -dynamiclib -twolevel_namesp
+ 	$(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
+ SHARED = -dynamiclib
+ SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION)
+-CFLAGS += -Wall -fPIC -MMD -MP -fstack-protector-all
++CFLAGS += -Wall -fPIC -MMD -MP
+ ifeq ($(ASM_ARCH), x86)
+ ASMFLAGS += -DPREFIX
+ ifeq ($(ARCH), x86_64)
diff --git a/openh264/patches/patch-build_platform-linux.mk b/openh264/patches/patch-build_platform-linux.mk
new file mode 100644
index 0000000000..86c09c7355
--- /dev/null
+++ b/openh264/patches/patch-build_platform-linux.mk
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Remove stack protector, let pkgsrc apply it itself.
+
+--- build/platform-linux.mk.orig	2020-05-21 08:30:24.000000000 +0000
++++ build/platform-linux.mk
+@@ -3,7 +3,7 @@ SHAREDLIBSUFFIX = so
+ SHAREDLIBSUFFIXFULLVER=$(SHAREDLIBSUFFIX).$(FULL_VERSION)
+ SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIBSUFFIX).$(SHAREDLIB_MAJORVERSION)
+ SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
+-CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP -fstack-protector-all
++CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
+ LDFLAGS += -lpthread
+ STATIC_LDFLAGS += -lpthread -lm
+ AR_OPTS = crD $@
diff --git a/openh264/patches/patch-codec_common_generate__version.sh b/openh264/patches/patch-codec_common_generate__version.sh
new file mode 100644
index 0000000000..d0a179d216
--- /dev/null
+++ b/openh264/patches/patch-codec_common_generate__version.sh
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Avoid running git to determine the version.
+
+--- codec/common/generate_version.sh.orig	2020-05-21 08:30:24.000000000 +0000
++++ codec/common/generate_version.sh
+@@ -1,19 +1,7 @@
+ #!/bin/bash
+-git rev-list HEAD | sort > config.git-hash
+ SRC_PATH=$1
+-LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
+-if [ $LOCALVER \> 1 ] ; then
+-    VER="$(git rev-list HEAD -n 1 | cut -c 1-7)"
+-    if git status | grep -q "modified:" ; then
+-        VER="${VER}+M"
+-    fi
+-    GIT_VERSION=$VER
+-else
+-    GIT_VERSION=
+-    VER="x"
+-fi
+-GIT_VERSION='"'$GIT_VERSION'"'
+-rm -f config.git-hash
++GIT_VERSION='"(pkgsrc)"'
++VER="x"
+ 
+ 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


Home | Main Index | Thread Index | Old Index