From 5bc1617efc876b99a806f7de78a9fe94a07304b7 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 24 Jul 2020 17:10:51 +0000 Subject: [PATCH] Multiple ports: improve regex compliance (part 2) This is again a part of the project to stop extraneous escaping of ordinary characters and redefine some ordinary escapes as special behavior. Most of these ports are pushed over to use textproc/gsed because they want to use GNU extensions. Others are fixed to either escape appropriately (e.g. $$ rather than \$ in Makefiles!) or just remove redundant escapes (e.g. backtick in single quotes doesn't need escaped). PR: 229925 MFH: no (invasive risk) --- databases/cassandra4/Makefile | 8 ++++---- databases/couchdb3/Makefile | 2 +- french/aster/files/patch-as_setup.py | 9 ++++++++- java/openjdk14/Makefile | 6 ++++-- security/openfortivpn/Makefile | 5 ++++- security/xca/Makefile | 2 ++ 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/databases/cassandra4/Makefile b/databases/cassandra4/Makefile index 88b736c634b6..f4d8d16bdb8b 100644 --- a/databases/cassandra4/Makefile +++ b/databases/cassandra4/Makefile @@ -95,10 +95,10 @@ post-build: .for f in ${SCRIPT_FILES} @${REINPLACE_CMD} -e 's|/usr/share/cassandra|${DATADIR}/bin|' ${BUILD_DIST_DIR}/bin/${f} .endfor - @${REINPLACE_CMD} -e 's|\`dirname "\$$\0"\`/..|${DATADIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh - @${REINPLACE_CMD} -e 's|\$$\CASSANDRA_HOME/lib/sigar-bin|${JAVAJARDIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh - @${REINPLACE_CMD} -e 's|\$$\CASSANDRA_HOME/lib/sigar-bin|${JAVAJARDIR}|' ${BUILD_DIST_DIR}/conf/cassandra-env.sh - @${REINPLACE_CMD} -e 's|\$$\CASSANDRA_HOME/conf|${ETCDIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh + @${REINPLACE_CMD} -e 's|`dirname "$$0"`/..|${DATADIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh + @${REINPLACE_CMD} -e 's|$$CASSANDRA_HOME/lib/sigar-bin|${JAVAJARDIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh + @${REINPLACE_CMD} -e 's|$$CASSANDRA_HOME/lib/sigar-bin|${JAVAJARDIR}|' ${BUILD_DIST_DIR}/conf/cassandra-env.sh + @${REINPLACE_CMD} -e 's|$$CASSANDRA_HOME/conf|${ETCDIR}|' ${BUILD_DIST_DIR}/bin/cassandra.in.sh .for f in ${CONFIG_FILES} @${MV} ${BUILD_DIST_DIR}/conf/${f} ${BUILD_DIST_DIR}/conf/${f}.sample .endfor diff --git a/databases/couchdb3/Makefile b/databases/couchdb3/Makefile index d16fa4cd934c..f237c5fec3c8 100644 --- a/databases/couchdb3/Makefile +++ b/databases/couchdb3/Makefile @@ -74,7 +74,7 @@ post-patch: # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238514 .if ${OPSYS} == FreeBSD && (${OSVERSION} < 1200000 || ${ARCH} == i386) @${REINPLACE_CMD} \ - -e 's,\$FLTO_FLAG ,,g' \ + -e 's,$$FLTO_FLAG ,,g' \ ${WRKSRC}/src/jiffy/rebar.config .endif diff --git a/french/aster/files/patch-as_setup.py b/french/aster/files/patch-as_setup.py index 7d349c06c04a..b81531ba8c17 100644 --- a/french/aster/files/patch-as_setup.py +++ b/french/aster/files/patch-as_setup.py @@ -17,7 +17,7 @@ self._print(self._fmt_title % _('Extraction')) if kargs.get('external')!=None: self._call_external(**kargs) -@@ -518,6 +521,81 @@ class SETUP: +@@ -518,6 +521,88 @@ class SETUP: if iextr_as: self.Clean(to_delete=path) @@ -65,6 +65,13 @@ + sys.stdout.write(ligne) + system=SYSTEM({ 'verbose' : True, 'debug' : False }, + **{'maxcmdlen' : 2**31, 'log' : self}) ++ file2patch = os.path.join(self.workdir, self.content, 'waf.main') ++ self._print('FreeBSD patch: remove extraneous escape => modify waf.main') ++ for ligne in fileinput.input(file2patch, inplace=1): ++ nl = ligne.find("\main$") ++ if nl > 0: ++ ligne =ligne.replace("\main$", "main$") ++ sys.stdout.write(ligne) + for f2p in ('waf', 'waf.main', 'waf_variant', 'waf_std', 'waf_mpi', 'bibpyt/Macro/macr_ecre_calc_ops.py'): + file2patch = os.path.join(self.workdir, self.content, f2p) + self._print('FreeBSD patch: /bin/bash => modify ' + file2patch) diff --git a/java/openjdk14/Makefile b/java/openjdk14/Makefile index 32aad21281b3..711006f7de16 100644 --- a/java/openjdk14/Makefile +++ b/java/openjdk14/Makefile @@ -16,7 +16,8 @@ ONLY_FOR_ARCHS= amd64 i386 powerpc64 BUILD_DEPENDS= zip:archivers/zip \ autoconf>0:devel/autoconf \ ${LOCALBASE}/include/cups/cups.h:print/cups \ - bash:shells/bash + bash:shells/bash \ + gsed:textproc/gsed LIB_DEPENDS= libasound.so:audio/alsa-lib \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ @@ -64,7 +65,8 @@ JDK_BUG_URL= https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26 GNU_CONFIGURE= yes CONFIGURE_ENV= CC=${CC} \ CXX=${CXX} \ - CPP=${CPP} + CPP=${CPP} \ + ac_cv_path_SED=${LOCALBASE}/bin/gsed CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --disable-ccache \ --disable-javac-server \ diff --git a/security/openfortivpn/Makefile b/security/openfortivpn/Makefile index 6216a686a3c1..92ca6c564dd6 100644 --- a/security/openfortivpn/Makefile +++ b/security/openfortivpn/Makefile @@ -8,6 +8,8 @@ CATEGORIES= security net-vpn MAINTAINER= lifanov@FreeBSD.org COMMENT= Client for PPP+SSL VPN tunnel services +BUILD_DEPENDS= gsed:textproc/gsed + LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE @@ -16,7 +18,8 @@ USE_GITHUB= yes GH_ACCOUNT= adrienverge GNU_CONFIGURE= yes -CONFIGURE_ENV= OPENSSL_CFLAGS=${OPENSSLINC} \ +CONFIGURE_ENV= ac_cv_path_SED=${LOCALBASE}/bin/gsed \ + OPENSSL_CFLAGS=${OPENSSLINC} \ OPENSSL_LIBS="-lssl -lcrypto" .include diff --git a/security/xca/Makefile b/security/xca/Makefile index 49c3b47864cd..ff17e0029933 100644 --- a/security/xca/Makefile +++ b/security/xca/Makefile @@ -12,6 +12,7 @@ COMMENT= Graphical certification authority LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYRIGHT +BUILD_DEPENDS= gsed:textproc/gsed LIB_DEPENDS= libltdl.so:devel/libltdl USES= compiler:c++11-lang desktop-file-utils gmake localbase \ @@ -20,6 +21,7 @@ USE_QT= buildtools_build core gui linguist_build sql widgets USE_CXXSTD= c++11 GNU_CONFIGURE= yes +BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed CONFIGURE_ARGS= --with-openssl=${OPENSSLDIR} \ --with-qt=${PREFIX} \ --with-qt-version=5