[Libreoffice-commits] core.git: 2 commits - bin/gbuild-to-ide bin/gbuild-to-ideNS RepositoryExternal.mk

Mike Kaganski mike.kaganski at collabora.com
Thu Oct 26 21:28:08 UTC 2017


 RepositoryExternal.mk |    2 +-
 bin/gbuild-to-ide     |    7 ++++++-
 bin/gbuild-to-ideNS   |    7 ++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 55ad81533a7ed5bd9d22dc78688b9852f292bd11
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Oct 27 00:06:17 2017 +0300

    gbuild-to-ide: handle -U undefs correctly
    
    Previously, defines string like this:
    
      -DDBG_UTIL -DNOMINMAX -D_DLL -UNOMINMAX
    
    would produce this defines list:
    
      DBG_UTIL;NOMINMAX;_DLL -UNOMINMAX
    
    where last "define" is incorrect; proper list should be
    
      DBG_UTIL;_DLL
    
    so that the undef'ed element would be properly eliminated from the
    result. This patch takes care of this.
    
    Change-Id: Ia66a1d6d0a6e0bbfd0022b22285b005609871336
    Reviewed-on: https://gerrit.libreoffice.org/43923
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 0ff7579e1c84..d50801c3e6ca 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -67,10 +67,15 @@ class GbuildParser:
         defs = {}
         alldefs = [defswitch.strip() for defswitch in defsline.strip().lstrip('-D').split(' -D') if len(defswitch) > 2]
         for d in alldefs:
-            defparts = d.split('=')
+            dparts = d.split(' -U')
+            """after dparts.pop(0), dparts will contain only undefs"""
+            defparts = dparts.pop(0).strip().split('=')
             if len(defparts) == 1:
                 defparts.append(None)
             defs[defparts[0]] = defparts[1]
+            """Drop undefed items (if any) from previous defs"""
+            for u in dparts:
+                defs.pop(u.strip(), '')
         defs["LIBO_INTERNAL_ONLY"] = None
         return defs
 
diff --git a/bin/gbuild-to-ideNS b/bin/gbuild-to-ideNS
index 44970c466b77..5fca58cf227d 100755
--- a/bin/gbuild-to-ideNS
+++ b/bin/gbuild-to-ideNS
@@ -106,10 +106,15 @@ class GbuildParser:
         defs = {}
         alldefs = [defswitch.strip() for defswitch in defsline.strip().lstrip('-D').split(' -D') if len(defswitch) > 2]
         for d in alldefs:
-            defparts = d.split('=')
+            dparts = d.split(' -U')
+            """after dparts.pop(0), dparts will contain only undefs"""
+            defparts = dparts.pop(0).strip().split('=')
             if len(defparts) == 1:
                 defparts.append(None)
             defs[defparts[0]] = defparts[1]
+            """Drop undefed items (if any) from previous defs"""
+            for u in dparts:
+                defs.pop(u.strip(), '')
         defs["LIBO_INTERNAL_ONLY"] = None
         return defs
 
commit dd35dccdf6c20922c51d2a8d4acb8a94a30522fb
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Oct 26 23:25:34 2017 +0200

    RepositoryExternal.mk: fix inverted gpg condition
    
    (regression from 16598d526e9cc79698152daa5acc1e2718da933c)
    
    Change-Id: Ic621979926a9629aa8d8fb95a80957850ae0661b

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 0e90180cb474..282dc53f6ced 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3467,7 +3467,7 @@ $(call gb_LinkTarget_use_package,$(1),gpgme)
 
 endef
 
-ifneq ($(filter-out MACOSX LINUX,$(OS)),)
+ifneq ($(filter MACOSX LINUX,$(OS)),)
 
 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
 	gpgme \


More information about the Libreoffice-commits mailing list