Index: Portfile
===================================================================
--- Portfile	(revision 163489)
+++ Portfile	(working copy)
@@ -1,8 +1,12 @@
 PortSystem		1.0
 
 name			freepops
-version			0.0.18
-revision        3
+version             0.2.9
+revision            0
+checksums           rmd160  c473bd9a523f7bc30dbcfa30c0f1e58418301d24 \
+                    sha256  3a065e30cafed03d9b6fdb28251ae5bf0d8aeb62181746154beecd25dc0c9cae \
+                    size    2065288
+
 categories		mail
 license			GPL-2
 maintainers		nomaintainer
@@ -16,8 +20,7 @@
 					is possible to get all your messages in your \
 					favourite email client.
 homepage		http://freepops.sourceforge.net/en/
-master_sites	sourceforge
-checksums		md5 71268cb9b05549be3db271014bcea5ca
+master_sites        sourceforge:project/freepops/freepops/${version}
 platforms		darwin
 
 depends_lib		port:curl \
@@ -26,7 +29,7 @@
 
 patchfiles		patch-darwin
 
-pre-configure {
+post-patch {
 	file copy ${filespath}/${name}.sh.in ${worksrcpath}/${name}.sh
 	reinplace "s%@PREFIX@%${prefix}%g" \
 		${worksrcpath}/${name}.sh \
@@ -33,16 +36,18 @@
 		${worksrcpath}/doc/freepopsd.1 \
 		${worksrcpath}/src/freepops.h \
 		${worksrcpath}/src/lua/freepops.lua
-	reinplace "s|@ARCHFLAGS@|${configure.cc_archflags}|" \
-	    ${worksrcpath}/configure.sh
 }
+
+configure.env       WHERE=${prefix}
 configure.cmd		./configure.sh
 configure.pre_args	osx
+configure.universal_args-delete --disable-dependency-tracking
 
 use_parallel_build  no
-build.args			WHERE=${prefix}/ \
-                    H=
 
+# Disable silent rules
+build.args          H=
+
 destroot.args		${build.args}
 post-destroot {
 	xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d
Index: files/patch-darwin
===================================================================
--- files/patch-darwin	(revision 163489)
+++ files/patch-darwin	(working copy)
@@ -1,43 +1,59 @@
-diff -ur ../freepops-0.0.18.orig/Makefile ./Makefile
---- ../freepops-0.0.18.orig/Makefile	Mon Sep 27 03:34:12 2004
-+++ ./Makefile	Tue Oct  5 23:04:58 2004
-@@ -57,23 +57,23 @@
+--- Makefile.orig	2008-06-14 04:21:25.000000000 -0500
++++ Makefile	2019-10-16 19:38:38.000000000 -0500
+@@ -65,11 +65,11 @@
+ 	$(H)mkdir -p $(PREFIX)
+ 	$(H)mkdir -p $(PREFIX)bin
  	$(H)mkdir -p $(PREFIX)share/freepops/lua/
+-	$(H)mkdir -p $(DESTDIR)var/lib/freepops/lua_unofficial/
+-	$(H)mkdir -p $(DESTDIR)var/lib/freepops/lua_updates/
++	$(H)mkdir -p $(PREFIX)var/lib/freepops/lua_unofficial/
++	$(H)mkdir -p $(PREFIX)var/lib/freepops/lua_updates/
  	$(H)mkdir -p $(PREFIX)share/doc/freepops/
  	$(H)mkdir -p $(PREFIX)share/man/man1/
--	$(H)mkdir -p $(DESTDIR)/etc/freepops
+-	$(H)mkdir -p $(DESTDIR)etc/freepops
 +	$(H)mkdir -p $(PREFIX)etc/freepops
- 	$(H)cp src/freepopsd$(EXECSUFFIX) $(PREFIX)bin
+ 	$(H)if [ ! -z "$(FLTKUI)" ]; then \
+ 		mkdir -p $(PREFIX)lib/freepops/; \
+ 		cp updater-ui/fltk/updater_fltk$(SHAREDEXTENSION) \
+@@ -89,9 +89,9 @@
  	$(H)cp src/lua/*.lua modules/include/*.lua config.lua \
  		$(PREFIX)share/freepops/lua/
- 	$(H)cp doc/freepopsd.1  $(PREFIX)share/man/man1/
- 	$(H)cp doc/manual*.pdf  $(PREFIX)share/doc/freepops/ ||\
- 		cp doc/MANUAL.txt  $(PREFIX)share/doc/freepops/
--	$(H)cp config.lua $(DESTDIR)/etc/freepops/
+ 	# keep these in sync with win32 installer
+-	$(H)mkdir -p $(DESTDIR)var/lib/freepops/lua_updates/lxp
+-	$(H)mkdir -p $(DESTDIR)var/lib/freepops/lua_updates/browser
+-	$(H)mkdir -p $(DESTDIR)var/lib/freepops/lua_updates/soap
++	$(H)mkdir -p $(PREFIX)var/lib/freepops/lua_updates/lxp
++	$(H)mkdir -p $(PREFIX)var/lib/freepops/lua_updates/browser
++	$(H)mkdir -p $(PREFIX)var/lib/freepops/lua_updates/soap
+ 	$(H)mkdir -p $(PREFIX)share/freepops/lua/lxp/
+ 	$(H)mkdir -p $(PREFIX)share/freepops/lua/browser/
+ 	$(H)mkdir -p $(PREFIX)share/freepops/lua/soap/
+@@ -118,7 +118,7 @@
+ 	fi
+ 	$(H)cp doc/manual*.pdf  $(PREFIX)share/doc/freepops/ || true
+ 	$(H)cp doc/MANUAL.txt  $(PREFIX)share/doc/freepops/ || true
+-	$(H)cp config.lua $(DESTDIR)etc/freepops/
 +	$(H)cp config.lua $(PREFIX)etc/freepops/
  
  uninstall:
--	$(H)rm -f $(DESTDIR)/etc/freepops/config.lua
-+	$(H)rm -f $(PREFIX)etc/freepops/config.lua
- 	$(H)rm -f $(PREFIX)share/doc/freepops/manual.ps
- 	$(H)rm -f $(PREFIX)share/doc/freepops/manual-it.ps
- 	$(H)rm -f $(PREFIX)share/man/man1/freepopsd.1
- 	$(H)rm -f $(PREFIX)share/freepops/lua/*
- 	$(H)rm -f $(PREFIX)bin/freepopsd$(EXECSUFFIX)
--	$(H)rmdir $(DESTDIR)/etc/freepops
-+	$(H)rmdir $(PREFIX)etc/freepops
- 	$(H)rmdir $(PREFIX)share/man/man1/
- 	$(H)rmdir $(PREFIX)share/doc/freepops/
- 	$(H)rmdir $(PREFIX)share/freepops/lua/
-diff -ur ../freepops-0.0.18.orig/doc/freepopsd.1 ./doc/freepopsd.1
---- ../freepops-0.0.18.orig/doc/freepopsd.1	Tue Sep 14 05:17:47 2004
-+++ ./doc/freepopsd.1	Tue Oct  5 23:06:48 2004
-@@ -104,10 +104,10 @@
- .\"sense only in a lan-wide installation.
+ 	$(H)rm -f $(DESTDIR)etc/freepops/config.lua
+--- doc/freepopsd.1.orig	2008-05-28 16:18:42.000000000 -0500
++++ doc/freepopsd.1	2019-10-16 19:41:05.000000000 -0500
+@@ -93,7 +93,7 @@
+ \fIbasic\fR, \fIdigest\fR, \fIntlm\fR and \fIgss\fR.
+ .TP
+ \fB\-c\fR, \fB\-\-conffile \fRfile
+-Users the specified configuration file instead of looking in default paths like 
++User the specified configuration file instead of looking in default paths like 
+ /etc/freepops/config.lua, ./config.lua and /usr/share/freepops/lua/config.lua
+ .TP
+ \fB\-\-statistics\-all
+@@ -144,10 +144,10 @@
+ .br
  .SH FILES
  .TP
--.I /usr/share/frepops/lua/*
-+.I @PREFIX@/share/frepops/lua/*
+-.I /usr/share/freepops/lua/*
++.I @PREFIX@/share/freepops/lua/*
  Webmails access implementation
  .TP
 -.I /etc/freepops/config.lua
@@ -44,34 +60,21 @@
 +.I @PREFIX@/etc/freepops/config.lua
  Configuration file, interesting only for paths, addresses to modules binding,
  and accept/reject policy on mail addresses
- \".TP
-diff -ur ../freepops-0.0.18.orig/modules/src/luafull/Makefile ./modules/src/luafull/Makefile
---- ../freepops-0.0.18.orig/modules/src/luafull/Makefile	Sun Sep 26 02:28:13 2004
-+++ ./modules/src/luafull/Makefile	Tue Oct  5 23:04:58 2004
-@@ -35,7 +35,7 @@
- 	-lbase64_lua -lstringhack_lua -lcurl_lua \
- 	-lluabind -lgetdate -lmlex -lportablesocket -lbase64 \
- 	-lregularexp -llog -llist \
--	-L/sw/lib/ -lexpat -lcurl -lcrypto -lreadline -lhistory \
-+	-lexpat -lcurl -lcrypto -lreadline -lhistory \
- 	#-lcurses #-lncurses
+ .SH AUTHOR
+--- src/Makefile.orig	2008-12-08 03:15:14.000000000 -0600
++++ src/Makefile	2019-10-16 19:45:40.000000000 -0500
+@@ -133,8 +133,7 @@
  else
- ifeq "$(OS)" "Windows"
-diff -ur ../freepops-0.0.18.orig/src/Makefile ./src/Makefile
---- ../freepops-0.0.18.orig/src/Makefile	Mon Sep 27 04:47:13 2004
-+++ ./src/Makefile	Tue Oct  5 23:04:58 2004
-@@ -101,7 +101,7 @@
  ifeq "$(OS)" "Darwin"
  	LDFLAGS+=-L../modules/lib $(addprefix -l,$(LIBSTOLINK)) \
- 		-lgetopt -lm \
--	 	-lpthread -L/usr/lib -L/sw/lib -lexpat -lcurl \
-+	 	-lpthread -lexpat -lcurl \
- 		-lcrypto -ldl -lssl -lcrypto -lz 
+-		-lm -lpthread -L/usr/lib $(EXPAT_LD_FLAGS) \
+-		$(EXTRALIB_PREFIX)lib/libcurl.a -lldap \
++		-lm -lpthread $(CURL_LD_FLAGS) $(EXPAT_LD_FLAGS) -lldap \
+ 		-lcrypto -ldl -lssl -lcrypto -lintl -liconv -Wl,-framework -Wl,CoreFoundation -lc -lz 
  else
  ifeq "$(OS)" "Darwin-static"
-diff -ur ../freepops-0.0.18.orig/src/freepops.h ./src/freepops.h
---- ../freepops-0.0.18.orig/src/freepops.h	Thu Aug 26 04:50:37 2004
-+++ ./src/freepops.h	Tue Oct  5 23:05:55 2004
+--- src/freepops.h.orig	2007-01-14 08:37:30.000000000 -0600
++++ src/freepops.h	2019-10-16 19:56:45.000000000 -0500
 @@ -50,7 +50,7 @@
  #ifdef WIN32
  #define FREEPOPS_SHARE "./"
@@ -81,60 +84,47 @@
  #endif
  
  #endif
-diff -ur ../freepops-0.0.18.orig/src/lua/freepops.lua ./src/lua/freepops.lua
---- ../freepops-0.0.18.orig/src/lua/freepops.lua	Mon Aug 30 02:43:40 2004
-+++ ./src/lua/freepops.lua	Tue Oct  5 23:07:37 2004
-@@ -380,7 +380,7 @@
+--- src/lua/freepops.lua.orig	2007-10-28 04:26:46.000000000 -0500
++++ src/lua/freepops.lua	2019-10-16 20:01:51.000000000 -0500
+@@ -67,7 +67,7 @@
+ -- Config file loading.
  local function load_config()
- 
- 	local paths = { 
--		"/etc/freepops/",
-+		"@PREFIX@/etc/freepops/",
- 		"./",
- 		os.getenv("FREEPOPSLUA_PATH") or "./" ,
- 	}
---- configure.sh.orig	2004-09-18 20:46:34.000000000 +1000
-+++ configure.sh	2011-06-25 18:28:17.000000000 +1000
-@@ -21,7 +21,6 @@
- }
- 
- set_default() {
--CC=gcc
- LD=ld
- AR=ar
- STRIP=strip
-@@ -34,7 +33,7 @@
- EXEEXTENSION=
- STATICEXTENSION=.a
- SHAREDEXTENSION=.so
--CFLAGS="-O2 -g3 -Wall -DHAVE_CONFIG_H -I$PWD"
-+CFLAGS="-O2 -Wall -DHAVE_CONFIG_H -I$PWD"
- HCFLAGS=$CFLAGS
- LDFLAGS=""
- HLDFLAGS=$LDFLAGS
-@@ -51,10 +50,10 @@
+ 	local conffile = os.getenv("FREEPOPSLUA_CONFFILE")
+-	local paths = { "/etc/freepops/", "./", os.getenv("FREEPOPSLUA_PATH") or "./" }
++	local paths = { "@PREFIX@/etc/freepops/", "./", os.getenv("FREEPOPSLUA_PATH") or "./" }
+ 	
+ 	local try_load = 
+ 		function(filename) return
+--- configure.sh.orig	2008-12-08 03:15:13.000000000 -0600
++++ configure.sh	2019-10-16 19:59:34.000000000 -0500
+@@ -12,9 +12,7 @@
+ 	linux-gnutls	to compile on a linux host and install in /usr/local
+ 			using gnutls and not openssl
+ 	linux-slack	to compile on a linux slack box (installs in /usr)
+-	osx			to compile on a darwin host (sdk10.4u + custom expat:
+-				you can export the EXTRALIB_PREFIX variable pointing
+-				to the installation root of your expat installation)
++	osx		to compile on a darwin host
+ 	osx-static	to compile on a darwin host (old osx versions)
+ 	obsd		to compile on a openbsd host
+ 	fbsd 		to compile on a freebsd host
+@@ -103,17 +101,9 @@
  set_osx() {
  set_default
  OS=Darwin
--CFLAGS="$CFLAGS -I/sw/include -DMACOSX"
--HCFLAGS="$HCFLAGS -I/sw/include -DMACOSX"
--LDFLAGS="$LDFLAGS -L/usr/lib -L/sw/lib -bind_at_load -framework Carbon"
--HLDFLAGS="$HLDFLAGS -L/usr/lib -L/sw/lib -bind_at_load"
-+CFLAGS="$CFLAGS -DMACOSX @ARCHFLAGS@"
-+HCFLAGS="$HCFLAGS -DMACOSX @ARCHFLAGS@"
-+LDFLAGS="$LDFLAGS @ARCHFLAGS@ -bind_at_load -framework Carbon"
-+HLDFLAGS="$HLDFLAGS @ARCHFLAGS@ -bind_at_load"
+-OSX_SDK=/Developer/SDKs/MacOSX10.4u.sdk/
+-EXTRALIB_PREFIX=${EXTRALIB_PREFIX:-/Users/gares/freepops/}
+-OSXV=10.4
+-MACHOARCH=" -arch i386 -arch ppc -isysroot $OSX_SDK -mmacosx-version-min=$OSXV"
+-CFLAGS="$CFLAGS -I${EXTRALIB_PREFIX}include -DMACOSX"
+-HCFLAGS="$HCFLAGS -I${EXTRALIB_PREFIX}include -DMACOSX"
++CFLAGS="$CFLAGS -DMACOSX"
++HCFLAGS="$HCFLAGS -DMACOSX"
+ LUAFLAGS=" -DLUA_USE_MACOSX "
+-LDFLAGS="$LDFLAGS -L${EXTRALIB_PREFIX}lib -Wl,-syslibroot,$OSX_SDK -mmacosx-version-min=$OSXV"
+-EXEEXTENSION=".ppc-i386.$OSXV"
+-FLTKLDFLAGS="-lfltk -framework Carbon -framework ApplicationServices"
+-FLTKPOST="${EXTRALIB_PREFIX}bin/fltk-config --post"
  }
  
  set_osx_static() {
---- modules/src/curl_lua/Makefile.orig	2004-09-26 19:58:52.000000000 +1000
-+++ modules/src/curl_lua/Makefile	2011-06-25 18:41:30.000000000 +1000
-@@ -57,7 +57,7 @@
- 
- curl_authopt.h:$(HEADER)
- 	$(H)cat $(HEADER) | grep "CURLAUTH_" | \
--		sed "s/#define *CURL/{\"/" | sed "s/ *\/\*.*\*\///" | \
-+		sed "s/#define *CURL/{\"/" | sed -E "s/ *\/\*.*\*?\/?//" | \
- 		sed "s/ /\",/" | sed "s/$$/},/" > curl_authopt.h
- 
- curl_form.h: $(HEADER)
