[128051] trunk/dports/mail/gnupg/Portfile

Ryan Schmidt ryandesign at macports.org
Wed Nov 12 02:32:36 PST 2014


On Nov 12, 2014, at 4:09 AM, Ryan Schmidt wrote:
> 
> On Nov 12, 2014, at 4:08 AM, Mihai Moldovan wrote:
> 
>> On 12.11.2014 09:02 am, Ryan Schmidt wrote:
>>> 
>>> There's no real need to copy the idea.c.gz distfile into the work directory, is there? You could decompress from its location in distpath.
>> 
>> The uncompressed idea.c is a source file used while building (or so it was
>> intended, I didn't take a close look if it's actually used yet.)
>> 
>> By any means, it has to be copied to the work dir at some point anyway, unless I
>> misunderstand your question?
> 
> The uncompressed idea.c file needs to be in the work directory. The compressed idea.c.gz file doesn't need to be copied there from the distpath.
> 

Also, why not put the post-extract variant into the variant to which it belongs?



Index: Portfile
===================================================================
--- Portfile	(revision 128055)
+++ Portfile	(working copy)
@@ -61,13 +61,10 @@
                   sha1   82fded4ec31b97b3b2dd22741880b67cfee40f84 \
                   rmd160 e35be5a031d10d52341ac5f029d28f811edd908d
     extract.only            ${distname}${extract.suffix}
-}
 
-post-extract {
-    if {[variant_isset idea]} {
-        copy ${distpath}/idea.c.gz ${worksrcpath}/cipher
+    post-extract {
         move ${worksrcpath}/cipher/idea.c ${worksrcpath}/cipher/idea.c.orig
-        system -W "${worksrcpath}/cipher" "gunzip -d idea.c.gz"
+        system "gzcat < ${distpath}/idea.c.gz > ${worksrcpath}/cipher/idea.c"
     }
 }
 





More information about the macports-dev mailing list