[vlc-commits] [Git][videolan/vlc][master] contrib: build postproc as part of ffmpeg
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Wed Apr 13 23:22:51 UTC 2022
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
599191d3 by Marvin Scholz at 2022-04-13T22:38:33+00:00
contrib: build postproc as part of ffmpeg
If GPL is enabled, build postproc together with ffmpeg
instead of building an ffmpeg-less ancient version with
numerous bugs.
Should fix crashes on macOS and possibly other OSes when
postproc is used.
- - - - -
4 changed files:
- contrib/src/ffmpeg/rules.mak
- − contrib/src/postproc/postproc-ranlib.patch
- − contrib/src/postproc/rules.mak
- − contrib/src/postproc/win-pic.patch
Changes:
=====================================
contrib/src/ffmpeg/rules.mak
=====================================
@@ -53,6 +53,13 @@ else
FFMPEGCONF += --disable-encoders --disable-muxers
endif
+# Postproc
+MAYBE_POSTPROC =
+ifdef GPL
+FFMPEGCONF += --enable-gpl --enable-postproc
+MAYBE_POSTPROC = libpostproc
+endif
+
# Small size
ifdef WITH_OPTIMIZATION
ifdef ENABLE_SMALL
@@ -194,7 +201,7 @@ endif
# Build
PKGS += ffmpeg
-ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale"),)
+ifeq ($(call need_pkg,"libavcodec >= $(FFMPEG_LAVC_MIN) libavformat >= 53.21.0 libswscale $(MAYBE_POSTPROC)"),)
PKGS_FOUND += ffmpeg
endif
=====================================
contrib/src/postproc/postproc-ranlib.patch deleted
=====================================
@@ -1,45 +0,0 @@
---- postproc/configure.ranlib 2019-02-15 16:40:11.186212500 +0100
-+++ postproc/configure 2019-02-15 13:43:31.904482900 +0100
-@@ -95,6 +95,7 @@ Advanced options (experts only):
- --ar=AR use archive tool AR [$ar_default]
- --as=AS use assembler AS [$as_default]
- --cc=CC use C compiler CC [$cc_default]
-+ --ranlib=RANLIB use assembler AS [$ranlib_default]
- --ld=LD use linker LD
- --host-cc=HOSTCC use host C compiler HOSTCC
- --host-cflags=HCFLAGS use HCFLAGS when compiling for host
-@@ -994,6 +995,7 @@ CMDLINE_SET="
- nm
- optflags
- pkg_config
-+ ranlib
- samples
- sysinclude
- sysroot
-@@ -1453,7 +1455,7 @@ ln_s="ln -sf"
- nm_default="nm"
- objformat="elf"
- pkg_config_default=pkg-config
--ranlib="ranlib"
-+ranlib_default="ranlib"
- yasmexe="yasm"
-
- nm_opts='-g'
-@@ -1673,7 +1675,7 @@ ar_default="${cross_prefix}${ar_default}
- cc_default="${cross_prefix}${cc_default}"
- nm_default="${cross_prefix}${nm_default}"
- pkg_config_default="${cross_prefix}${pkg_config_default}"
--ranlib="${cross_prefix}${ranlib}"
-+ranlib_default="${cross_prefix}${ranlib_default}"
-
- sysinclude_default="${sysroot}/usr/include"
-
-@@ -1930,7 +1932,7 @@ test -n "$cc_type" && enable $cc_type ||
- : ${as_default:=$cc}
- : ${dep_cc_default:=$cc}
- : ${ld_default:=$cc}
--set_default ar as dep_cc ld
-+set_default ar as dep_cc ld ranlib
-
- test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD
- test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD
=====================================
contrib/src/postproc/rules.mak deleted
=====================================
@@ -1,140 +0,0 @@
-# POSTPROC
-
-POSTPROC_URL := http://git.videolan.org/git/libpostproc.git
-POSTPROC_HASH := 3b7053f46dbfe4662063345245cb00b6acbbe969
-POSTPROC_VERSION := $(POSTPROC_HASH)
-
-POSTPROCCONF = \
- --cc="$(CC)" \
- --ar="$(AR)" \
- --ranlib="$(RANLIB)" \
- --disable-debug \
- --enable-gpl \
- --enable-postproc
-
-DEPS_postproc = ffmpeg
-
-ifdef ENABLE_SMALL
-POSTPROCCONF += --enable-small
-endif
-ifdef HAVE_ARMV7A
-POSTPROCCONF += --enable-thumb
-endif
-
-ifdef HAVE_CROSS_COMPILE
-POSTPROCCONF += --enable-cross-compile
-ifndef HAVE_IOS
-POSTPROCCONF += --cross-prefix=$(HOST)-
-endif
-endif
-
-# ARM stuff
-ifeq ($(ARCH),arm)
-POSTPROCCONF += --disable-runtime-cpudetect --arch=arm
-ifdef HAVE_ARMV7A
-POSTPROCCONF += --cpu=cortex-a8
-endif
-ifdef HAVE_NEON
-POSTPROCCONF += --enable-neon
-endif
-endif
-
-# ARM64 stuff
-ifeq ($(ARCH),aarch64)
-POSTPROCCONF += --arch=aarch64
-endif
-
-# MIPS stuff
-ifeq ($(ARCH),mipsel)
-POSTPROCCONF += --arch=mips
-endif
-ifeq ($(ARCH),mips64el)
-POSTPROCCONF += --arch=mips64
-endif
-
-# RISC-V stuff
-ifneq ($(findstring $(ARCH),riscv32 riscv64),)
-POSTPROCCONF += --arch=riscv
-endif
-
-# x86 stuff
-ifeq ($(ARCH),i386)
-POSTPROCCONF += --arch=x86
-endif
-
-# x86_64 stuff
-ifeq ($(ARCH),x86_64)
-POSTPROCCONF += --arch=x86_64
-endif
-
-# Darwin
-ifdef HAVE_DARWIN_OS
-POSTPROCCONF += --arch=$(ARCH) --target-os=darwin
-endif
-ifeq ($(ARCH),x86_64)
-POSTPROCCONF += --cpu=core2
-endif
-ifdef HAVE_IOS
-ifeq ($(ARCH),arm)
-POSTPROCCONF += --as="$(AS)"
-endif
-endif
-
-# Linux
-ifdef HAVE_LINUX
-POSTPROCCONF += --target-os=linux --enable-pic
-endif
-
-ifdef HAVE_ANDROID
-ifeq ($(ANDROID_ABI), x86)
-POSTPROCCONF += --disable-mmx --disable-mmxext
-endif
-endif
-
-# Windows
-ifdef HAVE_WIN32
-POSTPROCCONF += --target-os=mingw32
-ifeq ($(ARCH),x86_64)
-POSTPROCCONF += --cpu=athlon64 --arch=x86_64
-endif
-ifeq ($(ARCH),i386)
-POSTPROCCONF+= --cpu=i686 --arch=x86
-endif
-else
-POSTPROCCONF += --enable-pthreads
-endif
-
-ifdef HAVE_SOLARIS
-POSTPROCCONF += --enable-pic
-endif
-
-# Build
-
-ifdef GPL
-PKGS += postproc
-endif
-ifeq ($(call need_pkg,"libpostproc"),)
-PKGS_FOUND += postproc
-endif
-
-$(TARBALLS)/postproc-$(POSTPROC_VERSION).tar.xz:
- $(call download_git,$(POSTPROC_URL),,$(POSTPROC_HASH))
-
-.sum-postproc: $(TARBALLS)/postproc-$(POSTPROC_VERSION).tar.xz
- $(call check_githash,$(POSTPROC_HASH))
- touch $@
-
-postproc: postproc-$(POSTPROC_VERSION).tar.xz .sum-postproc
- $(UNPACK)
- $(APPLY) $(SRC)/postproc/win-pic.patch
- $(APPLY) $(SRC)/postproc/postproc-ranlib.patch
- $(MOVE)
-
-.postproc: postproc
- $(REQUIRE_GPL)
- cd $< && $(HOSTVARS) ./configure \
- --extra-cflags="$(EXTRA_CFLAGS)" \
- --extra-ldflags="$(LDFLAGS)" $(POSTPROCCONF) \
- --prefix="$(PREFIX)" --enable-static --disable-shared
- cd $< && $(MAKE) install-libs install-headers
- touch $@
=====================================
contrib/src/postproc/win-pic.patch deleted
=====================================
@@ -1,20 +0,0 @@
-diff -urN postproc-orig/configure postproc/configure
---- postproc-orig/configure 2012-08-21 23:27:39.000000000 +0300
-+++ postproc/configure 2018-02-26 10:36:48.956225615 +0200
-@@ -2419,8 +2419,14 @@
- enable_pic() {
- enable pic
- add_cppflags -DPIC
-- add_cflags -fPIC
-- add_asflags -fPIC
-+ case "$target_os" in
-+ mingw*|cygwin*|win*)
-+ ;;
-+ *)
-+ add_cflags -fPIC
-+ add_asflags -fPIC
-+ ;;
-+ esac
- }
-
- enabled pic && enable_pic
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/599191d3a4063d9d69b29f3a9bbd99fbfa636455
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/599191d3a4063d9d69b29f3a9bbd99fbfa636455
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list