pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/viewvc



Module Name:    pkgsrc
Committed By:   hauke
Date:           Fri Aug 18 22:20:49 UTC 2023

Modified Files:
        pkgsrc/www/viewvc: Makefile PLIST distinfo
Added Files:
        pkgsrc/www/viewvc/patches: patch-conf_viewvc.conf.dist
            patch-lib_viewvc.py patch-viewvc-install
Removed Files:
        pkgsrc/www/viewvc: MESSAGE
        pkgsrc/www/viewvc/patches: patch-aa patch-ab

Log Message:
Rework the www/viewvc package some:

Put the preferences under PKG_SYSCONFDIR
Pre-set pkgsrc-dependend viewvc.conf entries
Lose the MESSAGE, it was pointless
Install the docs


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/www/viewvc/MESSAGE
cvs rdiff -u -r1.43 -r1.44 pkgsrc/www/viewvc/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/www/viewvc/PLIST
cvs rdiff -u -r1.22 -r1.23 pkgsrc/www/viewvc/distinfo
cvs rdiff -u -r1.5 -r0 pkgsrc/www/viewvc/patches/patch-aa \
    pkgsrc/www/viewvc/patches/patch-ab
cvs rdiff -u -r0 -r1.1 pkgsrc/www/viewvc/patches/patch-conf_viewvc.conf.dist \
    pkgsrc/www/viewvc/patches/patch-lib_viewvc.py \
    pkgsrc/www/viewvc/patches/patch-viewvc-install

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/viewvc/Makefile
diff -u pkgsrc/www/viewvc/Makefile:1.43 pkgsrc/www/viewvc/Makefile:1.44
--- pkgsrc/www/viewvc/Makefile:1.43     Thu Aug 17 21:26:49 2023
+++ pkgsrc/www/viewvc/Makefile  Fri Aug 18 22:20:49 2023
@@ -1,68 +1,85 @@
-# $NetBSD: Makefile,v 1.43 2023/08/17 21:26:49 hauke Exp $
+# $NetBSD: Makefile,v 1.44 2023/08/18 22:20:49 hauke Exp $
 
 DISTNAME=      viewvc-1.2.3
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=viewvc/}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://www.viewvc.org/
+HOMEPAGE=      https://www.viewvc.org/
 COMMENT=       Viewing the content of CVS/SVN repositories with a Webbrowser
 LICENSE=       2-clause-bsd
 
 REPLACE_PYTHON=        viewvc-install bin/* bin/cgi/*.cgi lib/*.py
 # https://github.com/viewvc/viewvc/issues/138
-PYTHON_VERSIONS_ACCEPTED=      27 # not yet ported as of 1.1.27
+PYTHON_VERSIONS_ACCEPTED=      27      # not yet ported as of 1.2.3
 
-.if !exists(/usr/bin/rlog)
-DEPENDS+=      rcs-[0-9]*:../../devel/rcs
-RCS_PKG=       YES
+.if exists(/usr/bin/rlog)
+RCSPATH=       /usr/bin
 .else
-RCS_PKG=       NO
+DEPENDS+=      rcs-[0-9]*:../../devel/rcs
+RCSPATH=       ${PREFIX}/bin
 .endif
 
 NO_BUILD=      YES
+
+DOCDIR=                share/doc/viewvc
+EGDIR=         share/examples/viewvc
 VIEWVCDIR=     share/viewvc
-PLIST_SUBST+=  VIEWVCDIR=${VIEWVCDIR:Q}
 
-CONF_FILES=    ${PREFIX}/share/examples/viewvc/viewvc.conf \
-               ${PREFIX}/${VIEWVCDIR:Q}/viewvc.conf
-CONF_FILES+=   ${PREFIX}/share/examples/viewvc/cvsgraph.conf \
-               ${PREFIX}/${VIEWVCDIR:Q}/cvsgraph.conf
+CFGFILES=      cvsgraph.conf mimetypes.conf viewvc.conf
+DOCFILES=      CHANGES INSTALL \
+               docs/template-authoring-guide.html \
+               docs/upgrading-howto.html \
+               docs/url-reference.html
+
+PKG_SYSCONFSUBDIR=     viewvc
+
+.for cfg in ${CFGFILES}
+CONF_FILES+=           ${EGDIR}/${cfg} ${PKG_SYSCONFDIR}/${cfg}
+.endfor
+
+PLIST_SUBST+=          VIEWVCDIR=${VIEWVCDIR:Q}
+
+PRINT_PLIST_AWK+=      { gsub(/^${VIEWVCDIR:S|/|\\/|g}/, "$${VIEWVCDIR}"); }
 
 .include "options.mk"
 
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_MESSAGE.paths=   Fixing pkgsrc paths.
+SUBST_FILES.paths+=    lib/viewvc.py
+SUBST_FILES.paths+=    viewvc-install
+SUBST_VARS.paths=      PREFIX PKG_SYSCONFDIR
+
+DIFF=                  ${TOOLS_PATH.diff}
+
 SUBST_CLASSES+=                conf
 SUBST_STAGE.conf=      pre-configure
 SUBST_MESSAGE.conf=    Fixing configuration files.
 SUBST_FILES.conf=      conf/viewvc.conf.dist
-SUBST_VARS.conf=       PREFIX PKG_SYSCONFDIR
-SUBST_VARS.conf+=      VIEWVCDIR PHP_OPT CVSGRAPH_OPT
-.if defined(RCS_PKG) && ${RCS_PKG} == "YES"
-SUBST_SED.conf+=       -e "s|@RCS_PREFIX@|${PREFIX}|g"
-.else
-SUBST_SED.conf+=       -e "s|@RCS_PREFIX@|/usr|g"
-.endif
+SUBST_VARS.conf=       PREFIX PKG_SYSCONFBASE PKG_SYSCONFDIR
+SUBST_VARS.conf+=      VIEWVCDIR DIFF RCSPATH CVSGRAPH_OPT
 
 CHECK_PORTABILITY_SKIP=        tools/make-release
 
-INSTALLATION_DIRS=     share/examples/viewvc
+INSTALLATION_DIRS=     ${DOCDIR} ${EGDIR}
 
 do-install:
-       (cd ${WRKSRC} && \
-               ${PYTHONBIN} \
-               viewvc-install --prefix=${PREFIX}/${VIEWVCDIR} --destdir=${DESTDIR})
-
-       ${INSTALL_DATA} ${WRKSRC}/conf/viewvc.conf.dist \
-               ${DESTDIR}${PREFIX}/share/examples/viewvc/viewvc.conf
-       ${INSTALL_DATA} ${WRKSRC}/conf/cvsgraph.conf.dist \
-               ${DESTDIR}${PREFIX}/share/examples/viewvc/cvsgraph.conf
+       (cd ${WRKSRC} && ${PYTHONBIN} viewvc-install \
+               --prefix=${PREFIX}/${VIEWVCDIR} --destdir=${DESTDIR})
+.for cfg in ${CFGFILES}
+       ${INSTALL_DATA} ${WRKSRC}/conf/${cfg}.dist \
+               ${DESTDIR}${PREFIX}/${EGDIR}/${cfg}
+.endfor
+.for doc in ${DOCFILES}
+       ${INSTALL_DATA} ${WRKSRC}/${doc} \
+               ${DESTDIR}${PREFIX}/${DOCDIR}/${doc:T}
+.endfor
 
 post-install:
-       ${CHMOD} ${SHAREMODE} \
-               ${DESTDIR}/${PREFIX}/share/viewvc/bin/mod_python/.htaccess
-       ${CHMOD} ${SHAREMODE} \
-               ${DESTDIR}/${PREFIX}/share/viewvc/bin/mod_python/*.py
+       ( cd ${DESTDIR}/${PREFIX}/${VIEWVCDIR}/bin/mod_python ; \
+               ${CHMOD} ${SHAREMODE} .htaccess *.py)
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/www/viewvc/PLIST
diff -u pkgsrc/www/viewvc/PLIST:1.6 pkgsrc/www/viewvc/PLIST:1.7
--- pkgsrc/www/viewvc/PLIST:1.6 Tue Mar 17 22:14:15 2020
+++ pkgsrc/www/viewvc/PLIST     Fri Aug 18 22:20:49 2023
@@ -1,5 +1,11 @@
-@comment $NetBSD: PLIST,v 1.6 2020/03/17 22:14:15 wiz Exp $
+@comment $NetBSD: PLIST,v 1.7 2023/08/18 22:20:49 hauke Exp $
+share/doc/viewvc/CHANGES
+share/doc/viewvc/INSTALL
+share/doc/viewvc/template-authoring-guide.html
+share/doc/viewvc/upgrading-howto.html
+share/doc/viewvc/url-reference.html
 share/examples/viewvc/cvsgraph.conf
+share/examples/viewvc/mimetypes.conf
 share/examples/viewvc/viewvc.conf
 ${VIEWVCDIR}/bin/cgi/viewvc.cgi
 ${VIEWVCDIR}/bin/cvsdbadmin

Index: pkgsrc/www/viewvc/distinfo
diff -u pkgsrc/www/viewvc/distinfo:1.22 pkgsrc/www/viewvc/distinfo:1.23
--- pkgsrc/www/viewvc/distinfo:1.22     Thu Aug 17 21:26:49 2023
+++ pkgsrc/www/viewvc/distinfo  Fri Aug 18 22:20:49 2023
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.22 2023/08/17 21:26:49 hauke Exp $
+$NetBSD: distinfo,v 1.23 2023/08/18 22:20:49 hauke Exp $
 
 BLAKE2s (viewvc-1.2.3.tar.gz) = 4efe844e1fedca51c40245d61c96e951b30db0fb9081e54230459a508be19144
 SHA512 (viewvc-1.2.3.tar.gz) = dd5fd1d01629e7e6894e3bd244579a3581883ffb18f66e4ca44b911a5bc41810fcdd1176bfdbf0b88c943780b61c1af2a35c4dd8d757b9e10ff00d560eee0a0f
 Size (viewvc-1.2.3.tar.gz) = 361272 bytes
-SHA1 (patch-aa) = ff0a6e52ea66c838ba3ab7b1d055c27bf561a376
-SHA1 (patch-ab) = 5be3c5eb60e58341510a96c5a2cab230beec956e
+SHA1 (patch-conf_viewvc.conf.dist) = 44d16cc79e02bac4639a61235b6685ab8c56c26d
+SHA1 (patch-lib_viewvc.py) = d6ba030b22b4284d36edec3f482394b97f30c19a
+SHA1 (patch-viewvc-install) = e05fa7219d8a55b0359336b2f08cef20c4bf6cfa

Added files:

Index: pkgsrc/www/viewvc/patches/patch-conf_viewvc.conf.dist
diff -u /dev/null pkgsrc/www/viewvc/patches/patch-conf_viewvc.conf.dist:1.1
--- /dev/null   Fri Aug 18 22:20:49 2023
+++ pkgsrc/www/viewvc/patches/patch-conf_viewvc.conf.dist       Fri Aug 18 22:20:49 2023
@@ -0,0 +1,68 @@
+$NetBSD: patch-conf_viewvc.conf.dist,v 1.1 2023/08/18 22:20:49 hauke Exp $
+
+Make paths adaptable for pkgsrc installation.
+
+--- conf/viewvc.conf.dist.orig 2023-01-04 14:48:34.000000000 +0000
++++ conf/viewvc.conf.dist
+@@ -218,7 +218,8 @@
+ ##                    /etc/mime.types,
+ ##                    /usr/local/apache2/conf/mime.types
+ ##
+-#mime_types_files = mimetypes.conf
++#mime_types_files = @PKG_SYSCONFDIR@/mimetypes.conf,
++#                   @PKG_SYSCONFBASE@/httpd/mime.types
+ 
+ ## address: The address of the local repository maintainer.  (This
+ ## option is provided only as a convenience for ViewVC installations
+@@ -312,7 +313,7 @@
+ ## Example:
+ ## rcs_dir = /usr/bin/
+ ##
+-#rcs_dir =
++rcs_dir = @RCSPATH@/
+ 
+ ## cvsnt: Location of cvsnt program.  ViewVC can use CVSNT (www.cvsnt.org)
+ ## instead of the RCS utilities to retrieve information from CVS
+@@ -334,7 +335,7 @@
+ ## Example:
+ ## diff = /usr/bin/diff
+ ##
+-#diff = 
++diff = @DIFF@
+ 
+ ## cvsgraph: Location of the CvsGraph program, a graphical CVS version
+ ## graph generator (see options.use_cvsgraph).
+@@ -342,7 +343,7 @@
+ ## Example:
+ ## cvsgraph = /usr/local/bin/cvsgraph
+ ##
+-#cvsgraph =
++cvsgraph = @PREFIX@/bin/cvsgraph
+ 
+ 
+ ##---------------------------------------------------------------------------
+@@ -662,7 +663,7 @@
+ ## template_dir = templates/default
+ ## template_dir = /opt/custom-viewvc-templates/templates
+ #
+-#template_dir = templates/default
++template_dir = @PREFIX@/@VIEWVCDIR@/templates/default
+ 
+ ## docroot: Web path to a directory that contains ViewVC static files
+ ## (stylesheets, images, etc.)  If set, static files will get
+@@ -753,13 +754,13 @@
+ 
+ ## use_cvsgraph: Use CvsGraph to offer visual graphs of CVS revision history.
+ ##
+-#use_cvsgraph = 0
++use_cvsgraph = @CVSGRAPH_OPT@
+ 
+ ## cvsgraph_conf: Location of the customized cvsgraph configuration file.
+ ## May be specified as an absolute path or as a path relative to this
+ ## configuration file.
+ ##
+-#cvsgraph_conf = cvsgraph.conf
++cvsgraph_conf = @PKG_SYSCONFDIR@/cvsgraph.conf
+ 
+ ## allowed_cvsgraph_useropts: A list of settings used for cvsgraph's
+ ## user-modifiable behavior which can be changed in the graph display.
Index: pkgsrc/www/viewvc/patches/patch-lib_viewvc.py
diff -u /dev/null pkgsrc/www/viewvc/patches/patch-lib_viewvc.py:1.1
--- /dev/null   Fri Aug 18 22:20:49 2023
+++ pkgsrc/www/viewvc/patches/patch-lib_viewvc.py       Fri Aug 18 22:20:49 2023
@@ -0,0 +1,14 @@
+$NetBSD: patch-lib_viewvc.py,v 1.1 2023/08/18 22:20:49 hauke Exp $
+
+Look for config file under PKG_SYSCONFDIR
+
+--- lib/viewvc.py.orig 2023-01-04 14:48:34.000000000 +0000
++++ lib/viewvc.py
+@@ -5158,6 +5158,7 @@ def load_config(pathname=None, server=No
+   # default.
+   pathname = (env_pathname
+               or pathname
++              or "@PKG_SYSCONFDIR@/viewvc.conf"
+               or os.path.join(os.path.dirname(os.path.dirname(__file__)),
+                               "viewvc.conf"))
+ 
Index: pkgsrc/www/viewvc/patches/patch-viewvc-install
diff -u /dev/null pkgsrc/www/viewvc/patches/patch-viewvc-install:1.1
--- /dev/null   Fri Aug 18 22:20:49 2023
+++ pkgsrc/www/viewvc/patches/patch-viewvc-install      Fri Aug 18 22:20:49 2023
@@ -0,0 +1,28 @@
+$NetBSD: patch-viewvc-install,v 1.1 2023/08/18 22:20:49 hauke Exp $
+
+Let pkgsrc machinery take care of config files 
+
+--- viewvc-install.orig        2023-01-04 14:48:34.000000000 +0000
++++ viewvc-install
+@@ -56,12 +56,6 @@ FILE_INFO_LIST = [
+     ("bin/cvsdbadmin",            "bin/cvsdbadmin",            0755, 1, 0, 0),
+     ("bin/svndbadmin",            "bin/svndbadmin",            0755, 1, 0, 0),
+     ("bin/make-database",         "bin/make-database",         0755, 1, 0, 0),
+-    ("conf/viewvc.conf.dist",     "viewvc.conf.dist",          0644, 0, 0, 0),
+-    ("conf/viewvc.conf.dist",     "viewvc.conf",               0644, 0, 1, 0),
+-    ("conf/cvsgraph.conf.dist",   "cvsgraph.conf.dist",        0644, 0, 0, 0),
+-    ("conf/cvsgraph.conf.dist",   "cvsgraph.conf",             0644, 0, 1, 0),
+-    ("conf/mimetypes.conf.dist",  "mimetypes.conf.dist",       0644, 0, 0, 0),
+-    ("conf/mimetypes.conf.dist",  "mimetypes.conf",            0644, 0, 1, 0),
+     ]
+ if sys.platform == "win32":
+   FILE_INFO_LIST.extend([
+@@ -128,7 +122,7 @@ def replace_paths(contents):
+         shbang = '#!' + sys.executable
+         contents = re.sub('^#![^\n]*', _escape(shbang), contents)
+     contents = replace_var(contents, 'LIBRARY_DIR', 'lib')
+-    contents = replace_var(contents, 'CONF_PATHNAME', 'viewvc.conf')
++    contents = replace_var(contents, 'CONF_PATHNAME', '@PKG_SYSCONFDIR@/viewvc.conf')
+     return contents
+ 
+ 



Home | Main Index | Thread Index | Old Index