Date: Fri, 8 Jan 2010 19:16:23 GMT From: mark <freebsd-ports@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/142476: bsd.gnat.mk - improved Ada support for the ports system Message-ID: <201001081916.o08JGNa5084725@www.freebsd.org> Resent-Message-ID: <201001081920.o08JK1o2054875@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 142476 >Category: ports >Synopsis: bsd.gnat.mk - improved Ada support for the ports system >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 08 19:20:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: mark >Release: 8.0-RELEASE-amd64 >Organization: n/a >Environment: FreeBSD viper.internal.network 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The following is a new Makefile for the ports system to improve Ada support in the ports system. A description was posted to freebsd-ports@: http://lists.freebsd.org/pipermail/freebsd-ports/2010-January/058675.html # # bsd.gnat.mk - GNAT Ada compiler selection. # # # User settable knobs: # # Name Default value Description # GNAT_GCC_CFLAGS (empty) Optional Ada compiler flags # GNAT_Include= bsd.gnat.mk GNAT_Include_MAINTAINER= freebsd-ports at coreland.ath.cx # Default case - a current lang/gnat-gcc port. .if ${USE_GNAT} == "yes" || ${USE_GNAT} == "gnat-gcc" BUILD_DEPENDS+= gnat-gcc44:${PORTSDIR}/lang/gnat-gcc44 RUN_DEPENDS+= gnat-gcc44:${PORTSDIR}/lang/gnat-gcc44 GNAT_GCC:= gcc44 GNAT_BIND:= gnatbind GNAT_LINK:= gnatlink # GNAT GPL port. .elif ${USE_GNAT} == "gnat-gpl" BUILD_DEPENDS+= gnat-gpl:${PORTSDIR}/lang/gnat RUN_DEPENDS+= gnat-gpl:${PORTSDIR}/lang/gnat GNAT_GCC:= gnatgcc GNAT_BIND:= gnatbind GNAT_LINK:= gnatlink .else IGNORE= specifies unknown value "${USE_GNAT}" for USE_GNAT .endif test-gnat: @echo USE_GCC=${USE_GCC} @echo GNAT_GCC=${GNAT_GCC} @echo BUILD_DEPENDS=${BUILD_DEPENDS} @echo RUN_DEPENDS=${RUN_DEPENDS} A small patch is required to enable it: --- bsd.port.mk.orig 2010-01-08 19:10:20.000000000 +0000 +++ bsd.port.mk 2010-01-08 19:09:45.000000000 +0000 @@ -1740,6 +1740,10 @@ .include "${PORTSDIR}/Mk/bsd.gcc.mk" .endif +.if defined(USE_GNAT) +.include "${PORTSDIR}/Mk/bsd.gnat.mk" +.endif + .if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) .include "${PORTSDIR}/Mk/bsd.ldap.mk" .endif The change should not affect any port that doesn't explicitly enable support by using USE_GNAT=yes. An example port is shown in the mailing list post: # New ports collection makefile for: sdl-ada # Date created: 02 December 2009 # Whom: freebsd-ports at coreland.ath.cx # # $FreeBSD$ # PORTNAME= sdl-ada PORTVERSION= 1.2.14 CATEGORIES= devel MASTER_SITES= http://coreland.ath.cx/code/sdl-ada/src/ MAINTAINER= freebsd-ports at coreland.ath.cx COMMENT= This is a set of Ada bindings to the SDL library. USE_GNAT=yes post-patch: @${ECHO_CMD} "${GNAT_GCC}" > "${WRKSRC}/conf-adacomp" @${ECHO_CMD} "${GNAT_GCC_CFLAGS}" > "${WRKSRC}/conf-adacflags" @${ECHO_CMD} "${GNAT_BIND}" > "${WRKSRC}/conf-adabind" @${ECHO_CMD} "${GNAT_LINK}" > "${WRKSRC}/conf-adalink" @${ECHO_CMD} "${CC}" > "${WRKSRC}/conf-cc" @${ECHO_CMD} "${CFLAGS}" > "${WRKSRC}/conf-cflags" @${ECHO_CMD} "${LD}" > "${WRKSRC}/conf-ld" @${ECHO_CMD} "${PREFIX}/bin" > "${WRKSRC}/conf-bindir" @${ECHO_CMD} "${PREFIX}/include/coreland/sdl-ada" > "${WRKSRC}/conf-incdir" @${ECHO_CMD} "${PREFIX}/lib/coreland/sdl-ada-static" > "${WRKSRC}/conf-slibdir" @${ECHO_CMD} "${PREFIX}/lib/coreland/sdl-ada" > "${WRKSRC}/conf-dlibdir" @${ECHO_CMD} "${PREFIX}/share/coreland/sdl-ada-repos" > "${WRKSRC}/conf-repos" .if defined(DESTDIR) @${ECHO_CMD} "${DESTDIR}" > "${WRKSRC}/conf-fakeroot" .endif .include <bsd.port.mk> >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001081916.o08JGNa5084725>