Author: Andreas Tille <tille@debian.org>
Subject: Manage embedded sqlite3 library
Description: Tried to use Debian packages sqlite3
 but failed because package does not build that way
Forwarded: no
Last-Updated: 2013-11-30
--- a/ugene.pro
+++ b/ugene.pro
@@ -8,7 +8,6 @@ use_bundled_zlib() {
 
 SUBDIRS += \
           src/libs_3rdparty/qscore \
-          src/libs_3rdparty/sqlite3 \
           src/libs_3rdparty/gtest \
           src/libs_3rdparty/samtools \
           src/corelibs/U2Core \
--- a/src/corelibs/U2Core/U2Core.pri
+++ b/src/corelibs/U2Core/U2Core.pri
@@ -15,9 +15,7 @@ use_bundled_zlib() {
 }
 
 LIBS += -L../../_release
-LIBS += -lugenedb
-
-INCLUDEPATH += ../../libs_3rdparty/sqlite3/src
+LIBS += -lsqlite3
 
 !debug_and_release|build_pass {
 
@@ -29,8 +27,6 @@ INCLUDEPATH += ../../libs_3rdparty/sqlit
             LIBS += -lzlibd
             LIBS -= -lzlib
         }
-        LIBS -= -lugenedb
-        LIBS += -lugenedbd
     }
 
     CONFIG(release, debug|release) {
--- a/src/corelibs/U2Formats/U2Formats.pri
+++ b/src/corelibs/U2Formats/U2Formats.pri
@@ -12,7 +12,7 @@ UGENE_RELATIVE_DESTDIR = ''
 DEFINES+= QT_FATAL_ASSERT BUILDING_U2FORMATS_DLL
 
 LIBS += -L../../_release -lU2Core -lU2Algorithm
-LIBS += -lugenedb -lsamtools
+LIBS += -lsqlite3 -lsamtools
 
 # Force re-linking when lib changes
 unix:POST_TARGETDEPS += ../../_release/libsamtools.a
@@ -29,8 +29,8 @@ INCLUDEPATH += ../../libs_3rdparty/sqlit
 
     CONFIG(debug, debug|release) {
         DESTDIR=../../_debug
-        LIBS -= -L../../_release -lU2Core -lU2Algorithm -lugenedb -lsamtools
-        LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lugenedbd -lsamtoolsd
+        LIBS -= -L../../_release -lU2Core -lU2Algorithm -lsamtools
+        LIBS += -L../../_debug -lU2Cored -lU2Algorithmd -lsamtoolsd
 
         unix:POST_TARGETDEPS -= ../../_release/libsamtools.a
         unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a
--- a/src/plugins/dbi_bam/dbi_bam.pri
+++ b/src/plugins/dbi_bam/dbi_bam.pri
@@ -10,7 +10,7 @@ use_bundled_zlib() {
     INCLUDEPATH += ../../libs_3rdparty/zlib/src
 }
 
-LIBS += -lugenedb -lsamtools
+LIBS += -lsqlite3 -lsamtools
 
 # Force re-linking when lib changes
 unix:POST_TARGETDEPS += ../../_release/libsamtools.a
@@ -24,8 +24,8 @@ win32:DEFINES += _USE_MATH_DEFINES "inli
 !debug_and_release|build_pass {
 
     CONFIG(debug, debug|release) {
-        LIBS -= -lugenedb -lsamtools
-        LIBS += -lugenedbd -lsamtoolsd
+        LIBS -= -lsamtools
+        LIBS += -lsamtoolsd
 
         unix:POST_TARGETDEPS -= ../../_release/libsamtools.a
         unix:POST_TARGETDEPS += ../../_debug/libsamtoolsd.a
--- a/src/ugenecl/ugenecl.pri
+++ b/src/ugenecl/ugenecl.pri
@@ -14,7 +14,7 @@ CONFIG +=qt dll thread debug_and_release
 DEFINES+= QT_DLL QT_FATAL_ASSERT
 INCLUDEPATH += src _tmp ../include ../corelibs/U2Private/src
 
-LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Remote -lU2Lang -lU2Private -lugenedb
+LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Remote -lU2Lang -lU2Private -lsqlite3
 
 !debug_and_release|build_pass {
 
@@ -24,8 +24,8 @@ LIBS += -L../_release -lU2Core -lU2Algor
         DESTDIR=../_debug
         MOC_DIR=_tmp/moc/debug
         OBJECTS_DIR=_tmp/obj/debug
-        LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Remote -lU2Lang -lU2Private -lugenedb
-        LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Testd -lU2Remoted -lU2Langd -lU2Privated -lugenedbd
+        LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2Test -lU2Remote -lU2Lang -lU2Private
+        LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Testd -lU2Remoted -lU2Langd -lU2Privated
     }
 
     CONFIG(release, debug|release) {
--- a/src/ugeneui/ugeneui.pri
+++ b/src/ugeneui/ugeneui.pri
@@ -15,7 +15,7 @@ DEFINES+= QT_DLL QT_FATAL_ASSERT
 INCLUDEPATH += src _tmp ../include ../corelibs/U2Private/src
 macx : INCLUDEPATH += /System/Library/Frameworks/Security.framework/Headers
 
-LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Remote -lU2Lang -lU2Private -lugenedb
+LIBS += -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Remote -lU2Lang -lU2Private -lsqlite3
 macx: LIBS += /System/Library/Frameworks/Security.framework/Security
 
 !debug_and_release|build_pass {
@@ -27,8 +27,8 @@ macx: LIBS += /System/Library/Frameworks
         DESTDIR=../_debug
         MOC_DIR=_tmp/moc/debug
         OBJECTS_DIR=_tmp/obj/debug
-        LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Remote -lU2Lang -lU2Private -lugenedb
-        LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Viewd -lU2Testd -lU2Remoted -lU2Langd -lU2Privated -lugenedbd
+        LIBS -= -L../_release -lU2Core -lU2Algorithm -lU2Formats -lU2Gui -lU2View -lU2Test -lU2Remote -lU2Lang -lU2Private
+        LIBS += -L../_debug -lU2Cored -lU2Algorithmd -lU2Formatsd -lU2Guid -lU2Viewd -lU2Testd -lU2Remoted -lU2Langd -lU2Privated
     }
 
     CONFIG(release, debug|release) {
