Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 2026 13:40:08 +0000
From:      Sergey A. Osokin <osa@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 496524310076 - main - devel/mercurial: fix build
Message-ID:  <6a43c738.263b0.16fdd3e@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=49652431007682f07523f5640ea535702543f521

commit 49652431007682f07523f5640ea535702543f521
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2026-06-30 13:38:23 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2026-06-30 13:40:03 +0000

    devel/mercurial: fix build
    
    Fixes:          84c3fe3a93fdc9b9207ea4b58ce39479b6dbc740
    Reported by:    dim
    PR:             286908
---
 ...tch-contrib_python-zstandard_c-ext_backend__c.c | 13 +++++++++++
 devel/mercurial/files/patch-setup.py               | 26 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/devel/mercurial/files/patch-contrib_python-zstandard_c-ext_backend__c.c b/devel/mercurial/files/patch-contrib_python-zstandard_c-ext_backend__c.c
new file mode 100644
index 000000000000..84a3e6ad256f
--- /dev/null
+++ b/devel/mercurial/files/patch-contrib_python-zstandard_c-ext_backend__c.c
@@ -0,0 +1,13 @@
+https://github.com/indygreg/python-zstandard/commit/7d7ff179e9a3e7569960f5167ae2729b16535f30
+
+--- contrib/python-zstandard/c-ext/backend_c.c.orig	2025-11-13 20:57:16 UTC
++++ contrib/python-zstandard/c-ext/backend_c.c
+@@ -313,7 +313,7 @@ int safe_pybytes_resize(PyObject **obj, Py_ssize_t siz
+ int safe_pybytes_resize(PyObject **obj, Py_ssize_t size) {
+     PyObject *tmp;
+ 
+-    if ((*obj)->ob_refcnt == 1) {
++    if (Py_REFCNT(*obj) == 1) {
+         return _PyBytes_Resize(obj, size);
+     }
+ 
diff --git a/devel/mercurial/files/patch-setup.py b/devel/mercurial/files/patch-setup.py
new file mode 100644
index 000000000000..6edb0a878e11
--- /dev/null
+++ b/devel/mercurial/files/patch-setup.py
@@ -0,0 +1,26 @@
+--- setup.py.orig	2025-11-13 20:57:16 UTC
++++ setup.py
+@@ -421,7 +421,7 @@ class hgbuildext(build_ext):
+                 )
+ 
+             for rustext in ruststandalones:
+-                rustext.build('' if self.editable_mode else self.build_lib)
++                rustext.build(self.build_lib)
+ 
+         return build_ext.build_extensions(self)
+ 
+@@ -515,12 +515,8 @@ class hgbuildpy(build_py):
+             ]
+         )
+ 
+-        if self.editable_mode:
+-            here = os.path.dirname(__file__)
+-            basepath = os.path.join(here, 'mercurial')
+-        else:
+-            basepath = os.path.join(self.build_lib, 'mercurial')
+-            self.mkpath(basepath)
++        basepath = os.path.join(self.build_lib, 'mercurial')
++        self.mkpath(basepath)
+ 
+         write_if_changed(os.path.join(basepath, '__modulepolicy__.py'), content)
+ 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a43c738.263b0.16fdd3e>