freebsd-ports/lang/gnat_util/Makefile

47 lines
1.2 KiB
Makefile
Raw Normal View History

# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$
PORTNAME= gnat_util
PORTVERSION= ${SNAPSHOT}
PORTREVISION= ${UTIL_PR}
CATEGORIES= lang
MASTER_SITES= GCC/${MS_SUBDIR}
lang/gcc-aux: Upgrade from gcc-4.7.3 to gcc49-20140302 snapshot GCC4.9 hasn't been released yet, but the Ada portion of it is pretty stable and perfectly passes ACATS and gnat.dg testsuites. The only trick was to change the unwind mechanism on i386 away from KERN_PS_STRINGS because it will not work with 32-bit compatability mode on AMD64. This is because on AMD64, the signal trampoline is located on a random area on a shared page rather than a fixed location before KERN_PS_STRINGS. To support both true i386 and AMD64-32 compatibility mode, unwind now looks for frame pattern in all cases. Apparently stack checking has been broken on AMD64-32 until now. It is important to get the Ada Framework in ports to be based on gcc49 because this compiler supports the full Ada-2012 standard implementation, and in fact some new programs require this already. This port will stay on snapshots until 4.9.0 is released, then it will return to be based on releases. The Ada and C++ options have been removed. These are now always built. In fact, GCC now requires C++ to build, so new bootstraps had to be created. FreeBSD8 has its own bootstrap, and FreeBSD 9+ uses a pure static bootstrap (including GNAT tools) which should last a long time. Additionally a "Bootstrap" option was added, but this overrides all other options to create new bootstraps. It is not intended for general use. Most of the Ada Framework in ports has been pretested and adjusted to work with gcc49 out of the box, but some ports will need to be updated immediately, which will happen right after this one. The update to lang/gnat_util had to be synchronized with lang/gcc-aux because they share version information and the PORTREVISION needed to be reset.
2014-03-14 09:36:05 +01:00
DISTNAME= ${IDENTIFICATION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Library used to build GNAT tools such as ASIS
LICENSE= GPLv3 GPLv3RLE
LICENSE_COMB= multi
USES= ada
2013-11-10 16:20:10 +01:00
NO_MTREE= yes
DISTINFO_FILE= ${.CURDIR}/../${ADAXX}-aux/distinfo
WRKSRC= ${WRKDIR}/${PORTNAME}
2013-11-10 16:20:10 +01:00
MAKE_ENV= MAKEOBJDIR=${WRKSRC}/obj
.include "${.CURDIR}/Makefile.sources"
USES+= tar:xz
.include "${.CURDIR}/../gcc6-aux/Makefile.version"
post-extract:
@${MKDIR} ${WRKSRC}/obj
.for F in Makefile gnat_util.gpr sdefault_adb.gnat_util osint_scars.c
@${CP} ${FILESDIR}/${F} ${WRKSRC}/
.endfor
.for F in ${GNAT_SRCS}
@${CP} ${WRKDIR}/${DISTNAME}/gcc/ada/${F} ${WRKSRC}/
.endfor
post-install:
# impunit is needed for GPS menus, just provide the source files
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/gcc/ada/impunit.* \
${STAGEDIR}${PREFIX}/include/gnat_util
devel/gps: Restore missing project properties switches The project properties were missing several tabs in the "switches" sections, but it wasn't immediately obvious why. It turns out that this was caused by a missing generated file (gnat_switches.py). Restoring that file along with having PATH set to the Ada compiler restored the missing tabs. The trick is that the generated file needs a texi file that is not present in the distfile. The texi file was discarded by gnat_util (and its parent gccX), so the solution is change gnat_util to install the file at its own DOCDIR. Pregeneration of the gnat_switches.py is a bad idea IMO, so we stick with the intended generation. while here, install gps as gps_exe and create a wrapper named "gps" that will define ADA_PROJECT_PATH and a PATH component to the Ada compiler if they aren't already defined. GPS malfunctions a bit if it can't find the compiler or standard library project files. Using a wrapper is nice for new users that don't realize environmental changes are needed. I also changed the install scripts to use BSD_INSTALL_* macros which eliminated the need to use the install-strip INSTALL_TARGET. Finally -- it seems that the ADAXX trick to pull in gcc-aux's versioning for the PORTREVISION stopped working recently although the PORTVERSION still worked. There's a new catch-22 where <pre> was needed to evaluate USES=ada, but if <pre> is called, PORTREVISION value is frozen. Failure to use <pre> resulted in an inclusion failure. The only fix available was to recreate the ada.mk logic. Since gnatdroid is still hardcoded to gcc-aux, only gnat_util was affected (discovered when poudriere failed to rebuild it).
2015-04-20 22:00:00 +02:00
# gnat_ugn.texi is used to generate gnat_switches.py for GPS
@${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/gcc/ada/gnat_ugn.texi \
${STAGEDIR}${DATADIR}
devel/gps: Restore missing project properties switches The project properties were missing several tabs in the "switches" sections, but it wasn't immediately obvious why. It turns out that this was caused by a missing generated file (gnat_switches.py). Restoring that file along with having PATH set to the Ada compiler restored the missing tabs. The trick is that the generated file needs a texi file that is not present in the distfile. The texi file was discarded by gnat_util (and its parent gccX), so the solution is change gnat_util to install the file at its own DOCDIR. Pregeneration of the gnat_switches.py is a bad idea IMO, so we stick with the intended generation. while here, install gps as gps_exe and create a wrapper named "gps" that will define ADA_PROJECT_PATH and a PATH component to the Ada compiler if they aren't already defined. GPS malfunctions a bit if it can't find the compiler or standard library project files. Using a wrapper is nice for new users that don't realize environmental changes are needed. I also changed the install scripts to use BSD_INSTALL_* macros which eliminated the need to use the install-strip INSTALL_TARGET. Finally -- it seems that the ADAXX trick to pull in gcc-aux's versioning for the PORTREVISION stopped working recently although the PORTVERSION still worked. There's a new catch-22 where <pre> was needed to evaluate USES=ada, but if <pre> is called, PORTREVISION value is frozen. Failure to use <pre> resulted in an inclusion failure. The only fix available was to recreate the ada.mk logic. Since gnatdroid is still hardcoded to gcc-aux, only gnat_util was affected (discovered when poudriere failed to rebuild it).
2015-04-20 22:00:00 +02:00
.include <bsd.port.mk>