[Bug 274619] lang/gnat12: Makefile maintenance

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 21 Oct 2023 00:21:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274619

            Bug ID: 274619
           Summary: lang/gnat12: Makefile maintenance
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: thierry@FreeBSD.org
          Reporter: agh@riseup.net
          Assignee: thierry@FreeBSD.org
             Flags: maintainer-feedback?(thierry@FreeBSD.org)

Created attachment 245767
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=245767&action=edit
Makefile maintenance; NLS support

Attempt to address all advice/warnings/errors from the
port{clippy,fmt,lint} tools, including correctly handling NLS.

* Move gettext-runtime to NLS helper, including pkg-plist updates;
* Prefix all custom variable with an underscore
* Sort Makefile Blocks into correct order; this meant breaking down the
  one if conditional covering MULTILIB into multiple conditionals spread
  between each Block
* Remove ${INFOS}; this was probably meant to be ${INFO}. The Info pages
  are removed later in the post-stage target, so there is no point
  defining any.
* No need to define ${GNU_CONFIGURE_MANPREFIX}, the Ports framework
  inherits this from ${MANPREFIX}, which is also defined in the port Makefile
* Explicitly enable C++ language to GNU configure; GNAT requires a
  working C++ toolchain to build itself
* Move to bsd.port.options.mk/bsd.port.mk Makefile inclusion pair
* Prefer ${DISTVERION} over ${PORTVERSION}
* Remove @ from some Makefile ${COMMANDS} to prefer verbose build output

There is still one warning from portlint:
> WARN: Makefile: possible use of absolute pathname "/sbin:/bin:/usr/sbin...".
I have not yet figured out how to handle that.

There is also an error reported during stage-qa with GCC6AUX:
Error:
/usr/local/gnat12/lib/gcc/x86_64-portbld-freebsd15.0/12.2.0/plugin/libcc1plugin.so.0.0.0
is linked to /usr/local/gcc6-aux/lib/libstdc++.so.6 from lang/gcc6-aux but it
is not declared as a dependency
Error:
/usr/local/gnat12/lib/gcc/x86_64-portbld-freebsd15.0/12.2.0/plugin/libcc1plugin.so.0.0.0
is linked to /usr/local/gcc6-aux/lib/libgcc_s.so.1 from lang/gcc6-aux but it is
not declared as a dependency
I have not been able to fix this using either helpers or an if ${PORT_OPTIONS}
conditional.

Have tested with default options and the inverse of those on:
12.4-{amd64,i386} poudriere-testport OK
13.4-{amd64,i386} poudriere-testport OK
main-{amd64,i386} poudriere-testport OK

-- 
You are receiving this mail because:
You are the assignee for the bug.