Commit graph

39 commits

Author SHA1 Message Date
Patrick Ohly
b878a7d07f autotools: SYNCEVOLUTION_CFLAGS not set correctly for in-tree build
SYNCEVOLUTION_CFLAGS was set to "." when compiling in the source
tree, because then $builddir="" and $srcdir=".", which was unexpected
(and obviously untested). Failed later, fixed now.
2010-12-02 21:00:58 +01:00
Patrick Ohly
1c36e84082 autotools: support external backends by setting SYNCEVOLUTION_CFLAGS/LIBS
Additional backends can now count on SYNCEVOLUTION_CFLAGS/LIBS to find
the "syncevo" header files and libsyncevolution.la. The internal backends
still hard-code these paths (might be changed later).
2010-12-01 12:32:49 +01:00
Patrick Ohly
a7e24bb667 libical: allow using it without libecal
This patch distinguished between having libecal and having
libical. Previously libical could not be used without libecal.

Whoever detects libecal also must mark libical as available (which is
implied, because libecal uses libical).
2010-12-01 12:32:45 +01:00
Patrick Ohly
d869534923 autotools: added missing quotation marks
if test $enable_dbus_timeout_hack = "yes"
triggered a shell error when the variable wasn't set at all.
Need quotation marks here.
2010-10-01 14:28:44 +02:00
Patrick Ohly
9286d914c0 EDS: workaround for D-Bus method timeouts (BMC #4026)
libecal/ebook implementation based on D-Bus (Evolution >= 2.30)
inevitably will run into D-Bus timeouts as the amount of data
increases.

This patch moves an earlier hack written for Maemo into the core
code and enables it by default, if the EDS backends are active.
It works by intercepting dbus_connection_send_with_reply()
and substituting timeout_milliseconds==-1 ("default timeout
of 25 seconds") with timeout_milliseconds=INT_MAX ("no timeout").

Setting SYNCEVOLUTION_DBUS_TIMEOUT to number of milliseconds
allows controlling the final timeout value.
2010-09-03 15:40:05 +02:00
Patrick Ohly
b5b48be35a autotools: allow setting more AC_WITH_QT() options
Add to $qt_config to extend the CONFIG variable that is passed to
qmake. Add new lines(!) to $qt_misc to add arbitrary lines.

Example:
qt_config="$qt_config +mobility"
qt_misc="$qt_misc
MOBILITY += contacts versit"
2010-07-15 15:55:49 +02:00
Patrick Ohly
0ea574f1de autotools: added --enable-gnome-keyring (MBC #3557)
Using the GNOME keyring should be optional. Right now it is always on when
found.

--enable-gnome-keyring: fail if not available or invalid value given
--disable-gnome-keyring: disable, even if found
unset: use if found
2010-06-30 10:39:05 +02:00
Patrick Ohly
5c06549c7a Qt support: use Autotroll to determine right compile flags
Autotroll (http://tsunanet.net/autotroll/) allows configure to
determine the right compile flags needed to access Qt header files
and libraries.

SyncEvolution backends can append new Qt modules to the
"need_qt_modules" variable in the configure stub. If set, configure
will call AT_WITH_QT().

Excluding the GUI part of Qt is currently hard-coded. Enable it again
with "need_qt_modules=$need_qt_modules +gui" if necessary.
2010-06-30 10:38:11 +02:00
Zhu, Yongsheng
3c307b04dd Doc: add '--enable-doc' option and generate D-Bus API doc(MBC #1745)
'--enable-doc' configure option is newly added to control
generation of API documentation for backend public API
and D-Bus API. The default value is 'no'.

D-Bus API html documentation could be generated and all
pages(currently 3 docbook files) are merged into one single
html page called 'syncevo-dbus-api-doc.html'. To dynamically
generate 'version' of syncevolution into the html page, a placeholder
'##VERSION##' is used and changed in the generation.
2010-06-08 17:20:14 +02:00
Patrick Ohly
a2b1eb714a autotools: NSS is not an absolute requirement
When neither glib nor NSS are found, compilation continues
without SHA256 support. But the configure script aborted.
2010-03-24 14:50:01 +01:00
Patrick Ohly
4d127d692c autotools: --disable-core --enable-gui => build only sync-ui and its D-Bus lib
The sync-ui doesn't have a hard compile dependency on syncevo-dbus-server,
although it obviously won't run well without it. The new --disable-core
option can be used to compile just the sync-ui and the D-Bus wrapper lib
that it depends on.

Translations are generated when sync-ui and syncevo-dbus-server
are enabled, because both depend on the same translation files.

For the situation that sync-ui needs to include syerror.h from a
bundled Synthesis source, but libsynthesis itself is not built,
a special src/synthesis-includes directory is entered and produces
the necessary files by invoking the right target in the Synthesis
build dir. Because of that, enough packages must be installed to
configure the Synthesis engine even when only building the UI.
2010-03-23 19:04:06 +01:00
Patrick Ohly
ad4e3e3e62 autotools: fixed check for glib > 2.16
Must use a separate name (GLIB216 instead of GLIB),
otherwise the second test won't really run. Also the
quoting was wrong.
2010-02-09 21:16:24 +01:00
Patrick Ohly
e4f2f4bcec SHA-256: use glib or Mozilla NSS
Stronger hash algorithms are necessary for the identification of
file content via a hash value (same approach as in git). SHA-256
is taken from glib if glib is already a SyncEvolution dependency
for other reasons, otherwise the configure script looks for
Mozilla NSS.

Another candidate is libgcrypt, but there's no code for that yet.

All of these libraries are LGPL or more liberal, so they don't
impose any additional requirements on users of SyncEvolution,
in contrast to OpenSSL (advertisement clause!).
2010-02-09 09:33:53 +01:00
Patrick Ohly
06d17572c5 autotools: build GNOME Bluetooth panel plugin (MB #7089)
The GNOME Bluetooth panel plugin needs to be installed into
the location used by the system. We guess what that location might be by
installing into `pkg-config --variable=libdir gnome-bluetooth-1.0`/plugins.

Because this location might not be writable, compiling the plugin is
off by default. It can be enabled with --enable-gnome-bluetooth-panel-plugin
which depends on the libgnome-bluetooth-dev files.

Shared libraries must be enabled when enabling the plugin. Not currently
checked by configure.
2010-02-04 16:33:29 +01:00
Patrick Ohly
a3574c27e2 XML config: use configuration composed from fragments (MB #7712)
This patch replaces src/syncclient_sample_config.xml with a
combination of src/syncevo/configs/syncevolution.xml and the
config fragments that are shared with Synthesis upstream.

These fragments are installed in /usr/share/syncevolution/xml (or
the corresponding data path). From there they are read at runtime
to compose the final XML configuration. Users can copy individual files
into the corresponding directory hierarchy rooted at
$XDG_CONFIG_HOME/syncevolution-xml to replace individual fragments.
New fragments can be added there or in /usr/share.

For testing, these two directories can be overridden with the
SYNCEVOLUTION_XML_CONFIG_DIR env variable. No tests have been added
for this yet. There's also no documentation about it except this
commit message - add something to the HACKING guide once this
new concept stabilizes.

Developers can add new fragments in the source tree, invoke make and run the
resulting binary in client mode. As before, a complete config is included
in the binary. However, it is only sufficient for SyncML client mode.
For server mode, the files are expected to be installed (no need to maintain
a list of files in a Makefile for that) or SYNCEVOLUTION_XML_CONFIG_DIR
must be set.

At the moment, the following sub-directories are scanned for .xml files:
- the root directory to find syncevolution.xml
- datatypes, datatypes/client, datatypes/server
- scripting, scripting/client, scripting/server
- remoterules, remoterules/client, remoterules/server

Files inside "client" or "server" sub-directories are only used
when assembling a config for the corresponding mode of operation.

The goal of this patch is to simplify config sharing with Synthesis
(individual files are easier to manage than the monolitithic one), to
share files between client and server with the possibility to add
mode-specific files, and to allow users to extend the XML
configuration. The most likely use case for the latter is support for
more devices.

Previously, remote rules for the different devices listed in
syncserv_sample_config.xml were not used by SyncEvolution.

This patch moves the ZYB remote rule into a client-specific remote rule,
thus removing a complaint from libsynthesis about the unknown <client>
element when running as server.

Because we are using the unified upstream config, some parts of the config
have changed:
- There is a SYNCLVL field in all field list. This is currently unused
  by SyncEvolution, but doesn't hurt either.
- A new iCalendar 2.0 all-day sanity check was added (for older Oracle servers?).
- The CATEGORIES defition in vBookmark was extended.
- some comment and white space changes

Because this is such fundamental change, extra care was taken to
minimize and verify the config changes. Here's the command which compares
old and new config for clients plus its output:

$ update-samples.pl syncevolution.xml client | diff -c -b syncclient_sample_config.xml -

***************
*** 31,42 ****
    <scripting>
      <looptimeout>5</looptimeout>

-     <function><![CDATA[
-       // create a UID
-       string newuid() {
-         return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
-       }
-     ]]></function>
      <macro name="VCARD_BEFOREWRITE_SCRIPT_EVOLUTION"><![CDATA[
        // a wordaround for cellphone in evolution. for incoming contacts, if there is only one CELL,
        // strip the HOME or WORK flag from it. Evolution then should show it. */
--- 30,35 ----
***************
*** 118,123 ****
--- 111,124 ----
        }
      ]]></macro>

+     <function><![CDATA[
+       // create a UID
+       string newuid() {
+         return "syuid" + NUMFORMAT(RANDOM(1000000),6,"0") + "." + (string)MILLISECONDS(NOW());
+       }
+     ]]></function>
+
+
      <!-- define script macros for scripts that are used by both vCalendar 1.0 and iCalendar 2.0 -->

      <macro name="VCALENDAR_INCOMING_SCRIPT"><![CDATA[
***************
*** 145,150 ****
--- 146,158 ----
            DTSTART = CONVERTTOUSERZONE(DTSTART);
            MAKEALLDAY(DTSTART,DTEND,i);
          }
+         else {
+           // iCalendar 2.0 - only if DTSTART is a date-only value this really is an allday
+           if (ISDATEONLY(DTSTART)) {
+             // reshape to make sure we don't have invalid zero-duration alldays (old OCS 9 servers)
+             MAKEALLDAY(DTSTART,DTEND,i);
+           }
+         }

          // Make sure that all EXDATE times are in the same timezone as the start
          // time. Some servers send them as UTC, which is all fine and well, but
***************
*** 265,275 ****

    </scripting>

-
    <datatypes>
-
      <!-- list of internal fields representing vCard data -->
      <fieldlist name="contacts">
        <field name="REV" type="timestamp" compare="never" age="yes"/>

        <!-- Name elements -->
--- 274,283 ----

    </scripting>

    <datatypes>
      <!-- list of internal fields representing vCard data -->
      <fieldlist name="contacts">
+       <field name="SYNCLVL" type="integer" compare="never"/>
        <field name="REV" type="timestamp" compare="never" age="yes"/>

        <!-- Name elements -->
***************
*** 680,689 ****
          $VCARD_INCOMING_NAMECHANGE_SCRIPT
        ]]></incomingscript>
      </datatype>
-
-
      <!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
      <fieldlist name="calendar">
        <field name="ISEVENT" type="integer" compare="always"/>

        <field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
--- 688,696 ----
          $VCARD_INCOMING_NAMECHANGE_SCRIPT
        ]]></incomingscript>
      </datatype>
      <!-- common field list for events and todos (both represented by vCalendar/iCalendar) -->
      <fieldlist name="calendar">
+       <field name="SYNCLVL" type="integer" compare="never"/>
        <field name="ISEVENT" type="integer" compare="always"/>

        <field name="DMODIFIED" type="timestamp" compare="never" age="yes"/>
***************
*** 787,793 ****

          <subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>

!         <!-- sub-profile for todoz -->
          <subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">

            <property name="LAST-MODIFIED" suppressempty="yes">
--- 792,798 ----

          <subprofile onlyformode="standard" name="VTIMEZONE" mode="vtimezones"/>

!         <!-- sub-profile for tasks -->
          <subprofile name="VTODO" nummandatory="1" showifselectedonly="yes" field="ISEVENT" value="0">

            <property name="LAST-MODIFIED" suppressempty="yes">
***************
*** 1394,1401 ****

          <!-- non-standard properties -->

!         <property name="CATEGORIES">
!           <value field="CATEGORIES"/>
          </property>

          <property name="CLASS" suppressempty="yes">
--- 1394,1402 ----

          <!-- non-standard properties -->

!         <!-- inherit CATEGORIES from vCard 3.0, i.e. comma separated -->
!         <property name="CATEGORIES" values="list" valueseparator="," altvalueseparator=";">
!           <value field="CATEGORIES" combine=","/>
          </property>

          <property name="CLASS" suppressempty="yes">
***************
*** 1416,1435 ****
        <use profile="vBookmark"/>
      </datatype>

!     <fieldlists/>
!     <profiles/>
!     <datatypes/>
    </datatypes>

    <clientorserver/>
-
-   <client type="plugin">
-       <remoterule name="ZYB">
-           <manufacturer>ZYB</manufacturer>
-           <model>ZYB</model>
-           <!-- information to disable anchors checking -->
-           <lenientmode>yes</lenientmode>
-       </remoterule>
-   </client>
-
  </sysync_config>
--- 1417,1424 ----
        <use profile="vBookmark"/>
      </datatype>

!
    </datatypes>

    <clientorserver/>
  </sysync_config>
2010-02-02 21:53:28 +01:00
Patrick Ohly
82494dcd97 Merge branch 'syncevolution-0-9-branch'
Conflicts:
	NEWS
	configure-post.in
	configure-pre.in
	src/Makefile-gen.am
	src/syncevo/Cmdline.cpp
	src/syncevo/SyncConfig.cpp
2010-01-19 16:01:10 +01:00
Patrick Ohly
18f2715760 autotools: added workaround for lack of --with-docdir
Older automake doesn't have --with-docdir and thus no
way of installing our docs in that dir. As a workaround,
check right before generating Makefiles whether $docdir
is empty and set it if necessary.
2010-01-11 18:15:10 +01:00
Chen Congwu
19d32c41c4 AutoConf: Bluetooth transport build option
Added --enable-bluetooth let the user explictly enable bluetooth, in this case
the configure process will fail if the dependent library is not installed.
If the option is not set, bluetooth is enabled by default anyway; however if
user don't have necessary library installed it will not attemt to built with
bluetooth support.
Added a summary to display whether the bluetooth support is enabled.
2009-12-24 10:58:38 +08:00
Patrick Ohly
92bb59e138 Merge branch 'syncevolution-0-9-branch'
Conflicts:
	src/backends/file/FileSyncSourceRegister.cpp

Conflict because of the "text/x-vcalendar" renaming on
master.
2009-12-09 16:53:51 +01:00
Patrick Ohly
8f1dd1ba95 autotools: cleaned up checking for GNOME/EDS libs (MB #8338)
The EDS backend was asking for glib support even when it was not
active. In combination with not linking against the right libs
in that case there was a link failure because g_thread_init()
and g_type_init() were not found.

When the EDS backend was active, this wasn't a problem because
the necessary libs were linked indirectly.

This patch reduces the number of libs that are checked and used
when not enabling the EDS backend. This is done by resetting
the ECAL/EBOOK flags when inactive and only asking for glib
when active.

It also fixes the checking and linking against gobject and gthread
in the case that glib support is requested.
2009-12-09 16:24:08 +01:00
Patrick Ohly
671fb4e099 Merge remote branch 'origin/syncevolution-0-9-branch' 2009-12-01 21:39:46 +01:00
Patrick Ohly
a29a2540f5 autotools: fixed installation of backends with recent libtool
More recent libtool versions contain a check that the
install dir doesn't deviate too much from the libdir
compiled into the libs. This check failed when the
chosen path ended with a slash, leading to:

libtool: install: error: cannot install `syncecal.la' to a directory not ending in ...

I consider this a bug in libtool and sent a bug report
together with a fix. In the meantime, let's avoid the
problem by not adding any redundant slash in our
path...
2009-12-01 17:31:37 +01:00
Patrick Ohly
607b54860d Merge branch 'master' into dbus-api 2009-10-20 14:32:40 +02:00
Patrick Ohly
3f7c53c78a --enable-evolution-compatibility: added icalcomp_get_location/summary (MB#6552), added test
Two more functions which have to be intercepted to avoid hard
dependencies on libecal or libical.

Because this is something which is likely to come up again
in the future, this patch also adds a "installcheck-local" for
undesired dependencies on libical/ecal/ebook/edataserver.

This check is triggered when building binary packages by using
"installcheck" instead of "install". It intentionally checks
.so files in the build directory, to catch problems even in
libs which are not currently installed.
2009-10-13 17:21:54 +02:00
Patrick Ohly
7e558b23a2 gdbus: compile the gdbus utility library
The library is compiled and installed as a syncevolution utility
library (in other words, as lib/syncevolution/libgdbus), so that
it never conflicts with a copy of the code in another project.
2009-10-07 16:11:02 +02:00
Patrick Ohly
e357e8fcc8 --enable-developer-mode: use absolute search path for backends
The path compiled into libsyncevolution.so when developer mode
was active was "backends/", so backends were only found when
running SyncEvolution inside that directory. This is a bit
too limiting. Now the absolute path is compiled in.
2009-09-25 08:15:23 +02:00
Chen Congwu
35ee636619 Dynamic loadable backends: repackage libsyncevolution to enable dynamic loadable backends
Install head files to a standard path, the remaining dependencies are
synthesis and boost
client-test is portable when ENABLE_MODULES is defined, no longer link to
backends libraries.

Add --enable-developer-mode, in which mode the backend scan path will be
under current build directory for development purposes.
2009-09-23 07:35:25 +02:00
Patrick Ohly
94c62f34d5 build rules: moved D-Bus into sub directories
syncevo-dbus -> src/dbus
interfaces -> src/dbus/interfaces

Files generated from D-Bus interfaces are only built once, in src/dbus/interfaces.
This is changes makes the code layout a bit nicer and, more importantly,
fixes build dependencies when Synthesis is compiled in src.

Now everything that is needed by a certain directory is in that directory
or a sub directory.
2009-05-06 19:52:55 +02:00
Jussi Kukkonen
7f21cc02f1 add internationalization support 2009-05-06 10:49:34 +03:00
Jussi Kukkonen
d58a5a5777 dbus client: allow building with no Mux widgets
also changed MuxFrame to actually derive from GtkFrame:
This makes it easier to use MuxFrame and GtkFrame
interchangeably.
2009-04-27 10:42:20 +03:00
Jussi Kukkonen
6f23974cfd dbus client: add and use new widget MuxBin
MuxBin is a GtkBin with a rounded corners, border and a title
with a bullet.

Also move ui related source to src/gtk-ui
2009-04-09 17:45:20 +03:00
Jussi Kukkonen
0d613e680d dbus client: add GUI
Syncing works. Modifying server configs does not work yet.
2009-04-05 13:25:35 +03:00
Jussi Kukkonen
9a417300f0 Add initial dbus api and wrapper client library 2009-04-02 20:36:58 +03:00
Patrick Ohly
b75f8c952d configure: fixed some checks (glib, boost, EDS)
Configure didn't check correctly for "glib": it invoked glib-config
but didn't notice when that command was missing. Removed that
check as it has been superseeded by "glib-2.0" anyway.

Boost wasn't checked for at all, although the Boost header files are
no longer bundled.

libecal and libebook are now obligatory unless explicitly disabled.
This catches a common mistake made by users: previously syncevolution
would compile, but without Evolution support. The drawback is that
on platforms without Evolution, support for it now must be disabled
explicitly.
2009-03-27 16:22:31 +01:00
Patrick Ohly
bcc349a569 transport agent: replaced Funambol TransportAgent with own libsoup/libcurl classes
The new TransportAgent base class supports sending a message and waiting
for a reply. Implementations which block in either the send() (CurlTransportAgent)
or the wait() (SoupTransportAgent) call are possible.

The default implementation is compiled into libsyncevolution. configure
picks libsoup if available, otherwise libcurl. The default can be changed
via --enable-libcurl/libsoup, including not compiling any transport. Normally
that triggers a configure error because it leads to an unusable syncevolution
binary.

Derived EvolutionSyncClients can change the default via createTransportAgent().
2009-03-25 14:43:34 +01:00
Patrick Ohly
fc34e5c54f EvolutionSyncClient: clarified/added callbacks that can be implemented by derived classes
The new EvolutionSyncClient::displaySyncProgress(),
displaySourceProgress() and displayServerMessage() calls
can be overridden to display information to the user.
The default implementation prints into the log.

PEV_DSSTATS_* statistics are saved in EvolutionSyncClient
and printed to the log after each sync.

The older askPassword() is also one of the virtual callbacks
2009-03-25 14:43:33 +01:00
Patrick Ohly
d7ee1450dd fix for compile problem: if glib dev files were installed but not the evolution dev files, then glib.h was not found when compiling syncevolution.c
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@769 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-12-02 18:07:28 +00:00
Patrick Ohly
3d5749df17 hard dependencies on specific Evolution libs can be avoided with --enable-evolution-compatibility
This works by mapping all EDS symbols to pointers initialized via dlopen/dlsym.
Avoids version checks as intented, but might lead to runtime crashes if the ABI
of the required symbols really changes...

Currently the binaries refuses to start when any of the EDS libs is not found.
Need to make it work again so that libecal and libebook are optional (Maemo!).


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@747 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-10-08 21:30:06 +00:00
Patrick Ohly
63e14ddc9c file layout restructuring, take II
Added missing files, finished automatic registration
of backends, Emacs mode for renamed files.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@685 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-30 17:30:10 +00:00