[packages/make] - dropped memory,newline patches (nobody cared since 3.82) - updated BRs, added guile bcond - packag

qboosh qboosh at pld-linux.org
Thu Oct 31 16:25:29 CET 2013


commit a404ec900bc958986537de7925c0632c4ef22095
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Oct 31 16:25:31 2013 +0100

    - dropped memory,newline patches (nobody cared since 3.82)
    - updated BRs, added guile bcond
    - package header file in -devel

 make-memory.patch   | 261 ----------------------------------------------------
 make-newlines.patch |  23 -----
 make.spec           |  37 ++++++--
 3 files changed, 29 insertions(+), 292 deletions(-)
---
diff --git a/make.spec b/make.spec
index 54b00db..edaf3ca 100644
--- a/make.spec
+++ b/make.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	guile	# Guile embedded scripting
+#
 Summary:	GNU Make
 Summary(de.UTF-8):	GNU Make
 Summary(es.UTF-8):	GNU Make
@@ -19,14 +23,12 @@ Source1:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-ma
 # Source1-md5:	ab6da7a1ba3bcf9e86e4e3fdecca61a7
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-getcwd.patch
-# needs rewrite for 3.82, but nothing serious, just possible memory usage improvement
-#Patch2:		%{name}-memory.patch
-# needs rewrite for 3.82, but probably nothing serious
-#Patch3:		%{name}-newlines.patch
 URL:		http://www.gnu.org/software/make/
-BuildRequires:	autoconf >= 2.59
-BuildRequires:	automake >= 1:1.9
-BuildRequires:	gettext-devel >= 0.14.1
+BuildRequires:	autoconf >= 2.62
+BuildRequires:	automake >= 1:1.11.1
+BuildRequires:	gettext-devel >= 0.18.1
+%{?with_guile:BuildRequires:	guile-devel >= 2.0}
+BuildRequires:	pkgconfig
 BuildRequires:	texinfo
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -92,6 +94,18 @@ derleyerek zaman yitirilmesini önler.
 Фактично, make може набагато більше - прочитайте документацію в
 форматі info...
 
+%package devel
+Summary:	Header file for GNU Make modules interface
+Summary(pl.UTF-8):	Plik nagłówkowy interfejsu modułów GNU Make'a
+Group:		Development/Libraries
+# doesn't require base
+
+%description devel
+Header file for GNU Make modules interface.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy interfejsu modułów GNU Make'a.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -103,7 +117,9 @@ derleyerek zaman yitirilmesini önler.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+	%{!?with_guile:--without-guile}
+
 %{__make}
 
 %install
@@ -116,6 +132,7 @@ install -d $RPM_BUILD_ROOT{/etc/env.d,%{_mandir}/man1}
 ln -sf make $RPM_BUILD_ROOT%{_bindir}/gmake
 
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+%{__rm} $RPM_BUILD_ROOT%{_mandir}/README.make-non-english-man-pages
 
 echo '#MAKE="%{_bindir}/make -j2"' > $RPM_BUILD_ROOT/etc/env.d/MAKE
 
@@ -145,3 +162,7 @@ rm -rf $RPM_BUILD_ROOT
 %lang(nl) %{_mandir}/nl/man1/make.1*
 %lang(pl) %{_mandir}/pl/man1/make.1*
 %{_infodir}/make.info*
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/gnumake.h
diff --git a/make-memory.patch b/make-memory.patch
deleted file mode 100644
index 7a7bf9f..0000000
--- a/make-memory.patch
+++ /dev/null
@@ -1,261 +0,0 @@
-diff -Bburpd make-3.81_orig/file.c make-3.81/file.c
---- make-3.81_orig/file.c	2006-05-23 13:59:11.000000000 +0200
-+++ make-3.81/file.c	2006-05-23 14:39:34.000000000 +0200
-@@ -490,7 +490,7 @@ expand_deps (struct file *f)
- 
-               o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0);
- 
--              free (d->name);
-+              hash_strfree (d->name);
-               d->name = savestring (buffer, o - buffer);
-               d->staticpattern = 0; /* Clear staticpattern so that we don't
-                                        re-expand %s below. */
-@@ -549,7 +549,7 @@ expand_deps (struct file *f)
-                         dp->name[0] = '\0';
-                       else
-                         {
--                          free (dp->name);
-+                          hash_strfree (dp->name);
-                           dp->name = savestring (buffer, o - buffer);
-                         }
-                     }
-@@ -580,7 +580,7 @@ expand_deps (struct file *f)
-           if (d1->file == 0)
-             d1->file = enter_file (d1->name);
-           else
--            free (d1->name);
-+            hash_strfree (d1->name);
-           d1->name = 0;
-           d1->staticpattern = 0;
-           d1->need_2nd_expansion = 0;
-Only in make-3.81: file.c~
-diff -Bburpd make-3.81_orig/implicit.c make-3.81/implicit.c
---- make-3.81_orig/implicit.c	2006-05-23 13:59:11.000000000 +0200
-+++ make-3.81/implicit.c	2006-05-23 14:40:01.000000000 +0200
-@@ -864,7 +864,7 @@ pattern_search (struct file *file, int a
- 	      dep->file = enter_file (dep->name);
-               /* enter_file uses dep->name _if_ we created a new file.  */
-               if (dep->name != dep->file->name)
--                free (dep->name);
-+                hash_strfree (dep->name);
- 	      dep->name = 0;
- 	      dep->file->tried_implicit |= dep->changed;
- 	    }
-Only in make-3.81: implicit.c~
-diff -Bburpd make-3.81_orig/main.c make-3.81/main.c
---- make-3.81_orig/main.c	2006-05-23 13:59:11.000000000 +0200
-+++ make-3.81/main.c	2006-05-23 14:40:49.000000000 +0200
-@@ -540,6 +540,7 @@ initialize_global_hash_tables (void)
-   init_hash_files ();
-   hash_init_directories ();
-   hash_init_function_table ();
-+  init_hash_strings ();
- }
- 
- static struct file *
-Only in make-3.81: main.c~
-diff -Bburpd make-3.81_orig/make.h make-3.81/make.h
---- make-3.81_orig/make.h	2006-05-23 13:59:11.000000000 +0200
-+++ make-3.81/make.h	2006-05-23 14:41:21.000000000 +0200
-@@ -431,6 +431,11 @@ extern void print_spaces PARAMS ((unsign
- extern char *find_percent PARAMS ((char *));
- extern FILE *open_tmpfile PARAMS ((char **, const char *));
- 
-+extern void init_hash_strings PARAMS ((void));
-+extern char *hash_strdup PARAMS ((const char *));
-+extern char *hash_savestring PARAMS ((const char *, unsigned int));
-+extern void hash_strfree PARAMS ((char *));
-+
- #ifndef NO_ARCHIVES
- extern int ar_name PARAMS ((char *));
- extern void ar_parse_name PARAMS ((char *, char **, char **));
-Only in make-3.81: make.h~
-diff -Bburpd make-3.81_orig/misc.c make-3.81/misc.c
---- make-3.81_orig/misc.c	2006-05-23 13:59:11.000000000 +0200
-+++ make-3.81/misc.c	2006-05-23 14:42:59.000000000 +0200
-@@ -16,8 +16,10 @@ You should have received a copy of the G
- GNU Make; see the file COPYING.  If not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.  */
- 
-+#include <assert.h>
- #include "make.h"
- #include "dep.h"
-+#include "hash.h"
- #include "debug.h"
- 
- /* Variadic functions.  We go through contortions to allow proper function
-@@ -511,7 +513,7 @@ void
- free_dep (struct dep *d)
- {
-   if (d->name != 0)
--    free (d->name);
-+    hash_strfree (d->name);
- 
-   if (d->stem != 0)
-     free (d->stem);
-@@ -535,7 +537,7 @@ copy_dep_chain (const struct dep *d)
-       bcopy ((char *) d, (char *) c, sizeof (struct dep));
- 
-       if (c->name != 0)
--	c->name = xstrdup (c->name);
-+	c->name = hash_strdup (c->name);
-       if (c->stem != 0)
- 	c->stem = xstrdup (c->stem);
- 
-@@ -909,3 +911,154 @@ close_stdout (void)
-       exit (EXIT_FAILURE);
-     }
- }
-+
-+/* Hash table of duplicated strings.  */
-+
-+struct hash_string
-+{
-+  char *string;
-+  unsigned int count;
-+};
-+
-+static unsigned long
-+string_hash_1 (key)
-+    const void *key;
-+{
-+  return_ISTRING_HASH_1 (((const struct hash_string *) key)->string);
-+}
-+
-+static unsigned long
-+string_hash_2 (key)
-+    const void *key;
-+{
-+  return_ISTRING_HASH_2 (((const struct hash_string *) key)->string);
-+}
-+
-+static int
-+string_hash_cmp (x, y)
-+    const void *x;
-+    const void *y;
-+{
-+  return_ISTRING_COMPARE (((const struct hash_string *) x)->string,
-+			  ((const struct hash_string *) y)->string);
-+}
-+
-+static struct hash_table strings;
-+
-+void
-+init_hash_strings ()
-+{
-+  hash_init (&strings, 1000, string_hash_1, string_hash_2,
-+	     string_hash_cmp);
-+}
-+
-+/* Keep track duplicated string and return the old one if exists.  */
-+
-+char *
-+hash_strdup (ptr)
-+     const char *ptr;
-+{
-+  struct hash_string *h, key;
-+
-+  if (*ptr == '\0')
-+    return "";
-+
-+  key.string = (char *) ptr;
-+  key.count = 0;
-+  h = (struct hash_string *) hash_find_item (&strings, &key);
-+  if (h == NULL)
-+    {
-+      char *result = (char *) malloc (strlen (ptr) + 1);
-+
-+      if (result == NULL)
-+	fatal (NILF, _("virtual memory exhausted"));
-+
-+      strcpy (result, ptr);
-+
-+      h = (struct hash_string *) malloc (sizeof (struct hash_string));
-+      if (h == NULL)
-+	fatal (NILF, _("virtual memory exhausted"));
-+
-+      h->string = result;
-+      h->count = 1;
-+      hash_insert (&strings, h);
-+    }
-+  else
-+    {
-+      h->count++;
-+      assert (h->count != 0);
-+    }
-+
-+  return h->string;
-+}
-+
-+char *
-+hash_savestring (str, length)
-+     const char *str;
-+     unsigned int length;
-+{
-+  struct hash_string *h, key;
-+
-+  if (length == 0 || *str == '\0')
-+    return "";
-+
-+  key.string = alloca (length + 1);
-+  key.count = 0;
-+  bcopy (str, key.string, length);
-+  key.string [length] = '\0';
-+
-+  h = (struct hash_string *) hash_find_item (&strings, &key);
-+  if (h == NULL)
-+    {
-+      char *out = (char *) xmalloc (length + 1);
-+      bcopy (str, out, length);
-+      out[length] = '\0';
-+
-+      h = (struct hash_string *) malloc (sizeof (struct hash_string));
-+      if (h == NULL)
-+	fatal (NILF, _("virtual memory exhausted"));
-+
-+      h->string = out;
-+      h->count = 1;
-+      hash_insert (&strings, h);
-+    }
-+  else
-+    {
-+      h->count++;
-+      assert (h->count != 0);
-+    }
-+
-+  return h->string;
-+}
-+
-+void
-+hash_strfree (ptr)
-+     char *ptr;
-+{
-+  struct hash_string *h, key;
-+
-+  if (*ptr == '\0')
-+    return;
-+
-+  key.string = ptr;
-+  key.count = 0;
-+  h = (struct hash_string *) hash_find_item (&strings, &key);
-+
-+  /* Check if string comes from hash_strdup or hash_savestring.  */
-+  if (h == NULL || h->string != ptr)
-+    {
-+      free (ptr);
-+      return;
-+    }
-+
-+  h->count--;
-+  if (h->count == 0)
-+    {
-+      struct hash_string *d;
-+
-+      d = hash_delete (&strings, h);
-+      assert (d == h);
-+      free (h->string);
-+      free (h);
-+    }
-+}
-Only in make-3.81: misc.c~
-Only in make-3.81: read.c~
diff --git a/make-newlines.patch b/make-newlines.patch
deleted file mode 100644
index d9bb313..0000000
--- a/make-newlines.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- make-3.81-orig/job.c	2007-02-21 19:10:54.000000000 +0100
-+++ make-3.81-pm/job.c	2007-02-22 18:13:59.000000000 +0100
-@@ -2706,7 +2706,7 @@
-     unsigned int line_len = strlen (line);
- 
-     char *new_line = (char *) alloca (shell_len + (sizeof (minus_c) - 1)
--				      + (line_len * 2) + 1);
-+				      + (line_len * 4) + 1);
-     char *command_ptr = NULL; /* used for batch_mode_shell mode */
- 
- # ifdef __EMX__ /* is this necessary? */
-@@ -2740,9 +2740,10 @@
- #endif
- 	    if (PRESERVE_BSNL)
- 	      {
--		*(ap++) = '\\';
-+		*(ap++) = '\'';
- 		*(ap++) = '\\';
- 		*(ap++) = '\n';
-+		*(ap++) = '\'';
- 	      }
- 
- 	    ++p;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/make.git/commitdiff/a404ec900bc958986537de7925c0632c4ef22095



More information about the pld-cvs-commit mailing list