Problem with a Qt application portfile

markd at macports.org markd at macports.org
Thu Dec 6 08:53:16 PST 2007


>>>>> I'm trying to port evolvotron:
>>>>>
>>>>> http://sourceforge.net/projects/evolvotron
>>>>>
>>>>> It build with qmake. Works in Fink.
>>>>>
>>>>> So far, I have this:
>>>>>
>>>>> PortSystem 1.0
>>>>> name                evolvotron
>>>>> version             0.4.0
>>>>> categories          graphics x11
>>>>> platforms           darwin
>>>>> maintainers         nomaintainer at macports.org
>>>>> homepage            http://sourceforge.net/projects/evolvotron
>>>>> master_sites        http://downloads.sourceforge.net/evolvotron/
>>>>> checksums           md5 ab6f3a3247e36ca0024d3837f78bdf6b
>>>>> description         "Generative art" image evolver, based on Qt
>>>>> long_description    "Generative art" software to evolve images/
>>>>> textures/patterns through an \
>>>>>                     iterative process of random mutation and
>>>>> user-selection driven evolution.
>>>>> depends_lib         port:qt3
>>>>> depends_build       port:graphviz port:doxygen
>>>>> patchfiles          patch-common.pro patch-evolvotron.pro
>>>>> worksrcdir          ${name}
>>>>> configure.args      --mandir=${prefix}/share/man
>>>>> destroot.destdir    INSTALL_ROOT=${destroot}
>>>>> configure.env       QTDIR=${prefix} INSTALLBASE=${prefix}
>>>>> INSTALLPATH=${destroot}${prefix}
>>>>> build.env           QTDIR=${prefix} INSTALLBASE=${prefix}
>>>>> INSTALLPATH=${destroot}${prefix}
>>>>> destroot.env        QTDIR=${prefix} INSTALLBASE=${prefix}
>>>>> INSTALLPATH=${destroot}${prefix}
>>>>>
>
>>>>> I get as far as this:
>>>>>
>>>>> --->  Fetching evolvotron
>>>>> --->  Verifying checksum(s) for evolvotron
>>>>> --->  Extracting evolvotron
>>>>> --->  Applying patches to evolvotron
>>>>> --->  Configuring evolvotron
>>>>> --->  Building evolvotron with target all
>>>>> --->  Staging evolvotron into destroot
>>>>> --->  Packaging tgz archive for evolvotron 0.4.0_0
>>>>>
>>>>> And then I get this:
>>>>>
>>>>> Error: Target org.macports.archive returned: error copying "/opt/
>>>>> local/var/macports/build/
>>>>> _opt_local_var_macports_sources_local_graphics_evolvotron/
>>>>> work/.macports.evolvotron.state" to "/opt/local/var/macports/
>>>>> build/_opt_local_var_macports_sources_local_graphics_evolvotron/
>>>>> work/destroot/+STATE": no such file or directory
>>>>> Error: Status 1 encountered during processing.

Hi Linc,

Because MacPorts uses an intermediate install location phase we call
destroot, some poorly written Makefiles do not support DESTDIR or the use
of it is not tested.  There is no single answer on how to fix it.  When
possible, if the port author knows how to fix the application's Makefile
so that it does work the patch should be contributed upstream.  But many
times this is not feasible.  In this case it appears that evolvotron
installs few files 
(http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/graphics/evolvotron/pkg-plist?rev=1.3;content-type=text%2Fplain),
so one option is to just override the destroot phase entirely with your
own.  Looks like the freebsd port does the same thing.

http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/graphics/evolvotron/Makefile?rev=1.16;content-type=text%2Fplain

See the Portfile Development Examples in the guide and let us know if you
have questions.  Also, take a look at the logrotate port (the destroot
phase) for an example of using MacPorts instead a Makefile's "make
install" to destroot a port. 
http://geeklair.net/new_macports_guide/#development.examples

 Also note that scanning the freebsd ports collection (and gentoo,
openbsd, and fink) can be a big help in creating MacPorts.  But with the
possible exception of openbsd, there is no equivalent to destroot, so
destroot problems often can't be solved by getting tips from these other
package managers.  Freebsd must not use the makefile for installation for
some other reason.

Mark



More information about the macports-dev mailing list