From 814966482ef920994ebfc29f66012741e37edf60 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Fri, 22 Dec 2023 18:16:36 +0100 Subject: [PATCH] initial package creation Signed-off-by: Toshaan Bharvani --- ...-Remove-regions-from-the-map-2097831.patch | 4253 +++++++++++++++++ SPECS/libtimezonemap.spec | 195 + 2 files changed, 4448 insertions(+) create mode 100644 SOURCES/0001-Remove-regions-from-the-map-2097831.patch create mode 100644 SPECS/libtimezonemap.spec diff --git a/SOURCES/0001-Remove-regions-from-the-map-2097831.patch b/SOURCES/0001-Remove-regions-from-the-map-2097831.patch new file mode 100644 index 0000000..79bcb1b --- /dev/null +++ b/SOURCES/0001-Remove-regions-from-the-map-2097831.patch @@ -0,0 +1,4253 @@ +From 5a3060281d29e4d97f6f3fec3c969e71520d9ba5 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Mon, 20 Jun 2022 15:14:56 +0200 +Subject: [PATCH] Remove regions from the map (#2097831) + +Resolves: rhbz#2097831 +--- + src/cc-timezone-map.c | 74 - + src/data/time_zones_countryInfo-orig.svg | 4122 +++++++++++++++++++++- + 2 files changed, 4121 insertions(+), 75 deletions(-) + +diff --git a/src/cc-timezone-map.c b/src/cc-timezone-map.c +index d7c99d5..e2b6c97 100644 +--- a/src/cc-timezone-map.c ++++ b/src/cc-timezone-map.c +@@ -228,71 +228,6 @@ cc_timezone_map_get_preferred_height (GtkWidget *widget, + *natural = 173; + } + +-/* Call whenever the allocation or offset changes */ +-static void +-render_highlight (CcTimezoneMap *cc) +-{ +- CcTimezoneMapPrivate *priv = cc->priv; +- GtkAllocation alloc; +- RsvgDimensionData svg_dimensions; +- gdouble scale_x, scale_y; +- cairo_surface_t *surface; +- cairo_t *cr; +- gchar *layer_name; +- gdouble *hash_key; +- +- /* The reference to the cairo_pattern_t object is held by highlight_table */ +- +- /* If no highlight is displayed, just unset the pointer */ +- if (!priv->show_offset) +- { +- if (priv->highlight) +- { +- priv->highlight = NULL; +- } +- +- return; +- } +- +- /* Check if the highlight has already been rendered */ +- priv->highlight = g_hash_table_lookup (priv->highlight_table, +- &priv->selected_offset); +- if (priv->highlight) +- return; +- +- layer_name = g_strdup_printf("#%c%g", +- priv->selected_offset > 0 ? 'p' : 'm', +- fabs(priv->selected_offset)); +- gtk_widget_get_allocation (GTK_WIDGET (cc), &alloc); +- +- /* Use the size of the background layer as the scale */ +- rsvg_handle_get_dimensions_sub (priv->map_svg, &svg_dimensions, "#background"); +- scale_x = (double)alloc.width / svg_dimensions.width; +- scale_y = (double)alloc.height / svg_dimensions.height; +- +- surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, +- alloc.width, +- alloc.height); +- cr = cairo_create (surface); +- +- cairo_scale (cr, scale_x, scale_y); +- rsvg_handle_render_cairo_sub (priv->map_svg, cr, layer_name); +- g_free(layer_name); +- cairo_surface_flush (surface); +- +- priv->highlight = cairo_pattern_create_for_surface (surface); +- +- cairo_surface_destroy (surface); +- cairo_destroy (cr); +- +- /* Save the pattern in the hash table */ +- hash_key = g_malloc (sizeof (gdouble)); +- *hash_key = priv->selected_offset; +- g_hash_table_insert (priv->highlight_table, +- hash_key, +- priv->highlight); +-} +- + /* Update the cached map patterns when the widget allocation changes */ + static void + cc_timezone_map_size_allocate (GtkWidget *widget, +@@ -333,7 +268,6 @@ cc_timezone_map_size_allocate (GtkWidget *widget, + + /* Invalidate the highlight cache and render the current one */ + g_hash_table_remove_all (priv->highlight_table); +- render_highlight (CC_TIMEZONE_MAP(widget)); + } + + static void +@@ -458,12 +392,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS + cairo_stroke(cr); + } + +- if (priv->highlight) +- { +- cairo_set_source (cr, priv->highlight); +- cairo_paint_with_alpha (cr, alpha); +- } +- + if (!priv->location) { + return TRUE; + } +@@ -606,7 +534,6 @@ set_location (CcTimezoneMap *map, + unsetenv("TZ"); + } + +- render_highlight (map); + gtk_widget_queue_draw (GTK_WIDGET (map)); + + +@@ -1051,6 +978,5 @@ void cc_timezone_map_set_selected_offset (CcTimezoneMap *map, gdouble offset) + map->priv->selected_offset = offset; + map->priv->show_offset = TRUE; + g_object_notify(G_OBJECT(map), "selected-offset"); +- render_highlight (map); + gtk_widget_queue_draw (GTK_WIDGET (map)); + } +diff --git a/src/data/time_zones_countryInfo-orig.svg b/src/data/time_zones_countryInfo-orig.svg +index aa288a2..4be8a12 100644 +--- a/src/data/time_zones_countryInfo-orig.svg ++++ b/src/data/time_zones_countryInfo-orig.svg +@@ -1 +1,4121 @@ +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +2.36.1 + diff --git a/SPECS/libtimezonemap.spec b/SPECS/libtimezonemap.spec new file mode 100644 index 0000000..affa8c2 --- /dev/null +++ b/SPECS/libtimezonemap.spec @@ -0,0 +1,195 @@ +Name: libtimezonemap +Version: 0.4.5.1 +Release: 12%{?dist} +Summary: Time zone map widget for Gtk+ + +License: GPLv3 +URL: https://launchpad.net/timezonemap +Source0: https://github.com/dashea/timezonemap/archive/%{version}.tar.gz + +# https://bugzilla.redhat.com/show_bug.cgi?id=2097831 +Patch0: 0001-Remove-regions-from-the-map-2097831.patch + +BuildRequires: glib2-devel >= 2.26 +BuildRequires: gtk3-devel >= 3.1.4 +BuildRequires: json-glib-devel +BuildRequires: gobject-introspection-devel +BuildRequires: gnome-common +BuildRequires: libsoup-devel >= 2.42.0 +BuildRequires: librsvg2-devel +BuildRequires: make + +%description +libtimezonemap is a time zone map widget for Gtk+. The widget displays a world +map with a highlighted region representing the selected time zone, and the +location can be changed by clicking on the map. + +This library is a fork of the of the code from gnome-control-center's datetime +panel, which was itself a fork of Ubiquity's timezone map. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +libtimezonemap is a time zone map widget for Gtk+. This package contains header +files used for building applications that use %{name}. + +%prep +%autosetup -n timezonemap-%{version} -p1 + +%build +./autogen.sh +%configure +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} +rm -f %{buildroot}%{_libdir}/*.la + +%ldconfig_scriptlets + +%files +%license COPYING +%doc README TODO +%{_libdir}/libtimezonemap.so.* +%{_libdir}/girepository-1.0/TimezoneMap-1.0.typelib +%{_datadir}/%{name} + +%files devel +%{_libdir}/libtimezonemap.so +%{_libdir}/pkgconfig/timezonemap.pc +%{_includedir}/timezonemap +%{_datadir}/gir-1.0/TimezoneMap-1.0.gir +%{_datadir}/glade/catalogs/TimezoneMap.xml + +%changelog +* Wed Jun 22 2022 Jiri Konecny - 0.4.5.1-12 +- Remove regions from the map + Resolves: rhbz#2097831 + +* Mon Aug 09 2021 Mohan Boddu - 0.4.5.1-11 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 0.4.5.1-10 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.4.5.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.4.5.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 0.4.5.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.4.5.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.4.5.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.4.5.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Igor Gnatenko - 0.4.5.1-3 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 0.4.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Oct 20 2017 David Shea - 0.4.5.1-1 +- Fix SVG visibility (jkonecny) (#1502915) + +* Thu Aug 03 2017 Fedora Release Engineering - 0.4.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.4.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 17 2017 David Shea - 0.4.5-6 +- Removed tests + +* Fri Feb 10 2017 Fedora Release Engineering - 0.4.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Aug 17 2016 David Shea - 0.4.5-4 +- Bring back the setting of $TZ (#1367647) + +* Wed Jun 29 2016 David Shea - 0.4.5-3 +- Render the map directly from SVG (#1335158) +- Fix memory leaks in tz.c +- Fix an invalid memory access +- Do not modify TZ in the process environment +- Move all data files to /usr/share/libtimezonemap from .../libtimezonemap/ui +- Add extra city data so all timezone offsets are clickable +- Move Venezuela from -04:30 to -04:00 +- Fix the conversion of points just west of 180 longitude +- Remove the out-of-date Olson map data +- Update the "backward" file +- Improve the location selected when setting the timezone by name (#1322648) +- Remove an extra line in the +10:00 layer +- Move Chile back an hour + +* Thu Feb 04 2016 Fedora Release Engineering - 0.4.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 4 2016 David Shea - 0.4.5-1 +- Update the map images + +* Wed Jun 17 2015 Fedora Release Engineering - 0.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri May 8 2015 David Shea - 0.4.4-1 +- Fixes for LP#1440157: + Port to libsoup directly for geoname results + Fix some memory leaks + Do not reuse GCancellables +- Upstream merges of SVG update and constrained location cycles + +* Fri May 1 2015 David Shea - 0.4.2-6 +- Updated the time zone map images +- Updated the city data from geonames.org +- Fix a memory leak and potential crash with the locations list +- Cycle through a smaller list of map locations on repeated clicks + +* Wed Jan 28 2015 David Shea - 0.4.2-5 +- Use %%license for the license file + +* Sun Aug 17 2014 Fedora Release Engineering - 0.4.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 0.4.2-3 +- Rebuilt for gobject-introspection 1.41.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 0.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 2 2014 David Shea - 0.4.2-1 +- New upstream release libtimezonemap-0.4.2 + +* Mon Dec 2 2013 David Shea - 0.4.1-4 +- Merge fixes from lp:timezonemap +- Add cc-timezone-location.h to timezonemapincludes_HEADERS so it gets installed (iain.lane) +- Set en_name correctly (iain.lane) +- Don't call g_type_init() on glib >= 2.35; it's deprecated (iain.lane) + +* Wed Nov 27 2013 David Shea - 0.4.1-3 +- Added a glade catalog file (dshea) + +* Tue Nov 26 2013 David Shea - 0.4.1-2 +- Make whitespace and indentation consistent (iain.lane@canonical.com) +- Switched to a git-formatted patch for the FSF address to make things easier + for me to track (dshea) +- Create local copies of string properties. (dshea) +- Moved CcTimezoneLocation into its own file. (dshea) +- Don't close a NULL file pointer. (dshea) +- Turn on and fix g-ir-scanner warnings. (dshea) +- Added a .bzrignore file to ignore all the files generated by the build. (dshea) +- Ignore the INSTALL file (dshea) +- Added a function to clear the location set for a CcTimezoneMap (dshea) +- Allow the timezone highlight to be manually set separately from the location. (dshea) + +* Thu Nov 14 2013 David Shea - 0.4.1-1 +- Initial version