Merge pull request #68342 from sikmir/gpscorrelate

gpscorrelate: enable NLS
This commit is contained in:
Matthew Bauer 2019-09-17 17:47:07 -04:00 committed by GitHub
commit 1d7f5073fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 4 deletions

View File

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