Commit 5a09c805 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Contribs: add CDDB

parent 325812b6
0e07e7d37f2013164d75b530a5528f54847271fd20f3b7bedb192a05d1f61dcf006d10dc2927efe155a01eddcc57b940bc31d8ac88d5dfc4f1a09771caa84e0a libcddb-1.3.2.tar.bz2
--- libcddb/Makefile.am.orig 2009-10-24 17:24:43.000000000 +0200
+++ libcddb/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:
--- libcddb/configure.ac.orig 2009-10-25 01:51:35.000000000 +0200
+++ libcddb/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/include/cddb/cddb_ni.h.orig 2009-10-25 21:58:20.000000000 +0100
+++ libcddb/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
--- libcddb/lib/cddb_conn.c 2006-10-15 13:53:11.000000000 +0200
+++ libcddb.new/lib/cddb_conn.c 2010-11-28 21:03:39.012749230 +0100
@@ -100,9 +100,17 @@
c->use_cache = CACHE_ON;
/* construct cache dir '$HOME/[DEFAULT_CACHE]' */
s = getenv("HOME");
- c->cache_dir = (char*)malloc(strlen(s) + 1 + sizeof(DEFAULT_CACHE) + 1);
- sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE);
- c->cache_read = FALSE;
+ if( s )
+ {
+ c->cache_dir = (char*)malloc(strlen(s) + 1 + sizeof(DEFAULT_CACHE) + 1);
+ sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE);
+ c->cache_read = FALSE;
+ }
+ else
+ {
+ c->cache_dir = NULL;
+ c->use_cache = CACHE_OFF;
+ }
/* use anonymous@localhost */
c->user = strdup(DEFAULT_USER);
# CDDB
CDDB_VERSION := 1.3.2
CDDB_URL := $(SF)/libcddb/libcddb-$(CDDB_VERSION).tar.bz2
ifdef BUILD_DISCS
PKGS += cddb
endif
ifeq ($(call need_pkg,"libcddb"),)
PKGS_FOUND += cddb
endif
$(TARBALLS)/libcddb-$(CDDB_VERSION).tar.bz2:
$(call download,$(CDDB_URL))
.sum-cddb: libcddb-$(CDDB_VERSION).tar.bz2
cddb: libcddb-$(CDDB_VERSION).tar.bz2 .sum-cddb
$(UNPACK)
$(APPLY) $(SRC)/cddb/cross.patch
$(APPLY) $(SRC)/cddb/getenv-crash.patch
ifdef HAVE_WIN32
$(APPLY) $(SRC)/cddb/win32-pkg.patch
endif
$(MOVE)
.cddb: cddb .regex
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --without-iconv CFLAGS="$(CFLAGS) -D_BSD_SOCKLEN_T_=int"
cd $< && $(MAKE) install
touch $@
--- libcddb/libcddb.pc.in.orig 2009-10-25 21:36:57.000000000 +0100
+++ libcddb/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 -lregex ${libdir}/libregex.a @LIBICONV@ -lws2_32
Cflags: -I${includedir}
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