diff --git a/issue2-mr7.patch b/issue2-mr7.patch deleted file mode 100644 index 48971d6..0000000 --- a/issue2-mr7.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 654f6355d501153fe1fbdbc073cb72fd6355e194 Mon Sep 17 00:00:00 2001 -From: Alan Coopersmith -Date: Mon, 5 Dec 2022 15:48:17 -0800 -Subject: [PATCH] Bug #2: fix regression introduced by fix for bug #1 - -Refactor code to find the full file path before comparing against -existing items in the list so that we stop adding duplicate entries -for all the files in the system include path and with larger amounts -of code hitting the MAXFILES limit. - -Fixes: 3dc64b0 ("Add test case for bug #1 + proposed fix.") -Closes: #2 - -Signed-off-by: Alan Coopersmith ---- - include.c | 101 ++++++++++++++++++++++++++---------------------------- - 1 file changed, 49 insertions(+), 52 deletions(-) - -diff --git a/include.c b/include.c -index 697e9de..57e2b24 100644 ---- a/include.c -+++ b/include.c -@@ -222,60 +222,17 @@ inc_clean (void) - } - } - --struct inclist * --inc_path(const char *file, const char *include, int type) -+/* -+ * Return full path for the "include" file of the given "type", -+ * which may be found relative to the source file "file". -+ */ -+static const char * -+find_full_inc_path(const char *file, const char *include, int type) - { - static char path[ BUFSIZ ]; - register const char **pp, *p; -- register struct inclist *ip; - struct stat st; - -- /* -- * Check all previously found include files for a path that -- * has already been expanded. -- */ -- if ((type == INCLUDE) || (type == INCLUDEDOT)) -- inclistnext = inclist; -- ip = inclistnext; -- -- for (; ip->i_file; ip++) { -- if ((strcmp(ip->i_incstring, include) == 0) && -- !(ip->i_flags & INCLUDED_SYM)) { -- /* -- * Same filename but same file ? -- */ -- char r_include[PATHMAX+1]; -- char r_saved_path[PATHMAX+1]; -- char* ptr; -- ptr = realpath(include, r_include); -- ptr = realpath(ip->i_file, r_saved_path); -- if (!strcmp(r_include, r_saved_path)) { -- inclistnext = ip + 1; -- return ip; -- } -- -- /* -- * Check if we have a header in the same dir -- */ -- for (p=file+strlen(file); p>file; p--) -- if (*p == '/') -- break; -- if (p == file) { -- strcpy(path, include); -- } else { -- strncpy(path, file, (p-file) + 1); -- path[ (p-file) + 1 ] = '\0'; -- strcpy(path + (p-file) + 1, include); -- } -- remove_dotdot(path); -- ptr = realpath(path, r_include); -- if (!strcmp(r_include, r_saved_path)) { -- inclistnext = ip + 1; -- return ip; -- } -- } -- } -- - if (inclistnext == inclist) { - /* - * If the path was surrounded by "" or is an absolute path, -@@ -285,7 +242,7 @@ inc_path(const char *file, const char *include, int type) - (type == INCLUDENEXTDOT) || - (*include == '/')) { - if (stat(include, &st) == 0 && !S_ISDIR(st.st_mode)) -- return newinclude(include, include); -+ return include; - if (show_where_not) - warning1("\tnot in %s\n", include); - } -@@ -307,7 +264,7 @@ inc_path(const char *file, const char *include, int type) - } - remove_dotdot(path); - if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) -- return newinclude(path, include); -+ return path; - if (show_where_not) - warning1("\tnot in %s\n", path); - } -@@ -326,7 +283,7 @@ inc_path(const char *file, const char *include, int type) - remove_dotdot(path); - if (stat(path, &st) == 0 && !S_ISDIR(st.st_mode)) { - includedirsnext = pp + 1; -- return newinclude(path, include); -+ return path; - } - if (show_where_not) - warning1("\tnot in %s\n", path); -@@ -334,3 +291,43 @@ inc_path(const char *file, const char *include, int type) - - return NULL; - } -+ -+struct inclist * -+inc_path(const char *file, const char *include, int type) -+{ -+ const char *fp; -+ struct inclist *ip; -+ char r_include[PATHMAX+1]; -+ -+ /* -+ * Check all previously found include files for a path that -+ * has already been expanded. -+ */ -+ if ((type == INCLUDE) || (type == INCLUDEDOT)) -+ inclistnext = inclist; -+ ip = inclistnext; -+ -+ fp = find_full_inc_path(file, include, type); -+ if (fp == NULL) -+ return NULL; -+ if (realpath(fp, r_include) == NULL) -+ return NULL; -+ -+ for (; ip->i_file; ip++) { -+ if ((strcmp(ip->i_incstring, include) == 0) && -+ !(ip->i_flags & INCLUDED_SYM)) { -+ /* -+ * Same filename but same file ? -+ */ -+ char r_saved_path[PATHMAX+1]; -+ if (realpath(ip->i_file, r_saved_path) == NULL) -+ continue; -+ if (!strcmp(r_include, r_saved_path)) { -+ inclistnext = ip + 1; -+ return ip; -+ } -+ } -+ } -+ -+ return newinclude(fp, include); -+} --- -GitLab - diff --git a/makedepend-1.0.7.tar.xz b/makedepend-1.0.7.tar.xz deleted file mode 100644 index 06a3c01..0000000 --- a/makedepend-1.0.7.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a729cfd3c0f4e16c0db1da351e7f53335222e058e3434e84f91251fd6d407065 -size 140528 diff --git a/makedepend-1.0.8.tar.xz b/makedepend-1.0.8.tar.xz new file mode 100644 index 0000000..752d86a --- /dev/null +++ b/makedepend-1.0.8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfb26f8025189b2a01286ce6daacc2af8fe647440b40bb741dd5c397572cba5b +size 141304 diff --git a/makedepend.changes b/makedepend.changes index 7919e4f..8248e85 100644 --- a/makedepend.changes +++ b/makedepend.changes @@ -1,8 +1,16 @@ +------------------------------------------------------------------- +Tue Dec 20 12:09:34 UTC 2022 - Dominique Leuenberger + +- Update to version 1.0.8: + + Bug #2: fix regression introduced by fix for bug #1 + - Obsoletes issue2-mr7.patch + + man page: add line breaks in Synopsis section + ------------------------------------------------------------------- Tue Dec 6 11:04:15 UTC 2022 - Stefan Dirsch - issue2-mr7.patch - * Bug #2: fix regression introduced by fix for bug #1 + * Bug #2: fix regression introduced by fix for bug #1 ------------------------------------------------------------------- Sat Oct 29 17:18:03 UTC 2022 - Stefan Dirsch diff --git a/makedepend.spec b/makedepend.spec index 47c9270..216c982 100644 --- a/makedepend.spec +++ b/makedepend.spec @@ -17,19 +17,17 @@ Name: makedepend -Version: 1.0.7 +Version: 1.0.8 Release: 0 Summary: Utility to create dependencies in makefiles License: MIT Group: Development/Tools/Building -URL: http://xorg.freedesktop.org/ +URL: https://xorg.freedesktop.org/ Source0: http://xorg.freedesktop.org/releases/individual/util/%{name}-%{version}.tar.xz -Patch0: issue2-mr7.patch -BuildRequires: pkg-config +BuildRequires: pkgconfig BuildRequires: pkgconfig(xproto) >= 7.0.17 # This was part of the xorg-x11-util-devel package up to version 7.6 Conflicts: xorg-x11-util-devel <= 7.6 -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The makedepend program reads each sourcefile in sequence and parses it @@ -41,19 +39,18 @@ make will know which object files must be recompiled when a dependency has changed. %prep -%setup -q -%patch0 -p1 +%autosetup -p1 %build %configure -make %{?_smp_mflags} +%make_build %install %make_install %files -%defattr(-,root,root) -%doc AUTHORS ChangeLog COPYING README.md +%license COPYING +%doc AUTHORS ChangeLog README.md %{_bindir}/makedepend %{_mandir}/man1/makedepend.1%{?ext_man}