43
41
test -f id3lib3.8.3_3.8.3.orig.tar.gz ||
44
42
wget http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_3.8.3.orig.tar.gz
46
test -f libogg_1.1.3-2.diff.gz ||
47
wget http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_1.1.3-2.diff.gz
48
test -f libogg_1.1.3.orig.tar.gz ||
49
wget http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_1.1.3.orig.tar.gz
51
test -f libvorbis_1.2.0.dfsg-3.1.diff.gz ||
52
wget http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_1.2.0.dfsg-3.1.diff.gz
53
test -f libvorbis_1.2.0.dfsg.orig.tar.gz ||
54
wget http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_1.2.0.dfsg.orig.tar.gz
56
test -f taglib_1.5-6.diff.gz ||
57
wget http://ftp.de.debian.org/debian/pool/main/t/taglib/taglib_1.5-6.diff.gz
58
test -f taglib_1.5.orig.tar.gz ||
59
wget http://ftp.de.debian.org/debian/pool/main/t/taglib/taglib_1.5.orig.tar.gz
44
test -f libogg_1.1.4~dfsg-1.diff.gz ||
45
wget http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_1.1.4~dfsg-1.diff.gz
46
test -f libogg_1.1.4~dfsg.orig.tar.gz ||
47
wget http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_1.1.4~dfsg.orig.tar.gz
49
test -f libvorbis-1.2.3.tar.gz ||
50
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
52
test -f taglib_1.6-3.diff.gz ||
53
wget http://ftp.de.debian.org/debian/pool/main/t/taglib/taglib_1.6-3.diff.gz
54
test -f taglib_1.6.orig.tar.gz ||
55
wget http://ftp.de.debian.org/debian/pool/main/t/taglib/taglib_1.6.orig.tar.gz
61
57
test -f zlib_1.2.3-13.diff.gz ||
62
58
wget http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_1.2.3-13.diff.gz
67
63
# Create patch files
69
test -f faad2_2.0.0_mac.patch ||
70
cat >faad2_2.0.0_mac.patch <<"EOF"
71
diff -ru faad2.orig/common/mp4v2/mp4util.h faad2/common/mp4v2/mp4util.h
72
--- faad2.orig/common/mp4v2/mp4util.h 2003-06-29 23:41:00.000000000 +0200
73
+++ faad2/common/mp4v2/mp4util.h 2009-04-18 07:37:27.000000000 +0200
75
#ifndef __MP4_UTIL_INCLUDED__
76
#define __MP4_UTIL_INCLUDED__
79
+#include <sys/time.h>
84
diff -ru faad2.orig/common/mp4v2/systems.h faad2/common/mp4v2/systems.h
85
--- faad2.orig/common/mp4v2/systems.h 2009-04-22 22:38:40.000000000 +0200
86
+++ faad2/common/mp4v2/systems.h 2009-04-18 07:59:13.000000000 +0200
88
#include <win32_ver.h>
90
#define NEED_SDL_VIDEO_IN_MAIN_THREAD
91
+#elif defined __APPLE__
93
+#define PACKAGE "mpeg4ip"
96
+#define VERSION "0.9.8.6"
98
+#define HAVE_STDINT_H
104
test -f faad2_2.0.0_mingw.patch ||
105
cat >faad2_2.0.0_mingw.patch <<"EOF"
106
diff -ru faad2.orig/common/mp4ff/mp4ff_int_types.h faad2/common/mp4ff/mp4ff_int_types.h
107
--- faad2.orig/common/mp4ff/mp4ff_int_types.h Fri Nov 2 06:37:08 2007
108
+++ faad2/common/mp4ff/mp4ff_int_types.h Sun Nov 4 12:10:52 2007
110
#ifndef _MP4FF_INT_TYPES_H_
111
#define _MP4FF_INT_TYPES_H_
114
+#if defined(_WIN32) && !defined(__MINGW32__)
117
typedef unsigned char uint8_t;
123
\ No newline at end of file
125
diff -ru faad2.orig/common/mp4v2/systems.h faad2/common/mp4v2/systems.h
126
--- faad2.orig/common/mp4v2/systems.h Fri Nov 2 06:40:12 2007
127
+++ faad2/common/mp4v2/systems.h Sun Nov 4 12:11:32 2007
130
#define HAVE_IN_PORT_T
131
#define HAVE_SOCKLEN_T
134
+#define PACKAGE "mpeg4ip"
137
+#define VERSION "0.9.8.6"
140
#include <win32_ver.h>
142
#define NEED_SDL_VIDEO_IN_MAIN_THREAD
152
+typedef unsigned __int64 u_int64_t;
153
+typedef unsigned __int32 u_int32_t;
154
+typedef unsigned __int16 u_int16_t;
155
+typedef unsigned __int8 u_int8_t;
157
typedef unsigned __int64 uint64_t;
158
typedef unsigned __int32 uint32_t;
159
typedef unsigned __int16 uint16_t;
161
typedef unsigned short in_port_t;
162
typedef int socklen_t;
165
#define snprintf _snprintf
166
#define strncasecmp _strnicmp
167
#define strcasecmp _stricmp
173
#define PATH_MAX MAX_PATH
175
#define MAX_UINT64 -1
182
-#if !__STDC__ && _INTEGRAL_MAX_BITS >= 64
183
+#if (!__STDC__ || defined __MINGW32__) && _INTEGRAL_MAX_BITS >= 64
184
#define VAR_TO_FPOS(fpos, var) (fpos) = (var)
185
#define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)(_FPOSOFF(fpos))
187
diff -ru faad2.orig/libfaad/common.h faad2/libfaad/common.h
188
--- faad2.orig/libfaad/common.h Fri Nov 2 06:37:08 2007
189
+++ faad2/libfaad/common.h Sun Nov 4 12:10:12 2007
192
#elif (defined(__i386__) && defined(__GNUC__))
194
+#if !defined __MINGW32__ && !defined __APPLE__
195
// from http://www.stereopsis.com/FPU.html
196
static INLINE int lrintf(float f)
208
test -f faad2-mkinstalldirs.diff ||
209
cat >faad2-mkinstalldirs.diff <<"EOF"
210
diff -ruN faad2.orig/mkinstalldirs faad2/mkinstalldirs
211
--- faad2.orig/mkinstalldirs Thu Jan 1 00:00:00 1970
212
+++ faad2/mkinstalldirs Mon Mar 3 23:26:04 2008
215
+# mkinstalldirs --- make directory hierarchy
216
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
217
+# Created: 1993-05-16
220
+# $Id: mkinstalldirs,v 1.1 1999/11/01 04:12:39 scott Exp $
226
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
232
+ pathcomp="$pathcomp$d"
233
+ case "$pathcomp" in
234
+ -* ) pathcomp=./$pathcomp ;;
237
+ if test ! -d "$pathcomp"; then
238
+ echo "mkdir $pathcomp"
240
+ mkdir "$pathcomp" || lasterr=$?
242
+ if test ! -d "$pathcomp"; then
247
+ pathcomp="$pathcomp/"
253
+# mkinstalldirs ends here
256
65
test -f fink_flac.patch ||
257
66
cat >fink_flac.patch <<"EOF"
258
67
diff -ruN flac-1.2.1/patches/fixrpath.sh flac-1.2.1.new/patches/fixrpath.sh
424
if ! test -d libogg-1.1.3; then
425
tar xzf source/libogg_1.1.3.orig.tar.gz
427
gunzip -c ../source/libogg_1.1.3-2.diff.gz | patch -p1
217
if ! test -d libogg-1.1.4~dfsg.orig; then
218
tar xzf source/libogg_1.1.4~dfsg.orig.tar.gz
219
cd libogg-1.1.4~dfsg.orig/
220
gunzip -c ../source/libogg_1.1.4~dfsg-1.diff.gz | patch -p1
428
221
for f in debian/patches/*.diff; do patch -p0 <$f; done
434
if ! test -d libvorbis-1.2.0; then
435
tar xzf source/libvorbis_1.2.0.dfsg.orig.tar.gz
437
gunzip -c ../source/libvorbis_1.2.0.dfsg-3.1.diff.gz | patch -p1
438
for f in debian/patches/*.diff; do patch -p1 <$f; done
227
if ! test -d libvorbis-1.2.3; then
228
tar xzf source/libvorbis-1.2.3.tar.gz
470
if ! test -d taglib-1.5; then
471
tar xzf source/taglib_1.5.orig.tar.gz
473
gunzip -c ../source/taglib_1.5-6.diff.gz | patch -p1
259
if ! test -d taglib-1.6; then
260
tar xzf source/taglib_1.6.orig.tar.gz
262
gunzip -c ../source/taglib_1.6-3.diff.gz | patch -p1
474
263
for f in debian/patches/general/*.diff; do patch -p1 <$f; done
475
patch -p1 <../source/taglib-1.5-no_declspec.diff
481
if ! test -d faad2; then
482
tar xzf source/faad2_2.0.0+cvs20040908+mp4v2+bmp.orig.tar.gz
484
gunzip -c ../source/faad2_2.0.0+cvs20040908+mp4v2+bmp-0ubuntu3.6.06.1.diff.gz | patch -p1
485
patch -p1 <debian/patches/01_systems.h.diff
486
patch -p1 <debian/patches/04_mp4ff.h_fix.diff
487
patch -p1 <debian/patches/06_pure_virtual_fix.diff
488
patch -p1 <debian/patches/07_remove_static.diff
489
patch -p0 <debian/patches/09_amd64.diff
490
patch -p1 <../source/faad2_2.0.0_mingw.patch
491
patch -p1 <../source/faad2-mkinstalldirs.diff
492
patch -p1 <../source/faad2_2.0.0_mac.patch
269
if ! test -d mp4v2-1.9.1; then
270
tar xjf source/mp4v2-1.9.1.tar.bz2
560
test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-shared=no --enable-static=yes
337
test -f Makefile || CPPFLAGS="-I/usr/local/include -DTAGLIB_STATIC" LDFLAGS=-L/usr/local/lib ./configure --enable-shared=no --enable-static=yes --enable-mp4 --enable-asf
563
340
make install DESTDIR=`pwd`/inst
565
tar czf ../../bin/taglib-1.5.tgz usr
342
tar czf ../../bin/taglib-1.6.tgz usr
574
if ! test -f configure.orig; then
575
mv configure configure.orig
576
sed 's/ PKG_CHECK_MODULES(BMP, bmp)/# PKG_CHECK_MODULES(BMP, bmp)/' configure.orig >configure
579
test -f Makefile || ./configure --with-mp4v2 --without-xmms --without-bmp --enable-shared=no --enable-static=yes
348
test -f Makefile || ./configure --enable-shared=no --enable-static=yes --disable-gch
582
350
make install DESTDIR=`pwd`/inst
584
tar czf ../../bin/faad2-2.0.0.tgz usr
352
tar czf ../../bin/mp4v2-1.9.1.tgz usr
588
356
# Install to root directory
590
if test $(uname) = "Darwin"; then
591
sudo chmod go+w /usr/local
359
if test $(uname) = "Linux"; then
360
test -d buildroot || mkdir buildroot
361
BUILDROOT=`pwd`/buildroot/
362
# Static build can be tested from Linux in kid3 directory
363
if ! test -d kid3; then
365
cat >kid3/build.sh <<"EOF"
366
BUILDPREFIX=$(cd ..; pwd)/buildroot/usr/local
367
../../kid3/kid3-qt/configure --prefix= --with-bindir= --with-datarootdir= --with-docdir= --with-translationsdir= --without-musicbrainz --enable-debug --enable-gcc-pch --with-qmake=qmake-qt4 --with-extra-includes="$BUILDPREFIX/include $BUILDPREFIX/include/taglib" --with-extra-defines="ID3LIB_LINKOPTION=1 FLAC__NO_DLL" --with-extra-libs="-L$BUILDPREFIX/lib"
368
sed -i 's#-L/usr/lib##g; s#-I/usr/include/taglib##g' kid3/Makefile
370
chmod +x kid3/build.sh
372
elif test $(uname) = "Darwin"; then
373
sudo chmod go+w ${BUILDROOT}usr/local
594
tar xzf bin/zlib-1.2.3.tgz -C /
595
tar xzf bin/libogg-1.1.3.tgz -C /
596
tar xzf bin/libvorbis-1.2.0.tgz -C /
597
tar xzf bin/flac-1.2.1.tgz -C /
598
tar xzf bin/id3lib-3.8.3.tgz -C /
599
tar xzf bin/taglib-1.5.tgz -C /
600
tar xzf bin/faad2-2.0.0.tgz -C /
376
tar xzf bin/zlib-1.2.3.tgz -C $BUILDROOT
377
tar xzf bin/libogg-1.1.4.tgz -C $BUILDROOT
378
tar xzf bin/libvorbis-1.2.3.tgz -C $BUILDROOT
379
tar xzf bin/flac-1.2.1.tgz -C $BUILDROOT
380
tar xzf bin/id3lib-3.8.3.tgz -C $BUILDROOT
381
tar xzf bin/taglib-1.6.tgz -C $BUILDROOT
382
tar xzf bin/mp4v2-1.9.1.tgz -C $BUILDROOT
602
384
if test $(uname) = "Darwin"; then
603
sudo chmod go-w /usr/local
385
sudo chmod go-w ${BUILDROOT}usr/local