openh264: import from pkgsrc-wip
OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC. Work by tnn, ryoon, myself
This commit is contained in:
parent
17486a327c
commit
6e81fb6139
10 changed files with 138 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.313 2021/11/15 22:09:36 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.314 2021/11/16 14:56:35 nia Exp $
|
||||
#
|
||||
|
||||
COMMENT= Multimedia utilities
|
||||
|
@ -172,6 +172,7 @@ SUBDIR+= ogle_gui
|
|||
SUBDIR+= ogmtools
|
||||
SUBDIR+= olive-editor
|
||||
SUBDIR+= omxplayer
|
||||
SUBDIR+= openh264
|
||||
SUBDIR+= openquicktime
|
||||
SUBDIR+= p5-GStreamer
|
||||
SUBDIR+= p5-xmltv
|
||||
|
|
2
multimedia/openh264/DESCR
Normal file
2
multimedia/openh264/DESCR
Normal file
|
@ -0,0 +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.
|
29
multimedia/openh264/Makefile
Normal file
29
multimedia/openh264/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
# $NetBSD: Makefile,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
DISTNAME= openh264-2.1.1
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=cisco/}
|
||||
GITHUB_TAG= v${PKGVERSION_NOREV}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
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++
|
||||
|
||||
PKGCONFIG_OVERRIDE+= openh264.pc.in
|
||||
|
||||
MAKE_FLAGS+= ENABLEPIC=Yes
|
||||
MAKE_FLAGS+= PREFIX=${PREFIX}
|
||||
MAKE_FLAGS+= ARCH=${MACHINE_ARCH}
|
||||
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
|
||||
.endif
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
10
multimedia/openh264/PLIST
Normal file
10
multimedia/openh264/PLIST
Normal file
|
@ -0,0 +1,10 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
include/wels/codec_api.h
|
||||
include/wels/codec_app_def.h
|
||||
include/wels/codec_def.h
|
||||
include/wels/codec_ver.h
|
||||
lib/libopenh264.a
|
||||
lib/libopenh264.so
|
||||
lib/libopenh264.so.${PKGVERSION}
|
||||
lib/libopenh264.so.6
|
||||
lib/pkgconfig/openh264.pc
|
13
multimedia/openh264/buildlink3.mk
Normal file
13
multimedia/openh264/buildlink3.mk
Normal file
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
BUILDLINK_TREE+= openh264
|
||||
|
||||
.if !defined(OPENH264_BUILDLINK3_MK)
|
||||
OPENH264_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.openh264+= openh264>=1.5.0
|
||||
BUILDLINK_PKGSRCDIR.openh264?= ../../multimedia/openh264
|
||||
|
||||
.endif # OPENH264_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -openh264
|
9
multimedia/openh264/distinfo
Normal file
9
multimedia/openh264/distinfo
Normal file
|
@ -0,0 +1,9 @@
|
|||
$NetBSD: distinfo,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
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
|
15
multimedia/openh264/patches/patch-build_platform-bsd.mk
Normal file
15
multimedia/openh264/patches/patch-build_platform-bsd.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-build_platform-bsd.mk,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
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)
|
15
multimedia/openh264/patches/patch-build_platform-darwin.mk
Normal file
15
multimedia/openh264/patches/patch-build_platform-darwin.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-build_platform-darwin.mk,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
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)
|
15
multimedia/openh264/patches/patch-build_platform-linux.mk
Normal file
15
multimedia/openh264/patches/patch-build_platform-linux.mk
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-build_platform-linux.mk,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
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 $@
|
|
@ -0,0 +1,28 @@
|
|||
$NetBSD: patch-codec_common_generate__version.sh,v 1.1 2021/11/16 14:56:36 nia Exp $
|
||||
|
||||
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
|
Loading…
Reference in a new issue