Commit 6093d524 authored by hartman's avatar hartman
Browse files

* make more contribs work with SDK. refs #182

parent 0cf15f0a
......@@ -103,3 +103,4 @@ package-win32: FORCE
(cd tmp; tar cf - usr/win32/) | bzip2 -c > contrib-`date +%Y%m%d`-win32-bin-gcc-`$(CC) --version|head -n 1|cut -f 3 -d ' '`-only.tar.bz2
rm -rf tmp
FORCE:
......@@ -68,13 +68,14 @@ case $HOST in
# Makefile cross compiling is only supported with gcc-4.0
# ENVP defines the oldest environment on which the program will be able to run
# SDK 10.2.8 requires gcc-3.3 (so we cannot use that SDK)
SDK_TARGET=10.3
echo "SDK_TARGET = ${SDK_TARGET}" >> config.mak
echo "HAVE_DARWIN_OS = 1" >> config.mak
echo "ENVP = MACOSX_DEPLOYMENT_TARGET=10.3" >> config.mak
echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.3.0.sdk" >> config.mak
echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.3.9.sdk" >> config.mak
# EXTRA_CFLAGS=" -D\${ENVP} -isysroot \${MACOSX_SDK}"
EXTRA_CPPFLAGS=" -no-cpp-precomp"
# EXTRA_LDFLAGS=" -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK}"
echo "PATH = /bin:/usr/bin" >> config.mak
echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak
;;
i586-pc-beos)
echo "HAVE_BEOS = 1" >> config.mak
......
......@@ -36,6 +36,7 @@ include ./packages.mak
export PATH := $(PREFIX)/bin:$(EXTRA_PATH):$(PATH)
export PKG_CONFIG_PATH
export DYLD_LIBRARY_PATH = $(PREFIX)/lib
export MACOSX_DEPLOYMENT_TARGET = $(SDK_TARGET)
export LIBRARY_PATH := $(PREFIX)/lib:$(LIBRARY_PATH)
export CFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
export CPPFLAGS = -I$(PREFIX)/include $(EXTRA_CFLAGS) $(EXTRA_CPPFLAGS)
......@@ -116,12 +117,14 @@ endif
# ***************************************************************************
ifdef HAVE_DARWIN_OS
all: .autoconf .automake .libtool .iconv .intl .pkgcfg .freetype .fribidi \
all: .autoconf .automake .libtool .intl .pkgcfg .freetype .fribidi \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .vorbisenc .theora \
.FLAC .speex .shout .faad .faac .lame .twolame .ebml .matroska .ffmpeg \
.dvdcss .dvdnav .dvdread .dvbpsi .live .x264 .caca .mod \
.png .gpg-error .gcrypt .gnutls .opendaap .cddb .cdio .vcdimager .SDL_image \
.glib .libidl .gecko .mpcdec .expat .clinkcc .aclocal
# .FLAC .expat .clinkcc don't work with SDK yet
# .glib .libidl .gecko are required to build the mozilla plugin
# .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: .goom2k4
......@@ -341,6 +344,7 @@ pkgconfig-$(PKGCFG_VERSION).tar.gz:
pkgconfig: pkgconfig-$(PKGCFG_VERSION).tar.gz
$(EXTRACT_GZ)
patch -d pkgconfig/glib-1.2.8 -p 1 < Patches/glib.patch
.pkgcfg: pkgconfig
(cd pkgconfig; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
......@@ -359,9 +363,6 @@ gettext-$(GETTEXT_VERSION).tar.gz:
gettext: gettext-$(GETTEXT_VERSION).tar.gz
$(EXTRACT_GZ)
ifdef HAVE_DARWIN_OS
patch -p 0 < Patches/gettext-osx.patch
endif
.intl: gettext .iconv
ifdef HAVE_WIN32
......@@ -405,14 +406,16 @@ ifdef HAVE_DARWIN_OS
patch -p 0 < Patches/libiconv.patch
endif
.iconv: libiconv
ifdef HAVE_DARWIN_OS
.iconv:
touch $@
(cd libiconv; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
else
.iconv: libiconv
(cd libiconv; CPPFLAGS="-Dssize_t=long" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
endif
$(INSTALL_NAME)
touch $@
endif
CLEAN_FILE += .iconv
CLEAN_PKG += libiconv
......@@ -562,9 +565,11 @@ libogg-$(OGG_VERSION).tar.gz:
libogg: libogg-$(OGG_VERSION).tar.gz
$(EXTRACT_GZ)
patch -p 0 < Patches/ogg.patch
patch -p 0 < Patches/libogg-1.1.patch
ifdef HAVE_WINCE
patch -p 0 < Patches/libogg-wince.patch
endif
(cd $@; autoconf)
.ogg: libogg
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make install)
......@@ -591,6 +596,8 @@ libvorbis-$(VORBIS_VERSION).tar.gz:
libvorbis: libvorbis-$(VORBIS_VERSION).tar.gz
$(EXTRACT_GZ)
patch -p 0 < Patches/libvorbis-1.1.patch
(cd $@; autoconf)
.vorbis: libvorbis .ogg
# FIXME: shared libs disabled for now because of linking errors
......@@ -643,6 +650,7 @@ libtheora-$(THEORA_VERSION).tar.bz2:
libtheora: libtheora-$(THEORA_VERSION).tar.bz2
$(EXTRACT_BZ2)
patch -p0 < Patches/theora.patch
(cd $@; autoconf)
.theora: libtheora .ogg
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest && make && make install)
......@@ -692,7 +700,7 @@ endif
ifdef HAVE_WIN32
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest --disable-asm-optimizations && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
else
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
(cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
endif
$(INSTALL_NAME)
touch $@
......@@ -861,14 +869,10 @@ ifeq ($(HOST),i586-pc-beos)
endif
ifdef HAVE_WIN32
patch -p 0 < Patches/ffmpeg-cvs-win32.patch
patch -p 1 < Patches/ffmpeg-cvs-wince.patch
endif
ifdef HAVE_WINCE
patch -p 1 < Patches/ffmpeg-cvs-wince.patch
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
......@@ -1011,16 +1015,20 @@ live: live555-$(LIVEDOTCOM_VERSION).tar.gz
$(EXTRACT_GZ)
patch -p 0 < Patches/live.patch
patch -p 0 < Patches/livedotcom-win32.patch
patch -p 0 < Patches/livedotcom-osx.patch
patch -p 0 < Patches/live-osx.patch
.live: live
ifeq ($(HOST),ppc-darwin)
(cd $<; ./genMakefiles macosx-before-version-10.4 && make )
ifeq ($(HOST),powerpc-apple-darwin8)
(cd $<; mv config.macosx config.macosx.orig)
(cd $<; sed -e 's%EXTRA_CFLAGS%$(EXTRA_CFLAGS)%' -e 's%EXTRA_LDFLAGS%$(EXTRA_LDFLAGS)%' < config.macosx.orig > config.macosx)
(cd $<; ./genMakefiles macosx && make)
else
ifdef HAVE_WIN32
ifeq ($(HOST),powerpc-apple-darwin*)
(cd $<; ./genMakefiles macosx-before-version-10.4 && make )
elif defined( HAVE_WIN32 )
(cd $<;./genMakefiles mingw && make $(HOSTCC))
else
(cd $<; ./genMakefiles macosx && make )
(cd $<;./genMakefiles linux && make )
endif
endif
touch $@
......@@ -1156,7 +1164,7 @@ ifeq ($(HOST),i686-apple-darwin8)
else
.x264: x264
endif
(cd $<; ./configure $(X264CONF) --prefix=$(PREFIX) && make && make install)
(cd $<; ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
touch $@
CLEAN_FILE += .x264
......@@ -1378,10 +1386,12 @@ libpng-$(PNG_VERSION).tar.bz2:
libpng: libpng-$(PNG_VERSION).tar.bz2
$(EXTRACT_BZ2)
cat Patches/libpng.patch | sed s,PREFIX,$(PREFIX), | patch -p0
ifdef HAVE_WIN32
(cd $@; cat ../Patches/libpng-1.2.5-win32.patch | sed s,PREFIX,$(PREFIX), | patch -p0)
else
(cat Patches/libpng-osx.patch | sed -e 's%??PREFIX??%$(PREFIX)%' -e 's%??EXTRA_CFLAGS??%$(EXTRA_CFLAGS)%' -e 's%??EXTRA_LDFLAGS??%$(EXTRA_LDFLAGS)%' | patch -p0)
endif
.png: libpng
ifdef HAVE_DARWIN_OS
(cd $<; cp scripts/makefile.macosx Makefile && make && make install)
......@@ -1428,7 +1438,7 @@ libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.gz
$(EXTRACT_GZ)
.gpg-error: libgpg-error
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
(cd $<; ./autogen.sh && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls && make && make install)
$(INSTALL_NAME)
touch $@
......@@ -1513,6 +1523,7 @@ glib-$(GLIB_VERSION).tar.gz:
glib: glib-$(GLIB_VERSION).tar.gz
$(EXTRACT_GZ)
patch -p 0 < Patches/glib.patch
.glib: glib
(cd $<; ./configure --prefix=$(PREFIX) --host=powerpc-apple-macos && make && make install)
......
Index: libavutil/common.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavutil/common.h,v
retrieving revision 1.153
diff -u -r1.153 common.h
--- ffmpeg.orig/libavutil/common.h 19 Sep 2005 23:26:47 -0000 1.153
+++ ffmpeg/libavutil/common.h 1 Nov 2005 21:40:31 -0000
@@ -543,7 +543,7 @@
}\
}
-#ifndef HAVE_LRINTF
+#if !defined(HAVE_LRINTF) && !defined(__APPLE__)
/* XXX: add ISOC specific test to avoid specific BSD testing. */
/* better than nothing implementation. */
/* btw, rintf() is existing on fbsd too -- alex */
diff -ruN libpng.orig/scripts/makefile.macosx libpng/scripts/makefile.macosx
--- libpng.orig/scripts/makefile.macosx Thu Oct 3 13:32:34 2002
+++ libpng/scripts/makefile.macosx Thu Apr 7 01:00:51 2005
diff -ruN libpng-1.2.5/scripts/makefile.macosx libpng/scripts/makefile.macosx
--- libpng-1.2.5/scripts/makefile.macosx 2002-10-03 13:32:34.000000000 +0200
+++ libpng/scripts/makefile.macosx 2006-02-22 22:05:47.000000000 +0100
@@ -6,7 +6,7 @@
# For conditions of distribution and use, see copyright notice in png.h
# where make install puts libpng.a and png.h
-prefix=/usr/local
+prefix=PREFIX
+prefix=??PREFIX??
# Where the zlib library and include files are located
#ZLIBLIB=/usr/local/lib
@@ -21,7 +21,7 @@
@@ -20,8 +20,8 @@
PNGMIN = 1.2.5
PNGVER = $(PNGMAJ).$(PNGMIN)
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
-CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -current_version $(PNGVER)
+LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
+CFLAGS=??EXTRA_CFLAGS?? -fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
+LDFLAGS=??EXTRA_LDFLAGS?? -L. -L$(ZLIBLIB) -lpng -lz
LIBNAME=libpng12
SHAREDLIB_POSTFIX=dylib
......
diff -ruN live.orig/Makefile.tail live/Makefile.tail
--- live.orig/Makefile.tail 2006-02-15 23:14:39.000000000 +0100
+++ live/Makefile.tail 2006-02-22 21:53:14.000000000 +0100
@@ -15,8 +15,7 @@
ALL = $(LIVEMEDIA_LIB) \
$(GROUPSOCK_LIB) \
$(USAGE_ENVIRONMENT_LIB) \
- $(BASIC_USAGE_ENVIRONMENT_LIB) \
- $(TESTPROGS_APP)
+ $(BASIC_USAGE_ENVIRONMENT_LIB)
all: $(ALL)
diff -ruN live.orig/config.macosx live/config.macosx
--- live.orig/config.macosx 2006-02-15 23:14:39.000000000 +0100
+++ live/config.macosx 2006-02-22 21:53:01.000000000 +0100
@@ -1,4 +1,4 @@
-COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t
+COMPILE_OPTS = $(INCLUDES) -I. EXTRA_CFLAGS -DBSD=1 -O -DSOCKLEN_T=socklen_t -DUSE_LOCALE
C = c
C_COMPILER = cc
C_FLAGS = $(COMPILE_OPTS)
@@ -7,10 +7,10 @@
CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
OBJ = o
LINK = c++ -o
-LINK_OPTS = -L.
+LINK_OPTS = -L. EXTRA_LDFLAGS
CONSOLE_LINK_OPTS = $(LINK_OPTS)
-LIBRARY_LINK = ld -o
-LIBRARY_LINK_OPTS = $(LINK_OPTS) -r
+LIBRARY_LINK = ar cru
+LIBRARY_LINK_OPTS =
LIB_SUFFIX = a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
--- live.orig/config.macosx 2005-10-23 08:50:31.000000000 +0200
+++ live/config.macosx 2005-10-23 17:10:57.000000000 +0200
@@ -1,10 +1,10 @@
COMPILE_OPTS = $(INCLUDES) -I. -DBSD=1 -O -DSOCKLEN_T=socklen_t
C = c
C_COMPILER = cc
-C_FLAGS = $(COMPILE_OPTS)
+C_FLAGS = $(COMPILE_OPTS) -DUSE_LOCALE
CPP = cpp
CPLUSPLUS_COMPILER = c++
-CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
+CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DUSE_LOCALE
OBJ = o
LINK = c++ -o
LINK_OPTS = -L.
......@@ -40,7 +40,7 @@ PKGCFG_VERSION=0.15.0
PKGCFG_URL=http://pkgconfig.freedesktop.org/releases/pkgconfig-$(PKGCFG_VERSION).tar.gz
LIBICONV_VERSION=1.9.1
LIBICONV_URL=$(GNU)/libiconv/libiconv-$(LIBICONV_VERSION).tar.gz
GETTEXT_VERSION=0.14.1
GETTEXT_VERSION=0.14.5
GETTEXT_URL=$(GNU)/gettext/gettext-$(GETTEXT_VERSION).tar.gz
FREETYPE2_VERSION=2.1.9
FREETYPE2_URL=$(SF)/freetype/freetype-$(FREETYPE2_VERSION).tar.gz
......@@ -120,8 +120,8 @@ GNUTLS_VERSION=1.2.7
GNUTLS_URL=http://ftp.gnupg.org/gcrypt/gnutls/gnutls-$(GNUTLS_VERSION).tar.bz2
DAAP_VERSION=0.4.0
DAAP_URL=http://craz.net/programs/itunes/files/libopendaap-$(DAAP_VERSION).tar.bz2
GLIB_VERSION=1.2.8
GLIB_URL=ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.8.tar.gz
GLIB_VERSION=1.2.10
GLIB_URL=ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz
LIBIDL_VERSION=0.6.8
LIBIDL_URL=http://andrewtv.org/libIDL/libIDL-$(LIBIDL_VERSION).tar.gz
GECKO_SDK_MAC_URL=$(VIDEOLAN)/testing/contrib/gecko-sdk-ppc-macosx10.2-1.7.5.tar.gz
......
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