diff --git a/dns/powerdns-devel/Makefile b/dns/powerdns-devel/Makefile index e85395bf2cfd..d32d4035a9ec 100644 --- a/dns/powerdns-devel/Makefile +++ b/dns/powerdns-devel/Makefile @@ -1,144 +1,161 @@ # New ports collection makefile for: powerdns # Date Created: 14.Jan 2003 # Whom: dirk.meyer@dinoex.sub.org # # $FreeBSD$ # PORTNAME= powerdns PORTVERSION= 2.9.16 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= dns ipv6 MASTER_SITES= http://downloads.powerdns.com/releases/ DISTNAME= pdns-${PORTVERSION} MAINTAINER= tremere@cainites.net COMMENT= An advanced DNS server with SQL backend USE_GMAKE= YES USE_SUBMAKE= YES USE_REINPLACE= YES GNU_CONFIGURE= YES CONFIGURE_ARGS+= --with-modules="${CONFIGURE_MODULES} pipe" \ --with-dynmodules="" # --enable-debug SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ CURDIR2="${.CURDIR}" \ MKDIR="${MKDIR}" \ DISTNAME="${DISTNAME}" \ 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) .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .else .if defined(BATCH) # default package, can be configured in /etc/make.conf POWERDNS_OPTIONS?= \"PostgreSQL\" .endif # make INDEX match NO_DESCRIBE=yes .endif .if defined(WITH_POSTGRESQL_DRIVER) && !defined(WITHOUT_POSTGRESQL_DRIVER) LIB_DEPENDS+= pq[+][+].4:${PORTSDIR}/databases/postgresql-libpq++ CONFIGURE_ARGS+= --enable-pgsql CONFIGURE_MODULES+= "gpgsql" CFLAGS+= -DDLLIMPORT="" .else CONFIGURE_ARGS+= --disable-pgsql .endif .if defined(WITH_MYSQL_DRIVER) USE_MYSQL?= YES CONFIGURE_ARGS+= --enable-mysql CONFIGURE_MODULES+= "gmysql" .else CONFIGURE_ARGS+= --disable-mysql .endif .if defined(WITH_LDAP) USE_OPENLDAP?= YES USE_LIBTOOL_VER= 13 INSTALLS_SHLIB= YES -USE_GCC=3.2 CONFIGURE_MODULES+= "ldap" PLIST_SUB+= WITHLDAP="" .else PLIST_SUB+= WITHLDAP="@comment " .endif .if defined(WITH_SQLITE) LIB_DEPENDS= sqlite.2:${PORTSDIR}/${SQLITE_PORT} SQLITE_PORT?= databases/sqlite CONFIGURE_ARGS+= --enable-sqlite CONFIGURE_MODULES+= "gsqlite" .else CONFIGURE_ARGS+= --disable-sqlite .endif .if defined(POWERDNS_WITH_RECURSOR) -USE_GCC=3.2 CONFIGURE_ARGS+= --enable-recursor PLIST_SUB+= RECURSOR="" .else PLIST_SUB+= RECURSOR="@comment " .endif .include .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) describe: .if defined(BATCH) @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/configure.powerdns .endif @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} BATCH=yes ${.TARGET} .endif pre-everything:: @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/configure.powerdns post-clean: @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc .if defined(WITH_LDAP) post-patch: ${REINPLACE_CMD} -e 's;-I. ;-I. -I${LOCALBASE}/include ;' \ -e 's;la_LDFLAGS =;la_LDFLAGS = -L${LOCALBASE}/lib;' \ ${WRKSRC}/modules/ldapbackend/Makefile.in ${REINPLACE_CMD} -e 's;@LIBDL@;@LIBDL@ -L${LOCALBASE}/lib;' \ -e 's;@modulelibs@;@modulelibs@ -llber;' \ ${WRKSRC}/pdns/Makefile.in .endif post-install: .if !exists(${PREFIX}/etc/pdns.conf) ${INSTALL_DATA} ${PREFIX}/etc/pdns.conf-dist ${PREFIX}/etc/pdns.conf .endif .if !defined(NOPORTDOCS) ${MKDIR} ${EXAMPLESDIR} .for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql pdns_sqlite.sql ${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/ .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 ${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/pkg-plist b/dns/powerdns-devel/pkg-plist index 0925e1bcea29..1e57b412821b 100644 --- a/dns/powerdns-devel/pkg-plist +++ b/dns/powerdns-devel/pkg-plist @@ -1,19 +1,21 @@ bin/pdns_control bin/zone2ldap bin/zone2sql sbin/pdns_server %%WITHLDAP%%lib/libldapbackend.so.0 %%WITHLDAP%%lib/libldapbackend.la %%WITHLDAP%%lib/libldapbackend.a %%WITHLDAP%%@exec ln -fs libldapbackend.so.0 %D/lib/libldapbackend.so %%WITHLDAP%%@unexec rm -f %D/lib/libldapbackend.so %%RECURSOR%%sbin/pdns_recursor @unexec if cmp -s %D/etc/pdns.conf %D/etc/pdns.conf-dist; then rm -f %D/etc/pdns.conf; fi etc/pdns.conf-dist etc/rc.d/pdns.sh.sample @exec [ -f %B/pdns.conf ] || cp %B/%f %B/pdns.conf %%PORTDOCS%%share/examples/powerdns/pdns.conf %%PORTDOCS%%share/examples/powerdns/pdns_mysql.sql %%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 e85395bf2cfd..d32d4035a9ec 100644 --- a/dns/powerdns/Makefile +++ b/dns/powerdns/Makefile @@ -1,144 +1,161 @@ # New ports collection makefile for: powerdns # Date Created: 14.Jan 2003 # Whom: dirk.meyer@dinoex.sub.org # # $FreeBSD$ # PORTNAME= powerdns PORTVERSION= 2.9.16 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= dns ipv6 MASTER_SITES= http://downloads.powerdns.com/releases/ DISTNAME= pdns-${PORTVERSION} MAINTAINER= tremere@cainites.net COMMENT= An advanced DNS server with SQL backend USE_GMAKE= YES USE_SUBMAKE= YES USE_REINPLACE= YES GNU_CONFIGURE= YES CONFIGURE_ARGS+= --with-modules="${CONFIGURE_MODULES} pipe" \ --with-dynmodules="" # --enable-debug SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ CURDIR2="${.CURDIR}" \ MKDIR="${MKDIR}" \ DISTNAME="${DISTNAME}" \ 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) .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .else .if defined(BATCH) # default package, can be configured in /etc/make.conf POWERDNS_OPTIONS?= \"PostgreSQL\" .endif # make INDEX match NO_DESCRIBE=yes .endif .if defined(WITH_POSTGRESQL_DRIVER) && !defined(WITHOUT_POSTGRESQL_DRIVER) LIB_DEPENDS+= pq[+][+].4:${PORTSDIR}/databases/postgresql-libpq++ CONFIGURE_ARGS+= --enable-pgsql CONFIGURE_MODULES+= "gpgsql" CFLAGS+= -DDLLIMPORT="" .else CONFIGURE_ARGS+= --disable-pgsql .endif .if defined(WITH_MYSQL_DRIVER) USE_MYSQL?= YES CONFIGURE_ARGS+= --enable-mysql CONFIGURE_MODULES+= "gmysql" .else CONFIGURE_ARGS+= --disable-mysql .endif .if defined(WITH_LDAP) USE_OPENLDAP?= YES USE_LIBTOOL_VER= 13 INSTALLS_SHLIB= YES -USE_GCC=3.2 CONFIGURE_MODULES+= "ldap" PLIST_SUB+= WITHLDAP="" .else PLIST_SUB+= WITHLDAP="@comment " .endif .if defined(WITH_SQLITE) LIB_DEPENDS= sqlite.2:${PORTSDIR}/${SQLITE_PORT} SQLITE_PORT?= databases/sqlite CONFIGURE_ARGS+= --enable-sqlite CONFIGURE_MODULES+= "gsqlite" .else CONFIGURE_ARGS+= --disable-sqlite .endif .if defined(POWERDNS_WITH_RECURSOR) -USE_GCC=3.2 CONFIGURE_ARGS+= --enable-recursor PLIST_SUB+= RECURSOR="" .else PLIST_SUB+= RECURSOR="@comment " .endif .include .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) describe: .if defined(BATCH) @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/configure.powerdns .endif @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} BATCH=yes ${.TARGET} .endif pre-everything:: @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/configure.powerdns post-clean: @ ${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc .if defined(WITH_LDAP) post-patch: ${REINPLACE_CMD} -e 's;-I. ;-I. -I${LOCALBASE}/include ;' \ -e 's;la_LDFLAGS =;la_LDFLAGS = -L${LOCALBASE}/lib;' \ ${WRKSRC}/modules/ldapbackend/Makefile.in ${REINPLACE_CMD} -e 's;@LIBDL@;@LIBDL@ -L${LOCALBASE}/lib;' \ -e 's;@modulelibs@;@modulelibs@ -llber;' \ ${WRKSRC}/pdns/Makefile.in .endif post-install: .if !exists(${PREFIX}/etc/pdns.conf) ${INSTALL_DATA} ${PREFIX}/etc/pdns.conf-dist ${PREFIX}/etc/pdns.conf .endif .if !defined(NOPORTDOCS) ${MKDIR} ${EXAMPLESDIR} .for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql pdns_sqlite.sql ${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/ .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 ${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/pkg-plist b/dns/powerdns/pkg-plist index 0925e1bcea29..1e57b412821b 100644 --- a/dns/powerdns/pkg-plist +++ b/dns/powerdns/pkg-plist @@ -1,19 +1,21 @@ bin/pdns_control bin/zone2ldap bin/zone2sql sbin/pdns_server %%WITHLDAP%%lib/libldapbackend.so.0 %%WITHLDAP%%lib/libldapbackend.la %%WITHLDAP%%lib/libldapbackend.a %%WITHLDAP%%@exec ln -fs libldapbackend.so.0 %D/lib/libldapbackend.so %%WITHLDAP%%@unexec rm -f %D/lib/libldapbackend.so %%RECURSOR%%sbin/pdns_recursor @unexec if cmp -s %D/etc/pdns.conf %D/etc/pdns.conf-dist; then rm -f %D/etc/pdns.conf; fi etc/pdns.conf-dist etc/rc.d/pdns.sh.sample @exec [ -f %B/pdns.conf ] || cp %B/%f %B/pdns.conf %%PORTDOCS%%share/examples/powerdns/pdns.conf %%PORTDOCS%%share/examples/powerdns/pdns_mysql.sql %%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