freebsd-ports/devel/freebsd-gcc6/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

133 lines
3.6 KiB
Makefile

PORTNAME= gcc
PORTVERSION= 6.5.0
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= GCC
PKGNAMEPREFIX= ${TARGETARCH}-
PKGNAMESUFFIX= ${SUFFIX}
MAINTAINER= jhb@FreeBSD.org
COMMENT= Cross GNU Compiler Collection for ${TARGETARCH}
WWW= https://gcc.gnu.org/
LICENSE= GPLv3 GPLv3RLE
LICENSE_COMB= multi
BUILD_DEPENDS= ${BU_PREFIX}-as:devel/binutils@${TARGETARCH} \
objdump:devel/binutils
LIB_DEPENDS= libgmp.so:math/gmp \
libmpfr.so:math/mpfr \
libmpc.so:math/mpc
RUN_DEPENDS= ${BU_PREFIX}-as:devel/binutils@${TARGETARCH}
FLAVORS= aarch64 amd64 i386 mips mips64 powerpc64 sparc64
TARGETARCH= ${FLAVOR}
USES= compiler:c++11-lang cpe gmake iconv libtool makeinfo tar:xz
CPE_VENDOR= gnu
CONFLICTS= ${TARGETARCH}-gcc
PLIST_SUB= OPSYS=${OPSYS:tl} \
SUFFIX=${SUFFIX} \
TARGETARCH=${TARGETARCH} \
GCC_TARGET=${GCC_TARGET} \
GCC_VERSION=${PORTVERSION}
SUB_FILES= xtoolchain.mk
SUB_LIST= GCC_TARGET=${GCC_TARGET}
GCC_TARGET= ${FLAVOR:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL}
SUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/}
BU_PREFIX= ${GCC_TARGET}
GNU_CONFIGURE= yes
CONFIGURE_OUTSOURCE= yes
CONFIGURE_ARGS+=--target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
--enable-gnu-indirect-function \
--enable-initfini-array \
--program-prefix=${GCC_TARGET}- \
--program-suffix=${SUFFIX} \
--without-headers \
--with-gmp=${LOCALBASE} \
--with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
--with-system-zlib \
--with-gxx-include-dir=/usr/include/c++/v1/ \
--with-sysroot="/" \
--with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \
--with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld
ALL_TARGET= all-gcc
INSTALL_TARGET= install-gcc
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e '/LIBSTDCXX/ s/stdc\+\+/c\+\+/g ' \
${WRKSRC}//gcc/cp/g++spec.c
@${REINPLACE_CMD} -e '/LOCAL_INCLUDE_DIR/ d ' \
${WRKSRC}//gcc/Makefile.in
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-unknown-${OPSYS:tl}${OSREL}
.else
CONFIGURE_TARGET= ${ARCH}-unknown-${OPSYS:tl}${OSREL}
.endif
.if ${TARGETARCH} == "armv6" || ${TARGETARCH} == "aarch64"
. if ${CHOSEN_COMPILER_TYPE} == clang
MAKE_ARGS+=CXXFLAGS=-fbracket-depth=512
. endif
.endif
.if ${ARCH} == "aarch64"
PLIST_SUB+= PLUGINS="@comment plugin does not build"
.else
PLIST_SUB+= PLUGINS=""
.endif
.if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386"
PLIST_SUB+= FLOAT_H="@comment "
.else
PLIST_SUB+= FLOAT_H=""
.endif
PLIST= ${.CURDIR}/pkg-plist ${.CURDIR}/pkg-plist.common
.if ${TARGETARCH} == "aarch64"
PLIST+= ${.CURDIR}/pkg-plist.aarch64
.endif
.if ${TARGETARCH} == "aarch64" || ${TARGETARCH:Marm*}
PLIST+= ${.CURDIR}/pkg-plist.arm
.endif
.if ${TARGETARCH} == "amd64"
PLIST+= ${.CURDIR}/pkg-plist.amd64
.endif
.if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386"
PLIST+= ${.CURDIR}/pkg-plist.i386
.endif
.if ${TARGETARCH:Mmips*}
PLIST+= ${.CURDIR}/pkg-plist.mips
.endif
.if ${TARGETARCH:Mpowerpc*}
PLIST+= ${.CURDIR}/pkg-plist.powerpc
.endif
.if ${TARGETARCH} == "sparc64"
PLIST+= ${.CURDIR}/pkg-plist.sparc64
.endif
post-install:
@${RM} ${STAGEDIR}${PREFIX}/bin/${GCC_TARGET}-${GCC_TARGET}-*
@${RM} ${STAGEDIR}${PREFIX}/share/info/*
@${RM} ${STAGEDIR}${PREFIX}/man/man7/*
@${RM} -r ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include-fixed
.if ${TARGETARCH} == "amd64" || ${TARGETARCH} == "i386"
# Conflicts with sys/x86/include/float.h
${RM} ${STAGEDIR}${PREFIX}/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h
.endif
${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains/
${INSTALL_DATA} ${WRKDIR}/xtoolchain.mk \
${STAGEDIR}${PREFIX}/share/toolchains/${TARGETARCH}-gcc${SUFFIX}.mk
.include <bsd.port.post.mk>