Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Nov 2004 22:20:29 GMT
From:      Ralf van der Enden <tremere@cainites.net>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/73862: pdns_recursor related issues fixed
Message-ID:  <200411162220.iAGMKTX6076510@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/73862; it has been noted by GNATS.

From: Ralf van der Enden <tremere@cainites.net>
To: freebsd-gnats-submit@FreeBSD.org, tremere@cainites.net
Cc:  
Subject: Re: ports/73862: pdns_recursor related issues fixed
Date: Tue, 16 Nov 2004 23:10:24 +0100

 Hello freebsd-gnats-submit,
 
   Okay. I found the problem. Had to remove some manually added imports
   from the pthread + semaphore library and add the pthread.h and
   semaphore.h include files. Everything works smoothly again (I didn't
   even break it on versions prior to 5.3).
 
   Here's the new patch:
 
 --- pdns-2.9.16_5.diff begins here ---
 diff -ruN powerdns.orig/Makefile powerdns/Makefile
 --- powerdns.orig/Makefile      Mon Nov  8 00:29:43 2004
 +++ powerdns/Makefile   Tue Nov 16 21:41:44 2004
 @@ -7,7 +7,7 @@
  
  PORTNAME=      powerdns
  PORTVERSION=   2.9.16
 -PORTREVISION=  4
 +PORTREVISION=  5
  CATEGORIES=    dns ipv6
  MASTER_SITES=  http://downloads.powerdns.com/releases/
  DISTNAME=      pdns-${PORTVERSION}
 @@ -29,6 +29,7 @@
                 POWERDNS_OPTIONS="${POWERDNS_OPTIONS}"
  MAN8=          pdns_control.8 pdns_server.8 zone2sql.8
  STARTUP_SCRIPT=        ${PREFIX}/etc/rc.d/pdns.sh.sample
 +LIBMAP_CONF=   /etc/libmap.conf
  
  # use user config if possible
  .if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
 @@ -63,7 +64,6 @@
  USE_OPENLDAP?=         YES
  USE_LIBTOOL_VER=       13
  INSTALLS_SHLIB=                YES
 -USE_GCC=3.2
  CONFIGURE_MODULES+=    "ldap"
  PLIST_SUB+=            WITHLDAP=""
  .else
 @@ -80,7 +80,6 @@
  .endif
  
  .if defined(POWERDNS_WITH_RECURSOR)
 -USE_GCC=3.2
  CONFIGURE_ARGS+=       --enable-recursor
  PLIST_SUB+=            RECURSOR=""
  .else
 @@ -90,13 +89,19 @@
  .include <bsd.port.pre.mk>
  
  .if defined(POWERDNS_WITH_RECURSOR)
 -.if exists(/usr/include/ucontext.h)
 +.if exists(/usr/include/ucontext.h) && ${OSVERSION} >= 500000
  UCONTEXT!=     ${AWK} '/setcontext/ { print "YES" }' \
                 /usr/include/ucontext.h
  .if ${UCONTEXT} == ""
 -BROKEN=                setcontext for recursor not found
 +BROKEN=                setcontext for recursor not found or FreeBSD version lower than 5.0
 +.endif
  .endif
  .endif
 +
 +.if defined(POWERDNS_WITH_RECURSOR) || defined(WITH_LDAP)
 +.if ${OSVERSION} < 500039
 +USE_GCC=3.2
 +.endif
  .endif
  
  .if defined(NO_DESCRIBE)
 @@ -134,7 +139,7 @@
  .endfor
  .endif
  .if !exists(${STARTUP_SCRIPT})
 -       ${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file."
 +       @${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file."
         ${SED} -e "s=%%PREFIX%%=${PREFIX}=" \
                 ${FILESDIR}/pdns.sh.sample  \
                 > ${WRKSRC}/pdns.sh.sample
 diff -ruN powerdns.orig/files/patch-pdns_pdns_recursor_cc powerdns/files/patch-pdns_pdns_recursor_cc
 --- powerdns.orig/files/patch-pdns_pdns_recursor_cc     Thu Jan  1 01:00:00 1970
 +++ powerdns/files/patch-pdns_pdns_recursor_cc  Tue Nov 16 21:34:51 2004
 @@ -0,0 +1,33 @@
 +--- pdns/pdns_recursor.cc.orig Tue Nov 16 21:21:59 2004
 ++++ pdns/pdns_recursor.cc      Tue Nov 16 21:22:31 2004
 +@@ -22,6 +22,8 @@
 + #include <errno.h>
 + #include <map>
 + #include <set>
 ++#include <semaphore.h>
 ++#include <pthread.h>
 + #ifndef WIN32
 + #include <netdb.h>
 + #endif // WIN32
 +@@ -42,21 +44,6 @@
 + MemRecursorCache RC;
 + 
 + string s_programname="pdns_recursor";
 +-
 +-#ifndef WIN32
 +-extern "C" {
 +-  int sem_init(sem_t*, int, unsigned int){return 0;}
 +-  int sem_wait(sem_t*){return 0;}
 +-  int sem_trywait(sem_t*){return 0;}
 +-  int sem_post(sem_t*){return 0;}
 +-  int sem_getvalue(sem_t*, int*){return 0;}
 +-  pthread_t pthread_self(void){return (pthread_t) 0;}
 +-  int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr){ return 0; }
 +-  int pthread_mutex_lock(pthread_mutex_t *mutex){ return 0; }
 +-  int pthread_mutex_unlock(pthread_mutex_t *mutex) { return 0; }
 +-
 +-}
 +-#endif // WIN32
 + 
 + StatBag S;
 + ArgvMap &arg()
 --- pdns-2.9.16_5.diff ends here ---
 
 
 -- 
 Best regards,
  Ralf                          mailto:tremere@cainites.net
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411162220.iAGMKTX6076510>