OSDN Git Service

Reintroduce Solaris support. Fully tested on everything - apart from Windows, which...
[handbrake-jp/handbrake-jp-git.git] / contrib / patch-x264-solaris.patch
1 diff -ru x264/Makefile x264.solaris/Makefile
2 --- x264/Makefile       Mon Jun  9 01:36:08 2008
3 +++ x264.solaris/Makefile       Thu Jun 19 11:54:53 2008
4 @@ -150,8 +150,10 @@
5         $(MAKE) -C gtk distclean
6  
7  install: x264$(EXE) $(SONAME)
8 -       install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
9 -       install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
10 +       install -d $(DESTDIR)$(bindir) 
11 +       install -d $(DESTDIR)$(includedir)
12 +       install -d $(DESTDIR)$(libdir) 
13 +       install -d $(DESTDIR)$(libdir)/pkgconfig
14         install -m 644 x264.h $(DESTDIR)$(includedir)
15         install -m 644 libx264.a $(DESTDIR)$(libdir)
16         install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
17 diff -ru x264/configure x264.solaris/configure
18 --- x264/configure      Mon Jun  9 01:36:08 2008
19 +++ x264.solaris/configure      Thu Jun 19 12:10:24 2008
20 @@ -1,4 +1,4 @@
21 -#! /bin/sh
22 +#! /usr/xpg4/bin/sh
23  
24  if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
25  
26 @@ -73,7 +73,7 @@
27  # check whether 'echo -n' works as expected, otherwise try printf
28  if [ "x`echo -n houba`" = xhouba ]
29  then
30 -  ECHON="echo -n"
31 +  ECHON="/usr/ucb/echo -n"
32  elif [ "x`printf houba`" = xhouba ]
33  then
34    ECHON="printf"
35 @@ -319,8 +319,10 @@
36  
37  echo "unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';" > conftest.c
38  $CC $CFLAGS conftest.c -c -o conftest.o 2>$DEVNULL || die "endian test failed"
39 -grep -q BIGE conftest.o && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
40 +/usr/bin/tr -cd "BIGE" < conftest.o | /usr/xpg4/bin/grep -q BIGE && CFLAGS="$CFLAGS -DWORDS_BIGENDIAN"
41  
42 +echo $CFLAGS
43 +
44  # autodetect options that weren't forced nor disabled
45  
46  libpthread=""
47 diff -ru x264/version.sh x264.solaris/version.sh
48 --- x264/version.sh     Mon Jun  9 01:36:08 2008
49 +++ x264.solaris/version.sh     Thu Jun 19 11:56:19 2008
50 @@ -1,7 +1,7 @@
51  #!/bin/sh
52  git-rev-list HEAD | sort > config.git-hash
53  LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
54 -if [ $LOCALVER \> 1 ] ; then
55 +if [ $LOCALVER -gt 1 ] ; then
56      VER=`git-rev-list origin/master | sort | join config.git-hash - | wc -l | awk '{print $1}'`
57      if [ $VER != $LOCALVER ] ; then
58          VER="$VER+$(($LOCALVER-$VER))"
59 diff -ru x264/common/osdep.h x264.solaris/common/osdep.h
60 --- x264/common/osdep.h Mon Jun  9 01:36:08 2008
61 +++ x264.solaris/common/osdep.h Thu Jun 19 10:52:56 2008
62 @@ -48,6 +48,10 @@
63  #define X264_VERSION "" // no configure script for msvc
64  #endif
65  
66 +#if defined(SYS_SunOS)
67 +#define isfinite _finite
68 +#endif
69 +
70  #ifdef SYS_OPENBSD
71  #define isfinite finite
72  #endif