aboutsummaryrefslogtreecommitdiff
path: root/devel/cgit
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2017-06-09 15:10:35 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2017-06-09 15:10:35 +0000
commit03cd7bb8b97667e854ee866262a44ada122cda1d (patch)
treebaf044424cca69a68885c4f2260faddc49f05426 /devel/cgit
parent80d5e5f528f200810d5233ebedf03564ff0ae4f5 (diff)
downloadports-03cd7bb8b97667e854ee866262a44ada122cda1d.tar.gz
ports-03cd7bb8b97667e854ee866262a44ada122cda1d.zip
Notes
Diffstat (limited to 'devel/cgit')
-rw-r--r--devel/cgit/Makefile4
-rw-r--r--devel/cgit/distinfo6
-rw-r--r--devel/cgit/files/patch-git-2.13.172
3 files changed, 77 insertions, 5 deletions
diff --git a/devel/cgit/Makefile b/devel/cgit/Makefile
index 1e3cd4b7317b..875aa6a5e023 100644
--- a/devel/cgit/Makefile
+++ b/devel/cgit/Makefile
@@ -2,7 +2,7 @@
PORTNAME= cgit
PORTVERSION= 1.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= devel www
MASTER_SITES= http://git.zx2c4.com/cgit/snapshot/:cgit \
https://www.kernel.org/pub/software/scm/git/:git
@@ -15,7 +15,7 @@ COMMENT= Fast, lightweight web frontend for Git repositories
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-GIT_VERSION= 2.13.0
+GIT_VERSION= 2.13.1
USES= cpe gmake iconv shebangfix ssl tar:xz
CPE_VENDOR= lars_hjemli
SHEBANG_FILES= filters/html-converters/rst2html
diff --git a/devel/cgit/distinfo b/devel/cgit/distinfo
index 5267069a2a6f..79eaa9506c45 100644
--- a/devel/cgit/distinfo
+++ b/devel/cgit/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1494441096
+TIMESTAMP = 1497020930
SHA256 (cgit-1.1.tar.xz) = 0889af29be15fc981481caa09579f982b9740fe9fd2860ab87dff286f4635890
SIZE (cgit-1.1.tar.xz) = 86268
-SHA256 (git-2.13.0.tar.xz) = 4bbf2ab6f2341253a38f95306ec7936833eb1c42572da5c1fa61f0abb2191258
-SIZE (git-2.13.0.tar.xz) = 4744388
+SHA256 (git-2.13.1.tar.xz) = 3bc1becd983f77ab154a46801624369dbc40c3dd04b4c4b07ad026f5684688fe
+SIZE (git-2.13.1.tar.xz) = 4746640
diff --git a/devel/cgit/files/patch-git-2.13.1 b/devel/cgit/files/patch-git-2.13.1
new file mode 100644
index 000000000000..56754fc29ad2
--- /dev/null
+++ b/devel/cgit/files/patch-git-2.13.1
@@ -0,0 +1,72 @@
+From af3025cf50642452a2000327bb8e845fd2191423 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Tue, 6 Jun 2017 17:16:32 +0200
+Subject: git: update to v2.13.1
+
+Update to git version v2.13.1: With commit 8aee769f (pathspec: copy and free
+owned memory) the definition of struct pathspec_item has changed with the
+expectation that pathspecs will be managed dynamically. We work around this
+a bit by setting up a static structure, but let's allocate the match string
+to avoid needing to cast away const.
+
+Updated a patch from John Keeping <john@keeping.me.uk> for git v2.12.1.
+---
+ git | 2 +-
+ shared.c | 4 +++-
+ ui-blob.c | 9 ++++++---
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/shared.c b/shared.c
+index c63f1e3..13a65a9 100644
+--- shared.c
++++ shared.c
+@@ -352,7 +352,7 @@ void cgit_diff_tree(const struct object_id *old_oid,
+ opt.format_callback = cgit_diff_tree_cb;
+ opt.format_callback_data = fn;
+ if (prefix) {
+- item.match = prefix;
++ item.match = xstrdup(prefix);
+ item.len = strlen(prefix);
+ opt.pathspec.nr = 1;
+ opt.pathspec.items = &item;
+@@ -365,6 +365,8 @@ void cgit_diff_tree(const struct object_id *old_oid,
+ diff_root_tree_sha1(new_oid->hash, "", &opt);
+ diffcore_std(&opt);
+ diff_flush(&opt);
++
++ free(item.match);
+ }
+
+ void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
+diff --git a/ui-blob.c b/ui-blob.c
+index 5f30de7..793817f 100644
+--- ui-blob.c
++++ ui-blob.c
+@@ -38,7 +38,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
+ struct object_id oid;
+ unsigned long size;
+ struct pathspec_item path_items = {
+- .match = path,
++ .match = xstrdup(path),
+ .len = strlen(path)
+ };
+ struct pathspec paths = {
+@@ -53,10 +53,13 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
+ };
+
+ if (get_oid(ref, &oid))
+- return 0;
++ goto done;
+ if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT)
+- return 0;
++ goto done;
+ read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
++
++done:
++ free(path_items.match);
+ return walk_tree_ctx.found_path;
+ }
+
+--
+cgit v1.1-9-ge9c1d
+