aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorJim Diamond <zsd@jdvb.ca>2024-05-04 09:23:20 +0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-05-04 21:45:19 +0700
commitb2def32f9ca834adf7b205c1dbeba937cf43168d (patch)
tree5beb99c9cbeb074264013c22685c40dbce91ac13 /libraries
parent3124a077de50ee19dff887173ffb6de3677f57ce (diff)
libraries/goffice: Updated for version 0.10.57.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/goffice/goffice.SlackBuild18
-rw-r--r--libraries/goffice/goffice.info6
-rw-r--r--libraries/goffice/import-ryu97
-rw-r--r--libraries/goffice/patches/NEWS.patch11
-rw-r--r--libraries/goffice/patches/configure.ac.patch29
-rw-r--r--libraries/goffice/patches/go-dtoa.c.patch19
-rw-r--r--libraries/goffice/patches/go-ryu.c.patch204
-rw-r--r--libraries/goffice/patches/go-ryu.h.patch12
8 files changed, 6 insertions, 390 deletions
diff --git a/libraries/goffice/goffice.SlackBuild b/libraries/goffice/goffice.SlackBuild
index 39282e2f9d35..e30e2ed5f177 100644
--- a/libraries/goffice/goffice.SlackBuild
+++ b/libraries/goffice/goffice.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for goffice
# Copyright (c) 2007 alkos333 <me@alkos333.net>
+# Copyright (c) 2023-24 Jim Diamond, Dartmouth, Nova Scotia, Canada
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -31,8 +32,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=goffice
-VERSION=${VERSION:-0.10.56}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.10.57}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -57,17 +58,14 @@ if [ "$ARCH" = "i586" -o "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=$ARCH -mtune=i686"
LIBDIRSUFFIX=""
CONFIG_ARGS="--without-long-double"
- NEED_PATCHES=T
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
CONFIG_ARGS=
- NEED_PATCHES=F
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
CONFIG_ARGS=
- NEED_PATCHES=F
fi
set -e
@@ -79,16 +77,6 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
-if [ "$NEED_PATCHES" = T ]
-then
- for i in $CWD/patches/*
- do
- patch -p0 < $i
- done
- cp $CWD/import-ryu tools/
- chmod 755 tools/import-ryu
-fi
-
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff --git a/libraries/goffice/goffice.info b/libraries/goffice/goffice.info
index 209e7365ab14..7e4d226c69a5 100644
--- a/libraries/goffice/goffice.info
+++ b/libraries/goffice/goffice.info
@@ -1,8 +1,8 @@
PRGNAM="goffice"
-VERSION="0.10.56"
+VERSION="0.10.57"
HOMEPAGE="https://download.gnome.org/sources/goffice/"
-DOWNLOAD="https://download.gnome.org/sources/goffice/0.10/goffice-0.10.56.tar.xz"
-MD5SUM="50555440e0e4ccef4651193e5e0b5f62"
+DOWNLOAD="https://download.gnome.org/sources/goffice/0.10/goffice-0.10.57.tar.xz"
+MD5SUM="4c55f99d8fafe1f91276cb7538521fdb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/libraries/goffice/import-ryu b/libraries/goffice/import-ryu
deleted file mode 100644
index e99f022e0be5..000000000000
--- a/libraries/goffice/import-ryu
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/perl -w
-# -----------------------------------------------------------------------------
-
-my $ryu = $ARGV[0];
-
-my @files = (# "ryu.h",
- "common.h",
- "digit_table.h",
- "d2s_intrinsics.h",
- "d2s_small_table.h",
- 'd2s.c',
- 'WITH_LONG_DOUBLE',
- 'ryu_generic_128.h',
- 'generic_128.h',
- 'generic_128.c');
-
-print "#define RYU_OPTIMIZE_SIZE 1\n\n";
-print "#define bool int\n\n";
-print "#include \"go-ryu.h\"\n";
-print "#include <inttypes.h>\n";
-print "\n";
-
-my $with_long_double = 0;
-
-foreach my $f (@files) {
- if ($f eq 'WITH_LONG_DOUBLE') {
- $with_long_double = 1;
- next;
- }
-
- my $fn = "$ryu/ryu/$f";
-
- my $in_conditional = 0;
-
- print STDERR "Importing $f...\n";
- open my $fh, "<", $fn or die "$0: cannot read $fn:$!\n";
-
- print "#ifdef GOFFICE_WITH_LONG_DOUBLE\n" if $with_long_double;
-
- print "// File $f imported from ryu\n";
- while (<$fh>) {
- next if /^\s*#\s*include\s*"ryu.*"/;
-
- s/\b((float|double|long_double)_to_fd128|generic_binary_to_decimal|generic_to_chars|(d|f)2(s|exp|fixed)(|_buffered_n|_buffered))\b/go_ryu_$1/g;
-
- if (/\b(go_ryu_d2s_buffered|go_ryu_d2s|go_ryu_f2s_buffered_n|go_ryu_f2s_buffered|go_ryu_f2s|go_ryu_d2fixed_buffered_n|go_ryu_d2fixed_buffered|go_ryu_d2fixed|go_ryu_d2exp_buffered_n|go_ryu_d2exp_buffered|go_ryu_d2exp)\s*\([a-z]+\s.*\)(;|\s*\{)$/) {
- print "#if 0\n";
- $_ = "static $_";
- $in_conditional = 1;
- }
-
- if (/\b(go_ryu_long_double_to_fd128|go_ryu_generic_to_chars)\s*\([a-z]+\s.*\)(;|\s*\{)$/) {
- $_ = "static $_";
- }
-
- if (/struct floating_decimal_128 go_ryu_generic_binary_to_decimal\(/) {
- $_ = "static $_";
- }
-
-
- if ($f =~ /128/) {
- s/\b(pow5bits|pow5Factor|multipleOfPowerOf[25]|log10Pow[25]|copy_special_str|POW5_TABLE_SIZE)\b/$1l/g;
-
- if (/go_ryu_float_to_fd128\(float/) {
- print "#if 0\n";
- $_ = "static $_";
- $in_conditional = 1;
- }
-
- if (/go_ryu_double_to_fd128\(double/) {
- print "#if 0\n";
- $_ = "static $_";
- $in_conditional = 1;
- }
- }
-
- if ($in_conditional && (/^[a-z].*\);$/ || /^}/)) {
- $_ = "$_#endif\n";
- $in_conditional = 0;
- }
-
- print;
- }
- print "// End of file $f imported from ryu\n";
- print "#endif // GOFFICE_WITH_LONG_DOUBLE\n" if $with_long_double;
- print "\n";
-
- die "Trouble" if $in_conditional;
-}
-
-print "\n";
-print "#ifdef GOFFICE_WITH_LONG_DOUBLE\n";
-print "int go_ryu_ld2s_buffered_n (long double d, char *dst) {\n";
-print " struct floating_decimal_128 fd128 = go_ryu_long_double_to_fd128(d);\n";
-print " return go_ryu_generic_to_chars(fd128, dst);\n";
-print "}\n";
-print "#endif\n";
diff --git a/libraries/goffice/patches/NEWS.patch b/libraries/goffice/patches/NEWS.patch
deleted file mode 100644
index 773bb5a77bd4..000000000000
--- a/libraries/goffice/patches/NEWS.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- NEWS 2023-12-27 18:37:51.129423722 -0400
-+++ NEWS.patched 2023-12-27 18:36:14.000000000 -0400
-@@ -1,3 +1,8 @@
-+goffice 0.10.57:
-+
-+ * Excise long double parts of ryu unless --with-long-double.
-+
-+--------------------------------------------------------------------------
- goffice 0.10.56:
-
- B.S.:
diff --git a/libraries/goffice/patches/configure.ac.patch b/libraries/goffice/patches/configure.ac.patch
deleted file mode 100644
index 1b82b292151a..000000000000
--- a/libraries/goffice/patches/configure.ac.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- configure.ac 2023-05-19 22:19:44.000000000 -0300
-+++ configure.ac.fixed 2023-12-27 16:38:43.520064640 -0400
-@@ -560,14 +560,23 @@
- GOFFICE_CHECK_FUNC(acosh)
- GOFFICE_CHECK_FUNC(atanh)
-
-+AC_TYPE_LONG_DOUBLE
-+dnl go-ryu needs __uint128_t for long double support.
-+AC_CHECK_TYPES([__uint128_t], [], [], [[#include <inttypes.h>
-+#include <stdint.h>]])
-+if test $ac_cv_type_long_double.$ac_cv_type___uint128_t = yes.yes; then
-+ with_long_double_default=yes
-+else
-+ with_long_double_default=no
-+fi
-+
- float_msg=no
- AC_ARG_WITH(long-double,
- [ --without-long-double disable support for long double],
-- , [ with_long_double=yes])
-+ , [ with_long_double=$with_long_double_default])
-
- if test "x$with_long_double" = "xyes"; then
-- AC_TYPE_LONG_DOUBLE
-- if test $ac_cv_type_long_double = yes; then
-+ if test $with_long_double_default = yes; then
- have_mandatory_funcs=yes
- need_sunmath=0
- ss_ccprog=`echo $CC | sed -e 's/ .*//'`
diff --git a/libraries/goffice/patches/go-dtoa.c.patch b/libraries/goffice/patches/go-dtoa.c.patch
deleted file mode 100644
index 525d2893b8a6..000000000000
--- a/libraries/goffice/patches/go-dtoa.c.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- goffice/math/go-dtoa.c 2023-05-21 13:08:07.000000000 -0300
-+++ goffice/math/go-dtoa.c.patched 2023-12-27 19:28:35.623167312 -0400
-@@ -464,9 +464,14 @@
- GString const *dec = go_locale_get_decimal();
-
- g_string_set_size (dst, 53 + oldlen + dec->len);
-- if (is_long)
-+ if (is_long) {
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- n = go_ryu_ld2s_buffered_n (d, dst->str + oldlen);
-- else
-+#else
-+ g_critical ("Compiled with long-double, then asked to use it");
-+ return;
-+#endif
-+ } else
- n = go_ryu_d2s_buffered_n ((double)d, dst->str + oldlen);
- g_string_set_size (dst, oldlen + n);
- dpos = strchr (dst->str + oldlen, '.');
diff --git a/libraries/goffice/patches/go-ryu.c.patch b/libraries/goffice/patches/go-ryu.c.patch
deleted file mode 100644
index 6d0513c7521e..000000000000
--- a/libraries/goffice/patches/go-ryu.c.patch
+++ /dev/null
@@ -1,204 +0,0 @@
---- goffice/math/go-ryu.c 2023-05-20 20:02:02.000000000 -0300
-+++ goffice/math/go-ryu.c.patched 2023-12-27 19:28:35.623167312 -0400
-@@ -3,55 +3,8 @@
- #define bool int
-
- #include "go-ryu.h"
--// File ryu.h imported from ryu
--// Copyright 2018 Ulf Adams
--//
--// The contents of this file may be used under the terms of the Apache License,
--// Version 2.0.
--//
--// (See accompanying file LICENSE-Apache or copy at
--// http://www.apache.org/licenses/LICENSE-2.0)
--//
--// Alternatively, the contents of this file may be used under the terms of
--// the Boost Software License, Version 1.0.
--// (See accompanying file LICENSE-Boost or copy at
--// https://www.boost.org/LICENSE_1_0.txt)
--//
--// Unless required by applicable law or agreed to in writing, this software
--// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
--// KIND, either express or implied.
--#ifndef RYU_H
--#define RYU_H
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
- #include <inttypes.h>
-
--int go_ryu_d2s_buffered_n(double f, char* result);
--void go_ryu_d2s_buffered(double f, char* result);
--char* go_ryu_d2s(double f);
--
--int go_ryu_f2s_buffered_n(float f, char* result);
--void go_ryu_f2s_buffered(float f, char* result);
--char* go_ryu_f2s(float f);
--
--int go_ryu_d2fixed_buffered_n(double d, uint32_t precision, char* result);
--void go_ryu_d2fixed_buffered(double d, uint32_t precision, char* result);
--char* go_ryu_d2fixed(double d, uint32_t precision);
--
--int go_ryu_d2exp_buffered_n(double d, uint32_t precision, char* result);
--void go_ryu_d2exp_buffered(double d, uint32_t precision, char* result);
--char* go_ryu_d2exp(double d, uint32_t precision);
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif // RYU_H
--// End of file ryu.h imported from ryu
--
- // File common.h imported from ryu
- // Copyright 2018 Ulf Adams
- //
-@@ -1242,20 +1195,25 @@
- return to_chars(v, ieeeSign, result);
- }
-
--void go_ryu_d2s_buffered(double f, char* result) {
-+#if 0
-+static void go_ryu_d2s_buffered(double f, char* result) {
- const int index = go_ryu_d2s_buffered_n(f, result);
-
- // Terminate the string.
- result[index] = '\0';
- }
-+#endif
-
--char* go_ryu_d2s(double f) {
-+#if 0
-+static char* go_ryu_d2s(double f) {
- char* const result = (char*) malloc(25);
- go_ryu_d2s_buffered(f, result);
- return result;
- }
-+#endif
- // End of file d2s.c imported from ryu
-
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- // File ryu_generic_128.h imported from ryu
- // Copyright 2018 Ulf Adams
- //
-@@ -1303,16 +1261,20 @@
- bool sign;
- };
-
--struct floating_decimal_128 go_ryu_float_to_fd128(float f);
--struct floating_decimal_128 go_ryu_double_to_fd128(double d);
-+#if 0
-+static struct floating_decimal_128 go_ryu_float_to_fd128(float f);
-+#endif
-+#if 0
-+static struct floating_decimal_128 go_ryu_double_to_fd128(double d);
-+#endif
-
- // According to wikipedia (https://en.wikipedia.org/wiki/Long_double), this likely only works on
- // x86 with specific compilers (clang?). May need an ifdef.
--struct floating_decimal_128 go_ryu_long_double_to_fd128(long double d);
-+static struct floating_decimal_128 go_ryu_long_double_to_fd128(long double d);
-
- // Converts the given binary floating point number to the shortest decimal floating point number
- // that still accurately represents it.
--struct floating_decimal_128 go_ryu_generic_binary_to_decimal(
-+static struct floating_decimal_128 go_ryu_generic_binary_to_decimal(
- const __uint128_t bits, const uint32_t mantissaBits, const uint32_t exponentBits, const bool explicitLeadingBit);
-
- // Converts the given decimal floating point number to a string, writing to result, and returning
-@@ -1322,7 +1284,7 @@
- // Maximal char buffer requirement:
- // sign + mantissa digits + decimal dot + 'E' + exponent sign + exponent digits
- // = 1 + 39 + 1 + 1 + 1 + 10 = 53
--int go_ryu_generic_to_chars(const struct floating_decimal_128 v, char* const result);
-+static int go_ryu_generic_to_chars(const struct floating_decimal_128 v, char* const result);
-
- #ifdef __cplusplus
- }
-@@ -1330,7 +1292,9 @@
-
- #endif // RYU_GENERIC_128_H
- // End of file ryu_generic_128.h imported from ryu
-+#endif // GOFFICE_WITH_LONG_DOUBLE
-
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- // File generic_128.h imported from ryu
- // Copyright 2018 Ulf Adams
- //
-@@ -1852,7 +1816,9 @@
-
- #endif // RYU_GENERIC128_H
- // End of file generic_128.h imported from ryu
-+#endif // GOFFICE_WITH_LONG_DOUBLE
-
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- // File generic_128.c imported from ryu
- // Copyright 2018 Ulf Adams
- //
-@@ -1903,25 +1869,29 @@
- #define FLOAT_MANTISSA_BITS 23
- #define FLOAT_EXPONENT_BITS 8
-
--struct floating_decimal_128 go_ryu_float_to_fd128(float f) {
-+#if 0
-+static struct floating_decimal_128 go_ryu_float_to_fd128(float f) {
- uint32_t bits = 0;
- memcpy(&bits, &f, sizeof(float));
- return go_ryu_generic_binary_to_decimal(bits, FLOAT_MANTISSA_BITS, FLOAT_EXPONENT_BITS, false);
- }
-+#endif
-
- #define DOUBLE_MANTISSA_BITS 52
- #define DOUBLE_EXPONENT_BITS 11
-
--struct floating_decimal_128 go_ryu_double_to_fd128(double d) {
-+#if 0
-+static struct floating_decimal_128 go_ryu_double_to_fd128(double d) {
- uint64_t bits = 0;
- memcpy(&bits, &d, sizeof(double));
- return go_ryu_generic_binary_to_decimal(bits, DOUBLE_MANTISSA_BITS, DOUBLE_EXPONENT_BITS, false);
- }
-+#endif
-
- #define LONG_DOUBLE_MANTISSA_BITS 64
- #define LONG_DOUBLE_EXPONENT_BITS 15
-
--struct floating_decimal_128 go_ryu_long_double_to_fd128(long double d) {
-+static struct floating_decimal_128 go_ryu_long_double_to_fd128(long double d) {
- uint128_t bits = 0;
- memcpy(&bits, &d, sizeof(long double));
- #ifdef RYU_DEBUG
-@@ -1934,7 +1904,7 @@
- return go_ryu_generic_binary_to_decimal(bits, LONG_DOUBLE_MANTISSA_BITS, LONG_DOUBLE_EXPONENT_BITS, true);
- }
-
--struct floating_decimal_128 go_ryu_generic_binary_to_decimal(
-+static struct floating_decimal_128 go_ryu_generic_binary_to_decimal(
- const uint128_t bits, const uint32_t mantissaBits, const uint32_t exponentBits, const bool explicitLeadingBit) {
- #ifdef RYU_DEBUG
- printf("IN=");
-@@ -2147,7 +2117,7 @@
- return fd.sign + 8;
- }
-
--int go_ryu_generic_to_chars(const struct floating_decimal_128 v, char* const result) {
-+static int go_ryu_generic_to_chars(const struct floating_decimal_128 v, char* const result) {
- if (v.exponent == FD128_EXCEPTIONAL_EXPONENT) {
- return copy_special_strl(result, v);
- }
-@@ -2200,9 +2170,12 @@
- return index;
- }
- // End of file generic_128.c imported from ryu
-+#endif // GOFFICE_WITH_LONG_DOUBLE
-
-
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- int go_ryu_ld2s_buffered_n (long double d, char *dst) {
- struct floating_decimal_128 fd128 = go_ryu_long_double_to_fd128(d);
- return go_ryu_generic_to_chars(fd128, dst);
- }
-+#endif
diff --git a/libraries/goffice/patches/go-ryu.h.patch b/libraries/goffice/patches/go-ryu.h.patch
deleted file mode 100644
index 623da14e36f4..000000000000
--- a/libraries/goffice/patches/go-ryu.h.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- goffice/math/go-ryu.h 2023-05-20 19:48:32.000000000 -0300
-+++ goffice/math/go-ryu.h.patched 2023-12-27 19:28:35.623167312 -0400
-@@ -9,7 +9,9 @@
- /* ------------------------------------------------------------------------- */
-
- int go_ryu_d2s_buffered_n (double d, char *dst);
-+#ifdef GOFFICE_WITH_LONG_DOUBLE
- int go_ryu_ld2s_buffered_n (long double d, char *dst);
-+#endif
-
- /* ------------------------------------------------------------------------- */
-