summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2012-05-27 15:10:27 +0000
committerMichael Weber <xmw@gentoo.org>2012-05-27 15:10:27 +0000
commit9badbb19d0c7f33c308cf4b0fbed7b054aac61e3 (patch)
treec2441564d5379249a19bc88201c40fed433bbff3 /media-video
parentFixed initscript for 9.2. Testing fix for bug 407907. (diff)
downloadgentoo-2-9badbb19d0c7f33c308cf4b0fbed7b054aac61e3.tar.gz
gentoo-2-9badbb19d0c7f33c308cf4b0fbed7b054aac61e3.tar.bz2
gentoo-2-9badbb19d0c7f33c308cf4b0fbed7b054aac61e3.zip
Revbump to support net-libs/libupnp-1.6.14 (thanks Sal Gonzalez, bug 415649)
(Portage version: 2.1.10.62/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ushare/ChangeLog8
-rw-r--r--media-video/ushare/files/04_all_ushare_upnp_build_fix.patch156
-rw-r--r--media-video/ushare/ushare-1.1a-r2.ebuild51
3 files changed, 214 insertions, 1 deletions
diff --git a/media-video/ushare/ChangeLog b/media-video/ushare/ChangeLog
index eef42b49b2ba..cffef77c68b3 100644
--- a/media-video/ushare/ChangeLog
+++ b/media-video/ushare/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/ushare
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ChangeLog,v 1.8 2012/05/25 16:55:36 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ChangeLog,v 1.9 2012/05/27 15:10:27 xmw Exp $
+
+*ushare-1.1a-r2 (27 May 2012)
+
+ 27 May 2012; Michael Weber <xmw@gentoo.org>
+ +files/04_all_ushare_upnp_build_fix.patch, +ushare-1.1a-r2.ebuild:
+ Revbump to support net-libs/libupnp-1.6.14 (thanks Sal Gonzalez, bug 415649)
25 May 2012; Markos Chandras <hwoarang@gentoo.org> ushare-1.1a-r1.ebuild:
Lower libupnp dependency
diff --git a/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch
new file mode 100644
index 000000000000..c3ec37a324c5
--- /dev/null
+++ b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch
@@ -0,0 +1,156 @@
+diff -wbBur ushare-1.1a/src/http.c ushare-1.1a.my/src/http.c
+--- ushare-1.1a/src/http.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.c 2010-10-29 11:13:07.000000000 +0000
+@@ -77,8 +77,7 @@
+ info->content_type = ixmlCloneDOMString (content_type);
+ }
+
+-static int
+-http_get_info (const char *filename, struct File_Info *info)
++int http_get_info (const char *filename, struct File_Info *info)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -197,8 +196,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static UpnpWebFileHandle
+-http_open (const char *filename, enum UpnpOpenFileMode mode)
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -251,8 +249,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static int
+-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ ssize_t len = -1;
+@@ -286,8 +283,7 @@
+ return len;
+ }
+
+-static int
+-http_write (UpnpWebFileHandle fh __attribute__((unused)),
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
+ char *buf __attribute__((unused)),
+ size_t buflen __attribute__((unused)))
+ {
+@@ -296,8 +292,7 @@
+ return 0;
+ }
+
+-static int
+-http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ off_t newpos = -1;
+@@ -371,8 +366,7 @@
+ return 0;
+ }
+
+-static int
+-http_close (UpnpWebFileHandle fh)
++int http_close (UpnpWebFileHandle fh)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+
+@@ -402,13 +396,3 @@
+
+ return 0;
+ }
+-
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
+- {
+- http_get_info,
+- http_open,
+- http_read,
+- http_write,
+- http_seek,
+- http_close
+- };
+diff -wbBur ushare-1.1a/src/http.h ushare-1.1a.my/src/http.h
+--- ushare-1.1a/src/http.h 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.h 2010-10-29 11:13:11.000000000 +0000
+@@ -25,6 +25,13 @@
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
++int http_close (UpnpWebFileHandle fh);
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
++ char *buf __attribute__((unused)),
++ size_t buflen __attribute__((unused)));
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin);
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode);
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen);
++int http_get_info (const char *filename, struct File_Info *info);
+
+ #endif /* _HTTP_H_ */
+diff -wbBur ushare-1.1a/src/ushare.c ushare-1.1a.my/src/ushare.c
+--- ushare-1.1a/src/ushare.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/ushare.c 2010-10-29 11:17:45.000000000 +0000
+@@ -188,7 +188,7 @@
+ if (strcmp (request->DevUDN + 5, ut->udn))
+ return;
+
+- ip = request->CtrlPtIPAddr.s_addr;
++ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr;
+ ip = ntohl (ip);
+ sprintf (val, "%d.%d.%d.%d",
+ (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
+@@ -348,7 +348,47 @@
+
+ UpnpEnableWebserver (TRUE);
+
+- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks);
++ res = UpnpVirtualDir_set_WriteCallback(http_write);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_ReadCallback(http_read);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_OpenCallback(http_open);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_SeekCallback(http_seek);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_CloseCallback(http_close);
+ if (res != UPNP_E_SUCCESS)
+ {
+ log_error (_("Cannot set virtual directory callbacks\n"));
diff --git a/media-video/ushare/ushare-1.1a-r2.ebuild b/media-video/ushare/ushare-1.1a-r2.ebuild
new file mode 100644
index 000000000000..24c02825e225
--- /dev/null
+++ b/media-video/ushare/ushare-1.1a-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ushare-1.1a-r2.ebuild,v 1.1 2012/05/27 15:10:27 xmw Exp $
+
+EAPI=4
+inherit eutils multilib
+
+DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
+HOMEPAGE="http://ushare.geexbox.org/"
+SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dlna nls"
+
+RDEPEND=">=net-libs/libupnp-1.6.14
+ dlna? ( >=media-libs/libdlna-0.2.4 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \
+ EPATCH_OPTS="-p1" epatch
+}
+
+src_configure() {
+ local myconf
+ myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)"
+ # nls can only be disabled, on by default.
+ use nls || myconf="${myconf} --disable-nls"
+
+ # I can't use econf
+ # --host is not implemented in ./configure file
+ ./configure ${myconf} || die "./configure failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doman src/ushare.1
+ newconfd "${FILESDIR}"/ushare.conf.d ushare
+ newinitd "${FILESDIR}"/ushare.init.d ushare
+ dodoc NEWS README TODO THANKS AUTHORS
+}
+
+pkg_postinst() {
+ enewuser ushare
+ elog "Please edit /etc/conf.d/ushare to set the shared directories"
+ elog "and other important settings. Check system log if ushare is"
+ elog "not booting."
+}