Commit 4b6f5d68 authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.7.0

parent e43c9540
......@@ -7,6 +7,7 @@ DISTCLEANFILES = \
dbus-1.pc
EXTRA_DIST = \
autogen.sh \
HACKING \
dbus-1.pc.in \
cleanup-man-pages.sh \
......@@ -14,6 +15,7 @@ EXTRA_DIST = \
NEWS.pre-1-0 \
ChangeLog.pre-1-2 \
NEWS.pre-1-2 \
README.valgrind \
README.win \
README.wince \
README.cygwin \
......@@ -26,6 +28,7 @@ update-authors:
git shortlog -s -e | cut -c 8- | sort > AUTHORS
DISTCHECK_CONFIGURE_FLAGS = \
--enable-xml-docs \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
......
......@@ -267,7 +267,8 @@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@
DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@
DBUS_PREFIX = @DBUS_PREFIX@
DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@
DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@
DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@
DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
......@@ -326,7 +327,6 @@ LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
......@@ -443,6 +443,7 @@ DISTCLEANFILES = \
dbus-1.pc
EXTRA_DIST = \
autogen.sh \
HACKING \
dbus-1.pc.in \
cleanup-man-pages.sh \
......@@ -450,6 +451,7 @@ EXTRA_DIST = \
NEWS.pre-1-0 \
ChangeLog.pre-1-2 \
NEWS.pre-1-2 \
README.valgrind \
README.win \
README.wince \
README.cygwin \
......@@ -457,6 +459,7 @@ EXTRA_DIST = \
cmake
DISTCHECK_CONFIGURE_FLAGS = \
--enable-xml-docs \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
......
D-Bus 1.7.0 (2013-02-22)
==
The "Disingenuous Assertions" release.
This is a new development release, starting the 1.7.x branch. D-Bus 1.6
remains the recommended version for long-term-supported distributions
or the upcoming GNOME 3.8 release.
Build-time configuration changes:
• The --with-dbus-session-bus-default-address configure option is no longer
supported. Use the new --with-dbus-session-bus-connect-address and
--with-dbus-session-bus-listen-address options instead. On Windows, you
usually want them to have the same argument; on Unix, the defaults are
usually correct.
• Similarly, the DBUS_SESSION_BUS_DEFAULT_ADDRESS CMake variable is no longer
supported; use the new DBUS_SESSION_BUS_LISTEN_ADDRESS and
DBUS_SESSION_BUS_CONNECT_ADDRESS variables instead.
• cmake/cross-compile.sh has been removed. Instead, please use a
cross-toolchain file (-DCMAKE_TOOLCHAIN_FILE) as documented at
<http://www.vtk.org/Wiki/CMake_Cross_Compiling>; or use Autotools
as documented in "info automake Cross-Compilation", and set
PKG_CONFIG_PATH appropriately.
Requirements:
• Man pages now require xmlto (or either xmlto or meinproc, if using CMake).
• man2html is no longer used.
Enhancements:
• D-Bus Specification 0.20
· actually say that /org/freedesktop/DBus is the object that
implements o.fd.DBus (fd.o #51865, Colin Walters)
· various reorganisation for better clarity (fd.o #38252, Simon McVittie)
· stop claiming that all basic types work just like INT32 (strings don't!)
• The "source code" for the man pages is now Docbook XML, eliminating
the outdated duplicate copies used when building with CMake.
(fd.o #59805; Ralf Habacker, Simon McVittie)
Fixes:
• In the activation helper, when compiled for tests, do not reset the system
bus address, fixing the regression tests. (fd.o #52202, Simon)
• Fix building with Valgrind 3.8, at the cost of causing harmless warnings
with Valgrind 3.6 on some compilers (fd.o #55932, Arun Raghavan)
• Merge <servicehelper> from system-local.conf if necessary (fd.o #51560,
Krzysztof Konopko)
• Under CMake, prefer xmlto over meinproc (fd.o #59733, Ralf Habacker)
• Stop duplicating CMake's own logic to find libexpat
(fd.o #59733, Ralf Habacker)
• Don't assume CMake host and build system are the same (fd.o #59733,
Ralf Habacker)
• Avoid deprecation warnings for GLib 2.35 (fd.o #59971, Simon McVittie)
• Unix-specific:
· Check for functions in libpthread correctly, fixing compilation on
(at least) OpenBSD (fd.o #47239, Simon)
· Don't leak temporary fds pointing to /dev/null (fd.o #56927,
Michel HERMIER)
· Update sd-daemon.[ch] from systemd (fd.o #60681)
· Add partial support for QNX (fd.o #60339, fd.o #61176; Matt Fischer)
• Windows-specific:
· The default session bus listening and connecting address is now
"autolaunch:", which makes D-Bus on Windows interoperate with itself
and GDBus "out of the box". Use the configure options and cmake variables
described above if you require a different autolaunch scope.
(fd.o #38201, Simon McVittie)
· Avoid a CMake warning under Cygwin (fd.o #59401, Ralf Habacker)
• Create session.d, system.d directories under CMake (fd.o #41319,
Ralf Habacker)
D-Bus 1.6.8 (2012-09-28)
==
......
Running D-Bus clients with Valgrind
====
When running programs using libdbus in Valgrind, some special care needs to be
taken so as to avoid incorrect detection of leaks in libdbus. To avoid these
false positives, do the following:
* Grab a copy of the D-Bus source code
* Run configure with the --enable-developer and --with-valgrind options
* Run make
* Either make sure your code calls dbus_shutdown() (at least while running in
Valgrind) or set DBUS_MESSAGE_CACHE=0 in your environment
* Run Valgrind on your program with the /path/to/dbus/source/dbus/.libs in your
LD_LIBRARY_PATH
Your Valgrind log should now be free of any (spurious) libdbus-related leaks.
For the curious, the DBUS_MESSAGE_CACHE=0 is required because by
default, libdbus uses a recyclable pool of message structs. These help
performance a bit.
......@@ -14,8 +14,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=dbus
TEST_TYPE=-f
FILE=dbus-1.pc.in
DIE=0
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
echo "Activating pre-commit hook."
cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
chmod -c +x .git/hooks/pre-commit
fi
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
# If the user hasn't explicitly chosen an Automake version, use 1.11. This is
# the earliest version that gives us silent rules.
if test -z "$AUTOMAKE"; then
AUTOMAKE=automake-1.11
ACLOCAL=aclocal-1.11
fi
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
ACLOCAL=aclocal
}
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
LIBTOOLIZE=`which libtoolize`
if ! test -f $LIBTOOLIZE; then
LIBTOOLIZE=`which glibtoolize`
fi
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtoolize installed to compile $PROJECT."
echo "Install the libtool package from ftp.gnu.org or a mirror."
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
$LIBTOOLIZE --copy --force
$ACLOCAL -I m4 $ACLOCAL_FLAGS
## optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
$AUTOMAKE -a $am_opt
autoconf || echo "autoconf failed - version 2.5x is probably required"
cd $ORIGDIR
if test x"$NOCONFIGURE" = x; then
run_configure=true
for arg in $*; do
case $arg in
--no-configure)
run_configure=false
;;
*)
;;
esac
done
else
run_configure=false
fi
if $run_configure; then
$srcdir/configure --enable-developer --config-cache "$@"
echo
echo "Now type 'make' to compile $PROJECT."
else
echo
echo "Now run 'configure' and 'make' to compile $PROJECT."
fi
......@@ -331,7 +331,8 @@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@
DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@
DBUS_PREFIX = @DBUS_PREFIX@
DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@
DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@
DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@
DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
......@@ -390,7 +391,6 @@ LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
......
......@@ -154,11 +154,11 @@ clear_environment (DBusError *error)
"could not clear environment\n");
return FALSE;
}
#endif
/* Ensure the bus is set to system */
_dbus_setenv ("DBUS_STARTER_ADDRESS", DBUS_SYSTEM_BUS_DEFAULT_ADDRESS);
_dbus_setenv ("DBUS_STARTER_BUS_TYPE", "system");
#endif
return TRUE;
}
......
......@@ -323,7 +323,14 @@ merge_included (BusConfigParser *parser,
parser->pidfile = included->pidfile;
included->pidfile = NULL;
}
if (included->servicehelper != NULL)
{
dbus_free (parser->servicehelper);
parser->servicehelper = included->servicehelper;
included->servicehelper = NULL;
}
while ((link = _dbus_list_pop_first_link (&included->listen_on)))
_dbus_list_append_link (&parser->listen_on, link);
......
......@@ -22,11 +22,15 @@
*
*/
/* Be careful, this file is not Linux-only: QNX also uses it */
#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
/* QNX's inotify is broken, and requires stdint.h to be manually included first */
#include <stdint.h>
#include <sys/inotify.h>
#include <sys/types.h>
#include <signal.h>
......
......@@ -12,7 +12,7 @@
the behavior of child processes. -->
<keep_umask/>
<listen>@DBUS_SESSION_BUS_DEFAULT_ADDRESS@</listen>
<listen>@DBUS_SESSION_BUS_LISTEN_ADDRESS@</listen>
<standard_session_servicedirs />
......
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
# we do not need to have WIN32 defined
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project(dbus)
# we need to be up to date
......@@ -6,8 +12,6 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
# detect version
include(MacrosAutotools)
......@@ -95,7 +99,7 @@ option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
if (DBUS_USE_EXPAT)
find_package(LibExpat)
find_package(EXPAT)
else ()
find_package(LibXml2)
endif ()
......@@ -295,14 +299,14 @@ if("${sysname}" MATCHES ".*SOLARIS.*")
endif("${sysname}" MATCHES ".*SOLARIS.*")
#AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
if(NOT LIBXML2_FOUND AND NOT EXPAT_FOUND)
message(FATAL "Neither expat nor libxml2 found!")
endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
endif(NOT LIBXML2_FOUND AND NOT EXPAT_FOUND)
if(DBUS_USE_EXPAT)
SET(XML_LIB "Expat")
SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES})
SET(XML_INCLUDE_DIR ${LIBEXPAT_INCLUDE_DIR})
SET(XML_LIBRARY ${EXPAT_LIBRARIES})
SET(XML_INCLUDE_DIR ${EXPAT_INCLUDE_DIR})
else(DBUS_USE_EXPAT)
SET(XML_LIB "LibXML2")
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
......@@ -431,18 +435,27 @@ endif (WIN32)
set (DBUS_USER )
# This won't work on Windows. It's not meant to - the system bus is
# meaningless on Windows anyway.
#
# This has to be suitable for hard-coding in client libraries as well as
# in the dbus-daemon's configuration, so it has to be valid to listen on
# and also to connect to. If this ever changes, it'll need to be split into
# two variables, one for the listening address and one for the connecting
# address.
set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket" CACHE STRING "system bus default address")
if (WIN32)
set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "system bus default address")
set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "session bus default address")
set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address")
set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
set (DBUS_SYSTEM_CONFIG_FILE "etc/dbus-1/system.conf")
set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf")
# bus-test expects a non empty string
set (DBUS_USER "Administrator")
else (WIN32)
set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:tmpdir=" CACHE STRING "system bus default address")
set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "unix:path=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default address")
set (DBUS_SESSION_BUS_LISTEN_ADDRESS "unix:tmpdir=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default listening address")
set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
set (sysconfdir "")
set (configdir ${sysconfdir}/dbus-1 )
set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf)
......@@ -562,7 +575,8 @@ message(" Using XML parser: ${XML_LIB} "
message(" Daemon executable name: ${DBUS_DAEMON_NAME}")
if (WIN32)
message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ")
message(" Session bus address: ${DBUS_SESSION_BUS_DEFAULT_ADDRESS} ")
message(" Session bus listens on: ${DBUS_SESSION_BUS_LISTEN_ADDRESS} ")
message(" Session clients connect to: ${DBUS_SESSION_BUS_CONNECT_ADDRESS} ")
else (WIN32)
#message(" Init scripts style: ${with_init_scripts} ")
#message(" Abstract socket names: ${have_abstract_sockets} ")
......
......@@ -12,7 +12,10 @@ set (config_DATA
# config files for installation
CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
# copy services for local daemon start to local service dir data/dbus-1/services
SET (SERVICE_FILES test/data/valid-service-files)
......
......@@ -15,8 +15,8 @@
#cmakedefine DBUS_SESSION_CONFIG_FILE "@DBUS_SESSION_CONFIG_FILE@"
#cmakedefine DBUS_DAEMON_NAME "@DBUS_DAEMON_NAME@"
#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_SESSION_BUS_CONNECT_ADDRESS "@DBUS_SESSION_BUS_CONNECT_ADDRESS@"
#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@"
#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@"
#cmakedefine PACKAGE "@PACKAGE@"
/* Version number of package */
......
#!/bin/sh
#
# cross compile script for cmake
#
# initial written by Fridrich Strba
# refactored to debian/lenny by Ralf Habacker
#
# reported to work at least on debian/lenny
#
if test -f /usr/bin/i686-pc-mingw32-gcc; then
cross_cc=i686-pc-mingw32
elif test -f /usr/bin/i586-mingw32msvc-gcc; then
cross_cc=i586-mingw32msvc
else
echo "could not determine mingw cross compiler"
exit 1
fi
if test -d ~/$cross_cc; then
cross_root=~/$cross_cc
elif test -d /usr/$cross_cc/sys-root/mingw; then
cross_root=/usr/$cross_cc/sys-root/mingw
elif test -d /usr/$cross_cc/lib; then
cross_root=/usr/$cross_cc
else
echo "could not determine mingw cross compiler sdk"
exit 1
fi
if ! TEMP=`mktemp --tmpdir -d dbus-cross-compile.XXXXXX`; then
echo "mktemp failed, try with coreutils 6.10 or later?" >&2
exit 1
fi
# make cmake happy
export TEMP
HOST_CC=gcc; export HOST_CC;
if test -d $cross_root/lib/pkgconfig; then
PKG_CONFIG_PATH="$cross_root/lib/pkgconfig:$cross_root/share/pkgconfig"; export PKG_CONFIG_PATH;
fi
if test -d "$MINGW32_CLASSPATH" || test -f "$cross_root/share/java/libgcj.jar"; then
CLASSPATH="$CLASSPATH:${MINGW32_CLASSPATH:-$cross_root/share/java/libgcj.jar:$cross_root/share/java/libgcj-tools.jar}"; export CLASSPATH;
fi
_PREFIX="/usr/bin/$cross_cc-";
for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do
x=`echo $i|sed "s,${_PREFIX},,"|sed "s,\.awk*,,"|tr "a-z+-" "A-ZX_"`;
declare -x $x="$i" ; export $x;
done;
unset _PREFIX;
CC="${MINGW32_CC:-$cross_cc-gcc}"; export CC;
CFLAGS="${MINGW32_CFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CFLAGS;
LDFLAGS="${MINGW32_LDFLAGS:--Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a}"; export LDFLAGS;
if [ -x "/usr/bin/$cross_cc-g++" ]; then
CXX="${MINGW32_CXX:-$cross_cc-g++}"; export CXX;
CXXFLAGS="${MINGW32_CXXFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CXXFLAGS;
else
CXX=; export CXX;
ac_cv_prog_CXX=no; export ac_cv_prog_CXX;
CXXFLAGS=; export CXXFLAGS;
fi;
for i in `ls $cross_root/bin/*|grep -- "-config$"` ; do
x=`basename $i|tr "a-z+-" "A-ZX_"|sed "s,\.,,"`;
declare -x $x="$i" ; export $x;
done;
unset x i ;
if ! test -f "$cross_root/lib/libexpat.dll.a"; then
(cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-bin.zip)
(cd $TEMP && wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-lib.zip)
(cd $cross_root && unzip -x $TMP/expat-2.0.1-bin.zip)
(cd $cross_root && unzip -x $TMP/expat-2.0.1-lib.zip)
fi
if test -f "$cross_root/lib/libexpat.dll.a"; then
xml_library=-DDBUS_USE_EXPAT=On -DLIBEXPAT_INCLUDE_DIR:PATH=$cross_root/include -DLIBEXPAT_LIBRARIES:PATH=$cross_root/lib/libexpat.dll.a
else
echo "could not find a cross compile xml libraray"
exit 1
fi
cmake \
-DCMAKE_SYSTEM_NAME="Windows" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX:PATH=$cross_root \
-DCMAKE_INSTALL_LIBDIR:PATH=$cross_root/lib \
-DINCLUDE_INSTALL_DIR:PATH=$cross_root/include \
-DLIB_INSTALL_DIR:PATH=$cross_root/lib \
-DSYSCONF_INSTALL_DIR:PATH=$cross_root/etc \
-DSHARE_INSTALL_PREFIX:PATH=$cross_root/share \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_C_COMPILER="/usr/bin/$cross_cc-gcc" \
-DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \
-DCMAKE_FIND_ROOT_PATH="$cross_root" \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \
-DCMAKE_FIND_ROOT_PATH="$cross_root" \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
$xml_library \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
$*
......@@ -2,7 +2,7 @@
@echo off
:: session bus address
set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_DEFAULT_ADDRESS@
set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_CONNECT_ADDRESS@
:: system bus address
set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
\ No newline at end of file
set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
......@@ -23,7 +23,12 @@ if (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE)
OPTION(DBUS_ENABLE_XML_DOCS "build XML documentation (requires xmlto or meinproc4)" ON)
endif (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE)
if (MEINPROC4_EXECUTABLE)
if (XMLTO_EXECUTABLE)
set (DOCBOOK_GENERATOR_NAME "xmlto" PARENT_SCOPE)
set(DBUS_XML_DOCS_ENABLED 1)
set(MEINPROC4_EXECUTABLE 0)
MESSAGE(STATUS "xmlto docbook generator found")
elseif (MEINPROC4_EXECUTABLE)
set(DOCBOOK_GENERATOR_NAME "meinproc4" PARENT_SCOPE)
set(DBUS_XML_DOCS_ENABLED 1)
if(WIN32)
......@@ -33,38 +38,43 @@ if (MEINPROC4_EXECUTABLE)
set(_meinproc_install_path ${CMAKE_INSTALL_PREFIX})
endif(WIN32)
set(STYLESHEET "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl")
endif (MEINPROC4_EXECUTABLE)
if (XMLTO_EXECUTABLE)
set (DOCBOOK_GENERATOR_NAME "xmlto" PARENT_SCOPE)
set(DBUS_XML_DOCS_ENABLED 1)
MESSAGE(STATUS "xmlto docbook generator found")
endif (XMLTO_EXECUTABLE)
endif ()
if (DBUS_ENABLE_XML_DOCS)
macro (DOCBOOK _sources _options)
macro (DOCBOOK _sources _format)
get_filename_component(_infile ${_sources} ABSOLUTE)
get_filename_component(_basename ${_infile} NAME_WE)
set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.html)
get_filename_component(_name ${_infile} NAME)
if (${_format} STREQUAL "man")
string(REPLACE ".xml" "" _outname ${_name})
set(STYLESHEET "${DOCBOOKXSL_DIR}/manpages/docbook.xsl")
else()
string(REPLACE ".xml" ".html" _outname ${_name})
set(STYLESHEET "${DOCBOOKXSL_DIR}/html/docbook.xsl")
endif ()
set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_outname})
if (EXISTS ${_sources})
if (MEINPROC4_EXECUTABLE)
ADD_CUSTOM_TARGET(${_basename}.html ALL
${MEINPROC4_EXECUTABLE} --stylesheet ${STYLESHEET} -o ${_outfile} ${_infile}
DEPENDS ${_infile}
ADD_CUSTOM_TARGET(${_outname} ALL
${MEINPROC4_EXECUTABLE} --stylesheet ${STYLESHEET} -o ${_outfile} ${_infile}
DEPENDS ${_infile}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif ()
if (XMLTO_EXECUTABLE)
ADD_CUSTOM_TARGET(${_basename}.html ALL
${XMLTO_EXECUTABLE} -vv ${_options} ${_infile}
DEPENDS ${_infile}
ADD_CUSTOM_TARGET(${_outname} ALL
${XMLTO_EXECUTABLE} -vv ${_format} ${_infile}
DEPENDS ${_infile}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif ()
install(FILES ${_outfile} DESTINATION share/doc/dbus)
if (${_format} STREQUAL "man")
install(FILES ${_outfile} DESTINATION share/man/man1)
else ()
install(FILES ${_outfile} DESTINATION share/doc/dbus)
endif ()
else ()
MESSAGE(STATUS "skipping xml doc generating for ${_infile}, file not found")
endif ()
......@@ -98,11 +108,26 @@ DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-test-plan.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-tutorial.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-specification.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-faq.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/bus/dbus-daemon.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-monitor.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-send.xml html-nochunks)
DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-launch.xml html-nochunks)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-cleanup-sockets.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-daemon.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-launch.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-monitor.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-send.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml)
configure_file(${CMAKE_SOURCE_DIR}/../doc/dbus-uuidgen.1.xml.in ${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-cleanup-sockets.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-launch.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-monitor.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-send.1.xml html-nochunks)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-uuidgen.1.xml html-nochunks)
if (UNIX)
DOCBOOK(${CMAKE_BINARY_DIR}/doc/dbus-daemon.1.xml man)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-monitor.1.xml man)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-send.1.xml man)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-launch.1.xml man)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-uuidgen.1.xml man)
DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-cleanup-sockets.1.xml man)
endif()
#
# handle html index file
#
......
# - Try to find LIBEXPAT
# Once done this will define
#
# LIBEXPAT_FOUND - system has LIBEXPAT
# LIBEXPAT_INCLUDE_DIR - the LIBEXPAT include directory
# LIBEXPAT_LIBRARIES - the libraries needed to use LIBEXPAT
# LIBEXPAT_DEFINITIONS - Compiler switches required for using LIBEXPAT
if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES)
# in cache already
SET(LIBEXPAT_FOUND TRUE)
<