diff --git a/cdecl/PKGBUILD b/cdecl/PKGBUILD index 6485dfab..01d6f31c 100644 --- a/cdecl/PKGBUILD +++ b/cdecl/PKGBUILD @@ -13,8 +13,8 @@ depends=("libedit") makedepends=("gcc" 'make' 'libedit-devel' 'flex' 'bison') source=("http://cdecl.org/files/cdecl-blocks-2.5.tar.gz" "build.patch") -sha256sums=('9ee6402be7e4f5bb5e6ee60c6b9ea3862935bf070e6cecd0ab0842305406f3ac' - '26e368130357fbd3af99e0f4c36d2293c26fd01a2c1d793da7ce4842148192a6') +sha256sums=('775d3c950775eeb3933aeaa72baabfbaf88f8b821e3bb657003dd0c5a9194493' + '98ced4e22584a389c99ba32425c8fb2b43a81741a7e8a8e00e652e5cfcb100bc') prepare() { cd "${srcdir}/${_realname}-${pkgver}" diff --git a/cdecl/build.patch b/cdecl/build.patch index 8dc4573d..33c97633 100644 --- a/cdecl/build.patch +++ b/cdecl/build.patch @@ -1,7 +1,56 @@ -diff -Naur cdecl-blocks-2.5-orig/cdecl.c cdecl-blocks-2.5/cdecl.c ---- cdecl-blocks-2.5-orig/cdecl.c 2009-10-20 04:25:25.000000000 -0500 -+++ cdecl-blocks-2.5/cdecl.c 2014-08-30 14:15:06.676600900 -0500 -@@ -93,12 +93,12 @@ +diff --git cdecl-blocks-2.5.orig/Makefile cdecl-blocks-2.5/Makefile +index 2a1429d..86f759b 100644 +--- cdecl-blocks-2.5.orig/Makefile ++++ cdecl-blocks-2.5/Makefile +@@ -15,14 +15,14 @@ + # + # add -DUSE_READLINE To compile in support for the GNU readline library. + +-CFLAGS= -g -O2 -std=c89 ++CFLAGS= -g -O2 -std=c89 -DUSE_READLINE + # CFLAGS+= -Ddodebug=1 + CC= gcc +-LIBS= ++LIBS=-ledit + ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++ +-BINDIR= /usr/bin +-MANDIR= /usr/man/man1 +-CATDIR= /usr/man/cat1 ++BINDIR= $(PREFIX)/usr/bin ++MANDIR= $(PREFIX)/usr/share/man/man1 ++CATDIR= $(PREFIX)/usr/man/cat1 + INSTALL= install -c + INSTALL_DATA= install -c -m 644 + +@@ -34,10 +34,10 @@ c++decl: cdgram.c cdlex.c cdecl.c + rm -f cdecl + + cdlex.c: cdlex.l +- lex cdlex.l && mv lex.yy.c cdlex.c ++ lex -ocdlex.c cdlex.l + + cdgram.c: cdgram.y +- yacc cdgram.y && mv y.tab.c cdgram.c ++ yacc -ocdgram.c cdgram.y + + test: cdecl + @./cdecl < testset | diff -U 3 - test_expected_output.txt \ +@@ -48,8 +48,10 @@ test_cpp: c++decl + ./c++decl < testset++ + + install: cdecl ++ $(INSTALL) -d $(BINDIR) + $(INSTALL) cdecl $(BINDIR) + ln -s cdecl $(BINDIR)/c++decl ++ $(INSTALL) -d $(MANDIR) + $(INSTALL_DATA) cdecl.1 $(MANDIR) + $(INSTALL_DATA) c++decl.1 $(MANDIR) + +diff --git cdecl-blocks-2.5.orig/cdecl.c cdecl-blocks-2.5/cdecl.c +index 8ecaca4..c839c17 100644 +--- cdecl-blocks-2.5.orig/cdecl.c ++++ cdecl-blocks-2.5/cdecl.c +@@ -93,12 +93,12 @@ void free(), exit(), perror(); #endif /* __STDC__ || DOS */ #ifdef USE_READLINE @@ -17,7 +66,7 @@ diff -Naur cdecl-blocks-2.5-orig/cdecl.c cdecl-blocks-2.5/cdecl.c #endif /* maximum # of chars from progname to display in prompt */ -@@ -379,7 +379,7 @@ +@@ -379,7 +379,7 @@ char *options[] = { static char *line_read = NULL; /* Read a string, and return a pointer to it. Returns NULL on EOF. */ @@ -26,7 +75,7 @@ diff -Naur cdecl-blocks-2.5-orig/cdecl.c cdecl-blocks-2.5/cdecl.c { /* If the buffer has already been allocated, return the memory to the free pool. */ -@@ -408,7 +408,7 @@ +@@ -408,7 +408,7 @@ char ** attempt_completion(char *text, int start, int end) return matches; } @@ -35,7 +84,7 @@ diff -Naur cdecl-blocks-2.5-orig/cdecl.c cdecl-blocks-2.5/cdecl.c { static int index, len; char *command; -@@ -891,7 +891,7 @@ +@@ -891,7 +891,7 @@ int dostdin() if (!quiet) (void) printf("Type `help' or `?' for help\n"); ret = 0; @@ -44,48 +93,3 @@ diff -Naur cdecl-blocks-2.5-orig/cdecl.c cdecl-blocks-2.5/cdecl.c if (!strcmp(line, "quit") || !strcmp(line, "exit")) { free(line); return ret; -diff -Naur cdecl-blocks-2.5-orig/Makefile cdecl-blocks-2.5/Makefile ---- cdecl-blocks-2.5-orig/Makefile 2009-10-20 04:25:25.000000000 -0500 -+++ cdecl-blocks-2.5/Makefile 2014-08-30 14:37:29.722208400 -0500 -@@ -15,13 +15,13 @@ - # - # add -DUSE_READLINE To compile in support for the GNU readline library. - --CFLAGS= -g -O2 -+CFLAGS= -g -O2 -DUSE_READLINE - CC= gcc --LIBS= -+LIBS=-ledit - ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++ --BINDIR= /usr/bin --MANDIR= /usr/man/man1 --CATDIR= /usr/man/cat1 -+BINDIR= $(PREFIX)/usr/bin -+MANDIR= $(PREFIX)/usr/share/man/man1 -+CATDIR= $(PREFIX)/usr/man/cat1 - INSTALL= install -c - INSTALL_DATA= install -c -m 644 - -@@ -33,18 +33,20 @@ - rm -f cdecl - - cdlex.c: cdlex.l -- lex cdlex.l && mv lex.yy.c cdlex.c -+ lex -ocdlex.c cdlex.l - - cdgram.c: cdgram.y -- yacc cdgram.y && mv y.tab.c cdgram.c -+ yacc -ocdgram.c cdgram.y - - test: - ./cdecl < testset - ./c++decl < testset++ - - install: cdecl -+ $(INSTALL) -d $(BINDIR) - $(INSTALL) cdecl $(BINDIR) - ln -s cdecl $(BINDIR)/c++decl -+ $(INSTALL) -d $(MANDIR) - $(INSTALL_DATA) cdecl.1 $(MANDIR) - $(INSTALL_DATA) c++decl.1 $(MANDIR) -