[california] _NL_TIME_FIRST_WEEKDAY detection doesn't work w/ tarball: Bug #734897



commit 01d7b8445f9fe43ba6b53f64291aeacb916f069b
Author: Jim Nelson <jim yorba org>
Date:   Tue Aug 19 18:50:38 2014 -0700

    _NL_TIME_FIRST_WEEKDAY detection doesn't work w/ tarball: Bug #734897
    
    Vala compiler flags set or detected in ./configure aren't properly
    reflected when building from tarball because the .c files have already
    been generated and distributed.  This change will always rebuild the
    .c files when ./configure runs.  This also means Vala is a hard
    requirement for California now (which is why the custom .vapi files
    must now be distributed).
    
    This also closes bug #726210.

 Makefile.am                       |    8 ++++++++
 src/Makefile.am                   |    4 ++++
 src/calendar/calendar-system.vala |    4 ++++
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index b4b1897..62f82b8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,8 +18,16 @@ californiadoc_DATA = \
        NEWS\
        $(NULL)
 
+BUILD_VAPI = \
+       vapi/libical.vapi \
+       vapi/libecal-1.2.vapi \
+       vapi/libecal-1.2/libecal-1.2.deps \
+       vapi/langinfo.vapi \
+       $(NULL)
+
 EXTRA_DIST = \
        $(californiadoc_DATA) \
+       $(BUILD_VAPI) \
        intltool-extract.in \
        intltool-merge.in \
        intltool-update.in\
diff --git a/src/Makefile.am b/src/Makefile.am
index a00e24b..8a99e77 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,6 +8,10 @@ AM_CPPFLAGS = \
 
 bin_PROGRAMS = california
 
+# This ensures that all ./configure switches and detected configuration variances are accounted for
+# when compiling the Vala files.  However, this also means Vala is required to build California.
+california_vala.stamp: ../config.status
+
 california_VALASOURCES = \
        activator/activator.vala \
        activator/activator-instance.vala \
diff --git a/src/calendar/calendar-system.vala b/src/calendar/calendar-system.vala
index 5cc6765..624b2d1 100644
--- a/src/calendar/calendar-system.vala
+++ b/src/calendar/calendar-system.vala
@@ -247,6 +247,8 @@ public class System : BaseObject {
         
         // Borrowed liberally (but not exactly) from GtkCalendar; see gtk_calendar_init
 #if HAVE__NL_TIME_FIRST_WEEKDAY
+        debug("Using _NL_TIME_FIRST_WEEKDAY for system first of week");
+        
         // 1-based day (1 == Sunday)
         int first_weekday = Langinfo.lookup_int(Langinfo.Item.INT_TIME_FIRST_WEEKDAY);
         
@@ -290,6 +292,8 @@ public class System : BaseObject {
             break;
         }
 #else
+        debug("_NL_TIME_FIRST_WEEKDAY unavailable for system first of week");
+        
         // For now, just use the default.  Later, user will be able to configure this.
         system_first_of_week = FirstOfWeek.DEFAULT;
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]