[pkg-xtuple-maintainers] [postbooks] 01/01: Update for building 4.6.0

Daniel Pocock pocock at moszumanska.debian.org
Tue Sep 23 09:56:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

pocock pushed a commit to branch debian-experimental
in repository postbooks.

commit d783a4472b10699d4703163497a6be62c37e0518
Author: Daniel Pocock <daniel at pocock.pro>
Date:   Tue Sep 23 11:56:44 2014 +0200

    Update for building 4.6.0
---
 debian/control                                     |   2 +-
 debian/patches/02-use-packaged-dependencies.patch  | 140 ---------------------
 debian/patches/03-check-version.patch              |  55 --------
 debian/patches/04-xtuplecommon-shared.patch        |  24 ----
 debian/patches/06-correct-edition-data.patch       |   4 +-
 debian/patches/07-include-paths-scriptapi.patch    |  22 ++++
 .../08-guiclient-use-libopenrptcommon.patch        |  20 +++
 debian/patches/series                              |   5 +-
 debian/rules                                       |  18 ++-
 9 files changed, 61 insertions(+), 229 deletions(-)

diff --git a/debian/control b/debian/control
index 5c5f511..2a27be7 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: misc
 Priority: optional
 Maintainer: Debian xTuple Maintainers <pkg-xtuple-maintainers at lists.alioth.debian.org>
 Uploaders: Andrew Shadura <andrewsh at debian.org>, Daniel Pocock <daniel at pocock.pro>
-Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), libqt4-dev (>= 4.5.0), libdmtx-dev, libopenrpt-dev, libcsvimp-dev, libqtassistantclient-dev, libqt4-webkit, libz-dev, libqtwebkit-dev, libsqlite3-dev
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), libqt4-dev (>= 4.5.0), libdmtx-dev, libopenrpt-dev (>= 3.3.4+dp1), libcsvimp-dev (>= 0.4.7+dp1), libqtassistantclient-dev, libqt4-webkit, libz-dev, libqtwebkit-dev, libsqlite3-dev
 Standards-Version: 3.9.6
 Homepage: http://www.xtuple.com/postbooks
 Vcs-Git: git://anonscm.debian.org/collab-maint/postbooks.git
diff --git a/debian/patches/02-use-packaged-dependencies.patch b/debian/patches/02-use-packaged-dependencies.patch
deleted file mode 100644
index c3942d3..0000000
--- a/debian/patches/02-use-packaged-dependencies.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-diff --git a/global.pri b/global.pri
-index 5980d1d..2cd3fe1 100644
---- a/global.pri
-+++ b/global.pri
-@@ -17,71 +17,24 @@
- #
- # This is the relative directory path to the openrpt project.
- #
--exists(../../../openrpt) {
--    OPENRPT_DIR = ../../../openrpt
--}
--exists(../../openrpt) {
--    OPENRPT_DIR = ../../openrpt
--}
--exists(../openrpt) {
--    OPENRPT_DIR = ../openrpt
--}
--!exists(openrpt) {
--    exists(../openrpt) {
--        OPENRPT_DIR = ../openrpt
--    }
--}
--
--! exists($${OPENRPT_DIR}) {
--    error("Could not set the OPENRPT_DIR qmake variable.")
--}
--
--OPENRPT_BLD = $${OPENRPT_DIR}
--exists($${OPENRPT_DIR}-build-desktop) {
--    OPENRPT_BLD = $${OPENRPT_DIR}-build-desktop
--}
--exists(../../../csvimp) {
--    CSVIMP_DIR = ../../../csvimp
--}
--exists(../../csvimp) {
--    CSVIMP_DIR = ../../csvimp
--}
--exists(../csvimp) {
--    CSVIMP_DIR = ../csvimp
--
--}
--
--!exists(csvimp) {
--    exists(../csvimp) {
--        CSVIMP_DIR = ../csvimp
--    }
--}
--
--! exists($${CSVIMP_DIR}) {
--    error("Could not set the CSVIMP_DIR qmake variable.")
--}
--
--CSVIMP_BLD = $${CSVIMP_DIR}
--exists($${CSVIMP_DIR}-build-desktop) {
--  CSVIMP_BLD = $${CSVIMP_DIR}-build-desktop
--}
--
--INCLUDEPATH += ../$${OPENRPT_DIR}/common           ../$${OPENRPT_BLD}/common \
--	       ../$${OPENRPT_DIR}/OpenRPT/renderer ../$${OPENRPT_BLD}/OpenRPT/renderer \
--	       ../$${OPENRPT_DIR}/OpenRPT/wrtembed ../$${OPENRPT_BLD}/OpenRPT/wrtembed \
--	       ../$${OPENRPT_DIR}/MetaSQL          ../$${OPENRPT_BLD}/MetaSQL \
--	       ../$${OPENRPT_DIR}/MetaSQL/tmp      ../$${OPENRPT_BLD}/MetaSQL/tmp \
--	       ../$${CSVIMP_DIR}/csvimpcommon      ../$${CSVIMP_BLD}/csvimpcommon
-+OPENRPT_DIR = /usr/include/openrpt
-+OPENRPT_BLD = /usr/lib/$$(DEB_HOST_MULTIARCH)
-+#OPENRPT_BLD = /usr/lib/openrpt
-+
-+CSVIMP_DIR = /usr/include/csvimp
-+CSVIMP_BLD = /usr/lib/$$(DEB_HOST_MULTIARCH)
-+#CSVIMP_BLD = /usr/lib/csvimp
-+
-+INCLUDEPATH += $${OPENRPT_DIR}/common           \
-+	       $${OPENRPT_DIR}/OpenRPT/renderer \
-+	       $${OPENRPT_DIR}/OpenRPT/wrtembed \
-+	       $${OPENRPT_DIR}/MetaSQL          \
-+	       $${OPENRPT_DIR}/MetaSQL/tmp      \
-+	       $${CSVIMP_DIR}/csvimpcommon
- INCLUDEPATH =  $$unique(INCLUDEPATH)
- 
--XTUPLE_DIR=../../qt-client
--! exists(../qt-client) {
--    XTUPLE_DIR=../../xtuple
--}
-+XTUPLE_DIR=../
- XTUPLE_BLD=$${XTUPLE_DIR}
--exists(../xtuple-build-desktop) {
--  XTUPLE_BLD=../../xtuple-build-desktop
--}
- 
- DEPENDPATH  += $${INCLUDEPATH}
- 
-diff --git a/guiclient/guiclient.pro b/guiclient/guiclient.pro
-index 5b89587..6747beb 100644
---- a/guiclient/guiclient.pro
-+++ b/guiclient/guiclient.pro
-@@ -23,16 +23,15 @@ win32-msvc* {
-   PRE_TARGETDEPS += ../lib/libxtuplecommon.a    \
-                     ../lib/libxtuplescriptapi.a \
-                     ../lib/libxtuplewidgets.a   \
--                    ../$${OPENRPT_BLD}/lib/libMetaSQL.a  \
--                    ../$${OPENRPT_BLD}/lib/librenderer.a \
--                    ../$${OPENRPT_BLD}/lib/libwrtembed.a \
--                    ../$${OPENRPT_BLD}/lib/libDmtx_Library.a \
--                    ../$${OPENRPT_BLD}/lib/libcommon.a
-+                    $${OPENRPT_BLD}/libMetaSQL.a  \
-+                    $${OPENRPT_BLD}/librenderer.a \
-+                    $${OPENRPT_BLD}/libwrtembed.a \
-+                    $${OPENRPT_BLD}/libcommon.a
- }
- 
--LIBS        += -L../lib -L../$${OPENRPT_BLD}/lib \
-+LIBS        += -L../lib -L$${OPENRPT_BLD} \
-                -lxtuplecommon -lxtuplewidgets -lwrtembed -lcommon -lrenderer \
--               -lxtuplescriptapi -lDmtx_Library -lMetaSQL
-+               -lxtuplescriptapi -ldmtx -lMetaSQL
- 
- #not the best way to handle this, but it should do
- mac:!static:contains(QT_CONFIG, qt_framework) {
-@@ -1827,7 +1826,7 @@ include( hunspell.pri )
- QT += xml sql script scripttools network
- QT += webkit xmlpatterns
- 
--RESOURCES += guiclient.qrc ../$${OPENRPT_DIR}/OpenRPT/images/OpenRPTMetaSQL.qrc
-+RESOURCES += guiclient.qrc /usr/share/openrpt/OpenRPT/images/OpenRPTMetaSQL.qrc
- 
- #CONFIG += debug
- 
-diff --git a/widgets/widgets.pro b/widgets/widgets.pro
-index f7d92c5..e6d1dcd 100644
---- a/widgets/widgets.pro
-+++ b/widgets/widgets.pro
-@@ -16,7 +16,7 @@ dynamic {
-     CONFIG += dll # this is technically redundant as plugin implies dll however it fixes a cross-compile problem
-     DESTDIR = $$[QT_INSTALL_PLUGINS]/designer
-     LIBS += -L../lib \
--        -L../$$OPENRPT_BLD/lib \
-+        -L$$OPENRPT_BLD \
-         -lxtuplecommon \
-         -lwrtembed \
-         -lrenderer \
diff --git a/debian/patches/03-check-version.patch b/debian/patches/03-check-version.patch
deleted file mode 100644
index fc0a611..0000000
--- a/debian/patches/03-check-version.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff --git a/common/login2.cpp b/common/login2.cpp
-index 6283fa9..e8f2456 100644
---- a/common/login2.cpp
-+++ b/common/login2.cpp
-@@ -335,6 +335,50 @@ void login2::sLogin()
-       break;  // break instead of for-loop condition to preserve methodidx
-   }
- 
-+  // Check that it is a supported PostgreSQL version
-+  if (db.isOpen())
-+  {
-+    XSqlQuery checkVersion(QString("select (regexp_matches(setting, '^(\\d+.\\d+).\\d+'))[1] as version from pg_settings where name = 'server_version'"));
-+    bool goodVersion = false;
-+    // FIXME:
-+    // - should store the range in some constants
-+    // - when version numbers use extra digits (e.g v10.1), must use a
-+    //   version comparison algorithm
-+    if(checkVersion.first()) 
-+    {
-+      if(!(checkVersion.value("version").toString() < "8.4" ||
-+        checkVersion.value("version").toString() > "9.1"))
-+      {
-+        goodVersion = true;
-+      }
-+    }
-+    if(!goodVersion)
-+    {
-+      if (_splash)
-+        _splash->hide();
-+
-+      setCursor(QCursor(Qt::ArrowCursor));
-+
-+      QMessageBox::critical(this, tr("Cannot Connect to xTuple ERP Server"),
-+                            tr("<p>Sorry, can't connect to the specified xTuple ERP server. "
-+                             "<p>The server version %1 is not supported."
-+                             "<p>The minimum supported version is %2 and maximum is %3.")
-+                             .arg(checkVersion.value("version").toString())
-+                             .arg("8.4").arg("9.1"));
-+      db.close();
-+      if (!_captive)
-+      {
-+        _username->setText("");
-+        _username->setFocus();
-+      }
-+      else
-+        _password->setFocus();
-+
-+      _password->setText("");
-+      return;
-+    }
-+  }
-+
-   // if connected using OpenMFG enhanced auth, remangle the password
-   if (db.isOpen() && (methodidx == 2 || methodidx == 5))
-       XSqlQuery chgpass(QString("ALTER USER \"%1\" WITH PASSWORD '%2'")
diff --git a/debian/patches/04-xtuplecommon-shared.patch b/debian/patches/04-xtuplecommon-shared.patch
deleted file mode 100644
index fb869f0..0000000
--- a/debian/patches/04-xtuplecommon-shared.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -ur a/common/common.pro b/common/common.pro
---- a/common/common.pro
-+++ b/common/common.pro
-@@ -2,7 +2,7 @@
- 
- TARGET      = xtuplecommon
- TEMPLATE    = lib
--CONFIG      += qt warn_on staticlib
-+CONFIG      += qt warn_on dll
- DEFINES     += MAKELIB
- 
- INCLUDEPATH += $(QTDIR)/src/3rdparty/zlib
-diff -ur a/guiclient/guiclient.pro b/guiclient/guiclient.pro
---- a/guiclient/guiclient.pro
-+++ b/guiclient/guiclient.pro
-@@ -20,7 +20,7 @@
-                     ../lib/xtuplescriptapi.lib \
-                     ../lib/xtuplewidgets.lib
- } else {
--  PRE_TARGETDEPS += ../lib/libxtuplecommon.a    \
-+  PRE_TARGETDEPS += ../lib/libxtuplecommon.so    \
-                     ../lib/libxtuplescriptapi.a \
-                     ../lib/libxtuplewidgets.a   \
-                     $${OPENRPT_BLD}/libMetaSQL.a  \
diff --git a/debian/patches/06-correct-edition-data.patch b/debian/patches/06-correct-edition-data.patch
index 3b7397d..95f56b9 100644
--- a/debian/patches/06-correct-edition-data.patch
+++ b/debian/patches/06-correct-edition-data.patch
@@ -1,10 +1,10 @@
 diff --git a/guiclient/main.cpp b/guiclient/main.cpp
-index 12a70c2..66e0055 100644
+index 93405a0..5889d7a 100644
 --- a/guiclient/main.cpp
 +++ b/guiclient/main.cpp
 @@ -301,7 +301,7 @@ int main(int argc, char *argv[])
                 " WHERE pkghead_name IN ('xtmfg');" )
-           << editionDesc( "Standard",       ":/images/splashStdEdition.png",        true,
+           << editionDesc( "Distribution",       ":/images/splashDistEdition.png",        true,
                 "SELECT fetchMetricText('Application') = 'Standard';" )
 -          << editionDesc( "PostBooks",      ":/images/splashPostBooks.png",        true,
 +          << editionDesc( "PostBooks",      ":/images/splashPostBooks.png",        false,
diff --git a/debian/patches/07-include-paths-scriptapi.patch b/debian/patches/07-include-paths-scriptapi.patch
new file mode 100644
index 0000000..e3902b8
--- /dev/null
+++ b/debian/patches/07-include-paths-scriptapi.patch
@@ -0,0 +1,22 @@
+diff --git a/scriptapi/scriptapi.pro b/scriptapi/scriptapi.pro
+index 1de5e6a..2b85cd0 100644
+--- a/scriptapi/scriptapi.pro
++++ b/scriptapi/scriptapi.pro
+@@ -6,10 +6,13 @@ CONFIG += qt \
+     staticlib
+ DBFILE = scriptapi.db
+ LANGUAGE = C++
+-INCLUDEPATH += $${XTUPLE_DIR}/common          $${XTUPLE_BLD}/common \
+-               $${XTUPLE_DIR}/widgets         $${XTUPLE_BLD}/widgets \
+-               $${XTUPLE_DIR}/widgets/tmp/lib $${XTUPLE_BLD}/widgets/tmp/lib \
+-               $${XTUPLE_DIR}/scriptapi       $${XTUPLE_BLD}/scriptapi
++INCLUDEPATH += ../common \
++               ../widgets ../widgets/tmp/lib \
++               ../../xtuple-build-desktop/common \
++               ../../xtuple-build-desktop/widgets \
++               ../../xtuple-build-desktop/widgets/tmp/lib \
++               . \
++               ../../xtuple-build-desktop/scriptapi
+ 
+ INCLUDEPATH = $$unique(INCLUDEPATH)
+ DEPENDPATH += $${INCLUDEPATH}
diff --git a/debian/patches/08-guiclient-use-libopenrptcommon.patch b/debian/patches/08-guiclient-use-libopenrptcommon.patch
new file mode 100644
index 0000000..4b17fb1
--- /dev/null
+++ b/debian/patches/08-guiclient-use-libopenrptcommon.patch
@@ -0,0 +1,20 @@
+diff --git a/guiclient/guiclient.pro b/guiclient/guiclient.pro
+index 6660cc0..c9ea866 100644
+--- a/guiclient/guiclient.pro
++++ b/guiclient/guiclient.pro
+@@ -32,13 +32,13 @@ win32-msvc* {
+                       $${OPENRPT_BLD}/librenderer.so \
+                       $${OPENRPT_BLD}/libwrtembed.so \
+                       $${OPENRPT_BLD}/libdmtx.so \
+-                      $${OPENRPT_BLD}/libcommon.so
++                      $${OPENRPT_BLD}/libopenrptcommon.so
+   } else {
+     PRE_TARGETDEPS += $${OPENRPT_BLD}/lib/libMetaSQL.a  \
+                       $${OPENRPT_BLD}/lib/librenderer.a \
+                       $${OPENRPT_BLD}/lib/libwrtembed.a \
+                       $${OPENRPT_BLD}/lib/libDmtx_Library.a \
+-                      $${OPENRPT_BLD}/lib/libcommon.a
++                      $${OPENRPT_BLD}/lib/libopenrptcommon.a
+   }
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8f79309..fa56365 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
 01-assistant-fix.patch
-02-use-packaged-dependencies.patch
-03-check-version.patch
-04-xtuplecommon-shared.patch
 05-remove-circular-dependency.patch
 06-correct-edition-data.patch
+07-include-paths-scriptapi.patch
+08-guiclient-use-libopenrptcommon.patch
diff --git a/debian/rules b/debian/rules
index 696b91a..5f7aa98 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,16 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
+export OPENRPT_HEADERS=/usr/include/openrpt
+export OPENRPT_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+export OPENRPT_IMAGE_DIR=/usr/share/openrpt/OpenRPT/images
+export USE_SHARED_OPENRPT=1
+
+export CSVIMP_HEADERS=/usr/include/csvimp
+export CSVIMP_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
+
+export BUILD_XTCOMMON_SHARED=1
+
 %:
 	dh $@ --builddirectory=. --parallel
 
@@ -20,10 +30,10 @@ override_dh_auto_configure:
 	# FIXME: find will not fail on error!
 	find . -name '*.ts' -exec lrelease {} \;
 	# convert to use shared libs
-	find . -name '*.pro' -exec sed -i -e "s/lib\(common\)\.a/lib\1.so/"  {} \;
-	find . -name '*.pro' -exec sed -i -e "s/lib\(MetaSQL\)\.a/lib\1.so/"  {} \;
-	find . -name '*.pro' -exec sed -i -e "s/lib\(wrtembed\)\.a/lib\1.so/"  {} \;
-	find . -name '*.pro' -exec sed -i -e "s/lib\(renderer\)\.a/lib\1.so/"  {} \;
+	#find . -name '*.pro' -exec sed -i -e "s/lib\(common\)\.a/lib\1.so/"  {} \;
+	#find . -name '*.pro' -exec sed -i -e "s/lib\(MetaSQL\)\.a/lib\1.so/"  {} \;
+	#find . -name '*.pro' -exec sed -i -e "s/lib\(wrtembed\)\.a/lib\1.so/"  {} \;
+	#find . -name '*.pro' -exec sed -i -e "s/lib\(renderer\)\.a/lib\1.so/"  {} \;
 	dh_auto_configure
 	make clean
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/postbooks.git



More information about the pkg-xtuple-maintainers mailing list