summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-11-23 08:02:34 +0100
committerHans de Graaff <graaff@gentoo.org>2021-11-23 08:04:33 +0100
commit552ebbe2ce76b2cf418fc41085ec40a94ad0bfe4 (patch)
treef7366f332bca029fbae5f848f0287e96a5a5e6a5 /sci-geosciences/viking
parentdev-ruby/file-tail: cleanup (diff)
downloadgentoo-552ebbe2ce76b2cf418fc41085ec40a94ad0bfe4.tar.gz
gentoo-552ebbe2ce76b2cf418fc41085ec40a94ad0bfe4.tar.bz2
gentoo-552ebbe2ce76b2cf418fc41085ec40a94ad0bfe4.zip
sci-geosciences/viking: add 1.9
Thanks to William Pettersson for tracking down required patches. Closes: https://bugs.gentoo.org/826638 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'sci-geosciences/viking')
-rw-r--r--sci-geosciences/viking/Manifest1
-rw-r--r--sci-geosciences/viking/files/viking-1.9-geocache.patch88
-rw-r--r--sci-geosciences/viking/viking-1.9.ebuild100
3 files changed, 189 insertions, 0 deletions
diff --git a/sci-geosciences/viking/Manifest b/sci-geosciences/viking/Manifest
index 2625c50c8b90..537ed00c87ac 100644
--- a/sci-geosciences/viking/Manifest
+++ b/sci-geosciences/viking/Manifest
@@ -1,2 +1,3 @@
DIST viking-1.8.tar.gz 5207444 BLAKE2B 6a9b786dd23e643a68c25d68e2e14c5a38d2fe6a4a57f6266e13d9208f8c3b49c122921ecf4c54c2630bf9a11e5288346643b4bf92aad67824e8c928de270f84 SHA512 c401e69a6038e4b20c5a2fdecb8b028156e7e8829dd9d48596b0501b6e0a364dc6cc0ab0a8c4bcc731b5c6721835d3cfb605b76ec3b266dab2426df12c321e62
+DIST viking-1.9.tar.gz 5962048 BLAKE2B 7997286619d55687c5f2a394c8e068432c025f4210e579eae68e344495690e08e609352af3a71f3dc10161bd3cbb1126241abd928a13555466c37d164aa1fa5c SHA512 44be8e008db369e8700f91a67f4e4fb7aaab67fa498e71da98502b2893e8efd85502caca23ce9ccba4cf0d167328c4b87b5e422e15b3f8611acf814053646697
DIST viking.pdf 383200 BLAKE2B 388129023e62008de2d2c402a72aa1e4a1834f99e6666bb9deedb5f5c32e8b94edeadf5a40e7b1f941aacc0057d4dcfbaf13c3098eb4efa02e3a1a8e00288201 SHA512 481c88afd43783475366d41cd46a7fa5fdbcd20fec27b3ce286fb8abe1e9efbb4164def0d19fca2380fa95b5b97e9472f25ff5e10f8d95261e85b7c4a52d29ee
diff --git a/sci-geosciences/viking/files/viking-1.9-geocache.patch b/sci-geosciences/viking/files/viking-1.9-geocache.patch
new file mode 100644
index 000000000000..4779c10dcd4c
--- /dev/null
+++ b/sci-geosciences/viking/files/viking-1.9-geocache.patch
@@ -0,0 +1,88 @@
+From bdfa84467787138b8a180938006b864a39d0dec0 Mon Sep 17 00:00:00 2001
+From: Rob Norris <rw_norris@hotmail.com>
+Date: Thu, 3 Jun 2021 21:30:02 +0100
+Subject: [PATCH] Github #128: Maintain datasource_gc.c such that it at least
+ compiles
+
+---
+ src/datasource_gc.c | 28 +++++++++++++++-------------
+ 1 file changed, 15 insertions(+), 13 deletions(-)
+
+diff --git a/src/datasource_gc.c b/src/datasource_gc.c
+index 37fa425a..22292b2c 100644
+--- a/src/datasource_gc.c
++++ b/src/datasource_gc.c
+@@ -128,9 +128,9 @@ static void datasource_gc_draw_circle ( datasource_gc_widgets_t *widgets )
+ gdouble lat, lon;
+ if ( widgets->circle_onscreen ) {
+ vik_viewport_draw_arc ( widgets->vvp, widgets->circle_gc, FALSE,
+- widgets->circle_x - widgets->circle_width/2,
+- widgets->circle_y - widgets->circle_width/2,
+- widgets->circle_width, widgets->circle_width, 0, 360*64 );
++ widgets->circle_x - widgets->circle_width/2,
++ widgets->circle_y - widgets->circle_width/2,
++ widgets->circle_width, widgets->circle_width, 0, 360*64, NULL );
+ }
+ /* calculate widgets circle_x and circle_y */
+ /* split up lat,lon into lat and lon */
+@@ -157,13 +157,13 @@ static void datasource_gc_draw_circle ( datasource_gc_widgets_t *widgets )
+ pixels_per_meter = ((gdouble)vik_viewport_get_width(widgets->vvp)) / vik_coord_diff(&c1, &c2);
+
+ /* this is approximate */
+- widgets->circle_width = gtk_spin_button_get_value_as_float ( GTK_SPIN_BUTTON(widgets->miles_radius_spin) )
++ widgets->circle_width = gtk_spin_button_get_value ( GTK_SPIN_BUTTON(widgets->miles_radius_spin) )
+ * METERSPERMILE * pixels_per_meter * 2;
+
+ vik_viewport_draw_arc ( widgets->vvp, widgets->circle_gc, FALSE,
+- widgets->circle_x - widgets->circle_width/2,
+- widgets->circle_y - widgets->circle_width/2,
+- widgets->circle_width, widgets->circle_width, 0, 360*64 );
++ widgets->circle_x - widgets->circle_width/2,
++ widgets->circle_y - widgets->circle_width/2,
++ widgets->circle_width, widgets->circle_width, 0, 360*64, NULL );
+
+ widgets->circle_onscreen = TRUE;
+ } else
+@@ -172,7 +172,7 @@ static void datasource_gc_draw_circle ( datasource_gc_widgets_t *widgets )
+
+ /* see if onscreen */
+ /* okay */
+- vik_viewport_sync ( widgets->vvp );
++ vik_viewport_sync ( widgets->vvp, NULL );
+ }
+
+ static void datasource_gc_add_setup_widgets ( GtkWidget *dialog, VikViewport *vvp, gpointer user_data )
+@@ -197,7 +197,9 @@ static void datasource_gc_add_setup_widgets ( GtkWidget *dialog, VikViewport *vv
+
+ widgets->vvp = vvp;
+ widgets->circle_gc = vik_viewport_new_gc ( vvp, "#000000", 3 );
++#if !GTK_CHECK_VERSION (3,0,0)
+ gdk_gc_set_function ( widgets->circle_gc, GDK_INVERT );
++#endif
+ widgets->circle_onscreen = TRUE;
+ datasource_gc_draw_circle ( widgets );
+
+@@ -240,7 +242,7 @@ static void datasource_gc_get_process_options ( datasource_gc_widgets_t *widgets
+ po->shell_command = g_strdup_printf( "rm -f ~/.geo/caches/*.html ; %s -H ~/.geo/caches -P -n%d -r%.1fM -u %s -p %s %s %s ; %s -z ~/.geo/caches/*.html ",
+ GC_PROGRAM1,
+ gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON(widgets->num_spin) ),
+- gtk_spin_button_get_value_as_float ( GTK_SPIN_BUTTON(widgets->miles_radius_spin) ),
++ gtk_spin_button_get_value ( GTK_SPIN_BUTTON(widgets->miles_radius_spin) ),
+ safe_user,
+ safe_pass,
+ slat, slon,
+@@ -256,10 +258,10 @@ static void datasource_gc_cleanup ( datasource_gc_widgets_t *widgets )
+ {
+ if ( widgets->circle_onscreen ) {
+ vik_viewport_draw_arc ( widgets->vvp, widgets->circle_gc, FALSE,
+- widgets->circle_x - widgets->circle_width/2,
+- widgets->circle_y - widgets->circle_width/2,
+- widgets->circle_width, widgets->circle_width, 0, 360*64 );
+- vik_viewport_sync( widgets->vvp );
++ widgets->circle_x - widgets->circle_width/2,
++ widgets->circle_y - widgets->circle_width/2,
++ widgets->circle_width, widgets->circle_width, 0, 360*64, NULL );
++ vik_viewport_sync( widgets->vvp, NULL );
+ }
+ g_free ( widgets );
+ }
diff --git a/sci-geosciences/viking/viking-1.9.ebuild b/sci-geosciences/viking/viking-1.9.ebuild
new file mode 100644
index 000000000000..3a74ac41d23c
--- /dev/null
+++ b/sci-geosciences/viking/viking-1.9.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools xdg-utils
+
+DESCRIPTION="GPS data editor and analyzer"
+HOMEPAGE="https://github.com/viking-gps/viking/"
+IUSE="doc +exif libexif geoclue gps +magic nls oauth"
+SRC_URI="
+ https://github.com/viking-gps/${PN}/archive/${P}.tar.gz
+ doc? ( https://github.com/viking-gps/${PN}/releases/download/${P}/${PN}.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMONDEPEND="
+ app-arch/bzip2
+ >=dev-tcltk/expect-5.45.4
+ dev-db/sqlite:3
+ dev-libs/expat
+ >=dev-libs/glib-2.44:2
+ >=dev-libs/json-glib-0.16
+ dev-libs/nettle
+ net-misc/curl
+ sys-libs/zlib
+ >=x11-libs/gdk-pixbuf-2.26:2
+ >=x11-libs/gtk+-3.22:3
+ geoclue? ( >=app-misc/geoclue-2.4.4:2.0 )
+ gps? ( >=sci-geosciences/gpsd-3.20 )
+ exif? ( libexif? ( media-libs/libexif ) !libexif? ( media-libs/gexiv2 ) )
+ magic? ( sys-apps/file )
+ oauth? ( net-libs/liboauth )
+"
+RDEPEND="${COMMONDEPEND}
+ sci-geosciences/gpsbabel
+"
+DEPEND="${COMMONDEPEND}
+ app-text/yelp-tools
+ dev-util/intltool
+ dev-util/gtk-doc
+ dev-util/gtk-doc-am
+ dev-libs/libxslt
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+
+S="${WORKDIR}/${PN}-${P}"
+
+PATCHES=( "${FILESDIR}/${P}-geocache.patch" )
+
+src_prepare()
+{
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-deprecations \
+ --with-libcurl \
+ --with-expat \
+ --enable-google \
+ --enable-nettle \
+ --enable-terraserver \
+ --enable-expedia \
+ --enable-openstreetmap \
+ --enable-bluemarble \
+ --enable-geonames \
+ --enable-geocaches \
+ --disable-dem24k \
+ --disable-mapnik \
+ --enable-mbtiles \
+ $(use_enable exif geotag) \
+ $(use_with libexif ) \
+ $(use_enable geoclue) \
+ $(use_enable gps realtime-gps-tracking) \
+ $(use_enable magic) \
+ $(use_enable nls) \
+ $(use_enable oauth)
+}
+
+src_install() {
+ default
+ if use doc; then
+ dodoc "${DISTDIR}"/${PN}.pdf
+ fi
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+ xdg_desktop_database_update
+}