Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2016 21:45:30 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r421522 - in head/games: . bunnysay bunnysay/files
Message-ID:  <201609072145.u87LjUfx090604@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Wed Sep  7 21:45:30 2016
New Revision: 421522
URL: https://svnweb.freebsd.org/changeset/ports/421522

Log:
  New port: games/bunnysay
  
  Bunny Sign for terminals with wchar support
  
  WWW: https://github.com/co60ca/bunnysay
  
  PR:	212278
  Submitted by:	Ben Lavery <ben.lavery@hashbang0.com>
  Reviewed by:	amdmi3 (mentor)
  Approved by:	amdmi3 (mentor)

Added:
  head/games/bunnysay/
  head/games/bunnysay/Makefile   (contents, props changed)
  head/games/bunnysay/distinfo   (contents, props changed)
  head/games/bunnysay/files/
  head/games/bunnysay/files/patch-src_BunnySay.cpp   (contents, props changed)
  head/games/bunnysay/files/patch-src_BunnySay.h   (contents, props changed)
  head/games/bunnysay/pkg-descr   (contents, props changed)
Modified:
  head/games/Makefile

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Wed Sep  7 21:35:38 2016	(r421521)
+++ head/games/Makefile	Wed Sep  7 21:45:30 2016	(r421522)
@@ -117,6 +117,7 @@
     SUBDIR += bugsquish
     SUBDIR += bugsx
     SUBDIR += bumprace
+    SUBDIR += bunnysay
     SUBDIR += burgerspace
     SUBDIR += burrtools
     SUBDIR += bygfoot

Added: head/games/bunnysay/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bunnysay/Makefile	Wed Sep  7 21:45:30 2016	(r421522)
@@ -0,0 +1,35 @@
+# Created by: Ben Lavery <ben.lavery@hashbang0.com>
+# $FreeBSD$
+
+PORTNAME=	bunnysay
+PORTVERSION=	1.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	games
+
+MAINTAINER=	ben.lavery@hashbang0.com
+COMMENT=	Bunny Sign for terminals
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cmake compiler:c++11-lang dos2unix
+DOS2UNIX_FILES=	src/BunnySay.cpp src/BunnySay.h
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	co60ca
+
+PLIST_FILES=	bin/bunnysay
+
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
+LIB_DEPENDS+=	libc++.so.1:devel/libc++
+CFLAGS+=	-isystem${LOCALBASE}/include/c++/v1
+CXXFLAGS+=	-isystem${LOCALBASE}/include/c++/v1
+LDFLAGS+=	-L${LOCALBASE}/lib/c++
+.endif
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.post.mk>

Added: head/games/bunnysay/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bunnysay/distinfo	Wed Sep  7 21:45:30 2016	(r421522)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1473266065
+SHA256 (co60ca-bunnysay-v1.0_GH0.tar.gz) = 81fe0b57fb307d6e6ae8ab660f0f7720a16f83b271c477812af84a3c23081e77
+SIZE (co60ca-bunnysay-v1.0_GH0.tar.gz) = 14703

Added: head/games/bunnysay/files/patch-src_BunnySay.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bunnysay/files/patch-src_BunnySay.cpp	Wed Sep  7 21:45:30 2016	(r421522)
@@ -0,0 +1,25 @@
+--- 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<std::codecvt_utf8<wchar_t>,wchar_t> convert;
+   input = replaceString(input);
+-  std::wcout << bunny;
++  std::cout << convert.to_bytes(bunny);
+   bool left = true;
+   std::vector<std::wstring> 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

Added: head/games/bunnysay/files/patch-src_BunnySay.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bunnysay/files/patch-src_BunnySay.h	Wed Sep  7 21:45:30 2016	(r421522)
@@ -0,0 +1,10 @@
+--- src/BunnySay.h.orig	2016-08-31 12:47:32 UTC
++++ src/BunnySay.h
+@@ -30,6 +30,7 @@
+ #include <stack>
+ #include <vector>
+ #include <sstream>
++#include <codecvt>
+ namespace bunnysay {
+ 
+ class BunnySay {

Added: head/games/bunnysay/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bunnysay/pkg-descr	Wed Sep  7 21:45:30 2016	(r421522)
@@ -0,0 +1,3 @@
+Bunny Sign for terminals with wchar support.
+
+WWW: https://github.com/co60ca/bunnysay



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609072145.u87LjUfx090604>