pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/qalculate



Module Name:    pkgsrc
Committed By:   nros
Date:           Mon Dec  9 09:31:06 UTC 2019

Modified Files:
        pkgsrc/math/qalculate: Makefile distinfo
        pkgsrc/math/qalculate/patches: patch-libqalculate_util.cc
Added Files:
        pkgsrc/math/qalculate/patches: patch-configure.ac

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 pkgsrc/math/qalculate/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/math/qalculate/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/math/qalculate/patches/patch-configure.ac
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/qalculate/Makefile
diff -u pkgsrc/math/qalculate/Makefile:1.50 pkgsrc/math/qalculate/Makefile:1.51
--- pkgsrc/math/qalculate/Makefile:1.50 Wed Nov 20 22:15:28 2019
+++ pkgsrc/math/qalculate/Makefile      Mon Dec  9 09:31:06 2019
@@ -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 @@ WRKSRC=               ${WRKDIR}/libqalculate-${PKGVER
 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 @@ UNLIMIT_RESOURCES=   datasize
 
 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"

Index: pkgsrc/math/qalculate/distinfo
diff -u pkgsrc/math/qalculate/distinfo:1.24 pkgsrc/math/qalculate/distinfo:1.25
--- pkgsrc/math/qalculate/distinfo:1.24 Wed Nov 20 22:15:28 2019
+++ pkgsrc/math/qalculate/distinfo      Mon Dec  9 09:31:06 2019
@@ -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

Index: pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc
diff -u pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc:1.1 pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc:1.2
--- pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc:1.1        Wed Nov 20 22:15:28 2019
+++ pkgsrc/math/qalculate/patches/patch-libqalculate_util.cc    Mon Dec  9 09:31:06 2019
@@ -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));

Added files:

Index: pkgsrc/math/qalculate/patches/patch-configure.ac
diff -u /dev/null pkgsrc/math/qalculate/patches/patch-configure.ac:1.1
--- /dev/null   Mon Dec  9 09:31:06 2019
+++ pkgsrc/math/qalculate/patches/patch-configure.ac    Mon Dec  9 09:31:06 2019
@@ -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            |-----------------------------------------



Home | Main Index | Thread Index | Old Index