aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkubaj <pkubaj@FreeBSD.org>2020-01-21 04:17:40 +0800
committerpkubaj <pkubaj@FreeBSD.org>2020-01-21 04:17:40 +0800
commitb2f6ce6e7bf15100682af2ea8cc9bbb73e42aa39 (patch)
treed1a0ca028ba7f539b383c72063f0848b5953344a
parentd19efceedae431166bb83cf6a78f385cdf41fffc (diff)
downloadfreebsd-ports-gnome-b2f6ce6e7bf15100682af2ea8cc9bbb73e42aa39.tar.gz
freebsd-ports-gnome-b2f6ce6e7bf15100682af2ea8cc9bbb73e42aa39.tar.zst
freebsd-ports-gnome-b2f6ce6e7bf15100682af2ea8cc9bbb73e42aa39.zip
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)
-rw-r--r--www/trafficserver/Makefile25
-rw-r--r--www/trafficserver/files/patch-configure13
-rw-r--r--www/trafficserver/pkg-plist6
3 files changed, 31 insertions, 13 deletions
diff --git a/www/trafficserver/Makefile b/www/trafficserver/Makefile
index b5d73395ad3a..6bc4fab5093f 100644
--- a/www/trafficserver/Makefile
+++ b/www/trafficserver/Makefile
@@ -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>
diff --git a/www/trafficserver/files/patch-configure b/www/trafficserver/files/patch-configure
new file mode 100644
index 000000000000..3390ec466b70
--- /dev/null
+++ b/www/trafficserver/files/patch-configure
@@ -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
diff --git a/www/trafficserver/pkg-plist b/www/trafficserver/pkg-plist
index 12f687a703aa..f32612927441 100644
--- a/www/trafficserver/pkg-plist
+++ b/www/trafficserver/pkg-plist
@@ -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