summaryrefslogtreecommitdiff
path: root/sys-process/psinfo/files/psinfo-0.12-asneeded.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/psinfo/files/psinfo-0.12-asneeded.patch')
-rw-r--r--sys-process/psinfo/files/psinfo-0.12-asneeded.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys-process/psinfo/files/psinfo-0.12-asneeded.patch b/sys-process/psinfo/files/psinfo-0.12-asneeded.patch
new file mode 100644
index 00000000000..97cfd7f817f
--- /dev/null
+++ b/sys-process/psinfo/files/psinfo-0.12-asneeded.patch
@@ -0,0 +1,36 @@
+ Makefile | 17 ++++++++++-------
+ 1 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2964607..fb4ece8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,10 @@
+-CC=gcc
+-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wswitch -Wshadow -Wcast-align -Wno-unused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
++CC ?=gcc
++CFLAGS ?=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wswitch -Wshadow -Wcast-align -Wno-unused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
+ INSTALL=install
+-LDFLAGS=
++LDFLAGS ?=
+ SOURCES=psinfo.c
+ EXECUTABLE=psinfo
+-TARGETDIR=/usr/local/bin
++TARGETDIR=/usr/bin
+
+ all: $(EXECUTABLE)
+
+@@ -12,7 +12,10 @@ clean:
+ rm -f $(EXECUTABLE)
+
+ install: $(EXECUTABLE)
+- $(INSTALL) -m 755 psinfo $(TARGETDIR)
++ $(INSTALL) -D -m 755 psinfo $(DESTDIR)/$(TARGETDIR)/$(EXECUTABLE)
+
+-$(EXECUTABLE): $(SOURCES)
+- $(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
++$(EXECUTABLE): psinfo.o
++ $(CC) $(LDFLAGS) -o $@ psinfo.o
++
++psinfo.o: psinfo.c
++ $(CC) $(CFLAGS) -c psinfo.c