On Feb 1, 2009, at 02:36, Juan Manuel Palacios wrote:
Hey Ryan! A quick favor I wanted to ask you, if I may.
I just added the Portfile below to the repo, but my Portfile
writing skills are a bit rusty so I wanted to ask you, if I may, to
please give it a look and let me know if I made any obvious boo-
boos or if there's anything in it that could be achieved in a
simpler way.
Of course! I was just about to anyway. :)
Begin forwarded message:
From: [email protected]
Date: February 1, 2009 3:59:16 AM GMT-04:30
To: [email protected]
Subject: [46233] trunk/dports/math
Reply-To: [email protected], [email protected]
Revision
46233
Author
[email protected]
Date
2009-02-01 00:29:04 -0800 (Sun, 01 Feb 2009)
Log Message
New port: mapm 4.9.5, (yet another) arbitrary precision math
library in C.
Added Paths
trunk/dports/math/mapm/
trunk/dports/math/mapm/Portfile
Diff
Added: trunk/dports/math/mapm/Portfile (0 => 46233)
--- trunk/dports/math/mapm/Portfile (rev 0)
+++ trunk/dports/math/mapm/Portfile 2009-02-01 08:29:04 UTC (rev
46233)
@@ -0,0 +1,39 @@
+# $Id$
+
+PortSystem 1.0
+
+name mapm
+version 4.9.5
+categories math science
+platforms darwin
+maintainers [email protected]
+
+description A Portable Arbitrary Precision Math Library in C.
+long_description MAMP is a set of functions that allow the user \
+ to perform math to any level of accuracy that
is desired. \
+ The precision of a number is only limited by
'INT_MAX' \
+ and available memory.
+
+homepage http://www.tc.umn.edu/~ringx004/mapm-main.html
+master_sites http://www.tc.umn.edu/~ringx004
+checksums md5 a92ff86b6240f78f882661e0b1c11920 \
+ sha1 99dab13404ee30e7a830204da0a66cbae265a8b5 \
+ rmd160 f4e39962410ea4f9a0d85a3e07b7421e9795d6cb
+
+use_configure no
+
+worksrcdir ${name}_${version}
+build.cmd make -f makefile.osx
I think this would work better if you replace the build.cmd line with:
build.args -f makefile.osx
because we currently have the bug/feature that if build.cmd has a
space in it, then we never attempt to run the command through "nice";
that was the "fix" for #16091:
http://trac.macports.org/ticket/16091
+destroot {
+ copy ${worksrcpath}/m_apm.h ${destroot}${prefix}/include
+ copy ${worksrcpath}/libmapm.a ${destroot}${prefix}/lib
+ xinstall -d -m 755 ${destroot}${prefix}/share/${name}
+ copy ${worksrcpath}/DOCS ${destroot}${prefix}/share/${name}/
+ copy ${worksrcpath}/MULTI_THREAD ${destroot}${prefix}/share/$
{name}/
+ copy ${worksrcpath}/PI_DEMO ${destroot}${prefix}/share/${name}/
+ copy ${worksrcpath}/README ${destroot}${prefix}/share/${name}
+ foreach prog {calc primenum validate} {
+ copy ${worksrcpath}/$prog ${destroot}${prefix}/bin
+ }
+}
Docs should go in ${prefix}/share/doc/${name} (or perhaps ${prefix}/
share/doc/${name}-${version} -- there was a push for that last year
(or before?) but I'm not sure the justification was totally sound).
I tend to use "xinstall" in the destroot phase and "copy" in other
phases. There's not much difference, I think, in the outcome. But
using xinstall you can simplify the above to:
destroot {
xinstall -m 755 -W ${worksrcpath} \
calc primenum validate \
${destroot}${prefix}/bin
xinstall -m 644 -W ${worksrcpath} m_apm.h ${destroot}${prefix}/include
xinstall -m 644 -W ${worksrcpath} libmapm.a ${destroot}${prefix}/lib
xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}-${version}
xinstall -m 644 -W ${worksrcpath} \
DOCS MULTI_THREAD PI_DEMO README \
${destroot}${prefix}/share/doc/${name}-${version}
}
(Not tested; typos possible...)
If you do this change, since it causes the docs to go to a different
place, the revision should be incremented.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev