pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Update www/cgit: Trying to solve: "pkg/60252: www/cgit: missing cgitrc(5) man page" for learning purposes...
Module Name: pkgsrc-wip
Committed By: Marcin Gondek <drixter%e-utp.net@localhost>
Pushed By: drixter
Date: Tue May 12 20:24:04 2026 +0200
Changeset: e5a9a5078dda82cdbc9699e2eb20f1ca2da385e0
Added Files:
cgit/COMMIT_MSG
cgit/DESCR
cgit/Makefile
cgit/PLIST
cgit/distinfo
cgit/patches/patch-cgitrc
cgit/patches/patch-git-Makefile
cgit/patches/patch-git_ci_run-test-slice.sh
Log Message:
Update www/cgit: Trying to solve: "pkg/60252: www/cgit: missing cgitrc(5) man page" for learning purposes...
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e5a9a5078dda82cdbc9699e2eb20f1ca2da385e0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
cgit/COMMIT_MSG | 1 +
cgit/DESCR | 3 ++
cgit/Makefile | 69 +++++++++++++++++++++++++++
cgit/PLIST | 9 ++++
cgit/distinfo | 11 +++++
cgit/patches/patch-cgitrc | 72 +++++++++++++++++++++++++++++
cgit/patches/patch-git-Makefile | 26 +++++++++++
cgit/patches/patch-git_ci_run-test-slice.sh | 15 ++++++
8 files changed, 206 insertions(+)
diffs:
diff --git a/cgit/COMMIT_MSG b/cgit/COMMIT_MSG
new file mode 100644
index 0000000000..192e5c69c7
--- /dev/null
+++ b/cgit/COMMIT_MSG
@@ -0,0 +1 @@
+Update www/cgit: Trying to solve: "pkg/60252: www/cgit: missing cgitrc(5) man page" for learning purposes...
diff --git a/cgit/DESCR b/cgit/DESCR
new file mode 100644
index 0000000000..1a30adc864
--- /dev/null
+++ b/cgit/DESCR
@@ -0,0 +1,3 @@
+cgit is a cgi application implemented in C. It is non-forking, uses
+an internal cache to speed things up. Also, it features virtual
+URLs (unlike gitweb).
diff --git a/cgit/Makefile b/cgit/Makefile
new file mode 100644
index 0000000000..1db6e587f2
--- /dev/null
+++ b/cgit/Makefile
@@ -0,0 +1,69 @@
+# $NetBSD: Makefile,v 1.14 2026/02/24 21:06:53 wiz Exp $
+
+DISTNAME= cgit-1.3
+PKGREVISION= 1
+CATEGORIES= www
+MASTER_SITES= https://git.zx2c4.com/cgit/snapshot/
+EXTRACT_SUFX= .tar.xz
+# cgit builds its own libgit using a known-good version; check
+# release notes or Makefile (GIT_VER) when updating the package
+GIT_VER= 2.53.0
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} git-${GIT_VER}${EXTRACT_SUFX}
+#SITES.git-${GIT_VER}${EXTRACT_SUFX}= https://www.kernel.org/pub/software/scm/git/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://git.zx2c4.com/cgit/
+COMMENT= Fast web interface for git
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake perl:test
+USE_FEATURES+= memrchr
+MAKE_FLAGS+= GIT_VER=${GIT_VER}
+MAKE_FLAGS+= PERL_PATH=${PERL5}
+BUILD_MAKE_FLAGS+= CGIT_CONFIG=${PKG_SYSCONFDIR}/cgitrc
+
+MAKE_ENV+= CGIT_LIBS=${LIBNBCOMPAT_LIBNAME}
+MAKE_ENV.SunOS+= NEEDS_LIBICONV=YesPlease
+
+TEST_TARGET= test
+
+CGIT_CONFIG= ${PKG_SYSCONFDIR}/cgitrc
+CGIT_CGIBIN= ${PREFIX}/libexec/cgi-bin
+CGIT_FILTERS= ${PREFIX}/libexec/cgit/filters
+CGIT_HTDOCS= ${PREFIX}/share/httpd/htdocs/cgit
+CGIT_EGDIR= ${PREFIX}/share/examples
+
+CONF_FILES= ${CGIT_EGDIR}/cgitrc ${CGIT_CONFIG}
+INSTALLATION_DIRS= libexec/cgi-bin \
+ libexec/cgit/filters \
+ share/httpd/htdocs/cgit \
+ share/examples \
+ ${PKGMANDIR}/man5
+
+post-extract:
+ rm -r ${WRKSRC}/git && mv ${WRKDIR}/git-${GIT_VER} ${WRKSRC}/git
+
+
+pre-install:
+ cd ${WRKSRC} && ${MAKE_PROGRAM} doc-man
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cgit ${DESTDIR}${CGIT_CGIBIN}/cgit.cgi
+ ${INSTALL_DATA} ${WRKSRC}/cgit.png ${DESTDIR}${CGIT_HTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/cgit.js ${DESTDIR}${CGIT_HTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/cgit.css ${DESTDIR}${CGIT_HTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/cgitrc ${DESTDIR}${CGIT_EGDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/filters/commit-links.sh \
+ ${DESTDIR}${CGIT_FILTERS}
+ ${INSTALL_SCRIPT} ${WRKSRC}/filters/syntax-highlighting.sh \
+ ${DESTDIR}${CGIT_FILTERS}
+ ${INSTALL_MAN} ${WRKSRC}/cgitrc.5 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/cgitrc.5
+
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cgit/PLIST b/cgit/PLIST
new file mode 100644
index 0000000000..f7d2cf1563
--- /dev/null
+++ b/cgit/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD$
+libexec/cgi-bin/cgit.cgi
+libexec/cgit/filters/commit-links.sh
+libexec/cgit/filters/syntax-highlighting.sh
+man/man5/cgitrc.5
+share/examples/cgitrc
+share/httpd/htdocs/cgit/cgit.css
+share/httpd/htdocs/cgit/cgit.js
+share/httpd/htdocs/cgit/cgit.png
diff --git a/cgit/distinfo b/cgit/distinfo
new file mode 100644
index 0000000000..7407fa259a
--- /dev/null
+++ b/cgit/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.9 2026/02/24 21:06:53 wiz Exp $
+
+BLAKE2s (cgit-1.3.tar.xz) = 5135eca7d59787ac49423089b323b5d1ab17d5cd34ce0fc66f5877a8f2efeedf
+SHA512 (cgit-1.3.tar.xz) = 28b7e1867809cafed6190e1984b059a7aaac3a92d8eb38bc925a58fd344347b86662309be44b6ce6625312cb127540aadd7a22b7561e96c8440144ea5eade02e
+Size (cgit-1.3.tar.xz) = 92248 bytes
+BLAKE2s (git-2.53.0.tar.xz) = 2d85a0c30ebaf0b0f613b30e3dd206e27ea22f6ae4908e22a7afe7d268b49261
+SHA512 (git-2.53.0.tar.xz) = f9c0c0f527e10fe3eb524e368b1a24088bfd41097d8cac7854dae7ff21ab8ab2a1716384be53ea6174023ca5a2af3eeddca1d9feb57e447713f82e061df55c8d
+Size (git-2.53.0.tar.xz) = 7993096 bytes
+SHA1 (patch-cgitrc) = a363a2b22f237c507cab7d164e91389d02734372
+SHA1 (patch-git-Makefile) = d70e1778a0f3d6b72268e300357190b25fe5a023
+SHA1 (patch-git_ci_run-test-slice.sh) = 760e6ed63ff3a52e98a721ddf605da87de598cfc
diff --git a/cgit/patches/patch-cgitrc b/cgit/patches/patch-cgitrc
new file mode 100644
index 0000000000..19bca8a817
--- /dev/null
+++ b/cgit/patches/patch-cgitrc
@@ -0,0 +1,72 @@
+$NetBSD: patch-cgitrc,v 1.1 2014/12/01 12:32:27 wiz Exp $
+
+Example config file.
+
+--- cgitrc.orig 2013-03-02 15:55:23.000000000 +0000
++++ cgitrc
+@@ -0,0 +1,65 @@
++##
++## cgitrc: template for /etc/cgitrc
++##
++
++## repositories
++#repo.url=name
++#repo.path=/var/git/repository.git
++#repo.desc=repository description
++#repo.owner=your@email
++
++
++## base for virtual urls. If specified, rewrite rules must be added to
++## httpd.conf. Possible rules for /git/ when cgit.cgi is accessed as /cgit.cgi:
++##
++## RewriteRule ^/git/$ /cgit.cgi [L,QSA]
++## RewriteRule ^/git/([^/]+)/$ /cgit.cgi?r=$1 [L,QSA]
++## RewriteRule ^/git/([^/]+)/([^/]+)/$ /cgit.cgi?r=$1&p=$2 [L,QSA]
++##
++#virtual-root=/git
++
++
++## page title for the root page (repo listing)
++#root-title=Git repository browser
++
++
++## link to css file
++#css=/cgit.css
++
++
++## link to logo file
++#logo=/cgit.png
++
++
++## url loaded when clicking the logo
++#logo-link=http://www.kernel.org/pub/software/scm/git/docs/
++
++
++## set number of initial chars to show of commit subject message in log views
++#max-message-length=60
++
++
++## Set to 1 to deactivate caching of generated pages
++#nocache=0
++
++
++## root path for cached output
++#cache-root=/var/cache/cgit
++
++
++##
++## Time-To-Live settings: specify how long (in minutes) different pages should
++## be cached. Specify 0 for instant expiration and -1 for immortal pages
++##
++
++## ttl for root page (repo listing)
++#cache-root-ttl=5
++
++## ttl for repo summary page
++#cache-repo-ttl=5
++
++## ttl for other dynamic pages
++#cache-dynamic-ttl=5
++
++## ttl for static pages (addressed by SHA-1)
++#cache-static-ttl=-1
diff --git a/cgit/patches/patch-git-Makefile b/cgit/patches/patch-git-Makefile
new file mode 100644
index 0000000000..cf10487699
--- /dev/null
+++ b/cgit/patches/patch-git-Makefile
@@ -0,0 +1,26 @@
+$NetBSD: patch-git-Makefile,v 1.4 2026/02/24 21:06:53 wiz Exp $
+
+Don't put HOME into binaries.
+
+--- git/Makefile.orig 2026-02-02 02:26:11.000000000 +0000
++++ git/Makefile
+@@ -627,7 +627,7 @@ include shared.mak
+ # perllibdir
+ # This can help installing the suite in a relocatable way.
+
+-prefix = $(HOME)
++prefix = $(PREFIX)
+ bindir = $(prefix)/bin
+ mandir = $(prefix)/share/man
+ infodir = $(prefix)/share/info
+@@ -963,8 +963,8 @@ endif
+ # tweaked by config.* below as well as the command-line, both of
+ # which'll override these defaults.
+ # Older versions of GCC may require adding "-std=gnu99" at the end.
+-CFLAGS = -g -O2 -Wall
+-LDFLAGS =
++# CFLAGS = -g -O2 -Wall
++# LDFLAGS =
+ CC_LD_DYNPATH = -Wl,-rpath,
+ BASIC_CFLAGS = -I.
+ BASIC_LDFLAGS =
diff --git a/cgit/patches/patch-git_ci_run-test-slice.sh b/cgit/patches/patch-git_ci_run-test-slice.sh
new file mode 100644
index 0000000000..711063a86a
--- /dev/null
+++ b/cgit/patches/patch-git_ci_run-test-slice.sh
@@ -0,0 +1,15 @@
+$NetBSD: patch-git_ci_run-test-slice.sh,v 1.1 2026/02/24 21:06:53 wiz Exp $
+
+Fix unportable test(1) operator.
+
+--- git/ci/run-test-slice.sh.orig 2026-02-24 20:57:43.652492603 +0000
++++ git/ci/run-test-slice.sh
+@@ -11,7 +11,7 @@ handle_failed_tests
+ handle_failed_tests
+
+ # We only have one unit test at the moment, so run it in the first slice
+-if [ "$1" == "0" ] ; then
++if [ "$1" = "0" ] ; then
+ group "Run unit tests" make --quiet -C t unit-tests-test-tool
+ fi
+
Home |
Main Index |
Thread Index |
Old Index