Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Mar 2016 14:45:32 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411080 - in head/sysutils: . showbeastie showbeastie/files
Message-ID:  <201603141445.u2EEjWww011635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Mon Mar 14 14:45:32 2016
New Revision: 411080
URL: https://svnweb.freebsd.org/changeset/ports/411080

Log:
  Preview FreeBSD loader logos in your terminal
  
  PR:		207645
  Submitted by:	Tobias Kortkamp <t@tobik.me>

Added:
  head/sysutils/showbeastie/
  head/sysutils/showbeastie/Makefile   (contents, props changed)
  head/sysutils/showbeastie/files/
  head/sysutils/showbeastie/files/patch-testmain.c   (contents, props changed)
  head/sysutils/showbeastie/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Mon Mar 14 14:39:15 2016	(r411079)
+++ head/sysutils/Makefile	Mon Mar 14 14:45:32 2016	(r411080)
@@ -968,6 +968,7 @@
     SUBDIR += shim
     SUBDIR += shlock
     SUBDIR += shmcat
+    SUBDIR += showbeastie
     SUBDIR += sievelog
     SUBDIR += skill
     SUBDIR += slack

Added: head/sysutils/showbeastie/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/showbeastie/Makefile	Mon Mar 14 14:45:32 2016	(r411080)
@@ -0,0 +1,36 @@
+# Created by: Tobias Kortkamp <t@tobik.me>
+# $FreeBSD$
+
+PORTNAME=	showbeastie
+PORTVERSION=	0.1
+CATEGORIES=	sysutils
+MASTER_SITES=
+DISTFILES=
+
+MAINTAINER=	t@tobik.me
+COMMENT=	Preview FreeBSD loader logos
+
+LICENSE=	BSD2CLAUSE
+
+# Let's pretend we build a kernel module, because we require the
+# kernel sources
+USES=		kmod
+
+NO_FETCH=	yes
+
+ALL_TARGET=	testmain
+
+PLIST_FILES=	bin/${PORTNAME}
+
+pre-patch:
+	@${MKDIR} ${WRKSRC}
+	@(cd ${SRC_BASE}/sys/boot/ficl && ${COPYTREE_SHARE} . ${WRKSRC})
+
+post-patch:
+	${REINPLACE_CMD} 's|-I.*/\.\./common|-I${SRC_BASE}/sys/boot/common|g' \
+		${WRKSRC}/Makefile
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/testmain ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+
+.include <bsd.port.mk>

Added: head/sysutils/showbeastie/files/patch-testmain.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/showbeastie/files/patch-testmain.c	Mon Mar 14 14:45:32 2016	(r411080)
@@ -0,0 +1,43 @@
+--- testmain.c.orig	2016-03-02 15:04:22 UTC
++++ testmain.c
+@@ -316,17 +316,38 @@ int main(int argc, char **argv)
+     buildTestInterface(pSys);
+     pVM = ficlNewVM(pSys);
+ 
+-    ficlEvaluate(pVM, ".ver .( " __DATE__ " ) cr quit");
++    ficlEvaluate(pVM, ": loader_color? ( -- ) TRUE ;");
++    ficlEvaluate(pVM, "vocabulary support-functions");
++    ficlEvaluate(pVM, ": contains? ( -- ) FALSE ;");
++    ficlEvaluate(pVM, ": any_conf_read? ( -- ) FALSE ;");
++    ficlEvaluate(pVM, ": load_kernel ( -- ) ;");
++    ficlEvaluate(pVM, ": load_modules ( -- ) ;");
++    ficlEvaluate(pVM, ": delay_execute ( -- ) ;");
++    ficlEvaluate(pVM, "variable logoX");
++    ficlEvaluate(pVM, "variable logoY");
++
++    sprintf(in, "load %s", "/boot/screen.4th");
++    ficlEvaluate(pVM, in);
++    sprintf(in, "load %s", "/boot/beastie.4th");
++    ficlEvaluate(pVM, in);
+ 
+     /*
+     ** load file from cmd line...
+     */
+     if (argc  > 1)
+     {
+-        sprintf(in, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]);
++        sprintf(in, "load %s", argv[1], argv[1]);
+         ficlEvaluate(pVM, in);
++    } else {
++        fprintf(stderr, "usage: %s <logo.4th>\n", argv[0]);
++        return 1;
+     }
+ 
++    system("clear");
++    ficlEvaluate(pVM, "draw-beastie");
++    printf("\n\n");
++    return 0;
++
+     for (;;)
+     {
+         int ret;

Added: head/sysutils/showbeastie/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/showbeastie/pkg-descr	Mon Mar 14 14:45:32 2016	(r411080)
@@ -0,0 +1 @@
+Preview FreeBSD loader logos in your terminal



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