[46869] trunk/dports/devel
Ryan Schmidt
ryandesign at macports.org
Mon Feb 16 22:21:02 PST 2009
On Feb 16, 2009, at 06:49, krischik at macports.org wrote:
> +distfiles bc-${version}.7z
> +worksrcdir bc-${version}
Instead, you should specify:
distname bc-${version}
extract.suffix .7z
MacPorts will then compute distfiles and worksrcdir from these.
> +use_bzip2 yes
This port is not using bzip2 distfiles so you should remove this line.
> +depends_build port:p7zip
> +
> +extract {
> + system "
> + pushd ${workpath};
> + 7za x ${distpath}/${distfile};
> + popd;
> + "
> +}
pushd and popd are not necessary since the shell only exists for the
duration of the "system" command. If you need to override a phase,
then the customary method is:
system "cd ${worksrcpath} && whatever"
But you don't need to (and shouldn't) override the extract phase.
Just specify your desired extract.cmd and extract.pre_args. By
default MacPorts wants to pipe the output through tar, which isn't
necessary here, so set extract.post_args to empty.
I added a "use_7z" option just now so once MacPorts 1.8.0 is out you
can switch to that.
http://trac.macports.org/ticket/18521
For now, use:
# Replace these with "use_7z yes" with MacPorts 1.8.0
depends_build port:p7zip
extract.cmd ${prefix}/bin/7za
extract.pre_args x
extract.post_args
> +build {
> + system "
> + pushd ${workpath}/${worksrcdir}/GNAT;
> + gnumake release;
> + gnumake debug;
> + popd;
> + "
> +}
I don't think you need to override the build phase either.
gnumake is the default make command that MacPort uses anyway. (See
the documentation of "build.type" in the Guide.)
The default target is "all"; if you want "release" and "debug"
instead then you say:
build.target release debug
If you want this to occur in the GNAT subdirectory instead, then you
say:
build.dir ${worksrcpath}/GNAT
Note I have not tested these changes because I have not built the
gnat-gcc dependency.
> +destroot {
> + xinstall -m 775 -d ${destroot}/${prefix}/lib/booch
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/src
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Release
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Release/obj
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Release/lib
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Debug
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Debug/obj
> + xinstall -m 775 -d ${destroot}/${prefix}/include/booch/GNAT/
> Darwin-i686-Debug/lib
You should not put a slash before ${prefix} because ${prefix} already
begins with a slash.
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/Darwin-
> i686-Release/lib/*] ${destroot}/${prefix}/lib/booch
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/src/
> *] ${destroot}/${prefix}/include/booch/src
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/
> Makefile] ${destroot}/${prefix}/include/booch/GNAT
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/
> booch_95.gpr] ${destroot}/${prefix}/include/booch/GNAT
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/Darwin-
> i686-Release/obj/*] ${destroot}/${prefix}/include/booch/GNAT/Darwin-
> i686-Release/obj
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/Darwin-
> i686-Release/lib/*] ${destroot}/${prefix}/include/booch/GNAT/Darwin-
> i686-Release/lib
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/Darwin-
> i686-Debug/obj/*] ${destroot}/${prefix}/include/booch/GNAT/Darwin-
> i686-Debug/obj
> + eval xinstall -m 664 [glob ${workpath}/${worksrcdir}/GNAT/Darwin-
> i686-Debug/lib/*] ${destroot}/${prefix}/include/booch/GNAT/Darwin-
> i686-Debug/lib
> +}
Note that ${workpath}/${worksrcdir} can be simplified to ${worksrcpath}.
More information about the macports-dev
mailing list