[vlc-devel] Contrib patches

Rafaël Carré funman at videolan.org
Wed Mar 21 17:27:54 CET 2012


Le 2012-03-21 09:27, Felix Paul Kühne a écrit :
> Hello,
> 
> here are a few more patches for the iOS contribs:
> 
> 0001: cleans up the custom assembler stuff used to compile ffmpeg/libav by moving it to main.mak to make it accessible for other libraries
> 0002: slightly improves the installation of the gas-preprocessor makro
> 0003: adds support for iOS to libogg by disabling "make check"
> 0004: adds support for iOS to libflac by s/HAVE_MACOSX/HAVE_DARWIN_OS
> 0005: adds support for iOS to lua by expanding its makefiles adding iOS as an additional platform
> 0006: adds support for iOS to libpostproc by following an approach similar to libav/ffmpeg.
> 
> Libraries left to do: libgcrypt and gnutls, liborc and libschroedinger. IMO, the latter don't make much sense on a low-power platform though.
> 
> 
> Looking forward to your remarks!
> 
> Best regards,
> 
> Felix
> 
> 
> 
> 0001-contrib-ffmpeg-cleaned-up-compilation-for-iOS.patch
> 
> 
> From 5a0bbde5244cbf3a56f7b75fbddc4f07bfd9e7f5 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 12:40:07 +0100
> Subject: [PATCH 1/6] contrib/ffmpeg: cleaned up compilation for iOS
> 
> ---
>  contrib/src/ffmpeg/rules.mak |    5 ++++-
>  contrib/src/main.mak         |    5 +++++
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
> index 34c86ee..af97865 100644
> --- a/contrib/src/ffmpeg/rules.mak
> +++ b/contrib/src/ffmpeg/rules.mak
> @@ -70,7 +70,10 @@ FFMPEGCONF += --cpu=core2
>  endif
>  endif
>  ifdef HAVE_IOS
> -FFMPEGCONF += --as="$(TOPSRC)/../extras/tools/gas/gas-preprocessor.pl $(CC)" --enable-pic
> +FFMPEGCONF += --as="$(AS)" --enable-pic
> +ifeq ($(ARCH), arm)
> +FFMPEGCONF += --cpu=cortex-a8
> +endif
>  endif
>  
>  # Linux
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 47d4a54..b911491 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -150,6 +150,11 @@ endif
>  ifdef HAVE_IOS
>  CC=xcrun clang
>  CXX=xcrun clang++
> +ifeq ($(ARCH), arm)
> +AS=perl $(abspath ../../extras/tools/build/bin/gas-preprocessor.pl) $(CC)
> +else
> +AS=xcrun as
> +endif
>  AR=xcrun ar
>  LD=xcrun ld
>  STRIP=xcrun strip
> -- 1.7.7.5 (Apple Git-26)

OK

> 
> 
> 0002-extras-tools-improve-gas-installation.patch
> 
> 
> From a57fdf926727e81638b6b9cc24078c4fb53a460b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 12:40:38 +0100
> Subject: [PATCH 2/6] extras/tools: improve gas installation
> 
> ---
>  extras/tools/tools.mak |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
> index 33a9b30..fd435d5 100644
> --- a/extras/tools/tools.mak
> +++ b/extras/tools/tools.mak
> @@ -206,6 +206,7 @@ gas: yuvi-gas-preprocessor-$(GAS_VERSION).tar.gz
>  	$(MOVE)
>  
>  .gas: gas
> +	cp gas/gas-preprocessor.pl build/bin/
>  	touch $@
>  
>  CLEAN_FILE += .gas
> -- 1.7.7.5 (Apple Git-26)

OK

> 
> 
> 0003-contrib-libogg-added-support-for-iOS-by-disabling-ma.patch
> 
> 
> From ee79a817ebd1c2d45eaedfd2828ee086b39ab2c0 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 13:08:02 +0100
> Subject: [PATCH 3/6] contrib/libogg: added support for iOS by disabling make
>  check
> 
> ---
>  contrib/src/ogg/libogg-disable-check.patch |   12 ++++++++++++
>  contrib/src/ogg/rules.mak                  |    7 ++++++-
>  2 files changed, 18 insertions(+), 1 deletions(-)
>  create mode 100644 contrib/src/ogg/libogg-disable-check.patch
> 
> diff --git a/contrib/src/ogg/libogg-disable-check.patch b/contrib/src/ogg/libogg-disable-check.patch
> new file mode 100644
> index 0000000..5801b37
> --- /dev/null
> +++ b/contrib/src/ogg/libogg-disable-check.patch
> @@ -0,0 +1,12 @@
> +diff -ru libogg/src/Makefile.am libogg/src/Makefile.am
> +--- libogg/src/Makefile.am	2011-08-04 19:07:42.000000000 +0200
> ++++ libogg-f/src/Makefile.am	2012-03-21 13:05:23.000000000 +0100
> +@@ -9,7 +9,7 @@
> + 
> + # build and run the self tests on 'make check'
> + 
> +-noinst_PROGRAMS = test_bitwise test_framing
> ++noinst_PROGRAMS =
> + 
> + test_bitwise_SOURCES = bitwise.c
> + test_bitwise_CFLAGS = -D_V_SELFTEST
> diff --git a/contrib/src/ogg/rules.mak b/contrib/src/ogg/rules.mak
> index 5d49122..a9d833e 100644
> --- a/contrib/src/ogg/rules.mak
> +++ b/contrib/src/ogg/rules.mak
> @@ -22,11 +22,16 @@ libogg: libogg-$(OGG_VERSION).tar.xz .sum-ogg
>  ifdef HAVE_WINCE
>  	$(APPLY) $(SRC)/ogg/libogg-wince.patch
>  endif
> +ifdef HAVE_IOS
> +	$(APPLY) $(SRC)/ogg/libogg-disable-check.patch
> +endif

Make that unconditionnal

>  	$(UPDATE_AUTOCONFIG)
>  	$(MOVE)
>  
>  .ogg: libogg
> -	#$(RECONF)
> +ifdef HAVE_IOS
> +	$(RECONF)
> +endif

Idem

>  	cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
>  	cd $< && $(MAKE) install
>  	touch $@
> -- 1.7.7.5 (Apple Git-26)
> 
> 
> 0004-contrib-flac-added-support-for-iOS.patch
> 
> 
> From 17c7b00a5242ca475a853d9ca3d142f76343c615 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 13:10:32 +0100
> Subject: [PATCH 4/6] contrib/flac: added support for iOS
> 
> ---
>  contrib/src/flac/rules.mak |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
> index 457fa30..2e11c7b 100644
> --- a/contrib/src/flac/rules.mak
> +++ b/contrib/src/flac/rules.mak
> @@ -17,7 +17,7 @@ flac: flac-$(FLAC_VERSION).tar.gz .sum-flac
>  	$(UNPACK)
>  	$(APPLY) $(SRC)/flac/flac-win32.patch
>  	$(APPLY) $(SRC)/flac/libFLAC-pc.patch
> -ifdef HAVE_MACOSX
> +ifdef HAVE_DARWIN_OS
>  	cd $(UNPACK_DIR) && sed -e 's,-dynamiclib,-dynamiclib -arch $(ARCH),' -i.orig configure
>  endif
>  	$(UPDATE_AUTOCONFIG)
> @@ -30,7 +30,7 @@ FLACCONF := $(HOSTCONF) \
>  	--disable-cpplibs \
>  	--disable-oggtest
>  # TODO? --enable-sse
> -ifdef HAVE_MACOSX
> +ifdef HAVE_DARWIN_OS
>  ifneq ($(findstring $(ARCH),i386 x86_64),)
>  FLACCONF += --disable-asm-optimizations
>  endif
> -- 1.7.7.5 (Apple Git-26)

OK

> 
> 
> 0005-contrib-lua-added-support-for-iOS.patch
> 
> 
> From 92bf9e277b6d954587283cc3d57fc390832a594a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 14:00:54 +0100
> Subject: [PATCH 5/6] contrib/lua: added support for iOS
> 
> ---
>  contrib/src/lua/lua-ios-support.patch |   25 +++++++++++++++++++++++++
>  contrib/src/lua/rules.mak             |    8 +++++++-
>  2 files changed, 32 insertions(+), 1 deletions(-)
>  create mode 100644 contrib/src/lua/lua-ios-support.patch
> 
> diff --git a/contrib/src/lua/lua-ios-support.patch b/contrib/src/lua/lua-ios-support.patch
> new file mode 100644
> index 0000000..014a1e3
> --- /dev/null
> +++ b/contrib/src/lua/lua-ios-support.patch
> @@ -0,0 +1,25 @@
> +diff -ru lua/Makefile lua-f/Makefile
> +--- lua/Makefile	2008-08-12 02:40:48.000000000 +0200
> ++++ lua-f/Makefile	2012-03-21 13:58:30.000000000 +0100
> +@@ -38,7 +38,7 @@
> + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
> + 
> + # Convenience platforms targets.
> +-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
> ++PLATS= aix ansi bsd freebsd generic linux ios macosx mingw posix solaris
> + 
> + # What to install.
> + TO_BIN= lua luac
> +diff -ru lua/src/Makefile lua-f/src/Makefile
> +--- lua/src/Makefile	2012-03-21 13:58:59.000000000 +0100
> ++++ lua-f/src/Makefile	2012-03-21 13:57:08.000000000 +0100
> +@@ -98,6 +98,9 @@
> + linux:
> + 	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl"
> + 
> ++ios:
> ++	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX


LUA_USE_LINUX? really?

> ++
> + macosx:
> + 	$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
> + # use this on Mac OS X 10.3-
> diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
> index 765f4e2..dc6d7e9 100644
> --- a/contrib/src/lua/rules.mak
> +++ b/contrib/src/lua/rules.mak
> @@ -14,6 +14,9 @@ endif
>  ifdef HAVE_MACOSX
>  LUA_TARGET := macosx
>  endif
> +ifdef HAVE_IOS
> +LUA_TARGET := ios
> +endif
>  ifdef HAVE_WIN32
>  LUA_TARGET := mingw
>  endif
> @@ -34,12 +37,15 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
>  	$(APPLY) $(SRC)/lua/lua-noreadline.patch
>  	$(APPLY) $(SRC)/lua/luac-32bits.patch
>  	$(APPLY) $(SRC)/lua/no-localeconv.patch
> -ifdef HAVE_MACOSX
> +ifdef HAVE_DARWIN_OS
>  	(cd $(UNPACK_DIR) && \
>  	sed -e 's%gcc%$(CC)%' \
>  		-e 's%LDFLAGS=%LDFLAGS=$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
>  		-i.orig src/Makefile)
>  endif
> +ifdef HAVE_IOS
> +	$(APPLY) $(SRC)/lua/lua-ios-support.patch
> +endif

Make that unconditional since the patch doesn't affect other platforms

>  ifdef HAVE_WIN32
>  	cd $(UNPACK_DIR) && sed -i.orig -e 's/lua luac/lua.exe/' Makefile
>  endif
> -- 1.7.7.5 (Apple Git-26)

Btw what is the problem with the macosx target?

> 
> 
> 0006-contrib-postproc-added-support-for-iOS.patch
> 
> 
> From 611718f0917141f450914dc2b17e3d07a35c8fa8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne at videolan.org>
> Date: Wed, 21 Mar 2012 14:19:35 +0100
> Subject: [PATCH 6/6] contrib/postproc: added support for iOS
> 
> ---
>  contrib/src/postproc/rules.mak |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/src/postproc/rules.mak b/contrib/src/postproc/rules.mak
> index 80d5527..5f18208 100644
> --- a/contrib/src/postproc/rules.mak
> +++ b/contrib/src/postproc/rules.mak
> @@ -15,7 +15,10 @@ POSTPROCCONF += --enable-small --optflags=-O2
>  endif
>  
>  ifdef HAVE_CROSS_COMPILE
> -POSTPROCCONF += --enable-cross-compile --cross-prefix=$(HOST)-
> +POSTPROCCONF += --enable-cross-compile
> +ifndef HAVE_IOS
> +POSTPROCCONF += --cross-prefix=$(HOST)-
> +endif
>  endif
>  
>  # ARM stuff
> @@ -28,9 +31,12 @@ endif
>  endif
>  
>  # Darwin
> -ifdef HAVE_DARWIN_OS
> +ifdef HAVE_MACOSX
>  POSTPROCCONF += --arch=$(ARCH) --target-os=darwin
>  endif
> +ifdef HAVE_IOS
> +POSTPROCCONF += --cpu=cortex-a8 --as="$(AS)" --target-os=darwin
> +endif
>  ifeq ($(ARCH),x86_64)
>  POSTPROCCONF += --cpu=core2
>  endif
> -- 1.7.7.5 (Apple Git-26)

OK



More information about the vlc-devel mailing list