diff -ruN gnokii.old/Makefile gnokii/Makefile
--- gnokii.old/Makefile	Sat Jun  9 11:24:10 2007
+++ gnokii/Makefile	Wed Jun 27 14:15:35 2007
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	gnokii
-PORTVERSION=	0.6.14
-PORTREVISION=	1
+PORTVERSION=	0.6.17
 PORTEPOCH=	1
 CATEGORIES=	comms
 MASTER_SITES=	http://www.gnokii.org/download/gnokii/ \
@@ -28,7 +27,7 @@
 		CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include -fPIC" \
 		LIBS="-L../common -L${LOCALBASE}/lib"
 
-MAN1=		gnokii.1 todologo.1 ppm2nokia.1 sendsms.1
+MAN1=		gnokii.1 sendsms.1
 MAN8=		gnokiid.8 mgnokiidev.8
 PORTDOCS=	*
 
diff -ruN gnokii.old/distinfo gnokii/distinfo
--- gnokii.old/distinfo	Sat Jun  9 11:24:10 2007
+++ gnokii/distinfo	Wed Jun 27 14:16:09 2007
@@ -1,3 +1,3 @@
-MD5 (gnokii-0.6.14.tar.bz2) = 89449d613c7a7e765a0d8da57ef1bb88
-SHA256 (gnokii-0.6.14.tar.bz2) = cea63cddf79864d306198c7a84091af0b4685816b352ae253a3e2bfac5e67cb7
-SIZE (gnokii-0.6.14.tar.bz2) = 1546845
+MD5 (gnokii-0.6.17.tar.bz2) = 42b78d30e9eff4de9cfa20a54ead1818
+SHA256 (gnokii-0.6.17.tar.bz2) = f16ab192c72161f99473f2644e2afa9e31c7702b2544b5595231213e26a90f6c
+SIZE (gnokii-0.6.17.tar.bz2) = 1739452
diff -ruN gnokii.old/files/patch-Makefile.global.in gnokii/files/patch-Makefile.global.in
--- gnokii.old/files/patch-Makefile.global.in	Sat Jun  9 11:24:10 2007
+++ gnokii/files/patch-Makefile.global.in	Thu Jun 21 23:18:40 2007
@@ -1,5 +1,5 @@
---- Makefile.global.in.orig	Wed May 18 15:08:43 2005
-+++ Makefile.global.in	Wed May 18 15:11:40 2005
+--- Makefile.global.in.orig	Thu May 10 20:50:16 2007
++++ Makefile.global.in	Thu Jun 21 23:18:13 2007
 @@ -21,14 +21,14 @@
  
  bindir         = @bindir@
@@ -14,7 +14,7 @@
  man1dir        = ${mandir}/man1/
  man8dir        = ${mandir}/man8/
 -xmandir        = @XGNOKIIDIR@/man/man1/
-+xmandir        = ${prefix}/man/man1/
++xmandir        = ${mandir}/man1/
  docdir         = ${prefix}/share/doc/${PACKAGE}
  locdir         = @datadir@/locale
- 
+ datadir        = @datadir@
diff -ruN gnokii.old/files/patch-configure gnokii/files/patch-configure
--- gnokii.old/files/patch-configure	Sat Jun  9 11:24:10 2007
+++ gnokii/files/patch-configure	Thu Jun 21 23:16:56 2007
@@ -1,50 +1,59 @@
---- configure.orig	Fri Apr 29 22:40:40 2005
-+++ configure	Thu May  5 14:20:32 2005
-@@ -26347,13 +26347,15 @@
+--- configure.orig	Thu May 10 20:50:32 2007
++++ configure	Thu Jun 21 23:16:04 2007
+@@ -976,7 +976,7 @@
+ psdir='${docdir}'
+ libdir='${exec_prefix}/lib'
+ localedir='${datarootdir}/locale'
+-mandir='${datarootdir}/man'
++mandir='${prefix}/man'
+ 
+ ac_prev=
+ ac_dashdash=
+@@ -26321,13 +26321,15 @@
  # First of all, check if the user has set any of the PTHREAD_LIBS,
  # etcetera environment variables, and if threads linking works using
  # them:
 -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-+if test x"%%PTHREAD_LIBS%%%%PTHREAD_CFLAGS%%" != x; then
-+	PTHREAD_CFLAGS="%%PTHREAD_CFLAGS%%"
-+	PTHREAD_LIBS="%%PTHREAD_LIBS%%"
++if test x"-pthread" != x; then
++	PTHREAD_CFLAGS=""
++	PTHREAD_LIBS="-pthread"
          save_CFLAGS="$CFLAGS"
 -        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+        CFLAGS="$CFLAGS %%PTHREAD_CFLAGS%%"
++        CFLAGS="$CFLAGS "
          save_LIBS="$LIBS"
 -        LIBS="$PTHREAD_LIBS $LIBS"
--        echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
--echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
-+        LIBS="%%PTHREAD_LIBS%% $LIBS"
-+        echo "$as_me:$LINENO: checking for pthread_join in LIBS=%%PTHREAD_LIBS%% with CFLAGS=%%PTHREAD_CFLAGS%%" >&5
-+echo $ECHO_N "checking for pthread_join in LIBS=%%PTHREAD_LIBS%% with CFLAGS=%%PTHREAD_CFLAGS%%... $ECHO_C" >&6
+-        { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+-echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
++        LIBS="-pthread $LIBS"
++        { echo "$as_me:$LINENO: checking for pthread_join in LIBS=-pthread with CFLAGS=" >&5
++echo $ECHO_N "checking for pthread_join in LIBS=-pthread with CFLAGS=... $ECHO_C" >&6; }
          cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
-@@ -26725,7 +26727,7 @@
- echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
+@@ -26691,7 +26693,7 @@
+ echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
          flag=no
          case "${host_cpu}-${host_os}" in
 -                *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
 +                *-aix* | *-darwin*) flag="-D_THREAD_SAFE";;
                  *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
          esac
-         echo "$as_me:$LINENO: result: ${flag}" >&5
-@@ -27569,7 +27571,7 @@
- USE_LIBICAL="no"
- OLD_LIBS="$LIBS"
- OLD_CFLAGS="$CFLAGS"
--LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
-+LIBS="$LIBS $ICAL_LIBS -L/usr/local %%PTHREAD_LIBS%% -lical"
- CFLAGS="$CFLAGS $ICAL_CFLAGS"
- echo "$as_me:$LINENO: checking whether libical is installed" >&5
- echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6
-@@ -29111,7 +29113,7 @@
- echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&5
- echo "${ECHO_T}$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6
+         { echo "$as_me:$LINENO: result: ${flag}" >&5
+@@ -27495,7 +27497,7 @@
+ 
+ if test "$enable_libical" == "yes"; then
+ 	OLD_CFLAGS="$CFLAGS"
+-	LIBS="$LIBS $ICAL_LIBS -lpthread -lical"
++	LIBS="$LIBS $ICAL_LIBS -pthread -lical"
+ 	CFLAGS="$CFLAGS $ICAL_CFLAGS"
+ 	{ echo "$as_me:$LINENO: checking whether libical is installed" >&5
+ echo $ECHO_N "checking whether libical is installed... $ECHO_C" >&6; }
+@@ -29039,7 +29041,7 @@
+ { echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&5
+ echo "${ECHO_T}$ac_cv_lib_Xpm_XpmWriteFileFromXpmImage" >&6; }
  if test $ac_cv_lib_Xpm_XpmWriteFileFromXpmImage = yes; then
 -   XPM_CFLAGS="$XINCL" XPM_LIBS="-L$x_libraries -lXpm -lX11"
 +   XPM_CFLAGS="$XINCL" XPM_LIBS="-L$x_libraries -lXpm -lX11 -lroken -lcrypt"
-               cat >>confdefs.h <<\_ACEOF
+                   cat >>confdefs.h <<\_ACEOF
  #define XPM 1
  _ACEOF
diff -ruN gnokii.old/files/patch-gnokii-gnokii-security.c gnokii/files/patch-gnokii-gnokii-security.c
--- gnokii.old/files/patch-gnokii-gnokii-security.c	Thu Jan  1 01:00:00 1970
+++ gnokii/files/patch-gnokii-gnokii-security.c	Thu Jun 21 11:56:44 2007
@@ -0,0 +1,17 @@
+--- gnokii/gnokii-security.c.orig	Thu May 10 20:50:16 2007
++++ gnokii/gnokii-security.c	Thu Jun 21 11:56:13 2007
+@@ -131,12 +131,14 @@
+ 
+ 	if (isatty(fd)) {
+ 		strncpy(pass, getpass(prompt), length - 1);
++/*		FreeBSD uses standard C library, no getline, sorry.
+ 	} else {
+ 		err = getline(&s, &s_len, stdin);
+ 		if (err > 0 && s) {
+ 			strncpy(pass, s, length - 1);
+ 			free(s);
+ 		}
++*/
+ 	}
+ 	pass[length - 1] = 0;
+ #endif
diff -ruN gnokii.old/pkg-plist gnokii/pkg-plist
--- gnokii.old/pkg-plist	Sat Jun  9 11:24:10 2007
+++ gnokii/pkg-plist	Fri Jun 22 00:30:18 2007
@@ -1,8 +1,5 @@
 bin/gnokii
-bin/ppm2nokia
 bin/sendsms
-bin/todologo
-bin/waitcall
 %%X11%%bin/xgnokii
 etc/gnokiirc.sample
 include/gnokii.h
@@ -23,7 +20,7 @@
 lib/libgnokii.a
 lib/libgnokii.la
 lib/libgnokii.so
-lib/libgnokii.so.3
+lib/libgnokii.so.4
 libdata/pkgconfig/gnokii.pc
 libdata/pkgconfig/xgnokii.pc
 sbin/gnokiid
