Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2014 12:45:29 +0000
From:      bz-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 191085] New: [patch] Mk/bsd.options.mk small fix for ${opt}_WITH if option is off
Message-ID:  <bug-191085-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191085

            Bug ID: 191085
           Summary: [patch] Mk/bsd.options.mk small fix for ${opt}_WITH if
                    option is off
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: ---
         Component: Infrastructure
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: ohauer@FreeBSD.org

The ${opt}_WITH construct is not usable in case the option has additional
parameters like paths 

E.g dns/powerdns uses:

PGSQL_CONFIGURE_ON=     --with-pgsql=${LOCALBASE}
PGSQL_CONFIGURE_OFF=    --without-pgsql
MYSQL_CONFIGURE_ON=     --with-mysql=${LOCALBASE}
MYSQL_CONFIGURE_OFF=    --without-mysql


For testing change the four lines to the following two
PGSQL_CONFIGURE_WITH=     pgsql=${LOCALBASE}
MYSQL_CONFIGURE_WITH=     mysql=${LOCALBASE}

Then test with make -V CONFIGURE_ARGS WITHOUT=PGSQL -C dns/powerdns
... --without-pgsql=/usr/local
-> ${LOCALBASE} is not stripped


With the patch below it works as expected and many Makefiles can be simplified

make -V CONFIGURE_ARGS WITHOUT=PGSQL -C dns/powerdns
... --without-pgsql


Index: /usr/ports/Mk/bsd.options.mk
===================================================================
--- /usr/ports/Mk/bsd.options.mk        (revision 357956)
+++ /usr/ports/Mk/bsd.options.mk        (working copy)
@@ -470,7 +470,7 @@
 .    endif
 .    if defined(${opt}_CONFIGURE_WITH)
 .      for iopt in ${${opt}_CONFIGURE_WITH}
-CONFIGURE_ARGS+=       --without-${iopt}
+CONFIGURE_ARGS+=       --without-${iopt:C/=.*//}
 .      endfor
 .    endif
 .    for configure in CONFIGURE CMAKE QMAKE

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191085-13>