1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00
freebsd-ports/archivers/rpm4/Makefile
Kyle Evans 5fb9edd6bd Multiple ports: improve regex compliance
These changes largely fall into just two categories:

1. Need textproc/gsed for GNU extensions
2. Extraneous escapes that can go away

For #1, there's a further subdivision into those that require autoconf magic
and those that can get away with BINARY_ALIAS=sed=${LOCALBASE}/bin/gsed.
-CURRENT will soon gain GNU extensions, but these will take longer to get to
all supported releases; we must switch them to gsed to ensure we're actually
properly building them as intended.

For #2, I've fixed these as I can and we should upstream these fixes.

PORTREVISION is bumped for all of the above, because we will almost
certainly build these differently when the replacements actually start
working.

These were all detected by the below-referenced exp-run [1]. The patch
included forbids many ordinary characters from being escaped, since we'll
later imbue those with special meanings. This has had the nice side effect
of picking up various things that we didn't handle properly, e.g. \t and \r
for tab and carriage return.

PR:		229925 [1]
Approved by:	koobs (mentor)
Approved by:	portmgr (blanket: trivial build fixes)
MFH:		no (invasive risk)
Differential Revision:	https://reviews.freebsd.org/D25185
2020-06-08 04:41:31 +00:00

92 lines
2.7 KiB
Makefile

# Created by: Greg Lewis <glewis@FreeBSD.org>
# $FreeBSD$
PORTNAME= rpm
PORTVERSION= 4.15.1
PORTREVISION= 2
CATEGORIES= archivers
MASTER_SITES= http://ftp.rpm.org/releases/rpm-4.15.x/
PKGNAMESUFFIX= 4
MAINTAINER= rodrigo@FreeBSD.org
COMMENT= Red Hat Package Manager
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= gsed:textproc/gsed
LIB_DEPENDS= libpopt.so:devel/popt \
libnss3.so:security/nss \
libzstd.so:archivers/zstd
RUN_DEPENDS= bash:shells/bash \
gxargs:misc/findutils
USES= alias bdb compiler:openmp gmake iconv libarchive libtool \
lua:52+ pathfix pkgconfig shebangfix tar:bzip2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed
SHEBANG_FILES= scripts/brp-python-bytecompile scripts/check-prereqs \
scripts/check-rpaths-worker scripts/pythondeps.sh \
scripts/pkgconfigdeps.sh scripts/fontconfig.prov \
scripts/rpmdb_loadcvt scripts/perl.prov scripts/perl.req \
scripts/pythondistdeps.py scripts/find-lang.sh \
python/rpm/transaction.py
CONFIGURE_ARGS= --with-external-db \
--without-db \
--with-popt-prefix="${LOCALBASE}" \
--sysconfdir=${PREFIX}/etc \
--localstatedir=/var \
--without-javaglue \
am_cv_python_version=${PYTHON_VER}${PYTHON_ABIVER} \
ac_cv_lib_elf_gelf_getvernaux=no # otherwise fails to build in presence of devel/elfutils
CONFIGURE_ENV= LUA_CFLAGS=-I${LUA_INCDIR} \
LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER} -lm"
INSTALL_TARGET= install-strip
CPPFLAGS+= -I${LOCALBASE}/include \
-I${LOCALBASE}/include/nspr -I${LOCALBASE}/include/nss/nss \
-I${BDB_INCLUDE_DIR} -I${LUA_INCDIR}
LDFLAGS+= -L${LOCALBASE}/lib -L${LOCALBASE}/lib/nss \
-L${BDB_LIB_DIR} -L${LUA_LIBDIR}
PLIST_SUB= VERSION=${PORTVERSION} \
OPSYS=${OPSYS:tl}
PORTDOCS= *
OPTIONS_DEFINE= PYTHON PLUGINS NLS DOCS
OPTIONS_DEFAULT=PYTHON
OPTIONS_SUB= yes
PYTHON_CONFIGURE_ENABLE=python
PYTHON_USES= python
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext
NLS_LIBS= -lintl
PLUGINS_CONFIGURE_ENABLE=plugins
PLUGINS_LIB_DEPENDS= libdbus-1.so:devel/dbus
post-patch:
@${REINPLACE_CMD} -e 's:\.\./\.\./bin/::' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's/ __GLIBC__.*/& || defined(__FreeBSD__)/' \
${WRKSRC}/system.h
@${REINPLACE_CMD} -e 's/\<xargs\>/gxargs/g' ${WRKSRC}/scripts/brp-python-bytecompile \
${WRKSRC}/scripts/brp-strip-static-archive \
${WRKSRC}/scripts/check-buildroot \
${WRKSRC}/scripts/check-rpaths \
${WRKSRC}/scripts/find-debuginfo.sh \
${WRKSRC}/scripts/vpkg-provides.sh
post-install-PYTHON-off:
@${RM} ${STAGEDIR}${PREFIX}/lib/rpm/pythondistdeps.py
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} librpm/html ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>