aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Langille <dvl@FreeBSD.org>2020-11-25 19:29:36 +0000
committerDan Langille <dvl@FreeBSD.org>2020-11-25 19:29:36 +0000
commitb5ce298d441f1139e6d004ef7497369458bf4a90 (patch)
tree366f73cc517169cb9846319bc0fd62994735fa0d
parentb388100a84db63302ca9a276fd5acb2ba50fffbf (diff)
downloadports-b5ce298d441f1139e6d004ef7497369458bf4a90.tar.gz
ports-b5ce298d441f1139e6d004ef7497369458bf4a90.zip
Add devel/viewvc-devel which uses Python 3
The original PR is from Robert William Vesterman but the bulk of this patch comes from Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org> PR: 247161,247804 Submitted by: Robert William Vesterman <bob@vesterman.com>,Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org> Approved by: maintainer timeout (7 weeks)
Notes
Notes: svn path=/head/; revision=556303
-rw-r--r--devel/Makefile1
-rw-r--r--devel/viewvc-devel/Makefile76
-rw-r--r--devel/viewvc-devel/distinfo3
-rw-r--r--devel/viewvc-devel/files/patch-conf_viewvc.conf.dist13
-rw-r--r--devel/viewvc-devel/files/pkg-message.in84
-rw-r--r--devel/viewvc-devel/files/viewvc.in70
-rw-r--r--devel/viewvc-devel/pkg-descr8
-rw-r--r--devel/viewvc-devel/pkg-plist165
-rw-r--r--devel/viewvc/Makefile2
9 files changed, 422 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 76a2f8e1b323..a4390777f038 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6819,6 +6819,7 @@
SUBDIR += vera++
SUBDIR += vexcl
SUBDIR += viewvc
+ SUBDIR += viewvc-devel
SUBDIR += violet
SUBDIR += vitables
SUBDIR += volk
diff --git a/devel/viewvc-devel/Makefile b/devel/viewvc-devel/Makefile
new file mode 100644
index 000000000000..7ac2adec7376
--- /dev/null
+++ b/devel/viewvc-devel/Makefile
@@ -0,0 +1,76 @@
+# Created by: will
+# $FreeBSD$
+
+PORTNAME= viewvc
+DISTVERSION= 1.3.0-20201006
+CATEGORIES= devel python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX= -devel
+
+MAINTAINER= dvl@FreeBSD.org
+COMMENT= Web-based Version Control Repository Browsing
+
+LICENSE= BSD2CLAUSE
+
+USES= cpe python:3.6+
+USE_PYTHON= flavors
+USE_GITHUB= yes
+GH_TAGNAME= c93d9da79c31457ecb0a771ff52d28353dc6e878
+USE_RC_SUBR= viewvc
+
+NO_BUILD= yes
+NO_OPTIONS_SORT= yes
+OPTIONS_DEFINE= WEBSRV APMOD SVN MYSQL
+OPTIONS_DEFAULT= WEBSRV APACHE SVN
+
+OPTIONS_SINGLE= WEBSRV APMOD
+OPTIONS_SINGLE_WEBSRV= APACHE LIGHTTPD
+OPTIONS_SINGLE_APMOD= MODWSGI
+
+WEBSRV_DESC= Enable web server support
+APMOD_DESC= depend on Apache module
+
+MODWSGI_DESC= Add mod_wsgi to the list of package dependencies
+MYSQL_DESC= Bonsai-like repository query facilities
+
+APACHE_USE= APACHE_RUN=24+
+LIGHTTPD_RUN_DEPENDS= lighttpd:www/lighttpd
+MODWSGI_RUN_DEPENDS= ${APACHE_PKGNAMEPREFIX}${PYTHON_PKGNAMEPREFIX}mod_wsgi>=4.4.13:www/mod_wsgi4@${PY_FLAVOR}
+MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=0:databases/py-MySQLdb@${PY_FLAVOR}
+
+SVN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}subversion>=0:devel/py-subversion@${PY_FLAVOR}
+
+RUN_DEPENDS+= ${PY_PYGMENTS}
+
+CONFLICTS_INSTALL= viewvc-1.[12].[0-9]*
+
+.include <bsd.port.options.mk>
+
+SUB_FILES= pkg-message
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
+ ECHO=${ECHO} EGREP=${EGREP} TOUCH=${TOUCH} \
+ CHOWN=${CHOWN} RM=${RM:Q}
+
+pre-everything::
+.if ${PORT_OPTIONS:MAPMOD} && !${PORT_OPTIONS:MAPACHE}
+IGNORE= apache module needs Apache server, please re-run 'make config' then choose WEBSRV and APACHE
+.endif
+
+post-patch:
+.for i in cvsgraph.conf mimetypes.conf viewvc.conf
+ ${MV} ${WRKSRC}/conf/${i}.dist ${WRKSRC}/conf/${i}.sample
+ ${REINPLACE_CMD} -e '/"${i}"/d' ${WRKSRC}/viewvc-install
+.endfor
+ ${REINPLACE_CMD} -e 's/conf.dist/conf.sample/g' \
+ ${WRKSRC}/viewvc-install \
+ ${WRKSRC}/bin/standalone.py
+# to much files, use own shebangfix
+ ${FIND} ${WRKSRC} -type f | ${GREP} -v -e 'png' -e 'images' \
+ | ${XARGS} ${SED} -i '' \
+ -e '1s|^\#![[:space:]]*/usr/bin/env python|\#!${PYTHON_CMD}|' \
+ -e '1s|^\#![[:space:]]*/usr/bin/python|\#!${PYTHON_CMD}|'
+
+do-install:
+ @(cd ${WRKSRC} && ${PYTHON_CMD} viewvc-install --prefix=${PREFIX}/${PORTNAME} --destdir="${STAGEDIR}" --clean-mode=false)
+
+.include <bsd.port.mk>
diff --git a/devel/viewvc-devel/distinfo b/devel/viewvc-devel/distinfo
new file mode 100644
index 000000000000..965fd5e49bcd
--- /dev/null
+++ b/devel/viewvc-devel/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1602044238
+SHA256 (viewvc-viewvc-1.3.0-20201006-c93d9da79c31457ecb0a771ff52d28353dc6e878_GH0.tar.gz) = 8ed4212283a327eaff2e5badcd20106e07377a26fd959d52027179cfd1f19824
+SIZE (viewvc-viewvc-1.3.0-20201006-c93d9da79c31457ecb0a771ff52d28353dc6e878_GH0.tar.gz) = 338905
diff --git a/devel/viewvc-devel/files/patch-conf_viewvc.conf.dist b/devel/viewvc-devel/files/patch-conf_viewvc.conf.dist
new file mode 100644
index 000000000000..c5cf0c8649cf
--- /dev/null
+++ b/devel/viewvc-devel/files/patch-conf_viewvc.conf.dist
@@ -0,0 +1,13 @@
+--- conf/viewvc.conf.dist.orig 2020-11-25 18:40:53 UTC
++++ conf/viewvc.conf.dist
+@@ -331,6 +331,10 @@
+ ## diff: Location of the GNU diff program, used for showing file
+ ## version differences.
+ ##
++## If you want to use side-by-side diff or full colored diff on FreeBSD 12
++## or later, it is need to install GNU diff via diffutils packge and to
++## specify it here.
++##
+ ## Example:
+ ## diff = /usr/bin/diff
+ ##
diff --git a/devel/viewvc-devel/files/pkg-message.in b/devel/viewvc-devel/files/pkg-message.in
new file mode 100644
index 000000000000..857214c5a932
--- /dev/null
+++ b/devel/viewvc-devel/files/pkg-message.in
@@ -0,0 +1,84 @@
+[
+{ type: install
+ message: <<EOM
+ To use ViewVC, modify the configuration file located at
+ %%PREFIX%%/viewvc/viewvc.conf.
+
+ If no webserver was selected during installation, then
+ a rc script for running ViewVC standalone is installed.
+ To enable the standalone ViewVC server in rc.conf use
+ parameter viewvc_enable="YES".
+
+ You can also adjust the user which runs the ViewVC standalone
+ server with the parameter "viewvc_user".
+
+ If you want to run the ViewVC standalone server with another
+ IP/PORT, use the parameter "viewvc_flags".
+
+ To see all available parameters, use the command
+ %%PREFIX%%/viewvc/bin/standalone.py --help
+
+
+ To use ViewVC with Apache or lighttpd as a CGI script,
+ see the following config examples.
+
+ Example config lines for Apache 2.4
+ ===================================
+ <IfModule wsgi_module>
+ WSGIRestrictSignal Off
+ </IfModule>
+
+ <IfModule !wsgi_module>
+ ScriptAlias "/viewvc" "%%PREFIX%%/viewvc/bin/cgi/viewvc.cgi"
+ </IfModule>
+
+ <IfModule wsgi_module>
+ WSGIScriptAlias "/viewvc" "%%PREFIX%%/viewvc/bin/wsgi/viewvc.wsgi"
+ </IfModule>
+
+ <Location /viewvc>
+ Options NONE +ExecCGI
+ </Location>
+
+ Example config lines for lighttpd
+ =================================
+ server.modules = (
+ "mod_alias",
+ "mod_access"
+ )
+
+ alias.url += ( "/viewvc" => "%%PREFIX%%/viewvc/bin/cgi" )
+
+ $HTTP["url"] =~ "^/viewvc/" {
+ index-file.names = ( "viewvc.cgi" )
+ cgi.assign = (
+ ".cgi" => "%%PYTHON_CMD%%",
+ )
+ }
+
+ Note: Cvsdb (Bonsai-like repository query) feature is not stable and
+ have some incompatibility on DB data with any released version,
+ (and it may be also incompatible with any feature release).
+EOM
+}
+{
+ type: upgrade
+ maximum_version: "1.3.0"
+ message: <<EOM
+ Please review your vievc.conf, see viewvc.sample.conf
+ ======================================================
+ - the template path has changed
+ - the vhost notation has changed
+
+ Additional upgrade informations:
+ https://github.com/viewvc/viewvc/blob/master/docs/upgrading-howto.html
+
+ Note: Cvsdb (Bonsai-like repository query) feature is not stable and
+ have some incompatibility on DB data with any released version,
+ (and it may be also incompatible with any feature release).
+ So if you want to use this feature, make sure to make back up
+ of existing DB and then rebuild your DB data with
+ cvsdbadmin/svndbadmin.
+EOM
+}
+]
diff --git a/devel/viewvc-devel/files/viewvc.in b/devel/viewvc-devel/files/viewvc.in
new file mode 100644
index 000000000000..064ff67ab917
--- /dev/null
+++ b/devel/viewvc-devel/files/viewvc.in
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: viewvc
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line(s) to /etc/rc.conf to enable ViewVC:
+#
+# viewvc_enable="YES"
+# # optional
+# viewvc_flags="-h localhost -p PORT"
+# viewvc_user="www"
+#
+# To get available parameters and the default values, use the
+# command %%PREFIX%%/viewvc/bin/standalone.py --help
+# for more info.
+#
+# Note:
+# If you choose a listen port less then 1024 then you have
+# to use a privileged user.
+# If the user www cannot access your cvs/svn repository,
+# adjust the parameter viewvc_user and it should work.
+#
+# INFO:
+# ViewVC default tcp port: 49152
+# see http://viewvc.tigris.org/issues/show_bug.cgi?id=234
+
+. /etc/rc.subr
+
+name=viewvc
+rcvar=viewvc_enable
+load_rc_config $name
+
+# Set defaults
+viewvc_enable=${viewvc_enable:-"NO"}
+viewvc_flags=${viewvc_flags:-"-p 49152"}
+viewvc_user=${viewvc_user:-"www"}
+
+pidfile=/var/run/viewvc.pid
+command=%%PYTHON_CMD%%
+standalone=%%PREFIX%%/viewvc/bin/standalone.py
+
+start_precmd=viewvc_precmd
+start_cmd=viewvc_start
+stop_postcmd=viewvc_cleanup
+
+viewvc_precmd()
+{
+ # with param -d we get another pid so prevent this
+ %%ECHO%% "${viewvc_flags}" | %%EGREP%% -q "(^\-d| \-d)" 2>&1 > /dev/null
+ if [ $? -eq 0 ]; then
+ %%ECHO%% "Please remove parameter -d from viewvc_flags"
+ %%ECHO%%
+ return 1
+ fi
+}
+
+viewvc_start() {
+ echo "Starting viewvc."
+ %%TOUCH%% ${pidfile} && %%CHOWN%% ${viewvc_user} ${pidfile}
+ /usr/sbin/daemon -cf -p ${pidfile} -u ${viewvc_user} ${standalone} ${viewvc_flags}
+}
+
+viewvc_cleanup() {
+ [ -f ${pidfile} ] && %%RM%% ${pidfile}
+}
+
+run_rc_command "$1"
diff --git a/devel/viewvc-devel/pkg-descr b/devel/viewvc-devel/pkg-descr
new file mode 100644
index 000000000000..69e1fb0eee77
--- /dev/null
+++ b/devel/viewvc-devel/pkg-descr
@@ -0,0 +1,8 @@
+ViewVC is a browser interface for CVS and Subversion version control
+repositories. It generates templatized HTML to present navigable directory,
+revision, and change log listings. It can display specific versions of files as
+well as diffs between those versions. Basically, ViewVC provides the bulk of the
+report-like functionality you expect out of your version control tool, but much
+more prettily than the average textual command-line program output.
+
+WWW: http://www.viewvc.org/
diff --git a/devel/viewvc-devel/pkg-plist b/devel/viewvc-devel/pkg-plist
new file mode 100644
index 000000000000..8132b1d20184
--- /dev/null
+++ b/devel/viewvc-devel/pkg-plist
@@ -0,0 +1,165 @@
+viewvc/bin/cgi/viewvc.cgi
+viewvc/bin/cvsdbadmin
+viewvc/bin/loginfo-handler
+viewvc/bin/make-database
+viewvc/bin/standalone.py
+viewvc/bin/svndbadmin
+viewvc/bin/wsgi/viewvc.fcgi
+viewvc/bin/wsgi/viewvc.wsgi
+@sample viewvc/cvsgraph.conf.sample
+viewvc/lib/accept.py
+viewvc/lib/accept.pyc
+viewvc/lib/blame.py
+viewvc/lib/blame.pyc
+viewvc/lib/common.py
+viewvc/lib/common.pyc
+viewvc/lib/config.py
+viewvc/lib/config.pyc
+viewvc/lib/cvsdb.py
+viewvc/lib/cvsdb.pyc
+viewvc/lib/dbi.py
+viewvc/lib/dbi.pyc
+viewvc/lib/ezt.py
+viewvc/lib/ezt.pyc
+viewvc/lib/idiff.py
+viewvc/lib/idiff.pyc
+viewvc/lib/popen.py
+viewvc/lib/popen.pyc
+viewvc/lib/sapi.py
+viewvc/lib/sapi.pyc
+viewvc/lib/vcauth/__init__.py
+viewvc/lib/vcauth/__init__.pyc
+viewvc/lib/vcauth/forbidden/__init__.py
+viewvc/lib/vcauth/forbidden/__init__.pyc
+viewvc/lib/vcauth/forbiddenre/__init__.py
+viewvc/lib/vcauth/forbiddenre/__init__.pyc
+viewvc/lib/vcauth/svnauthz/__init__.py
+viewvc/lib/vcauth/svnauthz/__init__.pyc
+viewvc/lib/vclib/__init__.py
+viewvc/lib/vclib/__init__.pyc
+viewvc/lib/vclib/ccvs/__init__.py
+viewvc/lib/vclib/ccvs/__init__.pyc
+viewvc/lib/vclib/ccvs/bincvs.py
+viewvc/lib/vclib/ccvs/bincvs.pyc
+viewvc/lib/vclib/ccvs/blame.py
+viewvc/lib/vclib/ccvs/blame.pyc
+viewvc/lib/vclib/ccvs/ccvs.py
+viewvc/lib/vclib/ccvs/ccvs.pyc
+viewvc/lib/vclib/ccvs/rcsparse/__init__.py
+viewvc/lib/vclib/ccvs/rcsparse/__init__.pyc
+viewvc/lib/vclib/ccvs/rcsparse/common.py
+viewvc/lib/vclib/ccvs/rcsparse/common.pyc
+viewvc/lib/vclib/ccvs/rcsparse/debug.py
+viewvc/lib/vclib/ccvs/rcsparse/debug.pyc
+viewvc/lib/vclib/ccvs/rcsparse/default.py
+viewvc/lib/vclib/ccvs/rcsparse/default.pyc
+viewvc/lib/vclib/ccvs/rcsparse/parse_rcs_file.py
+viewvc/lib/vclib/ccvs/rcsparse/parse_rcs_file.pyc
+viewvc/lib/vclib/ccvs/rcsparse/run-tests.py
+viewvc/lib/vclib/ccvs/rcsparse/run-tests.pyc
+viewvc/lib/vclib/ccvs/rcsparse/test-data/default,v
+viewvc/lib/vclib/ccvs/rcsparse/test-data/default.out
+viewvc/lib/vclib/ccvs/rcsparse/test-data/empty-file,v
+viewvc/lib/vclib/ccvs/rcsparse/test-data/empty-file.out
+viewvc/lib/vclib/svn/__init__.py
+viewvc/lib/vclib/svn/__init__.pyc
+viewvc/lib/vclib/svn/svn_ra.py
+viewvc/lib/vclib/svn/svn_ra.pyc
+viewvc/lib/vclib/svn/svn_repos.py
+viewvc/lib/vclib/svn/svn_repos.pyc
+viewvc/lib/viewvc.py
+viewvc/lib/viewvc.pyc
+@sample viewvc/mimetypes.conf.sample
+viewvc/templates/classic/_diff_display.ezt
+viewvc/templates/classic/_diff_form.ezt
+viewvc/templates/classic/_dir_footer.ezt
+viewvc/templates/classic/_dir_header.ezt
+viewvc/templates/classic/_file_header.ezt
+viewvc/templates/classic/_footer.ezt
+viewvc/templates/classic/_header.ezt
+viewvc/templates/classic/_log_footer.ezt
+viewvc/templates/classic/_log_header.ezt
+viewvc/templates/classic/_paging.ezt
+viewvc/templates/classic/_pathrev_form.ezt
+viewvc/templates/classic/_props.ezt
+viewvc/templates/classic/_sort.ezt
+viewvc/templates/classic/diff.ezt
+viewvc/templates/classic/dir_new.ezt
+viewvc/templates/classic/directory.ezt
+viewvc/templates/classic/docroot/help.css
+viewvc/templates/classic/docroot/help_dirview.html
+viewvc/templates/classic/docroot/help_log.html
+viewvc/templates/classic/docroot/help_rootview.html
+viewvc/templates/classic/docroot/images/annotate.png
+viewvc/templates/classic/docroot/images/back.png
+viewvc/templates/classic/docroot/images/back_small.png
+viewvc/templates/classic/docroot/images/binary.png
+viewvc/templates/classic/docroot/images/broken.png
+viewvc/templates/classic/docroot/images/chalk.jpg
+viewvc/templates/classic/docroot/images/cvsgraph_16x16.png
+viewvc/templates/classic/docroot/images/cvsgraph_32x32.png
+viewvc/templates/classic/docroot/images/diff.png
+viewvc/templates/classic/docroot/images/dir.png
+viewvc/templates/classic/docroot/images/down.png
+viewvc/templates/classic/docroot/images/download.png
+viewvc/templates/classic/docroot/images/favicon.ico
+viewvc/templates/classic/docroot/images/feed-icon-16x16.jpg
+viewvc/templates/classic/docroot/images/forward.png
+viewvc/templates/classic/docroot/images/image.png
+viewvc/templates/classic/docroot/images/list.png
+viewvc/templates/classic/docroot/images/lock.png
+viewvc/templates/classic/docroot/images/log.png
+viewvc/templates/classic/docroot/images/text.png
+viewvc/templates/classic/docroot/images/up.png
+viewvc/templates/classic/docroot/images/view.png
+viewvc/templates/classic/docroot/images/viewvc-logo.png
+viewvc/templates/classic/docroot/styles.css
+viewvc/templates/classic/error.ezt
+viewvc/templates/classic/file.ezt
+viewvc/templates/classic/graph.ezt
+viewvc/templates/classic/log.ezt
+viewvc/templates/classic/log_table.ezt
+viewvc/templates/classic/query_form.ezt
+viewvc/templates/classic/query_results.ezt
+viewvc/templates/classic/revision.ezt
+viewvc/templates/classic/roots.ezt
+viewvc/templates/classic/rss.ezt
+viewvc/templates/default/_diff_display.ezt
+viewvc/templates/default/_diff_form.ezt
+viewvc/templates/default/_footer.ezt
+viewvc/templates/default/_header.ezt
+viewvc/templates/default/_pathrev_form.ezt
+viewvc/templates/default/_props.ezt
+viewvc/templates/default/diff.ezt
+viewvc/templates/default/directory.ezt
+viewvc/templates/default/docroot/help.css
+viewvc/templates/default/docroot/help_dirview.html
+viewvc/templates/default/docroot/help_log.html
+viewvc/templates/default/docroot/help_rootview.html
+viewvc/templates/default/docroot/images/back.png
+viewvc/templates/default/docroot/images/back_small.png
+viewvc/templates/default/docroot/images/binary.png
+viewvc/templates/default/docroot/images/broken.png
+viewvc/templates/default/docroot/images/cvs-logo.png
+viewvc/templates/default/docroot/images/dir.png
+viewvc/templates/default/docroot/images/down.png
+viewvc/templates/default/docroot/images/feed-icon-16x16.jpg
+viewvc/templates/default/docroot/images/forward.png
+viewvc/templates/default/docroot/images/image.png
+viewvc/templates/default/docroot/images/lock-icon.gif
+viewvc/templates/default/docroot/images/svn-logo.png
+viewvc/templates/default/docroot/images/text.png
+viewvc/templates/default/docroot/images/up.png
+viewvc/templates/default/docroot/images/viewvc-logo.png
+viewvc/templates/default/docroot/scripts.js
+viewvc/templates/default/docroot/styles.css
+viewvc/templates/default/error.ezt
+viewvc/templates/default/file.ezt
+viewvc/templates/default/graph.ezt
+viewvc/templates/default/log.ezt
+viewvc/templates/default/query_form.ezt
+viewvc/templates/default/query_results.ezt
+viewvc/templates/default/revision.ezt
+viewvc/templates/default/roots.ezt
+viewvc/templates/default/rss.ezt
+@sample viewvc/viewvc.conf.sample
diff --git a/devel/viewvc/Makefile b/devel/viewvc/Makefile
index 8af3530f2e61..823b00fef18b 100644
--- a/devel/viewvc/Makefile
+++ b/devel/viewvc/Makefile
@@ -9,6 +9,8 @@ CATEGORIES= devel python
MAINTAINER= ohauer@FreeBSD.org
COMMENT= Web-based Version Control Repository Browsing
+CONFLICTS_INSTALL= py[23][6-8]-viewvc-1.3*
+
LICENSE= BSD2CLAUSE
USES= cpe python:2.7