diff options
-rw-r--r-- | misc/lppf/Makefile.diff | 45 | ||||
-rw-r--r-- | misc/lppf/braces.diff | 17 |
2 files changed, 62 insertions, 0 deletions
diff --git a/misc/lppf/Makefile.diff b/misc/lppf/Makefile.diff new file mode 100644 index 000000000000..14edb1f20258 --- /dev/null +++ b/misc/lppf/Makefile.diff @@ -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 + diff --git a/misc/lppf/braces.diff b/misc/lppf/braces.diff new file mode 100644 index 000000000000..de3367923a18 --- /dev/null +++ b/misc/lppf/braces.diff @@ -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; |