Index: head/games/bunnysay/Makefile =================================================================== --- head/games/bunnysay/Makefile (revision 435517) +++ head/games/bunnysay/Makefile (revision 435518) @@ -1,26 +1,30 @@ # Created by: Ben Lavery # $FreeBSD$ PORTNAME= bunnysay -PORTVERSION= 1.0 +PORTVERSION= 1.1 DISTVERSIONPREFIX= v CATEGORIES= games MAINTAINER= ben.lavery@hashbang0.com -COMMENT= Bunny Sign for terminals +COMMENT= Bunny Sign for terminals with UTF-8 support LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE -USES= cmake compiler:c++11-lang dos2unix -DOS2UNIX_FILES= src/BunnySay.cpp src/BunnySay.h +USES= gmake +ALL_TARGET= bunnysay + USE_GITHUB= yes GH_ACCOUNT= co60ca PLIST_FILES= bin/bunnysay +post-extract: + @${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile + do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + ${INSTALL_PROGRAM} ${WRKSRC}/bunnysay ${STAGEDIR}${PREFIX}/bin/${PORTNAME} .include Index: head/games/bunnysay/distinfo =================================================================== --- head/games/bunnysay/distinfo (revision 435517) +++ head/games/bunnysay/distinfo (revision 435518) @@ -1,3 +1,3 @@ -TIMESTAMP = 1473266065 -SHA256 (co60ca-bunnysay-v1.0_GH0.tar.gz) = 81fe0b57fb307d6e6ae8ab660f0f7720a16f83b271c477812af84a3c23081e77 -SIZE (co60ca-bunnysay-v1.0_GH0.tar.gz) = 14703 +TIMESTAMP = 1488747822 +SHA256 (co60ca-bunnysay-v1.1_GH0.tar.gz) = 556752ff31633c54b2a6984dbab21bd2a79a94022277c0c2dc2f1590c8f2dbfe +SIZE (co60ca-bunnysay-v1.1_GH0.tar.gz) = 17307 Index: head/games/bunnysay/files/patch-src_BunnySay.cpp =================================================================== --- head/games/bunnysay/files/patch-src_BunnySay.cpp (revision 435517) +++ head/games/bunnysay/files/patch-src_BunnySay.cpp (nonexistent) @@ -1,25 +0,0 @@ ---- src/BunnySay.cpp.orig 2016-08-31 12:47:32 UTC -+++ src/BunnySay.cpp -@@ -34,8 +34,9 @@ L"/   づ"; - // Writes wstring input to the stdout after chunking it and converting - // all characters to their wide counterparts in unicode - void BunnySay::writeBunnySay(std::wstring input) { -+ std::wstring_convert,wchar_t> convert; - input = replaceString(input); -- std::wcout << bunny; -+ std::cout << convert.to_bytes(bunny); - bool left = true; - std::vector vs; - vs = splitAtWidth(input + L" ", width); -@@ -54,9 +55,9 @@ void BunnySay::writeBunnySay(std::wstrin - - // Add the pipes - curstring = L"|" + curstring + L"|\n"; -- std::wcout << curstring; -+ std::cout << convert.to_bytes(curstring); - } -- std::wcout << bunny2 << std::endl; -+ std::cout << convert.to_bytes(bunny2) << std::endl; - } - // Helper function to split a sentance delimited with fixed-width spaces - // into strings 10 chars or less Property changes on: head/games/bunnysay/files/patch-src_BunnySay.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/bunnysay/files/patch-src_BunnySay.h =================================================================== --- head/games/bunnysay/files/patch-src_BunnySay.h (revision 435517) +++ head/games/bunnysay/files/patch-src_BunnySay.h (nonexistent) @@ -1,10 +0,0 @@ ---- src/BunnySay.h.orig 2016-08-31 12:47:32 UTC -+++ src/BunnySay.h -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - namespace bunnysay { - - class BunnySay { Property changes on: head/games/bunnysay/files/patch-src_BunnySay.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/bunnysay/files/patch-src_bunnysay.cc =================================================================== --- head/games/bunnysay/files/patch-src_bunnysay.cc (nonexistent) +++ head/games/bunnysay/files/patch-src_bunnysay.cc (revision 435518) @@ -0,0 +1,19 @@ +--- src/bunnysay.cc.orig 2017-02-28 03:26:39 UTC ++++ src/bunnysay.cc +@@ -99,7 +99,7 @@ void fullWidth(std::vector> *input, size_t width) { +- bool left = false; ++ bool left = true; + for (auto &rv: *input) { + while(rv.size() < width) { + if (left) { +@@ -109,6 +109,7 @@ void padTo(std::vector + } + left = !left; + } ++ left = true; + } + } + Property changes on: head/games/bunnysay/files/patch-src_bunnysay.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/bunnysay/files/patch-src_runbunnysay.cc =================================================================== --- head/games/bunnysay/files/patch-src_runbunnysay.cc (nonexistent) +++ head/games/bunnysay/files/patch-src_runbunnysay.cc (revision 435518) @@ -0,0 +1,24 @@ +--- src/runbunnysay.cc.orig 2017-02-28 03:26:39 UTC ++++ src/runbunnysay.cc +@@ -20,7 +20,6 @@ + */ + #include "bunnysay.h" + #include +-#include + #include + + void usage(char *prog) { +@@ -33,9 +32,10 @@ void usage(char *prog) { + int main(int argc, char **argv) { + std::string buff; + if (argc >= 2 && std::string(argv[1]) == "--") { +- std::istream_iterator it(std::cin); +- std::istream_iterator end; +- buff = std::string(it, end); ++ std::string line; ++ while (std::getline(std::cin, line)) { ++ buff += std::string(line); ++ } + } else if (argc >= 2) { + for (int i = 1; i < argc; i++) { + if (i != 1) { Property changes on: head/games/bunnysay/files/patch-src_runbunnysay.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/bunnysay/pkg-descr =================================================================== --- head/games/bunnysay/pkg-descr (revision 435517) +++ head/games/bunnysay/pkg-descr (revision 435518) @@ -1,3 +1,3 @@ -Bunny Sign for terminals with wchar support. +Bunny Sign for terminals with UTF-8 support WWW: https://github.com/co60ca/bunnysay