[119200] trunk/dports/net/tftp-hpa

cal at macports.org cal at macports.org
Sun Apr 20 00:05:08 PDT 2014


Revision: 119200
          https://trac.macports.org/changeset/119200
Author:   cal at macports.org
Date:     2014-04-20 00:05:05 -0700 (Sun, 20 Apr 2014)
Log Message:
-----------
tftp-hpa: update to 5.2, closes #43256, #31740, maintainer timeout

Modified Paths:
--------------
    trunk/dports/net/tftp-hpa/Portfile

Added Paths:
-----------
    trunk/dports/net/tftp-hpa/files/
    trunk/dports/net/tftp-hpa/files/patch-tftpd-recvfrom.c.diff

Modified: trunk/dports/net/tftp-hpa/Portfile
===================================================================
--- trunk/dports/net/tftp-hpa/Portfile	2014-04-20 04:03:10 UTC (rev 119199)
+++ trunk/dports/net/tftp-hpa/Portfile	2014-04-20 07:05:05 UTC (rev 119200)
@@ -2,61 +2,65 @@
 
 PortSystem 1.0
 
-name		tftp-hpa
-version		0.48
-revision        2
-categories	net
-maintainers	markd
-description	Enhanced port of the BSD TFTP server
-platforms	darwin 
-long_description	tftp-hpa is an enhanced version of the BSD TFTP client \
-		and server,  possessing a number of bugfixes and enhancements \
-		over the  original. It has been made portable and will work on \
-		pretty much any modern Unix variant.
+name                tftp-hpa
+version             5.2
+categories          net
+maintainers         markd
+description         Enhanced port of the BSD TFTP server
+platforms           darwin
+long_description    tftp-hpa is an enhanced version of the BSD TFTP client \
+                    and server,  possessing a number of bugfixes and enhancements \
+                    over the  original. It has been made portable and will work on \
+                    pretty much any modern Unix variant.
+license             BSD
+homepage            http://www.kernel.org/pub/software/network/tftp/
+master_sites        ${homepage}/tftp-hpa/
+use_bzip2           yes
 
-homepage	http://www.kernel.org/pub/software/network/tftp/
-master_sites	${homepage}
-use_bzip2	yes
-checksums	md5 f2e0a1ca0c49ae46ecad26a54df3e887
+checksums           rmd160  dc3935af75f2919c55cac6c04b61488af425918c \
+                    sha256  0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269
 
-set tftp-root	${prefix}/var/${name}/
+patchfiles          patch-tftpd-recvfrom.c.diff
 
+depends_lib         port:readline port:ncurses
+
+set tftp-root    ${prefix}/var/${name}/
+
 variant enable_upload description {If invoked with the server variant, tftp uploads \
-	are enabled; without the server variant, this variant has no effect} {}
+    are enabled; without the server variant, this variant has no effect} {}
 
-startupitem.name	tftpd
+startupitem.name    tftpd
 
 variant server description {Install launchd scripts to run tftpd at system boot} {
-	startupitem.create	yes
-		if { ! [variant_isset enable_upload] } {
-			startupitem.executable	${prefix}/sbin/tftpd -L -s ${tftp-root}
-		} else {
-			startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
-		}
+    startupitem.create    yes
+        if { ! [variant_isset enable_upload] } {
+            startupitem.executable    ${prefix}/sbin/tftpd -L -s ${tftp-root}
+        } else {
+            startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
+        }
 }
 
-configure.args	--mandir=\\\${prefix}/share/man
+configure.args    --mandir=\\\${prefix}/share/man
 
-destroot.destdir	prefix=${destroot}${prefix}
+destroot.destdir    prefix=${destroot}${prefix}
 
-post-destroot	{ 
-	file rename ${destroot}${prefix}/sbin/in.tftpd \
-		${destroot}${prefix}/sbin/tftpd
+post-destroot    {
+    file rename ${destroot}${prefix}/sbin/in.tftpd \
+        ${destroot}${prefix}/sbin/tftpd
 
-	file delete ${destroot}${prefix}/share/man/man8/tftpd.8
-	file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
-		${destroot}${prefix}/share/man/man8/tftpd.8
+    file delete ${destroot}${prefix}/share/man/man8/tftpd.8
+    file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
+        ${destroot}${prefix}/share/man/man8/tftpd.8
 
-	reinplace "s|in.tftpd|tftpd|g" \
-		${destroot}${prefix}/share/man/man8/tftpd.8
+    reinplace "s|in.tftpd|tftpd|g" \
+        ${destroot}${prefix}/share/man/man8/tftpd.8
 
-	xinstall -m 777 -d ${tftp-root}
-	destroot.keepdirs ${tftp-root}
+    xinstall -m 777 -d ${tftp-root}
+    destroot.keepdirs ${tftp-root}
 }
 
 # tftp-ha setup instructions
-post-install {
-	ui_msg "\n
+notes "
 
 ***** Setup Instructions *****
 
@@ -64,14 +68,14 @@
       on all local addresses.
 
 To run tftpd manually for download only access, use this command:
-	sudo tftpd -L -s <tftp-root-dir>
+    sudo tftpd -L -s <tftp-root-dir>
 
 To run tftpd manually and support tftp uploads, add \"-c\" to the command:
-	sudo tftpd -L -c -s <tftp-root-dir>
+    sudo tftpd -L -c -s <tftp-root-dir>
 
 You may run tftpd at system boot using the startupitem if you installed tftp-hpa
 using the server variant.  To load the startupitem using launchctl:
-	sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
+    sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
 
 NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve
 in ${tftp-root}, because that is the location set in the StartupItem.
@@ -82,6 +86,5 @@
 file and replace the one installed by MacPorts in /Library/LaunchDaemons.  You
 may use /System/Library/LaunchDaemons/tftp.plist as a template.
 
-\n"
-}
+"
 

Added: trunk/dports/net/tftp-hpa/files/patch-tftpd-recvfrom.c.diff
===================================================================
--- trunk/dports/net/tftp-hpa/files/patch-tftpd-recvfrom.c.diff	                        (rev 0)
+++ trunk/dports/net/tftp-hpa/files/patch-tftpd-recvfrom.c.diff	2014-04-20 07:05:05 UTC (rev 119200)
@@ -0,0 +1,37 @@
+--- tftpd/recvfrom.c.orig	2011-12-11 17:13:52.000000000 -0500
++++ tftpd/recvfrom.c	2014-04-06 11:47:12.000000000 -0400
+@@ -17,6 +17,12 @@
+  *
+  */
+ 
++#if defined(__APPLE__)
++#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
++#define __APPLE_USE_RFC_3542 1
++#endif
++#endif
++
+ #include "config.h"             /* Must be included first! */
+ #include "common/tftpsubs.h"
+ #include "recvfrom.h"
+@@ -220,16 +226,18 @@
+                            sizeof(struct in6_addr));
+ #endif
+ 
+-#ifdef HAVE_STRUCT_IN6_PKTINFO
+                 if (cmptr->cmsg_level == IPPROTO_IPV6 &&
++#ifdef HAVE_STRUCT_IN6_PKTINFO
+                     (cmptr->cmsg_type == IPV6_RECVPKTINFO ||
+-                     cmptr->cmsg_type == IPV6_PKTINFO)) {
++#else
++                    (
++#endif
++                    cmptr->cmsg_type == IPV6_PKTINFO)) {
+                     memcpy(&pktinfo6, CMSG_DATA(cmptr),
+                            sizeof(struct in6_pktinfo));
+                     memcpy(&myaddr->s6.sin6_addr, &pktinfo6.ipi6_addr,
+                            sizeof(struct in6_addr));
+                 }
+-#endif
+             }
+ #endif
+         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140420/44adb495/attachment-0001.html>


More information about the macports-changes mailing list