patch-Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. $Id$
  2. --- procps-3.2.8.orig/Makefile 2009-05-10 20:50:48.000000000 +0200
  3. +++ procps-3.2.8/Makefile 2016-08-27 12:47:04.973853763 +0200
  4. @@ -27,10 +27,7 @@ TARVERSION := $(VERSION).$(SUBVERSION)
  5. ldconfig := ldconfig
  6. ln_f := ln -f
  7. ln_sf := ln -sf
  8. -install := install -D --owner 0 --group 0
  9. -
  10. -# Lame x86-64 /lib64 and /usr/lib64 abomination:
  11. -lib64 := lib$(shell [ -d /lib64 ] && echo 64)
  12. +install := install
  13. usr/bin := $(DESTDIR)/usr/bin/
  14. bin := $(DESTDIR)/bin/
  15. @@ -39,8 +36,8 @@ usr/proc/bin := $(DESTDIR)/u
  16. man1 := $(DESTDIR)/usr/share/man/man1/
  17. man5 := $(DESTDIR)/usr/share/man/man5/
  18. man8 := $(DESTDIR)/usr/share/man/man8/
  19. -lib := $(DESTDIR)/$(lib64)/
  20. -usr/lib := $(DESTDIR)/usr/$(lib64)/
  21. +lib := $(DESTDIR)/lib/
  22. +usr/lib := $(DESTDIR)/usr/lib/
  23. usr/include := $(DESTDIR)/usr/include/
  24. #SKIP := $(bin)kill $(man1)kill.1
  25. @@ -67,7 +64,7 @@ TARFILES := AUTHORS BUGS NEWS README TOD
  26. # plus the top-level Makefile to make it work stand-alone.
  27. _TARFILES := Makefile
  28. -CURSES := -lncurses
  29. +CURSES := -lncurses -ltinfo
  30. # This seems about right for the dynamic library stuff.
  31. # Something like this is probably needed to make the SE Linux
  32. @@ -82,7 +79,7 @@ CURSES := -lncurses
  33. # Preprocessor flags.
  34. PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
  35. -CPPFLAGS := -I/usr/include/ncurses
  36. +CPPFLAGS ?= -I/usr/include/ncurses
  37. ALL_CPPFLAGS := $(PKG_CPPFLAGS) $(CPPFLAGS)
  38. # Left out -Wconversion due to noise in glibc headers.
  39. @@ -102,11 +99,11 @@ PKG_CFLAGS := -fno-common -ffast-math
  40. -Wstrict-prototypes -Wmissing-prototypes
  41. # Note that some stuff below is conditional on CFLAGS containing
  42. # an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.)
  43. -CFLAGS := -O2 -s
  44. +CFLAGS ?= -O2 -s
  45. ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS)
  46. PKG_LDFLAGS := -Wl,-warn-common
  47. -LDFLAGS :=
  48. +LDFLAGS ?=
  49. ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
  50. ############ Add some extra flags if gcc allows
  51. @@ -128,7 +125,7 @@ check_gcc = $(shell if $(CC) $(ALL_CPPFL
  52. # i386 and x86-64, mips and mips64, sparc and sparc64, and so on.
  53. # Failure to do so will cause data corruption.
  54. m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,))
  55. -ALL_CFLAGS += $(m64)
  56. +#ALL_CFLAGS += $(m64)
  57. ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,)
  58. ALL_CFLAGS += $(call check_gcc,-Wpadded,)
  59. @@ -222,10 +219,16 @@ clean:
  60. ###### install
  61. $(BINFILES) : all
  62. - $(install) --mode a=rx $(notdir $@) $@
  63. + mkdir -p $(dir $@)
  64. + for f in $@; do \
  65. + install -c -m 555 $$(basename $$f) $$f; \
  66. + done
  67. $(MANFILES) : all
  68. - $(install) --mode a=r $(notdir $@) $@
  69. + mkdir -p $(dir $@)
  70. + for f in $@; do \
  71. + install -c -m 444 $$(basename $$f) $$f; \
  72. + done
  73. install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
  74. cd $(usr/bin) && $(ln_f) skill snice