aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Takacs <nimaje+fbz@bureaucracy.de>2022-06-23 06:03:51 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2022-06-23 15:39:59 +0000
commitf8c049d638e6a9b00ad054f5afaf9083fa1c6581 (patch)
tree5871935a0891fd3fea2878371eded174924d691c
parent95299192d7e94b6fcb1e345c36d85ad989f6c42d (diff)
downloadports-f8c049d638e6a9b00ad054f5afaf9083fa1c6581.tar.gz
ports-f8c049d638e6a9b00ad054f5afaf9083fa1c6581.zip
science/gramps: Optional dependency on py-bsddb3
databases/py-bsddb3 is deprecated. Make science/gramps use py-bsddb3 as an option to facilitate the migration and remove the DEPRECATE note since it does not apply anymore. Add UPDATING note with instructions for the migration. While here pet linters. PR: 264529 Reported by: nimaje+fbz@bureaucracy.de
-rw-r--r--UPDATING10
-rw-r--r--science/gramps/Makefile14
-rw-r--r--science/gramps/files/patch-gramps_gen_utils_grampslocale.py20
3 files changed, 36 insertions, 8 deletions
diff --git a/UPDATING b/UPDATING
index 3684a2974f4b..c876ee6f0527 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,16 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20220623:
+AFFECTS: users of science/gramps
+ AUTHOR: fernape@FreeBSD.org
+
+ databases/py-bsddb3 is deprecated and will be removed in the future. With that
+ gramps will lose the ability to load family trees using Berkeley DB.
+ It is suggested to migrate all family trees using Berkeley DB by exporting
+ them to gramps xml and import that gramps xml into a family tree using sqlite
+ as database.
+
20220620:
AFFECTS: users of www/selenium
AUTHOR: fernape@FreeBSD.org
diff --git a/science/gramps/Makefile b/science/gramps/Makefile
index 80ed881973ec..58bc4677b7e3 100644
--- a/science/gramps/Makefile
+++ b/science/gramps/Makefile
@@ -2,8 +2,8 @@
PORTNAME= gramps
PORTVERSION= 5.1.5
-PORTREVISION= 1
DISTVERSIONPREFIX= v
+PORTREVISION= 2
CATEGORIES= science gnome python
MAINTAINER= ports@FreeBSD.org
@@ -12,14 +12,10 @@ COMMENT= GTK3-based genealogy program
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-DEPRECATED= Requires py-bsddb3 which requires upstream EOLd db5
-EXPIRATION_DATE= 2022-06-30
-
LIB_DEPENDS= libgeocode-glib.so:net/geocode-glib \
libosmgpsmap-1.0.so:x11-toolkits/osm-gps-map
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bsddb3>0:databases/py-bsddb3@${PY_FLAVOR} \
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygraphviz>=0:graphics/py-pygraphviz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyicu>=1.8:devel/py-pyicu@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pygraphviz>=0:graphics/py-pygraphviz@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \
xdg-open:devel/xdg-utils
@@ -33,14 +29,16 @@ CONFIGURE_ARGS= --disable-mime-install
NO_ARCH= yes
-OPTIONS_DEFINE= GEXIV GTKSPELL PIL RCS TTFFREEFONT
-OPTIONS_DEFAULT= GEXIV GTKSPELL
+OPTIONS_DEFINE= BDB GEXIV GTKSPELL PIL RCS TTFFREEFONT
+OPTIONS_DEFAULT= BDB GEXIV GTKSPELL
+BDB_DESC= Install py-bsddb3 to support family trees using Berkeley DB (DEPRECATED)
GEXIV_DESC= Manage Exif metadata embedded in media
GTKSPELL_DESC= Spell checking support via gtkspell
PIL_DESC= Crop/convert images with Python Imaging Library (Pillow)
RCS_DESC= Manage revisions of family trees with with GNU RCS
TTFFREEFONT_DESC= More font support in reports
+BDB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bsddb3>0:databases/py-bsddb3@${PY_FLAVOR}
GEXIV_LIB_DEPENDS= libgexiv2.so:graphics/gexiv2
GTKSPELL_LIB_DEPENDS= libgtkspell3-3.so:textproc/gtkspell3
PIL_RUN_DEPENDS= ${PY_PILLOW}
diff --git a/science/gramps/files/patch-gramps_gen_utils_grampslocale.py b/science/gramps/files/patch-gramps_gen_utils_grampslocale.py
new file mode 100644
index 000000000000..eaad4287fa38
--- /dev/null
+++ b/science/gramps/files/patch-gramps_gen_utils_grampslocale.py
@@ -0,0 +1,20 @@
+--- gramps/gen/utils/grampslocale.py.orig 2022-06-08 13:02:30.116272000 +0200
++++ gramps/gen/utils/grampslocale.py 2022-06-08 12:40:34.253581000 +0200
+@@ -527,9 +527,14 @@
+ # with locale instead of gettext. Win32 doesn't support bindtextdomain.
+ if self.localedir:
+ if not sys.platform == 'win32':
+- # bug12278, _build_popup_ui() under linux and macOS
+- locale.textdomain(self.localedomain)
+- locale.bindtextdomain(self.localedomain, self.localedir)
++ if hasattr(locale, 'textdomain'):
++ # bug12278, _build_popup_ui() under linux and macOS
++ locale.textdomain(self.localedomain)
++ locale.bindtextdomain(self.localedomain, self.localedir)
++ else:
++ import gettext
++ gettext.textdomain(self.localedomain)
++ gettext.bindtextdomain(self.localedomain, self.localedir)
+ else:
+ self._win_bindtextdomain(self.localedomain.encode('utf-8'),
+ self.localedir.encode('utf-8'))