summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authoreddyg <[email protected]>2008-06-19 04:23:52 +0000
committereddyg <[email protected]>2008-06-19 04:23:52 +0000
commit5bf415fc8aa22376f5f81cf2b9c315bc4751adfe (patch)
treee0f3a27393329c54abfe57777db658d3799da6ff /contrib
parent5cdb0e7948c4170af40742190d5778aeb3ef58ac (diff)
Reintroduce Solaris support. Fully tested on everything - apart from Windows, which really shouldn't be affected. Note that I've disabled troublesome components in ffmpeg that didn't work with Solaris. And disabled X support in libmpeg2 for all platforms - 'cos it shouldn't have been there.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1531 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Jamfile16
-rw-r--r--contrib/patch-ffmpeg-solaris.patch46
-rw-r--r--contrib/patch-x264-solaris.patch73
3 files changed, 84 insertions, 51 deletions
diff --git a/contrib/Jamfile b/contrib/Jamfile
index 5d77079f6..9e226769a 100644
--- a/contrib/Jamfile
+++ b/contrib/Jamfile
@@ -85,8 +85,18 @@ rule LibAvCodec
else if $(OS) = SOLARIS
{
FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-solaris.patch " ;
- FFMPEG_OPTIONS = " --disable-mmx --extra-cflags=-fpic " ;
+ }
+
+ if $(OS) = SOLARIS
+ {
+ #
+ # Not all of ffmpeg works on Solaris - disable the bits that
+ # don't. When we get new versions of FFMPEG we can try enabling
+ # then again.
+ #
+ FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook" ;
}
+
Depends $(<) : $(>) ;
Depends lib : $(<) ;
}
@@ -101,7 +111,7 @@ actions LibAvCodec
--enable-libfaad --disable-ffmpeg --disable-ffserver \
--disable-muxers --enable-muxer=ipod --disable-bsfs \
--extra-cflags="-I$CONTRIB/include" \
- --extra-ldflags="-L$CONTRIB/lib" &&
+ --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) &&
$(MAKE) && $(MAKE) install &&
$(STRIP) $CONTRIB/lib/libavcodec.a
}
@@ -293,7 +303,7 @@ actions LibMpeg2
cd `dirname $(>)` && CONTRIB=`pwd` &&
rm -rf mpeg2dec && (gzip -dc mpeg2dec.tar.gz | tar xf - ) &&
cd mpeg2dec && $(PATCH) -p1 < ../patch-libmpeg2.patch &&
- ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl &&
+ ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl --without-x &&
$(MAKE) && $(MAKE) install &&
$(STRIP) $CONTRIB/lib/libmpeg2.a
}
diff --git a/contrib/patch-ffmpeg-solaris.patch b/contrib/patch-ffmpeg-solaris.patch
index b5e483829..f5cd7d726 100644
--- a/contrib/patch-ffmpeg-solaris.patch
+++ b/contrib/patch-ffmpeg-solaris.patch
@@ -1,29 +1,25 @@
---- ffmpeg.base/configure Wed Oct 10 15:39:57 2007
-+++ ffmpeg/configure Wed Oct 10 15:51:44 2007
-@@ -889,7 +889,7 @@
- source_path_used="no"
- else
- source_path="`cd \"$source_path\"; pwd`"
-- echo "$source_path" | grep -q '[[:blank:]]' &&
-+ echo "$source_path" | /usr/xpg4/bin/grep -q '[[:blank:]]' &&
- die "Out of tree builds are impossible with whitespace in source path."
+--- ffmpeg/configure Sat Jun 7 03:19:09 2008
++++ ffmpeg.solaris/configure Thu Jun 19 12:10:48 2008
+@@ -50,6 +50,9 @@
+ exit 1
fi
-@@ -993,7 +993,7 @@
- ;;
- --enable-?*|--disable-?*)
- eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
-- echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt
-+ echo "$CMDLINE_SELECT" | /usr/xpg4/bin/grep -q "^ *$option\$" || die_unknown $opt
- $action $option
- ;;
- --list-*)
-@@ -1368,7 +1368,7 @@
- fi
++# Solaris must use the xpg4 version of grep
++PATH=/usr/xpg4/bin:$PATH
++
+ show_help(){
+ echo "Usage: configure [options]"
+ echo "Options: [defaults in brackets after descriptions]"
+@@ -1585,8 +1588,11 @@
+ check_cc <<EOF || die "endian test failed"
+ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+ EOF
+-od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
++#od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
++/usr/bin/tr -cd "BIGE" < $TMPO | grep -q 'B *I *G *E' && enable bigendian
- gnu_make(){
-- $1 --version 2>&1 | grep -q GNU
-+ $1 --version 2>&1 | /usr/xpg4/bin/grep -q GNU
- }
++echo "BIGE=$bigendian"
++
+ # ---
+ # check availability of some header files
- if ! gnu_make $make; then
diff --git a/contrib/patch-x264-solaris.patch b/contrib/patch-x264-solaris.patch
index ed830149f..ac271d570 100644
--- a/contrib/patch-x264-solaris.patch
+++ b/contrib/patch-x264-solaris.patch
@@ -1,12 +1,29 @@
---- x264/orig.configer 2007-09-15 20:14:00.202704854 +0200
-+++ x264/configure 2007-09-15 20:15:13.969525668 +0200
+diff -ru x264/Makefile x264.solaris/Makefile
+--- x264/Makefile Mon Jun 9 01:36:08 2008
++++ x264.solaris/Makefile Thu Jun 19 11:54:53 2008
+@@ -150,8 +150,10 @@
+ $(MAKE) -C gtk distclean
+
+ install: x264$(EXE) $(SONAME)
+- install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
+- install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
++ install -d $(DESTDIR)$(bindir)
++ install -d $(DESTDIR)$(includedir)
++ install -d $(DESTDIR)$(libdir)
++ install -d $(DESTDIR)$(libdir)/pkgconfig
+ install -m 644 x264.h $(DESTDIR)$(includedir)
+ install -m 644 libx264.a $(DESTDIR)$(libdir)
+ install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+diff -ru x264/configure x264.solaris/configure
+--- x264/configure Mon Jun 9 01:36:08 2008
++++ x264.solaris/configure Thu Jun 19 12:10:24 2008
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /usr/xpg4/bin/sh
-
+
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
-
-@@ -76,7 +76,7 @@
+
+@@ -73,7 +73,7 @@
# check whether 'echo -n' works as expected, otherwise try printf
if [ "x`echo -n houba`" = xhouba ]
then
@@ -15,31 +32,41 @@
elif [ "x`printf houba`" = xhouba ]
then
ECHON="printf"
+@@ -319,8 +319,10 @@
---- x264/common/osdep.h Thu Nov 22 06:00:24 2007
-+++ x264.modified/common/osdep.h Fri Nov 30 10:23:28 2007
-@@ -44,6 +44,9 @@
+ echo "unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';" > conftest.c
+ $CC $CFLAGS conftest.c -c -o conftest.o 2>$DEVNULL || die "endian test failed"
+-grep -q BIGE conftest.o && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
++/usr/bin/tr -cd "BIGE" < conftest.o | /usr/xpg4/bin/grep -q BIGE && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
+
++echo $CFLAGS
++
+ # autodetect options that weren't forced nor disabled
+
+ libpthread=""
+diff -ru x264/version.sh x264.solaris/version.sh
+--- x264/version.sh Mon Jun 9 01:36:08 2008
++++ x264.solaris/version.sh Thu Jun 19 11:56:19 2008
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ git-rev-list HEAD | sort > config.git-hash
+ LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
+-if [ $LOCALVER \> 1 ] ; then
++if [ $LOCALVER -gt 1 ] ; then
+ VER=`git-rev-list origin/master | sort | join config.git-hash - | wc -l | awk '{print $1}'`
+ if [ $VER != $LOCALVER ] ; then
+ VER="$VER+$(($LOCALVER-$VER))"
+diff -ru x264/common/osdep.h x264.solaris/common/osdep.h
+--- x264/common/osdep.h Mon Jun 9 01:36:08 2008
++++ x264.solaris/common/osdep.h Thu Jun 19 10:52:56 2008
+@@ -48,6 +48,10 @@
#define X264_VERSION "" // no configure script for msvc
#endif
+#if defined(SYS_SunOS)
+#define isfinite _finite
+#endif
++
#ifdef SYS_OPENBSD
#define isfinite finite
#endif
---- x264.base/Makefile Mon Jul 16 08:45:03 2007
-+++ x264/Makefile Thu Oct 11 11:52:46 2007
-@@ -147,8 +147,10 @@
- $(MAKE) -C gtk distclean
-
- install: x264 $(SONAME)
-- install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
-- install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
-+ install -d $(DESTDIR)$(bindir)
-+ install -d $(DESTDIR)$(includedir)
-+ install -d $(DESTDIR)$(libdir)
-+ install -d $(DESTDIR)$(libdir)/pkgconfig
- install -m 644 x264.h $(DESTDIR)$(includedir)
- install -m 644 libx264.a $(DESTDIR)$(libdir)
- install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig