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