head	1.9;
access;
symbols
	PRE_XORG_7:1.6
	RELEASE_4_EOL:1.6
	RELEASE_6_2_0:1.4;
locks; strict;
comment	@# @;


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

1.8
date	2007.07.31.12.01.03;	author arved;	state Exp;
branches;
next	1.7;

1.7
date	2007.07.23.09.36.05;	author rafan;	state Exp;
branches;
next	1.6;

1.6
date	2006.12.16.22.03.19;	author miwi;	state Exp;
branches;
next	1.5;

1.5
date	2006.10.31.23.11.32;	author bsam;	state Exp;
branches;
next	1.4;

1.4
date	2006.09.04.12.24.46;	author bsam;	state Exp;
branches;
next	1.3;

1.3
date	2006.08.27.16.05.24;	author bsam;	state Exp;
branches;
next	1.2;

1.2
date	2006.08.06.20.23.58;	author bsam;	state Exp;
branches;
next	1.1;

1.1
date	2006.08.03.20.25.08;	author bsam;	state Exp;
branches;
next	;


desc
@@


1.9
log
@2007-08-22 lang/fesi: Depends on obsolete version of jdk
2007-09-04 lang/gnomebasic: Five years abandoned project; functionality folded into mono
2007-09-01 lang/gnat-gcc34: This port was made for initial bootstraping of later versions and is no longer needed
2007-09-01 devel/hs-green-card: "Does not build with latest GHC"
2007-09-11 devel/p5-Devel-DProf: only works for old, unsupported Perl versions
@
text
@# ex:ts=4
# Ports collection makefile for:	gnat-gcc
# Date created:						22 Jun 2006
# Whom:								Karel Miklav <karel@@lovetemple.net>
#
# $FreeBSD: ports/lang/gnat-gcc34/Makefile,v 1.8 2007/07/31 12:01:03 arved Exp $
#

PORTNAME=		gnat-gcc
PORTVERSION=	3.4.6
PORTREVISION=	3
CATEGORIES=	lang
MASTER_SITES=	${MASTER_SITE_GCC} \
		${MASTER_SITE_LOCAL}:boot
MASTER_SITE_SUBDIR=	releases/gcc-${PORTVERSION} \
		deischen/gcc/:boot
DISTFILES=	gcc-core-${PORTVERSION}.tar.gz \
		gcc-ada-${PORTVERSION}.tar.gz \
		gnat-3.15p-boot.tar.gz:boot

MAINTAINER=	karel@@lovetemple.net
COMMENT=	The GNU Ada Compiler system

ONLY_FOR_ARCHS=	i386

DEPRECATED=	This port was made for initial bootstraping of later versions and is no longer needed
EXPIRATION_DATE=	2007-09-01

USE_GMAKE=	yes
USE_PERL5=	yes # Needed? Builds on 6.1 and bootstrapps the 4.1 without Perl.
USE_BISON=	yes

CONFLICTS=	gcc-3.4.*
WRKSRC=		${WRKDIR}/gcc-${PORTVERSION}

MAN1=		cpp${gcc_suffix}.1 \
		gcc${gcc_suffix}.1 \
		gcov${gcc_suffix}.1
MAN7=		${fsf_mans:S/$/${fsf_suffix}.7/}
NOMANCOMPRESS=	yes	# Too hard to deal with differences on 5-cur and releng4?
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_unw

LATEST_LINK=	${PORTNAME}${gcc_suffix}

.include <bsd.port.pre.mk>

gcc_suffix=		34
fsf_mans=		fsf-funding gfdl gpl
fsf_suffix=		-${PORTNAME}${gcc_suffix}
targlib=		${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/${PORTVERSION}

PATCH_WRKSRC=	${WRKSRC}

GNU_CONFIGURE=	yes
CONFIGURE_WRKSRC=	${WRKDIR}/build
CONFIGURE_SCRIPT=	../${WRKSRC:C/${WRKDIR}\///}/configure
CONFIGURE_ARGS=	--enable-languages="c,ada" \
				--disable-nls \
				--with-system-zlib \
				--with-libiconv-prefix=${LOCALBASE} \
				--enable-threads=posix \
				--program-suffix=${gcc_suffix} \
				--bindir=${PREFIX}/bin/gcc${gcc_suffix} \
				--libdir=${targlib}

BUILD_WRKSRC=	${WRKDIR}/build

INSTALL_WRKSRC=	${WRKDIR}/build

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

USE_LDCONFIG=	${targlib}

# An ancient binary distribution of GNAT is used for bootstrapping.
.if ${OSVERSION} >= 500000
BUILD_DEPENDS+=	${LOCALBASE}/lib/compat/libc.so.4:${PORTSDIR}/misc/compat4x
.endif
# Warning! You need the trailing slash on GCC_EXEC_PREFIX.
compiler_defs=	GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
				ADA_INCLUDE_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adainclude \
				ADA_OBJECTS_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adalib
bootstrap_path=	${WRKDIR}/adaboot/bin
build_path=		${bootstrap_path}:${PATH}

# Make sure we use the Ada-aware gcc compiler.
CC=				adagcc
# C compiler from GNAT 3.15 doesn't understand modern flags.
CFLAGS=
CONFIGURE_ENV+=	${compiler_defs} PATH=${build_path} CC=${CC}
MAKE_ENV+=		${compiler_defs} PATH=${build_path} CC=${CC} PTHREAD_LIBS=${PTHREAD_LIBS}

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

# Append ' [FreeBSD]' to gcc version string.
post-patch:
	${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
	    ${WRKSRC}/gcc/version.c

pre-configure:
	cd ${WRKSRC}; contrib/gcc_update --touch
	${RM} -f ${WRKSRC}/gcc/*/*.info*
	${MKDIR} ${CONFIGURE_WRKSRC}
	@@# Ada and C compilers should be the same.
	if [ -d ${bootstrap_path} ]; then \
		${LN} -s ${bootstrap_path}/adagcc ${bootstrap_path}/cc; \
	fi

do-build:
	(cd ${BUILD_WRKSRC}; \
	    ${MAKE_ENV} ${GMAKE} bootstrap)
	(cd ${BUILD_WRKSRC}; \
	    ${MAKE_ENV} ${GMAKE} -C gcc gnatlib)
	(cd ${BUILD_WRKSRC}; \
	    ${MAKE_ENV} ${GMAKE} -C gcc gnattools)

post-install:
	${LN} -s ${PREFIX}/bin/gcc${gcc_suffix}/gcc${gcc_suffix} \
		${PREFIX}/bin/gcc${gcc_suffix}/gcc
	@@# 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.
	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 ${targlib:S/^${PREFIX}\///} ${targlib:S/^${PREFIX}\///:S/lib/libexec/}; 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/lib/gcc/${CONFIGURE_TARGET} 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
	${ECHO_CMD} "@@unexec ${RMDIR} %D/lib/gcc 2>/dev/null || true" >> ${WRKDIR}/PLIST.lib
	${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 DEPRECATED and set an EXPIRATION_DATE

PR:		115061
Submitted by:	Karel Miklav <karel@@lovetemple.net>
@
text
@d6 1
a6 1
# $FreeBSD$
@


1.7
log
@- Set --mandir and --infodir in CONFIGURE_ARGS if the configure script
  supports them.  This is determined by running ``configure --help'' in
  do-configure target and set the shell variable _LATE_CONFIGURE_ARGS
  which is then passed to CONFIGURE_ARGS.
- Remove --mandir and --infodir in ports' Makefile where applicable
  Few ports use REINPLACE_CMD to achieve the same effect, remove them too.
- Correct some manual pages location from PREFIX/man to MANPREFIX/man
- Define INFO_PATH where necessary
- Document that .info files are installed in a subdirectory relative to
  PREFIX/INFO_PATH and slightly change add-plist-info to use INFO_PATH and
  subdirectory detection.

PR:		ports/111470
Approved by:	portmgr
Discussed with:	stas (Mk/*), gerald (info related stuffs)
Tested by:	pointyhat exp run
@
text
@d26 3
@


1.6
log
@- Require specified binary compiler for bootstrapping
- Some aesthetic changes in the Makefile
- Bump PORTVERSION

PR:		ports/106655
Submitted by:	Karel Miklav <karel@@lovetemple.net> (maintainer)
@
text
@d68 1
a68 2
				--libdir=${targlib} \
				--infodir=${PREFIX}/${INFO_PATH}/gcc${gcc_suffix}
@


1.5
log
@- improved handling of include paths in the GCC build process;   [1]
- proper care is taken that only the bootstrap compiler is used  [1]
  (silences core dump messages in configure);
- bump PORTREVISION.   [1]

PR:		104301  [2]
Submitted by:	Vaclav Haisman <v.haisman at sh.cvut.cz>  [2]
		Karel Miklav <karel at lovetemple.net> (maintainer)  [1]
@
text
@d11 9
a19 6
PORTREVISION=	2
CATEGORIES=		lang
MASTER_SITES=	${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR=	releases/gcc-${PORTVERSION}
DISTFILES=		gcc-core-${PORTVERSION}.tar.gz \
				gcc-ada-${PORTVERSION}.tar.gz
d21 2
a22 2
MAINTAINER=		karel@@lovetemple.net
COMMENT=		The GNU Ada Compiler system
d27 1
a27 1
USE_PERL5=	yes
d34 2
a35 2
			gcc${gcc_suffix}.1 \
 			gcov${gcc_suffix}.1
d37 1
a37 1
NOMANCOMPRESS=	yes	# too hard to deal with differences on 5-cur and releng4
d81 1
a81 36
# You need a compiler who calls an existing GNAT compiler (3.15 or greater).
# By default, we'll look for one in the path.  If we can't find one, we'll
# fetch a distfile containing a minimum (still pretty large) compiler toolset
# and use that to build.
gnat_gcc!=	if ${WHICH} adagcc > /dev/null 2>&1; then \
				${ECHO_CMD} "`${WHICH} adagcc`"; \
			else \
				${ECHO_CMD} ""; \
			fi
gnat_bind!=	if ${WHICH} gnatbind > /dev/null 2>&1; then \
				${ECHO_CMD} "`${WHICH} gnatbind`"; \
			else \
				${ECHO_CMD} ""; \
			fi
.if empty(gnat_gcc)
gnat_gcc!=	if ${WHICH} gnatgcc > /dev/null 2>&1; then \
				${ECHO_CMD} "`${WHICH} gnatgcc`"; \
			else \
				${ECHO_CMD} ""; \
			fi
.endif

.if !empty(gnat_gcc) && !empty(gnat_bind)
build_path!=	if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
				${ECHO_CMD} "$$PATH"; \
			else \
				${ECHO_CMD} ""; \
			fi
.else
build_path=
.endif

.if empty(build_path)
DISTFILES+=		gnat-3.15p-boot.tar.gz:boot
MASTER_SITES+=	${MASTER_SITE_LOCAL}:boot
MASTER_SITE_SUBDIR+=	deischen/gcc/:boot
d86 1
a86 1
compiler_data=	GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
a90 2
gnat_gcc=		adagcc
.endif
d93 1
a93 1
CC=				${gnat_gcc}
d96 2
a97 2
CONFIGURE_ENV+=	${compiler_data} PATH=${build_path}
MAKE_ENV+=		${compiler_data} PATH=${build_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
d104 1
a104 1
	@@${REINPLACE_CMD} -e 's|\(const char version_string.*\)";|\1 [FreeBSD]";|' \
d109 3
a111 3
	@@${RM} -f ${WRKSRC}/gcc/*/*.info*
	@@${MKDIR} ${CONFIGURE_WRKSRC}
	# Ada and C compilers should be the same.
d127 1
a127 1
	# Man pages can only be generated if Perl >= 5.6 is installed; fake them otherwise.
d131 1
a131 1
	# Version FSF funding and licensing manuals.
d136 1
a136 1
	# Prepare a temporary list of installed libraries and include files.
d145 1
a145 1
	# Following directories should be removed on deinstal if empty. Add them to the temporary list.
d150 1
a150 1
	# Insert the temporary list in the packing list.
@


1.4
log
@o  add fsf_suffix (-gnat-gcc34) to MAN7 names to avoid conflicts with
   other gcc ports;  [1]
o  s/INSTALLS_SHLIB/USE_LDCONFIG;  [1]
o  some Makefile restructure;  [1]
o  bump PORTREVISION;  [1]
o  remove BROKEN for 4.x as it builds without errors.

PR:		102727  [1]
Submitted by:	Karel Miklav <karel@@lovetemple.net> (maintainer)  [1]
@
text
@d11 1
a11 1
PORTREVISION=	1
d101 1
a101 1
bootstrap_path!=	if [ -x ${gnat_gcc} -a -x ${gnat_bind} ]; then \
d107 1
a107 1
bootstrap_path=
d110 1
a110 1
.if empty(bootstrap_path)
d121 2
a122 1
bootstrap_path=	${WRKDIR}/adaboot/bin:${PATH}
d130 2
a131 2
CONFIGURE_ENV+=	${compiler_data} PATH=${bootstrap_path}
MAKE_ENV+=		${compiler_data} PATH=${bootstrap_path} PTHREAD_LIBS=${PTHREAD_LIBS} CC=${CC}
d142 1
a142 1
	cd ${WRKSRC} ; contrib/gcc_update --touch
d145 4
d170 1
a170 1
	# Add target libraries and include files to packaging list.
d173 1
a173 1
		cd ${PREFIX} ; \
d175 3
a177 3
			${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 ; \
d179 1
d184 2
a185 1
	cd ${WRKDIR} ; ${SED} -i -e "/PLIST.lib/ r PLIST.lib" ${TMPPLIST}
@


1.3
log
@- fix DISTFILES;  [1]
- remove gcc-testsuite from distinfo;  [1]
- introduce MASTER_SITE_SUBDIR;  [1]
- change a BROKEN message (doesn't deinstall cleanly at 4.x, PR/101809 pending).

PR:		102451  [1]
Submitted by:	Karel Miklav <karel@@lovetemple.net> (maintainer)
Approved by:	netchild (mentor, implicit)
@
text
@d11 1
d21 2
d33 1
a33 1
MAN7=		fsf-funding.7 gfdl.7 gpl.7
d44 2
a47 4
.if ${OSVERSION} < 500000
BROKEN=		does not deinstall cleanly at 4.x (PR/101809 pending)
.endif

d49 2
a70 3
INSTALLS_SHLIB=	yes

USE_LDCONFIG=	${targlib}
d76 1
a76 1
ONLY_FOR_ARCHS=	i386
a110 1
ONLY_FOR_ARCHS=	i386
d156 1
a156 2
	# Man pages can only be generated if Perl >= 5.6 is installed;
	# fake them otherwise.
d160 5
@


1.2
log
@Broken on 4.x: does not extract (both bzip2 and tar.gz sources are used)

Reported by:	krismail
Approved by:	netchild (mentor, implicit)
@
text
@d14 2
a15 2
DISTFILES=		gcc-core-${PORTVERSION}.tar.bz2 \
				gcc-ada-${PORTVERSION}.tar.bz2
d44 1
a44 1
BROKEN=         does not extract on 4.x (both bzip2 and tar.gz sources are used)
d114 1
@


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

PR:		99993
Submitted by:	Karel Miklav <karel@@lovetemple.net>
Approved by:	netchild (mentor, implicit)
@
text
@d43 4
@

