pkgsrc-Bugs archive

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

pkg/42393: Missing USE_TOOLS+=bc and mk/tools/ code



>Number:         42393
>Category:       pkg
>Synopsis:       Missing USE_TOOLS+=bc and mk/tools/ code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 01 03:50:00 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2009Q3
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.
>Description:
bc in used by x11/xscreensaver but there is no USE_TOOLS+=bc or support code
in mk/tools/*.mk

I normaly have math/bc installed but the bulk-build process removes it.

>How-To-Repeat:
from x11/xscreensaver build

checking for bc... no

configure: error: Your system doesn't have "bc", which has been a standard
                  part of Unix since the 1970s.  Come back when your vendor
                  has grown a clue.
*** Error code 1

>Fix:
Index: pkgsrc/mk/tools/defaults.mk
===================================================================
--- pkgsrc.orig/mk/tools/defaults.mk    2009-11-28 23:57:08.000000000 +1300
+++ pkgsrc/mk/tools/defaults.mk 2009-11-29 00:05:21.000000000 +1300
@@ -56,6 +56,7 @@ _TOOLS_VARNAME.basename=      BASENAME
 _TOOLS_VARNAME.bash=           BASH
 _TOOLS_VARNAME.bison-yacc=     YACC
 _TOOLS_VARNAME.byacc=          YACC
+_TOOLS_VARNAME.bc=             BC
 _TOOLS_VARNAME.bzcat=          BZCAT
 _TOOLS_VARNAME.bzip2=          BZIP2
 _TOOLS_VARNAME.cat=            CAT
Index: pkgsrc/mk/tools/replace.mk
===================================================================
--- pkgsrc.orig/mk/tools/replace.mk     2009-11-29 00:01:58.000000000 +1300
+++ pkgsrc/mk/tools/replace.mk  2009-11-29 00:10:51.000000000 +1300
@@ -227,6 +227,17 @@ TOOLS_PATH.bash=           ${TOOLS_PREFIX.bash}/b
 .  endif
 .endif
 
+.if !defined(TOOLS_IGNORE.bc) && !empty(_USE_TOOLS:Mbc)
+.  if !empty(PKGPATH:Mmath/bc)
+MAKEFLAGS+=                    TOOLS_IGNORE.bc=
+.  elif !empty(_TOOLS_USE_PKGSRC.bc:M[yY][eE][sS])
+TOOLS_DEPENDS.bc?=             bc>=[0-9]*:../../math/bc
+TOOLS_CREATE+=                 bc
+TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.bc=bc
+TOOLS_PATH.bc=                 ${TOOLS_PREFIX.bc}/bin/bc
+.  endif
+.endif
+
 .if !defined(TOOLS_IGNORE.bison) && !empty(_USE_TOOLS:Mbison)
 .  if !empty(PKGPATH:Mdevel/bison)
 MAKEFLAGS+=                    TOOLS_IGNORE.bison=
Index: pkgsrc/x11/xscreensaver/Makefile
===================================================================
--- pkgsrc.orig/x11/xscreensaver/Makefile       2009-10-13 14:59:46.000000000 
+1300
+++ pkgsrc/x11/xscreensaver/Makefile    2009-11-29 00:07:48.000000000 +1300
@@ -10,6 +10,7 @@ PKG_DESTDIR_SUPPORT=  user-destdir
 
 .include "Makefile.common"
 
+USE_TOOLS+=            bc
 CONFIGURE_ARGS+=       --without-gtk
 CONFIGURE_ARGS+=       --with-xml=${BUILDLINK_PREFIX.libxml2}
 CONFIGURE_ARGS+=       --with-configdir=${PREFIX}/libexec/xscreensaver/config


-- 
Steven
How should I know if it works?  That's what beta testers are for.  I
only coded it.
        -- Attributed to Linus Torvalds, somewhere in a posting



Home | Main Index | Thread Index | Old Index