OSDN Git Service

Adds a 'colr' box to mp4 files, indicating an NTSC profile. Makes the
[handbrake-jp/handbrake-jp-git.git] / contrib / Jamfile
1 SubDir TOP contrib ;
2
3 # Use curl on Mac OS X since it's always installed, and assume wget
4 # is installed for all other systems
5 if $(OS) = MACOSX
6 {
7     WGET = curl -o ;
8 }
9 else
10 {
11     WGET = wget -O ;
12 }
13
14 # Wget rule: downloads $(<) from the link in $(>)
15 rule Wget
16 {
17     Depends $(<) : $(>) ;
18 }
19 actions Wget
20 {
21     $(RM) $(<) &&
22     $(WGET) $(<) `cat $(>)` &&
23     ( touch $(<) || true )
24 }
25
26 # liba52
27 rule LibA52
28 {
29     Depends $(<) : $(>) ;
30     Depends lib  : $(<) ;
31 }
32 actions LibA52
33 {
34     cd `dirname $(>)` && CONTRIB=`pwd` &&
35     rm -rf a52dec && tar xzf a52dec.tar.gz && cd a52dec &&
36     ./configure --prefix=$CONTRIB && make && make install &&
37     strip -S $CONTRIB/lib/liba52.a
38 }
39 Wget   $(SUBDIR)/a52dec.tar.gz : $(SUBDIR)/version_a52dec.txt ;
40 LibA52 $(SUBDIR)/lib/liba52.a  : $(SUBDIR)/a52dec.tar.gz ;
41
42 # libavcodec
43 rule LibAvCodec
44 {
45     FFMPEG_PATCH = "patch -p1 < ../patch-ffmpeg.patch" ;
46     if $(OS) = MACOSX && $(OSPLAT) = X86
47     {
48        FFMPEG_OPTIONS  = --enable-memalign-hack ;
49        FFMPEG_PATCH   += " && patch -p1 < ../patch-ffmpeg-macintel.patch" ;
50     }
51     Depends $(<) : $(>) ;
52     Depends lib  : $(<) ;
53 }
54 actions LibAvCodec
55 {
56     cd `dirname $(>)` && CONTRIB=`pwd` &&
57     rm -rf ffmpeg-20060326 && tar xzf ffmpeg.tar.gz &&
58     cd ffmpeg-20060326 && $(FFMPEG_PATCH) &&
59     ./configure --prefix=$CONTRIB $(FFMPEG_OPTIONS) --enable-gpl --disable-audio-beos &&
60     make lib && make install-libs install-headers &&
61     strip -S $CONTRIB/lib/libavcodec.a
62 }
63 Wget       $(SUBDIR)/ffmpeg.tar.gz    : $(SUBDIR)/version_ffmpeg.txt ;
64 LibAvCodec $(SUBDIR)/lib/libavcodec.a : $(SUBDIR)/ffmpeg.tar.gz ;
65
66 rule LibAvUtil
67 {
68     Depends $(<) : $(>) ;
69     Depends lib  : $(<) ;
70 }
71 actions LibAvUtil
72 {
73     strip -S $(<)
74 }
75 LibAvUtil $(SUBDIR)/lib/libavutil.a : $(SUBDIR)/lib/libavcodec.a ;
76 LibAvUtil $(SUBDIR)/lib/libavformat.a : $(SUBDIR)/lib/libavcodec.a ;
77
78 # libdvdcss
79 # We need libdvdcss.so for libdvdread's configure to work...
80 rule LibDvdCss
81 {
82     Depends $(<) : $(>) ;
83     Depends lib  : $(<) ;
84 }
85 actions LibDvdCss
86 {
87     cd `dirname $(>)` && CONTRIB=`pwd` &&
88     rm -rf libdvdcss && tar xzf libdvdcss.tar.gz && cd libdvdcss &&
89     ./configure --prefix=$CONTRIB && make && make install &&
90     strip -S $CONTRIB/lib/libdvdcss.a
91 }
92 Wget      $(SUBDIR)/libdvdcss.tar.gz : $(SUBDIR)/version_libdvdcss.txt ;
93 LibDvdCss $(SUBDIR)/lib/libdvdcss.a  : $(SUBDIR)/libdvdcss.tar.gz ;
94
95 # libdvdread
96 rule LibDvdRead
97 {
98     Depends $(<) : $(>) ;
99     Depends lib  : $(<) ;
100 }
101 actions LibDvdRead
102 {
103     cd `dirname $(>)` && CONTRIB=`pwd` &&
104     rm -rf libdvdread && tar xzf libdvdread.tar.gz && cd libdvdread &&
105     ./configure --prefix=$CONTRIB --disable-shared --with-libdvdcss=$CONTRIB &&
106     make && make install &&
107     strip -S $CONTRIB/lib/libdvdread.a
108 }
109 Wget       $(SUBDIR)/libdvdread.tar.gz : $(SUBDIR)/version_libdvdread.txt ;
110 LibDvdRead $(SUBDIR)/lib/libdvdread.a  : $(SUBDIR)/libdvdread.tar.gz ;
111
112 # libfaac
113 rule LibFaac
114 {
115     Depends $(<) : $(>) ;
116     Depends lib  : $(<) ;
117 }
118 actions LibFaac
119 {
120     cd `dirname $(>)` && CONTRIB=`pwd` &&
121     rm -rf faac && tar xzf faac.tar.gz && cd faac &&
122     ./configure --prefix=$CONTRIB --disable-shared &&
123     make && make install &&
124     strip -S $CONTRIB/lib/libfaac.a
125 }
126 Wget    $(SUBDIR)/faac.tar.gz   : $(SUBDIR)/version_faac.txt ;
127 LibFaac $(SUBDIR)/lib/libfaac.a : $(SUBDIR)/faac.tar.gz ;
128
129 # libmp3lame
130 rule LibMp3Lame
131 {
132     Depends $(<) : $(>) ;
133     Depends lib  : $(<) ;
134 }
135 actions LibMp3Lame
136 {
137     cd `dirname $(>)` && CONTRIB=`pwd` &&
138     rm -rf lame && tar xzf lame.tar.gz && cd lame &&
139     ./configure --prefix=$CONTRIB --disable-shared &&
140     make && make install &&
141     strip -S $CONTRIB/lib/libmp3lame.a
142 }
143 Wget       $(SUBDIR)/lame.tar.gz      : $(SUBDIR)/version_lame.txt ;
144 LibMp3Lame $(SUBDIR)/lib/libmp3lame.a : $(SUBDIR)/lame.tar.gz ;
145
146 # libmpeg2
147 rule LibMpeg2
148 {
149     Depends $(<) : $(>) ;
150     Depends lib  : $(<) ;
151 }
152 actions LibMpeg2
153 {
154     cd `dirname $(>)` && CONTRIB=`pwd` &&
155     rm -rf mpeg2dec && tar xzf mpeg2dec.tar.gz && cd mpeg2dec &&
156     ./configure --prefix=$CONTRIB --disable-shared &&
157     make && make install &&
158     strip -S $CONTRIB/lib/libmpeg2.a
159 }
160 Wget     $(SUBDIR)/mpeg2dec.tar.gz : $(SUBDIR)/version_mpeg2dec.txt ;
161 LibMpeg2 $(SUBDIR)/lib/libmpeg2.a  : $(SUBDIR)/mpeg2dec.tar.gz ;
162
163 # libogg
164 rule LibOgg
165 {
166     Depends $(<) : $(>) ;
167     Depends lib  : $(<) ;
168 }
169 actions LibOgg
170 {
171     cd `dirname $(>)` && CONTRIB=`pwd` &&
172     rm -rf libogg && tar xzf libogg.tar.gz && cd libogg &&
173     ./configure --prefix=$CONTRIB --disable-shared &&
174     make && make install &&
175     strip -S $CONTRIB/lib/libogg.a
176 }
177 Wget   $(SUBDIR)/libogg.tar.gz : $(SUBDIR)/version_libogg.txt ;
178 LibOgg $(SUBDIR)/lib/libogg.a  : $(SUBDIR)/libogg.tar.gz ;
179
180 # libsamplerate
181 rule LibSampleRate
182 {
183     Depends $(<) : $(>) ;
184     Depends lib  : $(<) ;
185 }
186 actions LibSampleRate
187 {
188     cd `dirname $(>)` && CONTRIB=`pwd` &&
189     rm -rf libsamplerate && tar xzf libsamplerate.tar.gz && cd libsamplerate &&
190     ./configure --prefix=$CONTRIB --disable-shared &&
191     make && make install &&
192     strip -S $CONTRIB/lib/libsamplerate.a
193 }
194 Wget          $(SUBDIR)/libsamplerate.tar.gz : $(SUBDIR)/version_libsamplerate.txt ;
195 LibSampleRate $(SUBDIR)/lib/libsamplerate.a  : $(SUBDIR)/libsamplerate.tar.gz ;
196
197 # libvorbis
198 rule LibVorbis
199 {
200     Depends $(<) : $(>) ;
201     Depends lib  : $(<) ;
202 }
203 actions LibVorbis
204 {
205     cd `dirname $(>)` && CONTRIB=`pwd` &&
206     rm -rf libvorbis && tar xzf libvorbis.tar.gz && cd libvorbis &&
207     ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --disable-shared &&
208     make && make install &&
209     strip -S $CONTRIB/lib/libvorbis.a
210 }
211 Wget      $(SUBDIR)/libvorbis.tar.gz : $(SUBDIR)/version_libvorbis.txt ;
212 LibVorbis $(SUBDIR)/lib/libvorbis.a  : $(SUBDIR)/libvorbis.tar.gz ;
213
214 rule LibVorbisEnc
215 {
216     Depends $(<) : $(>) ;
217     Depends lib  : $(<) ;
218 }
219 actions LibVorbisEnc
220 {
221     strip -S $(<)
222 }
223 LibVorbisEnc $(SUBDIR)/lib/libvorbisenc.a : $(SUBDIR)/lib/libvorbis.a ;
224
225 # libx264
226 rule LibX264
227 {
228     Depends $(<) : $(>) ;
229     Depends lib  : $(<) ;
230 }
231 actions LibX264
232 {
233     cd `dirname $(>)` && CONTRIB=`pwd` &&
234     rm -rf x264 && tar xzf x264.tar.gz && cd x264 &&
235     ./configure --prefix=$CONTRIB --enable-pthread && make &&
236     make install &&
237     strip -S $CONTRIB/lib/libx264.a
238 }
239 Wget    $(SUBDIR)/x264.tar.gz   : $(SUBDIR)/version_x264.txt ;
240 LibX264 $(SUBDIR)/lib/libx264.a : $(SUBDIR)/x264.tar.gz ;
241
242 # libxvidcore
243 rule LibXvidCore
244 {
245     Depends $(<) : $(>) ;
246     Depends lib  : $(<) ;
247 }
248 actions LibXvidCore
249 {
250     cd `dirname $(>)` && CONTRIB=`pwd` &&
251     rm -rf xvidcore && tar xzf xvidcore.tar.gz &&
252     cd xvidcore && patch -p1 < ../xvidcore.patch &&
253     cd build/generic/ && ./configure && make libxvidcore.a &&
254     cp ./=build/libxvidcore.a $CONTRIB/lib/ &&
255     cp ../../src/xvid.h $CONTRIB/include/ &&
256     strip -S $CONTRIB/lib/libxvidcore.a
257 }
258 Wget        $(SUBDIR)/xvidcore.tar.gz   : $(SUBDIR)/version_xvidcore.txt ;
259 LibXvidCore $(SUBDIR)/lib/libxvidcore.a : $(SUBDIR)/xvidcore.tar.gz ;