[vlc-devel] commit: Contrib: libcddb for Windows. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Mon Oct 26 22:23:57 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Oct 24 17:28:54 2009 +0200| [db2a94301c48e63a5ab4cf071de24dc684a08284] | committer: Jean-Baptiste Kempf
Contrib: libcddb for Windows.
Libcddb doesn't work as advertised, you need regex to make it work.
Regex is supposed to be in your libc, but isn't in mingw... Great...
So, add a regex target and patch libcddb to not build tests and examples
Also, don't use AC_FUNC_MALLOC and REALLOC when crosscompiling and change the .pc file
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db2a94301c48e63a5ab4cf071de24dc684a08284
---
extras/contrib/src/Makefile | 24 +++++++++++++++++++
extras/contrib/src/Patches/libcddb-cross.patch | 29 ++++++++++++++++++++++++
extras/contrib/src/packages.mak | 2 +
3 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile
index cc04f41..151f62d 100644
--- a/extras/contrib/src/Makefile
+++ b/extras/contrib/src/Makefile
@@ -1426,8 +1426,13 @@ libcddb-$(CDDB_VERSION).tar.bz2:
libcddb: libcddb-$(CDDB_VERSION).tar.bz2
$(EXTRACT_BZ2)
+ (cd $@; patch -p0 < ../Patches/libcddb-cross.patch && autoreconf -fisv)
+ifdef HAVE_WIN32
+.cddb: libcddb .regex
+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)
touch $@
@@ -2597,6 +2602,25 @@ peflags/peflags.c:
CLEAN_PKG += peflags
CLEAN_FILES += .peflags
+
+# ************
+# Regex
+# ************
+
+regex-$(REGEX_VERSION).tar.gz:
+ $(WGET) $(REGEX_URL)
+
+regex: regex-$(REGEX_VERSION).tar.gz
+ $(EXTRACT_GZ)
+
+.regex: regex
+ (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make subirs= && $(AR) ru libregex.a regex.o && $(RANLIB) libregex.a && cp -v regex.h $(PREFIX)/include && cp -v libregex.a $(PREFIX)/lib )
+
+CLEAN_FILE += .regex
+CLEAN_PKG += regex
+DISTCLEAN_PKG += regex-$(REGEX_VERSION).tar.gz
+
+
# ***************************************************************************
# Some cleaning
# ***************************************************************************
diff --git a/extras/contrib/src/Patches/libcddb-cross.patch b/extras/contrib/src/Patches/libcddb-cross.patch
new file mode 100644
index 0000000..b5215dd
--- /dev/null
+++ b/extras/contrib/src/Patches/libcddb-cross.patch
@@ -0,0 +1,29 @@
+--- Makefile.am.orig 2009-10-24 17:24:43.000000000 +0200
++++ Makefile.am 2009-10-24 17:26:58.000000000 +0200
+@@ -1,5 +1,5 @@
+
+-SUBDIRS = include lib examples tests
++SUBDIRS = include lib
+ EXTRA_DIST = doc/doxygen.conf misc/$(PACKAGE).ebuild
+
+ dist-hook:
+--- configure.ac.orig 2009-10-25 01:51:35.000000000 +0200
++++ configure.ac 2009-10-25 01:51:44.000000000 +0200
+@@ -107,8 +107,6 @@
+ AC_TYPE_SIZE_T
+
+ dnl Checks for library functions.
+-AC_FUNC_MALLOC
+-AC_FUNC_REALLOC
+ AC_FUNC_STAT
+ AC_FUNC_VPRINTF
+ AC_FUNC_SELECT_ARGTYPES
+--- libcddb.pc.in.orig 2009-10-25 21:36:57.000000000 +0100
++++ libcddb.pc.in 2009-10-25 21:36:11.000000000 +0100
+@@ -6,5 +6,5 @@
+ Name: libcddb
+ Description: CDDB server access library
+ Version: @VERSION@
+-Libs: -L${libdir} -lcddb @LIBICONV@
++Libs: -L${libdir} -lcddb ${libdir}/libregex.a @LIBICONV@
+ Cflags: -I${includedir}
diff --git a/extras/contrib/src/packages.mak b/extras/contrib/src/packages.mak
index 8444f1e..0667e4a 100644
--- a/extras/contrib/src/packages.mak
+++ b/extras/contrib/src/packages.mak
@@ -129,6 +129,8 @@ LIBDTS_URL=http://debian.unnet.nl/pub/videolan/libdts/$(LIBDTS_VERSION)/libdts-$
LIBDCA_SVN=svn://svn.videolan.org/libdca/trunk
MODPLUG_VERSION=0.8.7
MODPLUG_URL=$(SF)/modplug-xmms/libmodplug-$(MODPLUG_VERSION).tar.gz
+REGEX_VERSION=0.12
+REGEX_URL=http://ftp.gnu.org/old-gnu/regex/regex-$(REGEX_VERSION).tar.gz
CDDB_VERSION=1.3.2
CDDB_URL=$(SF)/libcddb/libcddb-$(CDDB_VERSION).tar.bz2
VCDIMAGER_VERSION=0.7.23
More information about the vlc-devel
mailing list