git: 03886d912802 - main - textproc/py-gi-docgen: remove hard-coded /usr/local

Tobias C. Berner tcberner at FreeBSD.org
Wed Jun 16 17:45:29 UTC 2021


The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=03886d91280299fe3989c109272706aadd61c983

commit 03886d91280299fe3989c109272706aadd61c983
Author:     John Hein <jcfyecrayz at liamekaens.com>
AuthorDate: 2021-06-16 17:42:49 +0000
Commit:     Tobias C. Berner <tcberner at FreeBSD.org>
CommitDate: 2021-06-16 17:42:59 +0000

    textproc/py-gi-docgen: remove hard-coded /usr/local
    
    PR:             256336
---
 textproc/py-gi-docgen/Makefile                      |  5 +++++
 textproc/py-gi-docgen/files/patch-gidocgen_utils.py | 11 +++++++++++
 2 files changed, 16 insertions(+)

diff --git a/textproc/py-gi-docgen/Makefile b/textproc/py-gi-docgen/Makefile
index bcec475e4cc9..649d353f7fd9 100644
--- a/textproc/py-gi-docgen/Makefile
+++ b/textproc/py-gi-docgen/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gi-docgen
 PORTVERSION=	2021.5
+PORTREVISION=	1
 CATEGORIES=	textproc python
 MASTER_SITES=	GNOME
 PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
@@ -25,4 +26,8 @@ USE_PYTHON= 	autoplist distutils
 
 NO_ARCH=	yes
 
+post-patch:
+	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+		${WRKSRC}/gidocgen/utils.py
+
 .include <bsd.port.mk>
diff --git a/textproc/py-gi-docgen/files/patch-gidocgen_utils.py b/textproc/py-gi-docgen/files/patch-gidocgen_utils.py
new file mode 100644
index 000000000000..1ac195999cac
--- /dev/null
+++ b/textproc/py-gi-docgen/files/patch-gidocgen_utils.py
@@ -0,0 +1,11 @@
+--- gidocgen/utils.py.orig	2021-04-15 15:10:34 UTC
++++ gidocgen/utils.py
+@@ -810,7 +810,7 @@ def find_program(bin_name, path=None):
+ 
+ def default_search_paths():
+     if not sys.platform == 'win32':
+-        xdg_data_dirs = os.environ.get("XDG_DATA_DIRS", "/usr/share:/usr/local/share").split(":")
++        xdg_data_dirs = os.environ.get("XDG_DATA_DIRS", "/usr/share:%%LOCALBASE%%/share").split(":")
+         xdg_data_home = os.environ.get("XDG_DATA_HOME", os.path.expanduser("~/.local/share"))
+     else:
+         xdg_data_dirs = None


More information about the dev-commits-ports-main mailing list