Commit db2a9430 authored by Jean-Baptiste Kempf's avatar 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
parent aabb8c74
......@@ -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
# ***************************************************************************
......
--- 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}
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment