summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaks Verver2018-10-14 16:28:37 +0200
committerMaks Verver2018-10-14 16:28:37 +0200
commit27b2739d99b949157ada7d34f2b5effc5c511744 (patch)
tree9b7729fe9e281fd59b8717705932c07bbbcd0308
parent63d2ee37aa618ec160521bd88662de4ce95b135d (diff)
downloadaur-27b2739d99b949157ada7d34f2b5effc5c511744.tar.gz
Fix build of uml_utilities on Arch Linux.
The patch applies two changes: 1. Don't override CFLAGS in Makefiles. This allows settings from /etc/makepkg.conf to take effect. 2. Fix compilation of uml_net/host.c by adding #include <sys/sysmacros.h>
-rw-r--r--PKGBUILD10
-rw-r--r--uml_utilities.patch53
2 files changed, 60 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f715bb26e31e..404e4ada65c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,13 +10,17 @@ depends=('fuse' 'readline')
provides=('')
conflicts=('')
url="http://user-mode-linux.sourceforge.net/"
-source=( "http://user-mode-linux.sourceforge.net/${pkgname}_${pkgver}.tar.bz2")
+source=(
+ "http://user-mode-linux.sourceforge.net/${pkgname}_${pkgver}.tar.bz2"
+ "uml_utilities.patch")
license=('GPL2')
-md5sums=('b0468ac8b79cef53f36f5f9517907462')
+md5sums=(
+ 'b0468ac8b79cef53f36f5f9517907462'
+ '8fbcca01953da90c48f5ec06f564480f')
prepare() {
cd "$srcdir/tools-$pkgver"
- sed 's|lib64|lib|g' -i Makefile || return 3
+ patch -Np1 -i "${srcdir}/uml_utilities.patch"
}
build() {
diff --git a/uml_utilities.patch b/uml_utilities.patch
new file mode 100644
index 000000000000..9a5afc184bb3
--- /dev/null
+++ b/uml_utilities.patch
@@ -0,0 +1,53 @@
+diff -ru tools-20070815.orig/lib/Makefile tools-20070815/lib/Makefile
+--- tools-20070815.orig/lib/Makefile 2006-02-15 18:04:44.000000000 +0100
++++ tools-20070815/lib/Makefile 2018-10-14 16:14:53.694209536 +0200
+@@ -1,6 +1,6 @@
+ LIB = libuml.a
+ OBJS = rights.o
+-CFLAGS = -g -Wall
++CFLAGS ?= -g -Wall
+
+ all : $(LIB)
+
+diff -ru tools-20070815.orig/Makefile tools-20070815/Makefile
+--- tools-20070815.orig/Makefile 2006-02-27 20:38:55.000000000 +0100
++++ tools-20070815/Makefile 2018-10-14 16:14:53.694209536 +0200
+@@ -6,13 +6,9 @@
+ TARBALL = uml_utilities_$(UMLVER).tar.bz2
+ BIN_DIR = /usr/bin
+
+-ifeq ($(shell uname -m),x86_64)
+-LIB_DIR = /usr/lib64/uml
+-else
+ LIB_DIR = /usr/lib/uml
+-endif
+
+-CFLAGS = -g -Wall
++CFLAGS ?= -g -Wall
+ #CFLAGS = -g -O2 -Wall
+
+ export BIN_DIR LIB_DIR CFLAGS
+diff -ru tools-20070815.orig/umlfs/Makefile tools-20070815/umlfs/Makefile
+--- tools-20070815.orig/umlfs/Makefile 2006-02-27 22:11:25.000000000 +0100
++++ tools-20070815/umlfs/Makefile 2018-10-14 16:19:31.607958547 +0200
+@@ -1,7 +1,8 @@
+ BIN = uml_mount
+ OBJS = $(BIN).o
+ # I have the FUSE headers in /usr/local/include
+-CFLAGS = -g -Wall -D_FILE_OFFSET_BITS=64 -I/usr/local/include
++CFLAGS ?= -g -Wall -I/usr/local/include
++CFLAGS += -D_FILE_OFFSET_BITS=64
+ LIBS = -lfuse
+
+ BIN_DIR ?= /usr/bin
+diff -ru tools-20070815.orig/uml_net/host.c tools-20070815/uml_net/host.c
+--- tools-20070815.orig/uml_net/host.c 2006-02-27 21:19:52.000000000 +0100
++++ tools-20070815/uml_net/host.c 2018-10-14 16:14:53.694209536 +0200
+@@ -10,6 +10,7 @@
+ #include <ctype.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include "output.h"
+ #include "host.h"
+