freebsd-ports/editors/biew/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

76 lines
2.8 KiB
Makefile

PORTNAME= biew
PORTVERSION= 6.1.0
PORTREVISION= 4
CATEGORIES= editors
MASTER_SITES= SF/beye/biew/${PORTVERSION}
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.//g}-src
MAINTAINER= danfe@FreeBSD.org
COMMENT= Binary file viewer and editor
WWW= http://beye.sourceforge.net/
LICENSE= GPLv2
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= no targets defined in Makefile
USES= dos2unix gmake iconv ncurses tar:bzip2
DOS2UNIX_FILES= ${PORTDOCS:S,^,doc/,}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --cc="${CC}" --with-extraincdir="${LOCALBASE}/include" \
--ld="${CC}" --with-extralibdir="${LOCALBASE}/lib" \
--prefix="${PREFIX}" --datadir="${DATADIR}"
MAKEFILE= makefile
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.//g}
PORTDOCS= biew_en.txt biew_ru.txt develop.en develop.ru file_ini.en \
file_ini.ru release.txt unix.txt
OPTIONS_DEFINE= SLANG DOCS
OPTIONS_DEFAULT= SLANG
SLANG_DESC= Use S-Lang based display renderer
SLANG_LIB_DEPENDS= libslang.so:devel/libslang2
SLANG_CONFIGURE_ON= --enable-slang
SLANG_CONFIGURE_OFF= --enable-curses
post-patch:
@${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},' ${WRKSRC}/configure
# Allow it to find definition of `uintmax_t' (required at least for ia64)
@${REINPLACE_CMD} -e 's,<sys/types,<stdint,' \
${WRKSRC}/biewlib/sysdep/generic/__config.h
# Fix BTx group of x86 opcodes disasm bug (upstream ticket #44, closed)
@${REINPLACE_CMD} -e 's,DisP->codelen++),++DisP->codelen),' \
${WRKSRC}/plugins/disasm/ix86/ix86_fun.c
# Fix inline assembly to make Clang happy (upstream ticket #49)
@${REINPLACE_CMD} -e '/srcptr/s,::"g",::"r",' \
${WRKSRC}/biewlib/sysdep/ia32/aclib_template.c \
${WRKSRC}/biewlib/sysdep/x86_64/aclib_template.c
@${REINPLACE_CMD} -E 's,fild|fistp,&s,' \
${WRKSRC}/biewlib/sysdep/ia32/cpu_info.c \
${WRKSRC}/biewlib/sysdep/x86_64/cpu_info.c
post-build:
# Convert Russian text files to UTF-8 encoding (doing it in post-build
# ensures we have iconv(1) installed, and seems more logical since these
# files could theoretically also be [re]built)
@${SH} -c '${FIND} ${WRKSRC}/doc/*ru* -type f | while read f ; \
do ${ICONV_CMD} -f cp866 -t utf-8 "$${f}" > "$${f}.tmp" && \
${MV} "$${f}.tmp" "$${f}" ; done'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/biew ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}/skn ${STAGEDIR}${DATADIR}/syntax \
${STAGEDIR}${DATADIR}/xlt
${INSTALL_DATA} ${WRKSRC}/bin_rc/biew.hlp ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKSRC}/bin_rc/skn/* ${STAGEDIR}${DATADIR}/skn
${INSTALL_DATA} ${WRKSRC}/bin_rc/syntax/* ${STAGEDIR}${DATADIR}/syntax
${INSTALL_DATA} ${WRKSRC}/bin_rc/xlt/russian/* \
${STAGEDIR}${DATADIR}/xlt
${INSTALL_MAN} ${WRKSRC}/doc/biew.1 ${STAGEDIR}${MANPREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>