]> git.sesse.net Git - vlc/blobdiff - extras/contrib/src/Makefile
Contribs: flac patch for broken CYGWIN :D
[vlc] / extras / contrib / src / Makefile
index 4a69429ca42866825879dc9823f1448a23f1c961..a09780f1f1c5c7dd6395aea389ef72619568926e 100644 (file)
@@ -391,8 +391,13 @@ ifeq ($(BUILD),i586-pc-beos)
        ( cd $< && for f in `find . -name libtool`; do  sed -e 's/ -shared / -nostart /' -e 's/^predep_objects.*/predep_objects=""/' -i  $$f; chmod +x $$f; done )
 endif
 ifneq ($(HOST),$(BUILD))
-# We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
+  ifndef HAVE_CYGWIN
+    # We'll use the installed gettext and only need to cross-compile libintl, also build autopoint and gettextsize tools need for VLC bootstrap
        ( cd $< && make -C gettext-runtime/intl && patch -p1 < ../Patches/libintl.patch && make -C gettext-runtime/intl install && make -C gettext-tools/misc install )
+  else
+    # We are compiling for MinGW on Cygwin -- build the full current gettext
+       ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install )
+  endif
 else
 # Build and install the whole gettext
        ( cd $< && make && patch -p1 < ../Patches/libintl.patch && make install )
@@ -477,6 +482,7 @@ freetype-$(FREETYPE2_VERSION).tar.gz:
 
 freetype2: freetype-$(FREETYPE2_VERSION).tar.gz
        $(EXTRACT_GZ)
+       patch -p0 < Patches/freetype-cross.patch
 
 .freetype: freetype2
 ifdef HAVE_CYGWIN
@@ -755,14 +761,13 @@ libtheora-$(THEORA_VERSION).tar.bz2:
 libtheora: libtheora-$(THEORA_VERSION).tar.bz2
        $(EXTRACT_BZ2)
        patch -p0 < Patches/theora.patch
-       patch -p0 < Patches/theora-1.0a7.patch
        (cd $@; autoconf)
 
 .theora: libtheora .ogg
 ifdef HAVE_BEOS
-       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm && make && make install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm --disable-examples && make && make install)
 else
-       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest && make && make install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-examples && make && make install)
 
 endif
        $(INSTALL_NAME)
@@ -804,25 +809,24 @@ flac-$(FLAC_VERSION).tar.gz:
 
 flac: flac-$(FLAC_VERSION).tar.gz
        $(EXTRACT_GZ)
-ifdef HAVE_WIN32
-       patch -p0 < Patches/flac-mingw32.patch
-endif
-ifneq ($(HOST),$(BUILD))
-       (patch -p0 < Patches/flac-cross.patch && cd $@ && autoconf)
+ifdef HAVE_CYGWIN
+    patch -p0 < Patches/flac-win32.patch
 endif
 
+FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs
+
 .flac: flac .ogg 
 ifdef HAVE_WIN32
-       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src&& make -C libFLAC&& make -C libFLAC install  && cd .. && make -C include install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src&& make -C libFLAC&& make -C libFLAC install && cd .. && make -C include install)
 else
 ifdef HAVE_DARWIN_OS
 ifdef HAVE_DARWIN_OS_ON_INTEL
-       (cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations&& cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm-optimizations && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
 else
-       (cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
 endif
 else
-       (cd $<; autoconf && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-oggtest && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX)  $(FLAC_DISABLE_FLAGS) && cd src && make -C libFLAC && make -C libFLAC install  && cd .. && make -C include install)
 endif
 endif
        $(INSTALL_NAME)
@@ -874,7 +878,7 @@ faad: faad2-$(FAAD2_VERSION).tar.bz2
        (cd $@; patch -p1 < ../Patches/faad2.patch && ./bootstrap)
 
 .faad: faad
-       (cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
+       (cd $< && $(HOSTCC) ./configure $(HOSTCONF) --disable-shared --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
        $(INSTALL_NAME)
        touch $@
 
@@ -911,7 +915,6 @@ lame-$(LAME_VERSION).tar.gz:
 
 lame: lame-$(LAME_VERSION).tar.gz
        $(EXTRACT_GZ)
-       rm -rf lame;  mv lame-3.97 lame; touch lame
 
 .lame: lame
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-analyser-hooks --disable-decoder --disable-shared --disable-gtktest --disable-frontend && make && make install)
@@ -928,13 +931,15 @@ DISTCLEAN_PKG += lame-$(LAME_VERSION).tar.gz
 libebml-$(LIBEBML_VERSION).tar.bz2:
        $(WGET) $(LIBEBML_URL)
 
-ifdef SVN
-libebml:
-       $(SVN) export http://svn.matroska.org/svn/matroska/trunk/libebml libebml
-else
+## No reasons to use SVN anymore
+#ifdef SVN
+#libebml:
+#      $(SVN) export http://svn.matroska.org/svn/matroska/trunk/libebml libebml
+#else
 libebml: libebml-$(LIBEBML_VERSION).tar.bz2
        $(EXTRACT_BZ2)
-endif
+#endif
+
 ifdef HAVE_WIN32
        (cd $@; patch -p0 < ../Patches/libebml-svn-win32.patch)
 endif
@@ -947,12 +952,12 @@ else
        $(RANLIB) $(PREFIX)/lib/libebml.a
 endif  
        touch $@
-
-ifdef SVN
-libebml-source: libebml
-       tar cfvz  libebml-$(DATE).tar.gz libebml
-SOURCE += libebml-source       
-endif
+## No reasons to use SVN anymore
+#ifdef SVN
+#libebml-source: libebml
+#      tar cfvz  libebml-$(DATE).tar.gz libebml
+#SOURCE += libebml-source      
+#endif
 
 CLEAN_FILE += .ebml
 CLEAN_PKG += libebml
@@ -965,13 +970,15 @@ DISTCLEAN_PKG += libebml-$(LIBEBML_VERSION).tar.bz2
 libmatroska-$(LIBMATROSKA_VERSION).tar.bz2:
        $(WGET) $(LIBMATROSKA_URL)
 
-ifdef SVN
-libmatroska:
-       $(SVN) export http://svn.matroska.org/svn/matroska/trunk/libmatroska libmatroska
-else
+## No reasons to use SVN anymore
+#if SVN
+#libmatroska:
+#      $(SVN) export http://svn.matroska.org/svn/matroska/trunk/libmatroska libmatroska
+#else
 libmatroska: libmatroska-$(LIBMATROSKA_VERSION).tar.bz2
        $(EXTRACT_BZ2)
-endif
+#endif 
+
 ifdef HAVE_WIN32
        (cd $@; patch -p0 < ../Patches/libmatroska-win32.patch)
 endif
@@ -985,12 +992,13 @@ else
 endif
        touch $@
 
-ifdef SVN
-libmatroska-source: libmatroska
-       tar cfvz libmatroska-$(DATE).tar.gz libmatroska
-
-SOURCE += libmatroska-source
-endif
+## No reasons to use SVN anymore
+#ifdef SVN
+#libmatroska-source: libmatroska
+#      tar cfvz libmatroska-$(DATE).tar.gz libmatroska
+#
+#SOURCE += libmatroska-source
+#endif
 
 CLEAN_FILE += .matroska
 CLEAN_PKG += libmatroska
@@ -1156,6 +1164,9 @@ ifdef HAVE_DARWIN_OS
        patch -p0 < Patches/live-osx.patch
 endif
        patch -p0 < Patches/live-starttime.patch
+       (cd live/liveMedia/include; \
+               mv liveMedia_version.hh liveMedia_version.hh.bak; \
+       sed -e 's/.*LIVEMEDIA_LIBRARY_VERSION_INT.*/#define LIVEMEDIA_LIBRARY_VERSION_INT         9999999999/' liveMedia_version.hh.bak > liveMedia_version.hh )
        patch -Np0 < Patches/live-config.patch
 ifdef HAVE_UCLIBC
        patch -p0 < Patches/live-noapps.patch
@@ -1227,7 +1238,7 @@ endif
 ifdef HAVE_DARWIN_OS
        (cd $<; ./configure --prefix=$(PREFIX) --disable-shared --enable-static && make && make install)
 else
-       (cd $< && rm -f configure; autoconf configure.in > configure && $(HOSTCC) sh ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static --disable-glibtest --disable-gtktest && make && make install)
+       (cd $< && rm -f configure; aclocal -I m4/ && automake --add-missing && autoconf configure.in > configure && $(HOSTCC) sh ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static --disable-glibtest --disable-gtktest && make && make install)
 endif
        touch $@
 
@@ -1293,7 +1304,9 @@ else
 x264: x264-$(X264_VERSION).tar.gz
        $(EXTRACT_GZ)
 ifdef HAVE_WIN32
+  ifndef HAVE_CYGWIN
        (cd x264;patch -p0 <../Patches/x264-20050624-win32.patch)
+  endif
 else
        patch -p0 < Patches/x264.patch
        rm x264/x264.c
@@ -1302,7 +1315,11 @@ endif
 
 ifdef HAVE_WIN32
 .x264: x264 .pthreads
+  ifdef HAVE_CYGWIN
+       (cd $<; $(HOSTCC) RANLIB="ranlib" AR="ar" STRIP="strip" ./configure $(X264CONF) --prefix="$(PREFIX)" --extra-cflags="-I$(PREFIX)/include" --extra-ldflags="-L$(PREFIX)/lib" && make && make install)
+  else
        (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
+  endif
 else
 .x264: x264
        (cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
@@ -1502,7 +1519,14 @@ ifdef HAVE_UCLIBC
 endif
 
 .xml: xml
+ifdef HAVE_WIN32
+       (cd xml; aclocal && automake && autoreconf)
+endif
+  ifdef HAVE_CYGWIN
+       (cd xml; ac_cv_header_pthread_h="no" CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp && make && make install)
+  else
        (cd xml; CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp && make && make install)
+  endif
 ifndef HAVE_DARWIN_OS
        $(INSTALL_NAME)
 endif
@@ -1982,6 +2006,9 @@ dirac-$(DIRAC_VERSION).tar.gz:
 dirac: dirac-$(DIRAC_VERSION).tar.gz
        $(EXTRACT_GZ)
        patch -p0 <Patches/dirac-cross.patch
+ifdef HAVE_CYGWIN
+       patch -p0 <Patches/dirac-cygwin.patch
+endif
        (cd $@; aclocal && autoconf && automake)
 
 DIRAC_SUBDIRS = libdirac_byteio libdirac_common libdirac_motionest libdirac_encoder libdirac_decoder
@@ -2137,6 +2164,9 @@ taglib-$(TAGLIB_VERSION).tar.gz:
 
 taglib: taglib-$(TAGLIB_VERSION).tar.gz
        $(EXTRACT_GZ)
+ifdef HAVE_CYGWIN
+       patch -p0 <Patches/taglib-cygwin.patch
+endif
 
 .tag: taglib
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
@@ -2158,10 +2188,13 @@ pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
        $(EXTRACT_GZ)
 
 .pthreads: pthreads
-       (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-static && cp pthread.h sched.h semaphore.h $(PREFIX)/include/ && cp *.a $(PREFIX)/lib/)
+       (cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-static && cp -v pthread.h sched.h semaphore.h $(PREFIX)/include/ && cp -v *.a $(PREFIX)/lib/)
        $(INSTALL_NAME)
        touch $@
 
+CLEAN_FILE += .pthreads
+CLEAN_PKG += pthreads
+DISTCLEAN_PKG += pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
 # ***************************************************************************
 # ncurses library (with wide chars support)
 # ***************************************************************************
@@ -2194,7 +2227,7 @@ clean-src: clean
        rm -rf $(DISTCLEAN_PKG)
 
 clean-svn:
-       rm -rf ffmpeg tremor libebml libmatroska x264 libdca
+       rm -rf ffmpeg tremor x264 libdca
 
 distclean: clean-src