Index: files/patch-image.h
===================================================================
--- files/patch-image.h	(revision 94640)
+++ files/patch-image.h	(working copy)
@@ -1,10 +0,0 @@
---- image/image.h.orig	Wed Nov 12 11:07:35 2003
-+++ image/image.h	Wed Nov 12 11:07:49 2003
-@@ -182,6 +182,7 @@
- unsigned long doValToMemLSB();
- void          flipBits();
- 
-+#define	zopen	mgp_zopen
- ZFILE *zopen();
- int    zread();
- void   zreset();
Index: files/patch-config.guess
===================================================================
--- files/patch-config.guess	(revision 94640)
+++ files/patch-config.guess	(working copy)
@@ -1,12 +0,0 @@
---- config.guess.orig	Mon Jan  4 21:30:48 1999
-+++ config.guess	Wed Nov 12 11:06:57 2003
-@@ -51,6 +51,9 @@
- # Note: order is significant - the case branches are not exclusive.
- 
- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-+    *:Darwin:*:*)
-+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-+	exit 0 ;;
-     alpha:OSF1:V*:*)
- 	# After 1.2, OSF1 uses "V1.3" for uname -r.
- 	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
Index: files/patch-new.c
===================================================================
--- files/patch-new.c	(revision 94640)
+++ files/patch-new.c	(working copy)
@@ -1,11 +0,0 @@
---- image/new.c.orig	Wed Nov 12 11:08:13 2003
-+++ image/new.c	Wed Nov 12 11:08:20 2003
-@@ -11,7 +11,7 @@
- #include "copyright.h"
- #include "image.h"
- 
--#include <malloc.h>
-+#include <unistd.h>
- 
- extern int _Xdebug;
- extern void memoryExhausted(void);
Index: files/patch-parse.c
===================================================================
--- files/patch-parse.c	(revision 94640)
+++ files/patch-parse.c	(working copy)
@@ -1,11 +0,0 @@
---- parse.c.orig	Wed Jan 21 10:58:28 2004
-+++ parse.c	Wed Jan 21 10:58:38 2004
-@@ -848,7 +848,7 @@
- 	tmpint[2]->cti_value = DEFAULT_VGAP;
- 	tmpint[3] = ctlalloc1(CTL_QUALITY);
- 	tmpint[3]->cti_value = DEFAULT_BQUALITY;
--#ifdef XFT2
-+#ifdef USE_XFT2
- 	tmpint[4] = ctlalloc1(CTL_OPAQUE);
- 	tmpint[4]->cti_value = DEFAULT_OPAQUE;
- #endif
Index: files/patch-configure
===================================================================
--- files/patch-configure	(revision 94640)
+++ files/patch-configure	(working copy)
@@ -1,61 +1,60 @@
---- configure.orig	2003-05-28 15:34:23.000000000 +1000
-+++ configure	2011-08-21 10:57:46.000000000 +1000
-@@ -4940,9 +4940,9 @@
+--- configure.orig	2007-12-28 14:31:26.000000000 -0600
++++ configure	2012-06-25 17:59:26.000000000 -0500
+@@ -5703,9 +5703,9 @@
  _ACEOF
  
  else
--  echo "$as_me:$LINENO: checking for png_set_gray_1_2_4_to_8 in -lpng" >&5
--echo $ECHO_N "checking for png_set_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6
+-  { echo "$as_me:$LINENO: checking for png_set_gray_1_2_4_to_8 in -lpng" >&5
+-echo $ECHO_N "checking for png_set_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6; }
 -if test "${ac_cv_lib_png_png_set_gray_1_2_4_to_8+set}" = set; then
-+  echo "$as_me:$LINENO: checking for png_set_expand_gray_1_2_4_to_8 in -lpng" >&5
-+echo $ECHO_N "checking for png_set_expand_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6
++  { echo "$as_me:$LINENO: checking for png_set_expand_gray_1_2_4_to_8 in -lpng" >&5
++echo $ECHO_N "checking for png_set_expand_gray_1_2_4_to_8 in -lpng... $ECHO_C" >&6; }
 +if test "${ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_check_lib_save_LIBS=$LIBS
-@@ -4957,7 +4957,7 @@
+@@ -5723,11 +5723,11 @@
+ #ifdef __cplusplus
+ extern "C"
  #endif
- /* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
 -char png_set_gray_1_2_4_to_8 ();
 +char png_set_expand_gray_1_2_4_to_8 ();
- #ifdef F77_DUMMY_MAIN
- #  ifdef __cplusplus
-      extern "C"
-@@ -4967,7 +4967,7 @@
  int
  main ()
  {
--png_set_gray_1_2_4_to_8 ();
-+png_set_expand_gray_1_2_4_to_8 ();
+-return png_set_gray_1_2_4_to_8 ();
++return png_set_expand_gray_1_2_4_to_8 ();
    ;
    return 0;
  }
-@@ -4984,18 +4984,18 @@
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; }; then
+@@ -5750,21 +5750,21 @@
+ 	 test ! -s conftest.err
+        } && test -s conftest$ac_exeext &&
+        $as_test_x conftest$ac_exeext; then
 -  ac_cv_lib_png_png_set_gray_1_2_4_to_8=yes
 +  ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=yes
  else
    echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
--ac_cv_lib_png_png_set_gray_1_2_4_to_8=no
-+ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=no
+ sed 's/^/| /' conftest.$ac_ext >&5
+ 
+-	ac_cv_lib_png_png_set_gray_1_2_4_to_8=no
++	ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8=no
  fi
- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ 
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+       conftest$ac_exeext conftest.$ac_ext
  LIBS=$ac_check_lib_save_LIBS
  fi
--echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&5
--echo "${ECHO_T}$ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&6
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&5
+-echo "${ECHO_T}$ac_cv_lib_png_png_set_gray_1_2_4_to_8" >&6; }
 -if test $ac_cv_lib_png_png_set_gray_1_2_4_to_8 = yes; then
-+echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&5
-+echo "${ECHO_T}$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&5
++echo "${ECHO_T}$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8" >&6; }
 +if test $ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8 = yes; then
    LIBS="$LIBS -lpng -lz"
  			 cat >>confdefs.h <<\_ACEOF
  #define USE_PNG 1
-@@ -5647,7 +5647,7 @@
+@@ -6984,7 +6984,7 @@
  		echo 'FATAL: You need libungif to use gif images.  pass proper LIBS to configure.'
  		exit 1
  	fi
Index: files/patch-freetype.patch
===================================================================
--- files/patch-freetype.patch	(revision 94640)
+++ files/patch-freetype.patch	(working copy)
@@ -1,11 +0,0 @@
---- mgp.h.orig	2009-02-03 10:06:51.000000000 -0500
-+++ mgp.h	2009-02-03 10:07:18.000000000 -0500
-@@ -62,6 +62,8 @@
- #include <X11/cursorfont.h>
- #include <X11/Xatom.h>
- #ifdef USE_XFT2
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
- #include <freetype/freetype.h>
- #include <fontconfig/fontconfig.h>
- #include <X11/Xft/Xft.h>
Index: Portfile
===================================================================
--- Portfile	(revision 94640)
+++ Portfile	(working copy)
@@ -2,13 +2,14 @@
 PortSystem 1.0
 
 name		magicpoint
-version		1.10a
-revision	3
+version		1.13a
 categories	graphics
 maintainers	fenner
 homepage	http://www.mew.org/mgp/
-master_sites	http://cvs.fedoraproject.org/repo/dist/MagicPoint/magicpoint-1.10a.tar.gz/7a5d91b2b3bdabea704ee3cb6505d772/
-checksums	md5 7a5d91b2b3bdabea704ee3cb6505d772
+master_sites	http://pkgs.fedoraproject.org/repo/pkgs/MagicPoint/${distfiles}/ebc403982956e918ab327c54a90b44e0/
+checksums	md5     ebc403982956e918ab327c54a90b44e0 \
+		rmd160  067d7dee3b90ec354975d9ad4ea0c0df48cca191 \
+		sha256  205e6752e3cb024bcce0583b43dafc9b89490c0016daa91d2486891edcf2cfc1
 platforms	macosx darwin
 description	An X11 based presentation tool.
 long_description Magic Point is an X11 based presentation tool. It \
@@ -17,10 +18,6 @@
  typically .mgp) is just text so that you can create presentation \
  files quickly with your favorite editor (e.g. Emacs, vi).
 
-patchfiles	patch-config.guess patch-image.h patch-new.c patch-parse.c \
-		patch-default.mgp patch-configure patch-freetype.patch \
-		patch-image_png.c
-
 depends_build	port:pkgconfig \
 		port:imake
 
@@ -29,15 +26,19 @@
 		port:libpng \
 		path:include/gif_lib.h:giflib
 
+patchfiles	patch-configure \
+		patch-default.mgp \
+		patch-image_png.c
+
 universal_variant no
 
-# LOCALPREFIX= is for configure to find libungif.
+# LOCALPREFIX= is for configure to find giflib.
 configure.env	LOCALPREFIX=${prefix}
-configure.args	--enable-gif --mandir=${prefix}/share/man
+configure.args	--enable-gif
 
 post-configure {
 	# unusual port: uses not just autoconf but also Imake
-	system "cd \"${worksrcpath}\" && xmkmf && make Makefiles"
+	system -W ${worksrcpath} "${prefix}/bin/xmkmf && make Makefiles"
 }
 
 destroot.target	install install.man
@@ -52,3 +53,7 @@
         LIBDIR=${prefix}/lib/X11 \
         FONTDIR=${prefix}/lib/X11/fonts \
         MANPATH=${prefix}/share/man
+
+livecheck.type	regex
+livecheck.url	http://pkgs.fedoraproject.org/repo/pkgs/MagicPoint/
+livecheck.regex	${name}-(\[0-9a-z.\]+)${extract.suffix}
