mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 07:37:14 +08:00
adding patches to make, fixes the systemd 198 build
This commit is contained in:
parent
b25d9c1c45
commit
1615d77d70
@ -1,46 +1,53 @@
|
||||
#
|
||||
# Chakra Packages, part of chakra-project.org
|
||||
#
|
||||
# maintainer: abveritas@chakra-project.org>
|
||||
# Maintainer: abveritas@chakra-project.org>
|
||||
|
||||
|
||||
pkgname=make
|
||||
pkgver=3.82
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="GNU make utility to maintain groups of programs"
|
||||
arch=('i686' 'x86_64')
|
||||
arch=('x86_64')
|
||||
url="http://www.gnu.org/software/make"
|
||||
license=('GPL3')
|
||||
groups=('base-devel')
|
||||
depends=('glibc' 'sh')
|
||||
install=$pkgname.install
|
||||
source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2
|
||||
bug30612.patch
|
||||
bug30723.patch
|
||||
make-3.82-sort-blank.patch
|
||||
make-3.82-makeflags.patch)
|
||||
source=("ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
|
||||
'bug30612.patch'
|
||||
'bug30723.patch'
|
||||
'make-3.82-sort-blank.patch'
|
||||
'make-3.82-makeflags.patch'
|
||||
'make-3.82-expensive_glob.patch'
|
||||
'make-3.82-dont-prune-intermediate.patch')
|
||||
md5sums=('1a11100f3c63fcf5753818e59d63088f'
|
||||
'c8f496b22191f9fb9420ab14c1a19a47'
|
||||
'662e6450e19a5acdaa5c9fcb8ad78dea'
|
||||
'7d01a99f389d8f08dec93ed479071ee4'
|
||||
'c62acc8a2925362bd780cb5d4206d5c3')
|
||||
'c62acc8a2925362bd780cb5d4206d5c3'
|
||||
'e58d4211c5b29d7d927a304d082849e7'
|
||||
'45ac9e987f4bf16c0d7e1685db943917')
|
||||
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${pkgname}-${pkgver}
|
||||
|
||||
# http://savannah.gnu.org/bugs/?30612
|
||||
patch -Np1 -i $srcdir/bug30612.patch
|
||||
patch -p1 -i $srcdir/bug30612.patch
|
||||
|
||||
# http://savannah.gnu.org/bugs/?30723
|
||||
patch -Np1 -i $srcdir/bug30723.patch
|
||||
patch -p1 -i $srcdir/bug30723.patch
|
||||
|
||||
# fix from Fedora
|
||||
patch -Np1 -i $srcdir/make-3.82-sort-blank.patch
|
||||
patch -p1 -i $srcdir/make-3.82-sort-blank.patch
|
||||
|
||||
# https://savannah.gnu.org/support/index.php?107487
|
||||
# https://savannah.gnu.org/bugs/?33873
|
||||
patch -Np0 -i $srcdir/make-3.82-makeflags.patch
|
||||
patch -p0 -i $srcdir/make-3.82-makeflags.patch
|
||||
|
||||
# http://lists.gnu.org/archive/html/bug-make/2011-04/msg00002.html
|
||||
patch -p0 -i $srcdir/make-3.82-expensive_glob.patch
|
||||
|
||||
# https://savannah.gnu.org/bugs/?30653
|
||||
patch -p0 -i $srcdir/make-3.82-dont-prune-intermediate.patch
|
||||
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
|
57
make/make-3.82-dont-prune-intermediate.patch
Normal file
57
make/make-3.82-dont-prune-intermediate.patch
Normal file
@ -0,0 +1,57 @@
|
||||
2012-09-09 Paul Smith <psmith@gnu.org>
|
||||
|
||||
* remake.c (update_file_1): Force intermediate files to be
|
||||
considered, not pruned, if their non-intermediate parent needs to
|
||||
be remade. Fixes Savannah bug #30653.
|
||||
|
||||
Index: remake.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/remake.c,v
|
||||
retrieving revision 1.153
|
||||
retrieving revision 1.154
|
||||
diff -u -r1.153 -r1.154
|
||||
--- remake.c 5 Mar 2012 14:10:45 -0000 1.153
|
||||
+++ remake.c 10 Sep 2012 02:36:05 -0000 1.154
|
||||
@@ -612,6 +612,10 @@
|
||||
d->file->dontcare = file->dontcare;
|
||||
}
|
||||
|
||||
+ /* We may have already considered this file, when we didn't know
|
||||
+ we'd need to update it. Force update_file() to consider it and
|
||||
+ not prune it. */
|
||||
+ d->file->considered = !considered;
|
||||
|
||||
dep_status |= update_file (d->file, depth);
|
||||
|
||||
Index: tests/scripts/features/parallelism
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/tests/scripts/features/parallelism,v
|
||||
retrieving revision 1.19
|
||||
retrieving revision 1.20
|
||||
diff -u -r1.19 -r1.20
|
||||
--- tests/scripts/features/parallelism 4 Mar 2012 00:24:32 -0000 1.19
|
||||
+++ tests/scripts/features/parallelism 10 Sep 2012 02:36:05 -0000 1.20
|
||||
@@ -214,6 +214,23 @@
|
||||
rmfiles(qw(foo.y foo.y.in main.bar));
|
||||
}
|
||||
|
||||
+# Ensure intermediate/secondary files are not pruned incorrectly.
|
||||
+# See Savannah bug #30653
|
||||
+
|
||||
+utouch(-15, 'file2');
|
||||
+utouch(-10, 'file4');
|
||||
+utouch(-5, 'file1');
|
||||
+
|
||||
+run_make_test(q!
|
||||
+.INTERMEDIATE: file3
|
||||
+file4: file3 ; @mv -f $< $@
|
||||
+file3: file2 ; touch $@
|
||||
+file2: file1 ; @touch $@
|
||||
+!,
|
||||
+ '--no-print-directory -j2', "touch file3");
|
||||
+
|
||||
+#rmfiles('file1', 'file2', 'file3', 'file4');
|
||||
+
|
||||
if ($all_tests) {
|
||||
# Jobserver FD handling is messed up in some way.
|
||||
# Savannah bug #28189
|
116
make/make-3.82-expensive_glob.patch
Normal file
116
make/make-3.82-expensive_glob.patch
Normal file
@ -0,0 +1,116 @@
|
||||
Index: read.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/read.c,v
|
||||
retrieving revision 1.198
|
||||
retrieving revision 1.200
|
||||
diff -u -r1.198 -r1.200
|
||||
--- read.c 29 Apr 2011 15:27:39 -0000 1.198
|
||||
+++ read.c 7 May 2011 14:36:12 -0000 1.200
|
||||
@@ -2901,6 +2901,7 @@
|
||||
const char *name;
|
||||
const char **nlist = 0;
|
||||
char *tildep = 0;
|
||||
+ int globme = 1;
|
||||
#ifndef NO_ARCHIVES
|
||||
char *arname = 0;
|
||||
char *memname = 0;
|
||||
@@ -3109,32 +3110,40 @@
|
||||
}
|
||||
#endif /* !NO_ARCHIVES */
|
||||
|
||||
- switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
|
||||
- {
|
||||
- case GLOB_NOSPACE:
|
||||
- fatal (NILF, _("virtual memory exhausted"));
|
||||
-
|
||||
- case 0:
|
||||
- /* Success. */
|
||||
- i = gl.gl_pathc;
|
||||
- nlist = (const char **)gl.gl_pathv;
|
||||
- break;
|
||||
-
|
||||
- case GLOB_NOMATCH:
|
||||
- /* If we want only existing items, skip this one. */
|
||||
- if (flags & PARSEFS_EXISTS)
|
||||
- {
|
||||
- i = 0;
|
||||
- break;
|
||||
- }
|
||||
- /* FALLTHROUGH */
|
||||
-
|
||||
- default:
|
||||
- /* By default keep this name. */
|
||||
+ /* glob() is expensive: don't call it unless we need to. */
|
||||
+ if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL)
|
||||
+ {
|
||||
+ globme = 0;
|
||||
i = 1;
|
||||
nlist = &name;
|
||||
- break;
|
||||
- }
|
||||
+ }
|
||||
+ else
|
||||
+ switch (glob (name, GLOB_NOSORT|GLOB_ALTDIRFUNC, NULL, &gl))
|
||||
+ {
|
||||
+ case GLOB_NOSPACE:
|
||||
+ fatal (NILF, _("virtual memory exhausted"));
|
||||
+
|
||||
+ case 0:
|
||||
+ /* Success. */
|
||||
+ i = gl.gl_pathc;
|
||||
+ nlist = (const char **)gl.gl_pathv;
|
||||
+ break;
|
||||
+
|
||||
+ case GLOB_NOMATCH:
|
||||
+ /* If we want only existing items, skip this one. */
|
||||
+ if (flags & PARSEFS_EXISTS)
|
||||
+ {
|
||||
+ i = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ /* FALLTHROUGH */
|
||||
+
|
||||
+ default:
|
||||
+ /* By default keep this name. */
|
||||
+ i = 1;
|
||||
+ nlist = &name;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
/* For each matched element, add it to the list. */
|
||||
while (i-- > 0)
|
||||
@@ -3174,7 +3183,8 @@
|
||||
#endif /* !NO_ARCHIVES */
|
||||
NEWELT (concat (2, prefix, nlist[i]));
|
||||
|
||||
- globfree (&gl);
|
||||
+ if (globme)
|
||||
+ globfree (&gl);
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
if (arname)
|
||||
Index: tests/scripts/functions/wildcard
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/tests/scripts/functions/wildcard,v
|
||||
retrieving revision 1.6
|
||||
retrieving revision 1.7
|
||||
diff -u -r1.6 -r1.7
|
||||
--- tests/scripts/functions/wildcard 13 Jun 2009 21:21:49 -0000 1.6
|
||||
+++ tests/scripts/functions/wildcard 7 May 2011 14:36:11 -0000 1.7
|
||||
@@ -88,4 +88,16 @@
|
||||
!,
|
||||
'', "\n");
|
||||
|
||||
+# TEST #5: wildcard used to verify file existence
|
||||
+
|
||||
+touch('xxx.yyy');
|
||||
+
|
||||
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
|
||||
+ '', "file=xxx.yyy\n");
|
||||
+
|
||||
+unlink('xxx.yyy');
|
||||
+
|
||||
+run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
|
||||
+ '', "file=\n");
|
||||
+
|
||||
1;
|
Loading…
Reference in New Issue
Block a user