Debian pkg: adjustments for wheezy.
authorAndrea Zagli <azagli@libero.it>
Sun, 29 May 2016 14:35:53 +0000 (16:35 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 29 May 2016 14:35:53 +0000 (16:35 +0200)
debian/control
debian/gbp.conf
debian/patches/0001-Glib-old-version.patch [new file with mode: 0644]
debian/patches/0002-Camel-old-version.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]

index 5993add3847aecbd5862f8347af93f44640ad5b8..9d343203d694cca9cd19d18a6730f4f9cf75eae5 100644 (file)
@@ -19,6 +19,6 @@ Description: Utilities library - development files
 
 Package: libsolipa
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libgtkform, libzakformgtk, libcamel-1.2-57, libgdaex, python
+Depends: ${shlibs:Depends}, ${misc:Depends}, libgtkform, libzakformgtk, libcamel-1.2-33, libgdaex, python
 Description: Utilities library
  Utilities library.
index d2e2b59f443a1540b054d5f09b8c155250aa670c..17be412a918cb80c90af55a3510b7d90ae881436 100644 (file)
@@ -1,10 +1,10 @@
 [buildpackage]
 export-dir=../build_area
-debian-branch=debian/sid
+debian-branch=debian/wheezy
 ignore-new=True
 upstream-tree=BRANCH
 upstream-branch=develop
 force-create=True
 export=WC
-dist=sid
+dist=wheezy
 pbuilder=True
diff --git a/debian/patches/0001-Glib-old-version.patch b/debian/patches/0001-Glib-old-version.patch
new file mode 100644 (file)
index 0000000..8c1289e
--- /dev/null
@@ -0,0 +1,34 @@
+From: Andrea Zagli <azagli@libero.it>
+Date: Sun, 29 May 2016 14:59:54 +0200
+Subject: Glib old version.
+
+---
+ configure.ac    | 2 +-
+ libsolipa.pc.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 60ce102..cab6619 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -41,7 +41,7 @@ AM_GLIB_GNU_GETTEXT
+ # Checks for libraries.
+ PKG_CHECK_MODULES(SOLIPA, [libgdaex >= 0.5.0
+                            libgtkform >= 0.5.0
+-                           gio-2.0 >= 2.36
++                           gio-2.0 >= 2.32
+                            gtk+-3.0 >= 3.0
+                                                  libzakutils
+                                                  libzakformgtk])
+diff --git a/libsolipa.pc.in b/libsolipa.pc.in
+index a62e65f..183a0cf 100644
+--- a/libsolipa.pc.in
++++ b/libsolipa.pc.in
+@@ -6,6 +6,6 @@ includedir=@includedir@
+ Name: @PACKAGE_NAME@
+ Description: Classe con funzioni varie di utilità.
+ Version: @PACKAGE_VERSION@
+-Requires: libgdaex >= 0.5.0 @CAMEL_PKGCONFIG@ libgtkform >= 0.5.0 gio-2.0 >= 2.36
++Requires: libgdaex >= 0.5.0 @CAMEL_PKGCONFIG@ libgtkform >= 0.5.0 gio-2.0 >= 2.32
+ Libs: -L${libdir} -lsolipa
+ Cflags: -I${includedir}
diff --git a/debian/patches/0002-Camel-old-version.patch b/debian/patches/0002-Camel-old-version.patch
new file mode 100644 (file)
index 0000000..8b51123
--- /dev/null
@@ -0,0 +1,181 @@
+From: Andrea Zagli <azagli@libero.it>
+Date: Sun, 29 May 2016 15:12:11 +0200
+Subject: Camel old version.
+
+---
+ configure.ac       | 40 ++++------------------------------------
+ src/Makefile.am    | 14 +-------------
+ src/camelsession.c |  3 +--
+ src/mail.c         | 26 +-------------------------
+ 4 files changed, 7 insertions(+), 76 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index cab6619..65f87a2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ AC_PROG_RANLIB
+ dnl ******************************
+ dnl Translations
+ dnl ******************************
+-GETTEXT_PACKAGE=libzakform
++GETTEXT_PACKAGE=libsolipa
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
+                    [The prefix for our gettext translation domains.])
+@@ -44,45 +44,13 @@ PKG_CHECK_MODULES(SOLIPA, [libgdaex >= 0.5.0
+                            gio-2.0 >= 2.32
+                            gtk+-3.0 >= 3.0
+                                                  libzakutils
+-                                                 libzakformgtk])
++                                                 libzakformgtk
++                                                 camel-1.2])
+ AC_SUBST(SOLIPA_CFLAGS)
+ AC_SUBST(SOLIPA_LIBS)
+-camel3_found=no
+-camel38_found=no
+-camel318_found=no
+-
+-PKG_CHECK_MODULES(CAMEL, camel-1.2 >= 3.18, [camel318_found=yes], [camel318_found=no])
+-
+-if test x$camel318_found = xno; then
+-   PKG_CHECK_MODULES(CAMEL, camel-1.2 >= 3.8, [camel38_found=yes], [camel38_found=no])
+-
+-   if test x$camel38_found = xno; then
+-        PKG_CHECK_MODULES(CAMEL, camel-provider-1.2 >= 3, [camel3_found=yes], [camel3_found=no])
+-
+-        if test x$camel3_found = xno; then
+-               PKG_CHECK_MODULES(CAMEL, camel-provider-1.2 >= 2.32)
+-        fi
+-
+-      CAMEL_PKGCONFIG="camel-provider-1.2"
+-   else
+-        CAMEL_PKGCONFIG="camel-1.2"
+-   fi
+-else
+-      CAMEL_PKGCONFIG="camel-1.2"
+-fi
+-
+-AC_SUBST(CAMEL_CFLAGS)
+-AC_SUBST(CAMEL_LIBS)
+-
+-AC_SUBST(CAMEL318_FOUND)
+-AM_CONDITIONAL(HAVE_CAMEL318, test $camel318_found = yes)
+-AC_SUBST(CAMEL38_FOUND)
+-AM_CONDITIONAL(HAVE_CAMEL38, test $camel38_found = yes)
+-AC_SUBST(CAMEL3_FOUND)
+-AM_CONDITIONAL(HAVE_CAMEL3, test $camel3_found = yes)
+-
++CAMEL_PKGCONFIG="camel-1.2"
+ AC_SUBST(CAMEL_PKGCONFIG)
+ AC_CHECK_PROG(PYTHON_CFLAGS, [python-config], `python-config --cflags`, [-I/c/Python26/include])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index db5a209..d4e51e4 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -11,19 +11,7 @@ LIBS = $(SOLIPA_LIBS) \
+        $(CAMEL_LIBS) \
+        $(WIN32_LIBS)
+-if HAVE_CAMEL318
+-  CAMEL3=-DCAMEL3=\"yes\" -DCAMEL318=\"yes\"
+-else
+-  if HAVE_CAMEL38
+-    CAMEL3=-DCAMEL3=\"yes\" -DCAMEL38=\"yes\"
+-  else
+-    if HAVE_CAMEL3
+-      CAMEL3=-DCAMEL3=\"yes\"
+-    else
+-      CAMEL3=
+-    endif
+-  endif
+-endif
++CAMEL3=-DCAMEL3=\"yes\" -DCAMEL38=\"yes\"
+ AM_CPPFLAGS = $(SOLIPA_CFLAGS) \
+               $(SOLIPA_WIN32_CFLAGS) \
+diff --git a/src/camelsession.c b/src/camelsession.c
+index 820c22e..3f741dd 100644
+--- a/src/camelsession.c
++++ b/src/camelsession.c
+@@ -41,7 +41,6 @@ solipa_camel_session_class_init (SolipaCamelSessionClass *class)
+ {
+       CamelSessionClass *camel_session_class = CAMEL_SESSION_CLASS (class);
+-      camel_session_class->trust_prompt = solipa_camel_session_trust_prompt;
+       camel_session_class->authenticate_sync = solipa_camel_session_authenticate_sync;
+ }
+@@ -85,4 +84,4 @@ solipa_camel_session_authenticate_sync (CamelSession *session,
+                                         GError **error)
+ {
+       return (camel_service_authenticate_sync (service, mechanism, cancellable, error) == CAMEL_AUTHENTICATION_ACCEPTED);
+-}
+\ No newline at end of file
++}
+diff --git a/src/mail.c b/src/mail.c
+index 72f56c0..1bcfcc5 100644
+--- a/src/mail.c
++++ b/src/mail.c
+@@ -400,20 +400,10 @@ static CamelMimeMessage
+                                                                       camel_data_wrapper_set_mime_type (dw, g_content_type_get_mime_type (g_file_info_get_content_type (file_info)));
+                                                                       error = NULL;
+-#ifdef CAMEL38
+-                                                                      istream = (GInputStream *)g_file_read (file, NULL, &error);
+-                                                                      error = NULL;
+-                                                                      camel_data_wrapper_construct_from_input_stream_sync (dw, istream, NULL, &error);
+-                                                                      g_object_unref (istream);
+-#elif defined CAMEL3
+                                                                       cstream = camel_stream_fs_new_with_name ((gchar *)attachs->data, O_RDONLY, 0, &error);
+                                                                       error = NULL;
+                                                                       camel_data_wrapper_construct_from_stream_sync (dw, cstream, NULL, &error);
+                                                                       g_object_unref (cstream);
+-#else
+-                                                                      camel_data_wrapper_construct_from_stream (dw, cstream, &error);
+-                                                                      g_object_unref (cstream);
+-#endif
+                                                                       part = camel_mime_part_new ();
+ #if defined CAMEL38 || defined CAMEL3
+@@ -676,7 +666,7 @@ solipa_mail_send (SolipaMail *mail, const gchar *url)
+                                  error != NULL && error->message != NULL ? error->message : "no details");
+                       return;
+               }
+-      CamelSettings *settings = camel_service_ref_settings (trans);
++      CamelSettings *settings = camel_service_get_settings (trans);
+       camel_network_settings_set_host (CAMEL_NETWORK_SETTINGS (settings), camel_url->host);
+       camel_network_settings_set_user (CAMEL_NETWORK_SETTINGS (settings), "");
+       if (camel_url->port == 0)
+@@ -713,15 +703,7 @@ solipa_mail_send (SolipaMail *mail, const gchar *url)
+               }
+       error = NULL;
+-#ifdef CAMEL318
+-      ret = camel_service_connect_sync (trans, NULL, &error);
+-#elif defined CAMEL38
+-      ret = camel_service_connect_sync (trans, NULL, &error);
+-#elif defined CAMEL3
+       ret = camel_service_connect_sync (trans, &error);
+-#else
+-      ret = camel_service_connect (trans, &error);
+-#endif
+       if (!ret || error != NULL)
+               {
+                       g_warning ("Not connected: %s",
+@@ -793,13 +775,7 @@ solipa_mail_send (SolipaMail *mail, const gchar *url)
+       g_object_unref (to);
+       error = NULL;
+-#ifdef CAMEL3
+-      camel_service_disconnect_sync (trans, FALSE, NULL, NULL);
+-#elif defined CAMEL3
+       camel_service_disconnect_sync (trans, FALSE, NULL);
+-#else
+-      camel_service_disconnect (trans, FALSE, NULL);
+-#endif
+       if (error != NULL)
+               {
+                       g_warning ("Unable to disconnect: %s",
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..2602d91
--- /dev/null
@@ -0,0 +1,2 @@
+0001-Glib-old-version.patch
+0002-Camel-old-version.patch