[libgda] Improbed SQLCipher provider disabling



commit 53e32b3b36e3888adb676f63aaac62adaa33287e
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Tue Feb 26 10:13:06 2019 -0600

    Improbed SQLCipher provider disabling

 .gitlab-ci.yml                      | 4 ++--
 configure.ac                        | 3 ++-
 libgda/sqlite/gda-sqlite-provider.c | 3 ++-
 libgda/sqlite/gda-symbols-util.c    | 2 +-
 libgda/sqlite/meson.build           | 2 +-
 meson.build                         | 2 +-
 meson_options.txt                   | 2 +-
 providers/meson.build               | 2 +-
 8 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4ead7b09f..b13403586 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -63,11 +63,11 @@ before_script:
 autotools_build:
   stage: build
   script:
-  - ./autogen.sh --disable-crypto
+  - ./autogen.sh
   - make distclean
   - mkdir _build
   - cd _build
-  - ../configure
+  - ../configure --disable-crypto
   - make
   - broadwayd &
   - GDK_BACKEND=broadway make check
diff --git a/configure.ac b/configure.ac
index 28cf335e3..3070b1e09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -605,10 +605,11 @@ then
                if test "$enable_crypto" = "yes"
                then
                        AC_MSG_ERROR([libcrypto (part of OpenSSL) support requested but not found])
+                       enable_crypto=no
                fi)
 fi
 
-AM_CONDITIONAL(HAVE_LIBCRYPTO, [test "$enable_crypto" = "yes"])
+AM_CONDITIONAL(HAVE_LIBCRYPTO, [test "x$enable_crypto" = "xyes"])
 AC_SUBST(LIBCRYPTO_CFLAGS)
 AC_SUBST(LIBCRYPTO_LIBS)
 
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index e6169edce..c8e6d2bec 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -256,7 +256,8 @@ gda_sqlite_provider_meta_iface_init (GdaProviderMetaInterface *iface);
 static void
 gda_sqlite_provider_iface_init (GdaProviderInterface *iface);
 
-extern Sqlite3ApiRoutines *s3r;
+// API routines from library
+Sqlite3ApiRoutines *s3r;
 
 /*
  * GObject methods
diff --git a/libgda/sqlite/gda-symbols-util.c b/libgda/sqlite/gda-symbols-util.c
index 959bbb54c..dd271e092 100644
--- a/libgda/sqlite/gda-symbols-util.c
+++ b/libgda/sqlite/gda-symbols-util.c
@@ -22,7 +22,7 @@
 #include <libgda/libgda.h>
 #include "gda-symbols-util.h"
 
-Sqlite3ApiRoutines *s3r;
+extern Sqlite3ApiRoutines *s3r;
 
 
 
diff --git a/libgda/sqlite/meson.build b/libgda/sqlite/meson.build
index 6e7186fc4..ee60a31f9 100644
--- a/libgda/sqlite/meson.build
+++ b/libgda/sqlite/meson.build
@@ -78,7 +78,7 @@ endif
 
 sqlite_cargs += ['-DSEARCH_LIB_PATH="'+sqlite_path+'"']
 
-if libcrypto_dep.found ()
+if libcrypto_dep.found () and not get_option('disable-crypto')
 sqlcipher_deps = []
 
 sqlcipher_sources = []
diff --git a/meson.build b/meson.build
index 6b6d04ab0..ec8264021 100644
--- a/meson.build
+++ b/meson.build
@@ -125,7 +125,7 @@ endif
 sqlcipher_dep = dependency ('sqlcipher', version: '>= 3.4', required: false)
 sqlcipher_system_required = get_option('system-sqlcipher')
 sqlcipher_internal = true
-if sqlcipher_dep.found()
+if sqlcipher_dep.found() and not get_option('disable-crypto')
        sqlcipher_table_column_metadata = compiler.has_function('sqlite3_table_column_metadata',
                                                                required: sqlcipher_system_required,
                                                                dependencies: sqlcipher_dep)
diff --git a/meson_options.txt b/meson_options.txt
index 27a3f2261..e427ae045 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,7 +5,7 @@ option('with-goocanvas', type : 'boolean', value : false, description : 'Enable
 option('with-graphviz', type : 'boolean', value : false, description : 'Enable using Graphviz')
 option('enable-json', type : 'boolean', value : true, description : 'Enable support for JSON, disabled by 
default')
 option('enable-gda-gi', type : 'boolean', value : false, description : 'Enable GObject Introspection for 
libgda')
-option('disable-crypto', type : 'boolean', value : true, description : 'Disable SQLCipher database provider 
(using the libcrypto library, part of OpenSSL)') 
+option('disable-crypto', type : 'boolean', value : false, description : 'Disable SQLCipher database provider 
(using the libcrypto library, part of OpenSSL)')
 option('with-libsoup', type : 'boolean', value : true, description : 'Enable libsoup support')
 option('with-libsecret', type : 'boolean', value : false, description : 'Enable libsecret support')
 option('with-gnome-keyring', type : 'boolean', value : false, description : 'Enable gnome-keyring support')
diff --git a/providers/meson.build b/providers/meson.build
index eec545ceb..f7574b873 100644
--- a/providers/meson.build
+++ b/providers/meson.build
@@ -4,7 +4,7 @@ subdir('reuseable')
 subdir('sqlite')
 subdir('skel-implementation')
 
-if libcrypto_dep.found ()
+if libcrypto_dep.found () and not get_option('disable-crypto')
 subdir('sqlcipher')
 endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]