[40892] trunk/dports/sysutils/socat
raimue at macports.org
raimue at macports.org
Fri Oct 17 04:50:49 PDT 2008
Revision: 40892
http://trac.macports.org/changeset/40892
Author: raimue at macports.org
Date: 2008-10-17 04:50:48 -0700 (Fri, 17 Oct 2008)
Log Message:
-----------
sysutils/socat:
Update to 1.6.0.1, closes #16604 (maintainer timeout)
Modified Paths:
--------------
trunk/dports/sysutils/socat/Portfile
Added Paths:
-----------
trunk/dports/sysutils/socat/files/
trunk/dports/sysutils/socat/files/socat-1.6.0.1-mac-CL.diff
Modified: trunk/dports/sysutils/socat/Portfile
===================================================================
--- trunk/dports/sysutils/socat/Portfile 2008-10-17 08:06:27 UTC (rev 40891)
+++ trunk/dports/sysutils/socat/Portfile 2008-10-17 11:50:48 UTC (rev 40892)
@@ -2,7 +2,7 @@
PortSystem 1.0
name socat
-version 1.4.2.0
+version 1.6.0.1
categories sysutils net
maintainers md at hudora.de
platforms darwin
@@ -14,17 +14,23 @@
SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the \
GNU line editor (readline), a program, or a combination of two of these.
master_sites http://www.dest-unreach.org/socat/download/
-checksums md5 17694e6390f3488c5318a2cb18ec9919
-worksrcdir socat-1.4
+checksums md5 5a6a1d1e398d5c4d32fa6515baf477af \
+ sha1 39ed55df397cdf7d8adaa26a60c22ebe3a6c0f0e \
+ rmd160 b45bcfeb46009b89167bcce4a0d69cca1238f921
depends_lib port:readline
-configure.cflags-append "-L${prefix}/lib -lreadline"
+configure.ldflags-append "-L${prefix}/lib -lreadline"
+
+# This patch should not be necessary for later versions
+# taken from <http://www.dest-unreach.org/socat/contrib/socat-macos.html>
+# patches configure.in, requires autoconf
+patchfiles socat-1.6.0.1-mac-CL.diff
+patch.pre_args -p1
+use_autoconf yes
+
post-configure {
reinplace "s|\$(INSTALL) -m 644 socat.1 \$(DESTDIR)\$(MANDEST)/man1/|\$(INSTALL) -d -m 755 \$(DESTDIR)\$(MANDEST)/man1/\\\n\\\t\$(INSTALL) -m 644 socat.1 \$(DESTDIR)\$(MANDEST)/man1/|g" \
${worksrcpath}/Makefile
}
-post-destroot {
- file rename ${destroot}${prefix}/man/man1/socat.1 ${destroot}${prefix}/share/man/man1/socat.1
-}
platform darwin 9 {
configure.args-append --disable-termios
Added: trunk/dports/sysutils/socat/files/socat-1.6.0.1-mac-CL.diff
===================================================================
--- trunk/dports/sysutils/socat/files/socat-1.6.0.1-mac-CL.diff (rev 0)
+++ trunk/dports/sysutils/socat/files/socat-1.6.0.1-mac-CL.diff 2008-10-17 11:50:48 UTC (rev 40892)
@@ -0,0 +1,254 @@
+diff -ru socat-1.6.0.1/Makefile.in socat-1.6.0.1mac/Makefile.in
+--- socat-1.6.0.1/Makefile.in 2008-02-09 22:59:11.000000000 +0100
++++ socat-1.6.0.1mac/Makefile.in 2008-02-20 15:04:51.000000000 +0100
+@@ -15,6 +15,7 @@
+
+ BINDEST = @bindir@
+
++datarootdir = @datarootdir@
+ MANDEST = @mandir@
+
+ srcdir = @srcdir@
+@@ -124,13 +125,13 @@
+ strip: progs
+ strip $(PROGS)
+
+-install: progs doc/socat.1
++install: progs $(srcdir)/doc/socat.1
+ mkdir -p $(DESTDIR)$(BINDEST)
+ $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)
+ $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST)
+ $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST)
+ mkdir -p $(DESTDIR)$(MANDEST)/man1
+- $(INSTALL) -m 644 doc/socat.1 $(DESTDIR)$(MANDEST)/man1/
++ $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/
+
+ uninstall:
+ rm -f $(DESTDIR)$(BINDEST)/socat
+diff -ru socat-1.6.0.1/configure.in socat-1.6.0.1mac/configure.in
+--- socat-1.6.0.1/configure.in 2008-02-09 22:59:11.000000000 +0100
++++ socat-1.6.0.1mac/configure.in 2008-02-20 21:51:21.000000000 +0100
+@@ -55,13 +55,22 @@
+ AC_CHECK_HEADERS(pty.h)
+ AC_CHECK_HEADERS(netinet/in.h netinet/in_systm.h netinet/ip.h netinet/tcp.h)
+ AC_CHECK_HEADERS(netinet6/in6.h) # found on OpenBSD, used for IPV6_*
+-AC_CHECK_HEADERS(arpa/nameser.h resolv.h)
+-AC_CHECK_HEADERS(termios.h net/if.h linux/if_tun.h)
++AC_CHECK_HEADERS(net/if.h, [], [], [AC_INCLUDES_DEFAULT
++ #if HAVE_SYS_SOCKET_H
++ #include <sys/socket.h>
++ #endif]) # Mac OS X requires including sys/socket.h
++AC_CHECK_HEADERS(arpa/nameser.h)
++AC_HEADER_RESOLV()
++AC_CHECK_HEADERS(termios.h linux/if_tun.h)
+ AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
+ AC_CHECK_HEADERS(util.h libutil.h sys/stropts.h regex.h)
+ AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
+
+
++dnl Link libresolv if necessary (for Mac OS X)
++AC_SEARCH_LIBS([res_9_init], [resolv])
++
++
+ dnl Check for extra socket library (for Solaris)
+ AC_CHECK_FUNC(hstrerror, , AC_CHECK_LIB(resolv, hstrerror, [LIBS="$LIBS -lresolv"; AC_DEFINE(HAVE_HSTRERROR)]))
+ AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
+@@ -185,7 +194,11 @@
+ if test "$WITH_IP6"; then
+ AC_CHECK_HEADERS([netinet/ip6.h],
+ [AC_DEFINE(HAVE_NETINET_IP6_H) AC_DEFINE(WITH_IP6)],
+- [AC_MSG_WARN([include file netinet/ip6.h not found, disabling IP6])])
++ [AC_MSG_WARN([include file netinet/ip6.h not found, disabling IP6])],
++ [AC_INCLUDES_DEFAULT
++ #ifdef HAVE_NETINET_IN_H
++ # include <netinet/in.h>
++ #endif])
+ fi
+
+ AC_MSG_CHECKING(whether to include raw IP support)
+@@ -284,93 +297,56 @@
+ esac],
+ [AC_MSG_RESULT(yes); WITH_READLINE=1 ])
+
+-# check if we find the components of GNU readline
+ if test -n "$WITH_READLINE"; then
+- # first, we need to find the include file <readline.h>
+- AC_MSG_NOTICE(checking for components of readline)
+- #AC_CHECK_HEADERS(readline/readline.h readline/history.h)
+- AC_CACHE_VAL(sc_cv_have_readline_h,
+- [AC_TRY_COMPILE([#include <stdio.h> /* FreeBSD needs "FILE *" */
+-#include <readline/readline.h>
+-#include <readline/history.h>],[;],
+- [sc_cv_have_readline_h=yes; READLINE_ROOT=""; ],
+- [sc_cv_have_readline_h=no
+- for D in "/sw" "/usr/local" "/opt/freeware" "/usr/sfw"; do
+- I="$D/include"
+- i="$I/readline/readline.h"
+- if test -r "$i"; then
+- #V_INCL="$V_INCL -I$I/"
+- CPPFLAGS="$CPPFLAGS -I$I"
+- AC_MSG_NOTICE(found $i)
+- sc_cv_have_readline_h=yes; READLINE_ROOT="$D"
+- break;
+- fi
+- done])
+- ])
+- if test "$sc_cv_have_readline_h" = "yes"; then
+- AC_DEFINE(HAVE_READLINE_READLINE_H)
+- AC_DEFINE(HAVE_READLINE_HISTORY_H)
+- fi
+- AC_MSG_NOTICE(checked for readline.h... $sc_cv_have_readline_h)
+-fi # end checking for readline.h
+-#
+-if test -n "$WITH_READLINE" -a "$sc_cv_have_readline_h" = yes; then
+- # next, we search for the readline library (libreadline.*)
+- AC_MSG_CHECKING(for libreadline)
+- AC_CACHE_VAL(sc_cv_have_libreadline,
+- [ LIBS0="$LIBS"
+- if test -n "$READLINE_ROOT"; then
+- L="$READLINE_ROOT/lib"; LIBS="$LIBS0 -L$L -lreadline"
+- else
+- LIBS="$LIBS0 -lreadline"
+- fi
+- AC_TRY_LINK([#include <stdio.h> /* FreeBSD needs FILE * */
+-#include <readline/readline.h>
+-#include <readline/history.h>],
+- [readline(NULL)],
+- [sc_cv_have_libreadline='yes'],
+- [sc_cv_have_libreadline='no'
+- LIBS1="$LIBS"
+- LIBS="$LIBS -lcurses"
+- AC_TRY_LINK([#include <stdio.h> /* FreeBSD needs FILE * */
+-#include <readline/readline.h>
+-#include <readline/history.h>],
+- [readline(NULL)],
+- [sc_cv_have_libreadline='yes'],
+- [sc_cv_have_libreadline='no'
+- LIBS="$LIBS1 -lncurses" # eg for SuSE52
+- AC_TRY_LINK([#include <stdio.h> /* FreeBSD needs FILE * */
+-#include <readline/readline.h>
+-#include <readline/history.h>],
+- [readline(NULL)],
+- [sc_cv_have_libreadline='yes'],
+- [sc_cv_have_libreadline='no'])
+- ])]
+- )
+- if test "$sc_cv_have_libreadline" != 'yes'; then
+- LIBS="$LIBS0"
+- fi
+- ]
+-#! missing libcurses dependency; missing freeware places
+-# # we test if libcurses is available and if it can be used without further libs
+-# AC_CHECK_LIB(ncurses, main, , AC_CHECK_LIB(curses, main)) # some Linux work with this
+-# # we test if readline can be used without further libs
+-# AC_CHECK_LIB(readline, readline)
+-# # we see if using_history() is already in $LIBS; if not, we try it with curses
+-# AC_CHECK_FUNC(using_history, , AC_CHECK_LIB(history, using_history,,, -lcurses))
+-#fi
+- )
+- if test "$sc_cv_have_libreadline" = 'yes'; then
+- AC_DEFINE(HAVE_LIBREADLINE)
+- fi
+- AC_MSG_RESULT($sc_cv_have_libreadline)
+-fi
+-#
+-if test -n "$WITH_READLINE"; then
+- if test "$sc_cv_have_readline_h" = "yes" -a "$sc_cv_have_libreadline" = "yes"; then
+- AC_DEFINE(WITH_READLINE)
+- else
+- AC_MSG_WARN([not all components of readline found, disabling it]);
++ CPPFLAGS_ORIG=$CPPFLAGS
++ CFLAGS_ORIG=$CFLAGS
++ LIBS_ORIG=$LIBS
++ sc_usable_readline_found=
++
++ for D in "" "/usr/local" "/opt/local" "/sw" "/opt/freeware" "/usr/sfw"; do
++ if test -n "$D" ; then
++ CPPFLAGS="$CPPFLAGS -I$D/include"
++ CFLAGS="$CFLAGS -L$D/lib"
++ DLOC="in location $D"
++ else
++ DLOC="in default location"
++ fi
++ AC_MSG_CHECKING(for usable readline $DLOC)
++
++ # Some systems require -lcurses, some require -lncurses.
++ # Mac OS X 10.4 (and others) ships with libedit masquerading as readline,
++ # but it doesn't work well with socat. It can be recognized by the absence
++ # of append_history.
++
++ for L in "" "-lcurses" "-lncurses"; do
++ LIBS="$LIBS_ORIG -lreadline $L"
++ AC_TRY_LINK(
++ [ #include <stdio.h>
++ #include <readline/readline.h>
++ #include <readline/history.h>],
++ [ readline(NULL);
++ append_history(0, NULL); ],
++ [ sc_usable_readline_found=1
++ break ])
++ done
++
++ if test -n "$sc_usable_readline_found"; then
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_READLINE_READLINE_H,1)
++ AC_DEFINE(HAVE_READLINE_HISTORY_H,1)
++ AC_DEFINE(HAVE_LIBREADLINE,1)
++ AC_DEFINE(WITH_READLINE,1)
++ break
++ else
++ AC_MSG_RESULT(no)
++ CPPFLAGS=$CPPFLAGS_ORIG
++ CFLAGS=$CFLAGS_ORIG
++ LIBS=$LIBS_ORIG
++ fi
++ done
++
++ if test -z "$sc_usable_readline_found"; then
++ AC_MSG_WARN([no suitable version of readline found; perhaps you need to install a newer version])
+ fi
+ fi
+
+diff -ru socat-1.6.0.1/test.sh socat-1.6.0.1mac/test.sh
+--- socat-1.6.0.1/test.sh 2008-02-09 22:59:11.000000000 +0100
++++ socat-1.6.0.1mac/test.sh 2008-02-20 22:19:20.000000000 +0100
+@@ -83,6 +83,7 @@
+ OpenBSD)IFCONFIG=/sbin/ifconfig ;;
+ OSF1) IFCONFIG=/sbin/ifconfig ;;
+ SunOS) IFCONFIG=/sbin/ifconfig ;;
++Darwin)IFCONFIG=/sbin/ifconfig ;;
+ #*) IFCONFIG=/sbin/ifconfig ;;
+ esac
+
+@@ -140,7 +141,7 @@
+ PRINTF="printf"
+
+ case "$TERM" in
+-vt100|vt320|linux|xterm|cons25|dtterm|aixterm|sun-color)
++vt100|vt320|linux|xterm|cons25|dtterm|aixterm|sun-color|xterm-color)
+ # there are different behaviours of printf (and echo)
+ # on some systems, echo behaves different than printf...
+ if [ $($PRINTF "\0101") = "A" ]; then
+@@ -1594,6 +1595,7 @@
+ OpenBSD)l=$($IFCONFIG -a |fgrep 'inet 127.0.0.1 ');;
+ OSF1) l=$($IFCONFIG -a |grep ' inet ') ;;
+ SunOS) l=$($IFCONFIG -a |grep 'inet ') ;;
++ Darwin)l=$($IFCONFIG lo0 |fgrep 'inet 127.0.0.1 ') ;;
+ # *) l=$($IFCONFIG -a |grep ' ::1[^:0-9A-Fa-f]') ;;
+ esac
+ [ -z "$l" ] && return 1
+@@ -1619,12 +1621,13 @@
+ NetBSD)l=$(/sbin/ifconfig -a |grep 'inet6 ::1 ');;
+ OSF1) l=$(/sbin/ifconfig -a |grep ' inet6 ') ;;
+ SunOS) l=$(/sbin/ifconfig -a |grep 'inet6 ') ;;
++ Darwin)l=$(/sbin/ifconfig lo0 |grep 'inet6 ::1 ') ;;
+ *) l=$(/sbin/ifconfig -a |grep ' ::1[^:0-9A-Fa-f]') ;;
+ esac
+ [ -z "$l" ] && return 1
+ # existence of interface might not suffice, check for routeability:
+ case "$UNAME" in
+- Darwin) ping -c 1 ::1; l="$?" ;;
++ Darwin) ping6 -c 1 ::1; l="$?" ;;
+ Linux) ping6 -c 1 ::1; l="$?" ;;
+ *) if [ -n "$l" ]; then l=0; else l=1; fi ;;
+ esac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081017/0c9c8ee7/attachment.html
More information about the macports-changes
mailing list