Hi Brad,

Brad Smith wrote:
> Here is an update to GNU gas 2.37.

Hmm. The manpage ends up being a 0 byte file. This is an upstream
problem, because the manpages are generated before packaging.
as.1 is a 0 byte file in the archive already.

The last two upstream commits seem to address this. But the patched
files are not in the archive.

The patch below calls texi2mdoc on the as.texi file and generates the
manpage for the port.

It looks like it pulls the full info page into the manpage and it ends
up being huge (22084 lines). The manpage of the previous version has 1872
lines. I also has some cosmetic issues.

Maybe you know a better solution...

Other than that, the port looks good.

Best Regards,
Stefan

Index: devel/gas/Makefile
===================================================================
RCS file: /home/cvs/ports/devel/gas/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- devel/gas/Makefile  12 Jul 2019 20:44:09 -0000      1.3
+++ devel/gas/Makefile  30 Nov 2021 21:09:13 -0000
@@ -2,9 +2,10 @@
 
 COMMENT =              GNU assembler
 
-V =                    2.31.1
+V =                    2.37
 DISTNAME =             binutils-$V
 PKGNAME =              gas-$V
+EXTRACT_SUFX =         .tar.xz
 
 CATEGORIES =           devel
 
@@ -19,6 +20,9 @@ WANTLIB +=            c z
 
 MASTER_SITES =         ${MASTER_SITE_GNU:=binutils/}
 
+BUILD_DEPENDS =                textproc/texi2mdoc
+
+USE_GMAKE=             Yes
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ARGS +=      --disable-ld \
                        --disable-gold \
@@ -34,7 +38,11 @@ LIBTOOL_FLAGS =              --tag=disable-shared
 post-extract:
        @rm -rf ${WRKSRC}/{binutils,gprof}
 
+# texi2mdoc is here because upstream manpage generation is broken
+# remove once doc/as.1 is not a 0 byte file anymore
 post-install:
        cd ${PREFIX}/info && mv as.info gas.info
+       texi2mdoc -I ${WRKSRC}/bfd/doc:${WRKSRC}/libiberty \
+               ${WRKSRC}/gas/doc/as.texi > ${PREFIX}/man/man1/gas.1
 
 .include <bsd.port.mk>
Index: devel/gas/distinfo
===================================================================
RCS file: /home/cvs/ports/devel/gas/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- devel/gas/distinfo  26 Dec 2018 19:47:27 -0000      1.2
+++ devel/gas/distinfo  30 Nov 2021 20:46:56 -0000
@@ -1,2 +1,2 @@
-SHA256 (binutils-2.31.1.tar.gz) = 6I+NNr0KddN2WkrQiNgZ41+NesYogEl4Di/vytGN3og=
-SIZE (binutils-2.31.1.tar.gz) = 40476369
+SHA256 (binutils-2.37.tar.xz) = gg2XJPAgo+acszeJOgtjwtsWHa3LDgb8Edwp6x6Eoyw=
+SIZE (binutils-2.37.tar.xz) = 22916924
Index: devel/gas/patches/patch-bfd_Makefile_in
===================================================================
RCS file: /home/cvs/ports/devel/gas/patches/patch-bfd_Makefile_in,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-bfd_Makefile_in
--- devel/gas/patches/patch-bfd_Makefile_in     26 Dec 2018 19:47:27 -0000      
1.2
+++ devel/gas/patches/patch-bfd_Makefile_in     30 Nov 2021 20:46:56 -0000
@@ -1,8 +1,9 @@
 $OpenBSD: patch-bfd_Makefile_in,v 1.2 2018/12/26 19:47:27 pascal Exp $
+
 Index: bfd/Makefile.in
 --- bfd/Makefile.in.orig
 +++ bfd/Makefile.in
-@@ -459,7 +459,7 @@ AUTOMAKE_OPTIONS = no-dist foreign
+@@ -461,7 +461,7 @@ AUTOMAKE_OPTIONS = no-dist foreign
  ACLOCAL_AMFLAGS = -I . -I .. -I ../config
  INCDIR = $(srcdir)/../include
  CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
Index: devel/gas/patches/patch-bfd_config_bfd
===================================================================
RCS file: /home/cvs/ports/devel/gas/patches/patch-bfd_config_bfd,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-bfd_config_bfd
--- devel/gas/patches/patch-bfd_config_bfd      26 Dec 2018 21:27:19 -0000      
1.3
+++ devel/gas/patches/patch-bfd_config_bfd      30 Nov 2021 20:46:56 -0000
@@ -1,16 +1,17 @@
 $OpenBSD: patch-bfd_config_bfd,v 1.3 2018/12/26 21:27:19 pascal Exp $
+
 Index: bfd/config.bfd
 --- bfd/config.bfd.orig
 +++ bfd/config.bfd
-@@ -81,7 +81,6 @@ case $targ in
+@@ -80,7 +80,6 @@ case $targ in
   arm*-*-aout | \
   arm-*-coff | \
   arm-*-netbsd* | \
 - arm-*-openbsd* | \
   arm-*-oabi | \
   arm-*-riscix* | \
-  arm-epoc-pe* | \
-@@ -244,6 +243,11 @@ case "${targ}" in
+  arm*-*-symbianelf* | \
+@@ -245,6 +244,11 @@ case "${targ}" in
      targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
      want64=true
      ;;
@@ -22,7 +23,7 @@ Index: bfd/config.bfd
    aarch64-*-fuchsia*)
      targ_defvec=aarch64_elf64_le_vec
      targ_selvecs="aarch64_elf64_be_vec arm_elf32_le_vec arm_elf32_be_vec"
-@@ -355,6 +359,10 @@ case "${targ}" in
+@@ -352,6 +356,10 @@ case "${targ}" in
      targ_selvecs="arm_elf32_le_vec"
      ;;
    arm-*-netbsdelf*)
Index: devel/gas/patches/patch-gas_Makefile_in
===================================================================
RCS file: /home/cvs/ports/devel/gas/patches/patch-gas_Makefile_in,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-gas_Makefile_in
--- devel/gas/patches/patch-gas_Makefile_in     26 Dec 2018 19:47:27 -0000      
1.2
+++ devel/gas/patches/patch-gas_Makefile_in     30 Nov 2021 20:46:56 -0000
@@ -1,8 +1,9 @@
 $OpenBSD: patch-gas_Makefile_in,v 1.2 2018/12/26 19:47:27 pascal Exp $
+
 Index: gas/Makefile.in
 --- gas/Makefile.in.orig
 +++ gas/Makefile.in
-@@ -1662,7 +1662,7 @@ cgen.@OBJEXT@: cgen.c cgen.h cgen-desc.h subsegs.h \
+@@ -1636,7 +1636,7 @@ cgen.@OBJEXT@: cgen.c cgen.h cgen-desc.h subsegs.h \
  .PHONY: install-exec-local install-data-local
  .PHONY: install-exec-bindir install-exec-tooldir
  
Index: devel/gas/patches/patch-gas_configure_tgt
===================================================================
RCS file: /home/cvs/ports/devel/gas/patches/patch-gas_configure_tgt,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-gas_configure_tgt
--- devel/gas/patches/patch-gas_configure_tgt   26 Dec 2018 21:27:19 -0000      
1.3
+++ devel/gas/patches/patch-gas_configure_tgt   30 Nov 2021 20:46:56 -0000
@@ -1,16 +1,17 @@
 $OpenBSD: patch-gas_configure_tgt,v 1.3 2018/12/26 21:27:19 pascal Exp $
+
 Index: gas/configure.tgt
 --- gas/configure.tgt.orig
 +++ gas/configure.tgt
-@@ -127,6 +127,7 @@ case ${generic_target} in
-     case ${cpu}-${os} in
+@@ -131,6 +131,7 @@ case ${generic_target} in
        aarch64*-linux-gnu_ilp32)               arch=aarch64:32 ;;
      esac ;;
+   aarch64*-*-netbsd*)                 fmt=elf em=nbsd;;
 +  aarch64-*-openbsd*)                 fmt=elf;;
  
    alpha-*-*vms*)                      fmt=evax ;;
    alpha-*-osf*)                               fmt=ecoff ;;
-@@ -153,6 +154,7 @@ case ${generic_target} in
+@@ -156,6 +157,7 @@ case ${generic_target} in
    arm-*-uclinux*)                     fmt=elf  em=linux ;;
    arm-*-nacl*)                                fmt=elf  em=nacl ;;
    arm-*-netbsdelf*)                   fmt=elf  em=nbsd ;;

Reply via email to