diff --git a/sysutils/moreutils/Makefile b/sysutils/moreutils/Makefile index c87a32581abb..58cb8c18b881 100644 --- a/sysutils/moreutils/Makefile +++ b/sysutils/moreutils/Makefile @@ -1,74 +1,71 @@ PORTNAME= moreutils PORTVERSION= 0.69 CATEGORIES= sysutils MASTER_SITES= https://git.joeyh.name/index.cgi/moreutils.git/snapshot/ \ LOCAL/sunpoet MAINTAINER= sunpoet@FreeBSD.org COMMENT= Additional Unix utilities WWW= https://joeyh.name/code/moreutils/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= p5-IPC-Run>=0:devel/p5-IPC-Run USES= gmake perl5 shebangfix ALL_TARGET= errnos.h ${CANNED_MANPAGES:R} MAKE_JOBS_UNSAFE= yes CANNED_MANPAGES=errno.1 \ ifdata.1 \ ifne.1 \ isutf8.1 \ lckdo.1 \ mispipe.1 \ moreutils-parallel.1 \ pee.1 \ sponge.1 PERL_MANPAGES= chronic.1 \ combine.1 \ moreutils-ts.1 \ vidir.1 \ vipe.1 \ zrun.1 SHEBANG_FILES= ${PERL_MANPAGES:R} OPTIONS_DEFINE= MANPAGES OPTIONS_DEFAULT=MANPAGES OPTIONS_SUB= yes post-extract: .for file in parallel.c parallel.docbook ts @${MV} ${WRKSRC}/${file} ${WRKSRC}/moreutils-${file} .endfor post-patch: - @${REINPLACE_CMD} -e 's|parallel|moreutils-&|g' ${WRKSRC}/Makefile - @${REINPLACE_CMD} -e 's|__APPLE__|__${OPSYS}__|' ${WRKSRC}/ifdata.c - @${REINPLACE_CMD} -e '/^CC = gcc/d' ${WRKSRC}/is_utf8/Makefile @cd ${FILESDIR}/ && ${CP} ${CANNED_MANPAGES} ${WRKSRC}/ post-build: .for man in ${PERL_MANPAGES:R} ${LOCALBASE}/bin/pod2man --center=moreutils --release=${PORTVERSION} ${WRKSRC}/${man} > ${WRKSRC}/${man}.1 .endfor do-install: cd ${WRKSRC}/ && ${INSTALL_PROGRAM} ${CANNED_MANPAGES:R} ${STAGEDIR}${PREFIX}/bin/ cd ${WRKSRC}/ && ${INSTALL_SCRIPT} ${PERL_MANPAGES:R} ${STAGEDIR}${PREFIX}/bin/ cd ${WRKSRC}/ && ${INSTALL_MAN} ${CANNED_MANPAGES} ${PERL_MANPAGES} ${STAGEDIR}${PREFIX}/share/man/man1/ # maintainer section: # require: docbook-xsl, libxml2, libxslt updateman: do-clean extract .for man in ${CANNED_MANPAGES:R} ${LOCALBASE}/bin/xmllint --noout --valid ${WRKSRC}/${man}.docbook && \ ${LOCALBASE}/bin/xsltproc --output ${FILESDIR}/${man}.1 --param man.authors.section.enabled 0 ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl ${WRKSRC}/${man}.docbook .endfor ${MV} ${FILESDIR}/parallel.1 ${FILESDIR}/moreutils-parallel.1 .include diff --git a/sysutils/moreutils/files/patch-Makefile b/sysutils/moreutils/files/patch-Makefile new file mode 100644 index 000000000000..b48da167f6e7 --- /dev/null +++ b/sysutils/moreutils/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 2024-02-25 19:47:01 UTC ++++ Makefile +@@ -1,6 +1,6 @@ +-BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel errno ++BINS=isutf8 ifdata ifne pee sponge mispipe lckdo moreutils-parallel errno + PERLSCRIPTS=vidir vipe ts combine zrun chronic +-MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1 errno.1 ++MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 moreutils-parallel.1 errno.1 + CFLAGS?=-O2 -g -Wall + INSTALL_BIN?=install -s + PREFIX?=/usr diff --git a/sysutils/moreutils/files/patch-ifdata.c b/sysutils/moreutils/files/patch-ifdata.c new file mode 100644 index 000000000000..cfa77038e259 --- /dev/null +++ b/sysutils/moreutils/files/patch-ifdata.c @@ -0,0 +1,11 @@ +--- ifdata.c.orig 2024-02-25 19:47:01 UTC ++++ ifdata.c +@@ -18,7 +18,7 @@ + #include + #endif + +-#if defined(__APPLE__) || defined(__OpenBSD__) ++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) + #define s6_addr16 __u6_addr.__u6_addr16 + #include + #endif diff --git a/sysutils/moreutils/files/patch-is_utf8-Makefile b/sysutils/moreutils/files/patch-is_utf8-Makefile new file mode 100644 index 000000000000..ed6a975d9324 --- /dev/null +++ b/sysutils/moreutils/files/patch-is_utf8-Makefile @@ -0,0 +1,10 @@ +--- is_utf8/Makefile.orig 2024-02-25 19:47:01 UTC ++++ is_utf8/Makefile +@@ -37,7 +37,6 @@ REALNAME = $(SONAME).$(MINOR).$(RELEASE) + SONAME = $(LINKERNAME).$(VERSION) + REALNAME = $(SONAME).$(MINOR).$(RELEASE) + +-CC = gcc + CFLAGS ?= -O3 -Wextra -Wall -ansi -Wstrict-prototypes + + $(NAME): $(OBJ)