[48220] trunk/dports/x11

Ryan Schmidt ryandesign at macports.org
Thu Apr 2 00:12:16 PDT 2009


On Mar 16, 2009, at 21:53, jeremyhu at macports.org wrote:

> Revision: 48220
>           http://trac.macports.org/changeset/48220
> Author:   jeremyhu at macports.org
> Date:     2009-03-16 19:53:23 -0700 (Mon, 16 Mar 2009)
> Log Message:
> -----------
> quartz-wm: New port
>
> Added Paths:
> -----------
>     trunk/dports/x11/quartz-wm/
>     trunk/dports/x11/quartz-wm/Portfile
>
> Added: trunk/dports/x11/quartz-wm/Portfile
> ===================================================================
> --- trunk/dports/x11/quartz-wm/Portfile	                         
> (rev 0)
> +++ trunk/dports/x11/quartz-wm/Portfile	2009-03-17 02:53:23 UTC  
> (rev 48220)
> @@ -0,0 +1,48 @@
> +# $Id: Portfile 46927 2009-02-17 23:02:35Z jeremyhu at macports.org $
> +
> +PortSystem 1.0
> +
> +name		quartz-wm
> +version		1.0.1
> +categories	x11
> +maintainers	jeremyhu openmaintainer
> +description     Apple's Window Manager for X11
> +homepage	http://xquartz.macosforge.org
> +platforms	macosx
> +long_description quartz-wm is Apple's closed source window-manager.
> +master_sites	${homepage}/downloads
> +
> +distfiles	quartz-wm-${version}-Tiger.bz2 quartz-wm-${version}- 
> Leopard.bz2

You should modify this to only download the Tiger or Leopard  
distfile, depending on whether the user is running Tiger or Leopard.  
No point making everyone download both files.

> +checksums           quartz-wm-1.0.1-Tiger.bz2 \
> +                    md5     2d1569514b280a36e54711f9f555f069 \
> +                    sha1     
> b5001813509089328e524ac6ce4470187b5e76c3 \
> +                    rmd160   
> 8e4652cd372d112f6f77126b68b35275dbae4c7a \
> +                    quartz-wm-1.0.1-Leopard.bz2 \
> +                    md5     91936d4f209bd68d8bddf7e761d62fcc \
> +                    sha1     
> b7ee7b307dc211af0a799030a809d5390e0a3331 \
> +                    rmd160  46c459115631460f8885a681d5248d693d4c774a
> +
> +use_bzip2	yes
> +
> +depends_lib     port:xorg-libXinerama \
> +                port:xorg-libAppleWM
> +
> +use_configure no
> +extract         {
> +	system "mkdir -p ${worksrcpath}"

You could use

xinstall -d ${worksrcpath}

or I believe

extract.mkdir yes


> +	file copy ${distpath}/quartz-wm-${version}-Tiger.bz2 ${worksrcpath}
> +	file copy ${distpath}/quartz-wm-${version}-Leopard.bz2 $ 
> {worksrcpath}
> +	system "cd ${worksrcpath} && bunzip2 quartz-wm-${version}- 
> Tiger.bz2 && bunzip2 quartz-wm-${version}-Leopard.bz2"
> +}
> +
> +build           { }
> +
> +destroot        {
> +	xinstall -d -m 755 ${destroot}${prefix}/bin
> +	if {[rpm-vercomp ${os.version} 9] < 0} {
> +		xinstall -m 755 ${worksrcpath}/quartz-wm-${version}-Tiger $ 
> {destroot}${prefix}/bin/quartz-wm
> +	} else {
> +		xinstall -m 755 ${worksrcpath}/quartz-wm-${version}-Leopard $ 
> {destroot}${prefix}/bin/quartz-wm
> +	}
> +}

Will the "Tiger" version work on Panther?
Will the "Leopard" version work on Snow Leopard?
If so, then the naming is confusing...
If not, then "platform darwin 8" and "platform darwin 9" blocks would  
be more appropriate, and you may want to add a pre-fetch block  
bailing out if the OS version won't work.



More information about the macports-dev mailing list