1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/dns/powerdns/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

141 lines
3.4 KiB
Makefile

# New ports collection makefile for: powerdns
# Date Created: 14.Jan 2003
# Whom: dirk.meyer@dinoex.sub.org
#
# $FreeBSD$
#
PORTNAME= powerdns
PORTVERSION= 2.9.21.1
CATEGORIES= dns ipv6
MASTER_SITES= http://downloads.powerdns.com/releases/ \
http://mirrors.evolva.ro/powerdns.com/releases/
DISTNAME= pdns-${PORTVERSION}
MAINTAINER= tremere@cainites.net
COMMENT= An advanced DNS server with multiple backends including SQL
BUILD_DEPENDS= bjam:${PORTSDIR}/devel/boost
CONFLICTS= powerdns-devel-[0-9]*
USE_GMAKE= YES
USE_SUBMAKE= YES
USE_AUTOTOOLS= libtool:15
USE_LDCONFIG= YES
CXXFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS+= --with-modules="pipe" \
--with-dynmodules="${CONFIGURE_MODULES}" \
--sysconfdir="${PREFIX}/etc/pdns" \
# --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
SUB_FILES= pkg-message
OPTIONS= PGSQL "PostgreSQL backend" on \
MYSQL "MySQL backend" off \
SQLITE "SQLite 2 backend" off \
SQLITE3 "SQLite 3 backend" off \
OPENDBX "OpenDBX backend" off \
OPENLDAP "OpenLDAP backend" off \
GEO "Geo backend" off
.include <bsd.port.pre.mk>
USE_RC_SUBR+= pdns
.if defined(WITH_GEO)
CONFIGURE_MODULES+= "geo"
PLIST_SUB+= WITHGEO=""
.else
PLIST_SUB+= WITHGEO="@comment "
.endif
.if defined(WITH_SQLITE) && defined(WITH_SQLITE3)
BROKEN= choose only one SQLite backend version
.endif
.if defined(WITH_PGSQL)
USE_PGSQL?= YES
CONFIGURE_MODULES+= "gpgsql"
PLIST_SUB+= WITHPGSQL=""
.else
CONFIGURE_ARGS+= --disable-pgsql
PLIST_SUB+= WITHPGSQL="@comment "
.endif
.if defined(WITH_MYSQL)
USE_MYSQL?= YES
CONFIGURE_MODULES+= "gmysql"
CXXFLAGS+= -I${LOCALBASE}/include/mysql
LDFLAGS+= -L${LOCALBASE}/lib/mysql
PLIST_SUB+= WITHMYSQL=""
.else
CONFIGURE_ARGS+= --disable-mysql
PLIST_SUB+= WITHMYSQL="@comment "
.endif
.if defined(WITH_OPENLDAP)
USE_OPENLDAP?= YES
CONFIGURE_MODULES+= "ldap"
CXXFLAGS+= -L${LOCALBASE}/lib -DLDAP_DEPRECATED=1
PLIST_SUB+= WITHOPENLDAP=""
.else
PLIST_SUB+= WITHOPENLDAP="@comment "
.endif
.if defined(WITH_SQLITE)
USE_SQLITE?= 2
CONFIGURE_MODULES+= "gsqlite"
PLIST_SUB+= WITHSQLITE=""
.else
PLIST_SUB+= WITHSQLITE="@comment "
.endif
.if defined(WITH_SQLITE3)
USE_SQLITE?= 3
CONFIGURE_MODULES+= "gsqlite3"
PLIST_SUB+= WITHSQLITE3=""
.else
PLIST_SUB+= WITHSQLITE3="@comment "
.endif
.if defined(WITH_OPENDBX)
LIB_DEPENDS+= opendbx.[1-2]:${PORTSDIR}/databases/opendbx
CONFIGURE_MODULES+= "opendbx"
PLIST_SUB+= WITHOPENDBX=""
CXXFLAGS+= -L${LOCALBASE}/lib
.else
PLIST_SUB+= WITHOPENDBX="@comment "
.endif
.if defined(WITH_OPENLDAP)
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/pdns.conf)
${INSTALL_DATA} ${PREFIX}/etc/pdns/pdns.conf-dist ${PREFIX}/etc/pdns/pdns.conf
.endif
.if !defined(NOPORTEXAMPLES)
${MKDIR} ${EXAMPLESDIR}
.for i in pdns.conf tables-mssql_or_sybase.sql tables-mysql.sql tables-pgsql.sql tables-sqlite.sql
${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>