mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
misc/lppf: Add missing patches.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
0d3c3cd601
commit
c87f52c52b
2 changed files with 62 additions and 0 deletions
45
misc/lppf/Makefile.diff
Normal file
45
misc/lppf/Makefile.diff
Normal file
|
@ -0,0 +1,45 @@
|
|||
diff -Naur lppf-0.1-rc1/Makefile lppf-0.1-rc1.patched/Makefile
|
||||
--- lppf-0.1-rc1/Makefile 2008-01-11 12:07:27.000000000 -0500
|
||||
+++ lppf-0.1-rc1.patched/Makefile 2024-09-01 15:40:45.029466905 -0400
|
||||
@@ -4,13 +4,17 @@
|
||||
TARGET = lppf
|
||||
OBJS = libppf.o lppf.o ppf.o
|
||||
CC = g++
|
||||
-CFLAGS=-Wall -ansi -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
+MAINT_CFLAGS = -Wall -ansi -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
LINK = $(CC) -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
VPATH = ./src
|
||||
|
||||
+PREFIX ?= /usr/local
|
||||
+BINDIR ?= $(PREFIX)/bin
|
||||
+DOCDIR ?= $(PREFIX)/share/doc/$(TARGET)
|
||||
+
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .d .o .hh .cc
|
||||
-.cc.o: ; $(CC) $(CFLAGS) -c $(VPATH)/$*.cc
|
||||
+.cc.o: ; $(CC) $(CFLAGS) $(MAINT_CFLAGS) -c $(VPATH)/$*.cc
|
||||
|
||||
%.d: %.hh %.cc
|
||||
touch $@
|
||||
@@ -22,6 +26,21 @@
|
||||
$(TARGET): $(OBJS)
|
||||
$(LINK) -o $(TARGET) $(OBJS) $(LFLAGS)
|
||||
|
||||
+install:
|
||||
+ -mkdir -p $(DESTDIR)$(BINDIR)
|
||||
+ -mkdir -p $(DESTDIR)$(DOCDIR)
|
||||
+ -install -m 0755 $(TARGET) $(DESTDIR)$(BINDIR)
|
||||
+ -install -m 0644 AUTHORS $(DESTDIR)$(DOCDIR)
|
||||
+ -install -m 0644 COPYING $(DESTDIR)$(DOCDIR)
|
||||
+ -install -m 0644 README $(DESTDIR)$(DOCDIR)
|
||||
+
|
||||
+uninstall:
|
||||
+ -rm -f $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||
+ -rm -f $(DESTDIR)$(DOCDIR)/AUTHORS
|
||||
+ -rm -f $(DESTDIR)$(DOCDIR)/COPYING
|
||||
+ -rm -f $(DESTDIR)$(DOCDIR)/README
|
||||
+ -rm -rf $(DESTDIR)$(DOCDIR)
|
||||
+
|
||||
clean:
|
||||
-rm -f $(TARGET) $(OBJS) $(DEPENDENCIES) make.dep
|
||||
|
17
misc/lppf/braces.diff
Normal file
17
misc/lppf/braces.diff
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff -ur lppf-0.1-rc1/src/libppf.cc lppf-0.1-rc1/src/libppf.cc
|
||||
--- lppf-0.1-rc1/src/libppf.cc 2008-01-11 09:14:56.000000000 -0800
|
||||
+++ lppf-0.1-rc1/src/libppf.cc 2016-12-15 21:40:03.440589358 -0800
|
||||
@@ -122,11 +122,12 @@
|
||||
// Read and add chunk data. If chunkSize is 0, the first byte is the
|
||||
// data and the second is number of repetitions. This is only valid
|
||||
// for PPFv1 patches
|
||||
- if (chunkSize == 0)
|
||||
+ if (chunkSize == 0) {
|
||||
if (version == 1)
|
||||
return ERROR_PPF_FORMAT;
|
||||
else if (version == 3)
|
||||
chunkSize = 2;
|
||||
+ }
|
||||
|
||||
if ((signed)fread(buf, 1, chunkSize, file) != chunkSize)
|
||||
return ERROR_PPF_READ;
|
Loading…
Reference in a new issue