Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    How to deal with multiple compile dependencies on pkg_config.x.xml

    Development
    2
    2
    2082
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • marcelloc
      marcelloc last edited by

      I see that  multiple <build_port_path>can be used on pkg_config but how to specify a correspondent <build_options>to it?

      I can see the foreach loop for <build_port_path>but the <build_options>are called as a var not as an array on rebuild_package_binaries.php and rebuild_package_binaries_pbi.php

      foreach($pkg['build_port_path'] as $build) {
      			overlay_pfPort($build);
      			$buildname = basename($build);
      			if(isset($options['d'])) {
      				$DESTDIR="DESTDIR=/usr/pkg/{$buildname}";
      				echo ">>> Using $DESTDIR \n";
      			} else 	
      				$DESTDIR="";
      			$build_options="";
      			if($pkg['build_options'])
      

      maybe this way build script can get each port compile options:

      <build_port><path>/usr/ports/sysutils/dependence2</path>
        <options>WITH_IPV6=true</options></build_port>
      <build_port><path>/usr/ports/sysutils/lcdproc</path>
          <options>WITH_USB=true</options></build_port>

      Just a question/suggestion to start fixing packages I'm maintaining.</build_options></build_port_path></build_options></build_port_path>

      Treinamentos de Elite: http://sys-squad.com

      Help a community developer! ;D

      1 Reply Last reply Reply Quote 0
      • jimp
        jimp Rebel Alliance Developer Netgate last edited by

        Assuming that the names are fairly unique between the ports in question, just put them all into a single tag. If a port doesn't use that specific WITH or WITHOUT option then it will just be ignored.

        The only place that doesn't work is when you have one port that needs WITH_FOO and another that needs WITHOUT_FOO. I'm not sure how common that is.

        Expanding the tag might be an option if that doesn't work, it still has to obey the xml rules (build_port_path is a listtag, if you make an array of some other name it will break parsing on existing installs).

        So while what you proposed wouldn't work, it might work like so:

         <build_port_path><port_dir>/usr/ports/category/coolthingy</port_dir>
        	<options>WITH_AWESOMENESS=true WITHOUT_BUGS=true</options></build_port_path> 
         <build_port_path><port_dir>/usr/ports/category/dep</port_dir>
        	<options>WITHOUT_STUFF=true</options></build_port_path> 
        

        That said - PBIs are supposed to detect and self-contain all dependencies. So if the port actually properly handles dependencies, it will get them all (yay) so try just using the main PBI first and see if that works. If not, then worry about the deps. FreeBSD .tbz packages were broken here and there with this, which is why we ended up with the current zany process of adding in all these extra binaries by hand that should really be automatic.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post