mirror of
https://git.freebsd.org/ports.git
synced 2025-05-31 02:16:27 -04:00
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).
28 lines
514 B
Bash
28 lines
514 B
Bash
#!/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" "$@"
|