update gmediaserver to 0.12.0 - should build fine against libupnp 1.3.1 now
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6069 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
9ad999f637
commit
9e6869f726
@ -9,12 +9,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gmediaserver
|
||||
PKG_VERSION:=0.9.0
|
||||
PKG_VERSION:=0.12.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://savannah.nongnu.org/download/gmediaserver/
|
||||
PKG_MD5SUM:=93de0f8dcbc1353a0d0dd5b5ab4b3142
|
||||
PKG_MD5SUM:=7f99a9b2e32c41acf7e71eb0bc0840e9
|
||||
PKG_CAT:=zcat
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/gmediaserver
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+id3lib +libupnp
|
||||
DEPENDS:=+id3lib +libiconv +libmagic +libupnp
|
||||
TITLE:=An UPnP music media server
|
||||
URL:=http://www.nongnu.org/gmediaserver/
|
||||
endef
|
||||
@ -33,16 +33,20 @@ endef
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default, \
|
||||
--disable-rpath \
|
||||
--enable-threads=posix \
|
||||
--with-libiconv-prefix="$(STAGING_DIR)/usr/lib/libiconv" \
|
||||
--without-libintl-prefix \
|
||||
--with-id3lib="$(STAGING_DIR)/usr" \
|
||||
--with-libupnp="$(STAGING_DIR)/usr" \
|
||||
, \
|
||||
LIBS=" -lixml -lthreadutil -lupnp -luClibc++ -lz" \
|
||||
am_cv_func_iconv=no \
|
||||
LIBS=" -luClibc++ -lz" \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
AR="$(TARGET_CROSS)ar" \
|
||||
LTLIBICONV="" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
@ -1,107 +0,0 @@
|
||||
diff -ruN gmediaserver-0.8.0-old/src/main.c gmediaserver-0.8.0-new/src/main.c
|
||||
--- gmediaserver-0.8.0-old/src/main.c 2005-09-10 09:26:00.000000000 +0200
|
||||
+++ gmediaserver-0.8.0-new/src/main.c 2005-09-17 20:48:01.000000000 +0200
|
||||
@@ -32,8 +32,10 @@
|
||||
#include <stdbool.h> /* Gnulib, C99 */
|
||||
#include <signal.h> /* ? */
|
||||
#include <locale.h> /* ? */
|
||||
+#ifdef HAVE_ICONV
|
||||
#include <iconv.h> /* Gnulib, POSIX */
|
||||
#include "iconvme.h" /* Gnulib */
|
||||
+#endif
|
||||
#ifdef HAVE_NL_LANGINFO
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
@@ -71,8 +73,10 @@
|
||||
#ifdef HAVE_ID3LIB
|
||||
{ "disable-id3", no_argument, NULL, OPT_DISABLE_ID3 },
|
||||
#endif
|
||||
+#ifdef HAVE_ICONV
|
||||
{ "in-charset", required_argument, NULL, OPT_IN_CHARSET },
|
||||
{ "device-charset", required_argument, NULL, OPT_DEVICE_CHARSET },
|
||||
+#endif
|
||||
{ "friendly-name", required_argument, NULL, OPT_FRIENDLY_NAME },
|
||||
{ "pid-file", required_argument, NULL, OPT_PIDFILE },
|
||||
{ "profile", required_argument, NULL, OPT_PROFILE, },
|
||||
@@ -90,15 +94,21 @@
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
+#ifdef HAVE_ICONV
|
||||
iconv_t charset_convert = (iconv_t) -1;
|
||||
+#endif
|
||||
const char version_etc_copyright[] = "Copyright (C) 2005 Oskar Liljeblad.";
|
||||
|
||||
char *
|
||||
convert_string(const char *str)
|
||||
{
|
||||
+#ifdef HAVE_ICONV
|
||||
if (charset_convert == (iconv_t) -1)
|
||||
return xstrdup(str);
|
||||
return iconv_alloc(charset_convert, str);
|
||||
+#else
|
||||
+ return xstrdup(str);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -140,13 +150,17 @@
|
||||
char *logfilename = NULL;
|
||||
char *timestamp_format = NULL;
|
||||
uint32_t expire_time;
|
||||
+#ifdef HAVE_ICONV
|
||||
char *in_charset = NULL;
|
||||
char *device_charset = NULL;
|
||||
+#endif
|
||||
|
||||
set_program_name(argv[0]);
|
||||
|
||||
+#ifdef LOCALE
|
||||
if (setlocale(LC_ALL, "") == NULL)
|
||||
warn(_("cannot set locale: %s\n"), errstr);
|
||||
+#endif
|
||||
#ifdef ENABLE_NLS
|
||||
if (bindtextdomain(PACKAGE, LOCALEDIR) == NULL)
|
||||
warn(_("cannot bind message domain: %s\n"), errstr);
|
||||
@@ -174,12 +188,14 @@
|
||||
id3_enabled = false;
|
||||
break;
|
||||
#endif
|
||||
+#ifdef HAVE_ICONV
|
||||
case OPT_IN_CHARSET:
|
||||
in_charset = optarg;
|
||||
break;
|
||||
case OPT_DEVICE_CHARSET:
|
||||
device_charset = optarg;
|
||||
break;
|
||||
+#endif
|
||||
case OPT_FRIENDLY_NAME:
|
||||
if (optarg[0] == '\0')
|
||||
die(_("friendly name cannot be empty\n"));
|
||||
@@ -320,6 +336,7 @@
|
||||
|
||||
init_logging(logfilename, timestamp_format);
|
||||
|
||||
+#ifdef HAVE_ICONV
|
||||
if (device_charset != NULL) {
|
||||
if (in_charset == NULL) {
|
||||
#ifdef HAVE_NL_LANGINFO
|
||||
@@ -336,6 +353,7 @@
|
||||
if (charset_convert == (iconv_t) -1)
|
||||
die(_("cannot create character set convertor\nTry using another value for --in-charset or --device-charset\n"));
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* We could write pid before initiating logging too.
|
||||
*/
|
||||
@@ -409,8 +427,10 @@
|
||||
if (pidfilename != NULL)
|
||||
unlink(pidfilename); /* ignore errors */
|
||||
|
||||
+#ifdef HAVE_ICONV
|
||||
if (charset_convert != (iconv_t) -1)
|
||||
iconv_close(charset_convert); /* ignore errors (only EINVAL) */
|
||||
+#endif
|
||||
|
||||
finish_logging(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user