12 commits - c++/CMakeLists.txt c++/lib c++/Makefile.am configure.ac libkolabxml.spec.in Makefile.am pykolab/format

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Thu Mar 22 15:52:15 CET 2012


 Makefile.am                |    3 --
 c++/CMakeLists.txt         |   10 ++++--
 c++/Makefile.am            |   11 +++++--
 c++/lib/kolabconversions.h |    8 +++++
 c++/lib/xcalconversions.h  |    8 +++++
 c++/lib/xcardconversions.h |   10 ++++++
 configure.ac               |    7 ----
 libkolabxml.spec.in        |   66 +++++++++++++++++++++++++++++++++++++++------
 pykolab/format/Makefile.am |    3 ++
 9 files changed, 101 insertions(+), 25 deletions(-)

New commits:
commit 6fec1ede7a62382a7d7ae2dd4bc0620fdc14c01c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 15:51:44 2012 +0100

    Update spec file to get as close to a package that can be built as possible

diff --git a/libkolabxml.spec.in b/libkolabxml.spec.in
index 55e2652..ea6d757 100644
--- a/libkolabxml.spec.in
+++ b/libkolabxml.spec.in
@@ -9,17 +9,21 @@ URL:            http://www.kolab.org
 Source0:        http://git.kolab.org/libkolabxml/snapshot/%{name}-%{version}.tar.gz
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
-%if 0%{?rhel} < 6
-BuildRequires:  boost141-devel
+# Does not build for RHEL 5, because of kdepimlibs-devel requirement
+%if 0%{?rhel} < 6 && 0%{?fedora} < 15
+BuildRequires:  boost141-devel >= 1.4.1
 %else
-BuildRequires:  boost-devel
+BuildRequires:  boost-devel >= 1.4.1
 %endif
-BuildRequires:  cmake
+BuildRequires:  cmake >= 2.6
 BuildRequires:  gcc-c++
 BuildRequires:  gettext
 BuildRequires:  intltool
+#BuildRequires:  kdelibs-devel
+#BuildRequires:  kdepimlibs-devel
 BuildRequires:  php-devel
 BuildRequires:  python-devel
+BuildRequires:  qt-devel >= 3
 BuildRequires:  swig
 BuildRequires:  xerces-c-devel
 BuildRequires:  xsd
@@ -30,6 +34,14 @@ The libkolabxml parsing library interprets Kolab XML formats (xCal, xCard) with
 bindings for Python, PHP and other languages. The language bindings are available
 through sub-packages.
 
+%package devel
+Summary:        Kolab XML library development headers
+Group:          System/Libraries
+Requires:       %{name} = %{version}-%{release}
+
+%description devel
+Development headers for the Kolab XML libraries
+
 %package -n pykolab-format
 Summary:        Python bindings for libkolabxml
 Group:          System/Libraries
@@ -39,13 +51,21 @@ Requires:       %{name} = %{version}-%{release}
 The PyKolab format package offers a comprehensive Python library using the
 bindings provided through libkolabxml.
 
+%package -n php-kolabformat
+Summary:        PHP bindings for libkolabxml
+Group:          System/Libraries
+Requires:       %{name} = %{version}-%{release}
+
+%description -n php-kolabformat
+The PHP kolabformat package offers a comprehensible PHP library using the
+bindings provided through libkolabxml.
+
 %prep
 %setup -q
 
 %build
 %configure
-
-%if 0%{?rhel} < 6
+%if 0%{?rhel} < 6 && 0%{?fedora} < 15
 export BOOST_INCLUDEDIR=/usr/include/boost141/
 %endif
 
@@ -55,16 +75,46 @@ make %{?_smp_mflags}
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
+# Workaround for https://issues.kolab.org/643
+%ifnarch %{ix86}
+mv %{buildroot}/%{_exec_prefix}/lib %{buildroot}/%{_libdir}
+%endif
+
+# Workaround for https://issues.kolab.org/644
+mkdir -p %{buildroot}/%{php_extdir}/
+mv `find %{buildroot}/ -type d -name phpbindings`/*kolabformat* %{buildroot}/%{php_extdir}/.
+mkdir -p %{buildroot}/%{python_sitearch}/
+mv `find %{buildroot}/ -type d -name pythonbindings`/*kolabformat* %{buildroot}/%{python_sitearch}/.
+rm -rf %{buildroot}/home
+
+#%check
+#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/c++/build/lib
+#export PYTHON_PATH=$PYTHON_PATH:%{builddir}/%{name}-%{version}/
+#make quicktest
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc
+%doc c++/README DEVELOPMENT INSTALL
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}
+%{_libdir}/*.so
+
+%files -n php-kolabformat
+%defattr(-,root,root,-)
+%{php_extdir}/kolabformat.php
+%{php_extdir}/kolabformat.so
 
 %files -n pykolab-format
 %defattr(-,root,root,-)
-%{python_sitearch}
+%{python_sitearch}/pykolab
+%{python_sitearch}/kolabformat.py*
+%{python_sitearch}/_kolabformat.so
 
 %changelog
 * Fri Feb 17 2012 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 0.2-0.1


commit daf5f6af1661f50e783f438055b38162a6cd8887
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 15:51:33 2012 +0100

    Update Makefile to also ship tests

diff --git a/pykolab/format/Makefile.am b/pykolab/format/Makefile.am
index 841e75a..fdc2f75 100644
--- a/pykolab/format/Makefile.am
+++ b/pykolab/format/Makefile.am
@@ -1,3 +1,6 @@
 pykolabformatdir = $(pythondir)/pykolab/format
 pykolabformat_PYTHON = $(wildcard *.py)
 
+pykolabformattestsdir = $(pythondir)/pykolab/format/tests
+pykolabformattests_PYTHON = $(wildcard tests/*.py)
+


commit 6c9bc4bc62998ba08536d3a4d1f1861764e1acbf
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 13:40:56 2012 +0100

    Clause xercesc_3_1::DOMDocument use, making it compatible to xercesc_3_0::DOMDocument, but xerces-c 3.1 and 3.0 only.

diff --git a/c++/lib/kolabconversions.h b/c++/lib/kolabconversions.h
index c762044..1fe8639 100644
--- a/c++/lib/kolabconversions.h
+++ b/c++/lib/kolabconversions.h
@@ -104,12 +104,20 @@ boost::shared_ptr<Kolab::Note> deserializeObject(const std::string& s, bool isUr
     try {
         std::auto_ptr<KolabXSD::Note> note;
         if (isUrl) {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#endif
             if (doc.get()) {
                 note = KolabXSD::note(doc);
             }
         } else {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#endif
             if (doc.get()) {
                 note = KolabXSD::note(doc);
             }
diff --git a/c++/lib/xcalconversions.h b/c++/lib/xcalconversions.h
index 526af01..f82d1ec 100644
--- a/c++/lib/xcalconversions.h
+++ b/c++/lib/xcalconversions.h
@@ -1644,12 +1644,20 @@ typename T::IncidencePtr deserializeIncidence(const std::string& s, bool isUrl)
     try {
         std::auto_ptr<icalendar_2_0::IcalendarType> icalendar;
         if (isUrl) {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#endif
             if (doc.get()) {
                 icalendar = icalendar_2_0::icalendar(doc);
             }
         } else {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#endif
             if (doc.get()) {
                 icalendar = icalendar_2_0::icalendar(doc);
             }
diff --git a/c++/lib/xcardconversions.h b/c++/lib/xcardconversions.h
index 310d444..fc23dc2 100644
--- a/c++/lib/xcardconversions.h
+++ b/c++/lib/xcardconversions.h
@@ -1043,12 +1043,20 @@ boost::shared_ptr<T> deserializeCard(const std::string& s, bool isUrl)
     try {
         std::auto_ptr<vcard_4_0::VcardsType> vcards;
         if (isUrl) {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseFile(s);
+#endif
             if (doc.get()) {
                 vcards = vcard_4_0::vcards(doc);
             }
         } else {
+#if XERCES_VERSION_MINOR == 1
             xsd::cxx::xml::dom::auto_ptr <xercesc_3_1::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#else
+            xsd::cxx::xml::dom::auto_ptr <xercesc_3_0::DOMDocument > doc = XMLParserWrapper::inst().parseString(s);
+#endif
             if (doc.get()) {
                 vcards = vcard_4_0::vcards(doc);
             }
@@ -1089,4 +1097,4 @@ boost::shared_ptr<T> deserializeCard(const std::string& s, bool isUrl)
     
 } //Namespace
 
-#endif
\ No newline at end of file
+#endif


commit c79443e03dd2a3c36a43913db026db6ba9346fa1
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 13:24:40 2012 +0100

    Build c++ with the correct prefix

diff --git a/c++/Makefile.am b/c++/Makefile.am
index 58c6340..13d0dae 100644
--- a/c++/Makefile.am
+++ b/c++/Makefile.am
@@ -32,4 +32,10 @@ EXTRA_DIST = \
 all:
 	@rm -rf build/
 	@mkdir -p build/
-	@cd build/; cmake ..; make
+	@cd build/; cmake \
+		-DCMAKE_INSTALL_PREFIX=$(prefix) \
+		..; make
+
+install:
+	make -C build/ install
+


commit 673e8acc44c7c16b4b8fd1a2d7d08c17e9a2228c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 13:24:10 2012 +0100

    Remove po/ sub directory, and add DEVELOPMENT to EXTRA_DIST

diff --git a/Makefile.am b/Makefile.am
index 551f6d6..4c25de2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,7 @@ EXTRA_DIST = \
 	AUTHORS \
 	ChangeLog \
 	COPYING \
+	DEVELOPMENT \
 	INSTALL \
 	NEWS \
 	README \
@@ -20,7 +21,6 @@ EXTRA_DIST = \
 
 SUBDIRS = \
 	c++ \
-	po \
 	pykolab \
 	schemas
 
@@ -46,4 +46,3 @@ quicktest:
 
 clean:
 	find -type f -name "*.pyo" -o -name "*.pyc" -delete
-


commit 5abac81b1745bf2e96274293c65671acb236807f
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 13:23:56 2012 +0100

    Remove po/

diff --git a/configure.ac b/configure.ac
index cf8e49b..2463fef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,16 +3,10 @@ AC_SUBST([RELEASE], 0.1)
 
 AC_CONFIG_SRCDIR(libkolabxml.spec.in)
 
-ALL_LINGUAS="bn_IN bn ca cs da de el es fi fr gl gu hi hr hu is it ja ko ml ms nb nl or pa pl pt pt_BR ru sk sl sr at latin sr sv ta tr uk zh_CN zh_TW"
-
 AM_INIT_AUTOMAKE
 AM_MAINTAINER_MODE
 AM_PATH_PYTHON
 
-GETTEXT_PACKAGE=pykolab-format
-AC_SUBST(GETTEXT_PACKAGE)
-AM_GLIB_GNU_GETTEXT
-AC_PROG_INTLTOOL
 AC_PROG_LN_S
 
 AC_SUBST(DATESTAMP,`date +"%a %b %d %Y"`)
@@ -21,7 +15,6 @@ AC_CONFIG_FILES([
 Makefile
 c++/Makefile
 libkolabxml.spec
-po/Makefile.in
 pykolab/format/Makefile
 pykolab/Makefile
 schemas/Makefile


commit 20ca4d7cc140f51ae5477a9ef963c0acb8bdb556
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 13:23:17 2012 +0100

    Do not use RPATH
    Only conditionally include / set kcalcore stuff including include directories

diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index f7f3026..e153796 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -13,6 +13,9 @@ if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 7 AND
     cmake_policy(SET CMP0017 NEW)
 endif()
 
+# Do not use RPATH
+set(CMAKE_SKIP_RPATH ON)
+
 find_package(Boost COMPONENTS thread REQUIRED)
 
 find_package(Qt4)
@@ -49,12 +52,11 @@ find_library(KCALCORE NAMES kcalcore)
 if(KCALCORE)
     set(KCALCORE_FOUND ON)
     message("KCalCore found")
-endif(KCALCORE)
-
-find_path(KCALCORE_INCLUDE_DIR kcalcore/event.h
+    find_path(KCALCORE_INCLUDE_DIR kcalcore/event.h
           PATHS /usr/include /usr/include/kde4/ )
+    include_directories(${KCALCORE_INCLUDE_DIR})
+endif(KCALCORE)
 
-include_directories(${KCALCORE_INCLUDE_DIR})
 
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" ) 
 


commit ccbd974de0f52bd9b288bb88e5d9c3bc3fa7aa5d
Merge: c30eb91 8a9fe78
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Mar 22 10:50:11 2012 +0100

    Merge branch 'master' of ssh://git.kolab.org/git/libkolabxml



commit c30eb9106afdfad2b297b036a151ae912dacfd63
Merge: 592e837 abc3460
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Mar 21 19:04:54 2012 +0100

    Merge branch 'master' of ssh://git.kolab.org/git/libkolabxml



commit 592e837d8f7c7588260ddef1155300d4b29d613e
Merge: 74b2696 c0ae520
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Mar 21 13:53:08 2012 +0100

    Merge branch 'master' of ssh://git.kolab.org/git/libkolabxml



commit 74b2696386a3ecb5d101a75fa96b49b32cb75a1b
Merge: 8b493a3 6ed9a90
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sat Mar 17 12:39:07 2012 +0000

    Merge branch 'master' of ssh://git.kolab.org/git/libkolabxml



commit 8b493a311c224b312e499f0d377b3baebc15bf3f
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Sat Mar 17 12:38:22 2012 +0000

    Wildcard include all files c++/lib/*.i (resolves bug #638)

diff --git a/c++/Makefile.am b/c++/Makefile.am
index be0206b..58c6340 100644
--- a/c++/Makefile.am
+++ b/c++/Makefile.am
@@ -13,10 +13,9 @@ EXTRA_DIST = \
 	lib/ \
 	$(wildcard lib/*.cpp) \
 	$(wildcard lib/*.h) \
+	$(wildcard lib/*.i) \
 	lib/CMakeLists.txt \
 	lib/DEVELOPMENT \
-	lib/kolabcontainers.i \
-	lib/kolabformat.i \
 	lib/php/ \
 	lib/php/CMakeLists.txt \
 	lib/php/test.php \





More information about the commits mailing list