The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libcap / 0001-build-system.patch
1 Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB
2 Also install the shared lib +x
3
4 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
5
6 diff -Nura libcap-2.22.orig/libcap/Makefile libcap-2.22/libcap/Makefile
7 --- libcap-2.22.orig/libcap/Makefile    2010-08-08 19:26:04.000000000 -0300
8 +++ libcap-2.22/libcap/Makefile 2011-12-14 11:33:51.761800334 -0300
9 @@ -65,7 +65,7 @@
10         install -m 0644 include/sys/capability.h $(INCDIR)/sys
11         mkdir -p -m 0755 $(LIBDIR)
12         install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
13 -       install -m 0644 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
14 +       install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
15         ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
16         ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)
17  ifeq ($(FAKEROOT),)
18 diff -Nura libcap-2.22.orig/Make.Rules libcap-2.22/Make.Rules
19 --- libcap-2.22.orig/Make.Rules 2011-07-24 23:18:23.000000000 -0300
20 +++ libcap-2.22/Make.Rules      2011-12-14 11:33:28.707278685 -0300
21 @@ -47,25 +47,25 @@
22  KERNEL_HEADERS := $(topdir)/libcap/include
23  IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
24  
25 -CC := gcc
26 -CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
27 -BUILD_CC := $(CC)
28 -BUILD_CFLAGS := $(CFLAGS) $(IPATH)
29 -AR := ar
30 -RANLIB := ranlib
31 +CC ?= gcc
32 +CFLAGS ?= -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
33 +BUILD_CC ?= $(CC)
34 +BUILD_CFLAGS ?= $(CFLAGS) $(IPATH)
35 +AR ?= ar
36 +RANLIB ?= ranlib
37  DEBUG = -g #-DDEBUG
38  WARNINGS=-Wall -Wwrite-strings \
39          -Wpointer-arith -Wcast-qual -Wcast-align \
40          -Wstrict-prototypes -Wmissing-prototypes \
41          -Wnested-externs -Winline -Wshadow
42  LD=$(CC) -Wl,-x -shared
43 -LDFLAGS := #-g
44 +LDFLAGS ?= #-g
45  
46  SYSTEM_HEADERS = /usr/include
47  INCS=$(topdir)/libcap/include/sys/capability.h
48  LDFLAGS += -L$(topdir)/libcap
49  CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
50 -PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
51 +PAM_CAP = no
52  INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
53  DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
54  LIBATTR := yes