Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Apr 2015 16:11:38 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r383142 - in head: russian/MT www/MT www/MT/files
Message-ID:  <201504031611.t33GBc56042894@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Fri Apr  3 16:11:38 2015
New Revision: 383142
URL: https://svnweb.freebsd.org/changeset/ports/383142

Log:
  www/MT,russian/MT: Upgrade version 5.2.11 => 5.2.12
  
  The port needed an overhaul, there were many issues with it.  After the
  initial fix, the maintainer also made it optionsNG compliant.
  
  Note that when the default MYSQL option is selected, it will fail
  check-plist as a result of the mysql ports not handling /var/db/mysql
  creation correctly.  To fix the check, the mysql ports need fixing.
  
  PR:		197588
  Submitted by:	takefu (airport.fm)
  overhaul by:	marino

Added:
  head/www/MT/files/pm.apache.in   (contents, props changed)
  head/www/MT/files/pm.default.in   (contents, props changed)
Deleted:
  head/www/MT/files/MT.conf.in
Modified:
  head/russian/MT/Makefile
  head/www/MT/Makefile
  head/www/MT/distinfo
  head/www/MT/pkg-plist

Modified: head/russian/MT/Makefile
==============================================================================
--- head/russian/MT/Makefile	Fri Apr  3 15:56:57 2015	(r383141)
+++ head/russian/MT/Makefile	Fri Apr  3 16:11:38 2015	(r383142)
@@ -3,7 +3,7 @@
 
 CATEGORIES=	russian www
 MASTER_SITES=	http://movable-type.ru/downloads/
-DISTNAME=	MTOS-5.2.11-${PKGNAMEPREFIX:S,-,,}
+DISTNAME=	MTOS-5.2.12-${PKGNAMEPREFIX:S,-,,}
 
 COMMENT=	Russian localization of the MovableType publishing system
 

Modified: head/www/MT/Makefile
==============================================================================
--- head/www/MT/Makefile	Fri Apr  3 15:56:57 2015	(r383141)
+++ head/www/MT/Makefile	Fri Apr  3 16:11:38 2015	(r383142)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	MT
-PORTVERSION=	5.2.11
-#PORTREVISION=	1
+PORTVERSION=	5.2.12
 PORTEPOCH=	1
 CATEGORIES?=	www
 MASTER_SITES?=	http://www.movabletype.org/downloads/stable/\
@@ -35,115 +34,89 @@ DB_DESC=		Choose Database
 PGSQL_DESC=		PostgreSQL database support[obsolete]
 SQLITE_DESC=		SQLite3 database support[obsolete]
 SQLITE2_DESC=		SQLite2 database support[obsolete]
+APACHE_USE=		APACHE_BUILD=22+
+
+OPTIONAL_MODULES_RUN_DEPENDS=\
+			p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser\
+			p5-libwww>=0:${PORTSDIR}/www/p5-libwww\
+			p5-SOAP-Lite>=0.5:${PORTSDIR}/net/p5-SOAP-Lite\
+			convert:${PORTSDIR}/graphics/ImageMagick-nox11\
+			p5-GD>=0:${PORTSDIR}/graphics/p5-GD\
+			p5-Imager>=0:${PORTSDIR}/graphics/p5-Imager \
+			p5-Crypt-DSA>=0:${PORTSDIR}/security/p5-Crypt-DSA\
+			p5-MIME-Base64>=0:${PORTSDIR}/converters/p5-MIME-Base64\
+			p5-XML-Atom>=0:${PORTSDIR}/textproc/p5-XML-Atom\
+			p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip\
+			p5-Text-Balanced>=0:${PORTSDIR}/textproc/p5-Text-Balanced\
+			p5-XML-LibXML>=1.7:${PORTSDIR}/textproc/p5-XML-LibXML
+ADDITIONAL_MODULES_RUN_DEPENDS=\
+			p5-Digest-MD5>=0:${PORTSDIR}/security/p5-Digest-MD5\
+			p5-Digest-SHA1>=0:${PORTSDIR}/security/p5-Digest-SHA1\
+			p5-IPC-Run>=0:${PORTSDIR}/devel/p5-IPC-Run\
+			p5-Mail-Sendmail>=0:${PORTSDIR}/mail/p5-Mail-Sendmail\
+			p5-perl-ldap>=0:${PORTSDIR}/net/p5-perl-ldap\
+			p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser\
+			p5-XML-SAX>=0:${PORTSDIR}/textproc/p5-XML-SAX\
+			p5-Cache-Memcached>=0:${PORTSDIR}/databases/p5-Cache-Memcached\
+			p5-Cache>=0:${PORTSDIR}/devel/p5-Cache
+SSL_RUN_DEPENDS=	p5-Net-SMTP-SSL>=0:${PORTSDIR}/mail/p5-Net-SMTP-SSL\
+			p5-Crypt-SSLeay>=0:${PORTSDIR}/security/p5-Crypt-SSLeay\
+			p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL\
+			p5-Net-SSLeay>=0:${PORTSDIR}/security/p5-Net-SSLeay
+TLS_RUN_DEPENDS=	p5-Net-SMTP-SSL>=0:${PORTSDIR}/mail/p5-Net-SMTP-SSL\
+			p5-Net-SMTP-TLS>=0:${PORTSDIR}/mail/p5-Net-SMTP-TLS
+MYSQL_RUN_DEPENDS=	p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql
+MYSQL_USE=		mysql=server
+PGSQL_RUN_DEPENDS=	p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg
+SQLITE_USE=		SQLITE=yes
+SQLITE_RUN_DEPENDS=	p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
+SQLITE2_USE=		SQLITE=2
+SQLITE2_RUN_DEPENDS=	p5-DBD-SQLite2>=0:${PORTSDIR}/databases/p5-DBD-SQLite2
+ORACLE_RUN_DEPENDS=	p5-DBD-Oracle>=0.19:${PORTSDIR}/databases/p5-DBD-Oracle
+ODBC_RUN_DEPENDS=	p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC
+PSGI_RUN_DEPENDS=	p5-CGI-PSGI>0:${PORTSDIR}/www/p5-CGI-PSGI\
+			p5-CGI-Emulate-PSGI>=0.06:${PORTSDIR}/www/p5-CGI-Emulate-PSGI\
+			p5-Plack>=0:${PORTSDIR}/www/p5-Plack\
+			p5-SOAP-Transport-HTTP-Plack>=0:${PORTSDIR}/www/p5-SOAP-Transport-HTTP-Plack
 
 .include <bsd.port.options.mk>
 
 DATADIR=	www/data
 CGIDIR=		www/cgi-bin/mt
 
-SUB_LIST+=	CGIDIR=${CGIDIR}\
-		PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME}
-PLIST_SUB+=	DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR}\
+SUB_LIST+=	CGIDIR=${CGIDIR} \
+		PACKAGENAME=${PKGNAMEPREFIX}${PORTNAME} \
+		MT_LANG=${MT_LANG:tl}
+PLIST_SUB+=	DATADIR=${DATADIR} CGIDIR=${CGIDIR} DB_DIR=${DB_DIR} \
 		WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
+SUB_FILES=	pm.apache pm.default
+PKGMESSAGE=	${WRKDIR}/pkg-message
 
 USES=		perl5 shebangfix
 USE_PERL5=	run
 SHEBANG_FILES=	*.cgi
 NO_ARCH=	yes
 NO_BUILD=	yes
-MT_DOCS_URL?=	http://www.movabletype.org/documentation/
 MT_UPGRADE_URL?=http://www.movabletype.org/documentation/installation/upgrade-movable-type.html
 
 MT_LANG?=	EN
 .if ${MT_LANG} == RU
 PLIST_SUB+=	LANG_RU=""
 .else
+MT_LANG=
 PLIST_SUB+=	LANG_RU="@comment "
 .endif
 
-.if ${PORT_OPTIONS:MOPTIONAL_MODULES}
-RUN_DEPENDS+=	p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser\
-		p5-libwww>=0:${PORTSDIR}/www/p5-libwww\
-		p5-SOAP-Lite>=0.5:${PORTSDIR}/net/p5-SOAP-Lite\
-		convert:${PORTSDIR}/graphics/ImageMagick-nox11\
-		p5-GD>=0:${PORTSDIR}/graphics/p5-GD\
-		p5-Imager>=0:${PORTSDIR}/graphics/p5-Imager \
-		p5-Crypt-DSA>=0:${PORTSDIR}/security/p5-Crypt-DSA\
-		p5-MIME-Base64>=0:${PORTSDIR}/converters/p5-MIME-Base64\
-		p5-XML-Atom>=0:${PORTSDIR}/textproc/p5-XML-Atom\
-		p5-Archive-Zip>=0:${PORTSDIR}/archivers/p5-Archive-Zip\
-		p5-Text-Balanced>=0:${PORTSDIR}/textproc/p5-Text-Balanced\
-		p5-XML-LibXML>=1.7:${PORTSDIR}/textproc/p5-XML-LibXML
-.endif
-.if ${PORT_OPTIONS:MADDITIONAL_MODULES}
-RUN_DEPENDS+=	p5-Digest-MD5>=0:${PORTSDIR}/security/p5-Digest-MD5\
-		p5-Digest-SHA1>=0:${PORTSDIR}/security/p5-Digest-SHA1\
-		p5-IPC-Run>=0:${PORTSDIR}/devel/p5-IPC-Run\
-		p5-Mail-Sendmail>=0:${PORTSDIR}/mail/p5-Mail-Sendmail\
-		p5-perl-ldap>=0:${PORTSDIR}/net/p5-perl-ldap\
-		p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser\
-		p5-XML-SAX>=0:${PORTSDIR}/textproc/p5-XML-SAX\
-		p5-Cache-Memcached>=0:${PORTSDIR}/databases/p5-Cache-Memcached\
-		p5-Cache>=0:${PORTSDIR}/devel/p5-Cache
-.endif
-.if ${PORT_OPTIONS:MSSL} || ${PORT_OPTIONS:MTLS}
-RUN_DEPENDS+=	p5-Net-SMTP-SSL>=0:${PORTSDIR}/mail/p5-Net-SMTP-SSL
-. if ${PORT_OPTIONS:MSSL}
-RUN_DEPENDS+=	p5-Crypt-SSLeay>=0:${PORTSDIR}/security/p5-Crypt-SSLeay\
-		p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL\
-		p5-Net-SSLeay>=0:${PORTSDIR}/security/p5-Net-SSLeay
-. endif
-. if ${PORT_OPTIONS:MTLS}
-RUN_DEPENDS+=	p5-Net-SMTP-TLS>=0:${PORTSDIR}/mail/p5-Net-SMTP-TLS
-. endif
-.endif
+.include <bsd.port.options.mk>
+
 .if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL=	server
-DB_DIR?=	${BASEDIR}/var/db/mysql/WEBLOG_DATABASEDIR
-RUN_DEPENDS+=	p5-DBD-mysql>=2.9005:${PORTSDIR}/databases/p5-DBD-mysql
+DB_DIR?=	/var/db/mysql/WEBLOG_DATABASEDIR
 .endif
 .if ${PORT_OPTIONS:MPGSQL}
-USES+=	pgsql
 WANT_PGSQL=	server
-RUN_DEPENDS+=	p5-DBD-Pg>=1.32:${PORTSDIR}/databases/p5-DBD-Pg
 .endif
 .if empty(PORT_OPTIONS:MPGSQL) && empty(PORT_OPTIONS:MMYSQL)
 DB_DIR?=	${PREFIX}/${CGIDIR}/db
-. if ${PORT_OPTIONS:MSQLITE}
-USE_SQLITE=	yes
-RUN_DEPENDS+=	p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite
-. endif
-. if ${PORT_OPTIONS:MSQLITE2}
-USE_SQLITE=	2
-RUN_DEPENDS+=	p5-DBD-SQLite2>=0:${PORTSDIR}/databases/p5-DBD-SQLite2
-. endif
-.endif
-.if ${PORT_OPTIONS:MORACLE}
-RUN_DEPENDS+=	p5-DBD-Oracle>=0.19:${PORTSDIR}/databases/p5-DBD-Oracle
-.endif
-.if ${PORT_OPTIONS:MODBC}
-RUN_DEPENDS+=	p5-DBD-ODBC>=1.13:${PORTSDIR}/databases/p5-DBD-ODBC
-.endif
-
-.if ${PORT_OPTIONS:MAPACHE}
-USE_APACHE_BUILD=	22+
-SUB_FILES+=	MT.conf
-SUB_LIST+=	APACHEETCDIR=${PREFIX}/${APACHEETCDIR}
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} <= 22)
-SUB_LIST+=	APACHE22="" APACHE24="\#" MODULE=mod_alias.c
-.elif ${PORT_OPTIONS:MAPACHE} && (${APACHE_VERSION} >= 24)
-SUB_LIST+=	APACHE22="\#" APACHE24="" MODULE=alias_module
-.endif
-
-.if ${PORT_OPTIONS:MPSGI}
-RUN_DEPENDS+=	p5-CGI-PSGI>0:${PORTSDIR}/www/p5-CGI-PSGI\
-		p5-CGI-Emulate-PSGI>=0.06:${PORTSDIR}/www/p5-CGI-Emulate-PSGI\
-		p5-Plack>=0:${PORTSDIR}/www/p5-Plack\
-		p5-SOAP-Transport-HTTP-Plack>=0:${PORTSDIR}/www/p5-SOAP-Transport-HTTP-Plack
 .endif
 
 pre-everything::
@@ -165,40 +138,32 @@ pre-everything::
 .endif
 
 do-install:
-	@${FIND} ${WRKSRC}/* -name "*.orig" -delete
+	${FIND} ${WRKSRC}/ -name "*.orig" -delete
 	@${ECHO_MSG} "Installing cgi under ${PREFIX}/${CGIDIR}/"
-	@${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}
-	@cd ${WRKSRC} && ${CP} -R *.cgi mt.psgi mt-config.cgi-original \
-	  alt-tmpl default_templates extlib import lib php plugins \
-	  search_templates themes tmpl tools COPYING index.html readme.html \
-	  ${STAGEDIR}${PREFIX}/${CGIDIR}
+	@${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}/alt-tmpl \
+		${STAGEDIR}${PREFIX}/${CGIDIR}/import \
+		${STAGEDIR}${PREFIX}/${DATADIR} \
+		${STAGEDIR}${DB_DIR}
+.for tree in tools themes default_templates extlib plugins search_templates \
+	lib tmpl php
+	(cd ${WRKSRC} && \
+		${COPYTREE_SHARE} ${tree} ${STAGEDIR}${PREFIX}/${CGIDIR}/)
+.endfor
+	(cd ${WRKSRC} && \
+		${INSTALL_DATA} *.cgi mt-config.cgi-original mt.psgi COPYING \
+		index.html readme.html ${STAGEDIR}${PREFIX}/${CGIDIR}/)
 	@${ECHO_MSG} "Installing data under ${PREFIX}/${DATADIR}/"
-	@${MKDIR} ${STAGEDIR}${PREFIX}/${DATADIR}
-	@cd ${WRKSRC} && ${CP} -R mt-static ${STAGEDIR}${PREFIX}/${DATADIR}
-	@${MKDIR} ${STAGEDIR}${DB_DIR}
+	(cd ${WRKSRC} && \
+		${COPYTREE_SHARE} mt-static ${STAGEDIR}${PREFIX}/${DATADIR})
 
-post-install:
-	@${ECHO_MSG} "*****************************************************************"
-	@${ECHO_CMD} ""
-	@${ECHO_MSG} "You have just installed the movabletype."
-	@${ECHO_CMD} ""
+post-stage:
 .if ${PORT_OPTIONS:MAPACHE}
-	@${ECHO_MSG} "Note that you should restart your Apache web server to ensure that"
-	@${ECHO_MSG} "the "${PKGNAMEPREFIX}"MT configuration file is loaded."
-	@${ECHO_CMD} ""
-	@${ECHO_MSG} "Then browse to http://localhost/MTcgi/mt.cgi"
-	@${ECHO_CMD} ""
-	@${ECHO_MSG} "Please add the following to your apache config, and restart."
-	@${ECHO_CMD} ""
-	@${CAT} ${WRKDIR}/MT.conf
-	@${ECHO_CMD} ""
-	@${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes
-	${INSTALL_DATA} ${WRKDIR}/MT.conf \
-	  ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/Includes/MT.conf
+	# APACHE_VERSION hasn't been evaluated yet, so .if can't be used
+	${REINPLACE_CMD} -e 's|%%APACHE${APACHE_VERSION}%%||' \
+		-e '/^%%APACHE/d' ${WRKDIR}/pm.apache
+	${MV} ${WRKDIR}/pm.apache ${WRKDIR}/pkg-message
 .else
-	@${ECHO_CMD} ""
+	${MV} ${WRKDIR}/pm.default ${WRKDIR}/pkg-message
 .endif
-	@${ECHO_MSG} "Please read the documentation: ${MT_DOCS_URL}"
-	@${ECHO_CMD} ""
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/www/MT/distinfo
==============================================================================
--- head/www/MT/distinfo	Fri Apr  3 15:56:57 2015	(r383141)
+++ head/www/MT/distinfo	Fri Apr  3 16:11:38 2015	(r383142)
@@ -1,4 +1,4 @@
-SHA256 (MTOS-5.2.11.tar.gz) = 561384c0793d0d47b3944ca83985771dc40afbe3111118bc61ba275ead5cc987
-SIZE (MTOS-5.2.11.tar.gz) = 7957340
-SHA256 (MTOS-5.2.11-ru.tar.gz) = 8747acb7799dc15bc201d6a2a39cf797c1597bf4520c954d74935d736c8e519a
-SIZE (MTOS-5.2.11-ru.tar.gz) = 8095449
+SHA256 (MTOS-5.2.12.tar.gz) = ee07575399ea42b4b7c05405738bba71e36eb1a5fc8aef37f2a4c8666c7f43a5
+SIZE (MTOS-5.2.12.tar.gz) = 7957668
+SHA256 (MTOS-5.2.12-ru.tar.gz) = bca96d002aea57dc34a05e0ac8b4ad2bc97a79ad41f5cef4af991d0af54c06a0
+SIZE (MTOS-5.2.12-ru.tar.gz) = 8097317

Added: head/www/MT/files/pm.apache.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/MT/files/pm.apache.in	Fri Apr  3 16:11:38 2015	(r383142)
@@ -0,0 +1,37 @@
+**************************************************************************
+ You have just installed the movabletype.
+ Please read the documentation: http://www.movabletype.org/documentation/
+
+ Note that you should restart your Apache web server to ensure that
+ the %%MT_LANG%%MT configuration file is loaded, and then set
+ browser to http://localhost/MTcgi/mt.cgi
+
+ Please add the following to your apache config, and restart:
+
+#
+# Directives to allow use of %%PACKAGENAME%% as a CGI
+#
+%%APACHE22%%<IfModule mod_alias.c>
+%%APACHE24%%<IfModule alias_module>
+	Alias /MT "%%PREFIX%%/%%DATADIR%%/mt-static"
+	Alias /MTcgi "%%PREFIX%%/%%CGIDIR%%"
+</IfModule>
+
+#
+# This is to permit URL access to scripts/files in %%PACKAGENAME%% directory.
+#
+<Directory "%%PREFIX%%/%%CGIDIR%%">
+	Options ExecCGI
+%%APACHE22%%	Order allow,deny
+%%APACHE22%%	Allow from all
+%%APACHE24%%	Require all granted
+%%APACHE24%%	SetHandler cgi-script
+</Directory>
+<Directory "%%PREFIX%%/%%DATADIR%%/mt-static">
+	Options None
+%%APACHE22%%	Order allow,deny
+%%APACHE22%%	Allow from all
+%%APACHE24%%	Require all granted
+</Directory>
+
+**************************************************************************

Added: head/www/MT/files/pm.default.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/MT/files/pm.default.in	Fri Apr  3 16:11:38 2015	(r383142)
@@ -0,0 +1,4 @@
+**************************************************************************
+ You have just installed the movabletype.
+ Please read the documentation: http://www.movabletype.org/documentation/
+**************************************************************************

Modified: head/www/MT/pkg-plist
==============================================================================
--- head/www/MT/pkg-plist	Fri Apr  3 15:56:57 2015	(r383141)
+++ head/www/MT/pkg-plist	Fri Apr  3 16:11:38 2015	(r383142)
@@ -3317,7 +3317,6 @@
 %%LANG_RU%%%%DATADIR%%/mt-static/styles_ru.css
 @owner
 @group
-%%APACHE%%%%APACHEETCDIR%%/Includes/MT.conf
 @dir %%CGIDIR%%/alt-tmpl
 @dir %%CGIDIR%%/extlib/MT/L10N
 @dir %%CGIDIR%%/import
@@ -3325,4 +3324,3 @@
 @dir %%CGIDIR%%/php/plugins
 @dir %%DATADIR%%/mt-static/support
 %%MYSQL%%@dir(mysql,mysql,) %%DB_DIR%%
-%%MYSQL%%@dir(mysql,mysql,) /var/db/mysql



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504031611.t33GBc56042894>