pkgsrc-Bugs archive

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

pkg/42704: Adding support for bmake as a pkgsrc tool (ala gmake)

>Number:         42704
>Category:       pkg
>Synopsis:       Adding support for bmake as a pkgsrc tool (ala gmake)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 30 11:20:00 +0000 2010
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pkgsrc current 2010-01-30)
        Prince of Songkla University
System: NetBSD 4.0_STABLE NetBSD 4.0_STABLE 
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 i386
Architecture: i386
Machine: i386
        There are more and more packages (gnome derived ones mostly)
        that are triggering the bug in NetBSD 4's make program related
        to long input lines (usually found in a .deps/*.po type file)

        Since NetBSD 4 is still supposed to be supported by pkgsrc,
        and since it seems unlikely that there will ever be a new NetBSD 4
        release to incorporate a fixed version of make, all the packages
        that encounter this problem need to use a pkgsrc supplied
        version of make rather than the system version (when building
        in a NetBSD 4 environment).

        Until now, the only alternative has been gmake, and while gmake
        and bmake are largely compatible, "largely" should probably be
        in quotes - it seems to me that if a package builds using the
        standard NetBSD make on NetBSD 5 (or later) it should use as close
        to that as possible on NetBSD 4.

        Since we have devel/bmake already in pkgsrc, I thought I'd see how
        easy it would be to make that available as a build tool for
        pkgsrc (as gmake is, for packages that have gmake extensions in
        their Makefiles).   This turns out to be easy...

        What's more, it seems to work...

        I'm not sur ethis section makes much sense in a PR that's a
        change request, but to see an example of a package that has
        the problem today, try time/gtodo-applet - attempt to build
        that on NetBSD 4, and expect to see ...

===> Installing for gtodo-applet-0.1nb18
=> Generating pre-install file lists
Making install in src
[1]   Segmentation fault (core dumped) (cd ${subdir} &&...
*** Error code 1

make: stopped in /pkg_comp/obj/pkgsrc/time/gtodo-applet/4x/gtodo-applet-0.1

        the core file dumped is from make, and sure enough, there's a
        BIG .deps/xxx.po file (I forget its name, it isn't important here)

        After the following patch is applied, adding

                USE_TOOLS+= bmake

        to gtodo-applet's Makefile allows that package to build successfully.

        Quite possibly using gmake would as well - since these are mostly
        gnome applications that encounter the bug, it would be surprising if
        gmake wouldn't work ... neevrtheless, the NetBSD 4 make bug could be
        experienced anywhere, so I submit that being able to use bmake as
        a tool is a useful function to add.

        The following patch (applied in pkgsrc/mk) will add support
        for adding bmake as a tool.

Index: tools/
RCS file: /cvsroot/NetBSD/pkgsrc/mk/tools/,v
retrieving revision 1.57
diff -u -r1.57
--- tools/   8 Jul 2009 12:51:16 -0000       1.57
+++ tools/   30 Jan 2010 10:48:11 -0000
@@ -55,6 +55,7 @@
 _TOOLS_VARNAME.basename=       BASENAME
 _TOOLS_VARNAME.bash=           BASH
 _TOOLS_VARNAME.bison-yacc=     YACC
+_TOOLS_VARNAME.bmake=          BMAKE
 _TOOLS_VARNAME.byacc=          YACC
 _TOOLS_VARNAME.bzcat=          BZCAT
 _TOOLS_VARNAME.bzip2=          BZIP2
Index: tools/
RCS file: /cvsroot/NetBSD/pkgsrc/mk/tools/,v
retrieving revision 1.13
diff -u -r1.13
--- tools/       17 Jul 2005 21:36:24 -0000      1.13
+++ tools/       30 Jan 2010 10:54:12 -0000
@@ -49,6 +49,8 @@
 # Define MAKE_PROGRAM to be the "make" used to build the package.
 .if !empty(_USE_TOOLS:Mgmake)
 MAKE_PROGRAM=          ${GMAKE}
+.elif !empty(_USE_TOOLS:Mbmake)
+MAKE_PROGRAM=          ${BMAKE}
 .elif !empty(_USE_TOOLS:Mimake) && defined(IMAKE_MAKE)
Index: tools/
RCS file: /cvsroot/NetBSD/pkgsrc/mk/tools/,v
retrieving revision 1.223
diff -u -r1.223
--- tools/    20 Jan 2010 14:47:30 -0000      1.223
+++ tools/    30 Jan 2010 10:46:06 -0000
@@ -258,6 +258,17 @@
 TOOLS_VALUE_GNU.bison-yacc=    ${TOOLS_CMDLINE.bison-yacc}
+.if !defined(TOOLS_IGNORE.bmake) && !empty(_USE_TOOLS:Mbmake)
+.  if !empty(PKGPATH:Mdevel/bmake)
+MAKEFLAGS+=                    TOOLS_IGNORE.bmake=
+.  elif !empty(_TOOLS_USE_PKGSRC.bmake:M[yY][eE][sS])
+TOOLS_DEPENDS.bmake?=          bmake>=20090909:../../devel/bmake
+TOOLS_CREATE+=                 bmake
+TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.bmake=bmake
+TOOLS_PATH.bmake=              ${TOOLS_PREFIX.bmake}/bin/bmake
+.  endif
 .if !defined(TOOLS_IGNORE.bsdtar) && !empty(_USE_TOOLS:Mbsdtar)
 .  if !empty(PKGPATH:Marchivers/bsdtar)
 MAKEFLAGS+=                    TOOLS_IGNORE.bsdtar=

Home | Main Index | Thread Index | Old Index