Win32: Use CDDB without iconv
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 26 Oct 2009 23:28:53 +0000 (00:28 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 26 Oct 2009 23:46:38 +0000 (00:46 +0100)
This makes the plugin stay at a reasonable size (120kB vs 1090kB stripped)
This might not be optimal though...

extras/contrib/src/Makefile
extras/contrib/src/Patches/libcddb-cross.patch

index 151f62d..af4d44e 100644 (file)
@@ -1430,10 +1430,11 @@ libcddb: libcddb-$(CDDB_VERSION).tar.bz2
 
 ifdef HAVE_WIN32
 .cddb: libcddb .regex
 
 ifdef HAVE_WIN32
 .cddb: libcddb .regex
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static --without-iconv CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" && make && make install)
 else
 .cddb: libcddb
 else
 .cddb: libcddb
-endif
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" LDFLAGS="$(LDFLAGS) -liconv" && make && make install)
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-shared --enable-static CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int" LDFLAGS="$(LDFLAGS) -liconv" && make && make install)
+endif
        touch $@
 
 CLEAN_FILE += .cddb
        touch $@
 
 CLEAN_FILE += .cddb
index b5215dd..5c91f01 100644 (file)
 -Libs: -L${libdir} -lcddb @LIBICONV@
 +Libs: -L${libdir} -lcddb ${libdir}/libregex.a @LIBICONV@
  Cflags: -I${includedir}
 -Libs: -L${libdir} -lcddb @LIBICONV@
 +Libs: -L${libdir} -lcddb ${libdir}/libregex.a @LIBICONV@
  Cflags: -I${includedir}
+--- include/cddb/cddb_ni.h.orig        2009-10-25 21:58:20.000000000 +0100
++++ include/cddb/cddb_ni.h     2009-10-25 21:58:46.000000000 +0100
+@@ -35,6 +35,7 @@
+ #  include <iconv.h>
+ #else
+    typedef void *iconv_t;       /* for code uniformity */
++   #define ICONV_CONST const
+ #endif
+ #ifdef HAVE_WINDOWS_H