pkgsrc-Changes archive

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

CVS commit: pkgsrc/editors/focuswriter



Module Name:    pkgsrc
Committed By:   nros
Date:           Fri Sep 15 16:45:01 UTC 2023

Modified Files:
        pkgsrc/editors/focuswriter: Makefile distinfo
Added Files:
        pkgsrc/editors/focuswriter/patches: patch-CMakeLists.txt
            patch-src_text__codec.cpp

Log Message:
focuswriter: fix build on NetBSD 9


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/editors/focuswriter/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/editors/focuswriter/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/editors/focuswriter/patches/patch-CMakeLists.txt \
    pkgsrc/editors/focuswriter/patches/patch-src_text__codec.cpp

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

Modified files:

Index: pkgsrc/editors/focuswriter/Makefile
diff -u pkgsrc/editors/focuswriter/Makefile:1.26 pkgsrc/editors/focuswriter/Makefile:1.27
--- pkgsrc/editors/focuswriter/Makefile:1.26    Wed Sep 13 20:37:23 2023
+++ pkgsrc/editors/focuswriter/Makefile Fri Sep 15 16:45:01 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2023/09/13 20:37:23 pin Exp $
+# $NetBSD: Makefile,v 1.27 2023/09/15 16:45:01 nros Exp $
 
 DISTNAME=      focuswriter-1.8.5
 CATEGORIES=    editors
@@ -11,7 +11,7 @@ COMMENT=      Simple, distraction-free writin
 LICENSE=       gnu-gpl-v3
 
 USE_PKGLOCALEDIR=      yes
-USE_LANGUAGES=         c++
+USE_LANGUAGES=         c c++
 USE_TOOLS+=            pkg-config
 
 CMAKE_ARGS+=   -DCMAKE_INSTALL_PREFIX=${PREFIX}

Index: pkgsrc/editors/focuswriter/distinfo
diff -u pkgsrc/editors/focuswriter/distinfo:1.5 pkgsrc/editors/focuswriter/distinfo:1.6
--- pkgsrc/editors/focuswriter/distinfo:1.5     Wed Sep  6 11:23:36 2023
+++ pkgsrc/editors/focuswriter/distinfo Fri Sep 15 16:45:01 2023
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.5 2023/09/06 11:23:36 pin Exp $
+$NetBSD: distinfo,v 1.6 2023/09/15 16:45:01 nros Exp $
 
 BLAKE2s (focuswriter-1.8.5.tar.gz) = d53a7cc040e88bbaadbe5a746ce37f5e29cd02f324ce3d798b79cf764a44d30a
 SHA512 (focuswriter-1.8.5.tar.gz) = 862c0e82657cfcb0d0c5feb014ac3d8f3c557f735bf7145cbda8a35df3abc1029ca57b5a21fe63996563c9af4c8132cdd6640c733665da7df19a001b6d997d1b
 Size (focuswriter-1.8.5.tar.gz) = 11149590 bytes
+SHA1 (patch-CMakeLists.txt) = e75a2dbac5e2a7c2eb0dcce6daf86ff28e5f666b
+SHA1 (patch-src_text__codec.cpp) = 88ff738380d3c47390f4237cb874ce362f58f91b

Added files:

Index: pkgsrc/editors/focuswriter/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/editors/focuswriter/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Fri Sep 15 16:45:01 2023
+++ pkgsrc/editors/focuswriter/patches/patch-CMakeLists.txt     Fri Sep 15 16:45:01 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2023/09/15 16:45:01 nros Exp $
+
+* Make iconv test work in NetBSD 9
+
+--- CMakeLists.txt.orig        2023-06-27 13:32:39.000000000 +0000
++++ CMakeLists.txt
+@@ -5,7 +5,7 @@
+ cmake_minimum_required(VERSION 3.16)
+ 
+ # Configure project
+-project(focuswriter VERSION 1.8.5 LANGUAGES CXX)
++project(focuswriter VERSION 1.8.5 LANGUAGES C CXX)
+ 
+ set(project_copyright "2008-2023 Graeme Gott")
+ 
Index: pkgsrc/editors/focuswriter/patches/patch-src_text__codec.cpp
diff -u /dev/null pkgsrc/editors/focuswriter/patches/patch-src_text__codec.cpp:1.1
--- /dev/null   Fri Sep 15 16:45:01 2023
+++ pkgsrc/editors/focuswriter/patches/patch-src_text__codec.cpp        Fri Sep 15 16:45:01 2023
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_text__codec.cpp,v 1.1 2023/09/15 16:45:01 nros Exp $
+
+* NetBSD 9 uses const in the second argument to iconv 
+
+--- src/text_codec.cpp.orig    2023-06-27 13:32:39.000000000 +0000
++++ src/text_codec.cpp
+@@ -14,6 +14,15 @@
+ 
+ #include <errno.h>
+ 
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#if !(__NetBSD_Prereq__(9,99,18))
++#define __NETBSD_ICONV_CONST__ 1
++#endif
++#endif
++
++
++
+ //-----------------------------------------------------------------------------
+ 
+ namespace
+@@ -79,7 +88,7 @@ TextCodecIconv::~TextCodecIconv()
+ QByteArray TextCodecIconv::fromUnicode(const QString& input)
+ {
+       QByteArray in = TextCodec::fromUnicode(input);
+-#ifndef __OS2__
++#if !(defined(__OS2__) || defined(__NETBSD_ICONV_CONST__))
+       // POSIX requires the source to not be const, even though it does not modify it
+       char* source = in.data();
+ #else
+@@ -128,7 +137,7 @@ QByteArray TextCodecIconv::fromUnicode(c
+ 
+ QString TextCodecIconv::toUnicode(const QByteArray& input)
+ {
+-#ifndef __OS2__
++#if !(defined(__OS2__) || defined(__NETBSD_ICONV_CONST__))
+       // POSIX requires the source to not be const, even though it does not modify it
+       char* source = const_cast<char*>(input.data());
+ #else



Home | Main Index | Thread Index | Old Index