apologies, the previous patch didn't apply cleanly.
I'm attaching a new one, against the sqlcipher git repo.

I think this is ready for nmu, if we're still on time.
>From 675ede1eff7d271d82695ff2598b4af28399c330 Mon Sep 17 00:00:00 2001
From: Ben Carrillo <b...@futeisha.org>
Date: Wed, 22 Apr 2015 10:15:04 -0400
Subject: [PATCH] Add a different variable for SQLCIPHER version

Closes: #776987

The version substitution of the patch 20-change-name-to-sqlcipher was
breaking code that relied on the base sqlite library versioning, since
this version is made public in the library and some extensions do a
hardcoded version check that expects the right sqlite version, instead
of the sqlcipher one.

This patch changes the behavior of the mentioned debian patch, and
allows to version the sqlcipher library number separately (used when
configuring the library symbols in the system).
---
 debian/changelog                                 |  8 +++++
 debian/patches/20-change-name-to-sqlcipher.patch | 43 ++++++++++++++++++++----
 debian/patches/32-fix-pkgconfig-libname.patch    |  2 +-
 3 files changed, 46 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index eca50f3..ce265e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+sqlcipher (3.2.0-1.1) unstable; urgency=medium
+
+  [ Ben Carrillo ]
+  * Non-maintainer upload.
+  * use a separate variable to track SQLCIPHER version (Closes: #776987)
+
+ -- Micah Anderson <mi...@debian.org>  Wed, 22 Apr 2015 10:38:05 -0400
+
 sqlcipher (3.2.0-1) unstable; urgency=low
 
   * updated to latest upstream: v3.2.0
diff --git a/debian/patches/20-change-name-to-sqlcipher.patch b/debian/patches/20-change-name-to-sqlcipher.patch
index 4d02dda..64b10c9 100644
--- a/debian/patches/20-change-name-to-sqlcipher.patch
+++ b/debian/patches/20-change-name-to-sqlcipher.patch
@@ -1,7 +1,38 @@
---- a/VERSION
-+++ b/VERSION
-@@ -1 +1 @@
--3.8.6
-\ No newline at end of file
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -89,6 +89,7 @@ TCC += $(OPTS)
+ VERSION = @VERSION@
+ VERSION_NUMBER = @VERSION_NUMBER@
+ RELEASE = @RELEASE@
++SQLCIPHER_VERSION = @SQLCIPHER_VERSION@
+ 
+ # Filename extensions
+ #
+--- /dev/null
++++ b/VERSION_SQLCIPHER
+@@ -0,0 +1 @@
 +3.2.0
-\ No newline at end of file
+--- a/configure.ac
++++ b/configure.ac
+@@ -179,6 +179,10 @@ VERSION_NUMBER=[`cat $srcdir/VERSION \
+ AC_MSG_NOTICE(Version number set to $VERSION_NUMBER)
+ AC_SUBST(VERSION_NUMBER)
+ 
++SQLCIPHER_VERSION=[`cat $srcdir/VERSION_SQLCIPHER | sed 's/^\([0-9]*\.*[0-9]*\).*/\1/'`]
++AC_MSG_NOTICE(SQLCipher Version set to $SQLCIPHER_VERSION)
++AC_SUBST(SQLCIPHER_VERSION)
++
+ #########
+ # Check to see if the --with-hints=FILE option is used.  If there is none,
+ # then check for a files named "$host.hints" and ../$hosts.hints where
+--- a/sqlcipher.pc.in
++++ b/sqlcipher.pc.in
+@@ -7,7 +7,7 @@ includedir=@includedir@
+ 
+ Name: SQLCipher
+ Description: SQL database engine
+-Version: @PACKAGE_VERSION@
++Version: @SQLCIPHER_VERSION@
+ Libs: -L${libdir} -lsqlcipher
+ Libs.private: @LIBS@
+ Cflags: -I${includedir}
diff --git a/debian/patches/32-fix-pkgconfig-libname.patch b/debian/patches/32-fix-pkgconfig-libname.patch
index 5a9a920..44c8dfb 100644
--- a/debian/patches/32-fix-pkgconfig-libname.patch
+++ b/debian/patches/32-fix-pkgconfig-libname.patch
@@ -1,7 +1,7 @@
 --- a/sqlcipher.pc.in
 +++ b/sqlcipher.pc.in
 @@ -10,4 +10,4 @@ Description: SQL database engine
- Version: @PACKAGE_VERSION@
+ Version: @SQLCIPHER_VERSION@
  Libs: -L${libdir} -lsqlcipher
  Libs.private: @LIBS@
 -Cflags: -I${includedir}
-- 
2.1.4

Reply via email to