commit:     3793f14edc40c8c43202f66dfa227617d22bd671
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Jul  3 10:56:37 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul  4 20:00:27 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3793f14e

sci-geosciences/gpscorrelate: add 2.3

deps :
add RDEP inherited from gtk+
rm app-text/docbook-xml-dtd and dev-libs/libxslt
   because manpage and html are provided by the tarball
add sys-devel/gettext to build and then install translations

Makefile patched to avoid manual installation

it compiles fine with libxml2:2/16

Closes: https://bugs.gentoo.org/946458
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42850
Closes: https://github.com/gentoo/gentoo/pull/42850
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-geosciences/gpscorrelate/Manifest              |  1 +
 .../files/gpscorrelate-2.3-adapt_makefile.patch    | 91 ++++++++++++++++++++++
 .../gpscorrelate/gpscorrelate-2.3.ebuild           | 58 ++++++++++++++
 3 files changed, 150 insertions(+)

diff --git a/sci-geosciences/gpscorrelate/Manifest 
b/sci-geosciences/gpscorrelate/Manifest
index 01f99a14b05e..26fb37c5a131 100644
--- a/sci-geosciences/gpscorrelate/Manifest
+++ b/sci-geosciences/gpscorrelate/Manifest
@@ -1 +1,2 @@
 DIST gpscorrelate-2.0.tar.xz 238276 BLAKE2B 
d576c49d80f9886530930e99231922816f8498abcedb748ce00706bd8906d9e3fb8d1e3402daab0278f6c8189fe423a44eeb4ca0bfd1b7ad56412ae49094fdea
 SHA512 
b4e28a416ad8eec0ed04f24118db0198cbc7328f4d63e7620e7468a66cdcf9a3fe825b779a32f079511c49b9da4a778ff47daa40afeb9fc14f269bdc4c8162b8
+DIST gpscorrelate-2.3.tar.xz 370500 BLAKE2B 
da6f61f3b7da2b7597947ba134c6391f62cf563b0128d501c988c86584c7b57e3917651842ee679de953e30a1fa241eaf772506308bcbcd94a5ebb88b9d7ec55
 SHA512 
6f4f64eac0d8235e4e1a6aa00b49dbae164e27098b9b3be8ed46b0307dda435de7de1d4e28e1c0a4d15f7e1d18742602ef7a5a6289fea1483e14b8fd46022b33

diff --git 
a/sci-geosciences/gpscorrelate/files/gpscorrelate-2.3-adapt_makefile.patch 
b/sci-geosciences/gpscorrelate/files/gpscorrelate-2.3-adapt_makefile.patch
new file mode 100644
index 000000000000..478676ed88cb
--- /dev/null
+++ b/sci-geosciences/gpscorrelate/files/gpscorrelate-2.3-adapt_makefile.patch
@@ -0,0 +1,91 @@
+https://github.com/dfandrich/gpscorrelate/pull/32.patch
+From 39545902a28813c3c877ea8083db6c0e8f4f5023 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Thu, 3 Jul 2025 10:50:23 +0200
+Subject: [PATCH] adapt Makefile for dist-building
+
+some dists needs to declare some variables for building package
+add ?= where it's useful
+
+separate install for earch target
+
+leave only linker flags in LDFLAGS
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ Makefile | 30 ++++++++++++++++++------------
+ 1 file changed, 18 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 93bb9a9..d57a52c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,13 +2,13 @@
+ 
+ PACKAGE_VERSION = 2.3.1git
+ 
+-CC = gcc
+-CXX = g++
++CC ?= gcc
++CXX ?= g++
+ EXEEXT =
+-PKG_CONFIG=pkg-config
+-CFLAGS   = -Wall -O2
+-CXXFLAGS = $(CFLAGS)
+-LDFLAGS  = -Wall -O2 -lm
++PKG_CONFIG ?= pkg-config
++CFLAGS   ?= -Wall -O2
++CXXFLAGS ?= $(CFLAGS)
++LDFLAGS  += -lm
+ GTK      = 3
+ CHECK_OPTIONS=
+ 
+@@ -28,19 +28,19 @@ CFLAGSINC += $(GTKFLAGS)
+ # Put --nonet here to avoid downloading DTDs while building documentation
+ XSLTFLAGS =
+ 
+-prefix   = /usr/local
++prefix   ?= /usr/local
+ bindir   = $(prefix)/bin
+ datadir  = $(prefix)/share
+ mandir   = $(datadir)/man
+-docdir   = $(datadir)/doc/gpscorrelate
++docdir   ?= $(datadir)/doc/gpscorrelate
+ applicationsdir = $(datadir)/applications
+ localedir = $(datadir)/locale
+ 
+ DEFS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" 
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" -DPACKAGE_DOC_DIR=\"$(docdir)\"
+ 
+-TARGETS = gpscorrelate-gui$(EXEEXT) gpscorrelate$(EXEEXT) doc/gpscorrelate.1 
doc/gpscorrelate.html
++TARGETS ?= gpscorrelate-gui$(EXEEXT) gpscorrelate$(EXEEXT)
+ 
+-all:  $(TARGETS)
++all:   $(TARGETS) docs
+ 
+ gpscorrelate$(EXEEXT): $(COBJS)
+       $(CXX) -o $@ $(COBJS) $(LDFLAGS) $(LIBS)
+@@ -66,9 +66,9 @@ clean:
+ distclean: clean clean-po
+       rm -f AUTHORS
+ 
+-install: all
++install-gpscorrelate:
+       install -d $(DESTDIR)$(bindir)
+-      install -m 0755 gpscorrelate$(EXEEXT) gpscorrelate-gui$(EXEEXT) 
$(DESTDIR)$(bindir)
++      install -m 0755 gpscorrelate$(EXEEXT) $(DESTDIR)$(bindir)
+       install -d $(DESTDIR)$(mandir)/man1
+       install -m 0644 doc/gpscorrelate.1 $(DESTDIR)$(mandir)/man1
+       install -d $(DESTDIR)$(docdir)
+@@ -82,6 +82,12 @@ install-desktop-file:
+       install -d $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
+       install -p -m 0644 gpscorrelate-gui.svg 
$(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/gpscorrelate-gui.svg
+ 
++install-gpscorrelate-gui: install-desktop-file
++      install -d $(DESTDIR)$(bindir)
++      install -m 0755 gpscorrelate-gui$(EXEEXT) $(DESTDIR)$(bindir)
++
++install: all $(foreach target,$(TARGETS),install-$(target))
++
+ docs: doc/gpscorrelate.1 doc/gpscorrelate.html
+ 
+ # BSD make doesn't work with $< as the prerequisite in the following rules 
but $? is fine

diff --git a/sci-geosciences/gpscorrelate/gpscorrelate-2.3.ebuild 
b/sci-geosciences/gpscorrelate/gpscorrelate-2.3.ebuild
new file mode 100644
index 000000000000..9010dc3505f4
--- /dev/null
+++ b/sci-geosciences/gpscorrelate/gpscorrelate-2.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs xdg
+
+DESCRIPTION="Tool for adjusting EXIF tags of your photos with a recorded GPS 
trace"
+HOMEPAGE="https://dfandrich.github.io/gpscorrelate/";
+SRC_URI="https://github.com/dfandrich/${PN}/releases/download/${PV}/${P}.tar.xz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="gtk"
+
+RDEPEND="
+       dev-libs/libxml2:=
+       media-gfx/exiv2:=
+       gtk? (
+               app-accessibility/at-spi2-core:2
+               dev-libs/glib:2
+               media-libs/harfbuzz:=
+               x11-libs/cairo
+               x11-libs/gdk-pixbuf:2
+               x11-libs/gtk+:3
+               x11-libs/pango
+       )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-devel/gettext
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-adapt_makefile.patch"
+)
+
+src_compile() {
+       export prefix="${EPREFIX}/usr"
+       export docdir="${prefix}/share/doc/${PF}/html"
+       export TARGETS="$(usex gtk 'gpscorrelate gpscorrelate-gui' 
'gpscorrelate')"
+       local emakeargs=(
+               CC="$(tc-getCC)"
+               CXX="$(tc-getCXX)"
+               PKG_CONFIG="$(tc-getPKG_CONFIG)"
+       )
+       emake "${emakeargs[@]}"
+}
+
+src_install() {
+       for file in po/*.po; do
+               msgfmt "${file}" -o "${file%.po}.mo" && domo "${file%.po}.mo" 
|| die
+       done
+
+       default
+}

Reply via email to