File maya-calendar-0.4.1-vapi.patch of Package maya-calendar
diff -ruN calendar-0.4.1.orig/calendar-0.4.1/CMakeLists.txt calendar-0.4.1/calendar-0.4.1/CMakeLists.txt
--- calendar-0.4.1.orig/calendar-0.4.1/CMakeLists.txt 2017-12-01 23:54:43.000000000 +0300
+++ calendar-0.4.1/calendar-0.4.1/CMakeLists.txt 2018-04-24 00:47:27.131498733 +0300
@@ -125,7 +125,7 @@
find_package (Vala REQUIRED)
include (ValaVersion)
-ensure_vala_version ("0.23.2" MINIMUM)
+ensure_vala_version ("0.40.4" MINIMUM)
include (ValaPrecompile)
add_subdirectory (po)
diff -ruN calendar-0.4.1.orig/calendar-0.4.1/core/CMakeLists.txt calendar-0.4.1/calendar-0.4.1/core/CMakeLists.txt
--- calendar-0.4.1.orig/calendar-0.4.1/core/CMakeLists.txt 2017-12-01 23:54:43.000000000 +0300
+++ calendar-0.4.1/calendar-0.4.1/core/CMakeLists.txt 2018-04-24 00:48:06.303739259 +0300
@@ -27,8 +27,6 @@
${CORE_PACKAGES}
OPTIONS
${BASIC_VALAC_OPTIONS}
- CUSTOM_VAPIS
- ${CMAKE_SOURCE_DIR}/vapi/posix-extension.vapi
GENERATE_VAPI
${CMAKE_PROJECT_NAME}
GENERATE_HEADER
diff -ruN calendar-0.4.1.orig/calendar-0.4.1/core/Model/CalendarModel.vala calendar-0.4.1/calendar-0.4.1/core/Model/CalendarModel.vala
--- calendar-0.4.1.orig/calendar-0.4.1/core/Model/CalendarModel.vala 2017-12-01 23:54:43.000000000 +0300
+++ calendar-0.4.1/calendar-0.4.1/core/Model/CalendarModel.vala 2018-04-24 00:49:25.636205644 +0300
@@ -68,7 +68,7 @@
}
private CalendarModel () {
- int week_start = Posix.nl_langinfo2 (Posix.NLTime.FIRST_WEEKDAY).data[0];
+ int week_start = Posix.NLTime.FIRST_WEEKDAY.to_string ().data[0];
if (week_start >= 1 && week_start <= 7) {
week_starts_on = (Maya.Settings.Weekday)week_start-1;
}
diff -ruN calendar-0.4.1.orig/calendar-0.4.1/vapi/posix-extension.vapi calendar-0.4.1/calendar-0.4.1/vapi/posix-extension.vapi
--- calendar-0.4.1.orig/calendar-0.4.1/vapi/posix-extension.vapi 2017-12-01 23:54:43.000000000 +0300
+++ calendar-0.4.1/calendar-0.4.1/vapi/posix-extension.vapi 1970-01-01 03:00:00.000000000 +0300
@@ -1,15 +0,0 @@
-[CCode (cprefix = "", lower_case_cprefix = "")]
-namespace Posix {
- [CCode (cheader_filename = "langinfo.h", cname = "nl_item", cprefix = "_NL_TIME_", has_type_id = false)]
- public enum NLTime {
- WEEK_NDAYS,
- WEEK_1STDAY,
- WEEK_1STWEEK,
- FIRST_WEEKDAY,
- FIRST_WORKDAY,
- CAL_DIRECTION,
- TIMEZONE
- }
- [CCode (cname = "nl_langinfo",cheader_filename = "langinfo.h")]
- public unowned string nl_langinfo2 (NLTime item);
-}