]> git.sesse.net Git - vlc/blobdiff - extras/contrib/src/Makefile
Contribs: flac patch for broken CYGWIN :D
[vlc] / extras / contrib / src / Makefile
index a2a91f9b0194ace69a91a7285cbb0d2ad512a583..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 )
@@ -804,10 +809,9 @@ flac-$(FLAC_VERSION).tar.gz:
 
 flac: flac-$(FLAC_VERSION).tar.gz
        $(EXTRACT_GZ)
-ifdef HAVE_WIN32
-       patch -p0 < Patches/flac-win32.patch
+ifdef HAVE_CYGWIN
+    patch -p0 < Patches/flac-win32.patch
 endif
-       cd $@ && autoconf
 
 FLAC_DISABLE_FLAGS = --disable-oggtest --disable-xmms-plugin --disable-cpplibs
 
@@ -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 $@
 
@@ -927,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
@@ -946,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
@@ -964,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
@@ -984,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
@@ -1295,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
@@ -1304,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)
@@ -1507,7 +1522,11 @@ endif
 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
@@ -1987,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
@@ -2142,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)
@@ -2202,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