pkgsrc-WIP-changes archive

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

+libvpx-git: git version of multimedia/libvpx



Module Name:	pkgsrc-wip
Committed By:	AcidBear <jake.slazenger%yandex.com@localhost>
Pushed By:	jakeSlaz
Date:		Tue Mar 2 03:42:45 2021 +0300
Changeset:	0606b42348fde846ed41764e169367eb97112286

Added Files:
	libvpx-git/DESCR
	libvpx-git/Makefile
	libvpx-git/PLIST
	libvpx-git/buildlink3.mk
	libvpx-git/distinfo
	libvpx-git/files/strip_fPIC.sh
	libvpx-git/hacks.mk
	libvpx-git/patches/patch-build_make_Makefile
	libvpx-git/patches/patch-build_make_configure.sh
	libvpx-git/patches/patch-build_make_gen_asm_deps.sh
	libvpx-git/patches/patch-configure
	libvpx-git/patches/patch-examples.mk
	libvpx-git/patches/patch-libs.mk

Log Message:
+libvpx-git: git version of multimedia/libvpx

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

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

diffstat:
 libvpx-git/DESCR                                   |   1 +
 libvpx-git/Makefile                                | 125 ++++++++++++++++++++
 libvpx-git/PLIST                                   |  15 +++
 libvpx-git/buildlink3.mk                           |  17 +++
 libvpx-git/distinfo                                |  12 ++
 libvpx-git/files/strip_fPIC.sh                     |  20 ++++
 libvpx-git/hacks.mk                                |  12 ++
 libvpx-git/patches/patch-build_make_Makefile       | 130 +++++++++++++++++++++
 libvpx-git/patches/patch-build_make_configure.sh   |  72 ++++++++++++
 .../patches/patch-build_make_gen_asm_deps.sh       |  18 +++
 libvpx-git/patches/patch-configure                 |  47 ++++++++
 libvpx-git/patches/patch-examples.mk               |  13 +++
 libvpx-git/patches/patch-libs.mk                   |  45 +++++++
 13 files changed, 527 insertions(+)

diffs:
diff --git a/libvpx-git/DESCR b/libvpx-git/DESCR
new file mode 100644
index 0000000000..d0b2ae3792
--- /dev/null
+++ b/libvpx-git/DESCR
@@ -0,0 +1 @@
+The VP8 Codec SDK.
diff --git a/libvpx-git/Makefile b/libvpx-git/Makefile
new file mode 100644
index 0000000000..70a07cc24c
--- /dev/null
+++ b/libvpx-git/Makefile
@@ -0,0 +1,125 @@
+# $NetBSD: Makefile,v 1.85 2020/10/25 12:43:45 nia Exp $
+
+DISTNAME=   libvpx-git
+GIT_REPO=   git://github.com/webmproject/libvpx.git
+CATEGORIES=	multimedia
+
+MAINTAINER=	ryoon%NetBSD.org@localhost
+HOMEPAGE=	https://chromium.googlesource.com/webm/libvpx
+COMMENT=	On2 VP8 library from Google
+LICENSE=	modified-bsd
+
+USE_LANGUAGES=		c c++
+USE_LIBTOOL=		yes
+USE_TOOLS+=		gmake bash:build perl:build
+HAS_CONFIGURE=		yes
+CONFIG_SHELL=		${BASH}
+CONFIGURE_ARGS+=	--disable-postproc
+CONFIGURE_ARGS+=	--enable-pic
+CONFIGURE_ARGS+=	--enable-runtime-cpu-detect
+CONFIGURE_ARGS+=	--prefix=${PREFIX}
+CONFIGURE_ARGS+=	--disable-unit-tests
+
+# Uses -std=c++11
+GCC_REQD+=		4.8
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+TOOL_DEPENDS+=		yasm-[0-9]*:../../devel/yasm
+.endif
+
+REPLACE_BASH=		configure
+REPLACE_BASH+=		build/make/configure.sh
+REPLACE_BASH+=		build/make/version.sh
+REPLACE_BASH+=		build/make/gen_asm_deps.sh
+
+REPLACE_PERL=		build/make/ads2gas.pl
+
+.if ${OPSYS} == "Darwin"
+BUILDLINK_TRANSFORM+=	rm:-Wl,-Bsymbolic
+.  if ${MACHINE_ARCH} == "i386"
+.    if !empty(OS_VERSION:M1[8-9].*)
+CONFIGURE_ARGS+=	--target=x86-darwin17-gcc
+.    elif !empty(OS_VERSION:M1[0-7].*)
+CONFIGURE_ARGS+=	--target=x86-darwin${OS_VERSION:C/\.[0-9]*//g}-gcc
+.    elif !empty(OS_VERSION:M9.*)
+CONFIGURE_ARGS+=	--target=x86-darwin9-gcc
+.    else
+CONFIGURE_ARGS+=	--target=x86-darwin8-gcc
+.    endif
+.  elif ${MACHINE_ARCH} == "x86_64"
+.    if !empty(OS_VERSION:M1[8-9].*) || !empty(OS_VERSION:M2[0-9].*)
+CONFIGURE_ARGS+=	--target=x86_64-darwin17-gcc
+.    elif !empty(OS_VERSION:M1[0-7].*)
+CONFIGURE_ARGS+=	--target=x86_64-darwin${OS_VERSION:C/\.[0-9]*//g}-gcc
+.    else
+CONFIGURE_ARGS+=	--target=x86_64-darwin9-gcc
+.    endif
+.  endif
+.elif ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
+.  if ${MACHINE_ARCH} == "x86_64"
+CONFIGURE_ARGS+=	--target=x86_64-solaris-gcc
+.  elif ${MACHINE_ARCH} == "i386"
+CONFIGURE_ARGS+=	--target=x86-solaris-gcc
+# Disable libyuv SSE code, it doesn't compile at present.
+CFLAGS+=		-U__SSE2__
+.  endif
+.endif
+
+.if !empty(PKGSRC_COMPILER:Mclang)
+.  if ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin"
+# https://bugzilla.mozilla.org/show_bug.cgi?id=982693
+SUBST_CLASSES+=		clang
+SUBST_STAGE.clang=	pre-configure
+SUBST_FILES.clang=	build/make/Makefile
+SUBST_MESSAGE.clang=	Disabling clang integrated assembler
+# Test for whether clang supports -fno-integrated-as instead of -no-integrated-as
+CLANG_INTEGRATED_AS!=	if ${CCPATH:Utrue} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi
+SUBST_SED.clang=	-e 's/-DINLINE_ASM/-DINLINE_ASM ${CLANG_INTEGRATED_AS}/'
+.  endif
+.endif
+
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel"
+CONFIGURE_ARGS+=	--target=mips32-linux-gcc
+.endif
+
+.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
+CONFIGURE_ARGS+=	--target=generic-gnu
+.endif
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) || !empty(MACHINE_PLATFORM:MNetBSD-*-*aarch64*)
+CONFIGURE_ARGS+=	--disable-runtime-cpu-detect
+.endif
+
+BUILDLINK_TRANSFORM.MirBSD+=	rm:-lrt
+# Compiler is too old for these newfangled features
+CONFIGURE_ENV.MirBSD+=		sse2=no sse3=no ssse3=no sse4_1=no
+# runtime_cpu_detect=no
+CONFIGURE_ENV.MirBSD+=		RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1'
+CONFIGURE_ARGS.MirBSD+=		--disable-runtime-cpu-detect
+
+# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508
+.if !empty(MACHINE_PLATFORM:MSunOS-5.10*)
+BUILD_DEPENDS=		coreutils-[0-9]*:../../sysutils/coreutils
+TOOLS_PLATFORM.tr=	${PREFIX}/bin/gtr
+.endif
+
+BUILD_TARGET=	# none
+
+post-extract:
+	${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC}
+
+PKGCONFIG_OVERRIDE+=		vpx.pc
+PKGCONFIG_OVERRIDE_STAGE=	post-build
+
+# PR pkg/48508: newer gas from binutils is required to compile ssse3 code.
+.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) || \
+	!empty(MACHINE_PLATFORM:MSunOS-5.10*) || \
+	!empty(MACHINE_PLATFORM:MOpenBSD-5*)
+.include "../../devel/binutils/buildlink3.mk"
+.include "../../devel/binutils/override-as.mk"
+.endif
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libvpx-git/PLIST b/libvpx-git/PLIST
new file mode 100644
index 0000000000..3da1293b32
--- /dev/null
+++ b/libvpx-git/PLIST
@@ -0,0 +1,15 @@
+@comment $NetBSD$
+bin/vpxdec
+bin/vpxenc
+include/vpx/vp8.h
+include/vpx/vp8cx.h
+include/vpx/vp8dx.h
+include/vpx/vpx_codec.h
+include/vpx/vpx_decoder.h
+include/vpx/vpx_encoder.h
+include/vpx/vpx_ext_ratectrl.h
+include/vpx/vpx_frame_buffer.h
+include/vpx/vpx_image.h
+include/vpx/vpx_integer.h
+lib/libvpx.la
+lib/pkgconfig/vpx.pc
diff --git a/libvpx-git/buildlink3.mk b/libvpx-git/buildlink3.mk
new file mode 100644
index 0000000000..560f862bc0
--- /dev/null
+++ b/libvpx-git/buildlink3.mk
@@ -0,0 +1,17 @@
+# $NetBSD: buildlink3.mk,v 1.7 2020/10/25 12:43:45 nia Exp $
+
+BUILDLINK_TREE+=	libvpx
+
+.if !defined(LIBVPX_BUILDLINK3_MK)
+LIBVPX_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libvpx+=	libvpx>=0.0.0
+BUILDLINK_ABI_DEPENDS.libvpx+=	libvpx>=0.0.0
+BUILDLINK_PKGSRCDIR.libvpx?=	../../wip/libvpx-git
+
+GCC_REQD+=	4.8
+
+.include "../../mk/pthread.buildlink3.mk"
+.endif # LIBVPX_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-libvpx
diff --git a/libvpx-git/distinfo b/libvpx-git/distinfo
new file mode 100644
index 0000000000..3cd4590317
--- /dev/null
+++ b/libvpx-git/distinfo
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.41 2020/08/30 12:33:29 js Exp $
+
+SHA1 (libvpx-1.9.0.tar.gz) = 2ab8203ad8922bdf3256e4a197d1348fa8db9a62
+RMD160 (libvpx-1.9.0.tar.gz) = 6189b855a38cd5f2e34a5120d5a48cc945b623b1
+SHA512 (libvpx-1.9.0.tar.gz) = 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298
+Size (libvpx-1.9.0.tar.gz) = 5326239 bytes
+SHA1 (patch-build_make_Makefile) = 908b1abc8c5eed56e920f442f8f1f80c49838a6f
+SHA1 (patch-build_make_configure.sh) = 6ef2a73aceeec910d1edce592f944cb46016010e
+SHA1 (patch-build_make_gen_asm_deps.sh) = c55bd4d0e12176b73ba62c3c4741b58de77923e6
+SHA1 (patch-configure) = 738871dc9ffa44a809e594849915a875a97ac40b
+SHA1 (patch-examples.mk) = 17410f43ff9952d616be3211ca697f37c107610a
+SHA1 (patch-libs.mk) = cdbd8b590746f3b366f25ba9b2a8636ff790d930
diff --git a/libvpx-git/files/strip_fPIC.sh b/libvpx-git/files/strip_fPIC.sh
new file mode 100644
index 0000000000..45dd3918c0
--- /dev/null
+++ b/libvpx-git/files/strip_fPIC.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# libtool assumes that the compiler can handle the -fPIC flag
+# This isn't always true (for example, nasm can't handle it)
+command=""
+while [ $# -gt 0 ]; do
+    case "$1" in
+        -fno-common|-pie)
+            ;;
+        -?PIC)
+            # Ignore -fPIC and -DPIC options
+            ;;
+        *)
+            command="$command $1"
+            ;;
+    esac
+    shift
+done
+echo $command
+exec $command
diff --git a/libvpx-git/hacks.mk b/libvpx-git/hacks.mk
new file mode 100644
index 0000000000..d5c0eb56dc
--- /dev/null
+++ b/libvpx-git/hacks.mk
@@ -0,0 +1,12 @@
+# $NetBSD: hacks.mk,v 1.4 2014/05/26 18:10:22 tron Exp $
+
+### [Sun Jan  5 12:58:28 UTC 2014 : tron]
+### GCC 4.5.3 gets stuck while compiline "vp9/vp9_cx_iface.c".
+### See PR port-sparc64/48501 for more details.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc*)
+.  include "../../mk/compiler.mk"
+.  if !empty(CC_VERSION:Mgcc-4.[0-5].*)
+PKG_HACKS+=		sparc-gcc-lock-up
+BUILDLINK_TRANSFORM+=	rm:-O[0-9]*
+.  endif
+.endif
diff --git a/libvpx-git/patches/patch-build_make_Makefile b/libvpx-git/patches/patch-build_make_Makefile
new file mode 100644
index 0000000000..63054d17a6
--- /dev/null
+++ b/libvpx-git/patches/patch-build_make_Makefile
@@ -0,0 +1,130 @@
+$NetBSD: patch-build_make_Makefile,v 1.2 2020/01/28 19:20:09 adam Exp $
+
+--- build/make/Makefile.orig	2017-01-12 20:27:27.000000000 +0000
++++ build/make/Makefile
+@@ -147,7 +147,7 @@ $(BUILD_PFX)%.c.d: %.c
+ $(BUILD_PFX)%.c.o: %.c
+ 	$(if $(quiet),@echo "    [CC] $@")
+ 	$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
+-	$(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $<
++	$(qexec)${LIBTOOL} --mode=compile $(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $<
+ 
+ $(BUILD_PFX)%.cc.d: %.cc
+ 	$(if $(quiet),@echo "    [DEP] $@")
+@@ -157,7 +157,7 @@ $(BUILD_PFX)%.cc.d: %.cc
+ $(BUILD_PFX)%.cc.o: %.cc
+ 	$(if $(quiet),@echo "    [CXX] $@")
+ 	$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
+-	$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
++	$(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
+ 
+ $(BUILD_PFX)%.cpp.d: %.cpp
+ 	$(if $(quiet),@echo "    [DEP] $@")
+@@ -167,7 +167,7 @@ $(BUILD_PFX)%.cpp.d: %.cpp
+ $(BUILD_PFX)%.cpp.o: %.cpp
+ 	$(if $(quiet),@echo "    [CXX] $@")
+ 	$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
+-	$(qexec)$(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
++	$(qexec)${LIBTOOL} --mode=compile $(CXX) $(INTERNAL_CFLAGS) $(CXXFLAGS) -c -o $@ $<
+ 
+ $(BUILD_PFX)%.asm.d: %.asm
+ 	$(if $(quiet),@echo "    [DEP] $@")
+@@ -178,7 +178,8 @@ $(BUILD_PFX)%.asm.d: %.asm
+ $(BUILD_PFX)%.asm.o: %.asm
+ 	$(if $(quiet),@echo "    [AS] $@")
+ 	$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
+-	$(qexec)$(AS) $(ASFLAGS) -o $@ $<
++	$(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \
++		$(AS) $(ASFLAGS) -o $@ $<
+ 
+ $(BUILD_PFX)%.S.d: %.S
+ 	$(if $(quiet),@echo "    [DEP] $@")
+@@ -189,7 +190,8 @@ $(BUILD_PFX)%.S.d: %.S
+ $(BUILD_PFX)%.S.o: %.S
+ 	$(if $(quiet),@echo "    [AS] $@")
+ 	$(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
+-	$(qexec)$(AS) $(ASFLAGS) -o $@ $<
++	$(qexec)${LIBTOOL} --mode=compile --tag=CC sh strip_fPIC.sh \
++		$(AS) $(ASFLAGS) -o $@ $<
+ 
+ .PRECIOUS: %.c.S
+ %.c.S: CFLAGS += -DINLINE_ASM
+@@ -254,13 +256,15 @@ define linker_template
+ $(1): $(filter-out -%,$(2))
+ $(1):
+ 	$(if $(quiet),@echo    "    [LD] $$@")
+-	$(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
++	$(qexec)${LIBTOOL} --mode=link $(CXX) $(LDFLAGS) -o $$@ \
++		$$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs)
+ endef
+ define linkerxx_template
+ $(1): $(filter-out -%,$(2))
+ $(1):
+ 	$(if $(quiet),@echo    "    [LD] $$@")
+-	$(qexec)$$(CXX) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs))
++	$(qexec)${LIBTOOL} --mode=link ${CXX} $(LDFLAGS) -o $$@ \
++		$$(filter-out -lvpx,$(2)) libvpx.la $$(extralibs)
+ endef
+ # make-3.80 has a bug with expanding large input strings to the eval function,
+ # which was triggered in some cases by the following component of
+@@ -273,8 +277,12 @@ endef
+ define install_map_template
+ $(DIST_DIR)/$(1): $(2)
+ 	$(if $(quiet),@echo "    [INSTALL] $$@")
+-	$(qexec)mkdir -p $$(dir $$@)
+-	$(qexec)cp -p $$< $$@
++	$(qexec)${BSD_INSTALL_DATA} -d -m 755 $$(dir $$@)
++	$$(if $$(filter %.a,$$<), \
++	${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c $$(patsubst %.a,%.la,$$<) $$(dir $$@), \
++	$$(if $$(filter %.h %.pc,$$<), \
++	${BSD_INSTALL_DATA} -c -m 644 $$< $$(dir $$@), \
++	${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} -c -s $$< $$(dir $$@)))
+ endef
+ 
+ define archive_template
+@@ -283,7 +291,9 @@ define archive_template
+ # for creating them.
+ $(1):
+ 	$(if $(quiet),@echo "    [AR] $$@")
+-	$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
++	$(qexec)${LIBTOOL} --mode=link $(CC) $(LDFLAGS) -Wl,-Bsymbolic -o $$(patsubst %.a,%.la,$$@) \
++		$$(patsubst %.o,%.lo,$$?) -rpath $(PREFIX)/lib $$(extralibs) \
++		-version-info $(VERSION_MAJOR):$(VERSION_MINOR)
+ endef
+ 
+ define so_template
+@@ -377,9 +387,9 @@ clean::
+ 	rm -f .bins .install-bins $(BINS)
+ 
+ LIBS=$(call enabled,LIBS)
+-.libs: $(LIBS)
++dot.libs: $(LIBS)
+ 	@touch $@
+-$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
++$(foreach lib,$(filter %.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
+ $(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
+ $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
+ $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
+@@ -388,11 +398,11 @@ INSTALL-LIBS=$(call cond_enabled,CONFIG_
+ ifeq ($(MAKECMDGOALS),dist)
+ INSTALL-LIBS+=$(call cond_enabled,CONFIG_INSTALL_LIBS,DIST-LIBS)
+ endif
+-.install-libs: .libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS))
++.install-libs: dot.libs $(addprefix $(DIST_DIR)/,$(INSTALL-LIBS))
+ 	@touch $@
+ 
+ clean::
+-	rm -f .libs .install-libs $(LIBS)
++	rm -f dot.libs .install-libs $(LIBS)
+ 
+ ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
+ PROJECTS=$(call enabled,PROJECTS)
+@@ -442,7 +452,7 @@ ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
+     BUILD_TARGETS += .projects
+     INSTALL_TARGETS += .install-projects
+ endif
+-BUILD_TARGETS += .docs .libs .bins
++BUILD_TARGETS += .docs dot.libs .bins
+ INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins
+ all: $(BUILD_TARGETS)
+ install:: $(INSTALL_TARGETS)
diff --git a/libvpx-git/patches/patch-build_make_configure.sh b/libvpx-git/patches/patch-build_make_configure.sh
new file mode 100644
index 0000000000..b18310062a
--- /dev/null
+++ b/libvpx-git/patches/patch-build_make_configure.sh
@@ -0,0 +1,72 @@
+$NetBSD: patch-build_make_configure.sh,v 1.1 2019/02/12 20:47:14 adam Exp $
+
+*BSD and qnx are identified as linux.
+Add another SDK path on Mac OS X.
+All sparc cpus can not do unaligned access.
+Detect NetBSD ARMv7 hardfloat toolchain.
+Recognize powerpc as a target ISA, so we don't end up with generic-gnu
+
+--- build/make/configure.sh.orig	2019-02-04 17:02:33.000000000 +0000
++++ build/make/configure.sh
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/usr/pkg/bin/bash
+ ##
+ ##  configure.sh
+ ##
+@@ -740,7 +740,7 @@ process_common_toolchain() {
+       aarch64*)
+         tgt_isa=arm64
+         ;;
+-      armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf)
++      armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf | armv7*-netbsd*-*hf)
+         tgt_isa=armv7
+         float_abi=hard
+         ;;
+@@ -766,6 +766,9 @@ process_common_toolchain() {
+       *mips32el*)
+         tgt_isa=mips32
+         ;;
++      *powerpc*)
++	tgt_isa=powerpc
++	;;
+     esac
+ 
+     # detect tgt_os
+@@ -812,7 +815,7 @@ process_common_toolchain() {
+         [ -z "$tgt_isa" ] && tgt_isa=x86
+         tgt_os=win32
+         ;;
+-      *linux*|*bsd*)
++      *linux*|*bsd*|*qnx6*)
+         tgt_os=linux
+         ;;
+       *solaris2.10)
+@@ -858,6 +861,9 @@ process_common_toolchain() {
+     ppc*)
+       enable_feature ppc
+       ;;
++    sparc*)
++      disable_feature fast_unaligned
++      ;;
+   esac
+ 
+   # PIC is probably what we want when building shared libs
+@@ -1530,7 +1536,7 @@ EOF
+   check_cc <<EOF
+ unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E';
+ EOF
+-    [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' |
++    [ -f "${TMP_O}" ] && od -t x1 "${TMP_O}" | tr -d '\n' |
+         grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian
+ 
+     # Try to find which inline keywords are supported
+@@ -1547,7 +1553,7 @@ EOF
+         # bionic includes basic pthread functionality, obviating -lpthread.
+         ;;
+       *)
+-        check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h
++        check_header pthread.h && check_lib ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} <<EOF && add_extralibs ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} || disable_feature pthread_h
+ #include <pthread.h>
+ #include <stddef.h>
+ int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }
diff --git a/libvpx-git/patches/patch-build_make_gen_asm_deps.sh b/libvpx-git/patches/patch-build_make_gen_asm_deps.sh
new file mode 100644
index 0000000000..38fdf98bf0
--- /dev/null
+++ b/libvpx-git/patches/patch-build_make_gen_asm_deps.sh
@@ -0,0 +1,18 @@
+$NetBSD: patch-build_make_gen_asm_deps.sh,v 1.4 2016/08/16 23:53:25 ryoon Exp $
+
+Fix build problems under Mac OS X with Xcode 4.4 and newer. Patch
+taken from here:
+
+https://github.com/mxcl/homebrew/issues/12567#issuecomment-6434000
+
+--- build/make/gen_asm_deps.sh.orig	2016-07-21 01:15:41.000000000 +0000
++++ build/make/gen_asm_deps.sh
+@@ -42,7 +42,7 @@ done
+ 
+ [ -n "$srcfile" ] || show_help
+ sfx=${sfx:-asm}
+-includes=$(LC_ALL=C egrep -i "include +\"?[a-z0-9_/]+\.${sfx}" $srcfile |
++includes=$(LC_ALL=C egrep -i "include +\"[a-z0-9_/]+\.${sfx}" $srcfile |
+            perl -p -e "s;.*?([a-z0-9_/]+.${sfx}).*;\1;")
+ #" restore editor state
+ for inc in ${includes}; do
diff --git a/libvpx-git/patches/patch-configure b/libvpx-git/patches/patch-configure
new file mode 100644
index 0000000000..21fa95bf00
--- /dev/null
+++ b/libvpx-git/patches/patch-configure
@@ -0,0 +1,47 @@
+$NetBSD: patch-configure,v 1.8 2019/02/12 20:47:14 adam Exp $
+
+Recognize sparc and powerpc linux (or BSD...) platforms.
+Don't do doxygen.
+Remove bogus diff check.
+
+--- configure.orig	2019-02-04 17:02:33.000000000 +0000
++++ configure
+@@ -114,6 +114,8 @@ all_platforms="${all_platforms} armv7-wi
+ all_platforms="${all_platforms} armv7s-darwin-gcc"
+ all_platforms="${all_platforms} armv8-linux-gcc"
+ all_platforms="${all_platforms} mips32-linux-gcc"
++all_platforms="${all_platforms} powerpc-linux-gcc"
++all_platforms="${all_platforms} sparc-linux-gcc"
+ all_platforms="${all_platforms} mips64-linux-gcc"
+ all_platforms="${all_platforms} ppc64le-linux-gcc"
+ all_platforms="${all_platforms} sparc-solaris-gcc"
+@@ -166,9 +168,6 @@ for t in ${all_targets}; do
+     [ -f "${source_path}/${t}.mk" ] && enable_feature ${t}
+ done
+ 
+-if ! diff --version >/dev/null; then
+-  die "diff missing: Try installing diffutils via your package manager."
+-fi
+ 
+ if ! perl --version >/dev/null; then
+     die "Perl is required to build"
+@@ -181,19 +180,6 @@ if [ "`cd \"${source_path}\" && pwd`" !=
+   fi
+ fi
+ 
+-# check installed doxygen version
+-doxy_version=$(doxygen --version 2>/dev/null)
+-doxy_major=${doxy_version%%.*}
+-if [ ${doxy_major:-0} -ge 1 ]; then
+-    doxy_version=${doxy_version#*.}
+-    doxy_minor=${doxy_version%%.*}
+-    doxy_patch=${doxy_version##*.}
+-
+-    [ $doxy_major -gt 1 ] && enable_feature doxygen
+-    [ $doxy_minor -gt 5 ] && enable_feature doxygen
+-    [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
+-fi
+-
+ # disable codecs when their source directory does not exist
+ [ -d "${source_path}/vp8" ] || disable_codec vp8
+ [ -d "${source_path}/vp9" ] || disable_codec vp9
diff --git a/libvpx-git/patches/patch-examples.mk b/libvpx-git/patches/patch-examples.mk
new file mode 100644
index 0000000000..b8fc8327eb
--- /dev/null
+++ b/libvpx-git/patches/patch-examples.mk
@@ -0,0 +1,13 @@
+$NetBSD: patch-examples.mk,v 1.1 2019/02/12 20:47:14 adam Exp $
+
+--- examples.mk.orig	2015-11-09 22:12:38.000000000 +0000
++++ examples.mk
+@@ -294,7 +294,7 @@ else
+ SHARED_LIB_SUF=.so
+ endif
+ endif
+-CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
++CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.la)
+ $(foreach bin,$(BINS-yes),\
+     $(eval $(bin):$(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF))\
+     $(eval $(call linker_template,$(bin),\
diff --git a/libvpx-git/patches/patch-libs.mk b/libvpx-git/patches/patch-libs.mk
new file mode 100644
index 0000000000..00a4bb28ed
--- /dev/null
+++ b/libvpx-git/patches/patch-libs.mk
@@ -0,0 +1,45 @@
+$NetBSD: patch-libs.mk,v 1.5 2020/08/30 12:33:29 js Exp $
+
+Do not install debug library.
+
+--- libs.mk.orig	2020-07-30 19:59:15.000000000 +0000
++++ libs.mk
+@@ -170,7 +170,6 @@ INSTALL-LIBS-$(CONFIG_SHARED) += $(forea
+ endif
+ else
+ INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
+-INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
+ endif
+ 
+ ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
+@@ -278,8 +277,8 @@ endif # ifeq ($(CONFIG_MSVS),yes)
+ else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
+ LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS)))
+ OBJS-yes += $(LIBVPX_OBJS)
+-LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
+-$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
++LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a
++$(BUILD_PFX)libvpx.a: $(LIBVPX_OBJS)
+ 
+ SO_VERSION_MAJOR := 6
+ SO_VERSION_MINOR := 3
+@@ -384,15 +383,15 @@ ifeq ($(CONFIG_VP9_ENCODER),yes)
+   RC_RTC_OBJS=$(call objs,$(RC_RTC_SRCS))
+   RC_RTC_OBJS=$(call objs,$(RC_RTC_SRCS))
+   OBJS-yes += $(RC_RTC_OBJS)
+-  LIBS-yes += $(BUILD_PFX)libvp9rc.a $(BUILD_PFX)libvp9rc_g.a
+-  $(BUILD_PFX)libvp9rc_g.a: $(RC_RTC_OBJS)
++  LIBS-yes += $(BUILD_PFX)libvp9rc.a
++  $(BUILD_PFX)libvp9rc.a: $(RC_RTC_OBJS)
+ endif
+ 
+ ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
+   SIMPLE_ENCODE_OBJS=$(call objs,$(SIMPLE_ENCODE_SRCS))
+   OBJS-yes += $(SIMPLE_ENCODE_OBJS)
+-  LIBS-yes += $(BUILD_PFX)libsimple_encode.a $(BUILD_PFX)libsimple_encode_g.a
+-  $(BUILD_PFX)libsimple_encode_g.a: $(SIMPLE_ENCODE_OBJS)
++  LIBS-yes += $(BUILD_PFX)libsimple_encode.a
++  $(BUILD_PFX)libsimple_encode.a: $(SIMPLE_ENCODE_OBJS)
+ endif
+ 
+ endif # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)


Home | Main Index | Thread Index | Old Index