[Freeassociation-devel] Incorrect CFLAGS in libical.pc

Debarshi Ray debarshi.ray at gmail.com
Sun Mar 15 10:34:31 PDT 2009


>> We can either stop providing /usr/include/libical.h, or remove
>> -I/usr/include/libical from the CFLAGS. Which one would you prefer?

> IMHO, fix CFLAGS in libical.pc

Merely fixing CFLAGS does not seem to be the solution because libical
headers like /usr/include/libical/icalss.h contain lines like:
#include <icalcomponent.h>

For a full list see: grep "include" /usr/include/libical/*.h | grep
"<ical" | less

One way out is to make them use '#include "ical..."' instead of
'#include <ical...>' or do you want to use '#include
<libical/ical...>' instead?

For the moment, I am using the following patch in the Fedora package:

diff -urNp libical-0.43.orig/libical.pc.in libical-0.43/libical.pc.in
--- libical-0.43.orig/libical.pc.in	2009-03-15 21:58:49.000000000 +0530
+++ libical-0.43/libical.pc.in	2009-03-15 22:11:13.000000000 +0530
@@ -7,5 +7,5 @@ Name: libical
 Description: An implementation of basic iCAL protocols
 Version: @VERSION@
 Libs: -L${libdir} -lical -licalss -licalvcal
-Cflags: -I${includedir}/libical
+Cflags: -I${includedir}

diff -urNp libical-0.43.orig/src/libical/icaltz-util.c
libical-0.43/src/libical/icaltz-util.c
--- libical-0.43.orig/src/libical/icaltz-util.c	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libical/icaltz-util.c	2009-03-15 22:08:03.000000000 +0530
@@ -81,8 +81,8 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#include <libical/icalerror.h>
-#include <icaltz-util.h>
+#include "icalerror.h"
+#include "icaltz-util.h"

 typedef struct
 {
diff -urNp libical-0.43.orig/src/libicalcap/icalcap.h
libical-0.43/src/libicalcap/icalcap.h
--- libical-0.43.orig/src/libicalcap/icalcap.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalcap/icalcap.h	2009-03-15 22:08:48.000000000 +0530
@@ -1,7 +1,7 @@
 #ifndef __ICALCAP_H__
 #define __ICALCAP_H__

-#include <ical.h>
+#include <libical/ical.h>

 /*
  * Opaque objects
diff -urNp libical-0.43.orig/src/libicalcap/icalcap_message_impl.h
libical-0.43/src/libicalcap/icalcap_message_impl.h
--- libical-0.43.orig/src/libicalcap/icalcap_message_impl.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalcap/icalcap_message_impl.h	2009-03-15
22:09:16.000000000 +0530
@@ -3,7 +3,7 @@

 #ifdef WITH_RR

-#include <ical.h>
+#include <libical/ical.h>
 #include <librr/rr.h>

 #define	ICALCAP_MESSAGE_CMD	1
diff -urNp libical-0.43.orig/src/libicalss/icalcalendar.h
libical-0.43/src/libicalss/icalcalendar.h
--- libical-0.43.orig/src/libicalss/icalcalendar.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icalcalendar.h	2009-03-15
22:02:47.000000000 +0530
@@ -30,7 +30,7 @@
 #define ICALCALENDAR_H

 #include <libical/ical.h>
-#include <icalset.h>
+#include "icalset.h"

 /* icalcalendar
  * Routines for storing calendar data in a file system. The calendar
diff -urNp libical-0.43.orig/src/libicalss/icalclassify.h
libical-0.43/src/libicalss/icalclassify.h
--- libical-0.43.orig/src/libicalss/icalclassify.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icalclassify.h	2009-03-15
22:03:39.000000000 +0530
@@ -28,8 +28,8 @@
 #define ICALCLASSIFY_H

 #include <libical/ical.h>
-#include <icalset.h>
-#include <icalcomponent.h>
+#include "icalset.h"
+#include "icalcomponent.h"

 icalproperty_xlicclass icalclassify(icalcomponent* c,icalcomponent* match,
 			      const char* user);
diff -urNp libical-0.43.orig/src/libicalss/icalcluster.h
libical-0.43/src/libicalss/icalcluster.h
--- libical-0.43.orig/src/libicalss/icalcluster.h	2009-03-15
21:58:48.000000000 +0530
+++ libical-0.43/src/libicalss/icalcluster.h	2009-03-15 22:01:36.000000000 +0530
@@ -30,7 +30,7 @@
 #define ICALCLUSTER_H

 #include <libical/ical.h>
-#include <icalset.h>
+#include "icalset.h"

 typedef struct icalcluster_impl icalcluster;

diff -urNp libical-0.43.orig/src/libicalss/icaldirset.h
libical-0.43/src/libicalss/icaldirset.h
--- libical-0.43.orig/src/libicalss/icaldirset.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icaldirset.h	2009-03-15 22:04:53.000000000 +0530
@@ -30,9 +30,9 @@
 #define ICALDIRSET_H

 #include <libical/ical.h>
-#include <icalset.h>
-#include <icalcluster.h>
-#include <icalgauge.h>
+#include "icalset.h"
+#include "icalcluster.h"
+#include "icalgauge.h"

 /* icaldirset Routines for storing, fetching, and searching for ical
  * objects in a database */
diff -urNp libical-0.43.orig/src/libicalss/icalfileset.h
libical-0.43/src/libicalss/icalfileset.h
--- libical-0.43.orig/src/libicalss/icalfileset.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icalfileset.h	2009-03-15 22:03:13.000000000 +0530
@@ -30,9 +30,9 @@
 #define ICALFILESET_H

 #include <libical/ical.h>
-#include <icalset.h>
-#include <icalcluster.h>
-#include <icalgauge.h>
+#include "icalset.h"
+#include "icalcluster.h"
+#include "icalgauge.h"
 #include <sys/types.h> /* For open() flags and mode */
 #include <sys/stat.h> /* For open() flags and mode */
 #include <fcntl.h> /* For open() flags and mode */
diff -urNp libical-0.43.orig/src/libicalss/icalgauge.h
libical-0.43/src/libicalss/icalgauge.h
--- libical-0.43.orig/src/libicalss/icalgauge.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icalgauge.h	2009-03-15 22:04:12.000000000 +0530
@@ -29,7 +29,7 @@
 #ifndef ICALGAUGE_H
 #define ICALGAUGE_H

-#include <icalcomponent.h>
+#include "icalcomponent.h"

 /** @file icalgauge.h
  *  @brief Routines implementing a filter for ical components
diff -urNp libical-0.43.orig/src/libicalss/icalset.h
libical-0.43/src/libicalss/icalset.h
--- libical-0.43.orig/src/libicalss/icalset.h	2009-03-15
21:58:49.000000000 +0530
+++ libical-0.43/src/libicalss/icalset.h	2009-03-15 22:04:29.000000000 +0530
@@ -41,7 +41,7 @@

 #include <limits.h> /* For PATH_MAX */
 #include <libical/ical.h>
-#include <icalgauge.h>
+#include "icalgauge.h"

 #ifdef PATH_MAX
 #define ICAL_PATH_MAX PATH_MAX
diff -urNp libical-0.43.orig/src/libicalss/icalspanlist.h
libical-0.43/src/libicalss/icalspanlist.h
--- libical-0.43.orig/src/libicalss/icalspanlist.h	2009-03-15
21:58:48.000000000 +0530
+++ libical-0.43/src/libicalss/icalspanlist.h	2009-03-15
22:02:29.000000000 +0530
@@ -26,7 +26,7 @@
 #define ICALSPANLIST_H

 #include <libical/ical.h>
-#include <icalset.h>
+#include "icalset.h"

 /** @file icalspanlist.h
  *  @brief Code that supports collections of free/busy spans of time

What do you think?

Happy hacking,
Debarshi




More information about the libical-devel mailing list