aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hein <jcfyecrayz@liamekaens.com>2021-06-16 17:42:49 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2021-06-16 17:42:59 +0000
commit03886d91280299fe3989c109272706aadd61c983 (patch)
tree39fdd9493187729fe578071d65be155504ff8e82
parenta61ec95e788a1f696c396950101c76cc3f43637c (diff)
downloadports-03886d91280299fe3989c109272706aadd61c983.tar.gz
ports-03886d91280299fe3989c109272706aadd61c983.zip
textproc/py-gi-docgen: remove hard-coded /usr/local
PR: 256336
-rw-r--r--textproc/py-gi-docgen/Makefile5
-rw-r--r--textproc/py-gi-docgen/files/patch-gidocgen_utils.py11
2 files changed, 16 insertions, 0 deletions
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