- Update to 1.26

Changes since last update:
  * Unicode fix thanx to agsags
  * Fixed some compilation warnings
  * Fix const issues thanx to Harald Gutsche
  * Fix MINGW issue where it lies about the size of a file
  * Fixed bug in with -R option
  * Prevented substitutions in strings in code
This commit is contained in:
Pietro Cerutti 2010-12-23 19:36:18 +00:00
parent 68c2f26fcf
commit 7a6cc0e548
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=266802
4 changed files with 67 additions and 43 deletions

View File

@ -7,7 +7,7 @@
#
PORTNAME= dparser
PORTVERSION= 1.23
PORTVERSION= 1.26
CATEGORIES= devel
MASTER_SITES= SF/${PORTNAME}/
DISTNAME= d-${PORTVERSION}-src

View File

@ -1,3 +1,2 @@
MD5 (d-1.23-src.tar.gz) = 41a07037cc582ed28f73b0f3fe4d16ed
SHA256 (d-1.23-src.tar.gz) = 71c9d69a1583fb05b03801e204a786ea56c3a06e95aa867c1f60e9ec9703d637
SIZE (d-1.23-src.tar.gz) = 185021
SHA256 (d-1.26-src.tar.gz) = c5797cbb92f44ee3ef529b3268bf5c519bd6c72bf80df5aea5a564746df42718
SIZE (d-1.26-src.tar.gz) = 185893

View File

@ -0,0 +1,64 @@
--- Makefile.orig 2010-12-23 19:00:21.000000000 +0000
+++ Makefile 2010-12-23 19:01:59.000000000 +0000
@@ -11,7 +11,7 @@
MINOR=26
RELEASE=$(MAJOR).$(MINOR)
-CC = gcc
+CC ?= gcc
ifndef PREFIX
PREFIX=/usr/local
@@ -38,7 +38,7 @@
ARCH = x86
endif
-ifeq ($(ARCH),x86_64)
+ifeq ($(ARCH),amd64)
CFLAGS += -fPIC
endif
@@ -64,14 +64,7 @@
CFLAGS += -DUSE_FREELISTS
endif
-D_BUILD_VERSION = $(shell svnversion .)
-ifeq ($(D_BUILD_VERSION),exported)
- D_BUILD_VERSION = $(shell git show-ref 2> /dev/null | head -1 | cut -d ' ' -f 1)
- ifeq ($(D_BUILD_VERSION),)
- D_BUILD_VERSION = $(shell cat D_BUILD_VERSION)
- endif
-endif
-CFLAGS += -DD_MAJOR_VERSION=$(MAJOR) -DD_MINOR_VERSION=$(MINOR) -DD_BUILD_VERSION=\"$(D_BUILD_VERSION)\"
+CFLAGS += -DD_MAJOR_VERSION=$(MAJOR) -DD_MINOR_VERSION=$(MINOR) -DD_BUILD_VERSION=\"\"
CFLAGS += -Wall
# debug flags
@@ -99,7 +92,7 @@
PYTHON_FILES = d/python/Makefile d/python/*.py d/python/*.c d/python/*.h d/python/*.i d/python/README d/python/*.html d/python/contrib/d* d/python/tests/*.py
VERILOG_FILES = d/verilog/Makefile d/verilog/verilog.g d/verilog/README d/verilog/ambig.c \
d/verilog/main.c d/verilog/vparse.c d/verilog/vparse.h d/verilog/verilog_tests
-TAR_FILES = $(AUX_FILES) $(TEST_FILES) $(PYTHON_FILES) $(VERILOG_FILES) d/BUILD_VERSION \
+TAR_FILES = $(AUX_FILES) $(TEST_FILES) $(PYTHON_FILES) $(VERILOG_FILES) \
d/grammar.g d/sample.g d/my.g
LIB_SRCS = arg.c parse.c scan.c symtab.c util.c read_binary.c dparse_tree.c
@@ -146,7 +139,7 @@
ALL_SRCS = $(MAKE_PARSER_SRCS) $(BASE_SAMPLE_PARSER_SRCS) $(LIB_SRCS) $(MK_LIB_SRCS)
-all: $(EXECS) $(LIBRARIES) BUILD_VERSION make_dparser.cat
+all: $(EXECS) $(LIBRARIES) make_dparser.cat
version:
echo $(OS_TYPE) $(OS_VERSION)
@@ -205,9 +198,6 @@
nroff -man make_dparser.1 | sed -e 's/.//g' > make_dparser.cat
build_version:
- rm -f BUILD_VERSION.tmp
- echo $(D_BUILD_VERSION) > BUILD_VERSION.tmp
- mv BUILD_VERSION.tmp BUILD_VERSION
tar:
(cd ..;tar czf d-$(RELEASE)-src.tar.gz d/*.c d/*.h $(TAR_FILES))

View File

@ -1,39 +0,0 @@
--- parse.c.orig Fri Feb 24 05:25:00 2006
+++ parse.c Fri Mar 3 02:04:47 2006
@@ -834,6 +834,7 @@
cmp_priorities(PNode *x, PNode *y) {
StackPNode psx, psy;
StackInt isx, isy;
+ int r;
stack_clear(&psx); stack_clear(&psy); stack_clear(&isx); stack_clear(&isy);
get_exp_one(x, &psx, &isx);
@@ -841,7 +842,7 @@
get_unshared_priorities(&psx, &psy, &isx, &isy);
intsort(isx.start, stack_depth(&isx));
intsort(isy.start, stack_depth(&isy));
- int r = compare_priorities(isx.start, stack_depth(&isx),
+ r = compare_priorities(isx.start, stack_depth(&isx),
isy.start, stack_depth(&isy));
stack_free(&psx); stack_free(&psy); stack_free(&isx); stack_free(&isy);
return r;
@@ -1202,8 +1203,8 @@
static void
set_add_znode_hash(VecZNode *v, ZNode *z) {
VecZNode vv;
- vec_clear(&vv);
int i, j, n = v->n;
+ vec_clear(&vv);
if (n) {
uint h = ((uintptr_t)z->pn) % n;
for (i = h, j = 0;
@@ -1237,8 +1238,8 @@
static void
set_add_znode(VecZNode *v, ZNode *z) {
VecZNode vv;
- vec_clear(&vv);
int i, n = v->n;
+ vec_clear(&vv);
if (n < INTEGRAL_VEC_SIZE) {
vec_add(v, z);
return;