Add GNU Make package
This commit is contained in:
45
mingw-w64-make/PKGBUILD
Normal file
45
mingw-w64-make/PKGBUILD
Normal file
@@ -0,0 +1,45 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
|
||||
_realname=make
|
||||
_mingw_suff=mingw-w64-${CARCH}
|
||||
pkgname=("${_mingw_suff}-${_realname}")
|
||||
_ver_base=4.0
|
||||
pkgver=4.0.2278.9d58570
|
||||
pkgrel=1
|
||||
pkgdesc="GNU make utility to maintain groups of programs"
|
||||
arch=('any')
|
||||
url="http://www.gnu.org/software/make"
|
||||
license=('GPL3')
|
||||
groups=("${_mingw_suff}-toolchain")
|
||||
depends=()
|
||||
makedepends=('git' 'wget')
|
||||
source=("$_realname"::'git://git.savannah.gnu.org/make.git'
|
||||
'make-getopt.patch'
|
||||
'make-linebuf-mingw.patch')
|
||||
md5sums=('SKIP'
|
||||
'5ce314a61bbb0b5b0f1f4613babc83d2'
|
||||
'a6c10267a37c4ff2d48c697ca0580c3c')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$_realname"
|
||||
printf "%s.%s.%s" "$_ver_base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname}
|
||||
patch -p1 -i ${srcdir}/make-getopt.patch
|
||||
patch -p1 -i ${srcdir}/make-linebuf-mingw.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${_realname}
|
||||
cmd /c 'build_w32.bat --without-guile gcc'
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/${_realname}
|
||||
mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include}
|
||||
cp -f gnumake.exe ${pkgdir}${MINGW_PREFIX}/bin/mingw32-make.exe
|
||||
cp -f libgnumake-1.dll.a ${pkgdir}${MINGW_PREFIX}/lib/
|
||||
cp -f gnumake.h ${pkgdir}${MINGW_PREFIX}/include/
|
||||
}
|
||||
43
mingw-w64-make/make-getopt.patch
Normal file
43
mingw-w64-make/make-getopt.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
Fixes the following warnings:
|
||||
|
||||
getopt.c: In function '_getopt_initialize':
|
||||
getopt.c:382: warning: unused parameter 'argc'
|
||||
getopt.c:382: warning: unused parameter 'argv'
|
||||
getopt.c: In function '_getopt_internal':
|
||||
getopt.c:681: warning: suggest explicit braces to avoid ambiguous 'else'
|
||||
|
||||
Index: getopt.c
|
||||
===================================================================
|
||||
RCS file: /sources/make/make/getopt.c,v
|
||||
retrieving revision 1.22
|
||||
diff -u -p -r1.22 getopt.c
|
||||
--- make-3.82.orig/getopt.c 25 Oct 2009 18:56:45 -0000 1.22
|
||||
+++ make-3.82/getopt.c 5 Jul 2010 20:05:22 -0000
|
||||
@@ -436,6 +436,9 @@ _getopt_initialize (int argc, char *cons
|
||||
}
|
||||
else
|
||||
nonoption_flags_len = 0;
|
||||
+#else
|
||||
+ (void)argc;
|
||||
+ (void)argv;
|
||||
#endif
|
||||
|
||||
return optstring;
|
||||
@@ -678,7 +681,7 @@ _getopt_internal (int argc, char *const
|
||||
optarg = nameend + 1;
|
||||
else
|
||||
{
|
||||
- if (opterr)
|
||||
+ if (opterr) {
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
@@ -689,7 +692,7 @@ _getopt_internal (int argc, char *const
|
||||
fprintf (stderr,
|
||||
_("%s: option `%c%s' doesn't allow an argument\n"),
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
-
|
||||
+ }
|
||||
nextchar += strlen (nextchar);
|
||||
|
||||
optopt = pfound->val;
|
||||
14
mingw-w64-make/make-linebuf-mingw.patch
Normal file
14
mingw-w64-make/make-linebuf-mingw.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- make.orig/main.c
|
||||
+++ make/main.c
|
||||
@@ -971,8 +971,11 @@
|
||||
|
||||
#endif
|
||||
|
||||
+/* setlocale interferes with line buffering if using parallel make on MinGW */
|
||||
+#ifndef __MINGW32__
|
||||
/* Set up gettext/internationalization support. */
|
||||
setlocale (LC_ALL, "");
|
||||
+#endif
|
||||
/* The cast to void shuts up compiler warnings on systems that
|
||||
disable NLS. */
|
||||
(void)bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
Reference in New Issue
Block a user