From 2243b118b4cafad8e9edeb6074e158d5d84a2b86 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Mon, 8 May 2017 20:06:54 +0200 Subject: [PATCH] rix: fixup --- srcpkgs/rix/patches/fixes.patch | 21 +++++++++++++++++++++ srcpkgs/rix/patches/makefile.patch | 11 +++++++++++ srcpkgs/rix/patches/overflow.patch | 11 +++++++++++ srcpkgs/rix/template | 1 - 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/rix/patches/fixes.patch create mode 100644 srcpkgs/rix/patches/makefile.patch create mode 100644 srcpkgs/rix/patches/overflow.patch diff --git a/srcpkgs/rix/patches/fixes.patch b/srcpkgs/rix/patches/fixes.patch new file mode 100644 index 00000000000..f9622fb7de1 --- /dev/null +++ b/srcpkgs/rix/patches/fixes.patch @@ -0,0 +1,21 @@ +--- rixc.h.orig ++++ rixc.h +@@ -15,6 +15,7 @@ + + void defineRSLSymbols(Object *); + ++Object *directive(char *key, char *value); + Object *findByName(char *name); + Object *findFunctionByFullName(char *name); + +--- rix.l.orig ++++ rix.l +@@ -5,7 +5,7 @@ + #include "ObjectTree.h" + #include "rix.tab.h" /* Generated by bison. */ + #include "rixc.h" +-#include "error.h" ++#include "errors.h" + + #define INSERT_BUFF_LEN 1024 + #define INDENT_STACK_MAX 512 diff --git a/srcpkgs/rix/patches/makefile.patch b/srcpkgs/rix/patches/makefile.patch new file mode 100644 index 00000000000..7dbb2006431 --- /dev/null +++ b/srcpkgs/rix/patches/makefile.patch @@ -0,0 +1,11 @@ +--- Makefile.orig ++++ Makefile +@@ -7,7 +7,7 @@ + flex rix.l + + rixc: lex.yy.c rix.tab.c rix.tab.h +- gcc -ggdb preproc.c ObjectTree.c rix.tab.c lex.yy.c rixc.c errors.c crsl.c -lfl -o rixc ++ ${CC} ${CFLAGS} -ggdb preproc.c ObjectTree.c rix.tab.c lex.yy.c rixc.c errors.c crsl.c -o rixc ${LDFLAGS} + + clean: + rm rixc rix.tab.c lex.yy.c rix.tab.h diff --git a/srcpkgs/rix/patches/overflow.patch b/srcpkgs/rix/patches/overflow.patch new file mode 100644 index 00000000000..d57b727150f --- /dev/null +++ b/srcpkgs/rix/patches/overflow.patch @@ -0,0 +1,11 @@ +--- rixc.c.orig ++++ rixc.c +@@ -1563,7 +1563,7 @@ + Object *objectfloat(float f) + { + compilerDebugPrintf("objectfloat(%f)\n", f); +- char buffer[128]; ++ char buffer[BUFFLEN]; + snprintf(buffer, BUFFLEN, "%f", f); + Object *result = CreateObject(0, 0, 0, Expression, "float"); + addCode(result, buffer); diff --git a/srcpkgs/rix/template b/srcpkgs/rix/template index 228265120fc..397198dd202 100644 --- a/srcpkgs/rix/template +++ b/srcpkgs/rix/template @@ -10,7 +10,6 @@ license="GPL-3" homepage="https://github.com/riolet/rix" distfiles="https://github.com/riolet/rix/archive/v${version}.tar.gz" checksum=8727fee17cbbecec3ca8083fac80db3a2ed234c8128ec8df5cc56293e1dbb09c -nostrip=yes do_install() { vbin rixc