Subject: PKG_OPTIONS not properly handled
To: None <tech-pkg@NetBSD.org>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: tech-pkg
Date: 12/30/2007 10:27:46
I am trying to build print/ghostscript-esp without CUPS (ehoch is
currently marked as insecure) but it tries to build anyway.  I made the
change indicated below to see what was going on.  Here is what it
outputs:

===> Extracting for ghostscript-esp-8.15.1nb6
1 x11
2 cups x11

As you can see I have set the proper variable but what comes out
of ../../mk/bsd.options.mk still has the cups option enabled.  And I do
know that ghostscript-esp is deprecated and I am installing ghostscript
anyway but this seems to indicate a deeper problem in the system.

Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/print/ghostscript-esp/options.mk,v
retrieving revision 1.4
diff -u -p -u -r1.4 options.mk
--- options.mk  22 Feb 2007 19:27:03 -0000      1.4
+++ options.mk  30 Dec 2007 15:15:40 -0000
@@ -15,7 +15,11 @@ CONFIGURE_ARGS+=     --with-x
 CONFIGURE_ARGS+=       --without-x
 .endif
 
-.if !empty(PKG_OPTIONS:Mcups)
+pre-extract:
+       @echo "1 ${PKG_OPTIONS.ghostscript-esp}"
+       @echo "2 ${PKG_OPTIONS}"
+
+.if !empty(PKG_OPTIONS:McupsX)
 CONFIGURE_ARGS+=       --enable-cups
 PLIST_SUBST+=          CUPS=


-- 
D'Arcy J.M. Cain <darcy@NetBSD.org>
http://www.NetBSD.org/