Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2015 20:00:01 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384383 - in head: devel/gps devel/gps/files lang/gcc-aux lang/gnat_util
Message-ID:  <201504202000.t3KK01SI092378@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Mon Apr 20 20:00:00 2015
New Revision: 384383
URL: https://svnweb.freebsd.org/changeset/ports/384383

Log:
  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).

Added:
  head/devel/gps/files/gps.in   (contents, props changed)
Modified:
  head/devel/gps/Makefile
  head/devel/gps/files/patch-Makefile.in
  head/devel/gps/files/patch-docs_Makefile.in
  head/lang/gcc-aux/Makefile.version
  head/lang/gnat_util/Makefile

Modified: head/devel/gps/Makefile
==============================================================================
--- head/devel/gps/Makefile	Mon Apr 20 19:40:23 2015	(r384382)
+++ head/devel/gps/Makefile	Mon Apr 20 20:00:00 2015	(r384383)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gps
 PORTVERSION=	6.1.0.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 MASTER_SITES=	http://downloads.dragonlace.net/src/
 PKGNAMESUFFIX=	-ide
@@ -31,6 +31,7 @@ AWKREVDATE=		'/Last Changed Date/ {print
 GPSVER=			GPS_VERSION=${PORTVERSION}
 ALL_TARGET=		default
 NO_MTREE=		yes
+SUB_FILES=		gps
 
 # note: librsvg2 is needed to display the svg icons in the menu.  Actually
 # needed is lib/gdk-pixbuf-2.0/%%GTK2_VER%%/loaders/libpixbufloader-svg.so ,
@@ -58,6 +59,8 @@ MAKE_ARGS+=		PYTHON_CMD=${PYTHON_CMD}
 
 .include <bsd.port.options.mk>
 
+SUB_LIST=		ADA_PATH=${PREFIX}/${ADAXX}-aux/bin
+
 .if ${PORT_OPTIONS:MDEBUG}
 MAKE_ARGS+=		Build=Debug
 .else
@@ -113,6 +116,12 @@ post-patch:
 		${WRKSRC}/configure
 	@${AWK} ${AWKREVDATE} ${WRKSRC}/REVISION | ${XARGS} -I sub \
 		${SED} -i.bak -e sub ${WRKSRC}/common/core/src/config.ads.in
+	@${SED} -i '' -e \
+		's|= "gnat"|= "${LOCALBASE}/${ADAXX}-aux/bin/gnat"|' \
+		${WRKSRC}/share/support/core/gps_utils/gnat_rules.py
+	@${REINPLACE_CMD} -e \
+		's|@UTILSHARE@|${LOCALBASE}/share/gnat_util|' \
+		${WRKSRC}/Makefile.in
 
 do-build:
 	@${CP} ${PREFIX}/include/gnat_util/impunit.* ${WRKSRC}/distrib
@@ -126,7 +135,8 @@ do-build:
 post-install:
 	${RM} -rf ${STAGEDIR}${PREFIX}/share/doc/gps/html/users_guide/_sources
 	${RM} -rf ${STAGEDIR}${PREFIX}/share/doc/gps/html/tutorial/_sources
-	echo "This is the GPS GPL Edition for the FreeBSD Ports Collection." \
+	${INSTALL_SCRIPT} ${WRKDIR}/gps ${STAGEDIR}${PREFIX}/bin
+	echo "This is the GPS GPL Edition for the ${OPSYS} Ports Collection." \
 		> ${STAGEDIR}${PREFIX}/share/gps/about.txt
 	${FIND} ${STAGEDIR}${PREFIX} -type d -empty -delete
 	@(cd ${STAGEDIR}${PREFIX} ; \

Added: head/devel/gps/files/gps.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gps/files/gps.in	Mon Apr 20 20:00:00 2015	(r384383)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# GPS wrapper written by John Marino
+# It sets ADA_PROJECT_PATH in environment if unset
+# It also adds the path to the default Ada toolchain if not already present
+#
+
+VIAS=$(echo ${PATH} | /usr/bin/tr ":" " ")
+
+if [ -z "${ADA_PROJECT_PATH}" ]
+then
+	ADA_PROJECT_PATH=%%PREFIX%%/lib/gnat
+	export ADA_PROJECT_PATH
+fi
+
+FOUND=0
+for via in ${VIAS}
+do
+	[ "${via}" = "%%ADA_PATH%%" ] && FOUND=1;
+done;
+
+if [ ${FOUND} -eq 0 ]
+then
+	PATH=${PATH}:%%ADA_PATH%%
+	export PATH;
+fi
+
+exec "%%PREFIX%%/bin/gps_exe" "$@"

Modified: head/devel/gps/files/patch-Makefile.in
==============================================================================
--- head/devel/gps/files/patch-Makefile.in	Mon Apr 20 19:40:23 2015	(r384382)
+++ head/devel/gps/files/patch-Makefile.in	Mon Apr 20 20:00:00 2015	(r384383)
@@ -1,14 +1,19 @@
---- Makefile.in.orig	2014-05-23 09:12:18.000000000 +0000
+--- Makefile.in.orig	2014-05-23 17:24:28 UTC
 +++ Makefile.in
-@@ -5,14 +5,14 @@ RMDIR           = rm -rf
+@@ -3,16 +3,15 @@ MV              = mv
+ MKDIR           = mkdir -p
+ RMDIR           = rm -rf
  STRIP           = strip
- AWK             = @AWK@
+-AWK             = @AWK@
++AWK             = /usr/bin/awk
  PERL            = perl
 -PYTHON          = python
+-INSTALL         = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+-INSTALL_DATA    = @INSTALL_DATA@
 +PYTHON          = $(PYTHON_CMD)
- INSTALL         = @INSTALL@
- INSTALL_PROGRAM = @INSTALL_PROGRAM@
- INSTALL_DATA    = @INSTALL_DATA@
++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
++INSTALL_DATA    = $(BSD_INSTALL_DATA)
  prefix          = @prefix@
 -bindir          = $(prefix)/bin
 -sharedir        = $(prefix)/share
@@ -19,7 +24,7 @@
  
  all default:
  	$(MAKE) -C gps default
-@@ -49,16 +49,6 @@ ifeq ($(OS),Windows_NT)
+@@ -49,16 +48,6 @@ ifeq ($(OS),Windows_NT)
  		share/plug-ins/_subversion_ \
  		> share/plug-ins/subversion_native_windows.py
  endif
@@ -34,9 +39,9 @@
 -	${RM} ${sharedir}/gps/perspectives.xml
 -	$(RMDIR) $(sharedir)/gps/templates
  # update runtime.xml before copying the plug-ins files.
- 	-(cd distrib; $(PERL) from_impunit.pl)
+ 	(cd distrib; $(PERL) from_impunit.pl)
  # update light icon set
-@@ -71,12 +61,9 @@ ifeq ($(OS),Windows_NT)
+@@ -71,12 +60,11 @@ ifeq ($(OS),Windows_NT)
  	$(MV) share/plug-ins/_subversion_ share/plug-ins/subversion.py
  	$(RM) share/plug-ins/subversion_native_windows.py
  endif
@@ -46,6 +51,17 @@
 -	(cd share; tar cf - library/GPS_old/*.py) | (cd $(sharedir)/gps; tar xf -)
  	(cd share; tar cf - support/) | (cd $(sharedir)/gps; tar xf -)
 -	$(AWK) -f distrib/gnat_switches.awk < gnat/gnat_ugn.texi > $(sharedir)/gps/support/core/gnat_switches.py
++	$(AWK) -f distrib/gnat_switches.awk < @UTILSHARE@/gnat_ugn.texi \
++		> $(sharedir)/gps/support/core/gnat_switches.py
  	$(RM) $(sharedir)/gps/plug-ins/emacs.xml
  	$(RM) $(sharedir)/gps/plug-ins/python_doc.py
  	$(RM) $(sharedir)/gps/plug-ins/python_doc.pyc
+@@ -103,7 +91,7 @@ ifeq ($(OS),Windows_NT)
+ 	$(INSTALL_PROGRAM) gnatlib/src/obj/gnatinspect.exe $(bindir)
+ 	$(MAKE) -C common/expect install
+ else
+-	$(INSTALL_PROGRAM) gps/obj/gps $(bindir)
++	$(INSTALL_PROGRAM) gps/obj/gps $(bindir)/gps_exe
+ 	$(INSTALL_PROGRAM) cli/obj/gnatdoc $(bindir)
+ 	$(INSTALL_PROGRAM) cli/obj/gps_cli $(bindir)
+ 	$(INSTALL_PROGRAM) spark/obj/gnatspark $(bindir)

Modified: head/devel/gps/files/patch-docs_Makefile.in
==============================================================================
--- head/devel/gps/files/patch-docs_Makefile.in	Mon Apr 20 19:40:23 2015	(r384382)
+++ head/devel/gps/files/patch-docs_Makefile.in	Mon Apr 20 20:00:00 2015	(r384383)
@@ -1,6 +1,6 @@
---- docs/Makefile.in.orig	2014-05-23 09:12:23.000000000 +0000
+--- docs/Makefile.in.orig	2014-05-23 09:12:23 UTC
 +++ docs/Makefile.in
-@@ -1,6 +1,6 @@
+@@ -1,10 +1,9 @@
  prefix = @prefix@
 -docdir = $(prefix)/share/doc/gps
 -sharedir = $(prefix)/share/gps
@@ -8,8 +8,13 @@
 +sharedir = $(DESTDIR)$(prefix)/share/gps
  
  MKDIR = mkdir -p
- INSTALL = @INSTALL@
-@@ -12,20 +12,20 @@ all: ug tutorial gps_pg relnotes gnatdoc
+-INSTALL = @INSTALL@
+-INSTALL_DATA = @INSTALL_DATA@
++INSTALL_DATA = $(BSD_INSTALL_DATA)
+ CONVERT = convert
+ CP = cp -p
+ 
+@@ -12,20 +11,20 @@ all: ug tutorial gps_pg relnotes gnatdoc
  static:
  
  gps_pg:

Modified: head/lang/gcc-aux/Makefile.version
==============================================================================
--- head/lang/gcc-aux/Makefile.version	Mon Apr 20 19:40:23 2015	(r384382)
+++ head/lang/gcc-aux/Makefile.version	Mon Apr 20 20:00:00 2015	(r384383)
@@ -5,8 +5,7 @@ GCC_POINT=		2
 GCC_VERSION=		${GCC_BRANCH}.${GCC_POINT}
 SNAPSHOT=		20141023
 MAIN_PR=		1
-UTIL_PR=		1
-ARMV5_PR=		0
+UTIL_PR=		2
 ARMV7_PR=		0
 
 # Snapshot naming pattern

Modified: head/lang/gnat_util/Makefile
==============================================================================
--- head/lang/gnat_util/Makefile	Mon Apr 20 19:40:23 2015	(r384382)
+++ head/lang/gnat_util/Makefile	Mon Apr 20 20:00:00 2015	(r384383)
@@ -23,8 +23,11 @@ MAKE_ENV=	MAKEOBJDIR=${WRKSRC}/obj
 
 .include "${.CURDIR}/Makefile.sources"
 
-.include <bsd.port.pre.mk>
-.include "${.CURDIR}/../${ADAXX}-aux/Makefile.version"
+.if defined(ADA_DEFAULT) && ${ADA_DEFAULT} == 5
+.include "${.CURDIR}/../gcc5-aux/Makefile.version"
+.else
+.include "${.CURDIR}/../gcc-aux/Makefile.version"
+.endif
 
 post-extract:
 	@${MKDIR} ${WRKSRC}/obj
@@ -40,7 +43,11 @@ 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
+	# 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}
 	@(cd ${STAGEDIR}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
 		${SORT} >> ${TMPPLIST})
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504202000.t3KK01SI092378>