[libreoffice] 01/04: Determine gcc >= 5 only once and reuse result

Rene Engelhard rene at moszumanska.debian.org
Sun Aug 6 21:45:23 UTC 2017


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

rene pushed a commit to branch master
in repository libreoffice.

commit 0c5ff4058a9ad1cbc280ff1ca03108f0a295ebad
Author: Rico Tzschichholz <ricotz at ubuntu.com>
Date:   Sun Aug 6 21:54:46 2017 +0200

    Determine gcc >= 5 only once and reuse result
---
 rules | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/rules b/rules
index 27741ac..527cc61 100755
--- a/rules
+++ b/rules
@@ -38,6 +38,9 @@ export gb_SHELL:=$(SHELL)
 #SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\..$$/\1/p')
 #FIXME
 SYSTEM_GCC_VERSION = $(shell gcc --version | sed -n '/^gcc/s/.*\(.\..\)\../\1/p' | cut -d" " -f1)
+ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+	GCC_VERSION_5_OR_GREATER=y
+endif
 
 PKGDIR:=debian/libreoffice
 OODIRNAME=libreoffice
@@ -157,7 +160,7 @@ LIBHYPHEN_MINVER= (>= 2.4)
 SYSTEM_STUFF += boost
 BOOST_VERSION=default
 ifeq "$(BOOST_VERSION)" "default"
-  ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+  ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
     BOOST_MINVER= (>= 1.58)
   else
     BOOST_MINVER= (>= 1.55)
@@ -219,7 +222,7 @@ USE_SHARED_LPSOLVE=y
 LPSOLVE_MIN_VERSION= (>= 5.5.0.13-5+b1)
 ENABLE_COINMP=y
 SYSTEM_STUFF += coinmp
-ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
 COINMP_MINVER=(>= 1.7.6+dfsg1-2)
 COINUTILS_MINVER=(>= 2.9.15-3.1)
 else
@@ -387,12 +390,12 @@ ifeq "$(ENABLE_GLTF)" "y"
     COLLADA2GLTF_CFLAGS="-I/usr/include/collada2gltf -I/usr/include/collada2gltf/JSON -I/usr/include/collada2gltf/GLTF -I/usr/include/collada2gltf/helpers -I/usr/include/collada2gltf/assetModifiers -I/usr/include/rapidjson" 
     COLLADA2GLTF_LIBS="-lcollada2gltfConvert -lo3dgc_common_lib -lo3dgc_dec_lib -lo3dgc_enc_lib"
   endif
-  ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+  ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
     OPENCOLLADA_MINVER=(>= 0.1.0~20140703.ddf8f47+dfsg1-2)
   else
    OPENCOLLADA_MINVER=
   endif
-  ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+  ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
     COLLADA2GLTF_MINVER=(>= 20140924-2)
   else
     COLLADA2GLTF_MINVER=
@@ -441,7 +444,7 @@ MYSQL_FLAVOUR=default
 # set this also to y for system-mysql..
 SYSTEM_STUFF += mariadb
 SYSTEM_STUFF += mysql-cppconn
-ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
 MYSQLCPPCONN_MINVER= (>= 1.1.7-4)
 else
 MYSQLCPPCONN_MINVER= (>= 1.1.0~r791)
@@ -451,7 +454,7 @@ DICT_DIR=/usr/share/hunspell
 HYPH_DIR=/usr/share/hyphen
 THES_DIR=/usr/share/mythes
 SYSTEM_STUFF += libcmis
-ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
 LIBCMIS_MINVER=0.5.0-3
 else
 LIBCMIS_MINVER=0.5.0
@@ -468,7 +471,7 @@ SYSTEM_STUFF += nss
 ENABLE_HELP=y
 ifeq "$(ENABLE_HELP)" "y"
   SYSTEM_STUFF += clucene
-  ifeq "$(shell dpkg --compare-versions $(SYSTEM_GCC_VERSION) ge 5 && echo true)" "true"
+  ifeq "$(GCC_VERSION_5_OR_GREATER)" "y"
   CLUCENE_MINVER=2.3.3.4-4.1
   else
   CLUCENE_MINVER=2.3.3.4-2

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list