summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-03-28 12:45:45 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-03-28 12:45:45 (GMT)
commite731db6bb722846e9afa191e1c9150840cc5e28d (patch)
tree524207840b1020a294aa80a3606ff3e006a682fc
parentab74c818a2fb18b7268f53abb1570ea5314e5dac (diff)
parent860c24a832874b815dd8b0d9309204768768fa00 (diff)
downloadlibkolabxml-e731db6bb722846e9afa191e1c9150840cc5e28d.tar.gz
Merge branch 'master' of ssh://git.kolab.org/git/kolab-libs
-rw-r--r--cmake/modules/FindKolabInternal.cmake24
-rw-r--r--libkolabxml/README-Mac.txt17
-rw-r--r--libkolabxml/lib/kolabformat.i1
-rwxr-xr-xlibkolabxml/lib/php/test.php4
4 files changed, 35 insertions, 11 deletions
diff --git a/cmake/modules/FindKolabInternal.cmake b/cmake/modules/FindKolabInternal.cmake
index fb9d6a5..19ba440 100644
--- a/cmake/modules/FindKolabInternal.cmake
+++ b/cmake/modules/FindKolabInternal.cmake
@@ -10,19 +10,23 @@
#
# KOLAB_INSTALL_DIRECTORIES contains the determined install directories and should be used with install commands
-get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
-
-if (${LIB64} STREQUAL "TRUE")
- find_path(LIB32FOUND "${CMAKE_INSTALL_PREFIX}/lib32")
- find_path(LIB64FOUND "${CMAKE_INSTALL_PREFIX}/lib64")
- if (LIB64FOUND)
- set(LIBSUFFIX 64)
+if (LIB_INSTALL_DIR)
+ set(KOLAB_LIB_INSTALL_DIR ${LIB_INSTALL_DIR})
+else ()
+ get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+
+ if (${LIB64} STREQUAL "TRUE")
+ find_path(LIB32FOUND "${CMAKE_INSTALL_PREFIX}/lib32")
+ find_path(LIB64FOUND "${CMAKE_INSTALL_PREFIX}/lib64")
+ if (LIB64FOUND)
+ set(LIBSUFFIX 64)
+ else()
+ set(LIBSUFFIX "")
+ endif()
else()
set(LIBSUFFIX "")
endif()
-else()
- set(LIBSUFFIX "")
-endif()
+endif ()
if(KOLAB_LIB_INSTALL_DIR)
message("KOLAB_LIB_INSTALL_DIR specified manually")
diff --git a/libkolabxml/README-Mac.txt b/libkolabxml/README-Mac.txt
new file mode 100644
index 0000000..b848457
--- /dev/null
+++ b/libkolabxml/README-Mac.txt
@@ -0,0 +1,17 @@
+# The following commands are used to bild libkolabxml on Mac OS X (Lion)
+# with most of the required libraries installed via macports:
+# > sudo port install cmake boost xercesc3
+#
+# The cxx/xsd library has to be downlaoded from http://www.codesynthesis.com/products/xsd/download.xhtml
+# and manually copied into /usr/bin and /usr/include/xsd/
+
+rm -rf build/
+mkdir -p build
+cd build
+cmake -DKOLAB_PHP_INSTALL_DIR:PATH=/usr/lib/php/extensions/no-debug-non-zts-20090626 -DCMAKE_INCLUDE_PATH:PATH=/opt/local/include -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
+make
+sudo make install
+
+# This will install kolabformat.dylib and kolabform.php to the KOLAB_PHP_INSTALL_DIR
+# You probably have to symlink kolabformat.dylib to kolabformat.so and move
+# kolabform.php to a location which is in the include_path of your PHP installation.
diff --git a/libkolabxml/lib/kolabformat.i b/libkolabxml/lib/kolabformat.i
index 30726f3..12db5b1 100644
--- a/libkolabxml/lib/kolabformat.i
+++ b/libkolabxml/lib/kolabformat.i
@@ -28,6 +28,7 @@ namespace std {
%template(vectorattachment) vector<Kolab::Attachment>;
%template(vectorattendee) vector<Kolab::Attendee>;
%template(vectorcontactref) vector<Kolab::ContactReference>;
+ %template(vectorgeo) vector<Kolab::Geo>;
%template(vectorrelated) vector<Kolab::Related>;
%template(vectortelephone) vector<Kolab::Telephone>;
%template(vectordatetime) vector<Kolab::cDateTime>;
diff --git a/libkolabxml/lib/php/test.php b/libkolabxml/lib/php/test.php
index 48c3304..75f7d9f 100755
--- a/libkolabxml/lib/php/test.php
+++ b/libkolabxml/lib/php/test.php
@@ -102,7 +102,9 @@ $c->setTitles(array2vector("MyProfession"));
$pic = "R0lGODlhEgASAIAAAMDAwAAAACH5BAEAAAAALAAAAAASABIAQAIPhI+py+0Po5y02ouz3pwXADs=";
$c->setPhoto(base64_decode($pic), 'image/gif');
-$c->setGPSpos(array2vector("geo:46.952585,7.43766"));
+$geo = new vectorgeo;
+$geo->push(new Geo(46.952585, 7.43766));
+$c->setGPSpos($geo);
$bd = new cDateTime(1980,8,1);
$c->setBDay($bd);