1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

gpscorrelate: enable NLS

This commit is contained in:
Nikolay Korotkiy 2019-09-09 00:57:57 +03:00
parent ec27f6ff3c
commit ad9efdce07
No known key found for this signature in database
GPG key ID: D1DE6D7F693663A5
2 changed files with 35 additions and 4 deletions

View file

@ -3,15 +3,17 @@
stdenv.mkDerivation rec {
pname = "gpscorrelate";
version = "unstable-2019-06-05";
version = "unstable-2019-09-03";
src = fetchFromGitHub {
owner = "dfandrich";
repo = pname;
rev = "80b14fe7c10c1cc8f62c13f517c062577ce88c85";
sha256 = "1gaan0nd7ai0bwilfnkza7lg5mz87804mvlygj0gjc672izr37r6";
rev = "e1dd44a34f67b1ab7201440e60a840258ee448d2";
sha256 = "0gjwwdqh9dprzylmmnk3gm41khka9arkij3i9amd8y7d49pm9rlv";
};
patches = [ ./fix-localedir.diff ];
nativeBuildInputs = [
desktop-file-utils
docbook_xml_dtd_42
@ -31,11 +33,12 @@ stdenv.mkDerivation rec {
"GTK=3"
"CC=cc"
"CXX=c++"
"CFLAGS=-DENABLE_NLS"
];
doCheck = true;
installTargets = [ "install" "install-desktop-file" ];
installTargets = [ "install" "install-po" "install-desktop-file" ];
meta = with stdenv.lib; {
description = "A GPS photo correlation tool, to add EXIF geotags";
@ -59,5 +62,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus;
homepage = "https://github.com/dfandrich/gpscorrelate";
platforms = platforms.linux;
maintainers = with maintainers; [ sikmir ];
};
}

View file

@ -0,0 +1,27 @@
diff --git i/Makefile w/Makefile
index 47919ca..408fd68 100644
--- i/Makefile
+++ w/Makefile
@@ -33,8 +33,9 @@ datadir = $(prefix)/share
mandir = $(datadir)/man
docdir = $(datadir)/doc/gpscorrelate
applicationsdir = $(datadir)/applications
+localedir = ${datadir}/locale
-DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -DPACKAGE_LOCALE_DIR=\"$(localedir)\"
TARGETS = gpscorrelate-gui$(EXEEXT) gpscorrelate$(EXEEXT) doc/gpscorrelate.1 doc/gpscorrelate.html
diff --git i/main-gui.c w/main-gui.c
index fdace6f..8a6197b 100644
--- i/main-gui.c
+++ w/main-gui.c
@@ -40,6 +40,7 @@
int main(int argc, char* argv[])
{
/* Initialize gettext (gtk_init initializes the locale) */
+ (void) bindtextdomain(TEXTDOMAIN, PACKAGE_LOCALE_DIR);
(void) textdomain(TEXTDOMAIN);
(void) bind_textdomain_codeset(TEXTDOMAIN, "UTF-8");