From owner-svn-ports-all@freebsd.org Mon Jun 15 03:56:48 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B15A134DC29; Mon, 15 Jun 2020 03:56:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49lcw04D0rz43c0; Mon, 15 Jun 2020 03:56:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C0E817A02; Mon, 15 Jun 2020 03:56:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05F3umSu002453; Mon, 15 Jun 2020 03:56:48 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05F3um38002451; Mon, 15 Jun 2020 03:56:48 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <202006150356.05F3um38002451@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Mon, 15 Jun 2020 03:56:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r538844 - in head/devel/git-cinnabar: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/devel/git-cinnabar: . files X-SVN-Commit-Revision: 538844 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2020 03:56:48 -0000 Author: jbeich Date: Mon Jun 15 03:56:47 2020 New Revision: 538844 URL: https://svnweb.freebsd.org/changeset/ports/538844 Log: devel/git-cinnabar: expose Python 3 support As git-cinnabar-py37. Unsuffixed version still uses Python 2. Added: head/devel/git-cinnabar/files/patch-no-wrapper (contents, props changed) Modified: head/devel/git-cinnabar/Makefile (contents, props changed) Modified: head/devel/git-cinnabar/Makefile ============================================================================== --- head/devel/git-cinnabar/Makefile Mon Jun 15 03:54:23 2020 (r538843) +++ head/devel/git-cinnabar/Makefile Mon Jun 15 03:56:47 2020 (r538844) @@ -4,6 +4,7 @@ PORTNAME= git-cinnabar DISTVERSION= 0.5.5 PORTREVISION= 2 CATEGORIES= devel +PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX:N-py27} MAINTAINER= jbeich@FreeBSD.org COMMENT= Git remote helper to interact with Mercurial repositories @@ -11,14 +12,15 @@ COMMENT= Git remote helper to interact with Mercurial LICENSE= GPLv2 BUILD_DEPENDS= ${NONEXISTENT}:devel/git:configure -RUN_DEPENDS= git:devel/git \ - hg:devel/mercurial +RUN_DEPENDS= git:devel/git +py27_RUN_DEPENDS= hg:devel/mercurial # XXX bug 242463 USE_GITHUB= yes GH_ACCOUNT= glandium -USES= gmake python:2.7,run shebangfix -SHEBANG_LANG= python2.7 +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 .ifnmake describe @@ -37,7 +39,7 @@ PORTDOCS= README.md OPTIONS_DEFINE= DOCS post-configure: - @${TAR} cf - -C$$(${MAKE} -V WRKSRC -C ${PORTSDIR}/devel/git) . | \ + @${TAR} cf - -C$$(${SETENV} -u FLAVOR ${MAKE} -V WRKSRC -C ${PORTSDIR}/devel/git) . | \ ${TAR} xof - -C${WRKSRC}/git-core do-install: Added: head/devel/git-cinnabar/files/patch-no-wrapper ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/git-cinnabar/files/patch-no-wrapper Mon Jun 15 03:56:47 2020 (r538844) @@ -0,0 +1,65 @@ +Disable wrappers as Python version is controlled by FLAVORS + +--- README.md.orig 2020-04-23 06:16:13 UTC ++++ README.md +@@ -53,18 +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. +- + Usage: + ------ + +--- git-cinnabar.orig 2020-04-23 06:16:13 UTC ++++ git-cinnabar +@@ -1,17 +1,4 @@ +-#!/bin/sh +-''':' +-experiments=${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)} +-case ",$experiments," in +-*,python3,*) +- PYTHON=python3 +- ;; +-*) +- PYTHON=python2.7 +- ;; +-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 +@@ -1,17 +1,4 @@ +-#!/bin/sh +-''':' +-experiments=${GIT_CINNABAR_EXPERIMENTS-$(git config cinnabar.experiments)} +-case ",$experiments," in +-*,python3,*) +- PYTHON=python3 +- ;; +-*) +- PYTHON=python2.7 +- ;; +-esac +-exec $PYTHON $0 "$@" +-exit 1 +-''' ++#!/usr/bin/env python + + from __future__ import division + import os