diff --git a/0003-make-cmake-transition.txt b/0003-make-cmake-transition.txt new file mode 100644 index 0000000..7e95d10 --- /dev/null +++ b/0003-make-cmake-transition.txt @@ -0,0 +1,1141 @@ +From 8ff6b9ed5b0f452b6fb0f9a1b2b5aed866dabdf3 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 14:31:36 +0200 +Subject: [PATCH] make -> cmake transition + +--- + CMakeLists.txt | 206 +++++++++++++++++++++++++++ + cmake/try-attr.cc | 1 + examples/CMakeLists.txt | 56 +++++++ + examples/config.h | 1 + examples/cpp/CMakeLists.txt | 25 +++ + include/CMakeLists.txt | 3 + include/xmlrpc-c/CMakeLists.txt | 31 ++++ + include/xmlrpc-c/config.h.cmake | 8 + + lib/CMakeLists.txt | 12 ++ + lib/abyss/CMakeLists.txt | 3 + lib/abyss/src/CMakeLists.txt | 62 ++++++++ + lib/abyss/src/xmlrpc_abyss.pc.cmake | 10 + + lib/curl_transport/CMakeLists.txt | 7 + + lib/expat/CMakeLists.txt | 9 + + lib/expat/gennmtab/CMakeLists.txt | 3 + lib/expat/xmlparse/CMakeLists.txt | 7 + + lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake | 10 + + lib/expat/xmltok/CMakeLists.txt | 20 +++ + lib/expat/xmltok/xmlrpc_xmltok.pc.cmake | 9 + + lib/libutil/CMakeLists.txt | 11 + + lib/libutil/xmlrpc_util.pc.cmake | 10 + + lib/libwww_transport/CMakeLists.txt | 4 + + lib/wininet_transport/CMakeLists.txt | 4 + + src/CMakeLists.txt | 106 ++++++++++++++ + src/cpp/CMakeLists.txt | 48 ++++++ + src/cpp/xmlrpc++.pc.cmake | 11 + + src/cpp/xmlrpc_client++.pc.cmake | 11 + + src/cpp/xmlrpc_cpp.pc.cmake | 11 + + src/cpp/xmlrpc_server++.pc.cmake | 11 + + src/cpp/xmlrpc_server_abyss++.pc.cmake | 11 + + src/xmlrpc.pc.cmake | 11 + + src/xmlrpc_client.pc.cmake | 11 + + src/xmlrpc_server.pc.cmake | 11 + + src/xmlrpc_server_abyss.pc.cmake | 11 + + src/xmlrpc_server_cgi.pc.cmake | 11 + + tools/CMakeLists.txt | 9 + + tools/binmode-rpc-kit/CMakeLists.txt | 2 + tools/turbocharger/CMakeLists.txt | 1 + tools/xml-rpc-api2cpp/CMakeLists.txt | 12 ++ + transport_config.h.cmake | 16 ++ + version.h.cmake | 2 + xmlrpc_config.h.cmake | 18 ++ + 42 files changed, 836 insertions(+), 0 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..239a434 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,206 @@ ++## -*- cmake -*- ++project(xmlrpc-c) ++include(UsePkgConfig) ++include(CheckIncludeFile) ++include(CheckFunctionExists) ++ ++set(XMLRPC_C_VERSION "1.06.04" CACHE STRING "Version of xmlrpc-c") ++set(XMLRPC_C_LIBVERSION "3.7.0") ++set(XMLRPC_C_SOVERSION "3") ++ ++ ++macro(ensc_set_bool NAME VALUE DESC) ++ set(${NAME} ${VALUE} CACHE BOOL ${DESC}) ++ if(${NAME}) ++ set(_${NAME} 1) ++ else(${NAME}) ++ set(_${NAME} 0) ++ endif(${NAME}) ++endmacro(ensc_set_bool) ++ ++macro(ensc_pkgconfig COMP) ++ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${COMP}.pc.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/${COMP}.pc ++ @ONLY) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${COMP}.pc ++ DESTINATION ${pkgconfdir}) ++endmacro(ensc_pkgconfig) ++ ++macro(ensc_pkgconfig_lib TARGET LIBS) ++ get_target_property(libtype ${TARGET} TYPE) ++ if("${libtype}" STREQUAL "STATIC_LIBRARY") ++ list(APPEND ${TARGET}_pkgconfig_libs "${LIBS}") ++ endif("${libtype}" STREQUAL "STATIC_LIBRARY") ++endmacro(ensc_pkgconfig_lib) ++ ++ ++ ++########### ++if(WIN32) ++ find_program(WININET_CONFIG_EXECUTABLE wininet-config) ++ ++ if(DEFINED MUST_BUILD_WININET_CLIENT) ++ set(tmp ${MUST_BUILD_WININET_CLIENT}) ++ else(DEFINED MUST_BUILD_WININET_CLIENT) ++ if(WININET_CONFIG_EXECUTABLE) ++ set(tmp 1) ++ else(WININET_CONFIG_EXECUTABLE) ++ set(tmp 0) ++ endif(WININET_CONFIG_EXECUTABLE) ++ endif(DEFINED MUST_BUILD_WININET_CLIENT) ++else(WIN32) ++ set(tmp 0) ++endif(WIN32) ++ ++if(tmp) ++ set(MUST_BUILD_CLIENT 1) ++ exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE WININET_VERSION) ++ exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE WININET_CFLAGS) ++ exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE WININET_LDADD) ++ message(STATUS "Using WinInet ${WININET_VERSION} transport") ++endif(tmp) ++ ++ensc_set_bool(MUST_BUILD_WININET_CLIENT ${tmp} "Set iff WinInet client transport shall be built") ++set(wininet_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/wininet_transport) ++ ++########### ++pkgconfig(libcurl CURL_INCLUDE_DIR CURL_LINK_DIR CURL_LINK_FLAGS CURL_CFLAGS) ++if(DEFINED MUST_BUILD_CURL_CLIENT) ++ set(tmp ${MUST_BUILD_CURL_CLIENT}) ++else(DEFINED MUST_BUILD_CURL_CLIENT) ++ if(CURL_LINK_FLAGS) ++ set(tmp 1) ++ else(CURL_LINK_FLAGS) ++ set(tmp 0) ++ endif(CURL_LINK_FLAGS) ++endif(DEFINED MUST_BUILD_CURL_CLIENT) ++ ++if(tmp) ++ set(MUST_BUILD_CLIENT 1) ++ STRING(REGEX REPLACE "\n" "" CURL_CFLAGS ${CURL_CFLAGS}) # HACK!! ++ message(STATUS "Using libcurl transport ${CURL_CFLAGS}") ++endif(tmp) ++ensc_set_bool(MUST_BUILD_CURL_CLIENT ${tmp} "Set iff Curl client transport shall be built") ++set(curl_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/curl_transport) ++ ++########### ++find_program(LIBWWW_CONFIG_EXECUTABLE libwww-config) ++if(DEFINED MUST_BUILD_LIBWWW_CLIENT) ++ set(tmp ${MUST_BUILD_LIBWWW_CLIENT}) ++else(DEFINED MUST_BUILD_LIBWWW_CLIENT) ++ if(LIBWWW_CONFIG_EXECUTABLE) ++ set(tmp 1) ++ else(LIBWWW_CONFIG_EXECUTABLE) ++ set(tmp 0) ++ endif(LIBWWW_CONFIG_EXECUTABLE) ++endif(DEFINED MUST_BUILD_LIBWWW_CLIENT) ++ ++if(tmp) ++ set(MUST_BUILD_CLIENT 1) ++ exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE LIBWWW_VERSION) ++ exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE LIBWWW_LIBS) ++ exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE LIBWWW_CFLAGS) ++ message(STATUS "Using libwww ${LIBWWW_VERSION} transport") ++endif(tmp) ++ensc_set_bool(MUST_BUILD_LIBWWW_CLIENT ${tmp} "Set iff LibWWW client transport shall be built") ++set(libwww_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/libwww_transport) ++ ++############ ++ ++set(ENABLE_CGI_SERVER 1 CACHE BOOL "Set iff CGI server shall be enabled") ++set(ENABLE_CPLUSPLUS 1 CACHE BOOL "Set iff C++ part shall be enabled") ++set(ENABLE_ABYSS_SERVER 1 CACHE BOOL "Set iff Abyss server shall be enabled") ++set(ENABLE_LIBXML2_BACKEND 1 CACHE BOOL "Set iff libxml2 backend shall be used") ++set(ENABLE_ABYSS_THREADS 1 CACHE BOOL "Use pthread") ++ ++if(ENABLE_LIBXML2_BACKEND) ++ foreach(tmp libxml-2.0 libxml2 libxml) ++ if (NOT DEFINED libxml_pkgconfig) ++ pkgconfig(${tmp} LIBXML2_INCLUDE_DIR LIBXML2_LINK_DIR LIBXML2_LINK_FLAGS LIBXML2_CFLAGS) ++ if(LIBXML2_LINK_FLAGS) ++ set(libxml_pkgconfig ${tmp}) ++ endif(LIBXML2_LINK_FLAGS) ++ endif(NOT DEFINED libxml_pkgconfig) ++ endforeach(tmp) ++endif(ENABLE_LIBXML2_BACKEND) ++ ++ ++#### tests ++check_include_file(wchar.h _have_wchar_h) ++if(_have_wchar_h) ++ set(HAVE_WCHAR_H 1) ++else(_have_wchar_h) ++ set(HAVE_WCHAR_H 1) ++endif(_have_wchar_h) ++set(XMLRPC_HAVE_WCHAR ${HAVE_WCHAR_H}) ++set(HAVE_WCHAR_H_DEFINE ${HAVE_WCHAR_H}) ++ ++ ++####### ++set(LINKER_AS_NEEDED 1 CACHE BOOL "Use the --as-needed linker option") ++if(LINKER_AS_NEEDED) ++ set(XMLRPC_LINKER_FLAGS "-Wl,--as-needed") ++endif(LINKER_AS_NEEDED) ++ ++ ++try_compile(HAVE_ATTR_UNUSED ++ ${CMAKE_BINARY_DIR}/ ++ ${xmlrpc-c_SOURCE_DIR}/cmake/try-attr.cc ++ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DCMAKE_TEST_ATTR=__unused__) ++ ++if(HAVE_ATTR_UNUSED) ++ set(ATTR_UNUSED "__attribute__((__unused__))") ++endif(HAVE_ATTR_UNUSED) ++ ++if(WIN32) ++ set(DIRECTORY_SEPARATOR "\\") ++else(WIN32) ++ set(DIRECTORY_SEPARATOR "/") ++endif(WIN32) ++ ++check_include_file(sys/filio.h HAVE_SYS_FILIO_H) ++check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) ++check_function_exists(setenv HAVE_SETENV) ++ ++configure_file(${xmlrpc-c_SOURCE_DIR}/xmlrpc_config.h.cmake ++ ${xmlrpc-c_BINARY_DIR}/xmlrpc_config.h ++ ESCAPE_QUOTES @ONLY) ++ ++configure_file(${xmlrpc-c_SOURCE_DIR}/version.h.cmake ++ ${xmlrpc-c_BINARY_DIR}/version.h ++ ESCAPE_QUOTES @ONLY) ++ ++configure_file(${xmlrpc-c_SOURCE_DIR}/transport_config.h.cmake ++ ${xmlrpc-c_BINARY_DIR}/transport_config.h ++ ESCAPE_QUOTES @ONLY) ++ ++configure_file(${xmlrpc-c_SOURCE_DIR}/include/xmlrpc-c/config.h.cmake ++ ${xmlrpc-c_BINARY_DIR}/include/xmlrpc-c/config.h ++ ESCAPE_QUOTES @ONLY) ++ ++ ++include_directories(${xmlrpc-c_SOURCE_DIR}/include) ++include_directories(${xmlrpc-c_BINARY_DIR}/include) ++include_directories(${xmlrpc-c_SOURCE_DIR}/lib/util/include) ++include_directories(${xmlrpc-c_BINARY_DIR}) ++ ++add_custom_target(dist ++ rm -rf _dist && mkdir -p _dist/xmlrpc-c-${XMLRPC_C_VERSION} ++ COMMAND cp -a ${xmlrpc-c_SOURCE_DIR}/* _dist/xmlrpc-c-${XMLRPC_C_VERSION}/ ++ COMMAND cd _dist && tar cjf ../xmlrpc-c-${XMLRPC_C_VERSION}.tar.bz2 xmlrpc-c-${XMLRPC_C_VERSION} --exclude=.git --exclude=CVS --exclude=.svn ++ ) ++ ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir "${prefix}/lib") ++set(pkgconfdir "${libdir}/pkgconfig") ++set(includedir "${prefix}/include") ++ ++ ++add_subdirectory(lib) ++add_subdirectory(Windows) ++add_subdirectory(conf) ++add_subdirectory(doc) ++add_subdirectory(examples) ++add_subdirectory(include) ++add_subdirectory(src) ++add_subdirectory(tools) +diff --git a/cmake/try-attr.cc b/cmake/try-attr.cc +new file mode 100644 +index 0000000..a715bc5 +--- /dev/null ++++ b/cmake/try-attr.cc +@@ -0,0 +1 @@ ++int x __attribute__((CMAKE_TEST_ATTR)); +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +new file mode 100644 +index 0000000..4cbe95a +--- /dev/null ++++ b/examples/CMakeLists.txt +@@ -0,0 +1,56 @@ ++# -*- cmake -*- ++ ++include_directories(${CMAKE_CURRENT_BINARY_DIR}) ++ ++macro(ensc_add_example name ext class) ++ # HACK: avoid name collision of c and c++ program ++ if("${ext}" STREQUAL "cpp") ++ set(_target ${name}++) ++ else("${ext}" STREQUAL "cpp") ++ set(_target ${name}) ++ endif("${ext}" STREQUAL "cpp") ++ ++ add_executable(${_target} ${name}.${ext}) ++ target_link_libraries(${_target} ${${class}_LIBS}) ++ list(APPEND ${class}_TARGETS ${_target}) ++ list(APPEND example_TARGETS ${_target}) ++endmacro(ensc_add_example) ++ ++if(ENABLE_CPLUSPLUS) ++ add_subdirectory(cpp) ++endif(ENABLE_CPLUSPLUS) ++ ++ ++ ++if(MUST_BUILD_CLIENT) ++ set(client_LIBS xmlrpc_client) ++ ++ ensc_add_example(auth_client c client) ++ ensc_add_example(query-meerkat c client) ++ ensc_add_example(synch_client c client) ++ ensc_add_example(xmlrpc_sample_add_client c client) ++ ensc_add_example(xmlrpc_asynch_client c client) ++endif(MUST_BUILD_CLIENT) ++ ++if(ENABLE_CGI_SERVER) ++ set(cgi_server_LIBS xmlrpc_server_cgi) ++ ++ ensc_add_example(xmlrpc_sample_add_server_cgi c cgi_server) ++endif(ENABLE_CGI_SERVER) ++ ++if(ENABLE_ABYSS_SERVER) ++ set(abyss_server_LIBS xmlrpc_server_abyss) ++ ++ ensc_add_example(xmlrpc_inetd_server c abyss_server) ++ ensc_add_example(xmlrpc_socket_server c abyss_server) ++ ensc_add_example(xmlrpc_loop_server c abyss_server) ++ ensc_add_example(xmlrpc_sample_add_server c abyss_server) ++ ensc_add_example(xmlrpc_server_validatee c abyss_server) ++endif(ENABLE_ABYSS_SERVER) ++ ++## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it ++if(NOT MUST_BUILD_LIBWWW_CLIENT) ++ set_target_properties(${example_TARGETS} ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) ++endif(NOT MUST_BUILD_LIBWWW_CLIENT) +diff --git a/examples/config.h b/examples/config.h +new file mode 100644 +index 0000000..31d5f9b +--- /dev/null ++++ b/examples/config.h +@@ -0,0 +1 @@ ++#include "../xmlrpc_config.h" +diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt +new file mode 100644 +index 0000000..c2e3ab7 +--- /dev/null ++++ b/examples/cpp/CMakeLists.txt +@@ -0,0 +1,25 @@ ++# -*- cmake -*- ++ ++if(ENABLE_ABYSS_SERVER) ++ set(abyss_serverxx_LIBS xmlrpc_server_abyss++) ++ ++ ensc_add_example(xmlrpc_inetd_server cpp abyss_serverxx) ++endif(ENABLE_ABYSS_SERVER) ++ ++if(MUST_BUILD_CLIENT) ++ set(abyss_clientxx_LIBS xmlrpc_client++) ++ set(abyss_clientxx_legacy_LIBS xmlrpc_cpp) ++ ++ ensc_add_example(xmlrpc_sample_add_client cpp abyss_clientxx) ++ ensc_add_example(sample_add_client_complex cpp abyss_clientxx) ++ ++ ensc_add_example(meerkat-app-list cpp abyss_clientxx_legacy) ++endif(MUST_BUILD_CLIENT) ++ ++ ++## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it ++if(NOT MUST_BUILD_LIBWWW_CLIENT) ++ set_target_properties(${example_TARGETS} ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) ++endif(NOT MUST_BUILD_LIBWWW_CLIENT) +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +new file mode 100644 +index 0000000..ebfdba5 +--- /dev/null ++++ b/include/CMakeLists.txt +@@ -0,0 +1,3 @@ ++# -*- cmake -*- ++ ++add_subdirectory(xmlrpc-c) +diff --git a/include/xmlrpc-c/CMakeLists.txt b/include/xmlrpc-c/CMakeLists.txt +new file mode 100644 +index 0000000..903f623 +--- /dev/null ++++ b/include/xmlrpc-c/CMakeLists.txt +@@ -0,0 +1,31 @@ ++# -*- cmake -*- ++ ++list(APPEND headers ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h ++ util.h base.h abyss.h server.h ++ server_abyss.h server_w32httpsys.h oldxmlrpc.h) ++ ++if(ENABLE_CPLUSPLUS) ++ list(APPEND headers ++ oldcppwrapper.hpp girerr.hpp girmem.hpp base.hpp ++ timeout.hpp xml.hpp registry.hpp server_abyss.hpp) ++endif(ENABLE_CPLUSPLUS) ++ ++if(MUST_BUILD_CLIENT) ++ list(APPEND headers ++ client.h transport.h client_global.h) ++ ++ if(ENABLE_CPLUSPLUS) ++ list(APPEND headers ++ client.hpp client_transport.hpp client_simple.hpp) ++ endif(ENABLE_CPLUSPLUS) ++endif(MUST_BUILD_CLIENT) ++ ++if(ENABLE_CGI_SERVER) ++ list(APPEND headers ++ server_cgi.h) ++endif(ENABLE_CGI_SERVER) ++ ++install(FILES ++ ${headers} ++ DESTINATION ${includedir}/xmlrpc-c) +diff --git a/include/xmlrpc-c/config.h.cmake b/include/xmlrpc-c/config.h.cmake +new file mode 100644 +index 0000000..7b95a1d +--- /dev/null ++++ b/include/xmlrpc-c/config.h.cmake +@@ -0,0 +1,8 @@ ++/* This file, part of XML-RPC For C/C++, is meant to ++ define characteristics of this particular installation ++ that the other header files need in order to ++ compile correctly when #included in a Xmlrpc-c user code. ++ ++ Those header files #include this one. ++*/ ++#define XMLRPC_HAVE_WCHAR @HAVE_WCHAR_H@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +new file mode 100644 +index 0000000..7f8f912 +--- /dev/null ++++ b/lib/CMakeLists.txt +@@ -0,0 +1,12 @@ ++## -*- cmake -*- ++ ++add_subdirectory(abyss) ++add_subdirectory(libutil) ++add_subdirectory(util) ++add_subdirectory(curl_transport) ++add_subdirectory(libwww_transport) ++add_subdirectory(wininet_transport) ++ ++if(NOT ENABLE_LIBXML2_BACKEND) ++ add_subdirectory(expat) ++endif(NOT ENABLE_LIBXML2_BACKEND) +diff --git a/lib/abyss/CMakeLists.txt b/lib/abyss/CMakeLists.txt +new file mode 100644 +index 0000000..2358061 +--- /dev/null ++++ b/lib/abyss/CMakeLists.txt +@@ -0,0 +1,3 @@ ++## -*- cmake -*- ++ ++SUBDIRS(src) +diff --git a/lib/abyss/src/CMakeLists.txt b/lib/abyss/src/CMakeLists.txt +new file mode 100644 +index 0000000..4e18b81 +--- /dev/null ++++ b/lib/abyss/src/CMakeLists.txt +@@ -0,0 +1,62 @@ ++## -*- cmake -*- ++ ++set(xmlrpc_abyss_SOURCES ++ abyss_info.h ++ channel.c ++ channel.h ++ chanswitch.c ++ chanswitch.h ++ conf.c ++ conn.c ++ conn.h ++ data.c ++ data.h ++ date.c ++ date.h ++ file.c ++ file.h ++ http.c ++ http.h ++ init.c ++ response.c ++ server.c ++ server.h ++ session.c ++ session.h ++ socket.c ++ socket.h ++ socket_unix.c ++ socket_unix.h ++ thread.h ++ token.c ++ token.h ++ trace.c ++ trace.h) ++ ++if(ENABLE_ABYSS_THREADS) ++ list(APPEND xmlrpc_abyss_SOURCES thread_pthread.c) ++else(ENABLE_ABYSS_THREADS) ++ list(APPEND xmlrpc_abyss_SOURCES thread_fork.c) ++endif(ENABLE_ABYSS_THREADS) ++ ++add_library(xmlrpc_abyss SHARED ${xmlrpc_abyss_SOURCES}) ++target_link_libraries(xmlrpc_abyss xmlrpc_util) ++ ++if(ENABLE_ABYSS_THREADS) ++ set_target_properties(xmlrpc_abyss PROPERTIES DEFINE_SYMBOL _THREAD) ++ target_link_libraries(xmlrpc_abyss pthread) ++ ensc_pkgconfig_lib(xmlrpc_abyss "-lpthread") ++endif(ENABLE_ABYSS_THREADS) ++ ++install(TARGETS xmlrpc_abyss ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ ++set_target_properties(xmlrpc_abyss ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS} ++ VERSION ${XMLRPC_C_LIBVERSION} ++ SOVERSION ${XMLRPC_C_SOVERSION}) ++ ++ensc_pkgconfig(xmlrpc_abyss) +diff --git a/lib/abyss/src/xmlrpc_abyss.pc.cmake b/lib/abyss/src/xmlrpc_abyss.pc.cmake +new file mode 100644 +index 0000000..8f913e5 +--- /dev/null ++++ b/lib/abyss/src/xmlrpc_abyss.pc.cmake +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++ ++Name: xmlrpc_abyss ++Description: XMLRPC Abyss base library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc_util ++Libs: -L${libdir} -lxmlrpc_abyss @xmlrpc_abyss_pkgconfig_libs@ ++Cflags: +diff --git a/lib/curl_transport/CMakeLists.txt b/lib/curl_transport/CMakeLists.txt +new file mode 100644 +index 0000000..3814f08 +--- /dev/null ++++ b/lib/curl_transport/CMakeLists.txt +@@ -0,0 +1,7 @@ ++# -*- cmake -*- ++ ++if(MUST_BUILD_CURL_CLIENT) ++ list(APPEND transport_SOURCES ++ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_curl_transport.c ++ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_curl_transport.h) ++endif(MUST_BUILD_CURL_CLIENT) +diff --git a/lib/expat/CMakeLists.txt b/lib/expat/CMakeLists.txt +new file mode 100644 +index 0000000..7397f52 +--- /dev/null ++++ b/lib/expat/CMakeLists.txt +@@ -0,0 +1,9 @@ ++# -*- cmake -*- ++ ++ ++INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/xmltok) ++ ++add_subdirectory(gennmtab) ++add_subdirectory(xmlparse) ++add_subdirectory(xmltok) ++add_subdirectory(xmlwf) +diff --git a/lib/expat/gennmtab/CMakeLists.txt b/lib/expat/gennmtab/CMakeLists.txt +new file mode 100644 +index 0000000..48a44da +--- /dev/null ++++ b/lib/expat/gennmtab/CMakeLists.txt +@@ -0,0 +1,3 @@ ++# -*- cmake -*- ++ ++ADD_EXECUTABLE(gennmtab gennmtab.c) +diff --git a/lib/expat/xmlparse/CMakeLists.txt b/lib/expat/xmlparse/CMakeLists.txt +new file mode 100644 +index 0000000..f87008a +--- /dev/null ++++ b/lib/expat/xmlparse/CMakeLists.txt +@@ -0,0 +1,7 @@ ++# -*- cmake -*- ++ ++add_library(xmlrpc_xmlparse STATIC ++ xmlparse.c) ++target_link_libraries(xmlrpc_xmlparse xmlrpc_xmltok) ++ ++ensc_pkgconfig(xmlrpc_xmlparse) +diff --git a/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake b/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake +new file mode 100644 +index 0000000..cd9900f +--- /dev/null ++++ b/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++ ++Name: xmlrpc_xmlparse ++Description: XMLRPC xmlparse library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc_xmltok ++Libs: -L${libdir} -lxmlrpc_xmlparse ++Cflags: +diff --git a/lib/expat/xmltok/CMakeLists.txt b/lib/expat/xmltok/CMakeLists.txt +new file mode 100644 +index 0000000..c3247ad +--- /dev/null ++++ b/lib/expat/xmltok/CMakeLists.txt +@@ -0,0 +1,20 @@ ++# -*- cmake -*- ++ ++include_directories(${CMAKE_CURRENT_BINARY_DIR}) ++ ++add_library(xmlrpc_xmltok STATIC ++ xmltok.c xmlrole.c ${CMAKE_CURRENT_BINARY_DIR}/nametab.h) ++ ++set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/nametab.h ++ PROPERTIES ++ OBJECT_DEPENDS gennmtab ++ GENERATED true) ++ ++ ++get_target_property(GENNMTAB_EXECUTABLE gennmtab LOCATION) ++add_custom_command( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/nametab.h ++ COMMAND ${GENNMTAB_EXECUTABLE} >nametab.h || { rm -f nametab.h\; false\; } ++ DEPENDS gennmtab) ++ ++ensc_pkgconfig(xmlrpc_xmltok) +diff --git a/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake b/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake +new file mode 100644 +index 0000000..88e7ad8 +--- /dev/null ++++ b/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake +@@ -0,0 +1,9 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++ ++Name: xmlrpc_xmltok ++Description: XMLRPC xmltok library ++Version: @XMLRPC_C_VERSION@ ++ ++Libs: -L${libdir} ++Cflags: +diff --git a/lib/libutil/CMakeLists.txt b/lib/libutil/CMakeLists.txt +new file mode 100644 +index 0000000..cc6ccab +--- /dev/null ++++ b/lib/libutil/CMakeLists.txt +@@ -0,0 +1,11 @@ ++# -*- cmake -*- ++ ++add_library(xmlrpc_util SHARED ++ casprintf.c ++ error.c ++ make_printable.c ++ memblock.c ++ resource.c ++ sleep.c) ++ ++ensc_pkgconfig(xmlrpc_util) +diff --git a/lib/libutil/xmlrpc_util.pc.cmake b/lib/libutil/xmlrpc_util.pc.cmake +new file mode 100644 +index 0000000..98d24f4 +--- /dev/null ++++ b/lib/libutil/xmlrpc_util.pc.cmake +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_util ++Description: XMLRPC utility library ++Version: @XMLRPC_C_VERSION@ ++ ++Libs: -L${libdir} -lxmlrpc_util ++Cflags: +diff --git a/lib/libwww_transport/CMakeLists.txt b/lib/libwww_transport/CMakeLists.txt +new file mode 100644 +index 0000000..4744f9c +--- /dev/null ++++ b/lib/libwww_transport/CMakeLists.txt +@@ -0,0 +1,4 @@ ++# -*- cmake -*- ++ ++if(MUST_BUILD_LIBWWW_CLIENT) ++endif(MUST_BUILD_LIBWWW_CLIENT) +diff --git a/lib/wininet_transport/CMakeLists.txt b/lib/wininet_transport/CMakeLists.txt +new file mode 100644 +index 0000000..4f7408e +--- /dev/null ++++ b/lib/wininet_transport/CMakeLists.txt +@@ -0,0 +1,4 @@ ++# -*- cmake -*- ++ ++if(MUST_BUILD_WININET_CLIENT) ++endif(MUST_BUILD_WININET_CLIENT) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +new file mode 100644 +index 0000000..bc0dce3 +--- /dev/null ++++ b/src/CMakeLists.txt +@@ -0,0 +1,106 @@ ++# -*- cmake -*- ++ ++if(ENABLE_LIBXML2_BACKEND) ++ set(xmlrpc_xml_parser xmlrpc_libxml2.c) ++ set(libxml_INCLUDES ${LIBXML2_CFLAGS}) ++ set(libxml_LIBS ${LIBXML2_LINK_FLAGS}) ++ set(xmlrpc_pkgconfig_req ${libxml_pkgconfig}) ++else(ENABLE_LIBXML2_BACKEND) ++ set(xmlrpc_xml_parser xmlrpc_expat.c) ++ set(libxml_INCLUDES -I${xmlrpc-c_SOURCE_DIR}/lib/expat/xmlparse) ++ set(libxml_LIBS xmlrpc_xmlparse) ++ set(xmlrpc_pkgconfig_req xmlrpc_xmlparse) ++endif(ENABLE_LIBXML2_BACKEND) ++ ++if(MUST_BUILD_WININET_CLIENT) ++ set(client_wininet_CFLAGS "") ++ set(client_wininet_LIBS "${WININET_LDADD}") ++ list(APPEND transport_SOURCES ++ ${wininet_srcdir}/xmlrpc_wininet_transport.c ${wininet_srcdir}/xmlrpc_wininet_transport.h) ++endif(MUST_BUILD_WININET_CLIENT) ++ ++if(MUST_BUILD_LIBWWW_CLIENT) ++ set(client_libwww_CFLAGS "${LIBWWW_CFLAGS}") ++ set(client_libwww_LIBS "${LIBWWW_LIBS}") ++ list(APPEND transport_SOURCES ${libwww_srcdir}/xmlrpc_libwww_transport.c ${libwww_srcdir}/xmlrpc_libwww_transport.h) ++endif(MUST_BUILD_LIBWWW_CLIENT) ++ ++if(MUST_BUILD_CURL_CLIENT) ++ set(client_curl_CFLAGS ${CURL_CFLAGS}) ++ set(client_curl_LIBS ${CURL_LINK_FLAGS}) ++ set(xmlrpc_client_pkgconfig_req libcurl) ++ list(APPEND transport_SOURCES ${curl_srcdir}/xmlrpc_curl_transport.c ${curl_srcdir}/xmlrpc_curl_transport.h) ++endif(MUST_BUILD_CURL_CLIENT) ++ ++set(client_CFLAGS "-I${wininet_srcdir} -I${libwww_srcdir} -I${curl_srcdir} ${client_wininet_CFLAGS} ${client_libwww_CFLAGS} ${client_curl_CFLAGS}") ++set(client_LIBS "${client_wininet_LIBS} ${client_libwww_LIBS} ${client_curl_LIBS}") ++ ++ ++add_subdirectory(cpp) ++add_subdirectory(test) ++ ++ ++ ++### libxmlrpc.so ++add_library(xmlrpc SHARED ++ trace.c ${xmlrpc_xml_parser} ++ xmlrpc_data.c xmlrpc_datetime.c xmlrpc_array.c xmlrpc_struct.c ++ xmlrpc_build.c xmlrpc_decompose.c xmlrpc_parse.c xmlrpc_serialize.c ++ xmlrpc_base64.c xmlrpc_utf8.c xmlrpc_authcookie.c) ++ ++set_target_properties(xmlrpc ++ PROPERTIES ++ COMPILE_FLAGS ${libxml_INCLUDES}) ++ ++ensc_pkgconfig(xmlrpc) ++target_link_libraries(xmlrpc ${libxml_LIBS} xmlrpc_util) ++list(APPEND lib_TARGETS xmlrpc) ++ ++### libxmlrpc_client.so ++add_library(xmlrpc_client SHARED ++ xmlrpc_client.c xmlrpc_client_global.c ${transport_SOURCES}) ++ ++target_link_libraries(xmlrpc_client xmlrpc ${client_LIBS}) ++set_target_properties(xmlrpc_client ++ PROPERTIES ++ COMPILE_FLAGS "${client_CFLAGS}") ++list(APPEND lib_TARGETS xmlrpc_client) ++ensc_pkgconfig(xmlrpc_client) ++ ++### libxmlrpc_server.so ++add_library(xmlrpc_server SHARED ++ registry.c system_method.c) ++target_link_libraries(xmlrpc_server xmlrpc) ++list(APPEND lib_TARGETS xmlrpc_server) ++ensc_pkgconfig(xmlrpc_server) ++ ++ ++### libxmlrpc_server_abyss.so ++add_library(xmlrpc_server_abyss SHARED ++ xmlrpc_server_abyss.c) ++target_link_libraries(xmlrpc_server_abyss xmlrpc_abyss xmlrpc_server) ++list(APPEND lib_TARGETS xmlrpc_server_abyss) ++ensc_pkgconfig(xmlrpc_server_abyss) ++ ++ ++ ++### libxmlrpc_server_cgi.so ++add_library(xmlrpc_server_cgi SHARED ++ xmlrpc_server_cgi) ++target_link_libraries(xmlrpc_server_cgi xmlrpc_server) ++list(APPEND lib_TARGETS xmlrpc_server_cgi) ++ensc_pkgconfig(xmlrpc_server_cgi) ++ ++ ++install(TARGETS ${lib_TARGETS} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib) ++ ++set_target_properties(${lib_TARGETS} ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS} ++ VERSION ${XMLRPC_C_LIBVERSION} ++ SOVERSION ${XMLRPC_C_SOVERSION}) ++ ++ ++enable_testing() +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +new file mode 100644 +index 0000000..3dba3a7 +--- /dev/null ++++ b/src/cpp/CMakeLists.txt +@@ -0,0 +1,48 @@ ++# -*- cmake -*- ++ ++####### libxmlrpc++.so ++add_library(xmlrpc++ SHARED ++ base64.cpp env_wrap.cpp fault.cpp girerr.cpp girmem.cpp ++ outcome.cpp param_list.cpp value.cpp xml.cpp) ++target_link_libraries(xmlrpc++ xmlrpc) ++list(APPEND lib_TARGETS xmlrpc++) ++ensc_pkgconfig(xmlrpc++) ++ ++####### libxmlrpc_cpp.so ++add_library(xmlrpc_cpp SHARED XmlRpcCpp) ++target_link_libraries(xmlrpc_cpp xmlrpc xmlrpc_server xmlrpc_client) ++list(APPEND lib_TARGETS xmlrpc_cpp) ++ensc_pkgconfig(xmlrpc_cpp) ++ ++####### libxmlrpc_server++.so ++add_library(xmlrpc_server++ SHARED registry.cpp) ++target_link_libraries(xmlrpc_server++ xmlrpc++ xmlrpc_server) ++list(APPEND lib_TARGETS xmlrpc_server++) ++ensc_pkgconfig(xmlrpc_server++) ++ ++####### libxmlrpc_server_abyss++.so ++add_library(xmlrpc_server_abyss++ SHARED server_abyss.cpp) ++target_link_libraries(xmlrpc_server_abyss++ xmlrpc_server++ xmlrpc_server_abyss) ++list(APPEND lib_TARGETS xmlrpc_server_abyss++) ++ensc_pkgconfig(xmlrpc_server_abyss++) ++ ++####### libxmlrpc_client++.so ++add_library(xmlrpc_client++ SHARED ++ client.cpp client_simple.cpp curl.cpp libwww.cpp wininet.cpp) ++set_target_properties(xmlrpc_client++ ++ PROPERTIES ++ COMPILE_FLAGS "-I${wininet_srcdir} -I${libwww_srcdir} -I${curl_srcdir}") ++target_link_libraries(xmlrpc_client++ xmlrpc++ xmlrpc_client) ++list(APPEND lib_TARGETS xmlrpc_client++) ++ensc_pkgconfig(xmlrpc_client++) ++ ++ ++install(TARGETS ${lib_TARGETS} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib) ++ ++set_target_properties(${lib_TARGETS} ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS} ++ VERSION ${XMLRPC_C_LIBVERSION} ++ SOVERSION ${XMLRPC_C_SOVERSION}) +diff --git a/src/cpp/xmlrpc++.pc.cmake b/src/cpp/xmlrpc++.pc.cmake +new file mode 100644 +index 0000000..9c35667 +--- /dev/null ++++ b/src/cpp/xmlrpc++.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc++ ++Description: XMLRPC C++ Base library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc ++Libs: -L${libdir} -lxmlrpc++ ++Cflags: -I${includedir} +diff --git a/src/cpp/xmlrpc_client++.pc.cmake b/src/cpp/xmlrpc_client++.pc.cmake +new file mode 100644 +index 0000000..a02bd6e +--- /dev/null ++++ b/src/cpp/xmlrpc_client++.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_client++ ++Description: XMLRPC C++ Client library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc++ xmlrpc_client ++Libs: -L${libdir} -lxmlrpc_client++ ++Cflags: -I${includedir} +diff --git a/src/cpp/xmlrpc_cpp.pc.cmake b/src/cpp/xmlrpc_cpp.pc.cmake +new file mode 100644 +index 0000000..52c092c +--- /dev/null ++++ b/src/cpp/xmlrpc_cpp.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_cpp ++Description: XMLRPC CPP library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc xmlrpc_server xmlrpc_client ++Libs: -L${libdir} -lxmlrpc_cpp ++Cflags: -I${includedir} +diff --git a/src/cpp/xmlrpc_server++.pc.cmake b/src/cpp/xmlrpc_server++.pc.cmake +new file mode 100644 +index 0000000..71e394e +--- /dev/null ++++ b/src/cpp/xmlrpc_server++.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_server++ ++Description: XMLRPC C++ Server library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc++ xmlrpc_server ++Libs: -L${libdir} -lxmlrpc_server++ ++Cflags: -I${includedir} +diff --git a/src/cpp/xmlrpc_server_abyss++.pc.cmake b/src/cpp/xmlrpc_server_abyss++.pc.cmake +new file mode 100644 +index 0000000..1d28749 +--- /dev/null ++++ b/src/cpp/xmlrpc_server_abyss++.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_server_abyss++ ++Description: XMLRPC C++ Abyss-Server library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc_server_abyss xmlrpc_server++ ++Libs: -L${libdir} -lxmlrpc_server_abyss++ ++Cflags: -I${includedir} +diff --git a/src/xmlrpc.pc.cmake b/src/xmlrpc.pc.cmake +new file mode 100644 +index 0000000..7d74537 +--- /dev/null ++++ b/src/xmlrpc.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc ++Description: XMLRPC base library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: @xmlrpc_pkgconfig_req@ xmlrpc_util ++Libs: -L${libdir} -lxmlrpc @xmlrpc_pkgconfig_libs@ ++Cflags: -I${includedir} +diff --git a/src/xmlrpc_client.pc.cmake b/src/xmlrpc_client.pc.cmake +new file mode 100644 +index 0000000..4233a27 +--- /dev/null ++++ b/src/xmlrpc_client.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_client ++Description: XMLRPC client library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc @xmlrpc_client_pkgconfig_req@ ++Libs: -L${libdir} -lxmlrpc_client @client_libwww_LIBS@ @client_wininet_LIBS@ ++Cflags: -I${includedir} +diff --git a/src/xmlrpc_server.pc.cmake b/src/xmlrpc_server.pc.cmake +new file mode 100644 +index 0000000..3c585e5 +--- /dev/null ++++ b/src/xmlrpc_server.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_server ++Description: XMLRPC Server library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc ++Libs: -L${libdir} -lxmlrpc_server ++Cflags: -I${includedir} +diff --git a/src/xmlrpc_server_abyss.pc.cmake b/src/xmlrpc_server_abyss.pc.cmake +new file mode 100644 +index 0000000..be2e4c1 +--- /dev/null ++++ b/src/xmlrpc_server_abyss.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_server_abyss ++Description: XMLRPC Server Abyss library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc_server xmlrpc_abyss ++Libs: -L${libdir} -lxmlrpc_server_abyss ++Cflags: -I${includedir} +diff --git a/src/xmlrpc_server_cgi.pc.cmake b/src/xmlrpc_server_cgi.pc.cmake +new file mode 100644 +index 0000000..ac0c031 +--- /dev/null ++++ b/src/xmlrpc_server_cgi.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: xmlrpc_server_cgi ++Description: XMLRPC CGI-Server library ++Version: @XMLRPC_C_VERSION@ ++ ++Requires: xmlrpc_server ++Libs: -L${libdir} -lxmlrpc_server_cgi ++Cflags: -I${includedir} +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +new file mode 100644 +index 0000000..14010f4 +--- /dev/null ++++ b/tools/CMakeLists.txt +@@ -0,0 +1,9 @@ ++# -*- cmake -*- ++ ++add_subdirectory(binmode-rpc-kit) ++add_subdirectory(turbocharger) ++ ++add_subdirectory(xmlrpc) ++add_subdirectory(xmlrpc_transport) ++ ++add_subdirectory(xml-rpc-api2cpp ) +diff --git a/tools/binmode-rpc-kit/CMakeLists.txt b/tools/binmode-rpc-kit/CMakeLists.txt +new file mode 100644 +index 0000000..a707c75 +--- /dev/null ++++ b/tools/binmode-rpc-kit/CMakeLists.txt +@@ -0,0 +1,2 @@ ++# -*- cmake -*- ++ +diff --git a/tools/turbocharger/CMakeLists.txt b/tools/turbocharger/CMakeLists.txt +new file mode 100644 +index 0000000..342423d +--- /dev/null ++++ b/tools/turbocharger/CMakeLists.txt +@@ -0,0 +1 @@ ++# -*- cmake -*- +diff --git a/tools/xml-rpc-api2cpp/CMakeLists.txt b/tools/xml-rpc-api2cpp/CMakeLists.txt +new file mode 100644 +index 0000000..a97e33c +--- /dev/null ++++ b/tools/xml-rpc-api2cpp/CMakeLists.txt +@@ -0,0 +1,12 @@ ++# -*- cmake -*- ++ ++add_executable(xml-rpc-api2cpp ++ xml-rpc-api2cpp.cpp ++ DataType.cpp ++ XmlRpcFunction.cpp ++ XmlRpcClass.cpp ++ SystemProxy.cpp) ++target_link_libraries(xml-rpc-api2cpp xmlrpc_cpp xmlrpc_client xmlrpc_server) ++ ++install(TARGETS xml-rpc-api2cpp ++ RUNTIME DESTINATION bin) +diff --git a/transport_config.h.cmake b/transport_config.h.cmake +new file mode 100644 +index 0000000..1ec3cf6 +--- /dev/null ++++ b/transport_config.h.cmake +@@ -0,0 +1,16 @@ ++/* -*- c -*- */ ++#define MUST_BUILD_WININET_CLIENT @_MUST_BUILD_WININET_CLIENT@ ++#define MUST_BUILD_LIBWWW_CLIENT @_MUST_BUILD_LIBWWW_CLIENT@ ++#define MUST_BUILD_CURL_CLIENT @_MUST_BUILD_CURL_CLIENT@ ++ ++static char const * const XMLRPC_DEFAULT_TRANSPORT = ++#if MUST_BUILD_LIBWWW_CLIENT ++ "libwww" ++#elif MUST_BUILD_CURL_CLIENT ++ "curl" ++#elif MUST_BUILD_WININET_CLIENT ++ "wininet" ++#else ++# error "no client XML transport configured" ++#endif ++ ; +diff --git a/version.h.cmake b/version.h.cmake +new file mode 100644 +index 0000000..35beafc +--- /dev/null ++++ b/version.h.cmake +@@ -0,0 +1,2 @@ ++/* This file was generated by a make rule */ ++#define XMLRPC_C_VERSION "@XMLRPC_C_VERSION@" +diff --git a/xmlrpc_config.h.cmake b/xmlrpc_config.h.cmake +new file mode 100644 +index 0000000..478c252 +--- /dev/null ++++ b/xmlrpc_config.h.cmake +@@ -0,0 +1,18 @@ ++#ifndef H_XMLRPC_C_CONFIG_H ++ ++#cmakedefine HAVE_WCHAR_H ++#cmakedefine HAVE_SETENV ++#define HAVE_SYS_IOCTL_H 0@HAVE_SYS_IOCTL_H@ ++ ++#define XMLRPC_HAVE_WCHAR @XMLRPC_HAVE_WCHAR@ ++#define ATTR_UNUSED @ATTR_UNUSED@ ++#define DIRECTORY_SEPARATOR "@DIRECTORY_SEPARATOR@" ++ ++#ifdef HAVE_WCHAR_H ++# define HAVE_UNICODE_WCHAR 1 ++#else ++# define HAVE_UNICODE_WCHAR 0 ++#endif ++ ++ ++#endif +-- +1.4.2 + diff --git a/0004-added-multilib-stuff.txt b/0004-added-multilib-stuff.txt new file mode 100644 index 0000000..638023a --- /dev/null +++ b/0004-added-multilib-stuff.txt @@ -0,0 +1,79 @@ +From 6ec81dc315d105d733e4be4cdd02ef324e587bbe Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 15:53:23 +0200 +Subject: [PATCH] added multilib stuff + +--- + CMakeLists.txt | 5 ++++- + lib/abyss/src/CMakeLists.txt | 6 +++--- + src/CMakeLists.txt | 4 ++-- + src/cpp/CMakeLists.txt | 4 ++-- + 4 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 239a434..7c668d2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,8 +190,11 @@ add_custom_target(dist + COMMAND cd _dist && tar cjf ../xmlrpc-c-${XMLRPC_C_VERSION}.tar.bz2 xmlrpc-c-${XMLRPC_C_VERSION} --exclude=.git --exclude=CVS --exclude=.svn + ) + ++set(_lib lib CACHE STRING "Basename of the library-directory; usually 'lib' or 'lib64' (on multilib archs)") ++set(_bin bin CACHE STRING "Basename of the bin-directory; usually 'bin'") + set(prefix ${CMAKE_INSTALL_PREFIX}) +-set(libdir "${prefix}/lib") ++set(libdir "${prefix}/${_lib}") ++set(bindir "${prefix}/${_bin}") + set(pkgconfdir "${libdir}/pkgconfig") + set(includedir "${prefix}/include") + +diff --git a/lib/abyss/src/CMakeLists.txt b/lib/abyss/src/CMakeLists.txt +index 4e18b81..a8fb5a9 100644 +--- a/lib/abyss/src/CMakeLists.txt ++++ b/lib/abyss/src/CMakeLists.txt +@@ -49,9 +49,9 @@ if(ENABLE_ABYSS_THREADS) + endif(ENABLE_ABYSS_THREADS) + + install(TARGETS xmlrpc_abyss +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ RUNTIME DESTINATION ${_bin} ++ LIBRARY DESTINATION ${_lib} ++ ARCHIVE DESTINATION ${_lib}) + + set_target_properties(xmlrpc_abyss + PROPERTIES +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bc0dce3..b201fa1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -93,8 +93,8 @@ ensc_pkgconfig(xmlrpc_server_cgi) + + + install(TARGETS ${lib_TARGETS} +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib) ++ RUNTIME DESTINATION ${_bin} ++ LIBRARY DESTINATION ${_lib}) + + set_target_properties(${lib_TARGETS} + PROPERTIES +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 3dba3a7..9ab2530 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -38,8 +38,8 @@ ensc_pkgconfig(xmlrpc_client++) + + + install(TARGETS ${lib_TARGETS} +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib) ++ RUNTIME DESTINATION ${_bin} ++ LIBRARY DESTINATION ${_lib}) + + set_target_properties(${lib_TARGETS} + PROPERTIES +-- +1.4.2 + diff --git a/0005-added-xmlrpc-c-config-wrapper.txt b/0005-added-xmlrpc-c-config-wrapper.txt new file mode 100644 index 0000000..08e6518 --- /dev/null +++ b/0005-added-xmlrpc-c-config-wrapper.txt @@ -0,0 +1,56 @@ +From 29b9db8273ef88e93c45b43add367a04282044c8 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 16:22:50 +0200 +Subject: [PATCH] added xmlrpc-c-config wrapper + +--- + xmlrpc-c-config | 38 ++++++++++++++++++++++++++++++++++++++ + 1 files changed, 38 insertions(+), 0 deletions(-) + +diff --git a/xmlrpc-c-config b/xmlrpc-c-config +new file mode 100755 +index 0000000..e8ba549 +--- /dev/null ++++ b/xmlrpc-c-config +@@ -0,0 +1,38 @@ ++#! /bin/sh ++ ++comp= ++ ++need_cxx= ++need_client= ++need_server= ++need_abyss= ++ ++while test $# -gt 0; do ++ case $1 in ++ (c++) comp="$comp xmlrpc_cpp";; ++ (server-util) comp="$comp xmlrpc_server_util";; ++ (cgi-server) comp="$comp xmlrpc_server_cgi";; ++ (c++2) need_cxx=1;; ++ (abyss-server) need_abyss=1;; ++ (client|libwww-client) need_client=1;; ++ (--) shift; break;; ++ (--*) break;; ++ (*) ++ echo "Unrecognized token '$1'" ++ exit 1 ++ ;; ++ esac ++ shift ++done ++ ++if test -z "$need_cxx"; then ++ test -z "$need_client" || comp="$comp xmlrpc_client" ++ test -z "$need_abyss" || comp="$comp xmlrpc_abyss" ++ test -z "$need_server" || comp="$comp xmlrpc_server" ++else ++ test -z "$need_client" || comp="$comp xmlrpc_client++" ++ test -z "$need_abyss" || comp="$comp xmlrpc_abyss++" ++ test -z "$need_server" || comp="$comp xmlrpc_server++" ++fi ++ ++exec pkg-config "$@" $comp +-- +1.4.2 + diff --git a/0006-added-some-tools-directories.txt b/0006-added-some-tools-directories.txt new file mode 100644 index 0000000..bb9a884 --- /dev/null +++ b/0006-added-some-tools-directories.txt @@ -0,0 +1,96 @@ +From 53ca6acb5c628f143894147e1c789de68defbc6d Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 16:54:15 +0200 +Subject: [PATCH] added some tools-directories + +- build 'xmlrpc' and 'xmlrpc_transport' tools +- build lib/util stuff as static library which is used internally +--- + lib/util/CMakeLists.txt | 13 +++++++++++++ + tools/xmlrpc/CMakeLists.txt | 19 +++++++++++++++++++ + tools/xmlrpc/config.h | 1 + + tools/xmlrpc_transport/CMakeLists.txt | 14 ++++++++++++++ + tools/xmlrpc_transport/config.h | 1 + + 5 files changed, 48 insertions(+), 0 deletions(-) + +diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt +new file mode 100644 +index 0000000..be6ded2 +--- /dev/null ++++ b/lib/util/CMakeLists.txt +@@ -0,0 +1,13 @@ ++## -*- cmake -*- ++ ++set(util_SOURCES ++ casprintf.c ++ cmdline_parser.c ++ getoptx.c ++ getoptx.h) ++ ++if(WIN32) ++ list(APPEND util_SOURCES pthreadx_win32.c) ++endif(WIN32) ++ ++add_library(util STATIC ${util_SOURCES}) +diff --git a/tools/xmlrpc/CMakeLists.txt b/tools/xmlrpc/CMakeLists.txt +new file mode 100644 +index 0000000..e313e37 +--- /dev/null ++++ b/tools/xmlrpc/CMakeLists.txt +@@ -0,0 +1,19 @@ ++# -*- cmake -*- ++ ++add_executable(tool-xmlrpc ++ xmlrpc.c ++ dumpvalue.c ++ dumpvalue.h) ++target_link_libraries(tool-xmlrpc xmlrpc_client util) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tool-xmlrpc ++ DESTINATION ${_bin} ++ PERMISSIONS WORLD_EXECUTE GROUP_EXECUTE OWNER_EXECUTE OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ ++ RENAME xmlrpc) ++ ++## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it ++if(NOT MUST_BUILD_LIBWWW_CLIENT) ++ set_target_properties(tool-xmlrpc ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) ++endif(NOT MUST_BUILD_LIBWWW_CLIENT) +diff --git a/tools/xmlrpc/config.h b/tools/xmlrpc/config.h +new file mode 100644 +index 0000000..7409aed +--- /dev/null ++++ b/tools/xmlrpc/config.h +@@ -0,0 +1 @@ ++#include +diff --git a/tools/xmlrpc_transport/CMakeLists.txt b/tools/xmlrpc_transport/CMakeLists.txt +new file mode 100644 +index 0000000..0575488 +--- /dev/null ++++ b/tools/xmlrpc_transport/CMakeLists.txt +@@ -0,0 +1,14 @@ ++# -*- cmake -*- ++ ++add_executable(xmlrpc_transport xmlrpc_transport.c) ++target_link_libraries(xmlrpc_transport xmlrpc_client util) ++ ++install(TARGETS xmlrpc_transport ++ DESTINATION ${_bin}) ++ ++## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it ++if(NOT MUST_BUILD_LIBWWW_CLIENT) ++ set_target_properties(xmlrpc_transport ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) ++endif(NOT MUST_BUILD_LIBWWW_CLIENT) +diff --git a/tools/xmlrpc_transport/config.h b/tools/xmlrpc_transport/config.h +new file mode 100644 +index 0000000..7409aed +--- /dev/null ++++ b/tools/xmlrpc_transport/config.h +@@ -0,0 +1 @@ ++#include +-- +1.4.2 + diff --git a/0007-implemented-testsuite.txt b/0007-implemented-testsuite.txt new file mode 100644 index 0000000..4d22794 --- /dev/null +++ b/0007-implemented-testsuite.txt @@ -0,0 +1,58 @@ +From 010b828759d2a43ee774522524c18e9d94eb1333 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 16:49:31 +0200 +Subject: [PATCH] implemented testsuite + +--- + CMakeLists.txt | 1 + + src/test/CMakeLists.txt | 27 +++++++++++++++++++++++++++ + 2 files changed, 28 insertions(+), 0 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7c668d2..ccbd371 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -198,6 +198,7 @@ set(bindir "${prefix}/${_bin}") + set(pkgconfdir "${libdir}/pkgconfig") + set(includedir "${prefix}/include") + ++enable_testing() + + add_subdirectory(lib) + add_subdirectory(Windows) +diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt +new file mode 100644 +index 0000000..3deb9cb +--- /dev/null ++++ b/src/test/CMakeLists.txt +@@ -0,0 +1,27 @@ ++# -*- cmake -*- ++ ++set(test_SOURCES ++ test.c abyss.c cgi.c method_registry.c parse_xml.c serialize.c server_abyss.c ++ value.c xml_data.c) ++ ++if(MUST_BUILD_CLIENT) ++ list(APPEND test_SOURCES client.c) ++ list(APPEND test_LIBS xmlrpc_client) ++else(MUST_BUILD_CLIENT) ++ list(APPEND test_SOURCES client_dummy.c) ++endif(MUST_BUILD_CLIENT) ++ ++ ++add_executable(src-test ${test_SOURCES}) ++target_link_libraries(src-test xmlrpc_server_abyss util ${test_LIBS}) ++ ++add_executable(cgitest1 cgitest1.c) ++target_link_libraries(cgitest1 xmlrpc_server_cgi) ++ ++add_custom_command(TARGET src-test ++ POST_BUILD ++ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/data ++ COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}) ++ ++enable_testing() ++add_test(runtests src-test) +-- +1.4.2 + diff --git a/0008-use-a-macro-to-set-the-linker-flags-for-executables.txt b/0008-use-a-macro-to-set-the-linker-flags-for-executables.txt new file mode 100644 index 0000000..9090e89 --- /dev/null +++ b/0008-use-a-macro-to-set-the-linker-flags-for-executables.txt @@ -0,0 +1,95 @@ +From d36ae0e17f30acc2afd7d74b074bde1da791ee79 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 17:20:08 +0200 +Subject: [PATCH] use a macro to set the linker flags for executables + +--- + CMakeLists.txt | 8 ++++++++ + examples/CMakeLists.txt | 7 +------ + examples/cpp/CMakeLists.txt | 7 +------ + tools/xmlrpc/CMakeLists.txt | 7 +------ + tools/xmlrpc_transport/CMakeLists.txt | 7 +------ + 5 files changed, 12 insertions(+), 24 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ccbd371..1e86c61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,6 +33,14 @@ macro(ensc_pkgconfig_lib TARGET LIBS) + endif("${libtype}" STREQUAL "STATIC_LIBRARY") + endmacro(ensc_pkgconfig_lib) + ++macro(ensc_set_link_exe_flags) ++ ## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it ++ if(NOT MUST_BUILD_LIBWWW_CLIENT) ++ set_target_properties(${ARGV} ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) ++ endif(NOT MUST_BUILD_LIBWWW_CLIENT) ++endmacro(ensc_set_link_exe_flags) + + + ########### +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 4cbe95a..9f18b0d 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -48,9 +48,4 @@ if(ENABLE_ABYSS_SERVER) + ensc_add_example(xmlrpc_server_validatee c abyss_server) + endif(ENABLE_ABYSS_SERVER) + +-## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it +-if(NOT MUST_BUILD_LIBWWW_CLIENT) +- set_target_properties(${example_TARGETS} +- PROPERTIES +- LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) +-endif(NOT MUST_BUILD_LIBWWW_CLIENT) ++ensc_set_link_exe_flags(${example_TARGETS}) +diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt +index c2e3ab7..9fbea7e 100644 +--- a/examples/cpp/CMakeLists.txt ++++ b/examples/cpp/CMakeLists.txt +@@ -17,9 +17,4 @@ if(MUST_BUILD_CLIENT) + endif(MUST_BUILD_CLIENT) + + +-## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it +-if(NOT MUST_BUILD_LIBWWW_CLIENT) +- set_target_properties(${example_TARGETS} +- PROPERTIES +- LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) +-endif(NOT MUST_BUILD_LIBWWW_CLIENT) ++ensc_set_link_exe_flags(${example_TARGETS}) +diff --git a/tools/xmlrpc/CMakeLists.txt b/tools/xmlrpc/CMakeLists.txt +index e313e37..a996e18 100644 +--- a/tools/xmlrpc/CMakeLists.txt ++++ b/tools/xmlrpc/CMakeLists.txt +@@ -11,9 +11,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR + PERMISSIONS WORLD_EXECUTE GROUP_EXECUTE OWNER_EXECUTE OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ WORLD_READ + RENAME xmlrpc) + +-## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it +-if(NOT MUST_BUILD_LIBWWW_CLIENT) +- set_target_properties(tool-xmlrpc +- PROPERTIES +- LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) +-endif(NOT MUST_BUILD_LIBWWW_CLIENT) ++ensc_set_link_exe_flags(tool-xmlrpc) +diff --git a/tools/xmlrpc_transport/CMakeLists.txt b/tools/xmlrpc_transport/CMakeLists.txt +index 0575488..b73d7c0 100644 +--- a/tools/xmlrpc_transport/CMakeLists.txt ++++ b/tools/xmlrpc_transport/CMakeLists.txt +@@ -6,9 +6,4 @@ target_link_libraries(xmlrpc_transport x + install(TARGETS xmlrpc_transport + DESTINATION ${_bin}) + +-## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it +-if(NOT MUST_BUILD_LIBWWW_CLIENT) +- set_target_properties(xmlrpc_transport +- PROPERTIES +- LINK_FLAGS ${XMLRPC_LINKER_FLAGS}) +-endif(NOT MUST_BUILD_LIBWWW_CLIENT) ++ensc_set_link_exe_flags(xmlrpc_transport) +-- +1.4.2 + diff --git a/0009-Install-xmlrpc-c-config-and-man-pages-added-mandir-variable.txt b/0009-Install-xmlrpc-c-config-and-man-pages-added-mandir-variable.txt new file mode 100644 index 0000000..318248d --- /dev/null +++ b/0009-Install-xmlrpc-c-config-and-man-pages-added-mandir-variable.txt @@ -0,0 +1,43 @@ +From 226f9e8336f203d89143bb89f0efa2909d268928 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 19:59:50 +0200 +Subject: [PATCH] Install xmlrpc-c-config and man-pages + added ${mandir} variable + +--- + CMakeLists.txt | 5 +++++ + tools/xml-rpc-api2cpp/CMakeLists.txt | 3 +++ + 2 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e86c61..a6b76b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -203,9 +203,14 @@ set(_bin bin CACHE STRING "Basenam + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(libdir "${prefix}/${_lib}") + set(bindir "${prefix}/${_bin}") ++set(mandir "${prefix}/share/man") + set(pkgconfdir "${libdir}/pkgconfig") + set(includedir "${prefix}/include") + ++############# ++ ++install(PROGRAMS xmlrpc-c-config DESTINATION ${_bin}) ++ + enable_testing() + + add_subdirectory(lib) +diff --git a/tools/xml-rpc-api2cpp/CMakeLists.txt b/tools/xml-rpc-api2cpp/CMakeLists.txt +index a97e33c..c759dec 100644 +--- a/tools/xml-rpc-api2cpp/CMakeLists.txt ++++ b/tools/xml-rpc-api2cpp/CMakeLists.txt +@@ -10,3 +10,6 @@ target_link_libraries(xml-rpc-api2cpp xm + + install(TARGETS xml-rpc-api2cpp + RUNTIME DESTINATION bin) ++ ++install(FILES xml-rpc-api2cpp.1 ++ DESTINATION ${mandir}/man1) +-- +1.4.2 + diff --git a/0010-install-libxmlrpc_util.so-and-set-version-information.txt b/0010-install-libxmlrpc_util.so-and-set-version-information.txt new file mode 100644 index 0000000..0035495 --- /dev/null +++ b/0010-install-libxmlrpc_util.so-and-set-version-information.txt @@ -0,0 +1,32 @@ +From 68a7168a4324ab356e3992dfc182faf9d51ae821 Mon Sep 17 00:00:00 2001 +From: Enrico Scholz +Date: Sun, 17 Sep 2006 20:09:29 +0200 +Subject: [PATCH] install libxmlrpc_util.so and set version-information + +--- + lib/libutil/CMakeLists.txt | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/lib/libutil/CMakeLists.txt b/lib/libutil/CMakeLists.txt +index cc6ccab..5e5d382 100644 +--- a/lib/libutil/CMakeLists.txt ++++ b/lib/libutil/CMakeLists.txt +@@ -8,4 +8,15 @@ add_library(xmlrpc_util SHARED + resource.c + sleep.c) + ++set_target_properties(xmlrpc_util ++ PROPERTIES ++ LINK_FLAGS ${XMLRPC_LINKER_FLAGS} ++ VERSION ${XMLRPC_C_LIBVERSION} ++ SOVERSION ${XMLRPC_C_SOVERSION}) ++ ++install(TARGETS xmlrpc_util ++ RUNTIME DESTINATION ${_bin} ++ LIBRARY DESTINATION ${_lib} ++ ARCHIVE DESTINATION ${_lib}) ++ + ensc_pkgconfig(xmlrpc_util) +-- +1.4.2 + diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/sources b/sources index 3c83a7a..4ebbc2d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -60d59b39f13d21c3db9285274ea23bab xmlrpc-c-1.05.tgz +25c43707810525b077c6ad64e25dd978 xmlrpc-c-1.06.04.tgz diff --git a/xmlrpc-c-1.04-libxml2.patch b/xmlrpc-c-1.04-libxml2.patch deleted file mode 100644 index 274b2e9..0000000 --- a/xmlrpc-c-1.04-libxml2.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- xmlrpc-c-1.04/src/xmlrpc_libxml2.c.builderr 2005-12-12 10:05:46.000000000 +0100 -+++ xmlrpc-c-1.04/src/xmlrpc_libxml2.c 2005-12-12 10:11:57.000000000 +0100 -@@ -147,7 +147,7 @@ - ** documentation on each function works. - */ - --char *xml_element_name (xml_element *elem) -+char const *xml_element_name (xml_element const * const elem) - { - XMLRPC_ASSERT_ELEM_OK(elem); - return elem->_name; -@@ -167,13 +167,13 @@ - return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(char, &elem->_cdata); - } - --size_t xml_element_children_size (xml_element *elem) -+size_t xml_element_children_size (xml_element const *elem) - { - XMLRPC_ASSERT_ELEM_OK(elem); - return XMLRPC_TYPED_MEM_BLOCK_SIZE(xml_element*, &elem->_children); - } - --xml_element **xml_element_children (xml_element *elem) -+xml_element **xml_element_children (xml_element const *elem) - { - XMLRPC_ASSERT_ELEM_OK(elem); - return XMLRPC_TYPED_MEM_BLOCK_CONTENTS(xml_element*, &elem->_children); -@@ -410,13 +410,13 @@ - XMLRPC_ASSERT(context.root != NULL); - XMLRPC_ASSERT(context.current == NULL); - -- *resultP = context.root; -+ *resultPP = context.root; - - cleanup: - if (parser) - xmlFreeParserCtxt(parser); - -- if (env->fault_occurred) { -+ if (envP->fault_occurred) { - if (context.root) - xml_element_free(context.root); - } diff --git a/xmlrpc-c-1.05-buildsys.patch b/xmlrpc-c-1.05-buildsys.patch deleted file mode 100644 index 011c65e..0000000 --- a/xmlrpc-c-1.05-buildsys.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- xmlrpc-c-1.05/include/Makefile.buildsys 2005-11-22 18:22:57.000000000 +0100 -+++ xmlrpc-c-1.05/include/Makefile 2006-06-04 16:06:58.000000000 +0200 -@@ -45,10 +45,11 @@ HEADERINST_PREFIX = /xmlrpc-c - ifeq ($(MUST_BUILD_CLIENT),yes) - HEADERS_TO_INSTALL += \ - xmlrpc-c/client.h \ -+ xmlrpc-c/client_global.h \ - xmlrpc-c/transport.h \ - - ifeq ($(ENABLE_CPLUSPLUS),yes) -- HEADERS_TO_INSTALL += xmlrpc-c/client.hpp xmlrpc-c/client_simple.hpp -+ HEADERS_TO_INSTALL += xmlrpc-c/client.hpp xmlrpc-c/client_simple.hpp xmlrpc-c/client_transport.hpp - endif - endif - ifeq ($(ENABLE_CGI_SERVER),yes) diff --git a/xmlrpc-c-1.05-gcc41.patch b/xmlrpc-c-1.05-gcc41.patch deleted file mode 100644 index fe6f1f0..0000000 --- a/xmlrpc-c-1.05-gcc41.patch +++ /dev/null @@ -1,41 +0,0 @@ -2006-06-04 Enrico Scholz - * include/xmlrpc-c/server_abyss.hpp: fixed compilation with - gcc41 by removing duplicate class-name in method declaration - - * examples/cpp/xmlrpc_loop_server.cpp: added includes and - namespaces for std::cout + std::endl - ---- xmlrpc-c-1.05/examples/cpp/xmlrpc_loop_server.cpp.gcc41 2006-01-09 00:36:06.000000000 +0100 -+++ xmlrpc-c-1.05/examples/cpp/xmlrpc_loop_server.cpp 2006-06-04 14:24:28.000000000 +0200 -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - using namespace std; - -@@ -55,7 +56,7 @@ main(int const, - ); - - while (true) { -- cout << "Waiting for next RPC..." << endl; -+ std::cout << "Waiting for next RPC..." << std::endl; - - myAbyssServer.runOnce(); - /* This waits for the next connection, accepts it, reads the ---- xmlrpc-c-1.05/include/xmlrpc-c/server_abyss.hpp.gcc41 2006-01-29 04:59:31.000000000 +0100 -+++ xmlrpc-c-1.05/include/xmlrpc-c/server_abyss.hpp 2006-06-04 14:22:36.000000000 +0200 -@@ -84,10 +84,10 @@ private: - TServer cServer; - - void -- serverAbyss::setAdditionalServerParms(constrOpt const& opt); -+ setAdditionalServerParms(constrOpt const& opt); - - void -- serverAbyss::initialize(constrOpt const& opt); -+ initialize(constrOpt const& opt); - }; - - diff --git a/xmlrpc-c-1.05-libtool.patch b/xmlrpc-c-1.05-libtool.patch deleted file mode 100644 index 8715531..0000000 --- a/xmlrpc-c-1.05-libtool.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- xmlrpc-c-1.05/tools/xml-rpc-api2cpp/Makefile.libtool 2005-09-23 04:17:35.000000000 +0200 -+++ xmlrpc-c-1.05/tools/xml-rpc-api2cpp/Makefile 2006-06-04 15:02:13.000000000 +0200 -@@ -22,11 +22,11 @@ LDFLAGS = $(CLIENT_LDFLAGS) - all: xml-rpc-api2cpp - - OBJECTS = \ -- xml-rpc-api2cpp.o \ -- DataType.o \ -- XmlRpcFunction.o \ -- XmlRpcClass.o \ -- SystemProxy.o \ -+ xml-rpc-api2cpp.lo \ -+ DataType.lo \ -+ XmlRpcFunction.lo \ -+ XmlRpcClass.lo \ -+ SystemProxy.lo \ - - xml-rpc-api2cpp: \ - $(OBJECTS) \ -@@ -38,7 +38,7 @@ xml-rpc-api2cpp: \ - $(LIBXMLRPC_UTIL) - $(LIBTOOL) --mode=link $(CXXLD) -o $@ $(LDFLAGS) $^ - --%.o:%.cpp -+%.lo:%.cpp - $(LIBTOOL) --mode=compile $(CXX) -c $(CXXFLAGS) $< - - # This Makefile.config dependency makes sure the symlinks get built before ---- xmlrpc-c-1.05/tools/xmlrpc/Makefile.libtool 2006-01-13 18:19:35.000000000 +0100 -+++ xmlrpc-c-1.05/tools/xmlrpc/Makefile 2006-06-04 15:00:48.000000000 +0200 -@@ -17,17 +17,17 @@ CFLAGS = $(CFLAGS_COMMON) $(INCLUDES) $( - - LDFLAGS = $(CLIENT_LDFLAGS) $(LADD) - --UTIL_OBJS = cmdline_parser.o getoptx.o casprintf.o -+UTIL_OBJS = cmdline_parser.lo getoptx.lo casprintf.lo - UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%) - - LIBS = $(LIBXMLRPC_CLIENT) $(LIBXMLRPC) $(LIBXMLRPC_UTIL) $(LIBXML) $(UTILS) - --XMLRPC_OBJS = xmlrpc.o dumpvalue.o -+XMLRPC_OBJS = xmlrpc.lo dumpvalue.lo - - xmlrpc: $(XMLRPC_OBJS) $(LIBS) - $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LDFLAGS) $^ - --%.o:%.c -+%.lo:%.c - $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< - - *.c: config.h ---- xmlrpc-c-1.05/tools/xmlrpc_transport/Makefile.libtool 2005-11-23 05:04:51.000000000 +0100 -+++ xmlrpc-c-1.05/tools/xmlrpc_transport/Makefile 2006-06-04 15:01:32.000000000 +0200 -@@ -17,15 +17,15 @@ CFLAGS = $(CFLAGS_COMMON) $(INCLUDES) $( - - LDFLAGS = $(CLIENT_LDFLAGS) $(LADD) - --UTIL_OBJS = cmdline_parser.o getoptx.o casprintf.o -+UTIL_OBJS = cmdline_parser.lo getoptx.lo casprintf.lo - UTILS = $(UTIL_OBJS:%=$(UTIL_DIR)/%) - - LIBS = $(LIBXMLRPC_CLIENT) $(LIBXMLRPC) $(LIBXML) $(LIBXMLRPC_UTIL) $(UTILS) - --xmlrpc_transport:%:%.o $(LIBS) -+xmlrpc_transport:%:%.lo $(LIBS) - $(LIBTOOL) --mode=link $(CCLD) -o $@ $(LDFLAGS) $^ - --%.o:%.c -+%.lo:%.c - $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< - - *.c: config.h diff --git a/xmlrpc-c-1.06.04-sizet.patch b/xmlrpc-c-1.06.04-sizet.patch new file mode 100644 index 0000000..67092bb --- /dev/null +++ b/xmlrpc-c-1.06.04-sizet.patch @@ -0,0 +1,146 @@ +2006-06-04 Enrico Scholz + + * fixed a lot of format strings which produce + + | warning: format '%d' expects type 'int', but argument 6 has type 'size_t' + + style warnings on x86_64 machines else + +--- xmlrpc-c-1.05/lib/libutil/memblock.c.sizet 2005-09-23 04:17:23.000000000 +0200 ++++ xmlrpc-c-1.05/lib/libutil/memblock.c 2006-06-04 19:02:10.000000000 +0200 +@@ -73,7 +73,7 @@ xmlrpc_mem_block_init(xmlrpc_env * + + blockP->_block = (void*) malloc(blockP->_allocated); + if (!blockP->_block) +- xmlrpc_faultf(envP, "Can't allocate %u-byte memory block", ++ xmlrpc_faultf(envP, "Can't allocate %zu-byte memory block", + blockP->_allocated); + } + +--- xmlrpc-c-1.05/src/xmlrpc_data.c.sizet 2006-01-03 07:48:59.000000000 +0100 ++++ xmlrpc-c-1.05/src/xmlrpc_data.c 2006-06-04 19:06:02.000000000 +0200 +@@ -288,7 +288,7 @@ xmlrpc_read_string(xmlrpc_env * + if (stringValue == NULL) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_INTERNAL_ERROR, "Unable to allocate space " +- "for %u-character string", length); ++ "for %zu-character string", length); + else { + memcpy(stringValue, contents, length); + stringValue[length] = '\0'; +@@ -419,7 +419,7 @@ xmlrpc_read_string_w(xmlrpc_env * co + if (stringValue == NULL) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_INTERNAL_ERROR, +- "Unable to allocate space for %u-byte string", ++ "Unable to allocate space for %zu-byte string", + length); + else { + memcpy(stringValue, wcontents, length * sizeof(wchar_t)); +@@ -466,7 +466,7 @@ xmlrpc_read_string_w_lp(xmlrpc_env * + if (stringValue == NULL) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_INTERNAL_ERROR, +- "Unable to allocate space for %u-byte string", ++ "Unable to allocate space for %zu-byte string", + size); + else { + memcpy(stringValue, wcontents, size * sizeof(wchar_t)); +@@ -523,7 +523,7 @@ xmlrpc_read_base64(xmlrpc_env * + byteStringValue = malloc(size); + if (byteStringValue == NULL) + xmlrpc_env_set_fault_formatted( +- envP, XMLRPC_INTERNAL_ERROR, "Unable to allocate %u bytes " ++ envP, XMLRPC_INTERNAL_ERROR, "Unable to allocate %zu bytes " + "for byte string.", size); + else { + memcpy(byteStringValue, contents, size); +--- xmlrpc-c-1.05/src/xmlrpc_datetime.c.sizet 2006-01-03 04:39:22.000000000 +0100 ++++ xmlrpc-c-1.05/src/xmlrpc_datetime.c 2006-06-04 19:06:37.000000000 +0200 +@@ -331,7 +331,7 @@ validateFormat(xmlrpc_env * const envP, + const char * const t) { + + if (strlen(t) != 17) +- xmlrpc_faultf(envP, "%u characters instead of 15.", strlen(t)); ++ xmlrpc_faultf(envP, "%zu characters instead of 15.", strlen(t)); + else if (t[8] != 'T') + xmlrpc_faultf(envP, "9th character is '%c', not 'T'", t[8]); + else { +--- xmlrpc-c-1.05/src/xmlrpc_parse.c.sizet 2006-03-23 00:48:31.000000000 +0100 ++++ xmlrpc-c-1.05/src/xmlrpc_parse.c 2006-06-04 19:10:00.000000000 +0200 +@@ -57,7 +57,7 @@ + do \ + if (xml_element_children_size(elem) != (count)) \ + XMLRPC_FAIL3(env, XMLRPC_PARSE_ERROR, \ +- "Expected <%s> to have %d children, found %d", \ ++ "Expected <%s> to have %d children, found %zd", \ + xml_element_name(elem), (count), \ + xml_element_children_size(elem)); \ + while (0) +@@ -595,7 +595,7 @@ parseMethodNameElement(xmlrpc_env * con + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_PARSE_ERROR, + "A element should not have children. " +- "This one has %u of them.", xml_element_children_size(nameElemP)); ++ "This one has %zu of them.", xml_element_children_size(nameElemP)); + else { + const char * const cdata = xml_element_cdata(nameElemP); + +@@ -654,7 +654,7 @@ parseCallChildren(xmlrpc_env * const + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_PARSE_ERROR, + " has extraneous children, other than " +- " and . Total child count = %u", ++ " and . Total child count = %zu", + callChildCount); + + if (envP->fault_occurred) +@@ -697,7 +697,7 @@ xmlrpc_parse_call(xmlrpc_env * const + if (xmlLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID)) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_LIMIT_EXCEEDED_ERROR, +- "XML-RPC request too large. Max allowed is %u bytes", ++ "XML-RPC request too large. Max allowed is %zu bytes", + xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID)); + else { + xml_element * callElemP; +@@ -773,7 +773,7 @@ parseFaultElement(xmlrpc_env * co + if (xml_element_children_size(faultElement) != 1) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_PARSE_ERROR, +- " element should have 1 child, but it has %u.", ++ " element should have 1 child, but it has %zu.", + xml_element_children_size(faultElement)); + else { + xml_element * const faultValueP = +@@ -869,7 +869,7 @@ parseMethodResponseElt(xmlrpc_env * + } else + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_PARSE_ERROR, +- " has %u children, should have 1.", ++ " has %zu children, should have 1.", + xml_element_children_size(methodResponseEltP)); + } + +@@ -908,8 +908,8 @@ xmlrpc_parse_response2(xmlrpc_env * c + if (xmlDataLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID)) + xmlrpc_env_set_fault_formatted( + envP, XMLRPC_LIMIT_EXCEEDED_ERROR, +- "XML-RPC response too large. Our limit is %u characters. " +- "We got %u characters", ++ "XML-RPC response too large. Our limit is %zu characters. " ++ "We got %zu characters", + xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID), xmlDataLen); + else { + xml_parse(envP, xmlData, xmlDataLen, &response); +--- xmlrpc-c-1.05/src/xmlrpc_server_abyss.c.sizet 2006-03-25 20:15:31.000000000 +0100 ++++ xmlrpc-c-1.05/src/xmlrpc_server_abyss.c 2006-06-04 19:11:24.000000000 +0200 +@@ -348,7 +348,7 @@ processCall(TSession * const abys + if (contentSize > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID)) + xmlrpc_env_set_fault_formatted( + &env, XMLRPC_LIMIT_EXCEEDED_ERROR, +- "XML-RPC request too large (%d bytes)", contentSize); ++ "XML-RPC request too large (%zd bytes)", contentSize); + else { + xmlrpc_mem_block *body; + /* Read XML data off the wire. */ diff --git a/xmlrpc-c.spec b/xmlrpc-c.spec index 3083d23..cae08f6 100644 --- a/xmlrpc-c.spec +++ b/xmlrpc-c.spec @@ -4,17 +4,22 @@ Summary: A lightweight RPC library based on XML and HTTP Name: xmlrpc-c -Version: 1.05 -Release: %release_func 1 +Version: 1.06.04 +Release: %release_func 2 License: BSD/PSF -- see COPYING Group: System Environment/Libraries URL: http://xmlrpc-c.sourceforge.net/ Source0: http://dl.sourceforge.net/sourceforge/xmlrpc-c/%name-%version.tgz -Patch0: xmlrpc-c-1.04-libxml2.patch -Patch2: xmlrpc-c-1.05-gcc41.patch Patch3: xmlrpc-c-1.05-typo.patch -Patch4: xmlrpc-c-1.05-libtool.patch -Patch5: xmlrpc-c-1.05-buildsys.patch +Patch6: xmlrpc-c-1.06.04-sizet.patch +Patch100: http://ensc.de/xmlrpc-c/0003-make-cmake-transition.txt +Patch101: http://ensc.de/xmlrpc-c/0004-added-multilib-stuff.txt +Patch102: http://ensc.de/xmlrpc-c/0005-added-xmlrpc-c-config-wrapper.txt +Patch103: http://ensc.de/xmlrpc-c/0006-added-some-tools-directories.txt +Patch104: http://ensc.de/xmlrpc-c/0007-implemented-testsuite.txt +Patch105: http://ensc.de/xmlrpc-c/0008-use-a-macro-to-set-the-linker-flags-for-executables.txt +Patch106: http://ensc.de/xmlrpc-c/0009-Install-xmlrpc-c-config-and-man-pages-added-mandir-variable.txt +Patch107: http://ensc.de/xmlrpc-c/0010-install-libxmlrpc_util.so-and-set-version-information.txt BuildRoot: %_tmppath/%name-%version-%release-root #BuildRequires: w3c-libwww-devel BuildRequires: curl-devel libxml2-devel @@ -24,6 +29,7 @@ Summary: Development files for xmlrpc-c based programs Group: Development/Libraries Requires: %name = %version-%release Requires: libxml2-devel curl-devel +Requires: pkgconfig %package apps Summary: Sample XML-RPC applications @@ -54,45 +60,41 @@ This package contains some handy XML-RPC demo applications. %prep %setup -q -%patch0 -p1 -b .libxml2 -%patch2 -p1 -b .gcc41 %patch3 -p1 -b .typo -%patch4 -p1 -b .libtool -%patch5 -p1 -b .buildsys +%patch6 -p1 -b .sizet + +cat %PATCH100 %PATCH101 %PATCH102 %PATCH103 \ + %PATCH104 %PATCH105 %PATCH106 %PATCH107 | patch -p1 + +sed -i -e '/\(chan\|init\.c\)/d' lib/abyss/src/CMakeLists.txt +sed -i -e 's!xmlrpc_decompose.c!xmlrpc_builddecomp.c!g; + s!xmlrpc_build.c!!g;' src/CMakeLists.txt +sed -i -e 's! abyss.c!!g;' src/test/CMakeLists.txt ## not needed... rm doc/{INSTALL,configure_doc} %build -%configure --enable-libxml2-backend --disable-libwww-client - -sed -i -e 's!-L/usr/%_lib\s\s*!!g; - s!-L/usr/%_lib"!"!g; - s!\(the_\S*rpath=\)\"..*\"!\1!g' xmlrpc-c-config - -%__make \ - CFLAGS_COMMON="-DNDEBUG -fno-common $RPM_OPT_FLAGS" \ - CXXFLAGS_COMMON="-DNDEBUG $RPM_OPT_FLAGS" \ - #%{?_smp_mflags} +mkdir fedora +cd fedora +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +cmake .. \ + -D_lib:STRING=%_lib \ + -DMUST_BUILD_CURL_CLIENT:BOOL=ON \ + -DMUST_BUILD_LIBWWW_CLIENT:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX:PATH=%_prefix \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_SKIP_RPATH:BOOL=ON +make VERBOSE=1 %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -%__make DESTDIR="$RPM_BUILD_ROOT" install - -%__install -d -m0755 $RPM_BUILD_ROOT%_mandir/man1 - -F=tools/xml-rpc-api2cpp/xml-rpc-api2cpp -./libtool --mode=install %__install -p -m755 $F $RPM_BUILD_ROOT/%_bindir/ -%__install -p -m0644 $F.1 $RPM_BUILD_ROOT%_mandir/man1/ - -for i in $RPM_BUILD_ROOT%_libdir/*.a; do - test ! -e "${i%%.a}.so" || rm -f $i -done - -rm -f $RPM_BUILD_ROOT%_libdir/*.la - +cd fedora +make install DESTDIR=$RPM_BUILD_ROOT + %clean rm -rf $RPM_BUILD_ROOT @@ -112,6 +114,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %_bindir/xmlrpc-c-config %_includedir +%_libdir/pkgconfig/*.pc %_libdir/*.so @@ -126,6 +129,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Sep 16 2006 Enrico Scholz - 1.06.04-1 +- updated to 1.06.04 +- patched the broken buildsystem +- disabled libwww backend explicitely + * Sun Jun 4 2006 Enrico Scholz - 1.05-1 - updated to 1.05 - updated patches