~ubuntu-branches/ubuntu/karmic/kid3/karmic

« back to all changes in this revision

Viewing changes to buildlibs.sh

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-05-20 16:12:30 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090520161230-qetp532r8ydujkz2
Tags: upstream-1.2
Import upstream version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# This script can be used to build static libraries for the Windows and Mac
 
3
# versions of Kid3. Linux and BSD users do not need it because the libraries
 
4
# can be installed from their repositories.
 
5
#
 
6
# First you have to install the necessary tools:
 
7
#
 
8
# For Windows: MinGW/MSYS with development tools, Qt, xsltproc,
 
9
# html\docbook.xsl. Set the environment variables MSYSDIR, XSLTPROCDIR,
 
10
# DOCBOOKDIR to the install directories. They are used in win32/buildkit3.bat.
 
11
#
 
12
# For Mac: XCode, Qt, html\docbook.xsl. XCode and Qt should be installed at
 
13
# the default location, docbook.xsl in
 
14
# $HOME/docbook-xsl-1.72.0/html/docbook.xsl.
 
15
#
 
16
# The source code for the libraries is downloaded from Debian and Ubuntu
 
17
# repositories. If the files are no longer available, use a later version,
 
18
# it should still work.
 
19
#
 
20
# buildlibs.sh will download, build and install zlib, libogg, libvorbis,
 
21
# flac, id3lib, taglib and mp4v2. You are then ready to build Kid3 from
 
22
# the win32 or macosx directories by starting buildkid3.bat (Windows) or
 
23
# buildkid3.sh (Mac). A binary package can be created using createpkg.bat,
 
24
# or createpkg.sh respectively.
 
25
 
 
26
# Download sources
 
27
 
 
28
test -d source || mkdir source
 
29
cd source
 
30
 
 
31
test -f faad2_2.0.0+cvs20040908+mp4v2+bmp-0ubuntu3.6.06.1.diff.gz ||
 
32
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/f/faad2/faad2_2.0.0+cvs20040908+mp4v2+bmp-0ubuntu3.6.06.1.diff.gz
 
33
test -f faad2_2.0.0+cvs20040908+mp4v2+bmp.orig.tar.gz ||
 
34
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/f/faad2/faad2_2.0.0+cvs20040908+mp4v2+bmp.orig.tar.gz
 
35
 
 
36
test -f flac_1.2.1-1.2.diff.gz ||
 
37
wget http://ftp.de.debian.org/debian/pool/main/f/flac/flac_1.2.1-1.2.diff.gz
 
38
test -f flac_1.2.1.orig.tar.gz ||
 
39
wget http://ftp.de.debian.org/debian/pool/main/f/flac/flac_1.2.1.orig.tar.gz
 
40
 
 
41
test -f id3lib3.8.3_3.8.3-7.2.diff.gz ||
 
42
wget http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_3.8.3-7.2.diff.gz
 
43
test -f id3lib3.8.3_3.8.3.orig.tar.gz ||
 
44
wget http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_3.8.3.orig.tar.gz
 
45
 
 
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
 
50
 
 
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
 
55
 
 
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
 
60
 
 
61
test -f zlib_1.2.3-13.diff.gz ||
 
62
wget http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_1.2.3-13.diff.gz
 
63
test -f zlib_1.2.3.orig.tar.gz ||
 
64
wget http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_1.2.3.orig.tar.gz
 
65
 
 
66
 
 
67
# Create patch files
 
68
 
 
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
 
74
@@ -22,6 +22,9 @@
 
75
 #ifndef __MP4_UTIL_INCLUDED__
 
76
 #define __MP4_UTIL_INCLUDED__
 
77
 #include <assert.h>
 
78
+#ifdef __APPLE__
 
79
+#include <sys/time.h>
 
80
+#endif
 
81
 
 
82
 #ifndef ASSERT
 
83
 #ifdef NDEBUG
 
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
 
87
@@ -37,6 +37,14 @@
 
88
 #include <win32_ver.h>
 
89
 #endif
 
90
 #define NEED_SDL_VIDEO_IN_MAIN_THREAD
 
91
+#elif defined __APPLE__
 
92
+#ifndef PACKAGE
 
93
+#define PACKAGE "mpeg4ip"
 
94
+#endif
 
95
+#ifndef VERSION
 
96
+#define VERSION "0.9.8.6"
 
97
+#endif
 
98
+#define HAVE_STDINT_H
 
99
 #else
 
100
 #undef PACKAGE
 
101
 #undef VERSION
 
102
EOF
 
103
 
 
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
 
109
@@ -1,7 +1,7 @@
 
110
 #ifndef _MP4FF_INT_TYPES_H_
 
111
 #define _MP4FF_INT_TYPES_H_
 
112
 
 
113
-#ifdef _WIN32
 
114
+#if defined(_WIN32) && !defined(__MINGW32__)
 
115
 
 
116
 typedef char int8_t;
 
117
 typedef unsigned char uint8_t;
 
118
@@ -20,4 +20,4 @@
 
119
 #endif
 
120
 
 
121
 
 
122
-#endif
 
123
\ No newline at end of file
 
124
+#endif
 
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
 
128
@@ -26,7 +26,16 @@
 
129
 #ifdef WIN32
 
130
 #define HAVE_IN_PORT_T
 
131
 #define HAVE_SOCKLEN_T
 
132
+#ifdef __MINGW32__
 
133
+#ifndef PACKAGE
 
134
+#define PACKAGE "mpeg4ip"
 
135
+#endif
 
136
+#ifndef VERSION
 
137
+#define VERSION "0.9.8.6"
 
138
+#endif
 
139
+#else
 
140
 #include <win32_ver.h>
 
141
+#endif
 
142
 #define NEED_SDL_VIDEO_IN_MAIN_THREAD
 
143
 #else
 
144
 #undef PACKAGE
 
145
@@ -49,6 +58,14 @@
 
146
 #include <time.h>
 
147
 #include <limits.h>
 
148
 
 
149
+#ifdef __MINGW32__
 
150
+#include <stdint.h>
 
151
+#include <ctype.h>
 
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;
 
156
+#else
 
157
 typedef unsigned __int64 uint64_t;
 
158
 typedef unsigned __int32 uint32_t;
 
159
 typedef unsigned __int16 uint16_t;
 
160
@@ -64,6 +81,7 @@
 
161
 typedef unsigned short in_port_t;
 
162
 typedef int socklen_t;
 
163
 typedef int ssize_t;
 
164
+#endif
 
165
 #define snprintf _snprintf
 
166
 #define strncasecmp _strnicmp
 
167
 #define strcasecmp _stricmp
 
168
@@ -95,7 +113,9 @@
 
169
 }
 
170
 #endif
 
171
 
 
172
+#ifndef __MINGW32__
 
173
 #define PATH_MAX MAX_PATH
 
174
+#endif
 
175
 #define MAX_UINT64 -1
 
176
 #define LLD "%I64d"
 
177
 #define LLU "%I64u"
 
178
@@ -114,7 +134,7 @@
 
179
 #define LOG_INFO 6
 
180
 #define LOG_DEBUG 7
 
181
 
 
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))
 
186
 #else
 
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
 
190
@@ -303,6 +303,7 @@
 
191
     }
 
192
   #elif (defined(__i386__) && defined(__GNUC__))
 
193
     #define HAS_LRINTF
 
194
+#if !defined __MINGW32__ && !defined __APPLE__
 
195
     // from http://www.stereopsis.com/FPU.html
 
196
     static INLINE int lrintf(float f)
 
197
     {
 
198
@@ -314,6 +315,7 @@
 
199
             : "m" (f));
 
200
         return i;
 
201
     }
 
202
+#endif
 
203
   #endif
 
204
 
 
205
 
 
206
EOF
 
207
 
 
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
 
213
@@ -0,0 +1,40 @@
 
214
+#! /bin/sh
 
215
+# mkinstalldirs --- make directory hierarchy
 
216
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
 
217
+# Created: 1993-05-16
 
218
+# Public domain
 
219
+
 
220
+# $Id: mkinstalldirs,v 1.1 1999/11/01 04:12:39 scott Exp $
 
221
+
 
222
+errstatus=0
 
223
+
 
224
+for file
 
225
+do
 
226
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
 
227
+   shift
 
228
+
 
229
+   pathcomp=
 
230
+   for d
 
231
+   do
 
232
+     pathcomp="$pathcomp$d"
 
233
+     case "$pathcomp" in
 
234
+       -* ) pathcomp=./$pathcomp ;;
 
235
+     esac
 
236
+
 
237
+     if test ! -d "$pathcomp"; then
 
238
+        echo "mkdir $pathcomp"
 
239
+
 
240
+        mkdir "$pathcomp" || lasterr=$?
 
241
+
 
242
+        if test ! -d "$pathcomp"; then
 
243
+         errstatus=$lasterr
 
244
+        fi
 
245
+     fi
 
246
+
 
247
+     pathcomp="$pathcomp/"
 
248
+   done
 
249
+done
 
250
+
 
251
+exit $errstatus
 
252
+
 
253
+# mkinstalldirs ends here
 
254
EOF
 
255
 
 
256
test -f fink_flac.patch ||
 
257
cat >fink_flac.patch <<"EOF"
 
258
diff -ruN flac-1.2.1/patches/fixrpath.sh flac-1.2.1.new/patches/fixrpath.sh
 
259
--- flac-1.2.1/patches/fixrpath.sh      1969-12-31 19:00:00.000000000 -0500
 
260
+++ flac-1.2.1.new/patches/fixrpath.sh  2008-02-18 10:51:07.000000000 -0500
 
261
@@ -0,0 +1,28 @@
 
262
+#!/bin/sh
 
263
+# $Id: fixrpath,v 1.1 2004/05/27 10:48:25 kobras Exp $
 
264
+# libtool -rpath workaround based on a suggestion by Yann Dirson
 
265
+# <dirson@debian.org>
 
266
+#
 
267
+# It is supposed to be inserted in configure.in, but I didn't want
 
268
+# to re-run autoconf (since that bloats the Debian diff unnecessarily),
 
269
+# so I just patch libtool after running configure.  -- Richard Braakman
 
270
+# <dark@xs4all.nl>
 
271
+#
 
272
+# The version of libtool included with LessTif unfortunately insists on
 
273
+# linking with -rpath, i.e. hardwiring locations. This is not desirable.
 
274
+#
 
275
+# The dummy define is improbable enough not to conflict with anything; it is
 
276
+# just here to fool libtool by making it believe it gave some useful info to
 
277
+# gcc.
 
278
+#
 
279
+# This will also patch the generated libtool to explicitly
 
280
+# link libraries against the libraries they depend on.  (particularly libc)
 
281
+
 
282
+for i in libtool libtool-disable-static; do
 
283
+sed < $i > $i-2 \
 
284
+       -e 's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' \
 
285
+       -e '/^archive_cmds="/s/"$/ \$deplibs"/'
 
286
+mv $i-2 $i
 
287
+chmod 755 $i
 
288
+done
 
289
+
 
290
diff -ruN flac-1.2.1/patches/ltmain.sh.patch flac-1.2.1.new/patches/ltmain.sh.patch
 
291
--- flac-1.2.1/patches/ltmain.sh.patch  1969-12-31 19:00:00.000000000 -0500
 
292
+++ flac-1.2.1.new/patches/ltmain.sh.patch      2008-02-18 10:48:01.000000000 -0500
 
293
@@ -0,0 +1,11 @@
 
294
+--- ltmain.sh.orig     Fri Feb  4 21:22:19 2005
 
295
++++ ltmain.sh  Wed Feb 23 19:09:37 2005
 
296
+@@ -2280,7 +2280,7 @@
 
297
+          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 
298
+         if test "$installed" = no; then
 
299
+           notinst_deplibs="$notinst_deplibs $lib"
 
300
+-          need_relink=yes
 
301
++          need_relink=no
 
302
+         fi
 
303
+         # This is a shared library
 
304
 
305
diff -ruN flac-1.2.1/patches/nasm.h.patch flac-1.2.1.new/patches/nasm.h.patch
 
306
--- flac-1.2.1/patches/nasm.h.patch     1969-12-31 19:00:00.000000000 -0500
 
307
+++ flac-1.2.1.new/patches/nasm.h.patch 2007-01-25 21:34:54.000000000 -0500
 
308
@@ -0,0 +1,14 @@
 
309
+--- src/libFLAC/ia32/nasm.h~   2005-01-25 13:14:22.000000000 +0900
 
310
++++ src/libFLAC/ia32/nasm.h    2006-03-15 18:07:23.000000000 +0900
 
311
+@@ -49,6 +49,11 @@
 
312
+       %idefine code_section section .text align=16
 
313
+       %idefine data_section section .data align=32
 
314
+       %idefine bss_section  section .bss  align=32
 
315
++%elifdef OBJ_FORMAT_macho
 
316
++      %define FLAC__PUBLIC_NEEDS_UNDERSCORE
 
317
++      %idefine code_section section .text
 
318
++      %idefine data_section section .data
 
319
++      %idefine bss_section  section .bss
 
320
+ %else
 
321
+       %error unsupported object format!
 
322
+ %endif
 
323
diff -ruN flac-1.2.1/src/plugin_xmms/Makefile.in flac-1.2.1.new/src/plugin_xmms/Makefile.in
 
324
--- flac-1.2.1/src/plugin_xmms/Makefile.in      2007-09-16 16:05:18.000000000 -0400
 
325
+++ flac-1.2.1.new/src/plugin_xmms/Makefile.in  2008-02-18 19:48:45.000000000 -0500
 
326
@@ -265,7 +265,6 @@
 
327
        $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
 
328
        $(top_builddir)/src/share/utf8/libutf8.la \
 
329
        $(top_builddir)/src/libFLAC/libFLAC.la \
 
330
-       -L$(top_builddir)/src/libFLAC/.libs \
 
331
        @OGG_LIBS@ \
 
332
        @XMMS_LIBS@ \
 
333
        @LIBICONV@
 
334
EOF
 
335
 
 
336
test -f flac_1.2.1_size_t_max_patch.diff ||
 
337
cat >flac_1.2.1_size_t_max_patch.diff <<"EOF"
 
338
diff -ru flac-1.2.1.orig/include/share/alloc.h flac-1.2.1/include/share/alloc.h
 
339
--- flac-1.2.1.orig/include/share/alloc.h       Wed Sep 12 06:32:22 2007
 
340
+++ flac-1.2.1/include/share/alloc.h    Mon Mar  3 18:57:14 2008
 
341
@@ -33,6 +33,10 @@
 
342
 #endif
 
343
 #include <stdlib.h> /* for size_t, malloc(), etc */
 
344
 
 
345
+#if defined __MINGW32__ && !defined SIZE_T_MAX
 
346
+# define SIZE_T_MAX UINT_MAX
 
347
+#endif
 
348
+
 
349
 #ifndef SIZE_MAX
 
350
 # ifndef SIZE_T_MAX
 
351
 #  ifdef _MSC_VER
 
352
EOF
 
353
 
 
354
test -f id3lib-3.8.3_mingw.patch ||
 
355
cat >id3lib-3.8.3_mingw.patch <<"EOF"
 
356
diff -ru id3lib-3.8.3.orig/configure.in id3lib-3.8.3/configure.in
 
357
--- id3lib-3.8.3.orig/configure.in      Sun Mar  2 00:23:00 2003
 
358
+++ id3lib-3.8.3/configure.in   Thu Oct 11 08:55:26 2007
 
359
@@ -249,10 +249,10 @@
 
360
 AM_CONDITIONAL(ID3_NEEDGETOPT_LONG, test x$ac_cv_func_getopt_long = xno)
 
361
 
 
362
 AC_CHECK_FUNCS(mkstemp)
 
363
-AC_CHECK_FUNCS(
 
364
-  truncate                      \
 
365
-  ,,AC_MSG_ERROR([Missing a vital function for id3lib])
 
366
-)
 
367
+#AC_CHECK_FUNCS(
 
368
+#  truncate                      \
 
369
+#  ,,AC_MSG_ERROR([Missing a vital function for id3lib])
 
370
+#)
 
371
 
 
372
 dnl Checks for typedefs, structures, and compiler characteristics.
 
373
 AC_TYPE_SIZE_T
 
374
Only in id3lib-3.8.3: configure.in~
 
375
diff -ru id3lib-3.8.3.orig/include/id3/globals.h id3lib-3.8.3/include/id3/globals.h
 
376
--- id3lib-3.8.3.orig/include/id3/globals.h     Sun Mar  2 00:23:00 2003
 
377
+++ id3lib-3.8.3/include/id3/globals.h  Thu Oct 11 08:56:28 2007
 
378
@@ -41,7 +41,7 @@
 
379
  * we prefix variable declarations so they can
 
380
  * properly get exported in windows dlls.
 
381
  */
 
382
-#ifdef WIN32
 
383
+#ifdef __MSVC_VER
 
384
 #  define LINKOPTION_STATIC         1 //both for use and creation of static lib
 
385
 #  define LINKOPTION_CREATE_DYNAMIC 2 //should only be used by prj/id3lib.dsp
 
386
 #  define LINKOPTION_USE_DYNAMIC    3 //if your project links id3lib dynamic
 
387
EOF
 
388
 
 
389
test -f taglib-1.5-no_declspec.diff ||
 
390
cat >taglib-1.5-no_declspec.diff <<"EOF"
 
391
diff -ru taglib-1.5.orig/taglib/taglib_export.h taglib-1.5/taglib/taglib_export.h
 
392
--- taglib-1.5.orig/taglib/taglib_export.h      Mon Feb  4 15:14:46 2008
 
393
+++ taglib-1.5/taglib/taglib_export.h   Mon Mar  3 20:07:58 2008
 
394
@@ -26,7 +26,7 @@
 
395
 #ifndef TAGLIB_EXPORT_H
 
396
 #define TAGLIB_EXPORT_H
 
397
 
 
398
-#if defined(_WIN32) || defined(_WIN64)
 
399
+#if (defined(_WIN32) || defined(_WIN64)) && !defined __MINGW32__
 
400
 #ifdef MAKE_TAGLIB_LIB
 
401
 #define TAGLIB_EXPORT __declspec(dllexport)
 
402
 #else
 
403
EOF
 
404
 
 
405
cd ..
 
406
 
 
407
 
 
408
# Extract and patch sources
 
409
 
 
410
# zlib
 
411
 
 
412
if ! test -d zlib-1.2.3; then
 
413
tar xzf source/zlib_1.2.3.orig.tar.gz
 
414
cd zlib-1.2.3/
 
415
gunzip -c ../source/zlib_1.2.3-13.diff.gz | patch -p1
 
416
tar xzf upstream/tarballs/zlib-1.2.3.tar.gz
 
417
cd zlib-1.2.3/
 
418
for f in ../debian/patches/*; do patch -p1 <$f; done
 
419
cd ../..
 
420
fi
 
421
 
 
422
# libogg
 
423
 
 
424
if ! test -d libogg-1.1.3; then
 
425
tar xzf source/libogg_1.1.3.orig.tar.gz
 
426
cd libogg-1.1.3/
 
427
gunzip -c ../source/libogg_1.1.3-2.diff.gz | patch -p1
 
428
for f in debian/patches/*.diff; do patch -p0 <$f; done
 
429
cd ..
 
430
fi
 
431
 
 
432
# libvorbis
 
433
 
 
434
if ! test -d libvorbis-1.2.0; then
 
435
tar xzf source/libvorbis_1.2.0.dfsg.orig.tar.gz
 
436
cd libvorbis-1.2.0/
 
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
 
439
cd ..
 
440
fi
 
441
 
 
442
# libflac
 
443
 
 
444
if ! test -d flac-1.2.1; then
 
445
tar xzf source/flac_1.2.1.orig.tar.gz
 
446
cd flac-1.2.1/
 
447
gunzip -c ../source/flac_1.2.1-1.2.diff.gz | patch -p1
 
448
for f in debian/patches/*.dpatch; do patch -p1 <$f; done
 
449
patch -p1 <../source/flac_1.2.1_size_t_max_patch.diff
 
450
if test $(uname) = "Darwin"; then
 
451
patch -p1 <../source/fink_flac.patch
 
452
patch -p0 <patches/ltmain.sh.patch
 
453
patch -p0 <patches/nasm.h.patch
 
454
fi
 
455
cd ..
 
456
fi
 
457
 
 
458
# id3lib
 
459
 
 
460
if ! test -d id3lib-3.8.3; then
 
461
tar xzf source/id3lib3.8.3_3.8.3.orig.tar.gz
 
462
cd id3lib-3.8.3/
 
463
gunzip -c ../source/id3lib3.8.3_3.8.3-7.2.diff.gz | patch -p1
 
464
patch -p1 <../source/id3lib-3.8.3_mingw.patch
 
465
cd ..
 
466
fi
 
467
 
 
468
# taglib
 
469
 
 
470
if ! test -d taglib-1.5; then
 
471
tar xzf source/taglib_1.5.orig.tar.gz
 
472
cd taglib-1.5/
 
473
gunzip -c ../source/taglib_1.5-6.diff.gz | patch -p1
 
474
for f in debian/patches/general/*.diff; do patch -p1 <$f; done
 
475
patch -p1 <../source/taglib-1.5-no_declspec.diff
 
476
cd ..
 
477
fi
 
478
 
 
479
# mp4v2
 
480
 
 
481
if ! test -d faad2; then
 
482
tar xzf source/faad2_2.0.0+cvs20040908+mp4v2+bmp.orig.tar.gz
 
483
cd faad2/
 
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
 
493
cd ..
 
494
fi
 
495
 
 
496
 
 
497
# Build from sources
 
498
 
 
499
test -d bin || mkdir bin
 
500
 
 
501
# zlib
 
502
 
 
503
cd zlib-1.2.3/zlib-1.2.3
 
504
test -f Makefile || ./configure
 
505
make
 
506
mkdir -p inst/usr/local
 
507
make install prefix=`pwd`/inst/usr/local
 
508
cd inst
 
509
tar czf ../../../bin/zlib-1.2.3.tgz usr
 
510
cd ../../..
 
511
 
 
512
# libogg
 
513
 
 
514
cd libogg-1.1.3/
 
515
test -f Makefile || ./configure --enable-shared=no --enable-static=yes
 
516
make
 
517
mkdir inst
 
518
make install DESTDIR=`pwd`/inst
 
519
cd inst
 
520
tar czf ../../bin/libogg-1.1.3.tgz usr
 
521
cd ../..
 
522
 
 
523
# libvorbis
 
524
 
 
525
cd libvorbis-1.2.0/
 
526
test -f Makefile || ./configure --enable-shared=no --enable-static=yes --with-ogg=/usr/local
 
527
make
 
528
mkdir inst
 
529
make install DESTDIR=`pwd`/inst
 
530
cd inst
 
531
tar czf ../../bin/libvorbis-1.2.0.tgz usr
 
532
cd ../..
 
533
 
 
534
# libflac
 
535
 
 
536
cd flac-1.2.1/
 
537
test -f Makefile || ./configure --enable-shared=no --enable-static=yes --with-ogg=/usr/local
 
538
make
 
539
mkdir inst
 
540
make install DESTDIR=`pwd`/inst
 
541
cd inst
 
542
tar czf ../../bin/flac-1.2.1.tgz usr
 
543
cd ../..
 
544
 
 
545
# id3lib
 
546
 
 
547
cd id3lib-3.8.3/
 
548
autoconf
 
549
test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-shared=no --enable-static=yes
 
550
SED=sed make
 
551
mkdir inst
 
552
make install DESTDIR=`pwd`/inst
 
553
cd inst
 
554
tar czf ../../bin/id3lib-3.8.3.tgz usr
 
555
cd ../..
 
556
 
 
557
# taglib
 
558
 
 
559
cd taglib-1.5/
 
560
test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --enable-shared=no --enable-static=yes
 
561
make
 
562
mkdir inst
 
563
make install DESTDIR=`pwd`/inst
 
564
cd inst
 
565
tar czf ../../bin/taglib-1.5.tgz usr
 
566
cd ../..
 
567
 
 
568
# mp4v2
 
569
 
 
570
cd faad2/
 
571
aclocal
 
572
automake
 
573
autoconf
 
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
 
577
  chmod +x configure
 
578
fi
 
579
test -f Makefile || ./configure --with-mp4v2 --without-xmms --without-bmp --enable-shared=no --enable-static=yes
 
580
make
 
581
mkdir inst
 
582
make install DESTDIR=`pwd`/inst
 
583
cd inst
 
584
tar czf ../../bin/faad2-2.0.0.tgz usr
 
585
cd ../..
 
586
 
 
587
 
 
588
# Install to root directory
 
589
 
 
590
if test $(uname) = "Darwin"; then
 
591
  sudo chmod go+w /usr/local
 
592
fi
 
593
 
 
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 /
 
601
 
 
602
if test $(uname) = "Darwin"; then
 
603
  sudo chmod go-w /usr/local
 
604
fi