libcap-2.19-build-system.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. diff -Nura libcap-2.19.orig/libcap/Makefile libcap-2.19/libcap/Makefile
  2. --- libcap-2.19.orig/libcap/Makefile 2008-12-04 05:03:12.000000000 -0200
  3. +++ libcap-2.19/libcap/Makefile 2010-05-28 14:32:06.290297694 -0300
  4. @@ -33,7 +33,7 @@
  5. endif
  6. _makenames: _makenames.c cap_names.list.h
  7. - $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@
  8. + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
  9. cap_names.h: _makenames
  10. ./_makenames > cap_names.h
  11. diff -Nura libcap-2.19.orig/Make.Rules libcap-2.19/Make.Rules
  12. --- libcap-2.19.orig/Make.Rules 2010-01-13 23:04:58.000000000 -0300
  13. +++ libcap-2.19/Make.Rules 2010-05-28 14:32:31.802296186 -0300
  14. @@ -45,25 +45,26 @@
  15. KERNEL_HEADERS := $(topdir)/libcap/include
  16. IPATH += -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
  17. -CC := gcc
  18. -CFLAGS := -O2
  19. -BUILD_CC := $(CC)
  20. -BUILD_CFLAGS := $(CFLAGS) $(IPATH)
  21. -AR := ar
  22. -RANLIB := ranlib
  23. +CC ?= gcc
  24. +CFLAGS ?= -O2
  25. +CC_FOR_BUILD ?= $(CC)
  26. +CFLAGS_FOR_BUILD ?= $(CFLAGS)
  27. +AR ?= ar
  28. +RANLIB ?= ranlib
  29. DEBUG = -g #-DDEBUG
  30. WARNINGS=-fPIC -Wall -Wwrite-strings \
  31. -Wpointer-arith -Wcast-qual -Wcast-align \
  32. -Wstrict-prototypes -Wmissing-prototypes \
  33. -Wnested-externs -Winline -Wshadow
  34. LD=$(CC) -Wl,-x -shared
  35. -LDFLAGS := #-g
  36. +LDFLAGS ?= #-g
  37. SYSTEM_HEADERS = /usr/include
  38. INCS=$(topdir)/libcap/include/sys/capability.h
  39. LDFLAGS += -L$(topdir)/libcap
  40. CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) $(IPATH)
  41. -PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
  42. +CFLAGS_FOR_BUILD += $(IPATH)
  43. +PAM_CAP := no
  44. INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
  45. DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
  46. LIBATTR := yes