pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/gng Fix gng to work with python2 and python3



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2738ac3a2b85
branches:  trunk
changeset: 390710:2738ac3a2b85
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue Dec 27 18:28:34 2022 +0000

description:
Fix gng to work with python2 and python3

Used "print" without parenthesis. Also add dependency on python (gng
calls python from within a bash script)

diffstat:

 devel/gng/Makefile              |   4 +++-
 devel/gng/distinfo              |   4 ++--
 devel/gng/patches/patch-bin_gng |  13 +++++++++++--
 3 files changed, 16 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r 41ee04aa0ea7 -r 2738ac3a2b85 devel/gng/Makefile
--- a/devel/gng/Makefile        Tue Dec 27 16:59:26 2022 +0000
+++ b/devel/gng/Makefile        Tue Dec 27 18:28:34 2022 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2022/12/27 16:59:26 abs Exp $
+# $NetBSD: Makefile,v 1.3 2022/12/27 18:28:34 abs Exp $
 
 DISTNAME=              gng-1.0.3
+PKGREVISION=           1
 CATEGORIES=            devel
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=gdubw/}
 GITHUB_TAG=            v${PKGVERSION_NOREV}
@@ -40,4 +41,5 @@
        ${INSTALL_DATA} ${WRKSRC}/gradle/wrapper/gradle-wrapper.jar \
                ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle/wrapper
 
+.include "../../lang/python/pyversion.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 41ee04aa0ea7 -r 2738ac3a2b85 devel/gng/distinfo
--- a/devel/gng/distinfo        Tue Dec 27 16:59:26 2022 +0000
+++ b/devel/gng/distinfo        Tue Dec 27 18:28:34 2022 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2022/12/27 18:28:34 abs Exp $
 
 BLAKE2s (gng-1.0.3.tar.gz) = fc1c172998c0da64f8817c88dba8f696c05da8a464abb5add6d47eae0e9c617b
 SHA512 (gng-1.0.3.tar.gz) = a40be62d8deae070a5c5d342c4d510a78712657414d4dec4016becd7fb23436e6b344faf3917f7c1aa478c06a87ebbdd6541afea2fe8c035f8044f6d15af4855
 Size (gng-1.0.3.tar.gz) = 71089 bytes
-SHA1 (patch-bin_gng) = b9d5118c826931e1e3f7ecbb798c8cc0593e2939
+SHA1 (patch-bin_gng) = 00bebe6b02c8721a8a9114d291017b3c605acf20
diff -r 41ee04aa0ea7 -r 2738ac3a2b85 devel/gng/patches/patch-bin_gng
--- a/devel/gng/patches/patch-bin_gng   Tue Dec 27 16:59:26 2022 +0000
+++ b/devel/gng/patches/patch-bin_gng   Tue Dec 27 18:28:34 2022 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-bin_gng,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+$NetBSD: patch-bin_gng,v 1.2 2022/12/27 18:28:34 abs Exp $
 
-Use pkgsrc paths.
+Use pkgsrc paths, and update for python 3.x
 
 --- bin/gng.orig       2021-03-29 06:32:44.000000000 +0000
 +++ bin/gng
@@ -43,3 +43,12 @@
      cp -f "${srcDir}/gradle/gng.cfg" "${dir}/gradle/"
      cp -f "${srcDir}/gradle/gradlew" "${dir}/"
      cp -f "${srcDir}/gradle/gradlew.bat" "${dir}/"
+@@ -182,7 +173,7 @@ function bootstrap() {
+   if [[ "${_arg_version}" == "latest" ]]; then
+     info "Fetching the latest Gradle version from services.gradle.org"
+     _arg_version=$(curl -m 60 -sSL "https://services.gradle.org/versions/current"; |
+-      python -c "import json,sys;obj=json.load(sys.stdin);print obj['version'];") || die "Failed to fetch the version info!"
++      python -c "import json,sys;obj=json.load(sys.stdin);print(obj['version']);") || die "Failed to fetch the version info!"
+     info "The latest Gradle version is ${_arg_version}"
+   fi
+   __install_gw "${_arg_version}" "${_arg_distribution_type}" "${_arg_mirror:-}" "${_arg_destination_dir}"



Home | Main Index | Thread Index | Old Index