discount: update to 2.2.6.

This commit is contained in:
Leah Neukirchen 2019-05-11 18:17:25 +02:00
parent 8e7fb1b233
commit a2c2064e73
2 changed files with 4 additions and 120 deletions

View file

@ -1,127 +1,11 @@
Replace the compile time check for the scalar types required
to replace BYTE, WORD and DWORD with stdint.h types.
--- configure.inc.orig
+++ configure.inc
@@ -948,81 +948,27 @@
rc=1
LOGN "defining WORD & DWORD scalar types"
-# if AC_QUIET AC_CHECK_HEADERS WinDef.h; then
-# # windows machine; BYTE, WORD, DWORD already
-# # defined
-# echo "#include <WinDef.h>" >> "$__cwd"/config.h
-# TLOG " (defined in WinDef.h)"
-# return 0
-# fi
-
- cat > ngc$$.c << EOF
-#include <stdio.h>
-#include <string.h>
-
-int pound_define = 1;
-
-void
-say(char *w, char *v)
-{
- printf(pound_define ? "#define %s %s\n"
- : "s:@%s@:%s:g\n", w, v);
-}
-
-int
-main(argc, argv)
-char **argv;
-{
- unsigned long v_long;
- unsigned int v_int;
- unsigned short v_short;
-
- if ( argc > 1 && strcmp(argv[1], "sub") == 0 )
- pound_define = 0;
-
- if (sizeof v_long == 4)
- say("DWORD", "unsigned long");
- else if (sizeof v_int == 4)
- say("DWORD", "unsigned int");
- else
- return 1;
-
- if (sizeof v_int == 2)
- say("WORD", "unsigned int");
- else if (sizeof v_short == 2)
- say("WORD", "unsigned short");
- else
- return 2;
-
- say("BYTE", "unsigned char");
- fprintf(stderr, "OK!");
- return 0;
-}
-EOF
-
- if $AC_CC ngc$$.c -o ngc$$; then
- 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=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
+ ;;
+ hdr) # config.h definitions for BYTE, WORD, DWORD
+ echo "#include <stdint.h>" >> "$__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)"
+ ;;
+ esac
+ shift
+ done
case "$rc" in
0) TLOG "" ;;
*) AC_FAIL " ** FAILED **" ;;
@@ -1703,7 +1649,7 @@
@@ -1770,7 +1770,7 @@
}
EOF
- if $AC_CC -o config.sed ngc$$.c; then
+ if cc -o config.sed ngc$$.c; then
+ if $BUILD_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 @@
#define _MKDIO_D
#include <stdio.h>
+#include <stdint.h>
typedef void MMIOT;

View file

@ -1,6 +1,6 @@
# Template file for 'discount'
pkgname=discount
version=2.2.5
version=2.2.6
revision=1
build_style=configure
configure_script="./configure.sh"
@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD-3-Clause"
homepage="http://www.pell.portland.or.us/~orc/Code/discount"
distfiles="https://github.com/Orc/discount/archive/v${version}.tar.gz"
checksum=1feccbd8164610cb345cf6c524a6eab77f108ad9e8420c579c9a18ff0c2affab
checksum=0beb98a66a6e38ed125e2d0a161ff6b461f6a38538bb72498766f376c94a0ad3
disable_parallel_build=yes
do_install() {