From 0e200be7fac678d5054051a6ff25bb3dbbf36f82 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 28 Feb 2018 13:02:34 +0100 Subject: [PATCH] discount: update to 2.2.3. --- .../patches/cross-configure_inc.patch | 110 +++++++++--------- .../discount/patches/cross-makefile_in.patch | 19 ++- srcpkgs/discount/template | 6 +- 3 files changed, 64 insertions(+), 71 deletions(-) diff --git a/srcpkgs/discount/patches/cross-configure_inc.patch b/srcpkgs/discount/patches/cross-configure_inc.patch index 7572676492..aeb739756d 100644 --- a/srcpkgs/discount/patches/cross-configure_inc.patch +++ b/srcpkgs/discount/patches/cross-configure_inc.patch @@ -1,29 +1,16 @@ Replace the compile time check for the scalar types required to replace BYTE, WORD and DWORD with stdint.h types. ---- configure.inc 2017-01-19 03:42:06.000000000 +0100 -+++ configure.inc 2018-01-01 18:49:05.494530670 +0100 -@@ -895,86 +895,28 @@ - +--- configure.inc.orig ++++ configure.inc +@@ -948,81 +948,27 @@ rc=1 LOGN "defining WORD & DWORD scalar types" -- --# --- is this needed anymore? --- + -# if AC_QUIET AC_CHECK_HEADERS WinDef.h; then -# # windows machine; BYTE, WORD, DWORD already -# # defined --# --# for x in $@; do --# case "$x" in --# sub)AC_SUB DWORD DWORD --# AC_SUB WORD WORD --# AC_SUB BYTE BYTE --# ;; --# *) --# echo "#include " >> "$__cwd"/config.h --# ;; --# esac --# done +-# echo "#include " >> "$__cwd"/config.h -# TLOG " (defined in WinDef.h)" -# return 0 -# fi @@ -41,6 +28,7 @@ to replace BYTE, WORD and DWORD with stdint.h types. - : "s:@%s@:%s:g\n", w, v); -} - +-int -main(argc, argv) -char **argv; -{ @@ -56,71 +44,77 @@ to replace BYTE, WORD and DWORD with stdint.h types. - else if (sizeof v_int == 4) - say("DWORD", "unsigned int"); - else -- exit(1); +- return 1; - - if (sizeof v_int == 2) - say("WORD", "unsigned int"); - else if (sizeof v_short == 2) - say("WORD", "unsigned short"); - else -- exit(2); +- return 2; +- - say("BYTE", "unsigned char"); -- exit(0); +- fprintf(stderr, "OK!"); +- return 0; -} -EOF +- - if $AC_CC ngc$$.c -o ngc$$; then -- while [ "$1" ]; do -- case "$1" in -- sub)if ./ngc$$ sub >> "$__cwd"/config.sub; then -- rc=0 -- fi;; -- *) if ./ngc$$ >> "$__cwd"/config.h; then -- rc=0 -- fi ;; -- esac -- shift -- done +- if [ $# -gt 0 ]; then +- while [ "$1" ]; do +- case "$1" in +- sub)if ./ngc$$ sub >> "$__cwd"/config.sub; then +- rc=0 +- fi;; +- *) if ./ngc$$ >> "$__cwd"/config.h; then +- rc=0 +- fi ;; +- esac +- shift +- done +- elif ./ngc$$ >> "$__cwd"/config.h; then +- rc=0 +- fi - if [ "$rc" != 0 ]; then - if ./ngc$$ >> "$__cwd"/config.h; then -- rc=1 +- rc=0 - fi - fi - fi - __remove ngc$$ ngc$$.c -+ -+ while [ "$1" ]; do -+ case "$1" in -+ sub) # substitution strings for BYTE, WORD, DWORD -+ echo "s:@DWORD@:uint32_t:g" >> "$__cwd"/config.sub -+ echo "s:@WORD@:uint16_t:g" >> "$__cwd"/config.sub -+ echo "s:@BYTE@:uint8_t:g" >> "$__cwd"/config.sub -+ rc=0 ++ while [ "$1" ]; do ++ case "$1" in ++ sub) # substitution strings for BYTE, WORD, DWORD ++ echo "s:@DWORD@:uint32_t:g" >> "$__cwd"/config.sub ++ echo "s:@WORD@:uint16_t:g" >> "$__cwd"/config.sub ++ echo "s:@BYTE@:uint8_t:g" >> "$__cwd"/config.sub ++ rc=0 + ;; -+ hdr) # config.h definitions for BYTE, WORD, DWORD -+ echo "#include " >> "$__cwd"/config.h -+ echo "#define BYTE uint8_t" >> "$__cwd"/config.h -+ echo "#define WORD uint16_t" >> "$__cwd"/config.h -+ echo "#define DWORD uint32_t" >> "$__cwd"/config.h -+ rc=0 ++ hdr) # config.h definitions for BYTE, WORD, DWORD ++ echo "#include " >> "$__cwd"/config.h ++ echo "#define BYTE uint8_t" >> "$__cwd"/config.h ++ echo "#define WORD uint16_t" >> "$__cwd"/config.h ++ echo "#define DWORD uint32_t" >> "$__cwd"/config.h ++ rc=0 + ;; -+ *) # unknown parameter -+ LOGN "(unknown: $1)" ++ *) # unknown parameter ++ LOGN "(unknown: $1)" + ;; -+ esac -+ shift -+ done ++ esac ++ shift ++ done case "$rc" in 0) TLOG "" ;; *) AC_FAIL " ** FAILED **" ;; -@@ -1548,7 +1548,7 @@ +@@ -1703,7 +1649,7 @@ } EOF -- $AC_CC -o config.sed ngc$$.c -+ cc -o config.sed ngc$$.c - status=$? - rm -f ngc$$.c - +- if $AC_CC -o config.sed ngc$$.c; then ++ if cc -o config.sed ngc$$.c; then + rm -f ngc$$.c + __config_files="$__config_files config.sed" + else --- mkdio.h.in 2017-01-19 03:42:06.000000000 +0100 +++ mkdio.h.in 2018-01-01 18:52:22.871544747 +0100 @@ -2,6 +2,7 @@ diff --git a/srcpkgs/discount/patches/cross-makefile_in.patch b/srcpkgs/discount/patches/cross-makefile_in.patch index 00987d2948..c59a44253e 100644 --- a/srcpkgs/discount/patches/cross-makefile_in.patch +++ b/srcpkgs/discount/patches/cross-makefile_in.patch @@ -1,9 +1,5 @@ -Compile tools to be run on the host using cc instead of $(CC). -Ideally the patch would introduce $(CC_FOR_BUILD) instead while -for Void we know that cc is going to work. - ---- Makefile.in 2017-01-19 03:42:06.000000000 +0100 -+++ Makefile.in 2018-01-01 19:33:18.233719865 +0100 +--- Makefile.in.orig ++++ Makefile.in @@ -1,5 +1,5 @@ CC=@CC@ -I. -LFLAGS=-L. @@ -11,7 +7,7 @@ for Void we know that cc is going to work. CFLAGS=@CFLAGS@ AR=@AR@ RANLIB=@RANLIB@ -@@ -83,6 +83,9 @@ +@@ -85,6 +85,9 @@ blocktags: mktags ./mktags > blocktags @@ -19,11 +15,14 @@ for Void we know that cc is going to work. + cc -o $@ $< + # example programs - @THEME@theme: theme.o $(MKDLIB) mkdio.h - @THEME@ $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o pgm_options.o -lmarkdown @LIBS@ -@@ -115,9 +118,9 @@ + @THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h + @THEME@ $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o $(COMMON) -lmarkdown @LIBS@ +@@ -123,11 +126,11 @@ done + branch: tools/branch.c config.h +- $(CC) -o branch tools/branch.c ++ cc -I. -o branch tools/branch.c cols: tools/cols.c config.h - $(CC) -o cols tools/cols.c + cc -o cols tools/cols.c diff --git a/srcpkgs/discount/template b/srcpkgs/discount/template index 928c27c330..1c5000d5df 100644 --- a/srcpkgs/discount/template +++ b/srcpkgs/discount/template @@ -1,7 +1,7 @@ # Template file for 'discount' pkgname=discount -version=2.2.2 -revision=2 +version=2.2.3 +revision=1 build_style=configure configure_script="./configure.sh" configure_args="--prefix=/usr --shared --pkg-config" @@ -10,7 +10,7 @@ maintainer="Leah Neukirchen " license="3-clause-BSD" homepage="http://www.pell.portland.or.us/~orc/Code/discount" distfiles="${homepage}/${pkgname}-${version}.tar.bz2" -checksum=ec7916731e3ef8516336333f8b7aa9e2af51e57c0017b1e03fa43f1ba6978f64 +checksum=a8ffbcdaf03923fa6878dcd2373a0a2592975f6a3b137945097302ac623fe99c do_install() { make DESTDIR=${DESTDIR} install install.man