svn commit: r538844 - in head/devel/git-cinnabar: . files
Jan Beich
jbeich at FreeBSD.org
Mon Jun 15 03:56:48 UTC 2020
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 at 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
More information about the svn-ports-head
mailing list