mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-19 08:13:21 +00:00
Change the way PORT_REPLACES_BASE_BIND8 works by adding an explicit
variable for replacing includes as well. Users who replaced the base BIND and then attempted to compile other software with -D_REENTRANT were having problems because netdb.h has a different definition for h_errno. The idea of replacing includes originated with users who wanted to compile apps against the libbind installed by the port, however those "power users" can either add the switch to replace includes, or modify their own includes slightly to use the "safe" location for the port include files (PREFIX/include/bind). The PR mentions the problem, along with a cast of thousands. :) Other tuneups for the port are just portlint appeasements. PR: ports/64449 Submitted by: eik
This commit is contained in:
parent
a1bc8c46f5
commit
71405bf674
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=104776
@ -15,27 +15,31 @@ PORTVERSION= 8.3.7
|
||||
CATEGORIES?= dns net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= bind/src/${PORTVERSION}
|
||||
|
||||
DISTFILES= bind-src.tar.gz bind-doc.tar.gz
|
||||
DIST_SUBDIR= bind-${PORTVERSION}
|
||||
|
||||
MAINTAINER= DougB@FreeBSD.org
|
||||
COMMENT= The Berkeley Internet Name Domain, an implementation of DNS
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8_INCLUDES)
|
||||
PORT_REPLACES_BASE_BIND8= yes
|
||||
INCLUDE_PATH= include
|
||||
PLIST_SUB+= INCLUDE_PATH=${INCLUDE_PATH}
|
||||
.else
|
||||
INCLUDE_PATH= include/bind
|
||||
PLIST_SUB+= INCLUDE_PATH=${INCLUDE_PATH}
|
||||
.endif
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
PKGNAMESUFFIX= -base
|
||||
PREFIX= /usr
|
||||
BIND_DESTETC= /etc/namedb
|
||||
INCLUDE_PATH= include
|
||||
PLIST_SUB= INCLUDE_PATH=${INCLUDE_PATH} FAKE_SBIN=sbin
|
||||
PLIST_SUB= FAKE_SBIN=sbin
|
||||
.else
|
||||
BIND_DESTETC= ${PREFIX}/etc
|
||||
INCLUDE_PATH= include/bind
|
||||
PLIST_SUB= INCLUDE_PATH=${INCLUDE_PATH} FAKE_SBIN=bin
|
||||
PLIST_SUB= FAKE_SBIN=bin
|
||||
.endif
|
||||
|
||||
WRKSRC= ${WRKDIR}/src
|
||||
|
||||
MAN1= dig.1 dnskeygen.1 dnsquery.1 host.1
|
||||
MAN3= getaddrinfo.3 gethostbyname.3 getipnodebyname.3 getnetent.3 \
|
||||
getnameinfo.3 inet_cidr.3 hesiod.3 resolver.3 tsig.3
|
||||
@ -47,6 +51,8 @@ MAN8= named-bootconf.8 named-xfer.8 named.8 ndc.8 nslookup.8 \
|
||||
PATCH_ARGS= -s -d ${WRKDIR}
|
||||
PATCH_DIST_ARGS= -s -d ${WRKDIR}
|
||||
|
||||
WRKSRC= ${WRKDIR}/src
|
||||
|
||||
post-patch:
|
||||
@${SED} -e "s#\'DESTETC=.*#'DESTETC=${BIND_DESTETC}'#" \
|
||||
-e "s#-O2 -g#${CFLAGS}#" \
|
||||
@ -61,12 +67,13 @@ post-patch:
|
||||
@${MV} ${WRKSRC}/bin/dnskeygen/Makefile.sed \
|
||||
${WRKSRC}/bin/dnskeygen/Makefile
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
@${SED} -e "s#\'DESTINC=.*#'DESTINC=${PREFIX}/include'#" \
|
||||
@${SED} -e "s#\'DESTINC=.*#'DESTINC=${PREFIX}/${INCLUDE_PATH}'#" \
|
||||
${WRKSRC}/port/freebsd/Makefile.set > \
|
||||
${WRKSRC}/port/freebsd/Makefile.set.sed
|
||||
@${MV} ${WRKSRC}/port/freebsd/Makefile.set.sed \
|
||||
${WRKSRC}/port/freebsd/Makefile.set
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
.for dir in nslookup nsupdate
|
||||
@${SED} -e "s#{DESTBIN}#{DESTSBIN}#g" \
|
||||
${WRKSRC}/bin/${dir}/Makefile > ${WRKSRC}/bin/${dir}/Makefile.sed
|
||||
@ -74,10 +81,10 @@ post-patch:
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.for file in named.conf.5 named.8
|
||||
.for f in named.conf.5 named.8
|
||||
@${SED} -e "s#/etc/named.conf#${BIND_DESTETC}/named.conf#g" \
|
||||
${WRKDIR}/doc/man/${file} > ${WRKDIR}/doc/man/${file}.sed
|
||||
@${MV} ${WRKDIR}/doc/man/${file}.sed ${WRKDIR}/doc/man/${file}
|
||||
${WRKDIR}/doc/man/${f} > ${WRKDIR}/doc/man/${f}.sed
|
||||
@${MV} ${WRKDIR}/doc/man/${f}.sed ${WRKDIR}/doc/man/${f}
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
@ -91,11 +98,11 @@ post-install:
|
||||
@${MKDIR} ${DOCSDIR}/html ${DOCSDIR}/misc
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/html/*.html ${DOCSDIR}/html
|
||||
${CP} -Rp ${WRKDIR}/src/conf ${DOCSDIR}
|
||||
.for file in CHANGES DNSSEC LICENSE LICENSE_RSA README SUPPORT TODO
|
||||
${INSTALL_DATA} ${WRKDIR}/src/${file} ${DOCSDIR}
|
||||
.for f in CHANGES DNSSEC LICENSE LICENSE_RSA README SUPPORT TODO
|
||||
${INSTALL_DATA} ${WRKDIR}/src/${f} ${DOCSDIR}
|
||||
.endfor
|
||||
.for file in DynamicUpdate FAQ.* *.txt
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/misc/${file} ${DOCSDIR}/misc
|
||||
.for f in DynamicUpdate FAQ.* *.txt
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/misc/${f} ${DOCSDIR}/misc
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
|
@ -15,27 +15,31 @@ PORTVERSION= 8.4.4
|
||||
CATEGORIES?= dns net
|
||||
MASTER_SITES= ${MASTER_SITE_ISC}
|
||||
MASTER_SITE_SUBDIR= bind/src/${PORTVERSION}
|
||||
|
||||
DISTFILES= bind-src.tar.gz bind-doc.tar.gz
|
||||
DIST_SUBDIR= bind-${PORTVERSION}
|
||||
|
||||
MAINTAINER= DougB@FreeBSD.org
|
||||
COMMENT= The Berkeley Internet Name Domain, an implementation of DNS
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8_INCLUDES)
|
||||
PORT_REPLACES_BASE_BIND8= yes
|
||||
INCLUDE_PATH= include
|
||||
PLIST_SUB+= INCLUDE_PATH=${INCLUDE_PATH}
|
||||
.else
|
||||
INCLUDE_PATH= include/bind
|
||||
PLIST_SUB+= INCLUDE_PATH=${INCLUDE_PATH}
|
||||
.endif
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
PKGNAMESUFFIX= -base
|
||||
PREFIX= /usr
|
||||
BIND_DESTETC= /etc/namedb
|
||||
INCLUDE_PATH= include
|
||||
PLIST_SUB= INCLUDE_PATH=${INCLUDE_PATH} FAKE_SBIN=sbin
|
||||
PLIST_SUB= FAKE_SBIN=sbin
|
||||
.else
|
||||
BIND_DESTETC= ${PREFIX}/etc
|
||||
INCLUDE_PATH= include/bind
|
||||
PLIST_SUB= INCLUDE_PATH=${INCLUDE_PATH} FAKE_SBIN=bin
|
||||
PLIST_SUB= FAKE_SBIN=bin
|
||||
.endif
|
||||
|
||||
WRKSRC= ${WRKDIR}/src
|
||||
|
||||
MAN1= dig.1 dnskeygen.1 dnsquery.1 host.1
|
||||
MAN3= getaddrinfo.3 gethostbyname.3 getipnodebyname.3 getnetent.3 \
|
||||
getnameinfo.3 inet_cidr.3 hesiod.3 resolver.3 tsig.3
|
||||
@ -47,6 +51,8 @@ MAN8= named-bootconf.8 named-xfer.8 named.8 ndc.8 nslookup.8 \
|
||||
PATCH_ARGS= -s -d ${WRKDIR}
|
||||
PATCH_DIST_ARGS= -s -d ${WRKDIR}
|
||||
|
||||
WRKSRC= ${WRKDIR}/src
|
||||
|
||||
post-patch:
|
||||
@${SED} -e "s#\'DESTETC=.*#'DESTETC=${BIND_DESTETC}'#" \
|
||||
-e "s#-O2 -g#${CFLAGS}#" \
|
||||
@ -61,12 +67,13 @@ post-patch:
|
||||
@${MV} ${WRKSRC}/bin/dnskeygen/Makefile.sed \
|
||||
${WRKSRC}/bin/dnskeygen/Makefile
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
@${SED} -e "s#\'DESTINC=.*#'DESTINC=${PREFIX}/include'#" \
|
||||
@${SED} -e "s#\'DESTINC=.*#'DESTINC=${PREFIX}/${INCLUDE_PATH}'#" \
|
||||
${WRKSRC}/port/freebsd/Makefile.set > \
|
||||
${WRKSRC}/port/freebsd/Makefile.set.sed
|
||||
@${MV} ${WRKSRC}/port/freebsd/Makefile.set.sed \
|
||||
${WRKSRC}/port/freebsd/Makefile.set
|
||||
|
||||
.if defined(PORT_REPLACES_BASE_BIND8)
|
||||
.for dir in nslookup nsupdate
|
||||
@${SED} -e "s#{DESTBIN}#{DESTSBIN}#g" \
|
||||
${WRKSRC}/bin/${dir}/Makefile > ${WRKSRC}/bin/${dir}/Makefile.sed
|
||||
@ -74,10 +81,10 @@ post-patch:
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
.for file in named.conf.5 named.8
|
||||
.for f in named.conf.5 named.8
|
||||
@${SED} -e "s#/etc/named.conf#${BIND_DESTETC}/named.conf#g" \
|
||||
${WRKDIR}/doc/man/${file} > ${WRKDIR}/doc/man/${file}.sed
|
||||
@${MV} ${WRKDIR}/doc/man/${file}.sed ${WRKDIR}/doc/man/${file}
|
||||
${WRKDIR}/doc/man/${f} > ${WRKDIR}/doc/man/${f}.sed
|
||||
@${MV} ${WRKDIR}/doc/man/${f}.sed ${WRKDIR}/doc/man/${f}
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
@ -91,11 +98,11 @@ post-install:
|
||||
@${MKDIR} ${DOCSDIR}/html ${DOCSDIR}/misc
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/html/*.html ${DOCSDIR}/html
|
||||
${CP} -Rp ${WRKDIR}/src/conf ${DOCSDIR}
|
||||
.for file in CHANGES DNSSEC LICENSE LICENSE_RSA README SUPPORT TODO
|
||||
${INSTALL_DATA} ${WRKDIR}/src/${file} ${DOCSDIR}
|
||||
.for f in CHANGES DNSSEC LICENSE LICENSE_RSA README SUPPORT TODO
|
||||
${INSTALL_DATA} ${WRKDIR}/src/${f} ${DOCSDIR}
|
||||
.endfor
|
||||
.for file in DynamicUpdate FAQ.* *.txt
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/misc/${file} ${DOCSDIR}/misc
|
||||
.for f in DynamicUpdate FAQ.* *.txt
|
||||
${INSTALL_DATA} ${WRKDIR}/doc/misc/${f} ${DOCSDIR}/misc
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user