Index: head/devel/git-cinnabar/Makefile =================================================================== --- head/devel/git-cinnabar/Makefile (revision 554941) +++ head/devel/git-cinnabar/Makefile (revision 554942) @@ -1,51 +1,50 @@ # $FreeBSD$ PORTNAME= git-cinnabar -DISTVERSION= 0.5.5 -PORTREVISION= 5 +DISTVERSION= 0.5.6 CATEGORIES= devel PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX:N-py27} MAINTAINER= jbeich@FreeBSD.org COMMENT= Git remote helper to interact with Mercurial repositories LICENSE= GPLv2 BUILD_DEPENDS= ${NONEXISTENT}:devel/git:configure RUN_DEPENDS= git:devel/git USE_GITHUB= yes GH_ACCOUNT= glandium USES= gmake python:run shebangfix USE_PYTHON= flavors TARGET_ORDER_OVERRIDE= 510:fix-shebang # after do-patch SHEBANG_FILES= ${PORTNAME} git-remote-hg ALL_TARGET= ${PORTNAME}-helper MAKE_ENV= ${:!${MAKE} -V MAKE_ENV -C ${.CURDIR:H}/git!} MAKE_ARGS= SUBMODULE_STATUS=dummy ${:!${MAKE} -V MAKE_ARGS -C ${.CURDIR:H}/git!} CFLAGS+= -ffunction-sections -fdata-sections LDFLAGS+= -Wl,--gc-sections .export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS # :configure DATADIR= ${PREFIX}/libexec/git-core PORTDATA= * PORTDOCS= README.md OPTIONS_DEFINE= DOCS post-configure: @${TAR} cf - -C$$(${SETENV} -u FLAVOR ${MAKE} -V WRKSRC -C ${PORTSDIR}/devel/git) . | \ ${TAR} xof - -C${WRKSRC}/git-core do-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${WRKSRC}/git-remote-hg \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/git-core/${PORTNAME}-helper \ ${STAGEDIR}${DATADIR} (cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTNAME:S/git-//}" \ ${STAGEDIR}${DATADIR}/pythonlib) (cd ${WRKSRC} && ${COPYTREE_SHARE} \ "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) .include Index: head/devel/git-cinnabar/distinfo =================================================================== --- head/devel/git-cinnabar/distinfo (revision 554941) +++ head/devel/git-cinnabar/distinfo (revision 554942) @@ -1,3 +1,3 @@ -TIMESTAMP = 1587622573 -SHA256 (glandium-git-cinnabar-0.5.5_GH0.tar.gz) = 7e0a935966ab5b434f4c60335808be167e4b300d8cb0b0feb987adb7fc562521 -SIZE (glandium-git-cinnabar-0.5.5_GH0.tar.gz) = 175208 +TIMESTAMP = 1605147574 +SHA256 (glandium-git-cinnabar-0.5.6_GH0.tar.gz) = 64c483e93eea5ec9ef142988e272f949428db2ef685aecc31ce112e24f55f3c9 +SIZE (glandium-git-cinnabar-0.5.6_GH0.tar.gz) = 176409 Index: head/devel/git-cinnabar/files/patch-git-2.27 =================================================================== --- head/devel/git-cinnabar/files/patch-git-2.27 (revision 554941) +++ head/devel/git-cinnabar/files/patch-git-2.27 (nonexistent) @@ -1,57 +0,0 @@ -https://github.com/glandium/git-cinnabar/commit/81c1269f2e7d - ---- helper/GIT-VERSION.mk.orig 2020-04-23 06:16:13 UTC -+++ helper/GIT-VERSION.mk -@@ -1,2 +1,2 @@ --GIT_VERSION ?= v2.26.2 -+GIT_VERSION ?= v2.27.0 - WINDOWS_GIT_VERSION ?= $(GIT_VERSION).windows.1 ---- helper/cinnabar-fast-import.c.orig 2020-04-23 06:16:13 UTC -+++ helper/cinnabar-fast-import.c -@@ -9,7 +9,7 @@ static void start_packfile(); - #include "hg-bundle.h" - #include "hg-data.h" - #include "list.h" --#include "sha1-array.h" -+#include "oid-array.h" - #include "strslice.h" - #include "tree-walk.h" - -@@ -131,6 +131,8 @@ static void init() - avail_tree_table = xcalloc(avail_tree_table_sz, sizeof(struct avail_tree_content*)); - marks = mem_pool_calloc(&fi_mem_pool, 1, sizeof(struct mark_set)); - -+ hashmap_init(&object_table, object_entry_hashcmp, NULL, 0); -+ - global_argc = 1; - - rc_free = mem_pool_alloc(&fi_mem_pool, cmd_save * sizeof(*rc_free)); -@@ -266,7 +268,7 @@ static uintmax_t parse_mark_ref(const char *p, char ** - e->pack_id = MAX_PACK_ID; - e->idx.offset = 1; - } -- insert_mark(2, e); -+ insert_mark(marks, 2, e); - return 2; - } - -@@ -462,7 +464,7 @@ static void do_set(struct string_list *args) - - if (args->items[2].string[0] == ':') { - uintmax_t mark = parse_mark_ref_eol(args->items[2].string); -- struct object_entry *oe = find_mark(mark); -+ struct object_entry *oe = find_mark(marks, mark); - oidcpy(&git_id, &oe->idx.oid); - } else if (get_oid_hex(args->items[2].string, &git_id)) - die("Invalid sha1"); ---- helper/hg-connect.h.orig 2020-04-23 06:16:13 UTC -+++ helper/hg-connect.h -@@ -3,7 +3,7 @@ - - #include "cinnabar-util.h" - #include "run-command.h" --#include "sha1-array.h" -+#include "oid-array.h" - #include "string-list.h" - - struct hg_connection { Property changes on: head/devel/git-cinnabar/files/patch-git-2.27 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/git-cinnabar/files/patch-git-2.29 =================================================================== --- head/devel/git-cinnabar/files/patch-git-2.29 (revision 554941) +++ head/devel/git-cinnabar/files/patch-git-2.29 (nonexistent) @@ -1,96 +0,0 @@ -https://github.com/glandium/git-cinnabar/commit/7e88e6e73cb6 - ---- helper/GIT-VERSION.mk.orig 2020-04-23 06:16:13 UTC -+++ helper/GIT-VERSION.mk -@@ -1,2 +1,2 @@ --GIT_VERSION ?= v2.27.0 -+GIT_VERSION ?= v2.29.0 - WINDOWS_GIT_VERSION ?= $(GIT_VERSION).windows.1 ---- helper/cinnabar-fast-import.c.orig 2020-04-23 06:16:13 UTC -+++ helper/cinnabar-fast-import.c -@@ -1,8 +1,5 @@ --#define cmd_main fast_import_main --#define hashwrite fast_import_hashwrite - static void start_packfile(); - #include "fast-import.patched.c" --#undef hashwrite - #include "cinnabar-fast-import.h" - #include "cinnabar-helper.h" - #include "cinnabar-notes.h" -@@ -32,10 +29,9 @@ static void cleanup(); - static struct pack_window *pack_win; - static struct pack_window *prev_win; - --void hashwrite(struct hashfile *, const void *, unsigned int); -+void real_hashwrite(struct hashfile *, const void *, unsigned int); - --void fast_import_hashwrite(struct hashfile *f, const void *buf, -- unsigned int count) -+void hashwrite(struct hashfile *f, const void *buf, unsigned int count) - { - size_t window_size; - -@@ -52,7 +48,7 @@ void fast_import_hashwrite(struct hashfile *f, const v - pack_data->pack_size = pack_win->len; - } - -- hashwrite(f, buf, count); -+ real_hashwrite(f, buf, count); - pack_win->last_used = -1; /* always last used */ - pack_win->inuse_cnt = -1; - if (pack_data) ---- helper/cinnabar-helper.c.orig 2020-04-23 06:16:13 UTC -+++ helper/cinnabar-helper.c -@@ -2411,7 +2411,7 @@ static void init_git_config() - setup_path(); - } - proc.argv = argv; -- argv_array_push(&proc.env_array, "GIT_EDITOR=echo"); -+ strvec_push(&proc.env_array, "GIT_EDITOR=echo"); - proc.no_stdin = 1; - proc.no_stderr = 1; - /* We don't really care about the capture_command return value. If ---- helper/csum-file.c.patch.orig 2020-11-05 19:24:28 UTC -+++ helper/csum-file.c.patch -@@ -0,0 +1,13 @@ -+diff --git a/csum-file.c b/csum-file.c -+index 0f35fa5ee4..cee7bd5aeb 100644 -+--- a/csum-file.c -++++ b/csum-file.c -+@@ -86,7 +86,7 @@ int finalize_hashfile(struct hashfile *f, unsigned char *result, unsigned int fl -+ return fd; -+ } -+ -+-void hashwrite(struct hashfile *f, const void *buf, unsigned int count) -++void real_hashwrite(struct hashfile *f, const void *buf, unsigned int count) -+ { -+ while (count) { -+ unsigned offset = f->offset; ---- helper/helper.mk.orig 2020-04-23 06:16:13 UTC -+++ helper/helper.mk -@@ -91,8 +91,12 @@ CINNABAR_OBJECTS += which.o - - PATCHES = $(notdir $(wildcard $(SOURCE_DIR)helper/*.patch)) - --$(addprefix $(SOURCE_DIR)helper/,$(PATCHES:%.c.patch=%.patched.c)): $(SOURCE_DIR)helper/%.patched.c: $(SOURCE_DIR)helper/%.c.patch %.c -- patch -p1 -F0 -o $@ $(CURDIR)/$(notdir $(lastword $^)) < $< -+define patch -+$$(SOURCE_DIR)helper/$1.patched.c: $$(SOURCE_DIR)helper/$1.c.patch $$(firstword $$(wildcard $$(SOURCE_DIR)git-core/$1.c $$(SOURCE_DIR)git-core/builtin/$1.c)) -+ patch -p1 -F0 -o $$@ $$(lastword $$^) < $$< -+endef -+ -+$(foreach p,$(PATCHES),$(eval $(call patch,$(p:%.c.patch=%)))) - - clean-patched: - $(RM) $(addprefix $(SOURCE_DIR)helper/,$(PATCHES:%.c.patch=%.patched.c)) ---- helper/hg-connect-stdio.c.orig 2020-04-23 06:16:13 UTC -+++ helper/hg-connect-stdio.c -@@ -265,7 +265,7 @@ struct hg_connection *hg_connect_stdio(const char *url - strbuf_addstr(&buf, "hg -R "); - maybe_sq_quote_buf(&buf, remote_path); - strbuf_addstr(&buf, " serve --stdio"); -- argv_array_push(&proc->args, buf.buf); -+ strvec_push(&proc->args, buf.buf); - strbuf_release(&buf); - - start_command(proc); Property changes on: head/devel/git-cinnabar/files/patch-git-2.29 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/git-cinnabar/files/patch-no-wrapper =================================================================== --- head/devel/git-cinnabar/files/patch-no-wrapper (revision 554941) +++ head/devel/git-cinnabar/files/patch-no-wrapper (revision 554942) @@ -1,65 +1,84 @@ Disable wrappers as Python version is controlled by FLAVORS ---- README.md.orig 2020-04-23 06:16:13 UTC +--- README.md.orig 2020-11-12 02:19:34 UTC +++ README.md -@@ -53,18 +53,6 @@ Setup: +@@ -53,21 +53,6 @@ Setup: If you want to build git along the helper, you can run `make git`. -Experimental support for python 3.x: ------------------------------------- - -Experimental support for python 3.5 or more can be enabled by one of the -following: - -- set the `GIT_CINNABAR_EXPERIMENTS` environment variable to `python3`. -- `git config cinnabar.experiments python3`. - -It has been tested mainly with python 3.5 and 3.7. Corner cases may not work -properly. - +-It is also possible to replace `python3` in either `GIT_CINNABAR_EXPERIMENTS` +-or `cinnabar.experiments` with `python=/path/to/python`. +- Usage: ------ ---- git-cinnabar.orig 2020-04-23 06:16:13 UTC +--- git-cinnabar.orig 2020-11-12 02:19:34 UTC +++ git-cinnabar -@@ -1,17 +1,4 @@ +@@ -1,25 +1,4 @@ -#!/bin/sh -''':' --experiments=${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)} --case ",$experiments," in +-experiments=",${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)}," +-case "$experiments" in -*,python3,*) - PYTHON=python3 - ;; +-*,python=*,*) +- PYTHON=${experiments#*,python=} +- PYTHON=${PYTHON%%,*} +- ;; -*) -- PYTHON=python2.7 +- if command -v python2.7 > /dev/null; then +- PYTHON=python2.7 +- else +- PYTHON=python2 +- fi - ;; -esac -exec $PYTHON $0 "$@" -exit 1 -''' +#!/usr/bin/env python import os import sys ---- git-remote-hg.orig 2020-04-23 06:16:13 UTC +--- git-remote-hg.orig 2020-11-12 02:19:34 UTC +++ git-remote-hg -@@ -1,17 +1,4 @@ +@@ -1,25 +1,4 @@ -#!/bin/sh -''':' --experiments=${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)} --case ",$experiments," in +-experiments=",${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)}," +-case "$experiments" in -*,python3,*) - PYTHON=python3 - ;; +-*,python=*,*) +- PYTHON=${experiments#*,python=} +- PYTHON=${PYTHON%%,*} +- ;; -*) -- PYTHON=python2.7 +- if command -v python2.7 > /dev/null; then +- PYTHON=python2.7 +- else +- PYTHON=python2 +- fi - ;; -esac -exec $PYTHON $0 "$@" -exit 1 -''' +#!/usr/bin/env python from __future__ import division import os