head	1.9;
access;
symbols
	RELEASE_7_4_0:1.7
	RELEASE_8_2_0:1.7
	RELEASE_6_EOL:1.7
	RELEASE_8_1_0:1.7
	RELEASE_7_3_0:1.3;
locks; strict;
comment	@# @;


1.9
date	2011.03.17.16.19.05;	author miwi;	state dead;
branches;
next	1.8;

1.8
date	2011.02.27.04.43.22;	author linimon;	state Exp;
branches;
next	1.7;

1.7
date	2010.06.30.02.35.51;	author glarkin;	state Exp;
branches;
next	1.6;

1.6
date	2010.06.11.15.09.44;	author ale;	state Exp;
branches;
next	1.5;

1.5
date	2010.05.09.22.23.26;	author pav;	state Exp;
branches;
next	1.4;

1.4
date	2010.04.19.10.43.26;	author ale;	state Exp;
branches;
next	1.3;

1.3
date	2009.12.29.10.25.52;	author miwi;	state Exp;
branches;
next	1.2;

1.2
date	2009.12.03.05.07.01;	author glarkin;	state Exp;
branches;
next	1.1;

1.1
date	2009.11.11.01.32.25;	author glarkin;	state Exp;
branches;
next	;


desc
@@


1.9
log
@Remove
lang/gnat-gcc42
lang/gnat-gcc43
lang/gnat-gcc44
@
text
@# ex:ts=8
# Ports collection makefile for: gnat-gcc
# Date created:		2009-07-04
# Whom:			<freebsd-ports@@coreland.ath.cx>
#
# $FreeBSD: ports/lang/gnat-gcc44/Makefile,v 1.8 2011/02/27 04:43:22 linimon Exp $
#

PORTNAME=		gnat-gcc
PORTVERSION=		4.4.0
PORTREVISION=		2
CATEGORIES=		lang
MASTER_SITES=		GCC/releases/gcc-${PORTVERSION} \
			http://coreland.ath.cx/data/code/gnatport/src/:boot
DISTFILES=		gcc-core-${PORTVERSION}${EXTRACT_SUFX} \
			gcc-ada-${PORTVERSION}${EXTRACT_SUFX} \
			gcc-testsuite-${PORTVERSION}${EXTRACT_SUFX} \
			gnat-gcc44-boot-${boot_stamp}.tbz:boot

MAINTAINER=		freebsd-ports@@coreland.ath.cx
COMMENT=		The GNU Ada Compiler system

LIB_DEPENDS=		gmp.10:${PORTSDIR}/math/gmp \
			mpfr.4:${PORTSDIR}/math/mpfr

ONLY_FOR_ARCHS=		i386 amd64

USE_BZIP2=		yes
USE_GMAKE=		yes
USE_ICONV=		yes
USE_PERL5_BUILD=	yes # Needed for man pages.
USE_BISON=		build

CONFLICTS=		gcc-4.4.*
WRKSRC=			${WRKDIR}/build

MAN1=			cpp${gcc_suffix}.1 \
			gcc${gcc_suffix}.1 \
			gcov${gcc_suffix}.1
MAN7=			${fsf_mans:S/$/${fsf_suffix}.7/}
NO_MANCOMPRESS=		yes # XXX 5-cur and releng4 problems?
INFO=			gcc${gcc_suffix}/cpp \
			gcc${gcc_suffix}/cppinternals \
			gcc${gcc_suffix}/gcc \
			gcc${gcc_suffix}/gccinstall \
			gcc${gcc_suffix}/gccint \
			gcc${gcc_suffix}/gnat-style \
			gcc${gcc_suffix}/gnat_rm \
			gcc${gcc_suffix}/gnat_ugn \
			gcc${gcc_suffix}/libgomp

LATEST_LINK=		${PORTNAME}${gcc_suffix}

.include <bsd.port.pre.mk>

# This port only works on 7.0+ at the moment
.if ${OSVERSION} < 700000
IGNORE=			only works on 7.0+
.endif

.if ${OSVERSION} >= 900000
BROKEN=         Does not install (missing distinfo for FreeBSD-9)
.endif

srcdir=			${WRKDIR}/gcc-${PORTVERSION}
gcc_suffix=		44
fsf_mans=		fsf-funding gfdl gpl
fsf_suffix=		-${PORTNAME}${gcc_suffix}
targlib=		${PREFIX}/lib/gcc-${PORTVERSION}
gcc_link=		${PREFIX}/bin/gcc${gcc_suffix}/gcc
boot_stamp=		${ARCH}-freebsd-${OSREL:C/\.[0-9.]*//}
check_target=		check # XXX

PATCH_WRKSRC=		${srcdir}

GNU_CONFIGURE=		yes
CONFIGURE_SCRIPT=	../${srcdir:C/${WRKDIR}//}/configure

# XXX: This should be automated with GNU_CONFIGURE. For some reason,
#      it isn't.

.if ${ARCH} == "amd64"
CONFIGURE_TARGET=	x86_64-portbld-freebsd${OSREL}
.else
CONFIGURE_TARGET=	${ARCH}-portbld-freebsd${OSREL}
.endif

CONFIGURE_ARGS=		--enable-languages="c,ada" \
			--disable-nls \
			--with-system-zlib \
			--with-libiconv-prefix=${LOCALBASE} \
			--program-suffix=${gcc_suffix} \
			--bindir=${PREFIX}/bin/gcc${gcc_suffix} \
			--libdir=${targlib}

ALL_TARGET=		bootstrap-lean
MAKE_ENV+=		MAKEINFOFLAGS="--no-split" PTHREAD_LIBS=${PTHREAD_LIBS}

PLIST_SUB=		GCC_VER=${PORTVERSION} \
			GNU_HOST=${CONFIGURE_TARGET} \
			SUFFIX=${gcc_suffix}

USE_LDCONFIG=		${targlib}

# Prepare environment for the bootstrap compiler.
CC=			${WRKDIR}/boot/bin/gcc
build_env=		PTHREAD_LIBS=${PTHREAD_LIBS} \
			PATH=${WRKDIR}/boot/bin:${WRKDIR}/boot/libexec:${PATH} \
			LD_LIBRARY_PATH=${WRKDIR}/boot/lib:${LD_LIBRARY_PATH}

CONFIGURE_ENV+=		${build_env} CC="${CC}"
MAKE_ENV+=		${build_env}

pre-everything::
	@@${ECHO_MSG} -n "Making GCC ${DISTNAME:S/^gcc-//} for ${OPSYS} "
	@@${ECHO_MSG}     "${OSREL} target=${CONFIGURE_TARGET}"

post-patch:
	# Append ' [FreeBSD]' to the gcc version string.
	${REINPLACE_CMD} \
	    -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
	    ${srcdir}/gcc/version.c
	# New putenv(3) behavior in FreeBSD 7.
	if [ ${OSVERSION} -ge 700050 ]; then \
	    ${REINPLACE_CMD} -e 's/#if defined (__FreeBSD__) ||/#if/' \
	        ${srcdir}/gcc/ada/env.c; \
	fi

pre-configure:
	cd ${srcdir} ; contrib/gcc_update --touch
	${RM} -f ${srcdir}/gcc/*/*.info*
	${MKDIR} ${CONFIGURE_WRKSRC}

post-build:
	@@${ECHO_MSG} -n "Consider running 'make check' before 'make install', "
	@@${ECHO_MSG} -n "especially if you have not performed this build on "
	@@${ECHO_MSG} -n "-STABLE or -CURRENT. This assumes that you have "
	@@${ECHO_MSG}    "dejagnu and autogen ports installed."

check: build
	cd ${WRKSRC} && \
	export RUNTESTFLAGS='--target_board ''unix{-pthread}''' && \
	${GMAKE} -sk ${check_target}

post-install:
	# Create a gcc link.
	${RM} -f ${gcc_link}
	${LN} -s ${PREFIX}/bin/gcc${gcc_suffix}/gcc${gcc_suffix} ${gcc_link}
	# This empty fortran directory is making trouble.
	${RM} -rf ${PREFIX}/lib/gcc-${PORTVERSION}/gcc/${CONFIGURE_TARGET}/${PORTVERSION}/finclude
	# Man pages can only be generated if Perl >= 5.6 is installed; fake them otherwise.
	for mp in ${_MANPAGES}; do \
	    ${TEST} -e $${mp} || ${TOUCH} ${TOUCH_FLAGS} $${mp}; \
	done
	# Version FSF funding and licensing manuals. XXX Fix before it happens!
	for mp in ${fsf_mans}; do \
	    ${MV} -f ${PREFIX}/man/man7/$${mp}.7 \
	        ${PREFIX}/man/man7/$${mp}${fsf_suffix}.7; \
	done
	# Prepare a temporary list of installed libraries and include files.
	${RM} -f ${WRKDIR}/PLIST.lib
	for d in lib/gcc-${PORTVERSION} libexec/gcc/${CONFIGURE_TARGET}/${PORTVERSION}; do \
	    cd ${PREFIX}; \
	    if [ -d $${d} ]; then \
	        ${FIND} $${d} -type f -o -type l >>${WRKDIR}/PLIST.lib; \
	        ${FIND} $${d} -type d | ${SORT} -r | ${SED} -e 's/^/@@dirrm /g' >>${WRKDIR}/PLIST.lib; \
	    fi; \
	done
	# Following directories should be removed on deinstal if empty. Add them to the temporary list.
	${ECHO_CMD} "@@unexec ${RMDIR} %D/libexec/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
	${ECHO_CMD} "@@unexec ${RMDIR} %D/libexec/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
	# Insert the temporary list in the packing list.
	cd ${WRKDIR}; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}

.include <bsd.port.post.mk>
@


1.8
log
@Mark as broken on -CURRENT: needs distinfo update.
@
text
@d6 1
a6 1
# $FreeBSD$
@


1.7
log
@- Unbreak with explicit LD_LIBRARY_PATH to satisfy bootstrap compiler
  linkage

Submitted by:	freebsd-ports at coreland dot ath dot cx (maintainer)
Feature safe:	yes
@
text
@d61 4
@


1.6
log
@Chase mpfr library and bump PORTREVISION.
@
text
@d11 1
a11 1
PORTREVISION=	2
a25 2
BROKEN=			fails to configure

d104 2
a105 1
			PATH=${WRKDIR}/boot/bin:${WRKDIR}/boot/libexec:${PATH}
@


1.5
log
@- Mark BROKEN: fails to configure (with new libgmp)

Reported by:	pointyhat
@
text
@d11 1
a11 1
PORTREVISION=	1
d24 1
a24 1
			mpfr.3:${PORTSDIR}/math/mpfr
@


1.4
log
@Switch to use newer GMP version.

PR:		ports/144487
Submitted by:	ale
Approved by:	portmgr (-exp run by erwin)
@
text
@d26 2
@


1.3
log
@- Convert NOMANCOMPRESS to NO_MANCOMPRESS to sync with src

PR:	ports/136065 ports/127469
Submitted by:	N.J. Mann <njm@@njm.me.uk> and Aldis Berjoza <killasmurf86@@gmail.com>

- Early identify port CONFLICTS

PR:	137855
Submitted by:		Piotr Smyrak <smyru@@heron.pl>

- Add --no-same-permissions to the EXTRACT_AFTER_ARGS command.

Tijl Coosemans has been reported an issue that when root is extracting from the
tarball, and the tarball contains world writable files
(sysutils/policykit as an example), there is a chance that the files
gets changed by malicious third parties right after the extraction,
which makes it possible to inject code into the package thus compromise
the system.

Submitted by:	Tijl Coosemans <tijl@@coosemans.org> Xin LI (delphij@@)

- Fix some whitespaces

Tested with:	exp-run
@
text
@d11 1
d23 1
a23 1
LIB_DEPENDS=		gmp.8:${PORTSDIR}/math/libgmp4 \
@


1.2
log
@- Added support for building on FreeBSD 8.0

Submitted by:	freebsd-ports@@coreland.ath.cx (maintainer)
@
text
@d40 1
a40 1
NOMANCOMPRESS=		yes # XXX 5-cur and releng4 problems?
@


1.1
log
@The GNU Ada compiler system built from GCC 4.4.0.

Please add ${PREFIX}/bin/gcc44 to your PATH variable
before using this port.

WWW: http://gcc.gnu.org/

PR:		ports/136359
Submitted by:	M Rothwell <freebsd-ports@@coreland.ath.cx> (maintainer)
@
text
@d55 3
a57 3
# This port only works on 7.0 at the moment
.if ${OSVERSION} < 700000 || ${OSVERSION} >= 800000
IGNORE=			only works on 7.0
d66 1
a66 1
boot_stamp=		${ARCH}-freebsd-${OSREL:C/\.[0-9.]*//:S/8/7/}
@

