summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-12-14 09:07:15 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-12-14 09:07:15 +0000
commitc116f944356bffae0462b7b60b02a58776e3d1e7 (patch)
tree9a9e1a376cd746fc234f039aadeca2c32923d75b /net-misc/upnp
parentAdding a patch tarball to SRC_URI (diff)
downloadgentoo-2-c116f944356bffae0462b7b60b02a58776e3d1e7.tar.gz
gentoo-2-c116f944356bffae0462b7b60b02a58776e3d1e7.tar.bz2
gentoo-2-c116f944356bffae0462b7b60b02a58776e3d1e7.zip
Added patches to build on FreeBSD and with GCC4, and be cross-distcc friendly.
(Portage version: 2.0.53)
Diffstat (limited to 'net-misc/upnp')
-rw-r--r--net-misc/upnp/ChangeLog7
-rw-r--r--net-misc/upnp/files/libupnp-1.2.1a-fbsd.patch209
-rw-r--r--net-misc/upnp/files/libupnp-1.2.1a-gcc4.patch17
-rw-r--r--net-misc/upnp/upnp-1.2.1a.ebuild27
4 files changed, 253 insertions, 7 deletions
diff --git a/net-misc/upnp/ChangeLog b/net-misc/upnp/ChangeLog
index 9d3f56835fc5..ed3e9e137abb 100644
--- a/net-misc/upnp/ChangeLog
+++ b/net-misc/upnp/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/upnp
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/upnp/ChangeLog,v 1.13 2005/11/02 20:23:02 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/upnp/ChangeLog,v 1.14 2005/12/14 09:07:15 flameeyes Exp $
+
+ 14 Dec 2005; Diego Pettenò <flameeyes@gentoo.org>
+ +files/libupnp-1.2.1a-fbsd.patch, +files/libupnp-1.2.1a-gcc4.patch,
+ upnp-1.2.1a.ebuild:
+ Added patches to build on FreeBSD and with GCC4, and be cross-distcc friendly.
02 Nov 2005; Stefan Schweizer <genstef@gentoo.org> upnp-1.2.1a.ebuild:
app-text/ghostscript -> virtual/ghostscript
diff --git a/net-misc/upnp/files/libupnp-1.2.1a-fbsd.patch b/net-misc/upnp/files/libupnp-1.2.1a-fbsd.patch
new file mode 100644
index 000000000000..6bad23e91a5e
--- /dev/null
+++ b/net-misc/upnp/files/libupnp-1.2.1a-fbsd.patch
@@ -0,0 +1,209 @@
+Index: libupnp-1.2.1a/upnp/src/api/upnpapi.c
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/api/upnpapi.c
++++ libupnp-1.2.1a/upnp/src/api/upnpapi.c
+@@ -43,7 +43,7 @@
+ #include "ThreadPool.h"
+ #include "membuffer.h"
+ #include <sys/ioctl.h>
+-#include <linux/if.h>
++#include <net/if.h>
+ #include <sys/utsname.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+Index: libupnp-1.2.1a/ixml/inc/ixml.h
+===================================================================
+--- libupnp-1.2.1a.orig/ixml/inc/ixml.h
++++ libupnp-1.2.1a/ixml/inc/ixml.h
+@@ -34,7 +34,7 @@
+
+ #include <stdio.h>
+ #include <string.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <assert.h>
+
+ typedef int BOOL;
+Index: libupnp-1.2.1a/threadutil/inc/FreeList.h
+===================================================================
+--- libupnp-1.2.1a.orig/threadutil/inc/FreeList.h
++++ libupnp-1.2.1a/threadutil/inc/FreeList.h
+@@ -36,8 +36,7 @@
+ extern "C" {
+ #endif
+
+-#include <malloc.h>
+-
++#include <stdlib.h>
+
+ #include "ithread.h"
+ #include <errno.h>
+Index: libupnp-1.2.1a/threadutil/src/LinkedList.c
+===================================================================
+--- libupnp-1.2.1a.orig/threadutil/src/LinkedList.c
++++ libupnp-1.2.1a/threadutil/src/LinkedList.c
+@@ -30,7 +30,7 @@
+ ///////////////////////////////////////////////////////////////////////////
+
+ #include "LinkedList.h"
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <assert.h>
+
+ static int
+Index: libupnp-1.2.1a/threadutil/src/iasnprintf.c
+===================================================================
+--- libupnp-1.2.1a.orig/threadutil/src/iasnprintf.c
++++ libupnp-1.2.1a/threadutil/src/iasnprintf.c
+@@ -31,7 +31,7 @@
+
+ #include <stdarg.h>
+ #include <assert.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include "iasnprintf.h"
+
+Index: libupnp-1.2.1a/upnp/src/genlib/util/upnp_timeout.c
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/genlib/util/upnp_timeout.c
++++ libupnp-1.2.1a/upnp/src/genlib/util/upnp_timeout.c
+@@ -35,7 +35,7 @@
+ ************************************************************************/
+
+ #include "upnp_timeout.h"
+-#include <malloc.h>
++#include <stdlib.h>
+
+ /************************************************************************
+ * Function : free_upnp_timeout
+Index: libupnp-1.2.1a/upnp/src/inc/client_table.h
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/inc/client_table.h
++++ libupnp-1.2.1a/upnp/src/inc/client_table.h
+@@ -39,7 +39,7 @@ extern "C" {
+ #include "upnp.h"
+
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <time.h>
+ #include "uri.h"
+ #include "service_table.h"
+Index: libupnp-1.2.1a/upnp/src/inc/http_client.h
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/inc/http_client.h
++++ libupnp-1.2.1a/upnp/src/inc/http_client.h
+@@ -40,7 +40,6 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <sys/types.h>
+-#include <malloc.h>
+ #include <time.h>
+ #include <errno.h>
+ #include <ctype.h>
+Index: libupnp-1.2.1a/upnp/src/inc/service_table.h
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/inc/service_table.h
++++ libupnp-1.2.1a/upnp/src/inc/service_table.h
+@@ -42,7 +42,7 @@ extern "C" {
+
+ #include "upnp.h"
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <time.h>
+
+ #define SID_SIZE 41
+Index: libupnp-1.2.1a/upnp/src/inc/uri.h
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/inc/uri.h
++++ libupnp-1.2.1a/upnp/src/inc/uri.h
+@@ -39,7 +39,6 @@ extern "C" {
+ #include <fcntl.h>
+ #include <string.h>
+ #include <sys/types.h>
+-#include <malloc.h>
+ #include <time.h>
+ #include <errno.h>
+ #include <ctype.h>
+Index: libupnp-1.2.1a/threadutil/src/ThreadPool.c
+===================================================================
+--- libupnp-1.2.1a.orig/threadutil/src/ThreadPool.c
++++ libupnp-1.2.1a/threadutil/src/ThreadPool.c
+@@ -341,7 +341,11 @@ tp->stats.totalJobsLQ++; tp->stats.total
+ struct timeb t;
+
+ ftime( &t );
+- srand( ( unsigned int )t.millitm + ithread_get_current_thread_id( ) );
++ srand( ( unsigned int )t.millitm
++#ifdef __GLIBC__
++ + ithread_get_current_thread_id( )
++#endif
++ );
+ }
+
+ /****************************************************************************
+Index: libupnp-1.2.1a/upnp/src/genlib/makefile
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/genlib/makefile
++++ libupnp-1.2.1a/upnp/src/genlib/makefile
+@@ -29,7 +29,6 @@
+ ##
+ ###########################################################################
+
+-MAKE = make
+ SUBDIRS = miniserver service_table util client_table net net/http net/uri
+
+ ifeq ($(DEBUG),1)
+Index: libupnp-1.2.1a/upnp/src/genlib/net/sock.c
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/genlib/net/sock.c
++++ libupnp-1.2.1a/upnp/src/genlib/net/sock.c
+@@ -48,6 +48,10 @@
+ #include <unistd.h>
+ #include "unixutil.h"
+
++#ifndef MSG_NOSIGNAL
++#define MSG_NOSIGNAL 0
++#endif
++
+ /************************************************************************
+ * Function : sock_init
+ *
+Index: libupnp-1.2.1a/upnp/src/inc/sysdep.h
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/inc/sysdep.h
++++ libupnp-1.2.1a/upnp/src/inc/sysdep.h
+@@ -19,7 +19,6 @@
+
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/sysinfo.h>
+ #include "ithread.h"
+
+ /* change to point to where MD5 .h's live */
+Index: libupnp-1.2.1a/upnp/src/makefile
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/makefile
++++ libupnp-1.2.1a/upnp/src/makefile
+@@ -29,7 +29,6 @@
+ ##
+ ###########################################################################
+
+-MAKE = make
+ ifdef TARGET
+ DIR_PATH=$(TARGET)/
+ CROSS=$(TARGET)-
+Index: libupnp-1.2.1a/upnp/src/uuid/sysdep.c
+===================================================================
+--- libupnp-1.2.1a.orig/upnp/src/uuid/sysdep.c
++++ libupnp-1.2.1a/upnp/src/uuid/sysdep.c
+@@ -144,7 +144,6 @@ get_random_info( char seed[16] )
+ {
+ MD5_CTX c;
+ typedef struct {
+- struct sysinfo s;
+ struct timeval t;
+ char hostname[257];
+ } randomness;
diff --git a/net-misc/upnp/files/libupnp-1.2.1a-gcc4.patch b/net-misc/upnp/files/libupnp-1.2.1a-gcc4.patch
new file mode 100644
index 000000000000..2ea3f88052ce
--- /dev/null
+++ b/net-misc/upnp/files/libupnp-1.2.1a-gcc4.patch
@@ -0,0 +1,17 @@
+Index: libupnp-1.2.1a/ixml/src/element.c
+===================================================================
+--- libupnp-1.2.1a.orig/ixml/src/element.c
++++ libupnp-1.2.1a/ixml/src/element.c
+@@ -454,9 +454,9 @@ ixmlElement_removeAttributeNode( IN IXML
+ element->n.firstAttr = nextSib;
+ }
+
+- ( IXML_Attr * ) attrNode->parentNode = NULL;
+- ( IXML_Attr * ) attrNode->prevSibling = NULL;
+- ( IXML_Attr * ) attrNode->nextSibling = NULL;
++ attrNode->parentNode = NULL;
++ attrNode->prevSibling = NULL;
++ attrNode->nextSibling = NULL;
+ *rtAttr = ( IXML_Attr * ) attrNode;
+ return IXML_SUCCESS;
+
diff --git a/net-misc/upnp/upnp-1.2.1a.ebuild b/net-misc/upnp/upnp-1.2.1a.ebuild
index 7a0948fc4acb..b80b148d5ce4 100644
--- a/net-misc/upnp/upnp-1.2.1a.ebuild
+++ b/net-misc/upnp/upnp-1.2.1a.ebuild
@@ -1,12 +1,14 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/upnp/upnp-1.2.1a.ebuild,v 1.4 2005/11/02 20:23:02 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/upnp/upnp-1.2.1a.ebuild,v 1.5 2005/12/14 09:07:15 flameeyes Exp $
-inherit eutils
+inherit eutils toolchain-funcs
+
+MY_P="lib${P}"
DESCRIPTION="Intel's UPnP SDK"
HOMEPAGE="http://upnp.sourceforge.net"
-SRC_URI="mirror://sourceforge/upnp/lib${P}.tar.gz"
+SRC_URI="mirror://sourceforge/upnp/${MY_P}.tar.gz"
RESTRICT="nomirror"
LICENSE="BSD"
SLOT="0"
@@ -18,7 +20,15 @@ DEPEND="sys-fs/e2fsprogs
app-text/tetex
virtual/ghostscript )"
-S="${WORKDIR}"/lib${P}/upnp
+S="${WORKDIR}/${MY_P}/upnp"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/..
+
+ epatch "${FILESDIR}/${MY_P}-gcc4.patch"
+ epatch "${FILESDIR}/${MY_P}-fbsd.patch"
+}
src_compile() {
myconf=""
@@ -27,8 +37,13 @@ src_compile() {
myconf="DEBUG=1"
fi
- cd ${S} &&
- emake ${myconf} || die "Compile failed!"
+ # Fix for distcc/crosscompile, and make sure it doesn't strip
+ emake ${myconf} \
+ CC=$(tc-getCC) \
+ AR=$(tc-getAR) \
+ LD=$(tc-getLD) \
+ STRIP=true \
+ || die "Compile failed!"
if use doc; then
emake doc || die "Documentation generation failed!"