<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.freebsd.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.freebsd.org/bugzilla/"
          
          maintainer="bugmeister@FreeBSD.org"
>

    <bug>
          <bug_id>105868</bug_id>
          
          <creation_ts>2006-11-26 17:10:10 +0000</creation_ts>
          <short_desc>Management of auto-detected configure options (includes a live example with amarok)</short_desc>
          <delta_ts>2006-11-30 13:40:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Ports &amp; Packages</product>
          <component>Individual Port(s)</component>
          <version>Latest</version>
          <rep_platform>Any</rep_platform>
          <op_sys>Any</op_sys>
          <bug_status>Closed</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Normal</priority>
          <bug_severity>Affects Only Me</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ganael LAPLANCHE">ganael.laplanche</reporter>
          <assigned_to name="Michael Landin">mich</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>361118</commentid>
    <comment_count>0</comment_count>
    <who name="Ganael LAPLANCHE">ganael.laplanche</who>
    <bug_when>2006-11-26 17:10:10 +0000</bug_when>
    <thetext>	Some ports activate a --with- or --enable- configure option if a variable is defined, but don&apos;t add the corresponding --without- or --disable- option if the variable is not defined.

Unfortunately this way of handling options is not very accurate, since configure scripts often try to detect what you have on your system and activate options following what has been detected. This way, having unchecked an option in the port&apos;s &apos;make config&apos; may result in having the feature activated anyway... Even worse, if this detected feature requires a special library, the dependency is *not* recorded in the DB, so anyone may break the application by uninstalling the library.

An example with the audio/amarok port :

- I have libgpod installed on my system (not used by any program)
- I don&apos;t want Amarok to be built with iPod support so I uncheck the option
- The configure script is run and detects the lib
- Amarok *is* built with the gpod option
- I can uninstall libgpod (no dependency recorded)

Fix: I have attached a patch to correct the amarok example. Unfortunately, this may happen for a lot of ports !

How can it be fixed ? No idea. Should each porter add (force) the corresponding --disable- or --without- option for each --enable- or --with one (as it I had done in net-p2p/amule2) ? This is quite painful and may result in a heterogenous ports tree. Or could it be done automatically by the modifying the way .mk files manage options (not pretty sure about that, since options are not predictable) ?



.if !defined(WITH_GPOD)
 PLIST_SUB+=    GPOD=&quot;@comment &quot;
+CONFIGURE_ARGS+=--without-libgpod
 .else
 LIB_DEPENDS+=  gpod.400:${PORTSDIR}/audio/libgpod
 CONFIGURE_ARGS+=--with-libgpod%--eK4Xc5pJqIeur5CftPdRwHik2N9T72itPaj4JCNM2Fjk8XHl
Content-Type: text/plain; name=&quot;file.diff&quot;
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=&quot;file.diff&quot;

--- Makefile.old        Wed Nov  8 15:25:40 2006
+++ Makefile    Sun Nov 26 12:07:00 2006
@@ -49,6 +49,7 @@
How-To-Repeat: 	Just try the example above...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361119</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Botero-Lowry">alexbl</who>
    <bug_when>2006-11-27 06:54:31 +0000</bug_when>
    <thetext>Responsible Changed
From-To: freebsd-ports-bugs-&gt;mich

It&apos;d be difficult to get everything just right if we tried to make 
this logic implicit, the patch you supplied seems to be the canonical 
way to deal with this issue, so pass it to mich@ so he can deal with it 
(as maintainer of audio/amarok).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361121</commentid>
    <comment_count>2</comment_count>
    <who name="Ganael LAPLANCHE">ganael.laplanche</who>
    <bug_when>2006-11-27 11:13:57 +0000</bug_when>
    <thetext>Hi,

I&apos;ve sent a mail to mich@ to ask him if he could take a look at this patch.

Maybe we could add a small chapter in the porter&apos;s Handbook &apos;Dos and Don&apos;ts&apos; to
warn porters about this situation and advise them to add --without- and
--disable- options whenever possible ?

Best regards,

Ganaël LAPLANCHE
ganael.laplanche@martymac.com
http://www.martymac.com
Tel : (+33)6.84.03.57.24.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361120</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Landin">mich</who>
    <bug_when>2006-11-28 09:55:22 +0000</bug_when>
    <thetext>State Changed
From-To: open-&gt;closed

Committed, thanks !</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361122</commentid>
    <comment_count>4</comment_count>
    <who name="dfilter service">dfilter</who>
    <bug_when>2006-11-28 09:55:27 +0000</bug_when>
    <thetext>mich        2006-11-28 09:55:01 UTC

  FreeBSD ports repository

  Modified files:
    audio/amarok         Makefile 
  Log:
  - actually disable libgpod if we do not enable it
  
  PR:             ports/105868
  Submitted by:   Ganael LAPLANCHE &lt;ganael.laplanche@martymac.com&gt;
  
  Revision  Changes    Path
  1.59      +1 -0      ports/audio/amarok/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to &quot;cvs-all-unsubscribe@freebsd.org&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>361123</commentid>
    <comment_count>5</comment_count>
    <who name="Ganael LAPLANCHE">ganael.laplanche</who>
    <bug_when>2006-11-30 13:37:54 +0000</bug_when>
    <thetext>Hi,

As I suggested, I&apos;ve sent a patch for the porter&apos;s handbook. See PR/106065.

Best regards,

Ganaël LAPLANCHE
ganael.laplanche@martymac.com
http://www.martymac.com
Tel : (+33)6.84.03.57.24.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>