www/trafficserver: fix build on powerpc64

This port builds on amd64, but without luajit support since there's no luajit for powerpc64.

Also add USES=localbase instead of LIBS+= and remove unused CONFIGURE_ARGS.

Since files are installed to powerpc-freebsd-thread-multi directory, set proper PLIST_SUB and do-install target.

Don't add -L/usr/lib to LDFLAGS, it breaks when compiling with ports GCC.

PR:		243154
Approved by:	gaod@hychen.org (maintainer)
MFH:		2020Q1 (fix build blanket)
This commit is contained in:
Piotr Kubaj 2020-01-20 20:17:40 +00:00
parent 88bcf8a282
commit b4ec32c9c6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=523686
3 changed files with 31 additions and 13 deletions

View file

@ -12,17 +12,18 @@ COMMENT= Fast, scalable and extensible HTTP proxy server
LICENSE= APACHE20
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS= amd64 powerpc64
LIB_DEPENDS= libcurl.so:ftp/curl \
libhwloc.so:devel/hwloc \
libluajit-5.1.so:lang/luajit \
libpcre.so:devel/pcre \
libxml2.so:textproc/libxml2 \
libbrotlienc.so:archivers/brotli
libbrotlienc.so:archivers/brotli \
${LIB_DEPENDS_${ARCH}}
LIB_DEPENDS_amd64= libluajit-5.1.so:lang/luajit
USES= compiler:c++17-lang cpe gmake libtool ncurses pathfix \
perl5 pkgconfig sqlite ssl tar:bzip2 tcl
USES= compiler:c++17-lang cpe gmake libtool localbase ncurses \
pathfix perl5 pkgconfig sqlite ssl tar:bzip2 tcl
CPE_VENDOR= apache
CPE_PRODUCT= traffic_server
@ -38,11 +39,8 @@ USERS= ${WWWOWN}
GROUPS= ${WWWGRP}
PLIST_SUB= WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}" PORTVERSION="${PORTVERSION}"
LIBS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-libxml2=${LOCALBASE} \
--with-pcre=${LOCALBASE} \
CONFIGURE_ARGS= --with-pcre=${LOCALBASE} \
--with-openssl=${OPENSSLBASE} \
--with-xml=libxml2 \
--with-tcl=${TCL_LIBDIR} \
--localstatedir=/var \
--with-user=${USERS} \
@ -54,6 +52,7 @@ CONFIGURE_ARGS= --with-libxml2=${LOCALBASE} \
OPTIONS_DEFINE= DOCS WCCP MEMCACHED IMAGEMAGICK X11
OPTIONS_SUB= yes
PLIST_SUB+= ARCH="${ARCH:S/powerpc64/powerpc/}"
WCCP_DESC= Enable WCCPv2 protocol
WCCP_CONFIGURE_ENABLE= wccp
@ -64,6 +63,12 @@ IMAGEMAGICK_DESC= Enable ats-magick & webp convert plugin
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
PLIST_SUB+= LUAJIT=""
.else
PLIST_SUB+= LUAJIT="@comment "
.endif
.if ${PORT_OPTIONS:MMEMCACHED}
LIB_DEPENDS+= libmemcached.so:databases/libmemcached
PLIST_SUB+= MEMCACHED=""
@ -102,6 +107,6 @@ post-install:
${MKDIR} ${STAGEDIR}${ETCDIR}/snapshots
(cd ${STAGEDIR}${ETCDIR} && for f in *.config *.yaml; do ${MV} $$f $$f.sample; done)
${SED} -i '' -e 's|^${STAGEDIR}||g' \
${STAGEDIR}${PREFIX}/lib/perl5/amd64-freebsd-thread-multi/auto/Apache/TS/.packlist
${STAGEDIR}${PREFIX}/lib/perl5/${ARCH:S/powerpc64/powerpc/}-freebsd-thread-multi/auto/Apache/TS/.packlist
.include <bsd.port.post.mk>

View file

@ -0,0 +1,13 @@
--- configure.orig 2020-01-03 10:44:56 UTC
+++ configure
@@ -23922,7 +23922,9 @@ $as_echo "$as_me: adding ${ssldir}/lib64 to RPATH" >&6
fi
else
- OPENSSL_LDFLAGS="-L$ssldir/lib"
+ if [ $ssldir != "/usr" ]; then
+ OPENSSL_LDFLAGS="-L$ssldir/lib"
+ fi
if test "$overriden_with_ssl"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: adding ${ssldir}/lib to RPATH" >&5

View file

@ -156,12 +156,12 @@ libexec/trafficserver/tcpinfo.so
libexec/trafficserver/test_cppapi.so
libexec/trafficserver/tls_bridge.so
libexec/trafficserver/traffic_dump.so
libexec/trafficserver/tslua.so
%%LUAJIT%%libexec/trafficserver/tslua.so
libexec/trafficserver/tsmemcache.so
libexec/trafficserver/url_sig.so
libexec/trafficserver/xdebug.so
lib/perl5/amd64-freebsd-thread-multi/auto/Apache/TS/.packlist
lib/perl5/amd64-freebsd-thread-multi/perllocal.pod
lib/perl5/%%ARCH%%-freebsd-thread-multi/auto/Apache/TS/.packlist
lib/perl5/%%ARCH%%-freebsd-thread-multi/perllocal.pod
lib/perl5/Apache/TS.pm
lib/perl5/Apache/TS/AdminClient.pm
lib/perl5/Apache/TS/Config.pm