Changes between Version 20 and Version 21 of snc


Ignore:
Timestamp:
Feb 6, 2009, 2:02:36 PM (16 years ago)
Author:
nerdling (Jeremy Lavergne)
Comment:

fixing libs/includes

Legend:

Unmodified
Added
Removed
Modified
  • snc

    v20 v21  
    1818 1. If the Makefile doesn't support {{{DESTROOT}}}, request from the author that they do. If they won't or you can't wait for their fix, patch the Makefile to support {{{DESTROOT}}}, or override the destroot phase entirely and {{{xinstall}}} the files into place in the portfile.
    1919 1. Sometimes in {{{post-destroot}}} you have to{{{ reinplace s|${destroot}|| somefiles }}}because the destroot path has gotten inserted into them.
     20=== Steps to Fixing Libs/Includes ===
     21 1. Do nothing: MacPorts already puts {{{-L${prefix}/lib}}} in {{{configure.ldflags}}} and {{{-I${prefix}/include}}} in {{{configure.cflags}}} so that most MacPorts software should be automatically found.
     22 1. If not, look for a {{{--with-foo=path}}} configure option; for example{{{ configure.args-append --with-zlib=${prefix} }}}.
     23 1. Sometimes software responds to specific environment variables, e.g. for [port:graphviz] you could {{{configure.env-append FONTCONFIG_CFLAGS=-I${prefix}/include FONTCONFIG_LIBS=-L${prefix}/lib}}}.
     24 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}}}.
     25 1. If there's really no other way, patch.
    2026== Portindex ==
    2127Once 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.