summaryrefslogtreecommitdiff
path: root/dev-embedded/picp/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-23 10:22:15 +0100
commit8b4ace9c50842c5b83401ea7b179dcab940387e1 (patch)
tree230f3135ceaace633cf93e9838b185c4a6664c2e /dev-embedded/picp/files
parent9ee6d97c2883d42f204a533a8bc1f4562df778fb (diff)
gentoo resync : 23.09.2020
Diffstat (limited to 'dev-embedded/picp/files')
-rw-r--r--dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch83
-rw-r--r--dev-embedded/picp/files/picp-0.6.8-makefile.patch87
2 files changed, 170 insertions, 0 deletions
diff --git a/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch b/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch
new file mode 100644
index 000000000000..f458a5674621
--- /dev/null
+++ b/dev-embedded/picp/files/picp-0.6.8-C99-stdbool.patch
@@ -0,0 +1,83 @@
+--- a/atoi_base.h
++++ b/atoi_base.h
+@@ -17,6 +17,8 @@
+ #ifndef __ATOI_BASE_H_
+ #define __ATOI_BASE_H_
+
++#include <stdbool.h>
++
+ #ifdef WIN32
+ #define bool int
+ #endif
+--- a/parse.h
++++ b/parse.h
+@@ -17,6 +17,8 @@
+ #ifndef __PARSE_H_
+ #define __PARSE_H_
+
++#include <stdbool.h>
++
+ bool GetNextByte(FILE *theFile, unsigned int *address, unsigned char *data);
+ void InitParse();
+
+--- a/picsnoop/dos/serial.h
++++ b/picsnoop/dos/serial.h
+@@ -2,7 +2,7 @@
+ #ifndef __SERIAL_H_
+ #define __SERIAL_H_
+
+-#define bool int
++#include <stdbool.h>
+
+ #define KEYINT int86(0x16, &regs, &regs)
+ #define KBHEAD 0x41a
+@@ -10,15 +10,12 @@
+
+
+ #ifndef FALSE
+-#define FALSE 0
++#define FALSE false
+ #endif
+ #ifndef TRUE
+-#define TRUE 1
++#define TRUE true
+ #endif
+
+-#define false FALSE
+-#define true TRUE
+-
+ #define INUM1 12 // interrupt vector for com1
+ #define INUM2 11 // interrupt vector for com2
+
+--- a/picsnoop/serial.h
++++ b/picsnoop/serial.h
+@@ -2,6 +2,8 @@
+ #ifndef __SERIAL_H_
+ #define __SERIAL_H_
+
++#include <stdbool.h>
++
+ #ifdef WIN32
+ #define bool int
+ #endif
+--- a/record.c
++++ b/record.c
+@@ -49,6 +49,7 @@
+ //-----------------------------------------------------------------------------
+
+ #include <stdio.h>
++#include <stdbool.h>
+
+ #ifdef WIN32
+ #include <windows.h>
+--- a/serial.h
++++ b/serial.h
+@@ -17,6 +17,8 @@
+ #ifndef __SERIAL_H_
+ #define __SERIAL_H_
+
++#include <stdbool.h>
++
+ #ifdef WIN32
+ #define bool int
+ #endif
diff --git a/dev-embedded/picp/files/picp-0.6.8-makefile.patch b/dev-embedded/picp/files/picp-0.6.8-makefile.patch
new file mode 100644
index 000000000000..7bad31af4d88
--- /dev/null
+++ b/dev-embedded/picp/files/picp-0.6.8-makefile.patch
@@ -0,0 +1,87 @@
+--- a/fixchksum/Makefile
++++ b/fixchksum/Makefile
+@@ -2,11 +2,9 @@
+ # Makefile for fixchksum
+ #
+
+-CC=gcc
+ APP=fixchksum
+-INCLUDES=-I.
+-OPTIONS=-O2 -Wall
+-CFLAGS=$(INCLUDES) $(OPTIONS)
++CPPFLAGS+=-I.
++CFLAGS+=-Wall -std=gnu99
+ SRCS=fixchksum.c
+ OBJECTS = fixchksum.o
+
+@@ -17,10 +15,6 @@
+
+ all: $(APP)
+
+-$(APP): $(OBJECTS)
+- $(CC) $(OBJECTS) -o $(APP)
+- strip $(APP)
+-
+ clean:
+ rm -f $(APP).o
+ rm -f $(APP)
+--- a/Makefile
++++ b/Makefile
+@@ -3,11 +3,9 @@
+ # PIC programmer interface
+ #
+
+-CC=gcc
+ APP=picp
+-INCLUDES=-I.
+-OPTIONS=-O2 -Wall -x c++
+-CFLAGS=$(INCLUDES) $(OPTIONS)
++CPPFLAGS+=-I.
++CFLAGS+=-Wall -std=gnu99
+ SRCS=main.c serial.c record.c parse.c atoi_base.c
+ OBJECTS = main.o serial.o record.o parse.o atoi_base.o
+
+@@ -19,16 +17,7 @@
+ all: $(APP) convert convertshort
+
+ $(APP): $(OBJECTS)
+- $(CC) $(OBJECTS) -lstdc++ -o $(APP)
+- strip $(APP)
+-
+-convert: convert.c
+- $(CC) -O2 -Wall -o convert convert.c
+- strip convert
+-
+-convertshort: convertshort.c
+- $(CC) -O2 -Wall -o convertshort convertshort.c
+- strip convertshort
++ $(CC) $(LDFLAGS) $(OBJECTS) -o $(APP)
+
+ clean:
+ rm -f *.o
+--- a/picsnoop/Makefile
++++ b/picsnoop/Makefile
+@@ -3,12 +3,9 @@
+ #
+
+ APP=picsnoop
+-CC=gcc
+
+-INCLUDES=
+-OPTIONS=-O2 -Wall -x c++
+-CFLAGS=$(INCLUDES) $(OPTIONS)
+-OBJECTS = picsnoop.o serial.o
++CFLAGS+=-Wall -std=gnu99
++OBJECTS = serial.o
+
+ WINCC=/usr/local/cross-tools/bin/i386-mingw32msvc-gcc
+ WINCFLAGS=-Wall -O2 -fomit-frame-pointer -s -I/usr/local/cross-tools/include -D_WIN32 -DWIN32
+@@ -18,8 +15,6 @@
+ all : $(APP)
+
+ $(APP) : $(OBJECTS)
+- $(CC) $(OBJECTS) -lstdc++ -o $(APP)
+- strip $(APP)
+
+ clean :
+ rm -f *.o