Hello community,

here is the log from the commit of package makedepend for openSUSE:Factory 
checked in at 2016-03-29 09:51:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/makedepend (Old)
 and      /work/SRC/openSUSE:Factory/.makedepend.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "makedepend"

Changes:
--------
--- /work/SRC/openSUSE:Factory/makedepend/makedepend.changes    2013-08-19 
13:29:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.makedepend.new/makedepend.changes       
2016-03-29 09:52:06.000000000 +0200
@@ -1,0 +2,8 @@
+Fri Mar 18 05:52:22 UTC 2016 - [email protected]
+
+- u_Escape-special-characters-in-paths.patch
+  Make gets confused by certain special characters in Makefiles.
+  Escape them. This is a problem particularly with ':' in OBS
+  paths.
+
+-------------------------------------------------------------------

New:
----
  u_Escape-special-characters-in-paths.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ makedepend.spec ++++++
--- /var/tmp/diff_new_pack.nnbndE/_old  2016-03-29 09:52:07.000000000 +0200
+++ /var/tmp/diff_new_pack.nnbndE/_new  2016-03-29 09:52:07.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package makedepend
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,7 @@
 Group:          Development/Tools/Building
 Url:            http://xorg.freedesktop.org/
 Source0:        
http://xorg.freedesktop.org/releases/individual/util/%{name}-%{version}.tar.bz2
+Patch1:         u_Escape-special-characters-in-paths.patch
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
 BuildRequires:  pkgconfig(xproto) >= 7.0.17
@@ -42,6 +43,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 %configure

++++++ u_Escape-special-characters-in-paths.patch ++++++
From: Egbert Eich <[email protected]>
Date: Fri Mar 18 06:42:20 2016 +0100
Subject: [PATCH]Escape special characters in paths.
Patch-mainline: to be upstreamed
Git-repo: git://anongit.freedesktop.org/git/xorg/util/makedepend
Git-commit: 6ba62c8f0236a97eaef4377a1cbca58da2d6a8c0
References: 
Signed-off-by: Egbert Eich <[email protected]>

Make cannot handle certain special characters in make targets.

Signed-off-by: Egbert Eich <[email protected]>
---
 pr.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 56 insertions(+), 3 deletions(-)

diff --git a/pr.c b/pr.c
index 04abef9..e3a59e5 100644
--- a/pr.c
+++ b/pr.c
@@ -63,6 +63,56 @@ add_include(struct filepointer *filep, struct inclist *file,
        }
 }
 
+/**
+ * Replaces all occurrences of special characters in @p input with
+ * "\<special_character>" using @p outputbuffer (of size @p bufsize)
+ * possibly to hold the result. @p returns the string with quoted colons
+ */
+static const char *quoteSpecial(const char *input, char *outputbuffer, int 
bufsize)
+{
+#define min(a, b) ((a < b) ? a : b)
+        const char *tmp=input;
+        const char *loc;
+       const char *ret=input;
+#if !defined(WIN32) && !defined(__CYGWIN__)
+       const char special[] = {'$',  ':',  '#',  '|',  '?',  '*',  ' ', '\\', 
'\0'};
+       const char  quotes[] = {'$', '\\', '\\', '\\', '\\', '\\', '\\', '\\', 
'\0'};
+#else
+       const char special[] = {'$', '\0'};
+       const char  quotes[] = {'$', '\0'};
+#endif
+       int i;
+
+       for (i = 0; i < strlen(special); i++) {
+               char buf[bufsize];
+               int size=bufsize;
+               char *buf_p = buf;
+               loc = strchr(ret, special[i]);
+               if (loc == NULL)
+                       continue;
+               tmp=ret;
+               while (loc != NULL) {
+                       if (size > loc-tmp+2 ) {
+                               memcpy(buf_p, tmp, loc-tmp);
+                               buf_p+=loc-tmp;
+                               *(buf_p++)=quotes[i];
+                               *(buf_p++)=special[i];
+                               size-=loc-tmp+2;
+                               tmp=loc+1;
+                               loc = strchr(tmp, special[i]);
+                       } else {
+                               size = min (size, loc - tmp + 1);
+                               break;
+                       }
+               }
+               strncpy(buf_p, tmp, size);
+               buf_p[size - 1] = '\0';
+               strcpy(outputbuffer, buf);
+               ret = outputbuffer;
+       }
+        return ret;
+}
+
 static void
 pr(struct inclist *ip, const char *file, const char *base)
 {
@@ -70,18 +120,21 @@ pr(struct inclist *ip, const char *file, const char *base)
        static int      current_len;
        register int    len, i;
        char    buf[ BUFSIZ ];
+       char    quotebuf[ BUFSIZ ];
+       const char *result;
 
        printed = TRUE;
-       len = strlen(ip->i_file)+1;
+       result = quoteSpecial(ip->i_file, quotebuf, sizeof(quotebuf));
+       len = strlen(result)+1;
        if (current_len + len > width || file != lastfile) {
                lastfile = file;
                snprintf(buf, sizeof(buf), "\n%s%s%s: %s",
-                        objprefix, base, objsuffix, ip->i_file);
+                        objprefix, base, objsuffix, result);
                len = current_len = strlen(buf);
        }
        else {
                buf[0] = ' ';
-               strcpy(buf+1, ip->i_file);
+               strcpy(buf+1, result);
                current_len += len;
        }
        fwrite(buf, len, 1, stdout);

Reply via email to