diff options
author | adamw <adamw@FreeBSD.org> | 2013-10-21 08:49:45 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2013-10-21 08:49:45 +0800 |
commit | 36d47a4118c517c2eae453dada4a8d9fcfd117b5 (patch) | |
tree | 533394bd488c59c80e2ab1fd3fb0c01d89902eff | |
parent | 3111a84b07430a00d3bb431cfd52a9aca07d18c8 (diff) | |
download | freebsd-ports-graphics-36d47a4118c517c2eae453dada4a8d9fcfd117b5.tar.gz freebsd-ports-graphics-36d47a4118c517c2eae453dada4a8d9fcfd117b5.tar.zst freebsd-ports-graphics-36d47a4118c517c2eae453dada4a8d9fcfd117b5.zip |
It has been 2.5 years since the last SquirrelMail release. In this
time, there have been many fixes added to the source tree, including
the PHP 5.4 and 5.5 fixes, requests for which have become the bane
of my maintainer existence.
The SM team is hard at work on the next version, but at this time it
is unclear whether the next version will ever see a full release.
As a result, this port will begin following hand-picked SVN snapshots.
So, the port officially accepts PHP 5.4 and 5.5, though if you
encounter weird errors please DTRT and report it to the SM developers
and then downgrade your PHP to 5.3.
The other major thing here is that the default location for user
preferences and attachments is being changed. Previously we used
/var/spool/squirrelmail which is really not in-line with FreeBSD's
hier(7). Now we use paths under $PREFIX, respectively
$PREFIX/www/squirrelmail/data and .../attach.
You can either copy /var/spool/squirrelmail/pref/* into
$PREFIX/www/squirrelmail/data, and /var/.../attach/* into
$PREFIX/.../attach, and then run $PREFIX/www/squirrelmail/configure,
or you can do nothing in which case that's totally fine too and
your installation won't break or anything.
Note that best practice, as recommended by the SM installation notes
and common sense, would suggest moving your user data files
to someplace outside of the $PREFIX/www/squirrelmail.
-rw-r--r-- | mail/squirrelmail/Makefile | 44 | ||||
-rw-r--r-- | mail/squirrelmail/distinfo | 4 | ||||
-rw-r--r-- | mail/squirrelmail/files/patch-class__deliver__Deliver.class.php | 31 | ||||
-rw-r--r-- | mail/squirrelmail/files/patch-config-config_default.php | 20 | ||||
-rw-r--r-- | mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php | 33 | ||||
-rw-r--r-- | mail/squirrelmail/files/patch-plugins-message_details-message_details_bottom.php | 11 | ||||
-rw-r--r-- | mail/squirrelmail/files/pkg-deinstall.in | 43 | ||||
-rw-r--r-- | mail/squirrelmail/files/pkg-install.in | 31 | ||||
-rw-r--r-- | mail/squirrelmail/files/pkg-message.in | 28 | ||||
-rw-r--r-- | mail/squirrelmail/pkg-plist | 12 |
10 files changed, 49 insertions, 208 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index 974ca6033af..c1747f794cd 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -2,34 +2,33 @@ # $FreeBSD$ PORTNAME= squirrelmail -PORTVERSION= 1.4.22 -PORTREVISION= 3 +PORTVERSION= 20131020 CATEGORIES= mail www -MASTER_SITES= SF/${PORTNAME}/stable/${PORTVERSION} -DISTNAME= ${PORTNAME}-webmail-${PORTVERSION} +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= adamw +DISTNAME= ${PORTNAME}-${PORTVERSION}_0200-SVN.stable DIST_SUBDIR= ${PORTNAME} MAINTAINER= adamw@FreeBSD.org COMMENT= A webmail system which accesses mail over IMAP +# This snapshot tarball contains php 5.4 and 5.5 compatibility +# patches, but the only guaranteed compatibility is with php 5.3. +# If you encounter problems, downgrade to php 5.3. + USE_PHP= session mhash gettext mbstring pcre openssl xml WANT_PHP_WEB= yes -### Folks, please stop removing the following line and asking me why -### squirrelmail doesn't work. I know the canned error says that SM -### is incompatible with php 5, but it is just php-5.4 that it is -### incompatible with. Install lang/php53 and it will work. -### This will be fixed if/when the SM team releases the next version. -IGNORE_WITH_PHP=5 # known incompatibilities with php-5.4, use 5.3 for now -DEFAULT_PHP_VER=53 USE_BZIP2= yes USES= gettext +WRKSRC= ${WRKDIR}/${PORTNAME}.stable/${PORTNAME} + OPTIONS_DEFINE= DATABASE LDAP DATABASE_DESC= PEAR database support (must also intall a driver) # if you were using WITHOUT_WWWDIR, use SQUIRRELDIR=${PREFIX}/${PORTNAME} -SQUIRRELDIR?= ${PREFIX}/www/${PORTNAME} +SQUIRRELDIR?= ${WWWDIR} SMUSER?= ${WWWOWN} SMGROUP?= ${WWWGRP} @@ -37,10 +36,11 @@ USERS= ${SMUSER} GROUPS= ${SMGROUP} PLIST_SUB= PORTVERSION=${PORTVERSION} \ - SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}" + FULLPATH="${SQUIRRELDIR}" \ + SQUIRRELDIR="${SQUIRRELDIR:S,^${PREFIX}/,,}" \ -SUB_FILES= pkg-message pkg-install pkg-deinstall -SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR} SMUSER=${SMUSER} SMGROUP=${SMGROUP} +SUB_FILES= pkg-message +SUB_LIST= SQUIRRELDIR=${SQUIRRELDIR} SMUSER=${SMUSER} SMGROUP=${SMGROUP} CONFLICTS= squirreloutlook-[0-9]* @@ -64,9 +64,11 @@ post-patch: ${WRKSRC}/plugins/squirrelspell/sqspell_config.php @${REINPLACE_CMD} -e 's|/usr/bin/fortune|/usr/games/fortune|g' \ ${WRKSRC}/plugins/fortune/fortune_functions.php + @${REINPLACE_CMD} -e 's|/var/local/squirrelmail|${SQUIRRELDIR}|g' \ + ${WRKSRC}/config/conf.pl ${WRKSRC}/config/config_default.php ${WRKSRC}/doc/INSTALL -# Rearrange the documentation do-build: +# Rearrange the documentation @${MV} ${WRKSRC}/themes/README.themes ${WRKSRC}/doc/ @cd ${WRKSRC} ; for f in `${FIND} plugins -name "README*" -or \ -name INSTALL -or -name CHANGES -or -name HISTORY`; \ @@ -79,8 +81,12 @@ do-build: ${MV} plugins/squirrelspell/doc/* doc/plugins/squirrelspell ; \ ${RM} -f doc/plugins/squirrelspell/index.php ; \ ${RM} -rf plugins/squirrelspell/doc + @${ECHO} "left_refresh=300" >> ${WRKSRC}/data/default_pref @${MV} ${WRKSRC}/config/config_local.php ${WRKSRC}/config/config_local.php.sample + @${MV} ${WRKSRC}/data/default_pref ${WRKSRC}/data/default_pref-dist + @${MKDIR} ${WRKSRC}/attach + @${CP} -p ${WRKSRC}/data/.htaccess ${WRKSRC}/attach/.htaccess pre-install: @${FIND} ${WRKSRC} -name '*.orig' -delete @@ -92,15 +98,13 @@ do-install: ${MKDIR} ${STAGEDIR}${SQUIRRELDIR} ${INSTALL_DATA} ${WRKSRC}/index.php ${STAGEDIR}${SQUIRRELDIR} ${INSTALL_SCRIPT} ${WRKSRC}/configure ${STAGEDIR}${SQUIRRELDIR} -.for DIR in class config data functions help images include locale plugins po src themes +.for DIR in attach class config data functions help images include locale plugins po src themes cd ${WRKSRC} && ${FIND} ${DIR} | ${CPIO} -pdmu --quiet ${STAGEDIR}${SQUIRRELDIR} .endfor ${CHOWN} -R ${SMUSER}:${SMGROUP} ${STAGEDIR}${SQUIRRELDIR}/data + ${CHMOD} 733 ${STAGEDIR}${SQUIRRELDIR}/attach ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc && ${FIND} . | ${CPIO} -pdmu --quiet ${STAGEDIR}${DOCSDIR} -post-install: - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - .include <bsd.port.mk> diff --git a/mail/squirrelmail/distinfo b/mail/squirrelmail/distinfo index 646046e51dc..9685936e6b6 100644 --- a/mail/squirrelmail/distinfo +++ b/mail/squirrelmail/distinfo @@ -1,2 +1,2 @@ -SHA256 (squirrelmail/squirrelmail-webmail-1.4.22.tar.bz2) = 2231578d0f9abeae52bc4e461a6773d78762f20a27e1e2fbebc1a11ccd1af877 -SIZE (squirrelmail/squirrelmail-webmail-1.4.22.tar.bz2) = 531360 +SHA256 (squirrelmail/squirrelmail-20131020_0200-SVN.stable.tar.bz2) = bec67ca3b0dd6f5435fa9fd7fe0cfe0f6662abfefce7589ebb484f0dc9ac5a60 +SIZE (squirrelmail/squirrelmail-20131020_0200-SVN.stable.tar.bz2) = 541979 diff --git a/mail/squirrelmail/files/patch-class__deliver__Deliver.class.php b/mail/squirrelmail/files/patch-class__deliver__Deliver.class.php deleted file mode 100644 index ce770b02064..00000000000 --- a/mail/squirrelmail/files/patch-class__deliver__Deliver.class.php +++ /dev/null @@ -1,31 +0,0 @@ ---- ./class/deliver/Deliver.class.php.orig 2010-08-03 16:33:49.000000000 -0400 -+++ ./class/deliver/Deliver.class.php 2010-08-03 16:35:25.000000000 -0400 -@@ -542,7 +542,19 @@ - $cnt = count($header); - $hdr_s = ''; - for ($i = 0 ; $i < $cnt ; $i++) { -- $hdr_s .= $this->foldLine($header[$i]); -+ /* -+ * FIXME: Leave some name fields (filename, username) as they -+ * are, for now. If you want to fold these fields, -+ * -+ * 1) Count columns with base64 encoded chars, and -+ * 2) Split RAW text (before encoding), and -+ * 3) encode each splitted RAW texts. -+ */ -+ if (strstr($header[$i], 'name') === false) { -+ $hdr_s .= $this->foldLine($header[$i], 78); -+ } else { -+ $hdr_s .= $header[$i]; -+ } - } - $header = $hdr_s; - $header .= $rn; /* One blank line to separate mimeheader and body-entity */ -@@ -778,6 +790,7 @@ - case 'Cc': - case 'Bcc': - case 'From': -+ case 'Subject': // Prevent from base64-folding corruption. - $hdr_s .= $header[$i]; - break; - default: $hdr_s .= $this->foldLine($header[$i]); break; diff --git a/mail/squirrelmail/files/patch-config-config_default.php b/mail/squirrelmail/files/patch-config-config_default.php deleted file mode 100644 index 6a5ee4b5874..00000000000 --- a/mail/squirrelmail/files/patch-config-config_default.php +++ /dev/null @@ -1,20 +0,0 @@ ---- config/config_default.php.orig Wed May 9 16:48:26 2007 -+++ config/config_default.php Wed May 9 16:49:20 2007 -@@ -464,7 +464,7 @@ - * - * @global string $data_dir - */ --$data_dir = '/var/local/squirrelmail/data/'; -+$data_dir = '/var/spool/squirrelmail/pref/'; - - /** - * Attachments directory -@@ -482,7 +482,7 @@ - * + It should probably be another directory than data_dir. - * @global string $attachment_dir - */ --$attachment_dir = '/var/local/squirrelmail/attach/'; -+$attachment_dir = '/var/spool/squirrelmail/attach/'; - - /** - * Hash level used for data directory. diff --git a/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php b/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php deleted file mode 100644 index bb1d04ce9e7..00000000000 --- a/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php +++ /dev/null @@ -1,33 +0,0 @@ ---- plugins/mail_fetch/functions.php.old 2012-09-08 17:58:39.000000000 -0400 -+++ plugins/mail_fetch/functions.php 2012-09-08 18:01:06.000000000 -0400 -@@ -92,15 +92,22 @@ - return ''; - } - --function hex2bin( $data ) { -- /* Original code by josh@superfork.com */ -+/** -+ * hex2bin - convert a hexadecimal string into binary -+ * Part of php54, so don't try to clobber it -+ */ -+if ( ! function_exists('hex2bin') ) { -+ function hex2bin( $data ) { - -- $len = strlen($data); -- $newdata = ''; -- for( $i=0; $i < $len; $i += 2 ) { -- $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) ); -- } -- return $newdata; -+ /* Original code by josh@superfork.com */ -+ -+ $len = strlen($data); -+ $newdata = ''; -+ for( $i=0; $i < $len; $i += 2 ) { -+ $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) ); -+ } -+ return $newdata; -+ } - } - - function mf_keyED( $txt ) { diff --git a/mail/squirrelmail/files/patch-plugins-message_details-message_details_bottom.php b/mail/squirrelmail/files/patch-plugins-message_details-message_details_bottom.php deleted file mode 100644 index f468f859085..00000000000 --- a/mail/squirrelmail/files/patch-plugins-message_details-message_details_bottom.php +++ /dev/null @@ -1,11 +0,0 @@ ---- plugins/message_details/message_details_bottom.php.orig 2012-11-16 16:16:25.000000000 -0500 -+++ plugins/message_details/message_details_bottom.php 2012-11-16 16:16:49.000000000 -0500 -@@ -85,7 +85,7 @@ - $messageheaderstart=false; - $boundaries = array(); - $entities = array(); --session_unregister("entities"); -+sqsession_unregister("entities"); - $pre = '<b>'; - $end = '</b>'; - $entStr = ''; diff --git a/mail/squirrelmail/files/pkg-deinstall.in b/mail/squirrelmail/files/pkg-deinstall.in deleted file mode 100644 index b0738c370e2..00000000000 --- a/mail/squirrelmail/files/pkg-deinstall.in +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -#set -vx - -PKG_BATCH=${BATCH:=NO} - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} - -SQUIRRELDIR=%%SQUIRRELDIR%% - -checkfile() { - diff -bBqw $1 $2 >/dev/null 2>&1 - case $? in - 0) # config file exists, but is the same - rm $1 - ;; - 1) # config file exists and differs - ;; - *) # no config file exists - ;; - esac -} - -case $2 in - DEINSTALL) - cd ${PKG_PREFIX} - checkfile /var/spool/squirrelmail/prefs/default_pref \ - ${SQUIRRELDIR}/data/default_pref - ;; - POST-DEINSTALL) - if [ "${PKG_BATCH}" = "NO" ]; then - echo "If you are no longer going to use SquirrelMail" - echo "you should remove the /var/spool/squirrelmail" - echo "directory with:" - echo - echo " rm -rf /var/spool/squirrelmail" - fi - ;; - -esac diff --git a/mail/squirrelmail/files/pkg-install.in b/mail/squirrelmail/files/pkg-install.in deleted file mode 100644 index 0506ee7af3d..00000000000 --- a/mail/squirrelmail/files/pkg-install.in +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -PKG_BATCH=${BATCH:=NO} -PKG_PREFIX=${PKG_PREFIX:=/usr/local} - -SQUIRRELDIR=%%SQUIRRELDIR%% - -case $2 in -PRE-INSTALL) - exit 0 - ;; -POST-INSTALL) - if [ "${PKG_BATCH}" = "NO" ]; then - install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0755 /var/spool/squirrelmail - install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0730 /var/spool/squirrelmail/attach - install -d -o %%SMUSER%% -g %%SMGROUP%% -m 0750 /var/spool/squirrelmail/pref - if [ ! -f /var/spool/squirrelmail/pref/default_pref ]; then - cp -rp ${SQUIRRELDIR}/data/default_pref \ - /var/spool/squirrelmail/pref/default_pref - else - echo "" - echo "An older version of default_pref exists in" - echo "/var/spool/squirrelmail/pref, you may want to" - echo "compare it with the one in ${SQUIRRELDIR}/data" - fi - fi - ;; -esac diff --git a/mail/squirrelmail/files/pkg-message.in b/mail/squirrelmail/files/pkg-message.in index 8a024429f49..668eefdc848 100644 --- a/mail/squirrelmail/files/pkg-message.in +++ b/mail/squirrelmail/files/pkg-message.in @@ -1,20 +1,18 @@ +To activate SquirrelMail, you must complete the following steps: -You now need to add an alias to apache's httpd.conf pointing to -%%SQUIRRELDIR%% in order to access SquirrelMail from -your web browser, or create a VirtualHost with DocumentRoot set to -that directory. +1) Set up a VirtualHost or an alias in httpd.conf that points to + %%SQUIRRELDIR%% -For SquirrelMail to work properly you will need to make sure the -following option is set in your php.ini file: -file_uploads = On +2) Make sure the following is set in your php.ini: + file_uploads = On -If you have problems with SquirrelMail saying "you must login" after -you just have, the following php.ini option may help: -session.auto_start = 1 +3) If you have trouble logging in, add the following to your php.ini: + session.auto_start = 1 -In order to do your administrative configuration you need to -cd %%SQUIRRELDIR%% && ./configure -SquirrelMail will not work until this has been done. After this -step is complete, and the config.php is created, plugin ports will -properly auto activate. +4) Configure your installation. + SQUIRRELMAIL WILL NOT WORK UNTIL THIS HAS BEEN DONE. + cd %%SQUIRRELDIR%% && ./configure +5) It is best practice to change the data/user preference directory + (under General Options) to somewhere outside of + %%SQUIRRELDIR%%. diff --git a/mail/squirrelmail/pkg-plist b/mail/squirrelmail/pkg-plist index 998f2d112c5..a60315bdd17 100644 --- a/mail/squirrelmail/pkg-plist +++ b/mail/squirrelmail/pkg-plist @@ -1,4 +1,5 @@ etc/periodic/daily/111.clean-squirrelmail +%%SQUIRRELDIR%%/attach/.htaccess %%SQUIRRELDIR%%/class/.htaccess %%SQUIRRELDIR%%/class/deliver/Deliver.class.php %%SQUIRRELDIR%%/class/deliver/Deliver_IMAP.class.php @@ -22,12 +23,14 @@ etc/periodic/daily/111.clean-squirrelmail %%SQUIRRELDIR%%/config/.htaccess %%SQUIRRELDIR%%/config/conf.pl %%SQUIRRELDIR%%/config/config_default.php -@unexec if cmp -s %D%/www/squirrelmail/config/config_local.php %D%/www/squirrelmail/config/config_local.php.sample; then rm -f %D%/www/squirrelmail/config/config_local.php; fi +@unexec if cmp -s %D/www/squirrelmail/config/config_local.php %D/www/squirrelmail/config/config_local.php.sample; then rm -f %D/www/squirrelmail/config/config_local.php; fi %%SQUIRRELDIR%%/config/config_local.php.sample %%SQUIRRELDIR%%/config/index.php %%SQUIRRELDIR%%/configure %%SQUIRRELDIR%%/data/.htaccess -%%SQUIRRELDIR%%/data/default_pref +@unexec if cmp -s %D/www/squirrelmail/data/default_pref-dist %D/www/squirrelmail/data/default_pref; then rm -f %D/www/squirrelmail/data/default_pref; fi +%%SQUIRRELDIR%%/data/default_pref-dist +@exec if [ ! -f %D/www/squirrelmail/data/default_pref ]; then cp -p %D/%F %B/default_pref; fi %%SQUIRRELDIR%%/data/index.php %%SQUIRRELDIR%%/functions/.htaccess %%SQUIRRELDIR%%/functions/abook_database.php @@ -368,6 +371,8 @@ etc/periodic/daily/111.clean-squirrelmail %%SQUIRRELDIR%%/themes/simple_green_theme.php %%SQUIRRELDIR%%/themes/simple_purple.php %%SQUIRRELDIR%%/themes/slashdot_theme.php +%%SQUIRRELDIR%%/themes/solarized_dark.php +%%SQUIRRELDIR%%/themes/solarized_light.php %%SQUIRRELDIR%%/themes/spice_of_life.php %%SQUIRRELDIR%%/themes/spice_of_life_dark.php %%SQUIRRELDIR%%/themes/spice_of_life_lite.php @@ -441,6 +446,7 @@ etc/periodic/daily/111.clean-squirrelmail %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.20.txt %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.20RC1.txt %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.21.txt +%%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.22.txt %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.3.txt %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.3a.txt %%PORTDOCS%%%%DOCSDIR%%/release_notes_archive/1.4/Notes-1.4.4.txt @@ -457,6 +463,7 @@ etc/periodic/daily/111.clean-squirrelmail @dirrm %%SQUIRRELDIR%%/themes/css @dirrm %%SQUIRRELDIR%%/themes @dirrm %%SQUIRRELDIR%%/src +@dirrmtry %%SQUIRRELDIR%%/pref @dirrm %%SQUIRRELDIR%%/po @dirrm %%SQUIRRELDIR%%/plugins/translate @dirrm %%SQUIRRELDIR%%/plugins/test @@ -495,6 +502,7 @@ etc/periodic/daily/111.clean-squirrelmail @dirrm %%SQUIRRELDIR%%/class/helper @dirrm %%SQUIRRELDIR%%/class/deliver @dirrm %%SQUIRRELDIR%%/class +@dirrmtry %%SQUIRRELDIR%%/attach @dirrmtry %%SQUIRRELDIR%% @dirrmtry etc/periodic/daily @dirrmtry etc/periodic |