freebsd-ports/lang/gcc28/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

84 lines
2.6 KiB
Makefile

# ex:ts=8
# Ports collection makefile for: gcc
# Date created: 17 Jan 1998
# Whom: David O'Brien <obrien@NUXI.com>
#
# $FreeBSD$
#
PORTNAME= gcc
PORTVERSION= 2.8.1
PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gcc
MAINTAINER= mjl@luckie.org.nz
COMMENT= GNU Compiler Collection 2.8
NOT_FOR_ARCHS= amd64 sparc64 ia64
NO_CDROM= "old version, not worth the cost in real estate"
LATEST_LINK= gcc28
DEPRECATED= This port is no longer in use by anything in the ports collection. Use a later release instead
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha"
BROKEN= Does not compile on alpha
.endif
CONFIGURE_ENV+= OSVERSION=${OSVERSION}
PLIST_SUB= GNUHOST=${CONFIGURE_TARGET}
.if ${OSVERSION} < 600011
PLIST_FILES+= lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/include/math.h
.endif
CONFIGURE_ARGS= --with-gxx-include-dir=${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/include/g++ \
--program-suffix=28
GNU_CONFIGURE= yes
USE_GMAKE= yes
ALL_TARGET= bootstrap
MAN1= cccp28.1 g++28.1 gcc28.1
INFO= cpp gcc
pre-everything::
@${ECHO_MSG} "GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} ${OSREL}"
pre-patch:
@${MV} ${WRKSRC}/config/i386/freebsd.h ${WRKSRC}/config/i386/freebsd-aout.h
@${MV} ${WRKSRC}/config/i386/freebsd-elf.h ${WRKSRC}/config/i386/freebsd.h
pre-configure:
@# Keep from running `autoconf' and `autoheader' since we modified
@# configure.in by patching it.
@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/configure
@${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/cstamp-h.in
@(cd ${WRKSRC}/config/${ARCH}/ ; \
MAJ=`/sbin/sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
${MV} freebsd-aout.h freebsd-aout.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" \
freebsd-aout.h.in >freebsd-aout.h ; \
${MV} freebsd.h freebsd.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
>freebsd.h)
post-install:
@${RM} -f ${PREFIX}/bin/c++
(for prog in ${PREFIX}/bin/gcc ${PREFIX}/bin/g++ ${PREFIX}/bin/gcov \
${PREFIX}/bin/protoize ${PREFIX}/bin/unprotoize \
${PREFIX}/bin/${CONFIGURE_TARGET}-gcc \
${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1 \
${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1obj \
${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cc1plus \
${PREFIX}/lib/gcc-lib/${CONFIGURE_TARGET}/2.8.1/cpp ; \
do ${STRIP_CMD} $$prog ; \
done)
@${MV} ${PREFIX}/bin/gcc ${PREFIX}/bin/gcc28
@${MV} ${PREFIX}/bin/g++ ${PREFIX}/bin/g++28
@${MV} ${PREFIX}/bin/gcov ${PREFIX}/bin/gcov28
@${MV} ${PREFIX}/man/man1/cccp.1 ${PREFIX}/man/man1/cccp28.1
@${MV} ${PREFIX}/man/man1/g++.1 ${PREFIX}/man/man1/g++28.1
@${MV} ${PREFIX}/man/man1/gcc.1 ${PREFIX}/man/man1/gcc28.1
.include <bsd.port.post.mk>