aboutsummaryrefslogtreecommitdiffstats
path: root/security/krb5
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2015-02-21 04:59:08 +0800
committercy <cy@FreeBSD.org>2015-02-21 04:59:08 +0800
commit120fb051a67165d5832186395f25f50ceefba36e (patch)
treee428b60083e2f0f31e822e812dc4761e30ee5687 /security/krb5
parent51ba58bbb23c4f6c05467af983bd8bc84dd35bf4 (diff)
downloadfreebsd-ports-gnome-120fb051a67165d5832186395f25f50ceefba36e.tar.gz
freebsd-ports-gnome-120fb051a67165d5832186395f25f50ceefba36e.tar.zst
freebsd-ports-gnome-120fb051a67165d5832186395f25f50ceefba36e.zip
Fix broken rpath.
Submitted by: hrs
Diffstat (limited to 'security/krb5')
-rw-r--r--security/krb5/Makefile27
1 files changed, 18 insertions, 9 deletions
diff --git a/security/krb5/Makefile b/security/krb5/Makefile
index fcfb647d409e..1a9845dc509e 100644
--- a/security/krb5/Makefile
+++ b/security/krb5/Makefile
@@ -3,6 +3,7 @@
PORTNAME= krb5
PORTVERSION= 1.13.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://web.mit.edu/kerberos/dist/${PORTNAME}/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-signed
@@ -26,7 +27,8 @@ USE_LDCONFIG= yes
USE_CSTD= gnu99
GNU_CONFIGURE= yes
USES= gettext gmake perl5 libtool:build
-CONFIGURE_ARGS?= --enable-shared --without-system-verto
+CONFIGURE_ARGS?= --enable-shared --without-system-verto \
+ --disable-rpath
CONFIGURE_ENV= INSTALL="${INSTALL}" INSTALL_LIB="${INSTALL_LIB}" YACC="${YACC}"
MAKE_ARGS= INSTALL="${INSTALL}" INSTALL_LIB="${INSTALL_LIB}"
@@ -39,17 +41,28 @@ LDAP= Enable LDAP support
.if defined(KRB5_HOME)
PREFIX= ${KRB5_HOME}
-CFLAGS+= -Wl,-rpath=${KRB5_HOME}/lib
-LDFLAGS+= -Wl,-rpath=${KRB5_HOME}/lib
.endif
-LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC}
+LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB}
USE_OPENSSL= yes
USE_RC_SUBR= kpropd
.include <bsd.port.pre.mk>
+# Fix up -Wl,-rpath in LDFLAGS
+.if !empty(KRB5_HOME)
+_RPATH= ${KRB5_HOME}/lib:
+.else
+_RPATH= ${LOCALBASE}/lib:
+.endif
+.if !empty(LDFLAGS:M-Wl,-rpath,*)
+.for F in ${LDFLAGS:M-Wl,-rpath,*}
+LDFLAGS:= -Wl,-rpath,${_RPATH}${F:S/-Wl,-rpath,//} \
+ ${LDFLAGS:N-Wl,-rpath,*}
+.endfor
+.endif
+
.if defined(KRB5_HOME) && ${KRB5_HOME} != ${LOCALBASE}
BROKEN= LIB_DEPENDS when using KRB5_HOME is broken
.endif
@@ -77,8 +90,6 @@ USES+= readline:port
CONFIGURE_ARGS+= --with-readline
.endif
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-
.if defined(PROGRAM_TRANSFORM_NAME) && ${PROGRAM_TRANSFORM_NAME} != ""
CONFIGURE_ARGS+= --program-transform-name="${PROGRAM_TRANSFORM_NAME}"
.endif
@@ -88,8 +99,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
HTML_DOC_DIR= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc/html
PDF_DOC_DIR= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc/pdf
-CONFIGURE_ARGS+= CPPFLAGS="-I${OPENSSLINC} -L${OPENSSLLIB} -L${LOCALBASE}/include"
-
post-extract:
@${TAR} -C ${WRKDIR} -xzf ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz --no-same-owner --no-same-permissions
@${RM} ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz.asc