From 425f7f179d87a4b6b9f85cc48881c85dee380d2e Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sun, 27 May 2018 16:28:12 +0000 Subject: [PATCH] ffmpeg4: avoid text relocations on NetBSD/i386. Changes are mostly pulled from ffmpeg3. Bump PKGREVISION. --- multimedia/ffmpeg4/Makefile | 4 +++- multimedia/ffmpeg4/distinfo | 4 ++-- multimedia/ffmpeg4/patches/patch-configure | 16 ++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/multimedia/ffmpeg4/Makefile b/multimedia/ffmpeg4/Makefile index 20ff5878ae4f..85e37b29ca5b 100644 --- a/multimedia/ffmpeg4/Makefile +++ b/multimedia/ffmpeg4/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2018/04/26 07:56:57 adam Exp $ +# $NetBSD: Makefile,v 1.2 2018/05/27 16:28:12 tsutsui Exp $ PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg4/} +PKGREVISION= 1 MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://ffmpeg.mplayerhq.hu/ COMMENT= Decoding, encoding and streaming software (v3.x) @@ -39,6 +40,7 @@ post-install: .if ${MACHINE_ARCH} == "i386" . if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \ || !empty(MACHINE_PLATFORM:MSunOS-*-i386) \ + || !empty(MACHINE_PLATFORM:MNetBSD-*-i386) \ || !empty(CC_VERSION:Mgcc-[123]*) \ || !empty(CC_VERSION:Mgcc-4.[01].*) \ || empty(CC_VERSION:Mgcc*) diff --git a/multimedia/ffmpeg4/distinfo b/multimedia/ffmpeg4/distinfo index 1b8d974608e5..cd7b63b8aad9 100644 --- a/multimedia/ffmpeg4/distinfo +++ b/multimedia/ffmpeg4/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.1 2018/04/26 07:56:57 adam Exp $ +$NetBSD: distinfo,v 1.2 2018/05/27 16:28:12 tsutsui Exp $ SHA1 (ffmpeg-4.0.tar.xz) = 1f85916c154a4d6a342d7ec1f909bbc58a92c19d RMD160 (ffmpeg-4.0.tar.xz) = 905285cf32e1b00d320c51c0a94cbd670fab6649 SHA512 (ffmpeg-4.0.tar.xz) = 78026f31cd0235a4167b2a6f3c5414fe3dd5e9d70a20f59aea08f8b9b94c13e87159074a50981877b3280cdd28c50bf5ff7e7bebdf992750be379984324f6329 Size (ffmpeg-4.0.tar.xz) = 8656948 bytes SHA1 (patch-Makefile) = 2d27f218ee49179fdea14bb5c86c506dfb64dbd6 -SHA1 (patch-configure) = 299a6d7cbf3c1a566b96ea8d934ae4d623d4110f +SHA1 (patch-configure) = 47ac93aad164856f1af0460bd7c42df8efc5a3f6 SHA1 (patch-doc_Makefile) = 3b86307323fa565f9ad19c5bcb6ea71d323062fc SHA1 (patch-libavformat_sctp.c) = 22bad9c7dc152aec3c60e0009899af241f495535 SHA1 (patch-libavutil_common.h) = d0f1093bc82567807b39dde990ee347f90a082c9 diff --git a/multimedia/ffmpeg4/patches/patch-configure b/multimedia/ffmpeg4/patches/patch-configure index 760ab8545e1f..a6fb77ef9936 100644 --- a/multimedia/ffmpeg4/patches/patch-configure +++ b/multimedia/ffmpeg4/patches/patch-configure @@ -1,6 +1,6 @@ -$NetBSD: patch-configure,v 1.1 2018/04/26 07:56:57 adam Exp $ +$NetBSD: patch-configure,v 1.2 2018/05/27 16:28:12 tsutsui Exp $ -Enable PIC on non-i386 NetBSD. +Enable PIC on NetBSD, even on i386 to avoid text relocations. Do not use 'rsync'. --- configure.orig 2018-04-20 10:02:55.000000000 +0000 @@ -13,19 +13,15 @@ Do not use 'rsync'. symver_asm_label symver_gnu_asm vfp_args -@@ -5043,6 +5042,11 @@ case $target_os in +@@ -5043,6 +5042,7 @@ case $target_os in ;; netbsd) disable symver -+ # NetBSD/macppc *really* needs PIC enabled. ffmpeg has repeatedly -+ # broken time and time again because PIC support has been removed -+ # from architectures that need it. So, if you touch this, please -+ # be careful and make sure that your changes work. -+ test "${subarch}" != "x86_32" && enable pic ++ enable pic oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" enabled gcc || check_ldflags -Wl,-zmuldefs -@@ -5429,10 +5433,13 @@ done +@@ -5429,10 +5429,13 @@ done check_cc pragma_deprecated "" '_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")' # The global variable ensures the bits appear unchanged in the object file. @@ -42,7 +38,7 @@ Do not use 'rsync'. check_cc const_nan math.h "struct { double d; } static const bar[] = { { NAN } }" -@@ -6190,7 +6197,6 @@ enabled makeinfo \ +@@ -6190,7 +6193,6 @@ enabled makeinfo \ disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html perl -v > /dev/null 2>&1 && enable perl || disable perl pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man