void-packages/srcpkgs/planify/patches/00-musl.patch

32 lines
1.3 KiB
Diff

diff -rup a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -28,7 +28,11 @@ libical_dep = dependency('libical-glib')
libportal_dep = [ dependency('libportal'), dependency('libportal-gtk4') ]
libgxml_dep = dependency('gxml-0.20')
libsecret_dep = dependency('libsecret-1')
-m_dep = meson.get_compiler('c').find_library('m', required : false)
+cc = meson.get_compiler('c')
+m_dep = cc.find_library('m', required : false)
+if cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
+ add_project_arguments('--define=HAVE_NL_TIME_FIRST_WEEKDAY', language: 'vala')
+endif
############
diff -rup a/src/Services/CalendarEvents/CalendarEvents.vala b/src/Services/CalendarEvents/CalendarEvents.vala
--- a/src/Services/CalendarEvents/CalendarEvents.vala
+++ b/src/Services/CalendarEvents/CalendarEvents.vala
@@ -65,7 +65,11 @@
source_components = new HashTable<E.Source, Gee.TreeMultiMap<string, ECal.Component> > (CalendarEventsUtil.source_hash_func, CalendarEventsUtil.source_equal_func);
source_view = new HashTable<string, ECal.ClientView> (str_hash, str_equal);
+#if HAVE_NL_TIME_FIRST_WEEKDAY
int week_start = Posix.NLTime.FIRST_WEEKDAY.to_string ().data[0];
+#else
+ int week_start = 0;
+#endif
if (week_start >= 1 && week_start <= 7) {
week_starts_on = (GLib.DateWeekday) (week_start - 1);
}