head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.2 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.1.0.26 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.24 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.22 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.20 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.18 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.16 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.14 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.12 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.10 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.8 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.6 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.4 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.2 pkgsrc-2022Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2025.12.22.05.56.46; author adam; state Exp; branches; next 1.1; commitid BpRAPMcUKyTiPmnG; 1.1 date 2022.09.26.17.00.21; author adam; state Exp; branches; next ; commitid iY2XVeR95IXnwoVD; desc @@ 1.2 log @x264: updated to 20250608 Commit log https://code.videolan.org/videolan/x264/-/commits/stable @ text @$NetBSD: patch-configure,v 1.1 2022/09/26 17:00:21 adam Exp $ Add support for DragonFly. Use 'amd64' as a synonym for 'x86_64'. Avoid endian test failure for -flto. Do not force compiler optimisations. If we fail an assembly test, continue as if --disable-asm was passed. --- configure.orig 2025-06-08 16:24:23.000000000 +0000 +++ configure @@@@ -686,6 +686,10 @@@@ case $host_os in SYS="FREEBSD" libm="-lm" ;; + dragonfly*) + SYS="DRAGONFLY" + LDFLAGS="$LDFLAGS -lm" + ;; kfreebsd*-gnu) SYS="FREEBSD" define HAVE_MALLOC_H @@@@ -786,7 +790,7 @@@@ case $host_cpu in ASFLAGS="$ASFLAGS -f elf32" fi ;; - x86_64) + x86_64|amd64) ARCH="X86_64" AS="${AS-nasm}" AS_EXT=".asm" @@@@ -815,14 +819,15 @@@@ case $host_cpu in fi ;; powerpc*) - ARCH="PPC" if [ $asm = auto ] ; then define HAVE_ALTIVEC AS="${AS-${CC}}" AS_EXT=".c" if [ $SYS = MACOSX ] ; then + ARCH="POWERPC" CFLAGS="$CFLAGS -faltivec -fastf -mcpu=G4" else + ARCH="PPC" CFLAGS="$CFLAGS -maltivec -mabi=altivec" define HAVE_ALTIVEC_H fi @@@@ -867,6 +872,18 @@@@ case $host_cpu in AS="${AS-${CC}}" fi ;; + aarch64|arm64*) + ARCH="AARCH64" + stack_alignment=16 + if [ "$SYS" = MACOSX ] ; then + AS="${AS-${CC}}" + ASFLAGS="$ASFLAGS -DPREFIX -DPIC" + elif [ "$SYS" = WINDOWS ] && [ "$compiler" = CL ] ; then + AS="${AS-${SRCPATH}/tools/gas-preprocessor.pl -arch aarch64 -as-type armasm -- armasm64 -nologo}" + else + AS="${AS-${CC}}" + fi + ;; arm*) ARCH="ARM" if [ "$SYS" = MACOSX ] ; then @@@@ -1013,8 +1030,8 @@@@ if [ $asm = auto -a $ARCH = ARM ] ; then ASFLAGS="$ASFLAGS -c" else echo "You specified a pre-ARMv6 or Thumb-1 CPU in your CFLAGS." - echo "If you really want to run on such a CPU, configure with --disable-asm." - exit 1 + echo "Disabling asm" + asm="no" fi fi @@@@ -1027,8 +1044,8 @@@@ if [ $asm = auto -a $ARCH = AARCH64 ] ; define HAVE_NEON else echo "no NEON support, try adding -mfpu=neon to CFLAGS" - echo "If you really want to run on such a CPU, configure with --disable-asm." - exit 1 + echo "Disabling asm" + asm="no" fi # Check for higher .arch levels. We only need armv8.2-a in order to # enable the extensions we want below - we primarily want to control @@@@ -1071,8 +1088,8 @@@@ if [ $asm = auto -a $ARCH = MIPS ] ; the define HAVE_MSA else echo "You specified a pre-MSA CPU in your CFLAGS." - echo "If you really want to run on such a CPU, configure with --disable-asm." - exit 1 + echo "Disabling asm" + asm="no" fi fi @@@@ -1096,7 +1113,7 @@@@ ASFLAGS="$ASFLAGS -DSTACK_ALIGNMENT=$sta CPU_ENDIAN="little-endian" if [ $compiler = GNU ]; then echo "int i[2] = {0x42494745,0}; double f[2] = {0x1.0656e6469616ep+102,0};" > conftest.c - $CC $CFLAGS -fno-lto conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed" + $CC $CPPFLAGS -fno-lto conftest.c -c -o conftest.o 2>/dev/null || die "endian test failed" if (${STRINGS} -a conftest.o | grep -q BIGE) && (${STRINGS} -a conftest.o | grep -q FPendian) ; then define WORDS_BIGENDIAN CPU_ENDIAN="big-endian" @@@@ -1119,7 +1136,7 @@@@ fi # autodetect options that weren't forced nor disabled -libpthread="" +libpthread="$PTHREAD_LDFLAGS $PTHREAD_LIBS" if [ "$SYS" = "WINDOWS" -a "$thread" = "posix" ] ; then if [ "$gpl" = "no" ] ; then echo "Warning: pthread-win32 is LGPL and is therefore not supported with --disable-gpl" @@@@ -1394,7 +1411,7 @@@@ if [ "$pic" = "yes" ] ; then [ "$SYS" != WINDOWS -a "$SYS" != CYGWIN ] && CFLAGS="$CFLAGS -fPIC" [[ "$ASFLAGS" != *"-DPIC"* ]] && ASFLAGS="$ASFLAGS -DPIC" # resolve textrels in the x86 asm - cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic" + cc_check stdio.h "-Wl,-Bsymbolic" && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic" [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text" fi @@@@ -1410,7 +1427,6 @@@@ if [ "$debug" = "yes" ]; then CFLAGS="-O1 -g $CFLAGS" RCFLAGS="$RCFLAGS -DDEBUG" else - CFLAGS="-O3 -ffast-math $CFLAGS" if [ "$lto" = "auto" ] && [ $compiler = GNU ] && cc_check "" "-flto" ; then lto="yes" CFLAGS="$CFLAGS -flto" @ 1.1 log @x264: added version 20220601 x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format. @ text @d1 1 a1 1 $NetBSD: patch-configure,v 1.5 2021/07/14 13:19:42 schmonz Exp $ d10 1 a10 1 --- configure.orig 2022-09-13 09:25:28.000000000 +0000 d12 1 a12 1 @@@@ -664,6 +664,10 @@@@ case $host_os in d23 1 a23 1 @@@@ -764,7 +768,7 @@@@ case $host_cpu in d32 1 a32 1 @@@@ -793,14 +797,15 @@@@ case $host_cpu in d49 1 a49 1 @@@@ -839,6 +844,18 @@@@ case $host_cpu in d68 1 a68 1 @@@@ -985,8 +1002,8 @@@@ if [ $asm = auto -a $ARCH = ARM ] ; then d79 2 a80 2 @@@@ -1000,8 +1017,8 @@@@ if [ $asm = auto -a $ARCH = AARCH64 ] ; ASFLAGS="$ASFLAGS -c" d88 3 a90 3 fi @@@@ -1019,8 +1036,8 @@@@ if [ $asm = auto -a $ARCH = MIPS ] ; the d101 1 a101 1 @@@@ -1037,7 +1054,7 @@@@ ASFLAGS="$ASFLAGS -DSTACK_ALIGNMENT=$sta d110 1 a110 1 @@@@ -1060,7 +1077,7 @@@@ fi d119 1 a119 1 @@@@ -1319,7 +1336,7 @@@@ if [ "$pic" = "yes" ] ; then d128 1 a128 1 @@@@ -1335,7 +1352,6 @@@@ if [ "$debug" = "yes" ]; then @