Index: head/devel/cgit/Makefile =================================================================== --- head/devel/cgit/Makefile (revision 443007) +++ head/devel/cgit/Makefile (revision 443008) @@ -1,54 +1,54 @@ # $FreeBSD$ 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 DISTFILES= cgit-${PORTVERSION}${EXTRACT_SUFX}:cgit \ git-${GIT_VERSION}${EXTRACT_SUFX}:git MAINTAINER= adamw@FreeBSD.org 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 CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} MAKE_ARGS+= CGIT_SCRIPT_PATH=${WWWDIR} CGIT_CONFIG=${PREFIX}/etc/cgitrc \ prefix=${PREFIX} NO_GETTEXT=1 NO_LUA=1 NO_R_TO_GCC_LINKER=1 V=1 SUB_FILES= pkg-message PORTDOCS= ${PORTNAME}rc.5.txt OPTIONS_DEFINE= DOCS post-extract: @${RMDIR} ${WRKSRC}/git @${MV} ${WRKDIR}/git-${GIT_VERSION} ${WRKSRC}/git post-patch: @${REINPLACE_CMD} -e 's/^\(GIT_VER =\).*$$/\1 ${GIT_VERSION}/' \ ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' \ -e "s|\(ALL_CFLAGS =\)|\1 -I${OPENSSLINC}|g" \ -e "s|\(ALL_LDFLAGS =\)|\1 -L${OPENSSLLIB}|g" \ ${WRKSRC}/git/Makefile post-install: ${STRIP_CMD} ${STAGEDIR}${WWWDIR}/cgit.cgi post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include Index: head/devel/cgit/distinfo =================================================================== --- head/devel/cgit/distinfo (revision 443007) +++ head/devel/cgit/distinfo (revision 443008) @@ -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 Index: head/devel/cgit/files/patch-git-2.13.1 =================================================================== --- head/devel/cgit/files/patch-git-2.13.1 (nonexistent) +++ head/devel/cgit/files/patch-git-2.13.1 (revision 443008) @@ -0,0 +1,72 @@ +From af3025cf50642452a2000327bb8e845fd2191423 Mon Sep 17 00:00:00 2001 +From: Christian Hesse +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 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 + Property changes on: head/devel/cgit/files/patch-git-2.13.1 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property