Changes between Version 21 and Version 22 of snc


Ignore:
Timestamp:
Feb 6, 2009, 2:05:41 PM (15 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

incompatible flags

Legend:

Unmodified
Added
Removed
Modified
  • snc

    v21 v22  
    2424 1. You could add nonstandard library paths to the {{{CPPFLAGS}}} and {{{LDFLAGS}}} globally with {{{configure.cppflags-append -I${prefix}/include/something}}} and {{{configure.ldflags-append -L${prefix}/include/something}}}.
    2525 1. If there's really no other way, patch.
     26=== Dealing with Incompatible Flags ===
     27Use a patchfile so that if upstream ever fixes their software to not use -lcrypt and your patch then breaks, you'll be able to tell why.
     28
     29{{{-lcrypt}}} specifically is a flag you find in some Linux software but which is incompatible with and unnecessary on Mac OS X. If software tries to use that flag on Mac OS X, you would write a patchfile to remove that option, but only apply the patchfile on platform darwin (MacPorts could be installed on a non-Mac operating system and you wouldn't want this particular patch to be applied there). Ideally you would report the problem to the author of the software and they would fix their configure script or whatever, so that Mac users who are not using MacPorts will also benefit from what we discovered and we can remove our patch with the next release.
     30
     31Sometimes software authors have no interest in making such changes to their software — That's their prerogative. In that case, we maintain the patchfile in MacPorts forever.
    2632== Portindex ==
    2733Once you've created your portfile, it's best to test it with your copy of MacPorts.  The first step is to create a [http://guide.macports.org/#development.local-repositories local portfile repository] for testing. For this, I suggest creating the directory {{{~/ports}}}.   Inside this new directory, you should run {{{portindex}}} which will create the repository index of everything following the {{{./group/port/Portfile}}} heirarchy.  '''Note:''' This command should be run everytime you make changes as it will include the new index data for MacPorts. Also watch out for any errors it reports, which stop the portfile from showing up in MacPorts.