pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cross/mingw-binutils (cross/mingw-binutils) fix build,...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a320ef079b65
branches:  trunk
changeset: 458938:a320ef079b65
user:      mef <mef%pkgsrc.org@localhost>
date:      Sun Sep 26 02:33:14 2021 +0000

description:
(cross/mingw-binutils) fix build, taking care ld/genscripts.sh bash issue

 - The problem is:
        --- all-ld ---
        .././ld/genscripts.sh: 411: Syntax error: Bad substitution
        *** [ei386pe.c] Error code 2

 - patch-ld_genscripts.sh seems addressing this issue, but does not seem
  working correctly

 - So, there may be better solution, but sorry for adhoc fix (as usual)

diffstat:

 cross/mingw-binutils/Makefile                     |  11 ++++++++-
 cross/mingw-binutils/distinfo                     |   3 +-
 cross/mingw-binutils/patches/patch-ld_Makefile.in |  25 +++++++++++++++++++++++
 3 files changed, 36 insertions(+), 3 deletions(-)

diffs (72 lines):

diff -r 06197a6b1e0f -r a320ef079b65 cross/mingw-binutils/Makefile
--- a/cross/mingw-binutils/Makefile     Sun Sep 26 01:34:21 2021 +0000
+++ b/cross/mingw-binutils/Makefile     Sun Sep 26 02:33:14 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2020/04/26 09:47:40 rillig Exp $
+# $NetBSD: Makefile,v 1.11 2021/09/26 02:33:14 mef Exp $
 
 DISTNAME=      binutils-2.18
 PKGNAME=       mingw-${DISTNAME:S/-src//}
@@ -13,11 +13,18 @@
 
 GNU_CONFIGURE=         yes
 GNU_CONFIGURE_STRICT=  no # several sub-configures know --enable-nls
-USE_TOOLS+=            pax
+USE_TOOLS+=            pax bash
 INFO_FILES=            yes
 
 BUILDLINK_TRANSFORM+=  rm:-Werror
 
+SUBST_CLASSES+=                bash
+SUBST_FILES.bash=      ld/Makefile.in
+SUBST_VARS.bash=       BASH
+SUBST_STAGE.bash=      post-configure
+SUBST_MESSAGE.bash=    Replace $(SHELL) to bash
+SUBST_SED.bash=                -e s,@@BASH@@,${PREFIX}/bin/bash,
+
 INSTALLATION_DIRS+=    cross/bin
 
 post-install:
diff -r 06197a6b1e0f -r a320ef079b65 cross/mingw-binutils/distinfo
--- a/cross/mingw-binutils/distinfo     Sun Sep 26 01:34:21 2021 +0000
+++ b/cross/mingw-binutils/distinfo     Sun Sep 26 02:33:14 2021 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.5 2020/12/14 00:39:33 dbj Exp $
+$NetBSD: distinfo,v 1.6 2021/09/26 02:33:14 mef Exp $
 
 SHA1 (binutils-2.18.tar.bz2) = fdec92e9dfc6c32155869f3910f47041c78e2277
 RMD160 (binutils-2.18.tar.bz2) = 78d07475667c55ecbf9068dbb90362a3445b2a99
 SHA512 (binutils-2.18.tar.bz2) = d3415f867451eca10d8e0585a64c3bfe2bac6a9f74ca8640c97e284d173cfacf2409179e133e24b77d634adf48e3d218d3585af430085aeda0086afd2066a417
 Size (binutils-2.18.tar.bz2) = 14962245 bytes
 SHA1 (patch-ab) = 848b71c900463445d8f5420b3175fd74cf5ae4d9
+SHA1 (patch-ld_Makefile.in) = 142402d214b76ef0d596b7ab63a03ee28e68b683
 SHA1 (patch-ld_genscripts.sh) = 3edb0d9ac26fdca2a31cb2497ad0f61d56cc1ccf
diff -r 06197a6b1e0f -r a320ef079b65 cross/mingw-binutils/patches/patch-ld_Makefile.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/mingw-binutils/patches/patch-ld_Makefile.in Sun Sep 26 02:33:14 2021 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ld_Makefile.in,v 1.1 2021/09/26 02:33:14 mef Exp $
+
+Use bash instead of $(BASH) with SUBST_CLASSES+= bash
+
+--- all-ld ---
+.././ld/genscripts.sh: 411: Syntax error: Bad substitution
+*** [ei386pe.c] Error code 2
+
+--- ld/Makefile.in.orig        2007-08-07 05:29:54.000000000 +0900
++++ ld/Makefile.in     2021-09-26 10:51:40.956516714 +0900
+@@ -1,4 +1,4 @@
+-# Makefile.in generated by automake 1.9.6 from Makefile.am.
++ # Makefile.in generated by automake 1.9.6 from Makefile.am.
+ # @configure_input@
+ 
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+@@ -695,7 +695,7 @@ EMULATION_FILES = emultempl/pe.em emulte
+ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
+ 
+ # These all start with e so 'make clean' can find them.
+-GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" 
@use_sysroot@
++GENSCRIPTS = LIB_PATH='${LIB_PATH}' @@BASH@@ $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" 
@use_sysroot@
+ GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+ ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
+ ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em



Home | Main Index | Thread Index | Old Index