pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/math/octave unbreak octave on NetBSD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/364f722b1d9a
branches:  trunk
changeset: 454679:364f722b1d9a
user:      nros <nros%pkgsrc.org@localhost>
date:      Mon Jun 14 22:16:33 2021 +0000

description:
unbreak octave on NetBSD

Change the way iconv_t void* conflict is handled
using a patch from upstream to fix PR pkg/56240 .
Due to the above remove
patch-libinterp_corefcn_input.cc and
patch-liboctave_wrappers_iconv-wrappers.h .
Execute autoconf in the configuration step so that
patch-configure.ac and patch-m4_acinclude.m4 is
actually used.
Change the PLIST so that -gnu is not used
references in patch-m4_acinclude.m4 mentions this.
Explicitly don't generate any docs since
generation octave.pdf breaks and it already exists.
Install info and man pages manually since they are
not installed due to docs not being generated.
Bump pkgrevision due to PLIST change.

diffstat:

 math/octave/Makefile                                          |  22 +++++-
 math/octave/PLIST                                             |  44 +++++-----
 math/octave/distinfo                                          |   5 +-
 math/octave/patches/patch-libinterp_corefcn_input.cc          |  15 ---
 math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.c |  27 ++++++
 math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.h |  26 ------
 6 files changed, 71 insertions(+), 68 deletions(-)

diffs (231 lines):

diff -r 663964dbe83e -r 364f722b1d9a math/octave/Makefile
--- a/math/octave/Makefile      Mon Jun 14 22:07:35 2021 +0000
+++ b/math/octave/Makefile      Mon Jun 14 22:16:33 2021 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.220 2021/05/31 07:16:51 thor Exp $
+# $NetBSD: Makefile,v 1.221 2021/06/14 22:16:33 nros Exp $
 
 DISTNAME=      octave-6.2.0
+PKGREVISION=   1
 CATEGORIES=    math
 MASTER_SITES=  ${MASTER_SITE_GNU:=octave/}
 EXTRACT_SUFX=  .tar.xz
@@ -22,7 +23,7 @@
 
 USE_LANGUAGES=         c c++ fortran77
 USE_LIBTOOL=           yes
-USE_TOOLS+=            gsed gmake:run perl pkg-config bison bsdtar:run
+USE_TOOLS+=            autoconf gsed gmake:run perl pkg-config bison bsdtar:run
 USE_TOOLS+=            makeinfo:test
 GNU_CONFIGURE=         yes
 
@@ -33,6 +34,7 @@
 #CONFIGURE_ARGS+=      --without-opengl
 #CONFIGURE_ARGS+=      --with-framework-opengl=no
 CONFIGURE_ARGS+=       --disable-java
+CONFIGURE_ARGS+=       --disable-docs
 TEST_TARGET=           check
 
 CONFIGURE_ARGS+=       --with-blas=${BLAS_LIBS:Q}
@@ -59,8 +61,14 @@
 OCTAVE_DOC=    doc/interpreter/octave.pdf doc/liboctave/liboctave.pdf \
                doc/refcard/refcard-a4.pdf doc/refcard/refcard-legal.pdf \
                doc/refcard/refcard-letter.pdf
+OCTAVE_INFO=   doc/interpreter/octave.info doc/liboctave/liboctave.info
+OCTAVE_MAN=    doc/interpreter/mkoctfile.1 doc/interpreter/octave.1 \
+               doc/interpreter/octave-cli.1 doc/interpreter/octave-config.1
+
 
 INSTALLATION_DIRS+=    share/octave/${PKGVERSION_NOREV}/doc
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
+INSTALLATION_DIRS+=    ${PKGINFODIR}
 
 PRINT_PLIST_AWK+=      { gsub(/${MACHINE_GNU_PLATFORM}/, "$${MACHINE_GNU_PLATFORM}"); }
 CHECK_WRKREF_SKIP+=    lib/octave/${PKGVERSION_NOREV}/liboctinterp*.${SHLIB_TYPE}* \
@@ -88,10 +96,20 @@
 
 CHECK_WRKREF_SKIP+=    lib/octave/${PKGVERSION_NOREV}/liboctinterp.so*
 
+pre-configure:
+       cd ${WRKSRC} && autoconf
+
 post-install:
 .for f in ${OCTAVE_DOC}
        ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/share/octave/${PKGVERSION_NOREV}/doc
 .endfor
+.for f in ${OCTAVE_MAN}
+       ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.endfor
+.for f in ${OCTAVE_INFO}
+       ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${PKGINFODIR}
+.endfor
+
        ${RM} -f ${DESTDIR}/${PREFIX}/lib/charset.alias
 
 .include "../../audio/libsndfile/buildlink3.mk"
diff -r 663964dbe83e -r 364f722b1d9a math/octave/PLIST
--- a/math/octave/PLIST Mon Jun 14 22:07:35 2021 +0000
+++ b/math/octave/PLIST Mon Jun 14 22:16:33 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.35 2021/05/31 07:16:51 thor Exp $
+@comment $NetBSD: PLIST,v 1.36 2021/06/14 22:16:33 nros Exp $
 bin/mkoctfile
 bin/mkoctfile-${PKGVERSION}
 bin/octave
@@ -773,23 +773,23 @@
 lib/octave/${PKGVERSION}/liboctave.la
 lib/octave/${PKGVERSION}/liboctgui.la
 lib/octave/${PKGVERSION}/liboctinterp.la
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/PKG_ADD
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__delaunayn__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__fltk_uigetfile__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__glpk__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__init_fltk__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__init_gnuplot__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__ode15__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/__voronoi__.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/audiodevinfo.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/audioread.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/convhulln.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/fftw.oct
-lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}-gnu/gzip.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/PKG_ADD
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__delaunayn__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__fltk_uigetfile__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__glpk__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__init_fltk__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__init_gnuplot__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__ode15__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/__voronoi__.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/audiodevinfo.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/audioread.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/convhulln.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/fftw.oct
+lib/octave/${PKGVERSION}/oct/${MACHINE_GNU_PLATFORM}/gzip.oct
 lib/pkgconfig/octave.pc
 lib/pkgconfig/octinterp.pc
-libexec/octave/${PKGVERSION}/exec/${MACHINE_GNU_PLATFORM}-gnu/octave-gui
-libexec/octave/${PKGVERSION}/exec/${MACHINE_GNU_PLATFORM}-gnu/octave-svgconvert
+libexec/octave/${PKGVERSION}/exec/${MACHINE_GNU_PLATFORM}/octave-gui
+libexec/octave/${PKGVERSION}/exec/${MACHINE_GNU_PLATFORM}/octave-svgconvert
 man/man1/mkoctfile.1
 man/man1/octave-cli.1
 man/man1/octave-config.1
@@ -2380,9 +2380,9 @@
 share/octave/site/m/startup/octaverc
 @pkgdir share/octave/site/api-v55/m
 @pkgdir share/octave/${PKGVERSION}/site/m
-@pkgdir lib/octave/site/oct/${MACHINE_GNU_PLATFORM}-gnu
-@pkgdir lib/octave/site/oct/api-v55/${MACHINE_GNU_PLATFORM}-gnu
-@pkgdir lib/octave/${PKGVERSION}/site/oct/${MACHINE_GNU_PLATFORM}-gnu
-@pkgdir libexec/octave/site/exec/${MACHINE_GNU_PLATFORM}-gnu
-@pkgdir libexec/octave/api-v55/site/exec/${MACHINE_GNU_PLATFORM}-gnu
-@pkgdir libexec/octave/${PKGVERSION}/site/exec/${MACHINE_GNU_PLATFORM}-gnu
+@pkgdir lib/octave/site/oct/${MACHINE_GNU_PLATFORM}
+@pkgdir lib/octave/site/oct/api-v55/${MACHINE_GNU_PLATFORM}
+@pkgdir lib/octave/${PKGVERSION}/site/oct/${MACHINE_GNU_PLATFORM}
+@pkgdir libexec/octave/site/exec/${MACHINE_GNU_PLATFORM}
+@pkgdir libexec/octave/api-v55/site/exec/${MACHINE_GNU_PLATFORM}
+@pkgdir libexec/octave/${PKGVERSION}/site/exec/${MACHINE_GNU_PLATFORM}
diff -r 663964dbe83e -r 364f722b1d9a math/octave/distinfo
--- a/math/octave/distinfo      Mon Jun 14 22:07:35 2021 +0000
+++ b/math/octave/distinfo      Mon Jun 14 22:16:33 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.59 2021/05/31 07:16:51 thor Exp $
+$NetBSD: distinfo,v 1.60 2021/06/14 22:16:33 nros Exp $
 
 SHA1 (octave-6.2.0.tar.xz) = 0b6826ebf4174fee1f3dd87907e5cd0fa9a3d481
 RMD160 (octave-6.2.0.tar.xz) = 0dd692760091d1144f157209c5af3aa893d34ff6
@@ -8,11 +8,10 @@
 SHA1 (patch-doc_interpreter_module.mk) = 66389cceddbe71fca0c8197275a839170d64ad5b
 SHA1 (patch-fseeko-fpos_t.c) = b38e7a38be2e0b323cd7f168f1d22d3df998691c
 SHA1 (patch-libgnu_stdio.in.h) = 952e8683a70615b5219d034b9232420998cef44a
-SHA1 (patch-libinterp_corefcn_input.cc) = 865fe4e50f2658d2d221cf8d30d778fa9a632f5f
 SHA1 (patch-libinterp_dldfcn_config-module.awk) = 54b64357b1ef80c5e55eb5eccf742d2267eb277d
 SHA1 (patch-libinterp_dldfcn_module.mk) = 2362d824497a8892078437c24757ae1e40e2e556
 SHA1 (patch-liboctave_util_quit.cc) = 17ace431c53de1e5b72b86bb2bf4e15bdc6d4db9
-SHA1 (patch-liboctave_wrappers_iconv-wrappers.h) = 9995e784844ae2c2d7a77f975cd8b8954ab8a773
+SHA1 (patch-liboctave_wrappers_iconv-wrappers.c) = bbc8d18a230e59d5ac5ae6951b14fc3a2bd0b924
 SHA1 (patch-m4_acinclude.m4) = 2c5b2fc9bfe3b9b1e1feec805338ed92ed3953e1
 SHA1 (patch-scripts_miscellaneous_unpack.m) = 82c9ca170762e223c8e5a6f88a7dd9fe2a2a33d0
 SHA1 (patch-scripts_pkg_private_configure__make.m) = 7d4b620f889faa66c4c9c581ef8a7e7692b68c94
diff -r 663964dbe83e -r 364f722b1d9a math/octave/patches/patch-libinterp_corefcn_input.cc
--- a/math/octave/patches/patch-libinterp_corefcn_input.cc      Mon Jun 14 22:07:35 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-libinterp_corefcn_input.cc,v 1.2 2020/04/12 21:19:32 adam Exp $
-
-Do not conflict between header and body
-
---- libinterp/corefcn/input.cc.orig    2020-01-28 01:57:35.000000000 +0000
-+++ libinterp/corefcn/input.cc
-@@ -521,7 +521,7 @@ namespace octave
-               ? octave_locale_charset_wrapper () : m_mfile_encoding;
- 
-             // Check for valid encoding name.
--            void *codec
-+            iconv_t codec
-               = octave_iconv_open_wrapper (encoding.c_str (), "utf-8");
- 
-             if (codec == reinterpret_cast<void *> (-1))
diff -r 663964dbe83e -r 364f722b1d9a math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.c     Mon Jun 14 22:16:33 2021 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-liboctave_wrappers_iconv-wrappers.c,v 1.1 2021/06/14 22:16:33 nros Exp $
+
+ * fix iconv_t void* confict pkg/56240
+ from upstream:
+ https://hg.savvannah.gnu.org/hgweb/octave/rev/69087119ee84
+
+--- liboctave/wrappers/iconv-wrappers.c.orig   2021-02-19 17:36:34.000000000 +0000
++++ liboctave/wrappers/iconv-wrappers.c
+@@ -31,14 +31,14 @@
+ 
+ #include "iconv-wrappers.h"
+ 
+-iconv_t
++void *
+ octave_iconv_open_wrapper (const char *tocode, const char *fromcode)
+ {
+-  return iconv_open (tocode, fromcode);
++  return (void *) iconv_open (tocode, fromcode);
+ }
+ 
+ int
+-octave_iconv_close_wrapper (iconv_t cd)
++octave_iconv_close_wrapper (void * cd)
+ {
+-  return iconv_close (cd);
++  return iconv_close ((iconv_t) cd);
+ }
diff -r 663964dbe83e -r 364f722b1d9a math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.h
--- a/math/octave/patches/patch-liboctave_wrappers_iconv-wrappers.h     Mon Jun 14 22:07:35 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-$NetBSD: patch-liboctave_wrappers_iconv-wrappers.h,v 1.1 2019/03/05 11:11:12 ryoon Exp $
-
-* Do not conflict between header and body
-
---- liboctave/wrappers/iconv-wrappers.h.orig   2019-02-23 17:33:37.000000000 +0000
-+++ liboctave/wrappers/iconv-wrappers.h
-@@ -23,15 +23,17 @@ along with Octave; see the file COPYING.
- #if ! defined (octave_iconv_wrappers_h)
- #define octave_iconv_wrappers_h 1
- 
-+#include <iconv.h>
-+
- #if defined __cplusplus
- extern "C" {
- #endif
- 
--extern void *
-+extern iconv_t
- octave_iconv_open_wrapper (const char *tocode, const char *fromcode);
- 
- extern int
--octave_iconv_close_wrapper (void *cd);
-+octave_iconv_close_wrapper (iconv_t cd);
- 
- #if defined __cplusplus
- }



Home | Main Index | Thread Index | Old Index