aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/pivotx/Makefile27
-rw-r--r--www/pivotx/files/patch-example.htaccess11
-rw-r--r--www/pivotx/files/patch-module_smarty.php11
-rw-r--r--www/pivotx/files/pkg-message.in2
-rw-r--r--www/pivotx/pkg-plist7
5 files changed, 44 insertions, 14 deletions
diff --git a/www/pivotx/Makefile b/www/pivotx/Makefile
index 8eb585ad85fc..bf58198f3632 100644
--- a/www/pivotx/Makefile
+++ b/www/pivotx/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pivotx
PORTVERSION= 2.3.3
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= SF/pivot-weblog/PivotX \
http://pivotx.net/files/ \
@@ -19,8 +20,8 @@ COMMENT= Software to help you maintain dynamic sites such as weblogs
LICENSE= GPLv2
-DOCS= LICENSE.txt README.txt example.htaccess
-DOCS_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-${PORTREVISION}-docs
+PORTDOCS= LICENSE.txt README.txt
+PORTEXAMPLES= example.htaccess
# Requirements:
# http://book.pivotx.net/index.php?page=app-e#anchor-determining-if-your-server-meets-pivotxs-requirements
@@ -68,13 +69,17 @@ post-extract:
@${MKDIR} '${TEMP_WRKSRC}'
@${MV} '${WRKDIR}/'* '${TEMP_WRKSRC}'
@${MV} '${TEMP_WRKSRC}' '${WRKSRC}'
- @${MKDIR} '${DOCS_WRKSRC}'
-.for FILES in ${DOCS}
- @${MV} '${WRKSRC}/${FILES}' '${DOCS_WRKSRC}'
+ @${MKDIR} '${TEMP_WRKSRC}'
+.for FILES in ${PORTDOCS}
+ @${MV} '${WRKSRC}/${FILES}' '${TEMP_WRKSRC}'
.endfor
post-patch:
- @cd '${WRKSRC}' && { ${FIND} . -type f -name '*.orig' -print0 | ${XARGS} -0 -J % ${MV} % '${DOCS_WRKSRC}'; }
+.for FILES in ${PORTEXAMPLES}
+ @${SED} -e 's#%%BLOGURL%%#${BLOGURL}#g' '${WRKSRC}/${FILES}' >'${TEMP_WRKSRC}/${FILES}'
+ @${RM} -f '${WRKSRC}/${FILES}'
+.endfor
+ @cd '${WRKSRC}' && ${FIND} . -type f -name '*.orig' -delete
do-install:
@if ${TEST} -e '${TEMP_DIFF}'; then ${RM} -f '${TEMP_DIFF}'; fi
@@ -96,7 +101,15 @@ do-install:
fi
.if !defined(NOPORTDOCS)
@${MKDIR} '${DOCSDIR}'
- @cd '${DOCS_WRKSRC}' && ${COPYTREE_SHARE} . '${DOCSDIR}'
+.for FILES in ${PORTDOCS}
+ @${INSTALL_DATA} '${TEMP_WRKSRC}/${FILES}' '${DOCSDIR}'
+.endfor
+.endif
+.if !defined(NOPORTEXAMPLES)
+ @${MKDIR} '${EXAMPLESDIR}'
+.for FILES in ${PORTEXAMPLES}
+ @${INSTALL_DATA} '${TEMP_WRKSRC}/${FILES}' '${EXAMPLESDIR}'
+.endfor
.endif
@${MKDIR} '${WWWDIR}'
@cd '${WRKSRC}' && ${COPYTREE_SHARE} . '${WWWDIR}'
diff --git a/www/pivotx/files/patch-example.htaccess b/www/pivotx/files/patch-example.htaccess
new file mode 100644
index 000000000000..8192c46e0809
--- /dev/null
+++ b/www/pivotx/files/patch-example.htaccess
@@ -0,0 +1,11 @@
+--- example.htaccess.orig 2012-01-23 01:55:33.000000000 +0900
++++ example.htaccess 2012-06-25 20:28:53.000000000 +0900
+@@ -13,7 +13,7 @@
+ #php_flag magic_quotes_gpc 0
+
+ RewriteEngine On
+-# RewriteBase /
++RewriteBase /%%BLOGURL%%
+
+ # Standard PivotX rules for non-crufty URLs. The rules always work, but non-crufty
+ # URL must be enabled in the PivotX configuration too before they are actually used.
diff --git a/www/pivotx/files/patch-module_smarty.php b/www/pivotx/files/patch-module_smarty.php
new file mode 100644
index 000000000000..80af8cf6c85c
--- /dev/null
+++ b/www/pivotx/files/patch-module_smarty.php
@@ -0,0 +1,11 @@
+--- pivotx/modules/module_smarty.php.orig 2012-04-13 00:04:12.000000000 +0900
++++ pivotx/modules/module_smarty.php 2012-06-14 20:57:40.000000000 +0900
+@@ -5439,7 +5439,7 @@
+ /**
+ * @see $smarty->register_resource
+ */
+-function dbGetTemplate($tpl_name, $tpl_source, &$smarty_obj) {
++function dbGetTemplate($tpl_name, &$tpl_source, &$smarty_obj) {
+
+ if (isset($smarty_obj->custom_template[ $tpl_name ])) {
+ $tpl_source = $smarty_obj->custom_template[ $tpl_name ];
diff --git a/www/pivotx/files/pkg-message.in b/www/pivotx/files/pkg-message.in
index 75e97403f8da..b9ff9dcf13b9 100644
--- a/www/pivotx/files/pkg-message.in
+++ b/www/pivotx/files/pkg-message.in
@@ -26,7 +26,7 @@ Adding the above alias allows you to access the admin page at
http://localhost/%%BLOGURL%%/pivotx/
Use usernames that are hard to guess.
-%%DOCSDIR%%/example.htaccess is a sample .htaccess for %%WWWDIR%%.
+%%EXAMPLESDIR%%/example.htaccess is a sample .htaccess for %%WWWDIR%%.
Setting date.timezone of %%PREFIX%%/etc/php.ini in POSIX style may
ease your life.
diff --git a/www/pivotx/pkg-plist b/www/pivotx/pkg-plist
index d60d2c1c295e..f67dae5dfcb0 100644
--- a/www/pivotx/pkg-plist
+++ b/www/pivotx/pkg-plist
@@ -1,7 +1,3 @@
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt
-%%PORTDOCS%%%%DOCSDIR%%/README.txt
-%%PORTDOCS%%%%DOCSDIR%%/example.htaccess
-%%PORTDOCS%%%%DOCSDIR%%/data.php.orig
%%WWWDIR%%/images/index.html
%%WWWDIR%%/index.php
%%WWWDIR%%/pivotx/ajaxhelper.php
@@ -957,8 +953,7 @@
@dirrmtry %%WWWDIR%%/pivotx/db/rsscache
@dirrmtry %%WWWDIR%%/pivotx/db/refkeys
@dirrmtry %%WWWDIR%%/pivotx/db/cache
-@dirrm %%WWWDIR%%/pivotx/db
+@dirrmtry %%WWWDIR%%/pivotx/db
@dirrmtry %%WWWDIR%%/pivotx
@dirrm %%WWWDIR%%/images
@dirrmtry %%WWWDIR%%
-%%PORTDOCS%%@dirrm %%DOCSDIR%%