- Update to version 1.0.6

* This minor maintenance release fixes some bugs, lifts a limit,
    clears some compiler warnings, boosts performance, and includes
    other janitorial cleanups.
- supersedes u_Escape-special-characters-in-paths.patch

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/makedepend?expand=0&rev=8
This commit is contained in:
Stefan Dirsch 2019-03-22 12:55:57 +00:00 committed by Git OBS Bridge
parent 33e03cb157
commit 2038c55a17
5 changed files with 15 additions and 110 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7a80575f3724ac3d9b19eaeab802892ece7e4b0061dd6425b4b789353e25425
size 143498

3
makedepend-1.0.6.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d558a52e8017d984ee59596a9582c8d699a1962391b632bec3bb6804bf4d501c
size 147616

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Mar 22 11:47:42 UTC 2019 - Stefan Dirsch <sndirsch@suse.com>
- Update to version 1.0.6
* This minor maintenance release fixes some bugs, lifts a limit,
clears some compiler warnings, boosts performance, and includes
other janitorial cleanups.
- supersedes u_Escape-special-characters-in-paths.patch
-------------------------------------------------------------------
Fri Mar 18 05:52:22 UTC 2016 - eich@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package makedepend
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@ -17,14 +17,13 @@
Name: makedepend
Version: 1.0.5
Version: 1.0.6
Release: 0
Summary: Utility to create dependencies in makefiles
License: MIT
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
@ -43,7 +42,6 @@ has changed.
%prep
%setup -q
%patch1 -p1
%build
%configure
@ -54,7 +52,7 @@ make %{?_smp_mflags}
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%doc AUTHORS ChangeLog COPYING README.md
%{_bindir}/makedepend
%{_mandir}/man1/makedepend.1%{?ext_man}

View File

@ -1,102 +0,0 @@
From: Egbert Eich <eich@suse.de>
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 <eich@suse.com>
Make cannot handle certain special characters in make targets.
Signed-off-by: Egbert Eich <eich@suse.de>
---
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);