[114196] trunk/dports/x11/xtide

ryandesign at macports.org ryandesign at macports.org
Sun Dec 1 20:12:21 PST 2013


Revision: 114196
          https://trac.macports.org/changeset/114196
Author:   ryandesign at macports.org
Date:     2013-12-01 20:12:21 -0800 (Sun, 01 Dec 2013)
Log Message:
-----------
xtide: update to 2.13.2; add an upstream patch for clang compatibility; break out the harmonics data into its own xtide-data port; remove maintainer at his request; see #41460

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

Added Paths:
-----------
    trunk/dports/x11/xtide/files/
    trunk/dports/x11/xtide/files/patch-configure.ac.diff

Modified: trunk/dports/x11/xtide/Portfile
===================================================================
--- trunk/dports/x11/xtide/Portfile	2013-12-02 02:40:07 UTC (rev 114195)
+++ trunk/dports/x11/xtide/Portfile	2013-12-02 04:12:21 UTC (rev 114196)
@@ -3,13 +3,10 @@
 PortSystem 1.0
 
 name					xtide
-version					2.11
-revision				1
-
+version                 2.13.2
 categories				x11 science
 platforms				darwin
-license                 GPL-3+
-maintainers				jberry openmaintainer
+maintainers             nomaintainer
 
 description				Tide prediction software, with a large database of locations.
 long_description		XTide is a package that provides tide and current predictions \
@@ -17,47 +14,78 @@
 						can be generated, or a tide clock can be provided on your desktop. \
 						For x11, plain command line, and as an http server.
 
+use_bzip2               yes
 homepage                http://www.flaterco.com/xtide/
 master_sites            ftp://ftp.flaterco.com/xtide/
-use_bzip2				yes
 
-set harmonics_version	20110410
-set harmonics_file		harmonics-dwf-${harmonics_version}-free.tar.bz2
+set docdir              ${prefix}/share/doc/${subport}
+set harmonics_dir       ${prefix}/share/${name}/harmonics
 
-distfiles-append		${harmonics_file}
-checksums				${distname}${extract.suffix} \
-                            md5 1d85890bb13b3345154e0f68831b7ebd \
-                            sha1 6f2386ba0e6e1df0d304d3ef037317462d9cc24d \
-                            rmd160 8c302774f244e958de529653a903d9be2f45b07b \
-						${harmonics_file} \
-						    md5 985c2f69eea343782142fa459fc34128 \
-						    sha1 9a33ade09c5ba0a6db007adb4075f7b1475b1130 \
-						    rmd160 43a788ce9864236d45087ba6ba0a9c6b8287c07d
+if {${name} eq ${subport}} {
+    license             GPL-3+
+    master_sites-append http://pkgs.fedoraproject.org/repo/pkgs/${name}/${distfiles}/59de866e0684e123419d7a1c97ea23a5/
 
-depends_lib				port:libpng port:libtcd port:xorg-libXaw
+    checksums           rmd160  1a6cb8885fb71361cc7ce035186a6ac627a9cb0d \
+                        sha256  fabf6b3097bb345598649ea55d1f2db269cbb651cddd73c60a9768088173d542
 
-post-patch {
-	# Make the default harmonics path conveniently point to our directory
-	reinplace s|harmonics.tcd|${prefix}/share/${name}/harmonics| ${worksrcpath}/HarmonicsPath.cc
-}
+    depends_lib         port:libpng \
+                        port:libtcd \
+                        port:xorg-libXaw \
+                        port:${name}-data
 
-post-destroot {
-	xinstall -d -m 755 ${destroot}${prefix}/share/${name}/harmonics \
-	                   ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 644 ${workpath}/harmonics-dwf-${harmonics_version}-free.tcd ${destroot}${prefix}/share/${name}/harmonics
-    xinstall -m 644 ${workpath}/harmonics_boilerplate.txt ${destroot}${prefix}/share/doc/${name}
+    patchfiles          patch-configure.ac.diff
+
+    post-patch {
+        # Make the default harmonics path conveniently point to our directory.
+        reinplace s|harmonics\\.tcd|${harmonics_dir}| ${worksrcpath}/HarmonicsPath.cc
+    }
+
+    # Per the configure script: "if using GCC, version 4.4 or later is required"
+    compiler.blacklist  gcc-* apple-gcc-* macports-gcc-4.2 macports-gcc-4.3
+
+    # Regenerate configure after patching configure.ac for clang compatibility.
+    use_autoreconf      yes
+
+    livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
 }
 
-notes "
+subport ${name}-data {
+    version             20121224
+    supported_archs     noarch
+
+    description         Harmonics data for XTide.
+
+    long_description    ${description}
+
+    worksrcdir          harmonics-dwf-${version}
+    distname            ${worksrcdir}-free
+    master_sites-append http://pkgs.fedoraproject.org/repo/pkgs/${name}/${distfiles}/f9a8c5414aa14bd6b08d1be4e6a3eea7/
+
+    checksums           rmd160  40ef64cff50ddcaf91b8648441a12ce2c6b07734 \
+                        sha256  d80d7e99181c60a42660392abbe25789c395453dd88944c41dc19c7f4b0f11be
+
+    use_configure       no
+
+    build {}
+
+    destroot {
+        xinstall -d -m 755 ${destroot}${harmonics_dir} ${destroot}${docdir}
+        xinstall -m 644 -W ${worksrcpath} ${distname}.tcd ${destroot}${harmonics_dir}
+        xinstall -m 644 -W ${worksrcpath} COPYING ChangeLog ${destroot}${docdir}
+    }
+
+    livecheck.regex     harmonics-dwf-(\[0-9\]+)-free${extract.suffix}
+
+    notes "
 Only public domain harmonics for the United States are included in this port.\
 Additional harmonics licensed for non-commercial use only can be downloaded\
 from
 
-[lindex ${master_sites} 0]harmonics-dwf-20110410-nonfree.tar.bz2
+[lindex ${master_sites} 0]harmonics-dwf-20111230-nonfree${extract.suffix}
 
-and extracted into ${prefix}/share/${name}/harmonics to make them available to ${name}.
+and extracted into ${harmonics_dir} to make them available to ${name}.
 "
+}
 
 livecheck.type          regex
 livecheck.url           ${homepage}files.html
-livecheck.regex         ${name}-(\[0-9.\]+)${extract.suffix}

Added: trunk/dports/x11/xtide/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/x11/xtide/files/patch-configure.ac.diff	                        (rev 0)
+++ trunk/dports/x11/xtide/files/patch-configure.ac.diff	2013-12-02 04:12:21 UTC (rev 114196)
@@ -0,0 +1,54 @@
+--- configure.ac.orig	2013-07-19 21:31:17.000000000 -0500
++++ configure.ac	2013-11-28 20:14:11.000000000 -0600
+@@ -23,14 +23,17 @@
+ AC_SUBST([ADDED_CXXFLAGS])
+ 
+ # Extended initializer lists were added in 4.4.
++# Clang fraudulently identifies itself as an old GCC.
+ AC_MSG_CHECKING([if using a version of GCC older than 4.4])
+ AC_PREPROC_IFELSE(
+   [AC_LANG_SOURCE([[
++#ifndef __clang__
+ #ifdef __GNUC__
+ #if (__GNUC__ * 100 + __GNUC_MINOR__) < 404
+ #FAIL
+ #endif
+ #endif
++#endif
+   ]])],
+   [
+     AC_MSG_RESULT(no)
+@@ -107,7 +110,7 @@
+   [
+     AC_MSG_RESULT(no)
+     AC_MSG_CHECKING([if it helps to add -std=gnu++0x to CXXFLAGS])
+-    CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"
++    CXXFLAGS="-std=gnu++0x ${SAVED_CXXFLAGS}"
+     AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM([[#include <vector>]],
+ 		       [[std::vector<int> test = {1}]])],
+@@ -117,8 +120,22 @@
+       ],
+       [
+ 	AC_MSG_RESULT(no)
+-        AC_DEFINE(NO_INITIALIZER_LISTS)
+-        SKIP_COMPLICATED=1
++        # Clang needs -std=c++11 instead
++	AC_MSG_CHECKING([if it helps to add -std=c++11 to CXXFLAGS])
++	CXXFLAGS="-std=c++11 ${SAVED_CXXFLAGS}"
++	AC_COMPILE_IFELSE(
++	  [AC_LANG_PROGRAM([[#include <vector>]],
++			   [[std::vector<int> test = {1}]])],
++	  [
++	    AC_MSG_RESULT(yes)
++	    ADDED_CXXFLAGS="${ADDED_CXXFLAGS} -std=c++11"
++	  ],
++	  [
++	    AC_MSG_RESULT(no)
++	    AC_DEFINE(NO_INITIALIZER_LISTS)
++	    SKIP_COMPLICATED=1
++	  ]
++	)
+       ]
+     )
+   ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131201/8dd52bc4/attachment-0001.html>


More information about the macports-changes mailing list