Commit a1266366 authored by Sam Hocevar's avatar Sam Hocevar

* Various patches to allow more contribs to build on OS X x86. Only x264

    and goom still do not build. I successfully built a native VLC using
    the current contribs and the following configuration line:

    ./configure --disable-x11 --disable-xvideo --disable-glx --disable-gtk \
       --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
       --with-ffmpeg-zlib --enable-mad --enable-dvbpsi --enable-a52 \
       --disable-dvdplay --enable-dvdnav --enable-faad --enable-vorbis \
       --enable-ogg --enable-theora --enable-faac --enable-mkv \
       --enable-freetype --disable-cddax --disable-vcdx --enable-speex \
       --enable-flac --disable-goom --enable-livedotcom --enable-caca \
       --disable-skins2 --disable-wxwidgets --enable-modplug --enable-daap \
       --enable-x264 --enable-shout --enable-twolame --enable-debug

    Apparently the native video output does not work yet, but sound and codecs
    seem rather OK.
parent cfb7dfac
......@@ -107,18 +107,25 @@ ifdef HAVE_BEOS
FFMPEGCONF+= --cpu=x86
endif
ifeq ($(HOST),i686-apple-darwin8)
FFMPEGCONF += --enable-memalign-hack
endif
# ***************************************************************************
# Standard rules
# ***************************************************************************
ifdef HAVE_DARWIN_OS
all: .autoconf .automake .libtool .iconv .intl .pkgcfg .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .x264 .theora \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
.dvdcss .dvdnav .dvdread .dvbpsi .live .goom2k4 .caca .mod \
.dvdcss .dvdnav .dvdread .dvbpsi .live .caca .mod \
.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager .SDL_image \
.glib .libidl .gecko .mpcdec .expat .clinkcc .aclocal
# .mozilla will build an entire mozilla. it can be used if we need to create a new .gecko package
ifneq ($(HOST),i686-apple-darwin8)
all: .x264 .goom2k4
endif
else
ifdef HAVE_BEOS
......@@ -674,6 +681,9 @@ flac-$(FLAC_VERSION).tar.gz:
flac: flac-$(FLAC_VERSION).tar.gz
$(EXTRACT_GZ)
ifdef HAVE_DARWIN_OS
patch -p 0 < Patches/flac-mactel.patch
endif
ifneq ($(HOST),$(BUILD))
(patch -p 0 < Patches/flac-cross.patch && cd $@ && autoconf)
endif
......@@ -861,6 +871,9 @@ endif
ifdef HAVE_DARWIN_OS
patch -p 0 < Patches/ffmpeg-cvs-osx.patch
endif
ifeq ($(HOST),i686-apple-darwin8)
(cd $@;patch -p 0 < ../Patches/ffmpeg-cvs-mactel.patch)
endif
ffmpeg-$(FFMPEG_VERSION).tar.gz:
$(WGET) $(FFMPEG_URL)
......@@ -953,6 +966,7 @@ libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2:
libdvdnav: libdvdnav-$(LIBDVDNAV_VERSION).tar.bz2
$(EXTRACT_BZ2)
patch -p 0 < Patches/dvdnav.patch
patch -p 0 < Patches/libdvdnav-mactel.patch
(cd $@; ./autogen.sh noconfig)
.dvdnav: libdvdnav .dvdcss
......@@ -1120,10 +1134,14 @@ x264:
$(SVN) co svn://svn.videolan.org/x264/trunk/ x264
ifdef HAVE_WIN32
(cd x264; patch -p 0 < ../Patches/x264-svn-win32.patch )
else
ifdef HAVE_DARWIN_OS
(cd x264;patch -p 0 < ../Patches/x264-mactel-ugly.patch)
else
patch -p 0 < Patches/x264_svn.patch
rm x264/x264.c
endif
endif
else
x264-$(X264_VERSION).tar.gz:
$(WGET) $(X264_URL)
......
......@@ -31,7 +31,7 @@ diff -u -r1.66 common.h
- #if defined(_WIN32) && !defined(__MINGW32__)
+ #if defined(__MINGWCE__)
+ #elif defined(__MINGW32__)
+ #elif defined(__MINGW32__) || defined(__APPLE__)
#define HAS_LRINTF
+ #elif defined(_WIN32)
+ #define HAS_LRINTF
......
This diff is collapsed.
diff -puriN flac/configure flac-patched/configure
--- flac/configure 2006-01-26 22:42:40.000000000 +0100
+++ flac-patched/configure 2006-01-26 22:36:50.000000000 +0100
@@ -8702,6 +8702,7 @@ fi
case "$host" in
i386-*-openbsd3.[0-3]) OBJ_FORMAT=aoutb ;;
+ i*86-apple-darwin*) OBJ_FORMAT=macho ;;
*) OBJ_FORMAT=elf ;;
esac
diff -puriN flac/configure.in flac-patched/configure.in
--- flac/configure.in 2006-01-26 22:42:36.000000000 +0100
+++ flac-patched/configure.in 2006-01-26 22:36:50.000000000 +0100
@@ -52,6 +52,7 @@ AM_CONDITIONAL(FLaC__CPU_PPC, test x$cpu
AM_CONDITIONAL(FLaC__CPU_SPARC, test x$cpu_sparc = xtrue)
case "$host" in
i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
+ i*86-apple-darwin*) OBJ_FORMAT=macho ;;
*) OBJ_FORMAT=elf ;;
esac
AC_SUBST(OBJ_FORMAT)
diff -puriN flac/src/libFLAC/ia32/nasm.h flac-patched/src/libFLAC/ia32/nasm.h
--- flac/src/libFLAC/ia32/nasm.h 2005-01-25 05:14:22.000000000 +0100
+++ flac-patched/src/libFLAC/ia32/nasm.h 2006-01-26 22:38:54.000000000 +0100
@@ -45,6 +45,11 @@
%idefine code_section section .text
%idefine data_section section .data
%idefine bss_section section .bss
+%elifdef OBJ_FORMAT_macho
+ %define FLAC__PUBLIC_NEEDS_UNDERSCORE
+ %idefine code_section section .text
+ %idefine data_section section .data
+ %idefine bss_section section .bss
%elifdef OBJ_FORMAT_elf
%idefine code_section section .text align=16
%idefine data_section section .data align=32
diff -puriN libdvdnav-orig/src/dvdread/bswap.h libdvdnav/src/dvdread/bswap.h
--- libdvdnav-orig/src/dvdread/bswap.h 2006-01-26 23:26:43.000000000 +0100
+++ libdvdnav/src/dvdread/bswap.h 2006-01-26 23:27:57.000000000 +0100
@@ -59,6 +59,12 @@
#define B2N_32(x) x = be32toh(x)
#define B2N_64(x) x = be64toh(x)
+#elif defined(__APPLE__)
+#include <libkern/OSByteOrder.h>
+#define B2N_16(x) x = OSSwapBigToHostConstInt16(x)
+#define B2N_32(x) x = OSSwapBigToHostConstInt32(x)
+#define B2N_64(x) x = OSSwapBigToHostConstInt64(x)
+
/* This is a slow but portable implementation, it has multiple evaluation
* problems so beware.
* Old FreeBSD's and Solaris don't have <byteswap.h> or any other such
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment