Creating a portfile for gmtl

Mark Duling mark.duling at biola.edu
Sun Dec 31 12:31:06 PST 2006


Doug McCorkle <mccdo at iastate.edu> on Saturday, December 30, 2006 at 6:38
PM -0800 wrote:
>Hello,
>     I am trying to create a Portfile for gmtl and am getting an  
>error on the archive step.
>
>DEBUG: Skipping completed com.apple.destroot (gmtl)
>--->  Packaging tgz archive for gmtl 0.4.12_0
>DEBUG: Executing com.apple.archive (gmtl)
>Error: Target com.apple.archive returned: error copying "/opt/local/ 
>var/db/dports/build/_Volumes_data_dports-dev_devel_gmtl/ 
>work/.darwinports.gmtl.state" to "/opt/local/var/db/dports/build/ 
>_Volumes_data_dports-dev_devel_gmtl/work/destroot/+STATE": no such  
>file or directory
>Warning: the following items did not execute (for gmtl):  
>com.apple.activate com.apple.archive com.apple.install
>Error: Status 1 encountered during processing.
>
> From above the destroot dir is not present in the work dir.
>
>I have followed the tutorial instructions and looked at some examples  
>but can not seem to make it work. Any suggestions on how to make the  
>file work is appreciated. Thanks.

If destdir is not present in the workdir then something is wrong with the
app's makefile.  Look at the verbose output of the build and see if you
can tell why.  You may use -vdt, the -t tells you if the files are writing
outside of destroot stright into ${prefix} as happens with poorly written
apps.  So you can either figure out the problem and patch the Makefile or
whatever scripts do the installing (and submit the patches upstream for
later inclusion), or if the app is very simple and/or the routines more
complex than you'd like to deal with now you can just simultaneously turn
off the developers install and copy the files that should be installed via
MacPorts.

Like this:

destroot {
        xinstall ${worksrcpath}/lib/foo1  ${destroot}${prefix}/lib/foo1
        etc
}

I just did exactly that just now with a new port named nspr.  And
sometimes I do the latter and later realize or figure out what is the
problem and go back and revise the port with a patched Makefile and send
the patch upstream to the developers so they can fix it more permanently
and our portfiles get cleaned up over time.  Using the Makefile is always
better if you can, but some Makefiles are so broken and the app so trival
or old that it isn't always feasible or worth the time to fix them.

Mark




More information about the macports-users mailing list