From c32bdc79d9bb8307be2a8512e61ce0de80bc9264 Mon Sep 17 00:00:00 2001 From: nork Date: Sat, 20 Nov 2004 01:21:17 +0000 Subject: pdns_recursor related issues fixed. I committed pre-improved version's PR. This is my mistake. Pointed out by: Ralf van der Enden (maintainer) Pointy hat to: myself PR: ports/73862 Submitted by: Ralf van der Enden (maintainer) --- dns/powerdns-devel/Makefile | 14 +-------- .../files/patch-pdns_pdns_recursor_cc | 33 ++++++++++++++++++++++ dns/powerdns-devel/pkg-plist | 2 -- dns/powerdns/Makefile | 14 +-------- dns/powerdns/files/patch-pdns_pdns_recursor_cc | 33 ++++++++++++++++++++++ dns/powerdns/pkg-plist | 2 -- 6 files changed, 68 insertions(+), 30 deletions(-) create mode 100644 dns/powerdns-devel/files/patch-pdns_pdns_recursor_cc create mode 100644 dns/powerdns/files/patch-pdns_pdns_recursor_cc diff --git a/dns/powerdns-devel/Makefile b/dns/powerdns-devel/Makefile index d32d4035a9ec..781e181d2d25 100644 --- a/dns/powerdns-devel/Makefile +++ b/dns/powerdns-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= powerdns PORTVERSION= 2.9.16 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= dns ipv6 MASTER_SITES= http://downloads.powerdns.com/releases/ DISTNAME= pdns-${PORTVERSION} @@ -145,17 +145,5 @@ post-install: > ${WRKSRC}/pdns.sh.sample ${INSTALL_SCRIPT} ${WRKSRC}/pdns.sh.sample ${STARTUP_SCRIPT} .endif -.if defined(POWERDNS_WITH_RECURSOR) -.if !exists(${LIBMAP_CONF}) - @${ECHO_MSG} "# Start of fix (pdns_recursor)" > ${LIBMAP_CONF} -.else - @${ECHO_MSG} "# Start of fix (pdns_recursor)" >> ${LIBMAP_CONF} -.endif - @${ECHO_MSG} "Installing fix in /etc/libmap.conf for pdns_recursor." - @${ECHO_MSG} "[pdns_recursor]" >> ${LIBMAP_CONF} - @${ECHO_MSG} "libpthread.so.1 libc_r.so.5" >> ${LIBMAP_CONF} - @${ECHO_MSG} "libpthread.so libc_r.so" >> ${LIBMAP_CONF} - @${ECHO_MSG} "# End of fix (pdns_recursor)" >> ${LIBMAP_CONF} -.endif .include diff --git a/dns/powerdns-devel/files/patch-pdns_pdns_recursor_cc b/dns/powerdns-devel/files/patch-pdns_pdns_recursor_cc new file mode 100644 index 000000000000..74b7ca3d6f45 --- /dev/null +++ b/dns/powerdns-devel/files/patch-pdns_pdns_recursor_cc @@ -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 + #include + #include ++#include ++#include + #ifndef WIN32 + #include + #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() diff --git a/dns/powerdns-devel/pkg-plist b/dns/powerdns-devel/pkg-plist index 1e57b412821b..0925e1bcea29 100644 --- a/dns/powerdns-devel/pkg-plist +++ b/dns/powerdns-devel/pkg-plist @@ -17,5 +17,3 @@ etc/rc.d/pdns.sh.sample %%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql %%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql %%PORTDOCS%%@dirrm share/examples/powerdns -%%RECURSOR%%@unexec sed -e "/^# Start of fix (pdns_recursor)$/,/^# End of fix (pdns_recursor)$/d" < /etc/libmap.conf > /etc/libmap.conf.tmp -%%RECURSOR%%@unexec mv /etc/libmap.conf.tmp /etc/libmap.conf diff --git a/dns/powerdns/Makefile b/dns/powerdns/Makefile index d32d4035a9ec..781e181d2d25 100644 --- a/dns/powerdns/Makefile +++ b/dns/powerdns/Makefile @@ -7,7 +7,7 @@ PORTNAME= powerdns PORTVERSION= 2.9.16 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= dns ipv6 MASTER_SITES= http://downloads.powerdns.com/releases/ DISTNAME= pdns-${PORTVERSION} @@ -145,17 +145,5 @@ post-install: > ${WRKSRC}/pdns.sh.sample ${INSTALL_SCRIPT} ${WRKSRC}/pdns.sh.sample ${STARTUP_SCRIPT} .endif -.if defined(POWERDNS_WITH_RECURSOR) -.if !exists(${LIBMAP_CONF}) - @${ECHO_MSG} "# Start of fix (pdns_recursor)" > ${LIBMAP_CONF} -.else - @${ECHO_MSG} "# Start of fix (pdns_recursor)" >> ${LIBMAP_CONF} -.endif - @${ECHO_MSG} "Installing fix in /etc/libmap.conf for pdns_recursor." - @${ECHO_MSG} "[pdns_recursor]" >> ${LIBMAP_CONF} - @${ECHO_MSG} "libpthread.so.1 libc_r.so.5" >> ${LIBMAP_CONF} - @${ECHO_MSG} "libpthread.so libc_r.so" >> ${LIBMAP_CONF} - @${ECHO_MSG} "# End of fix (pdns_recursor)" >> ${LIBMAP_CONF} -.endif .include diff --git a/dns/powerdns/files/patch-pdns_pdns_recursor_cc b/dns/powerdns/files/patch-pdns_pdns_recursor_cc new file mode 100644 index 000000000000..74b7ca3d6f45 --- /dev/null +++ b/dns/powerdns/files/patch-pdns_pdns_recursor_cc @@ -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 + #include + #include ++#include ++#include + #ifndef WIN32 + #include + #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() diff --git a/dns/powerdns/pkg-plist b/dns/powerdns/pkg-plist index 1e57b412821b..0925e1bcea29 100644 --- a/dns/powerdns/pkg-plist +++ b/dns/powerdns/pkg-plist @@ -17,5 +17,3 @@ etc/rc.d/pdns.sh.sample %%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql %%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql %%PORTDOCS%%@dirrm share/examples/powerdns -%%RECURSOR%%@unexec sed -e "/^# Start of fix (pdns_recursor)$/,/^# End of fix (pdns_recursor)$/d" < /etc/libmap.conf > /etc/libmap.conf.tmp -%%RECURSOR%%@unexec mv /etc/libmap.conf.tmp /etc/libmap.conf -- cgit