pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/qalculate Use ICONV_CONST from autotools instead ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/30dd7a694c8b
branches: trunk
changeset: 405810:30dd7a694c8b
user: nros <nros%pkgsrc.org@localhost>
date: Mon Dec 09 09:31:06 2019 +0000
description:
Use ICONV_CONST from autotools instead of hardcoding OS versions
Use ICONV_CONST instead of hardcoding osversions, this is more portable.
Fixes build on SmartOS.
diffstat:
math/qalculate/Makefile | 7 +++-
math/qalculate/distinfo | 5 +-
math/qalculate/patches/patch-configure.ac | 14 ++++++++
math/qalculate/patches/patch-libqalculate_util.cc | 40 ++++------------------
4 files changed, 31 insertions(+), 35 deletions(-)
diffs (119 lines):
diff -r da208cf2cc50 -r 30dd7a694c8b math/qalculate/Makefile
--- a/math/qalculate/Makefile Mon Dec 09 09:30:10 2019 +0000
+++ b/math/qalculate/Makefile Mon Dec 09 09:31:06 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2019/11/20 22:15:28 markd Exp $
+# $NetBSD: Makefile,v 1.51 2019/12/09 09:31:06 nros Exp $
DISTNAME= libqalculate-3.5.0a
PKGNAME= qalculate-3.5.0
@@ -17,6 +17,7 @@
USE_LANGUAGES= c c++11
USE_LIBTOOL= yes
USE_PKGLOCALEDIR= yes
+USE_TOOLS+= autoconf automake
USE_TOOLS+= gmake intltool msgfmt msgmerge xgettext pkg-config
GNU_CONFIGURE= yes
PKGCONFIG_OVERRIDE= ${WRKSRC}/libqalculate.pc.in
@@ -25,6 +26,10 @@
CFLAGS.SunOS+= -D_LCONV_C99
+pre-configure:
+ set -e; cd ${WRKSRC}; \
+ autoheader; automake -a --foreign -i; autoconf
+
.include "../../devel/readline/buildlink3.mk"
.include "../../math/mpfr/buildlink3.mk"
.include "../../textproc/icu/buildlink3.mk"
diff -r da208cf2cc50 -r 30dd7a694c8b math/qalculate/distinfo
--- a/math/qalculate/distinfo Mon Dec 09 09:30:10 2019 +0000
+++ b/math/qalculate/distinfo Mon Dec 09 09:31:06 2019 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.24 2019/11/20 22:15:28 markd Exp $
+$NetBSD: distinfo,v 1.25 2019/12/09 09:31:06 nros Exp $
SHA1 (libqalculate-3.5.0a.tar.gz) = fcf76bc5a74236bff5b6ae6f0543ab13296bc34d
RMD160 (libqalculate-3.5.0a.tar.gz) = 6152daebee96026ffae7349198e72f991d85f5eb
SHA512 (libqalculate-3.5.0a.tar.gz) = 1af5cdbcac8161aaf3fec56830bebd933b60537d1a27beab01039a4232e20e54c044c799cb1681d31b63c1b8a31f5902bcfa328a25f313566bf6171577430071
Size (libqalculate-3.5.0a.tar.gz) = 2126070 bytes
-SHA1 (patch-libqalculate_util.cc) = e8d7072391d1f75b6313273452079f8426777bf6
+SHA1 (patch-configure.ac) = f5241d62bbc3f278d30813d8305c28c10b207b00
+SHA1 (patch-libqalculate_util.cc) = 300e2dd75c28ae2fdfb95ece96b400d5d67a3aac
diff -r da208cf2cc50 -r 30dd7a694c8b math/qalculate/patches/patch-configure.ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/math/qalculate/patches/patch-configure.ac Mon Dec 09 09:31:06 2019 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-configure.ac,v 1.1 2019/12/09 09:31:06 nros Exp $
+* use AM_ICONV to get ICONV_CONST
+* applied upstream https://github.com/Qalculate/libqalculate/pull/168
+--- configure.ac.orig 2019-11-05 09:31:45.000000000 +0000
++++ configure.ac
+@@ -129,7 +129,7 @@ PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >=
+ AC_SUBST(LIBXML_CFLAGS)
+ AC_SUBST(LIBXML_LIBS)
+
+-AM_ICONV_LINK()
++AM_ICONV()
+
+ dnl --------------------------------
+ dnl | check for readline |-----------------------------------------
diff -r da208cf2cc50 -r 30dd7a694c8b math/qalculate/patches/patch-libqalculate_util.cc
--- a/math/qalculate/patches/patch-libqalculate_util.cc Mon Dec 09 09:30:10 2019 +0000
+++ b/math/qalculate/patches/patch-libqalculate_util.cc Mon Dec 09 09:31:06 2019 +0000
@@ -1,47 +1,23 @@
-$NetBSD: patch-libqalculate_util.cc,v 1.1 2019/11/20 22:15:28 markd Exp $
-
-Support NetBSD iconv variant (pre-9.99.17 and newer)
-
---- libqalculate/util.cc.orig 2019-07-21 07:29:17.000000000 +0000
+$NetBSD: patch-libqalculate_util.cc,v 1.2 2019/12/09 09:31:06 nros Exp $
+* use ICONV_CONST from autotools to support const char**
+* applied upstream https://github.com/Qalculate/libqalculate/pull/168
+--- libqalculate/util.cc.orig 2019-12-08 21:53:48.021366402 +0000
+++ libqalculate/util.cc
-@@ -20,6 +20,9 @@
- #include <iconv.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#if defined(__NetBSD__)
-+#include <sys/param.h>
-+#endif
- #include <sstream>
- #include <fstream>
- #ifdef HAVE_LIBCURL
-@@ -686,6 +689,12 @@ bool removeDir(string dirpath) {
- #endif
- }
-
-+#if defined(__NetBSD__) && __NetBSD_Version__ < 999001700
-+#define ICONV_CHAR_TYPE const char **
-+#else
-+#define ICONV_CHAR_TYPE char **
-+#endif
-+
- char *locale_from_utf8(const char *str) {
- iconv_t conv = iconv_open("", "UTF-8");
- if(conv == (iconv_t) -1) return NULL;
-@@ -694,7 +703,7 @@ char *locale_from_utf8(const char *str)
+@@ -706,7 +706,7 @@ char *locale_from_utf8(const char *str)
char *dest, *buffer;
buffer = dest = (char*) malloc((outlength + 4) * sizeof(char));
if(!buffer) return NULL;
- size_t err = iconv(conv, (char **) &str, &inlength, &buffer, &outlength);
-+ size_t err = iconv(conv, (ICONV_CHAR_TYPE) &str, &inlength, &buffer, &outlength);
++ size_t err = iconv(conv, (ICONV_CONST char **) &str, &inlength, &buffer, &outlength);
if(err != (size_t) -1) err = iconv(conv, NULL, &inlength, &buffer, &outlength);
iconv_close(conv);
memset(buffer, 0, 4);
-@@ -709,7 +718,7 @@ char *locale_to_utf8(const char *str) {
+@@ -721,7 +721,7 @@ char *locale_to_utf8(const char *str) {
char *dest, *buffer;
buffer = dest = (char*) malloc((outlength + 4) * sizeof(char));
if(!buffer) return NULL;
- size_t err = iconv(conv, (char**) &str, &inlength, &buffer, &outlength);
-+ size_t err = iconv(conv, (ICONV_CHAR_TYPE) &str, &inlength, &buffer, &outlength);
++ size_t err = iconv(conv, (ICONV_CONST char**) &str, &inlength, &buffer, &outlength);
if(err != (size_t) -1) err = iconv(conv, NULL, &inlength, &buffer, &outlength);
iconv_close(conv);
memset(buffer, 0, 4 * sizeof(char));
Home |
Main Index |
Thread Index |
Old Index