Merge pull request #291646 from TomaSajt/gramps
gramps: 5.1.6 -> 5.2.0, drop legacy builder
This commit is contained in:
commit
61d1ffe268
|
@ -0,0 +1,19 @@
|
||||||
|
diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py
|
||||||
|
index f25030e..59c1c90 100644
|
||||||
|
--- a/gramps/gen/utils/grampslocale.py
|
||||||
|
+++ b/gramps/gen/utils/grampslocale.py
|
||||||
|
@@ -370,8 +370,12 @@ class GrampsLocale:
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
# bug12278, _build_popup_ui() under linux and macOS
|
||||||
|
- locale.textdomain(self.localedomain)
|
||||||
|
- locale.bindtextdomain(self.localedomain, self.localedir)
|
||||||
|
+ if hasattr(locale, 'textdomain'):
|
||||||
|
+ locale.textdomain(self.localedomain)
|
||||||
|
+ locale.bindtextdomain(self.localedomain, self.localedir)
|
||||||
|
+ else:
|
||||||
|
+ gettext.textdomain(self.localedomain)
|
||||||
|
+ gettext.bindtextdomain(self.localedomain, self.localedir)
|
||||||
|
|
||||||
|
self.rtl_locale = False
|
||||||
|
if self.language[0] in _RTL_LOCALES:
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchpatch
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, gtk3
|
, gtk3
|
||||||
, pythonPackages
|
, pythonPackages
|
||||||
|
@ -10,8 +9,8 @@
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, gettext
|
, gettext
|
||||||
, # Optional packages:
|
# Optional packages:
|
||||||
enableOSM ? true
|
, enableOSM ? true
|
||||||
, osm-gps-map
|
, osm-gps-map
|
||||||
, glib-networking
|
, glib-networking
|
||||||
, enableGraphviz ? true
|
, enableGraphviz ? true
|
||||||
|
@ -21,13 +20,29 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (pythonPackages) python buildPythonApplication;
|
inherit (pythonPackages) buildPythonApplication pythonOlder;
|
||||||
in
|
in
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
version = "5.1.6";
|
version = "5.2.0";
|
||||||
pname = "gramps";
|
pname = "gramps";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "gramps-project";
|
||||||
|
repo = "gramps";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-8iQcaWLiBegVjcV16TfZbp8/4N/9f5pEl7mdV78CeEY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# textdomain doesn't exist as a property on locale when running on Darwin
|
||||||
|
./check-locale-hasattr-textdomain.patch
|
||||||
|
# disables the startup warning about bad GTK installation
|
||||||
|
./disable-gtk-warning-dialog.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
intltool
|
intltool
|
||||||
|
@ -38,6 +53,7 @@ buildPythonApplication rec {
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
glibcLocales
|
glibcLocales
|
||||||
|
pythonPackages.unittestCheckHook
|
||||||
pythonPackages.jsonschema
|
pythonPackages.jsonschema
|
||||||
pythonPackages.mock
|
pythonPackages.mock
|
||||||
pythonPackages.lxml
|
pythonPackages.lxml
|
||||||
|
@ -52,55 +68,25 @@ buildPythonApplication rec {
|
||||||
++ lib.optional enableGhostscript ghostscript
|
++ lib.optional enableGhostscript ghostscript
|
||||||
;
|
;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
owner = "gramps-project";
|
|
||||||
repo = "gramps";
|
|
||||||
rev = "v${version}";
|
|
||||||
hash = "sha256-BerkDXdFYfZ3rV5AeMo/uk53IN2U5z4GFs757Ar26v0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonPath = with pythonPackages; [
|
|
||||||
bsddb3
|
bsddb3
|
||||||
pyicu
|
pyicu
|
||||||
pygobject3
|
pygobject3
|
||||||
pycairo
|
pycairo
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# fix for running tests with a temporary home - remove next release
|
|
||||||
# https://gramps-project.org/bugs/view.php?id=12577
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/gramps-project/gramps/commit/1e95d8a6b5193d655d8caec1e6ab13628ad123db.patch";
|
|
||||||
hash = "sha256-2riWB13Yl+tk9+Tuo0YDLoxY2Rc0xrJKfb+ZU7Puzxk=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# Same installPhase as in buildPythonApplication but without --old-and-unmanageble
|
|
||||||
# install flag.
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p "$out/${python.sitePackages}"
|
|
||||||
|
|
||||||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
|
||||||
|
|
||||||
${python}/bin/${python.executable} setup.py install \
|
|
||||||
--install-lib=$out/${python.sitePackages} \
|
|
||||||
--prefix="$out"
|
|
||||||
|
|
||||||
eapth="$out/${python.sitePackages}/easy-install.pth"
|
|
||||||
if [ -e "$eapth" ]; then
|
|
||||||
# move colliding easy_install.pth to specifically named one
|
|
||||||
mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f "$out/${python.sitePackages}"/site.py*
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export HOME=$TMPDIR
|
export HOME=$(mktemp -d)
|
||||||
|
mkdir .git # Make gramps think that it's not in an installed state
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
makeWrapperArgs+=(
|
||||||
|
"''${gappsWrapperArgs[@]}"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/149812
|
# https://github.com/NixOS/nixpkgs/issues/149812
|
||||||
|
@ -111,8 +97,8 @@ buildPythonApplication rec {
|
||||||
description = "Genealogy software";
|
description = "Genealogy software";
|
||||||
mainProgram = "gramps";
|
mainProgram = "gramps";
|
||||||
homepage = "https://gramps-project.org";
|
homepage = "https://gramps-project.org";
|
||||||
maintainers = with maintainers; [ jk pinpox ];
|
maintainers = with maintainers; [ jk pinpox tomasajt ];
|
||||||
changelog = "https://github.com/gramps-project/gramps/blob/v${version}/ChangeLog";
|
changelog = "https://github.com/gramps-project/gramps/blob/${src.rev}/ChangeLog";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Every person has their own story but they are also part of a collective
|
Every person has their own story but they are also part of a collective
|
||||||
family history. Gramps gives you the ability to record the many details of
|
family history. Gramps gives you the ability to record the many details of
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py
|
||||||
|
index 0c0d4c3..522f65a 100644
|
||||||
|
--- a/gramps/gui/grampsgui.py
|
||||||
|
+++ b/gramps/gui/grampsgui.py
|
||||||
|
@@ -573,9 +573,6 @@ class Gramps:
|
||||||
|
dbstate = DbState()
|
||||||
|
self._vm = ViewManager(app, dbstate, config.get("interface.view-categories"))
|
||||||
|
|
||||||
|
- if lin() and glocale.lang != "C" and not gettext.find(GTK_GETTEXT_DOMAIN):
|
||||||
|
- _display_gtk_gettext_message(parent=self._vm.window)
|
||||||
|
-
|
||||||
|
_display_translator_message(parent=self._vm.window)
|
||||||
|
|
||||||
|
self._vm.init_interface()
|
Loading…
Reference in New Issue
Block a user