Update to pg_stats_reporter 3.2.1 to chase pg_statsinfo.

This commit is contained in:
landry 2016-05-13 22:30:25 +00:00
parent 9c817d924b
commit d4c7141a6d
5 changed files with 454 additions and 923 deletions

View File

@ -1,31 +1,33 @@
# $OpenBSD: Makefile,v 1.4 2016/03/19 23:59:15 naddy Exp $
# $OpenBSD: Makefile,v 1.5 2016/05/13 22:30:25 landry Exp $
COMMENT = graphical report tool for PostgreSQL
DISTNAME = pg_stats_reporter-1.0.1
DISTNAME = pg_stats_reporter-3.2.1
CATEGORIES = databases www
REVISION = 1
HOMEPAGE = http://pgstatsinfo.projects.pgfoundry.org/
HOMEPAGE = http://pgstatsinfo.sourceforge.net/
# GPLv2
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES = http://pgfoundry.org/frs/download.php/3437/
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=pgstatsinfo/}
NO_BUILD = Yes
NO_TEST = Yes
PREFIX = ${VARBASE}/www
INSTDIR = ${PREFIX}/pg_stats_reporter/
INSTDIR = ${PREFIX}/pg_stats_reporter_lib/
SUBST_VARS += INSTDIR
SUBST_VARS += INSTDIR MODPHP_BIN
MODULES = lang/php
RUN_DEPENDS = lang/php/${MODPHP_VERSION},-pgsql
RUN_DEPENDS = lang/php/${MODPHP_VERSION},-pgsql \
lang/php/${MODPHP_VERSION},-intl
do-install:
${INSTALL_DATA_DIR} ${INSTDIR}
${SUBST_CMD} -c -m 755 ${WRKSRC}/bin/pg_stats_reporter ${WRKINST}/usr/local/bin/pg_stats_reporter
cp -pR ${WRKSRC}/html/ ${PREFIX}/htdocs/
mv ${PREFIX}/htdocs/pg_stats_reporter/{pg_stats_reporter,index}.php
cp -pR ${WRKSRC}/pg_stats_reporter ${INSTDIR}
cp -pR ${WRKSRC}/pg_stats_reporter_lib ${PREFIX}
chown -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR} ${PREFIX}/htdocs/pg_stats_reporter/
chown www:www ${INSTDIR}/{cache,compiled}

View File

@ -1,2 +1,2 @@
SHA256 (pg_stats_reporter-1.0.1.tar.gz) = PzqYTxspYCGvSYUajeLXezN7Cv0ChYHLnNvlqow8qwI=
SIZE (pg_stats_reporter-1.0.1.tar.gz) = 2824019
SHA256 (pg_stats_reporter-3.2.1.tar.gz) = dCiSCwCe8dn1svh+bYtE2jiV7nEN2R8K4YRN9CkK1L8=
SIZE (pg_stats_reporter-3.2.1.tar.gz) = 1314155

View File

@ -0,0 +1,36 @@
$OpenBSD: patch-bin_pg_stats_reporter,v 1.1 2016/05/13 22:30:25 landry Exp $
--- bin/pg_stats_reporter.orig Thu Feb 18 06:11:25 2016
+++ bin/pg_stats_reporter Sat May 14 00:24:52 2016
@@ -1,4 +1,4 @@
-#! /usr/bin/php -qC
+#!${MODPHP_BIN} -qC
<?php
/*
* pg_stats_reporter commandline mode
@@ -214,7 +214,7 @@ foreach ($include_files as $f) {
}
// the variable SMARTY_PATH is defined in define.php
-if (!@include_once(($includePath = joinPathComponents($installDir, "html/pg_stats_reporter/".SMARTY_PATH."/Smarty.class.php"))))
+if (!@include_once(($includePath = joinPathComponents($installDir, "htdocs/pg_stats_reporter/".SMARTY_PATH."/Smarty.class.php"))))
elog(ERROR, "Failed to include file: %s", $includePath);
// read pg_stats_reporter.ini
@@ -795,7 +795,7 @@ function copyLibraryFile($installDir, $outputDir)
/* copy directories in pakage list */
foreach ($copyPackageList['dir'] as $dirName) {
- $src = joinPathComponents($installDir, "html/pg_stats_reporter/".$dirName);
+ $src = joinPathComponents($installDir, "htdocs/pg_stats_reporter/".$dirName);
$dst = joinPathComponents($outputDir, $dirName);
/* check whether or not the target directory exists */
@@ -821,7 +821,7 @@ function copyLibraryFile($installDir, $outputDir)
/* copy files in package list */
foreach ($copyPackageList['file'] as $fileName) {
- $src = joinPathComponents($installDir, "html/pg_stats_reporter/".$fileName);
+ $src = joinPathComponents($installDir, "htdocs/pg_stats_reporter/".$fileName);
$dst = joinPathComponents($outputDir, $fileName);
/* check whether or not the target directory exists */

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-html_pg_stats_reporter_pg_stats_reporter_php,v 1.1.1.1 2013/10/23 22:05:02 landry Exp $
workaround the fact that we dont have the php intl extension yet
--- html/pg_stats_reporter/pg_stats_reporter.php.orig Thu Oct 17 13:29:04 2013
+++ html/pg_stats_reporter/pg_stats_reporter.php Thu Oct 17 13:30:49 2013
@@ -113,7 +113,7 @@ if ($target_info['language'] == 'auto')
$target_locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
else
$target_locale = $target_info['language'];
-$msg_file = MESSAGE_PATH.MESSAGE_PREFIX.locale_lookup($locale_list, $target_locale, false, "en").MESSAGE_SUFFIX;
+$msg_file = MESSAGE_PATH.MESSAGE_PREFIX."en".MESSAGE_SUFFIX;
readMessageFile($msg_file, $help_message, $error_message);
/* レポートページ作成 */

File diff suppressed because it is too large Load Diff