Hello community,

here is the log from the commit of package libkolabxml for openSUSE:Factory 
checked in at 2013-01-17 11:16:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkolabxml (Old)
 and      /work/SRC/openSUSE:Factory/.libkolabxml.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkolabxml", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkolabxml/libkolabxml.changes  2012-11-28 
10:51:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libkolabxml.new/libkolabxml.changes     
2013-01-17 13:18:20.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Jan 14 08:27:18 UTC 2013 - a...@ajaissle.de
+
+- Disabled php and mono bindings for SLES to fix the SLES build
+
+-------------------------------------------------------------------
+Thu Dec 20 00:16:20 UTC 2012 - a...@ajaissle.de
+
+- Added Patch: fix_php5_bindings.diff to fix php bindings
+  * Patch to hack src/php/CMakeList.cmake to find PHP5 on openSUSE
+
+-------------------------------------------------------------------

New:
----
  fix_php5_bindings.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libkolabxml.spec ++++++
--- /var/tmp/diff_new_pack.oCidIR/_old  2013-01-17 13:18:21.000000000 +0100
+++ /var/tmp/diff_new_pack.oCidIR/_new  2013-01-17 13:18:21.000000000 +0100
@@ -25,8 +25,10 @@
 Group:          Development/Libraries/C and C++
 Url:            http://wiki.kolab.org/Libkolabxml
 Source:         
http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE fix_php5_bindings.diff
+Patch0:         fix_php5_bindings.diff
 BuildRequires:  boost-devel
-BuildRequires:  cmake
+BuildRequires:  cmake >= 2.6
 BuildRequires:  gcc-c++
 BuildRequires:  gcc-java
 BuildRequires:  java-openjdk
@@ -34,8 +36,12 @@
 BuildRequires:  libqt4-devel
 BuildRequires:  libxerces-c-devel
 BuildRequires:  mono-devel
-# FIXME: doesn't  build
-# BuildRequires:  php5-devel
+# ToDo: Fix SLE_11_SP2 CSHARP and PHP bindings
+#%%if 0%{?sles_version} == 0
+BuildRequires:  php5-devel
+#%%else
+#BuildRequires:  php53-devel
+#%%endif
 BuildRequires:  pkgconfig
 BuildRequires:  python-devel
 BuildRequires:  swig
@@ -91,6 +97,7 @@
 %package -n java-%{name}%{soname}
 Summary:        Java bindings for %{name}
 Group:          Development/Languages/Java
+Provides:       java-kolabformat = %{version}
 
 %description -n java-%{name}%{soname}
 Libkolabxml serves as a serialization/de-serialization library for the the 
Kolab XML Format
@@ -109,6 +116,7 @@
 %package -n mono-%{name}%{soname}
 Summary:        Mono (C#) bindings for %{name}
 Group:          Development/Languages/Mono
+Provides:       csharp-kolabformat = %{version}
 
 %description -n mono-%{name}%{soname}
 Libkolabxml serves as a serialization/de-serialization library for the the 
Kolab XML Format
@@ -126,7 +134,8 @@
 
 %package -n php-%{name}%{soname}
 Summary:        PHP bindings for %{name}
-Group:          Development/Languages/PHP
+Group:          Development/Languages/Other
+Provides:       php-kolabformat = %{version}
 
 %description -n php-%{name}%{soname}
 Libkolabxml serves as a serialization/de-serialization library for the the 
Kolab XML Format
@@ -145,6 +154,7 @@
 %package -n python-%{name}%{soname}
 Summary:        Python bindings for %{name}
 Group:          Development/Languages/Python
+Provides:       python-kolabformat = %{version}
 
 %description -n python-%{name}%{soname}
 Libkolabxml serves as a serialization/de-serialization library for the the 
Kolab XML Format
@@ -160,9 +170,9 @@
 
 This package provides the python bindings for Libkolabxml
 
-
 %prep
 %setup -q
+%patch0 -p0
 
 %build
   export CXXFLAGS="%{optflags}"
@@ -175,7 +185,10 @@
         -DLIB_INSTALL_DIR=%{_lib} \
         -DCMAKE_SKIP_RPATH=TRUE  \
         -DJAVA_BINDINGS=TRUE -DJAVA_INSTALL_DIR=%{_jnidir} \
+%if 0%{?sles_version} == 0
         -DCSHARP_BINDINGS=TRUE -DCSHARP_INSTALL_DIR=%{_prefix}/lib/mono/ \
+        -DPHP_BINDINGS=TRUE \
+%endif
         -DPYTHON_BINDINGS=TRUE -DPYTHON_INSTALL_DIR=%{python_sitearch} \
         ..
 
@@ -185,6 +198,19 @@
   cd build
   make DESTDIR=%{buildroot} install
 
+%if 0%{?sles_version} == 0
+  %define php_extension_dir %( %{_bindir}/php-config --extension-dir | sed -e 
's#\\n##' )
+  %define php_inidir /etc/php5/conf.d
+
+  mkdir -p %{buildroot}/%{_datadir}/php5
+  mv %{buildroot}/%{php_extension_dir}/kolabformat.php 
%{buildroot}/%{_datadir}/php5/kolabformat.php
+
+  mkdir -p %{buildroot}/%{php_inidir}/
+cat >%{buildroot}/%{php_inidir}/kolabformat.ini <<EOF
+extension=kolabformat.so
+EOF
+%endif
+
 %post   -n %{name}%{soname} -p /sbin/ldconfig
 %postun -n %{name}%{soname} -p /sbin/ldconfig
 
@@ -199,15 +225,26 @@
 %{python_sitearch}/_kolabformat.so
 %{python_sitearch}/kolabformat.py
 
+%if 0%{?sles_version} == 0
+%files -n php-%{name}%{soname}
+%defattr(-,root,root)
+%doc COPYING
+%config(noreplace) %{php_inidir}/kolabformat.ini
+%{_datadir}/php5/kolabformat.php
+%{php_extension_dir}/kolabformat.so
+%endif
+
 %files -n java-%{name}%{soname}
 %defattr(-,root,root)
 %doc COPYING
 %{_libdir}/java/*
 
+%if 0%{?sles_version} == 0
 %files -n mono-%{name}%{soname}
 %defattr(-,root,root)
 %doc COPYING
 %{_prefix}/lib/mono/*
+%endif
 
 %files devel
 %defattr(-,root,root)

++++++ fix_php5_bindings.diff ++++++
--- src/php/CMakeLists.txt      2012-08-15 16:50:12.000000000 +0200
+++ src/php/CMakeLists.txt      2012-12-24 01:04:29.812585496 +0100
@@ -10,9 +10,8 @@
         VERBATIM
     )
 
-SET_SOURCE_FILES_PROPERTIES(${KOLAB_SWIG_PHP_SOURCE_FILE} PROPERTIES GENERATED 
1)
-ADD_CUSTOM_TARGET(generate_php_bindings ALL DEPENDS 
${KOLAB_SWIG_PHP_SOURCE_FILE})
-
+set_source_files_properties(${KOLAB_SWIG_PHP_SOURCE_FILE} PROPERTIES GENERATED 
1)
+add_custom_target(generate_php_bindings ALL DEPENDS 
${KOLAB_SWIG_PHP_SOURCE_FILE})
 
 #Compile PHP Bindings
 # Since there is no php library we can't compile with -Wl,--no-undefined
@@ -20,25 +19,54 @@
     set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flat_namespace -undefined 
suppress" )
 endif()
 
-find_package(PHP4 5.3 REQUIRED)
+# Try to find PHP5
+find_path(PHP_INCLUDE_DIR NAMES main/php.h PATH_SUFFIXES php php5)
+find_program(PHP_EXECUTABLE NAMES php)
+
+# Libkolabxml needs PHP >= 5.3
+set(PHP_MIN_VERSION 50300)
+
+# Find where to install the extension files if it's not defined
+if(NOT DEFINED PHP_INSTALL_DIR)
+  find_program(PHP_CONFIG_EXECUTABLE NAMES php-config)
+  if(PHP_CONFIG_EXECUTABLE)
+    execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --extension-dir
+                    OUTPUT_VARIABLE _php_extensions_dir
+    )
+    string(REGEX REPLACE "\n" "" _php_extensions_dir "${_php_extensions_dir}")
+    set(PHP_INSTALL_DIR ${_php_extensions_dir} CACHE STRING "Install directory 
for PHP bindings.")
+  else()
+    set(PHP_INSTALL_DIR ${LIB_INSTALL_DIR}/extensions)
+  endif()
+endif()
+
+if(PHP_INCLUDE_DIR AND PHP_EXECUTABLE)
+  file(READ ${PHP_INCLUDE_DIR}/main/php_version.h PHP_VERSION_CONTENT)
+  string(REGEX MATCH "#define PHP_VERSION_ID[ ]*[0-9]*\n" 
_PHP_VERSION_ID_MATCH ${PHP_VERSION_CONTENT})
+  if(_PHP_VERSION_ID_MATCH)
+    string(REGEX REPLACE "#define PHP_VERSION_ID[ ]*([0-9]*)\n" "\\1" 
PHP_VERSION_ID ${_PHP_VERSION_ID_MATCH})
+  endif()
 
-if (PHP4_FOUND)
-    include_directories(${PHP4_INCLUDE_PATH})
-    add_library(phpbindings SHARED ${KOLAB_SWIG_PHP_SOURCE_FILE})
-    target_link_libraries(phpbindings kolabxml)
-    SET_TARGET_PROPERTIES(phpbindings PROPERTIES OUTPUT_NAME "kolabformat")
-    SET_TARGET_PROPERTIES(phpbindings PROPERTIES PREFIX "")
-
-    configure_file(test.php ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
-
-    set(PHP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/phpbindings" CACHE STRING 
"Install directory for php bindings.")
-
-    install(TARGETS phpbindings LIBRARY DESTINATION ${PHP_INSTALL_DIR})
-
-    install( FILES
-            ${CMAKE_CURRENT_BINARY_DIR}/kolabformat.php
-            DESTINATION ${PHP_INSTALL_DIR}
-        )
-else(PHP4_FOUND)
-    message(WARNING "not building php bindings because php was not found")
-endif (PHP4_FOUND)
+  # Include the needed PHP5 subdirs
+  set(PHP_INCLUDE_DIRS ${PHP_INCLUDE_DIR} ${PHP_INCLUDE_DIR}/main 
${PHP_INCLUDE_DIR}/TSRM ${PHP_INCLUDE_DIR}/Zend )
+endif()
+
+if(NOT PHP_VERSION_ID VERSION_LESS ${PHP_MIN_VERSION})
+  include_directories(${PHP_INCLUDE_DIRS})
+  add_library(phpbindings SHARED ${KOLAB_SWIG_PHP_SOURCE_FILE})
+  target_link_libraries(phpbindings kolabxml)
+  set_target_properties(phpbindings PROPERTIES OUTPUT_NAME "kolabformat")
+  set_target_properties(phpbindings PROPERTIES PREFIX "")
+
+  configure_file(test.php ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+
+  install(TARGETS phpbindings LIBRARY DESTINATION ${PHP_INSTALL_DIR})
+
+  install( FILES
+          ${CMAKE_CURRENT_BINARY_DIR}/kolabformat.php
+          DESTINATION ${PHP_INSTALL_DIR}
+      )
+
+else()
+  message(WARNING "not building php bindings because php was not found")
+endif()
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to