[144427] trunk/dports/science/xtide/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Fri Jan 8 12:19:55 PST 2016


Revision: 144427
          https://trac.macports.org/changeset/144427
Author:   dstrubbe at macports.org
Date:     2016-01-08 12:19:55 -0800 (Fri, 08 Jan 2016)
Log Message:
-----------
xtide: Add new subport xtide-wvs for World Vector Shoreline data. Use less invasive xtide.conf method of specifying location of harmonic and WVS.

Modified Paths:
--------------
    trunk/dports/science/xtide/Portfile

Modified: trunk/dports/science/xtide/Portfile
===================================================================
--- trunk/dports/science/xtide/Portfile	2016-01-08 20:16:33 UTC (rev 144426)
+++ trunk/dports/science/xtide/Portfile	2016-01-08 20:19:55 UTC (rev 144427)
@@ -21,10 +21,13 @@
 
 set docdir              ${prefix}/share/doc/${subport}
 set harmonics_dir       ${prefix}/share/${name}/harmonics
+set wvs_dir             ${prefix}/share/${name}/wvs
+set conf_dir            ${prefix}/etc/${name}
+set conf_file           ${conf_dir}/xtide.conf
 
 if {${name} eq ${subport}} {
     categories          science x11
-    revision            1
+    revision            2
     license             GPL-3+
     master_sites-append http://pkgs.fedoraproject.org/repo/pkgs/${name}/${distfiles}/59de866e0684e123419d7a1c97ea23a5/
 
@@ -36,8 +39,9 @@
                         port:${name}-data
 
     post-extract {
-        # Make the default harmonics path conveniently point to our directory.
-        reinplace s|harmonics\\.tcd|${harmonics_dir}| ${worksrcpath}/libxtide/HarmonicsPath.cc
+        # Put config file path within MacPorts filesystem hierarchy, and reflect this in documentation.
+        reinplace -locale C -W ${worksrcpath} "s|/etc/xtide\\.conf|${conf_dir}/xtide\\.conf|g" \
+            libxtide/Global.cc tide.1 xtide.1 xttpd.8
     }
 
     # Per the configure script: "if using GCC, version 4.4 or later is required"
@@ -52,9 +56,46 @@
 
     default_variants-append +xwindows
 
+    # Set up config file to where xtide-data and xtide-wvs will put files.
+    post-destroot {
+        xinstall -d -m 755 ${destroot}${conf_dir}
+        system "echo '${harmonics_dir}\n${wvs_dir}' >> ${destroot}${conf_file}"
+    }
+
+    notes "You may optionally install the port xtide-wvs to enable plotting of the shorelines on the globe view."
+
     livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
 }
 
+subport ${name}-wvs {
+    categories          science
+    version             0
+    revision            0
+    license             public-domain
+    supported_archs     noarch
+
+    description         World Vector Shoreline data for XTide.
+
+    long_description    ${description}
+
+    worksrcdir
+    distname            wvs
+
+    checksums           rmd160  0e83b847efc635f18bd96cc5a29149d5af41dc4d \
+                        sha256  4e996ce2e608d612ba78e35cdf50c2c73b01fce06bd5b561a7fe957ea75d6d75
+
+    use_configure       no
+
+    build {}
+
+    destroot {
+        xinstall -d -m 755 ${destroot}${wvs_dir}
+        foreach wvsfile {wvs1.dat wvs12.dat wvs250k.dat wvs3.dat wvs43.dat wvsfull.dat} {
+            xinstall -m 644 -W ${workpath} ${wvsfile} ${destroot}${wvs_dir}
+        }
+    }
+}
+
 subport ${name}-data {
     categories          science
     version             20151227
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160108/d67a394e/attachment.html>


More information about the macports-changes mailing list