From edb625cebc69607a0ae73b0349573d0cd21a15c1 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Wed, 9 May 2018 12:59:36 +0000 Subject: [PATCH] New port: sysutils/fcode-utils A set of utilities to process FCODE, OpenFirmware's byte code. This includes: - the tokenizer toke, - the detokenizer detok, - and a PCI rom header utility. WWW: https://www.openfirmware.info/FCODE_suite PR: 213114 Submitted by: Piotr Kubaj (based on) Reviewed by: pawel --- sysutils/Makefile | 1 + sysutils/fcode-utils/Makefile | 41 +++++++++++++++++++ sysutils/fcode-utils/distinfo | 3 ++ .../fcode-utils/files/patch-shared_types.h | 11 +++++ sysutils/fcode-utils/pkg-descr | 8 ++++ 5 files changed, 64 insertions(+) create mode 100644 sysutils/fcode-utils/Makefile create mode 100644 sysutils/fcode-utils/distinfo create mode 100644 sysutils/fcode-utils/files/patch-shared_types.h create mode 100644 sysutils/fcode-utils/pkg-descr diff --git a/sysutils/Makefile b/sysutils/Makefile index ed4af760e8c9..330d4c861636 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -309,6 +309,7 @@ SUBDIR += farbot SUBDIR += fastest_cvsup SUBDIR += fatback + SUBDIR += fcode-utils SUBDIR += fconfig SUBDIR += fcron SUBDIR += fd diff --git a/sysutils/fcode-utils/Makefile b/sysutils/fcode-utils/Makefile new file mode 100644 index 000000000000..a376c002260e --- /dev/null +++ b/sysutils/fcode-utils/Makefile @@ -0,0 +1,41 @@ +# Created by: Piotr Kubaj +# $FreeBSD$ + +PORTNAME= fcode-utils +PORTVERSION= 1.0.2 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= pkubaj@anongoth.pl +COMMENT= Utilities to process FCODE, OpenFirmware's byte code + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= gmake +USE_GITHUB= yes +GH_ACCOUNT= openbios + +MAKE_ARGS= CC=${CC} +PLIST_FILES= bin/detok \ + bin/romheaders \ + bin/toke +PORTDOCS= detok.html toke.html workbook.css + +OPTIONS_DEFINE= DOCS + +do-build: +.for f in detok romheaders toke + @${DO_MAKE_BUILD} -C ${WRKSRC}/${f} +.endfor + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/detok/detok ${WRKSRC}/toke/toke \ + ${WRKSRC}/romheaders/romheaders ${STAGEDIR}${PREFIX}/bin + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC}/documentation && \ + ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + +.include diff --git a/sysutils/fcode-utils/distinfo b/sysutils/fcode-utils/distinfo new file mode 100644 index 000000000000..f6c54fefe3c5 --- /dev/null +++ b/sysutils/fcode-utils/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1475063061 +SHA256 (openbios-fcode-utils-v1.0.2_GH0.tar.gz) = 8d9979c269a60a6e2b9dcfb50d1515d0e750e95d7d2690b36620a614b0c163bc +SIZE (openbios-fcode-utils-v1.0.2_GH0.tar.gz) = 4308712 diff --git a/sysutils/fcode-utils/files/patch-shared_types.h b/sysutils/fcode-utils/files/patch-shared_types.h new file mode 100644 index 000000000000..e29fda159a0f --- /dev/null +++ b/sysutils/fcode-utils/files/patch-shared_types.h @@ -0,0 +1,11 @@ +--- shared/types.h.orig 2008-07-11 23:21:43 UTC ++++ shared/types.h +@@ -39,7 +39,7 @@ + * + **************************************************************************** */ + +-#if defined(__ppc__) && defined(__APPLE__) ++#if defined(__ppc__) && defined(__APPLE__) || defined (__FreeBSD__) + #include + + typedef int8_t s8; diff --git a/sysutils/fcode-utils/pkg-descr b/sysutils/fcode-utils/pkg-descr new file mode 100644 index 000000000000..54d39ee422cd --- /dev/null +++ b/sysutils/fcode-utils/pkg-descr @@ -0,0 +1,8 @@ +A set of utilities to process FCODE, OpenFirmware's byte code. This +includes: + +- the tokenizer toke, +- the detokenizer detok, +- and a PCI rom header utility. + +WWW: https://www.openfirmware.info/FCODE_suite