diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile index 1cd1e1c91140..9f8a276701dc 100644 --- a/multimedia/x264/Makefile +++ b/multimedia/x264/Makefile @@ -1,84 +1,85 @@ PORTNAME= x264 DISTVERSION= 0.165.3223 +PORTREVISION= 1 CATEGORIES= multimedia MAINTAINER= multimedia@FreeBSD.org COMMENT?= H.264/MPEG-4 AVC Video Encoding (CLI utility) WWW= https://www.videolan.org/x264.html LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS?= libx264.so:multimedia/libx264 USES+= meson pkgconfig python:build shebangfix SHEBANG_GLOB= *.py USE_GITLAB= yes GL_SITE= https://gitlab.freedesktop.org/gstreamer GL_ACCOUNT= meson-ports GL_PROJECT= x264 GL_TAGNAME= 00852f599572d10798b2dafd2c5286213d0ce795 PLIST_FILES?= bin/x264 OPTIONS_DEFINE+= BASH FFMS LAVF SWSCALE OPTIONS_DEFAULT+= BASH FFMS LAVF LSMASH SWSCALE OPTIONS_RADIO= MP4 #OPTIONS_RADIO_MP4= GPAC LSMASH OPTIONS_RADIO_MP4= LSMASH FFMS_DESC= FFmpeg Source input support #GPAC_DESC= GPAC library support LAVF_DESC= libav* format input support (requires FFmpeg) LSMASH_DESC= L-SMASH library support MP4_DESC= MPEG-4 output SWSCALE_DESC= Resize video filter BASH_BUILD_DEPENDS= bash-completion>0:shells/bash-completion BASH_RUN_DEPENDS= bash-completion>0:shells/bash-completion BASH_PLIST_FILES= share/bash-completion/completions/x264 FFMS_LIB_DEPENDS= libffms2.so:multimedia/ffms2 FFMS_MESON_ENABLED= ffms FFMS_IMPLIES= SWSCALE #GPAC_LIB_DEPENDS= libgpac.so:multimedia/gpac #GPAC_USES= localbase:ldflags #GPAC_MESON_ENABLED= gpac LAVF_LIB_DEPENDS= libavformat.so:multimedia/ffmpeg LAVF_MESON_ENABLED= lavf LAVF_IMPLIES= SWSCALE LSMASH_LIB_DEPENDS= liblsmash.so:multimedia/l-smash LSMASH_MESON_ENABLED= lsmash SWSCALE_LIB_DEPENDS= libswscale.so:multimedia/ffmpeg SWSCALE_MESON_ENABLED= swscale .include .if !defined(PKGNAMEPREFIX) || (${ARCH} != "aarch64" && ${ARCH} != "amd64" && empty(ARCH:Mpowerpc64*)) MESON_ARGS+= -Dasm=disabled -Dvsx=disabled .endif .if defined(PKGNAMEPREFIX) && ${ARCH} == "powerpc64" && ${PORT_OPTIONS:MASM} && empty(MACHINE_CPU:Mvsx) IGNORE= ASM requires VSX on powerpc64; set CPUTYPE=power7 or newer, or disable the ASM option .endif post-patch: @${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|g' \ ${PATCH_WRKSRC}/meson.build @${REINPLACE_CMD} -e 's|%%GIT_COMMIT_HASH%%|${GL_TAGNAME}|g' \ ${PATCH_WRKSRC}/meson.build .if !defined(PKGNAMEPREFIX) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${MESON_BUILD_DIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin .endif do-install-BASH-on: ${INSTALL_SCRIPT} ${WRKSRC}/tools/bash-autocomplete.sh ${STAGEDIR}${PREFIX}/share/bash-completion/completions/x264 .include diff --git a/multimedia/x264/files/patch-common_cpu.c b/multimedia/x264/files/patch-common_cpu.c new file mode 100644 index 000000000000..231c7d79c9ae --- /dev/null +++ b/multimedia/x264/files/patch-common_cpu.c @@ -0,0 +1,15 @@ +--- common/cpu.c.orig 2026-08-13 20:46:48 UTC ++++ common/cpu.c +@@ -658,10 +658,10 @@ int x264_cpu_num_processors( void ) + get_system_info( &info ); + return info.cpu_count; + +-#elif SYS_MACOSX ++#elif SYS_MACOSX || SYS_FREEBSD + int ncpu; + size_t length = sizeof( ncpu ); +- if( sysctlbyname("hw.logicalcpu", &ncpu, &length, NULL, 0) ) ++ if( sysctlbyname("hw.ncpu", &ncpu, &length, NULL, 0) ) + { + ncpu = 1; + }