[79953] trunk/dports/audio/daapd
jmr at macports.org
jmr at macports.org
Thu Jun 30 01:25:08 PDT 2011
Revision: 79953
http://trac.macports.org/changeset/79953
Author: jmr at macports.org
Date: 2011-06-30 01:25:06 -0700 (Thu, 30 Jun 2011)
Log Message:
-----------
daapd: fix build (#25577)
Modified Paths:
--------------
trunk/dports/audio/daapd/Portfile
trunk/dports/audio/daapd/files/patch-daaplib-src-makefile
trunk/dports/audio/daapd/files/patch-makefile
trunk/dports/audio/daapd/files/patch-select.h
Added Paths:
-----------
trunk/dports/audio/daapd/files/patch-ip_acl.c
trunk/dports/audio/daapd/files/patch-libhttpd-Site.mm.in
Modified: trunk/dports/audio/daapd/Portfile
===================================================================
--- trunk/dports/audio/daapd/Portfile 2011-06-30 08:17:48 UTC (rev 79952)
+++ trunk/dports/audio/daapd/Portfile 2011-06-30 08:25:06 UTC (rev 79953)
@@ -26,18 +26,29 @@
port:libid3tag \
port:howl
-patchfiles patch-daapd.cc patch-daapd.8 patch-daaplib-src-makefile patch-select.h patch-makefile
+patchfiles patch-daapd.cc patch-daapd.8 patch-daaplib-src-makefile \
+ patch-select.h patch-makefile patch-ip_acl.c \
+ patch-libhttpd-Site.mm.in
post-extract {
# Convert DOS to UNIX line endings so we can patch
reinplace "s|\r||g" ${worksrcpath}/daaplib/src/makefile
}
+if {${configure.compiler} != "gcc-4.0"} {
+ configure.cxxflags-append -ffriend-injection
+}
+
post-patch {
reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/daapd.cc \
${worksrcpath}/daapd.8 \
${worksrcpath}/daaplib/src/makefile \
${worksrcpath}/makefile
+ reinplace s|@CXX@|${configure.cxx}|g ${worksrcpath}/makefile \
+ ${worksrcpath}/daaplib/src/makefile
+ reinplace "s|@CFLAGS@|${configure.cxxflags} ${configure.cxx_archflags}|g" \
+ ${worksrcpath}/makefile \
+ ${worksrcpath}/daaplib/src/makefile
}
destroot {
@@ -48,6 +59,7 @@
}
use_configure no
+use_parallel_build no
livecheck.type regex
livecheck.regex ${name}-(\[0-9.a-z\]+)${extract.suffix}
Modified: trunk/dports/audio/daapd/files/patch-daaplib-src-makefile
===================================================================
--- trunk/dports/audio/daapd/files/patch-daaplib-src-makefile 2011-06-30 08:17:48 UTC (rev 79952)
+++ trunk/dports/audio/daapd/files/patch-daaplib-src-makefile 2011-06-30 08:25:06 UTC (rev 79953)
@@ -1,6 +1,12 @@
---- daaplib/src/makefile.orig 2006-03-05 07:39:36.000000000 -0600
-+++ daaplib/src/makefile 2010-07-07 22:49:56.000000000 -0500
-@@ -8,8 +8,8 @@
+--- daaplib/src/makefile.orig 2011-06-30 13:03:38.000000000 +1000
++++ daaplib/src/makefile 2011-06-30 13:06:05.000000000 +1000
+@@ -1,4 +1,4 @@
+-CC = g++
++CC = @CXX@
+ AR = ar
+ CP = cp
+ RM = rm
+@@ -8,10 +8,10 @@
LIBS =
LIBPATH =
@@ -9,5 +15,8 @@
+LIBDEPLOY = @PREFIX@/lib
+INCDEPLOY = @PREFIX@/include
INCPATH = ../include
- CFLAGS = -Wall -Wno-multichar
+-CFLAGS = -Wall -Wno-multichar
++CFLAGS = @CFLAGS@ -Wall -Wno-multichar
+ .cpp.o:
+ $(CC) $(CFLAGS) -I$(INCPATH) -c $<
Added: trunk/dports/audio/daapd/files/patch-ip_acl.c
===================================================================
--- trunk/dports/audio/daapd/files/patch-ip_acl.c (rev 0)
+++ trunk/dports/audio/daapd/files/patch-ip_acl.c 2011-06-30 08:25:06 UTC (rev 79953)
@@ -0,0 +1,10 @@
+--- libhttpd/src/ip_acl.c.orig 2006-03-06 00:39:36.000000000 +1100
++++ libhttpd/src/ip_acl.c 2011-06-30 17:49:16.000000000 +1000
+@@ -24,6 +24,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <strings.h>
++#include <sys/types.h>
+
+ #if defined(_WIN32)
+ #else
Added: trunk/dports/audio/daapd/files/patch-libhttpd-Site.mm.in
===================================================================
--- trunk/dports/audio/daapd/files/patch-libhttpd-Site.mm.in (rev 0)
+++ trunk/dports/audio/daapd/files/patch-libhttpd-Site.mm.in 2011-06-30 08:25:06 UTC (rev 79953)
@@ -0,0 +1,10 @@
+--- libhttpd/Site.mm.in.orig 2006-03-06 00:39:37.000000000 +1100
++++ libhttpd/Site.mm.in 2011-06-30 18:12:13.000000000 +1000
+@@ -37,5 +37,5 @@
+ # Any other CFlags required
+ EXTRA_CFLAGS=
+
+-CFLAGS= -g -I$(TOP)/ -I/usr/local/include $(EXTRA_CFLAGS) -D$(OS_TYPE)
+-LDLIBS= -L/usr/local/lib -L$(TOP)/lib @LIBS@ $(EXTRA_LIBS)
++CFLAGS= -g -I$(TOP)/ @CFLAGS@ $(EXTRA_CFLAGS) -D$(OS_TYPE)
++LDLIBS= -L$(TOP)/lib @LIBS@ $(EXTRA_LIBS)
Modified: trunk/dports/audio/daapd/files/patch-makefile
===================================================================
--- trunk/dports/audio/daapd/files/patch-makefile 2011-06-30 08:17:48 UTC (rev 79952)
+++ trunk/dports/audio/daapd/files/patch-makefile 2011-06-30 08:25:06 UTC (rev 79953)
@@ -1,6 +1,13 @@
---- makefile.orig 2006-03-05 07:39:37.000000000 -0600
-+++ makefile 2010-07-07 23:09:13.000000000 -0500
-@@ -14,16 +14,16 @@
+--- makefile.orig 2006-03-06 00:39:37.000000000 +1100
++++ makefile 2011-06-30 13:31:16.000000000 +1000
+@@ -8,22 +8,22 @@
+ # no need to touch anything below this line
+ # -----------------------------------------
+
+-CC = g++
++CC = @CXX@
+ MAKE = $(MAKE_COMMAND)
+ TARGET = daapd
DEPS = daaplib_ libhttpd_
OBJS = daapd.o db.o dboutput.o songcache.o parsemp3.o util.o
LIBS = -ldaaplib -lhttpd-persistent -lid3tag -lz
@@ -11,7 +18,7 @@
+LIBPATH = -L. -L./daaplib/src -L./libhttpd/src -L at PREFIX@/lib
+INCPATH = -I. -I./daaplib/include -I./libhttpd/src -I at PREFIX@/include
+DEPLOY = @PREFIX@
-+CFLAGS = -Wall -Wno-multichar $(PTHREAD_CFLAGS)
++CFLAGS = @CFLAGS@ -Wall -Wno-multichar $(PTHREAD_CFLAGS)
# HOWL
ifeq ($(HOWL_ENABLE),1)
@@ -23,3 +30,12 @@
endif
HOWLRECENT := $(word $(words $(HOWLDIRS)),$(HOWLDIRS) )
INCPATH := $(INCPATH) -I$(HOWLRECENT)
+@@ -71,7 +71,7 @@
+ cd daaplib/src && $(MAKE)
+
+ libhttpd_:
+- if test ! -e libhttpd/Site.mm; then cd libhttpd && ./configure; fi
++ if test ! -e libhttpd/Site.mm; then cd libhttpd && env CC="$(CC)" CXX="$(CC)" CFLAGS="$(CFLAGS)" ./configure; fi
+ cd libhttpd && $(MAKE)
+
+ clean:
Modified: trunk/dports/audio/daapd/files/patch-select.h
===================================================================
--- trunk/dports/audio/daapd/files/patch-select.h 2011-06-30 08:17:48 UTC (rev 79952)
+++ trunk/dports/audio/daapd/files/patch-select.h 2011-06-30 08:25:06 UTC (rev 79953)
@@ -1,11 +1,127 @@
---- libhttpd/src/select.h.orig 2006-03-05 08:00:38.000000000 -0600
-+++ libhttpd/src/select.h 2010-07-07 22:45:33.000000000 -0500
+--- libhttpd/src/select.h.orig 2011-06-30 17:41:19.000000000 +1000
++++ libhttpd/src/select.h 2011-06-30 17:37:20.000000000 +1000
@@ -38,7 +38,7 @@
#ifdef __APPLE__
#ifndef _SOCKLEN_T
- typedef int socklen_t;
-+ typedef __uint32_t socklen_t;
++ typedef unsigned int socklen_t;
#define _SOCKLEN_T
#endif
#endif
+@@ -68,6 +68,8 @@ struct Client {
+
+ struct httpd;
+
++#define NULL_ITERATOR static_cast<ClientIterator>(0)
++
+ class Clients {
+ protected:
+ std::list<Client> clientList;
+@@ -81,7 +83,7 @@ protected:
+ c++;
+ }
+
+- return 0;
++ return NULL_ITERATOR;
+ }
+
+
+@@ -154,7 +156,7 @@ public:
+
+ void erase( const int fDesc ) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) != 0) {
++ if ((c = locateFDesc(fDesc)) != NULL_ITERATOR) {
+ clientList.erase(c);
+ close(fDesc);
+ }
+@@ -162,14 +164,14 @@ public:
+
+ void finish( const int fDesc ) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) != 0) {
++ if ((c = locateFDesc(fDesc)) != NULL_ITERATOR) {
+ c->finished = true;
+ }
+ }
+
+ void address( const int fDesc, char address[HTTP_IP_ADDR_LEN] ) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) != 0) {
++ if ((c = locateFDesc(fDesc)) != NULL_ITERATOR) {
+ strncpy(address, c->address, HTTP_IP_ADDR_LEN);
+ }
+ }
+@@ -180,7 +182,7 @@ public:
+
+ int readBuf(const int fDesc, char *destBuf, const uint len) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ // printf("unknown client id %d\n", fDesc);
+ return 0;
+ }
+@@ -192,7 +194,7 @@ public:
+
+ int readLine(const int fDesc, char *destBuf, const uint len) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ // printf("unknown client id %d\n", fDesc);
+ return 0;
+ }
+@@ -217,7 +219,7 @@ public:
+ int handleWrite(int socket) {
+ int bytesWritten;
+ ClientIterator c;
+- if ((c = locateFDesc(socket)) == 0) {
++ if ((c = locateFDesc(socket)) == NULL_ITERATOR) {
+ // printf("unknown client id %d\n", socket);
+ return 2;
+ }
+@@ -260,7 +262,7 @@ public:
+ return 1;
+ } else {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ // printf("unknown client id %d\n", fDesc);
+ return 2;
+ }
+@@ -304,7 +306,7 @@ public:
+
+ void doWrite(const int fDesc, const char* string, const uint len) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ //printf("unknown client id %d\n", fDesc);
+ return;
+ }
+@@ -318,7 +320,7 @@ public:
+
+ void doWrite(const int fDesc, const char* string) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ //printf("unknown client id %d\n", fDesc);
+ return;
+ }
+@@ -351,7 +353,7 @@ public:
+
+ void queueFile(const int socket, const int pendingFile ) {
+ ClientIterator c;
+- if ((c = locateFDesc(socket)) == 0) {
++ if ((c = locateFDesc(socket)) == NULL_ITERATOR) {
+ // printf("unknown client id %d\n", socket);
+ return;
+ }
+@@ -360,7 +362,7 @@ public:
+
+ void subscribe(const int fDesc) {
+ ClientIterator c;
+- if ((c = locateFDesc(fDesc)) == 0) {
++ if ((c = locateFDesc(fDesc)) == NULL_ITERATOR) {
+ //printf("unknown client id %d\n", fDesc);
+ return;
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110630/053f1722/attachment.html>
More information about the macports-changes
mailing list