freebsd-ports/lang/gnat_util/Makefile
John Marino dd06b54dc6 Add new port: lang/gnat_util
There are a number of GNAT tools that have to be build using the same
exact sources as the compiler that it serves.  Two examples of this are
GPRbuild and ASIS.  The latter is an important component of several other
language semantic tools.

Accordingly, a separate port is being created to build a static library
that need these compiler sources.  Incidentally, diverging sources is the
reason devel/gprbuild-aux stopped building after lang/gcc-aux was upgraded.
With this new scheme, this type of failure should no longer occur.

This is a dependency of the upcoming lang/asis port, and must be specified
as a build dependency by any port that needs ASIS.

Approved by: 	bapt (mentor)
2013-07-21 14:12:28 +00:00

46 lines
1.3 KiB
Makefile

# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$
PORTNAME= gnat_util
PORTVERSION= ${SNAPSHOT}
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION}
DISTNAME= gcc-${GCC_VERSION}
MAINTAINER= marino@FreeBSD.org
COMMENT= Library used to build GNAT tools such as ASIS
USES= ada
USE_BZIP2= yes
DISTINFO_FILE= ${.CURDIR}/../gcc-aux/distinfo
WRKSRC= ${WRKDIR}/${PORTNAME}
DESTINY= ${WRKDIR}/destino
MAKE_ENV= DESTDIR=${DESTINY} \
MAKEOBJDIR=${WRKSRC}/obj
.include "${.CURDIR}/Makefile.sources"
.include "${.CURDIR}/../gcc-aux/Makefile.version"
.include <bsd.port.pre.mk>
post-extract:
@${MKDIR} ${WRKSRC}/obj
.for F in Makefile gnat_util.gpr sdefault_adb.gnat_util
@${CP} ${FILESDIR}/${F} ${WRKSRC}/
.endfor
.for F in ${GNAT_SRCS}
@${CP} ${WRKDIR}/${DISTNAME}/gcc/ada/${F} ${WRKSRC}/
.endfor
post-install:
${CP} -pR ${DESTINY}${PREFIX}/ ${PREFIX}/
@cd ${DESTINY}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
${SORT} > ${WRKDIR}/PLIST.all
@cd ${DESTINY}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | \
${SORT} -r | ${SED} -e '/lib\/gnat$$/d' -e 's/^/@dirrm /g' \
>> ${WRKDIR}/PLIST.all
@echo "@unexec rmdir %D/lib/gnat 2>/dev/null || true" >> ${WRKDIR}/PLIST.all
@${CAT} ${WRKDIR}/PLIST.all >> ${TMPPLIST}
.include <bsd.port.post.mk>