From 8528b8119fd5caee1bb16a6b53dc3fc58e03c553 Mon Sep 17 00:00:00 2001 From: pi Date: Sat, 2 Apr 2016 05:39:14 +0000 Subject: sysutils/showbeastie: 0.1 -> 0.2, build-fixes PR: 208283 Submitted by: xmj, Tobias Kortkamp (maintainer) --- sysutils/showbeastie/Makefile | 15 ++++++++---- sysutils/showbeastie/files/patch-testmain.c | 36 +++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 9 deletions(-) (limited to 'sysutils') diff --git a/sysutils/showbeastie/Makefile b/sysutils/showbeastie/Makefile index d58a6cc0b848..d19b7b142171 100644 --- a/sysutils/showbeastie/Makefile +++ b/sysutils/showbeastie/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= showbeastie -PORTVERSION= 0.1 +PORTVERSION= 0.2 CATEGORIES= sysutils MASTER_SITES= DISTFILES= @@ -12,9 +12,9 @@ COMMENT= Preview FreeBSD loader logos LICENSE= BSD2CLAUSE -# Let's pretend we build a kernel module, because we require the -# kernel sources -USES= kmod +.if !exists(${SRC_BASE}/sys/Makefile) +IGNORE= requires kernel source files in ${SRC_BASE} +.endif NO_FETCH= yes @@ -22,9 +22,14 @@ ALL_TARGET= testmain PLIST_FILES= bin/${PORTNAME} +# Make sure building succeeds on HEAD +MAKE_ARGS+= -m ${SRC_BASE}/share/mk + pre-patch: @${MKDIR} ${WRKSRC} - @(cd ${SRC_BASE}/sys/boot/ficl && ${COPYTREE_SHARE} . ${WRKSRC}) + @${TAR} -C ${SRC_BASE}/sys/boot/ficl \ + --exclude '*.o' --exclude '*.a' --exclude 'testmain' \ + -cf - . | ${TAR} -C ${WRKSRC} -xf - post-patch: ${REINPLACE_CMD} 's|-I.*/\.\./common|-I${SRC_BASE}/sys/boot/common|g' \ diff --git a/sysutils/showbeastie/files/patch-testmain.c b/sysutils/showbeastie/files/patch-testmain.c index 1a9b24a062b1..ab3b061fdf7b 100644 --- a/sysutils/showbeastie/files/patch-testmain.c +++ b/sysutils/showbeastie/files/patch-testmain.c @@ -1,6 +1,14 @@ ---- testmain.c.orig 2016-03-02 15:04:22 UTC +--- testmain.c.orig 2015-10-11 17:48:47 UTC +++ testmain.c -@@ -316,17 +316,38 @@ int main(int argc, char **argv) +@@ -296,6 +296,7 @@ void buildTestInterface(FICL_SYSTEM *pSy + ficlBuild(pSys, "cd", ficlChDir, FW_DEFAULT); + ficlBuild(pSys, "execxt", execxt, FW_DEFAULT); + ficlBuild(pSys, "load", ficlLoad, FW_DEFAULT); ++ ficlBuild(pSys, "include", ficlLoad, FW_DEFAULT); + ficlBuild(pSys, "pwd", ficlGetCWD, FW_DEFAULT); + ficlBuild(pSys, "system", ficlSystem, FW_DEFAULT); + ficlBuild(pSys, "spewhash", spewHash, FW_DEFAULT); +@@ -316,17 +317,58 @@ int main(int argc, char **argv) buildTestInterface(pSys); pVM = ficlNewVM(pSys); @@ -9,15 +17,27 @@ + ficlEvaluate(pVM, "vocabulary support-functions"); + ficlEvaluate(pVM, ": contains? ( -- ) FALSE ;"); + ficlEvaluate(pVM, ": any_conf_read? ( -- ) FALSE ;"); ++ ficlEvaluate(pVM, ": boot_serial? ( -- ) TRUE ;"); + ficlEvaluate(pVM, ": load_kernel ( -- ) ;"); + ficlEvaluate(pVM, ": load_modules ( -- ) ;"); + ficlEvaluate(pVM, ": delay_execute ( -- ) ;"); ++ ficlEvaluate(pVM, ": boot ( -- ) ;"); ++ ficlEvaluate(pVM, ": reboot ( -- ) ;"); ++ ficlEvaluate(pVM, ": load_xen_throw ( -- ) ;"); + ficlEvaluate(pVM, "variable logoX"); + ficlEvaluate(pVM, "variable logoY"); ++ ficlEvaluate(pVM, "variable brandX"); ++ ficlEvaluate(pVM, "variable brandY"); + + sprintf(in, "load %s", "/boot/screen.4th"); + ficlEvaluate(pVM, in); + sprintf(in, "load %s", "/boot/beastie.4th"); ++ ficlEvaluate(pVM, in); ++ sprintf(in, "load %s", "/boot/brand.4th"); ++ ficlEvaluate(pVM, in); ++ sprintf(in, "load %s", "/boot/frames.4th"); ++ ficlEvaluate(pVM, in); ++ sprintf(in, "load %s", "/boot/menu.4th"); + ficlEvaluate(pVM, in); /* @@ -26,15 +46,23 @@ if (argc > 1) { - sprintf(in, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]); -+ sprintf(in, "load %s", argv[1], argv[1]); ++ char *brand = "/boot/brand-fbsd.4th"; ++ sprintf(in, "load %s", argv[1]); ++ ficlEvaluate(pVM, in); ++ if (argc > 2) { ++ brand = argv[2]; ++ } ++ sprintf(in, "load %s", brand); ficlEvaluate(pVM, in); + } else { -+ fprintf(stderr, "usage: %s \n", argv[0]); ++ fprintf(stderr, "usage: %s []\n", argv[0]); + return 1; } + system("clear"); + ficlEvaluate(pVM, "draw-beastie"); ++ ficlEvaluate(pVM, "draw-brand"); ++ ficlEvaluate(pVM, "menu-init"); + printf("\n\n"); + return 0; + -- cgit