diff --git a/mail/freepops/Makefile b/mail/freepops/Makefile index 71dfe11179ae..0502a8f9c324 100644 --- a/mail/freepops/Makefile +++ b/mail/freepops/Makefile @@ -6,7 +6,7 @@ # PORTNAME= freepops -PORTVERSION= 0.0.26 +PORTVERSION= 0.0.27 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= freepops @@ -24,16 +24,29 @@ HAS_CONFIGURE= yes USE_REINPLACE= yes CONFIGURE_SCRIPT= configure.sh CONFIGURE_ARGS= fbsd -MAKE_ARGS= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ - PTHREAD_LIBS="${PTHREAD_LIBS}" -pre-configure: - @${REINPLACE_CMD} -e "s|^WHERE=\/usr\/local\/|WHERE=${PREFIX}\/|g" \ - ${WRKSRC}/${CONFIGURE_SCRIPT} +post-patch: + @${REINPLACE_CMD} -e \ + 's|\(WHERE=\)/usr/local|\1${PREFIX}|; \ + s|/usr/local|${LOCALBASE}|; \ + s|^CC=gcc||; \ + s|-O2 -g3|${CFLAGS}|' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} -e \ + 's|$$(PREFIX)|${PREFIX}/|; \ + s|share/\(man/man1\)|\1|; \ + s|$$(DESTDIR)\(/etc/freepops\)|${PREFIX}\1|; \ + s|\(cp config\.lua\) .*|\1 ${PREFIX}/etc/freepops/config.lua.sample|' \ + ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e \ + 's|\($$(CFLAGS)\)|\1 ${PTHREAD_CFLAGS}|; \ + s|\($$(LDFLAGS)\)|\1 ${PTHREAD_LIBS}|' \ + ${WRKSRC}/modules/src/luafull/Makefile post-install: -.if !defined(BATCH) - @${CAT} ${PKGMESSAGE} -.endif + @${CHMOD} ${SHAREMODE} ${DATADIR}/lua/*.lua + @[ -f ${PREFIX}/etc/freepops/config.lua ] || \ + ${CP} -f ${PREFIX}/etc/freepops/config.lua.sample \ + ${PREFIX}/etc/freepops/config.lua .include diff --git a/mail/freepops/distinfo b/mail/freepops/distinfo index 234510456e7d..5cd87af40a02 100644 --- a/mail/freepops/distinfo +++ b/mail/freepops/distinfo @@ -1,2 +1,2 @@ -MD5 (freepops-0.0.26.tar.gz) = 03fdaed5dd6401608583f3e3785600cb -SIZE (freepops-0.0.26.tar.gz) = 1851909 +MD5 (freepops-0.0.27.tar.gz) = f4842a2666ec8e439fd08e1f38a46d4e +SIZE (freepops-0.0.27.tar.gz) = 1851699 diff --git a/mail/freepops/files/patch-Makefile b/mail/freepops/files/patch-Makefile deleted file mode 100644 index 82c76c637725..000000000000 --- a/mail/freepops/files/patch-Makefile +++ /dev/null @@ -1,35 +0,0 @@ ---- ../freepops-0.0.23/Makefile Thu Dec 23 18:36:38 2004 -+++ ./Makefile Mon Feb 14 16:36:23 2005 -@@ -55,20 +55,20 @@ - - install: all - $(H)mkdir -p $(PREFIX) -- $(H)mkdir -p $(PREFIX)bin -- $(H)mkdir -p $(PREFIX)share/freepops/lua/ -- $(H)mkdir -p $(PREFIX)share/freepops/lua_unofficial/ -- $(H)mkdir -p $(PREFIX)share/doc/freepops/ -- $(H)mkdir -p $(PREFIX)share/man/man1/ -- $(H)mkdir -p $(DESTDIR)/etc/freepops -- $(H)cp src/freepopsd$(EXECSUFFIX) $(PREFIX)bin -+ $(H)mkdir -p $(PREFIX)/bin -+ $(H)mkdir -p $(PREFIX)/share/freepops/lua/ -+ $(H)mkdir -p $(PREFIX)/share/freepops/lua_unofficial/ -+ $(H)mkdir -p $(PREFIX)/share/doc/freepops/ -+ $(H)mkdir -p $(PREFIX)/man/man1/ -+ $(H)mkdir -p $(PREFIX)/etc/freepops -+ $(H)cp src/freepopsd$(EXECSUFFIX) $(PREFIX)/bin - $(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/ 2>/dev/null ||\ -- cp doc/MANUAL.txt $(PREFIX)share/doc/freepops/ 2>/dev/null || \ -+ $(PREFIX)/share/freepops/lua/ -+ $(H)cp doc/freepopsd.1 $(PREFIX)/man/man1/ -+ $(H)cp doc/manual*.pdf $(PREFIX)/share/doc/freepops/ 2>/dev/null ||\ -+ cp doc/MANUAL.txt $(PREFIX)/share/doc/freepops/ 2>/dev/null || \ - true -- $(H)cp config.lua $(DESTDIR)/etc/freepops/ -+ $(H)cp config.lua $(PREFIX)/etc/freepops/config.lua.sample - - uninstall: - $(H)rm -f $(DESTDIR)/etc/freepops/config.lua diff --git a/mail/freepops/files/patch-configure.sh b/mail/freepops/files/patch-configure.sh deleted file mode 100644 index 558375854933..000000000000 --- a/mail/freepops/files/patch-configure.sh +++ /dev/null @@ -1,20 +0,0 @@ ---- configure.sh.orig Wed Jan 5 17:13:08 2005 -+++ configure.sh Sat Mar 5 21:29:33 2005 -@@ -23,7 +23,7 @@ - } - - set_default() { --CC=gcc -+#CC=gcc - LD=ld - AR=ar - STRIP=strip -@@ -36,7 +36,7 @@ - EXEEXTENSION= - STATICEXTENSION=.a - SHAREDEXTENSION=.so --CFLAGS="-O2 -g3 -Wall -DHAVE_CONFIG_H -I$PWD" -+CFLAGS="$CFLAGS -Wall -DHAVE_CONFIG_H -I$PWD" - HCFLAGS=$CFLAGS - LDFLAGS="" - HLDFLAGS=$LDFLAGS diff --git a/mail/freepops/files/patch-modules::src::luafull::Makefile b/mail/freepops/files/patch-modules::src::luafull::Makefile deleted file mode 100644 index ee968e167c89..000000000000 --- a/mail/freepops/files/patch-modules::src::luafull::Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- modules/src/luafull/Makefile.orig Thu Nov 25 15:03:03 2004 -+++ modules/src/luafull/Makefile Fri Mar 11 14:43:58 2005 -@@ -5,14 +5,14 @@ - CFLAGS += -I$(PREFIX)/include -I. \ - -DUSE_DLOPEN=1 - else --CFLAGS += -I$(PREFIX)/include -I. -DUSE_POPEN=1 \ -+CFLAGS += -I$(PREFIX)/include -I. -DUSE_POPEN=1 $(PTHREAD_CFLAGS) \ - -DUSE_DLOPEN=1 -DUSE_READLINE=1 -DLUA_USERCONFIG=\"saconfig.c\" - endif - - - LDFLAGS += -L$(PREFIX)/lib - ifeq "$(OS)" "FreeBSD" -- LDFLAGS+= -llua -llualib -lm -+ LDFLAGS+= $(PTHREAD_LIBS) -llua -llualib -lm - else - ifeq "$(OS)" "OpenBSD" - LDFLAGS+= -llua -llualib -lm diff --git a/mail/freepops/files/patch-src::Makefile b/mail/freepops/files/patch-src::Makefile deleted file mode 100644 index 8e31925e8c53..000000000000 --- a/mail/freepops/files/patch-src::Makefile +++ /dev/null @@ -1,29 +0,0 @@ ---- src/Makefile.orig Tue Nov 16 17:31:31 2004 -+++ src/Makefile Fri Mar 11 15:02:48 2005 -@@ -41,11 +41,17 @@ - CFLAGS+= -DFREEPOPSLUA_PATH_UNOFFICIAL=\"$HOME/config/settings/freepops/lua_unofficial/\" - - else -+ifeq "$(OS)" "FreeBSD" -+ CFLAGS+= -DFREEPOPSLUA_PATH=\"$HOME/config/settings/freepops/lua/\" -+ CFLAGS+= -DFREEPOPSLUA_PATH_UNOFFICIAL=\"$HOME/config/settings/freepops/lua_unofficial/\" -+ CFLAGS+= $(PTHREAD_CFLAGS) -+else - CFLAGS+= -DFREEPOPSLUA_PATH=\"$(PREFIX)share/freepops/lua/\" - CFLAGS+= -DFREEPOPSLUA_PATH_UNOFFICIAL=\"$(PREFIX)share/freepops/lua_unofficial/\" - endif - endif - endif -+endif - - ifeq "$(OS)" "Cygwin" - CFLAGS+= -I/usr/include -@@ -132,7 +138,7 @@ - else - ifeq "$(OS)" "FreeBSD" - LIBSTOLINK+= getopt -- LDFLAGS+=-L../modules/lib $(addprefix -l,$(LIBSTOLINK)) -lm -pthread \ -+ LDFLAGS+=-L../modules/lib $(addprefix -l,$(LIBSTOLINK)) -lm $(PTHREAD_LIBS) \ - $(CURL_LD_FLAGS) $(EXPAT_LD_FLAGS) - else - ifeq "$(OS)" "Cygwin" diff --git a/mail/freepops/pkg-message b/mail/freepops/pkg-message deleted file mode 100644 index 0823f1b229b1..000000000000 --- a/mail/freepops/pkg-message +++ /dev/null @@ -1,2 +0,0 @@ -Don't forget to copy ${PREFIX}/etc/freepops/config.lua.sample to -${PREFIX}/etc/freepops/config.lua before running freepopsd diff --git a/mail/freepops/pkg-plist b/mail/freepops/pkg-plist index 8773d34d7fc5..2b5fb2c6d38f 100644 --- a/mail/freepops/pkg-plist +++ b/mail/freepops/pkg-plist @@ -1,5 +1,7 @@ bin/freepopsd +@unexec if cmp -s %D/etc/freepops/config.lua %D/etc/freepops/config.lua.sample; then rm -f %D/etc/freepops/config.lua; fi etc/freepops/config.lua.sample +@exec [ -f %B/config.lua ] || cp %B/%f %B/config.lua %%DOCSDIR%%/MANUAL.txt %%DATADIR%%/lua/aggregator.lua %%DATADIR%%/lua/aol.lua @@ -36,7 +38,4 @@ etc/freepops/config.lua.sample @dirrm %%DATADIR%% @dirrm %%DOCSDIR%% @unexec rmdir %D/etc/freepops 2>/dev/null || true -@exec mkdir -p %D/share/freepops/lua @exec mkdir -p %D/share/freepops/lua_unofficial -@exec mkdir -p %D/share/doc/freepops -@exec mkdir -p %D/etc/freepops