Files
Alexey Dokuchaev 18bf1a7d6b textproc/gnugrep (dependencies): do not rely on compatibility symlink
Historically we had built and installed GNU grep programs as `grep' +
[ef]grep, but started to configure the port with `--program-prefix=g'
in 2022, as we and several other non-GNU/Linux systems, e.g. NetBSD,
OpenBSD, Solaris, macOS do for miscellaneous GNU utilities.  To avoid
breaking POLA, g-prefixless compatibility symlinks were being created,
subject to the COMPAT option (on by default).

Recently GNU grep developers decided to deprecate {e,f}grep variants,
with the clear intention to consolidate all three greps into a single
command.  This had significantly annoyed users who could not update
their scripts to `grep -[EF]', usually for portability reasons, e.g.
SunOS 4.11 grep which does not support those switches, but does have
egrep and fgrep, or when scripts are written by others and they don't
have permissions to modify them, etc.  Perhaps it is time to turn the
COMPAT option off by default, this commit concludes the preparation.

PR:		277784
Requested by:	fuz, obrien
2025-05-11 06:58:54 +00:00

71 lines
2.1 KiB
Makefile

PORTNAME= proxysql
PORTVERSION= 2.6.6
CATEGORIES= databases
MAINTAINER= zi@FreeBSD.org
COMMENT= High performance, high availability, protocol-aware proxy for MySQL
WWW= https://www.proxysql.com/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_i386= configure: error: Unsupported pointer size: 0
BUILD_DEPENDS= aclocal:devel/automake \
autoreconf:devel/autoconf \
bash:shells/bash \
cmake:devel/cmake-core \
ggrep:textproc/gnugrep \
libgcrypt>0:security/libgcrypt \
libtoolize:devel/libtool \
e2fsprogs-libuuid>0:misc/e2fsprogs-libuuid \
gnutls>0:security/gnutls
RUN_DEPENDS= libgcrypt>0:security/libgcrypt \
e2fsprogs-libuuid>0:misc/e2fsprogs-libuuid \
gnutls>0:security/gnutls
USES= compiler:c++11-lang gmake libtool perl5 python:build shebangfix
USE_PERL5= build
USE_GCC= yes
MAKE_ENV= GIT_VERSION=${PORTVERSION}
USE_GITHUB= yes
ALL_TARGET= build_deps default
SHEBANG_FILES= deps/libssl/verify-bio_st-match.sh
LDFLAGS+= -L${LOCALBASE}/lib
BINARY_ALIAS= python3=${PYTHON_CMD}
USE_RC_SUBR= ${PORTNAME}
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
GH_ACCOUNT= sysown
post-patch:
@${REINPLACE_CMD} -e 's,/etc/,${ETCDIR}/,g' ${WRKSRC}/lib/ProxySQL_GloVars.cpp
@${REINPLACE_CMD} \
-e 's,/var/lib,/var/db,g' \
-e '7s/^/errorlog="\/var\/log\/proxysql\/proxysql-error.log"\n\n/g' \
-e '7s/^/pidfile="\/var\/run\/${PORTNAME}\/${PORTNAME}.pid"\n/g' \
${WRKSRC}/src/proxysql.cfg
@${REINPLACE_CMD} \
-e 's,grep -P,g&,' \
-e '/ export C/d' \
-e 's,PROXYSQLCLICKHOUSE=1 ,,g' \
-e 's,--enable-fastopen=false ,--enable-fastopen=false --enable-shared=no ,g' \
${WRKSRC}/Makefile ${WRKSRC}/deps/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/proxysql ${STAGEDIR}${LOCALBASE}/sbin
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}/var/db/${PORTNAME} \
${STAGEDIR}/var/run/${PORTNAME} \
${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \
${STAGEDIR}/var/log/${PORTNAME}
${INSTALL_DATA} ${FILESDIR}/proxysql.conf-newsyslog \
${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/proxysql.conf.sample
${INSTALL_DATA} ${WRKSRC}/src/proxysql.cfg \
${STAGEDIR}${ETCDIR}/proxysql.cfg.sample
.include <bsd.port.mk>