freebsd-ports/base/binutils/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

124 lines
2.8 KiB
Makefile

PORTNAME= binutils
PORTVERSION= 2.33.1
PORTEPOCH= 0
PORTREVISION= 1
CATEGORIES= base
MASTER_SITES= SOURCEWARE/binutils/releases
PKGNAMEPREFIX= ${OPSYS:tl}-
VALID_CATEGORIES= base
COMMENT= GNU binary tools for base
WWW= https://www.gnu.org/software/binutils/
LICENSE= GPLv3 LGPL3
LICENSE_COMB= multi
LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING3
LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING3.LIB
TARGETARCH= ${ARCH:S/amd64/x86_64/}
BUTARGET= ${TARGETARCH}-unknown-${OPSYS:tl}${OSREL}
USES= bison:alias cpe gmake libtool tar:bzip2 compiler:env
CPE_VENDOR= gnu
GNU_CONFIGURE= yes
INFO_PATH= ${PKGNAMEPREFIX:S/-$//}/share/info
BUTARGET?= ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL}
PLIST_SUB= BUTARGET=${BUTARGET}
TEST_TARGET= check
PATCHDIR= ${.CURDIR}/../../devel/binutils/files
CONFIGURE_ARGS+= --disable-host-shared \
--disable-shared \
--disable-nls \
--with-system-zlib \
--with-sysroot="/" \
--enable-relro=no \
--enable-x86-relax-relocations=no \
--target=${BUTARGET}
PREFIX= /usr
MAKE_ENV+= ac_cv_func_sbrk=0
MAKE_ARGS+= LIBDL=""
BUREMOVE= addr2line \
ar \
c++filt \
dlltool \
elfedit \
gprof \
objcopy \
nlmconv \
nm \
ranlib \
readelf \
size \
strings \
strip \
windmc \
windres
OPTIONS_DEFINE= RELRO STATIC
RELRO_DESC= enable -z relro in ELF linker by default
RELRO_CONFIGURE_ON= --enable-relro
RELRO_CONFIGURE_OFF= --enable-relro=no
STATIC_LDFLAGS+= -all-static
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
PLIST_SUB+= I386=""
.else
PLIST_SUB+= I386="@comment "
.endif
.if ${ARCH} == "amd64"
PLIST_SUB+= AMD64=""
.else
PLIST_SUB+= AMD64="@comment "
.endif
.if ${ARCH:Mmips*}
PLIST_SUB+= MIPS=""
.else
PLIST_SUB+= MIPS="@comment "
.endif
.if ${ARCH:Mpowerpc*}
PLIST_SUB+= POWERPC=""
.else
PLIST_SUB+= POWERPC="@comment "
.endif
.if ${ARCH:Msparc*}
PLIST_SUB+= SPARC=""
.else
PLIST_SUB+= SPARC="@comment "
.endif
.if ${HOSTARCH} == "amd64"
CONFIGURE_TARGET= x86_64-unknown-freebsd${OSREL}
.elif ${HOSTARCH} == "powerpcspe"
CONFIGURE_TARGET= powerpc-unknown-freebsd${OSREL}
.else
CONFIGURE_TARGET= ${HOSTARCH}-unknown-freebsd${OSREL}
.endif
post-patch:
${REINPLACE_CMD} -e "s/-ldl//g" ${WRKSRC}/gold/testsuite/Makefile.in
post-install:
${RM} -r ${STAGEDIR}${PREFIX}/${PKGNAMEPREFIX:S/-$//}
${RM} ${STAGEDIR}${PREFIX}/${BUTARGET}/lib/ldscripts/i386bsd.*
@if [ -d ${STAGEDIR}${PREFIX}/${INFO_PATH:H} ] ; then rm -rf ${STAGEDIR}${PREFIX}/${INFO_PATH:H}; fi
@${RM} -r ${STAGEDIR}${PREFIX}/include
@${RM} -r ${STAGEDIR}${PREFIX}/lib
.for tool in ${BUREMOVE}
@${RM} ${STAGEDIR}${PREFIX}/bin/${tool} \
${STAGEDIR}${MANPREFIX}/man/man1/${tool}.1 \
${STAGEDIR}${PREFIX}/${BUTARGET}/bin/${tool}
.endfor
@${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains
${INSTALL_DATA} ${.CURDIR}/files/freebsd-binutils.mk ${STAGEDIR}${PREFIX}/share/toolchains/
.include <bsd.port.post.mk>