From 5821236f05fd5d79ab26663dd1b40207e6f81b7a Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sat, 20 Mar 2021 17:47:59 +0000 Subject: [PATCH] - Update to version 3.5.1, unbreak, respect CXXFLAGS - Written in C++17 and does not need Vala since v3.5.0 - mbedTLS is used instead of libcurl since v3.3.0 - Now graphic-wise depends only on jpeg and libpng --- net-im/sayaka/Makefile | 46 +++++-------------- net-im/sayaka/distinfo | 6 +-- net-im/sayaka/files/patch-SixelConverter.vala | 29 ------------ net-im/sayaka/files/patch-libcurl.vapi | 19 -------- net-im/sayaka/files/patch-src_Makefile | 15 ++++++ net-im/sayaka/files/patch-src_UString.cpp | 10 ++++ net-im/sayaka/pkg-plist | 3 -- 7 files changed, 40 insertions(+), 88 deletions(-) delete mode 100644 net-im/sayaka/files/patch-SixelConverter.vala delete mode 100644 net-im/sayaka/files/patch-libcurl.vapi create mode 100644 net-im/sayaka/files/patch-src_Makefile create mode 100644 net-im/sayaka/files/patch-src_UString.cpp delete mode 100644 net-im/sayaka/pkg-plist diff --git a/net-im/sayaka/Makefile b/net-im/sayaka/Makefile index 78954b956074..328fb69bb73f 100644 --- a/net-im/sayaka/Makefile +++ b/net-im/sayaka/Makefile @@ -1,54 +1,32 @@ # $FreeBSD$ PORTNAME= sayaka -PORTVERSION= 3.2.2 +PORTVERSION= 3.5.1 CATEGORIES= net-im MAINTAINER= sue@iwmt.org -COMMENT= Command-line twitter client for SIXEL-supported terminal +COMMENT= Twitter client for sixel-capable terminals LICENSE= BSD2CLAUSE -BROKEN= Does not build with recent vala - -BUILD_DEPENDS= valac:lang/vala -LIB_DEPENDS= libcurl.so:ftp/curl - -USES= gettext-runtime gnome pkgconfig -USE_GNOME= glib20 gdkpixbuf2 +LIB_DEPENDS= libpng.so:graphics/png \ + libmbedtls.so:security/mbedtls +USES= compiler:c++17-lang iconv jpeg pkgconfig +GNU_CONFIGURE= yes USE_GITHUB= yes GH_ACCOUNT= isaki68k +PLIST_FILES= bin/sayaka PORTDOCS= README.md -WRKSRC_SUBDIR= vala - -OPTIONS_DEFINE= COLORMAP DOCS -OPTIONS_DEFAULT=COLORMAP -OPTIONS_SUB= yes - -COLORMAP_DESC= Install colormap data for external sixel command -COLORMAP_RUN_DEPENDS= img2sixel:graphics/libsixel -COLORMAP_FILES= colormap16.png colormap8.png - -post-patch: - @${REINPLACE_CMD} -e '/^[a-z]/s/:$$/: vala-make2/' \ - ${WRKSRC}/Makefile - -post-patch-COLORMAP-on: - @${REINPLACE_CMD} -e '/colormapdir =/s|basedir|"${DATADIR}"|' \ - ${WRKSRC}/sayaka.vala +OPTIONS_DEFINE= DOCS do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/sayaka ${STAGEDIR}${PREFIX}/bin - ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/../README.md ${STAGEDIR}${DOCSDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/src/sayaka ${STAGEDIR}${PREFIX}/bin -do-install-COLORMAP-on: - ${MKDIR} ${STAGEDIR}${DATADIR} -.for f in ${COLORMAP_FILES} - ${INSTALL_DATA} ${WRKSRC}/../$f ${STAGEDIR}${DATADIR} -.endfor +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include diff --git a/net-im/sayaka/distinfo b/net-im/sayaka/distinfo index 888b1768693c..616a2ff9c074 100644 --- a/net-im/sayaka/distinfo +++ b/net-im/sayaka/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1477623954 -SHA256 (isaki68k-sayaka-3.2.2_GH0.tar.gz) = 8a3b74ce93d16e971bf3434775efdb5bb56b59f5451dfc8b9cf6b1c88f39756e -SIZE (isaki68k-sayaka-3.2.2_GH0.tar.gz) = 104693 +TIMESTAMP = 1616061063 +SHA256 (isaki68k-sayaka-3.5.1_GH0.tar.gz) = b981eb251761790a396b2b9a05739b42978a54993794fa91104f871e1bb92385 +SIZE (isaki68k-sayaka-3.5.1_GH0.tar.gz) = 353515 diff --git a/net-im/sayaka/files/patch-SixelConverter.vala b/net-im/sayaka/files/patch-SixelConverter.vala deleted file mode 100644 index 8ae913bc5ae2..000000000000 --- a/net-im/sayaka/files/patch-SixelConverter.vala +++ /dev/null @@ -1,29 +0,0 @@ ---- SixelConverter.vala.orig 2016-09-25 11:53:37 UTC -+++ SixelConverter.vala -@@ -90,7 +90,7 @@ public class SixelConverter - public void SetPaletteFixed8() - { - for (int i = 0; i < 8; i++) { -- uint8 R = (uint8)((i ) & 0x01) * 255; -+ uint8 R = (uint8)((i >> 0) & 0x01) * 255; - uint8 G = (uint8)((i >> 1) & 0x01) * 255; - uint8 B = (uint8)((i >> 2) & 0x01) * 255; - -@@ -131,7 +131,7 @@ public class SixelConverter - // ANSI 16 色といっても色実体は実装依存らしい。 - - for (int i = 0; i < 16; i++) { -- uint8 R = (uint8)((i ) & 0x01); -+ uint8 R = (uint8)((i >> 0) & 0x01); - uint8 G = (uint8)((i >> 1) & 0x01); - uint8 B = (uint8)((i >> 2) & 0x01); - uint8 I = (uint8)((i >> 3) & 0x01); -@@ -153,7 +153,7 @@ public class SixelConverter - for (int i = 0; i < 256; i++) { - Palette[i, 0] = (uint8)(((i >> 5) & 0x07) * 255 / 7); - Palette[i, 1] = (uint8)(((i >> 2) & 0x07) * 255 / 7); -- Palette[i, 2] = (uint8)(((i ) & 0x03) * 255 / 3); -+ Palette[i, 2] = (uint8)(((i >> 0) & 0x03) * 255 / 3); - } - PaletteCount = 256; - } diff --git a/net-im/sayaka/files/patch-libcurl.vapi b/net-im/sayaka/files/patch-libcurl.vapi deleted file mode 100644 index 2bbcff6620c0..000000000000 --- a/net-im/sayaka/files/patch-libcurl.vapi +++ /dev/null @@ -1,19 +0,0 @@ ---- libcurl.vapi.orig 2016-09-25 11:53:37 UTC -+++ libcurl.vapi -@@ -236,7 +236,6 @@ namespace Native.Curl { - TOO_MANY_REDIRECTS, - UNKNOWN_OPTION, - TELNET_OPTION_SYNTAX, -- PEER_FAILED_VERIFICATION, - GOT_NOTHING, - SSL_ENGINE_NOTFOUND, - SSL_ENGINE_SETFAILED, -@@ -244,7 +243,7 @@ namespace Native.Curl { - RECV_ERROR, - SSL_CERTPROBLEM, - SSL_CIPHER, -- SSL_CACERT, -+ PEER_FAILED_VERIFICATION, - BAD_CONTENT_ENCODING, - LDAP_INVALID_URL, - FILESIZE_EXCEEDED, diff --git a/net-im/sayaka/files/patch-src_Makefile b/net-im/sayaka/files/patch-src_Makefile new file mode 100644 index 000000000000..d5a1cb204dca --- /dev/null +++ b/net-im/sayaka/files/patch-src_Makefile @@ -0,0 +1,15 @@ +--- src/Makefile.orig 2021-03-18 09:51:03 UTC ++++ src/Makefile +@@ -67,11 +67,7 @@ SRCS_all= \ + ${SRCS_sixelv} \ + ${SRCS_test} \ + +-CXX+= -g +-#CXX+= -fsanitize=undefined +- +-CPPFLAGS+= -O0 +-CPPFLAGS+= -Wall -Werror -Wshadow -Wno-sign-compare ++CPPFLAGS+= ${CXXFLAGS} -Wall -Werror -Wshadow -Wno-sign-compare + INCLUDES+= -I.. + + all: sayaka test sixelv diff --git a/net-im/sayaka/files/patch-src_UString.cpp b/net-im/sayaka/files/patch-src_UString.cpp new file mode 100644 index 000000000000..d0280d03a2f1 --- /dev/null +++ b/net-im/sayaka/files/patch-src_UString.cpp @@ -0,0 +1,10 @@ +--- src/UString.cpp.orig 2021-03-18 09:51:03 UTC ++++ src/UString.cpp +@@ -25,6 +25,7 @@ + + #include "UString.h" + #include ++#include + #include + + // 出力文字コードが UTF-8 以外 (iconv による変換が必要) なら true。 diff --git a/net-im/sayaka/pkg-plist b/net-im/sayaka/pkg-plist deleted file mode 100644 index b1e2d7c12a4a..000000000000 --- a/net-im/sayaka/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/sayaka -%%COLORMAP%%%%DATADIR%%/colormap16.png -%%COLORMAP%%%%DATADIR%%/colormap8.png