From e3a18d462aa71f34611a67b53a7923cf9777f9c9 Mon Sep 17 00:00:00 2001 From: okay Date: Fri, 2 Apr 2021 09:06:30 -0700 Subject: [PATCH 1/3] [puzzles] add simon tatham's portable puzzle package --- package/puzzles/package | 41 +++++++++++++++++++++++++++++++++++ package/puzzles/puzzles.draft | 6 +++++ package/puzzles/toltec.patch | 21 ++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 package/puzzles/package create mode 100644 package/puzzles/puzzles.draft create mode 100644 package/puzzles/toltec.patch diff --git a/package/puzzles/package b/package/puzzles/package new file mode 100644 index 000000000..b7e0cfeaf --- /dev/null +++ b/package/puzzles/package @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(puzzles) +timestamp=2021-03-04T14:03-08:00 +maintainer="NONE" +pkgver=0.2.2-1 +license=MIT +pkgdesc="Simon Tatham's Puzzle Package" +url="https://github.com/mrichards42/remarkable_puzzles" +section="games" + +image=python:v1.4 +source=( + https://github.com/mrichards42/remarkable_puzzles/releases/download/v0.2.2/puzzles-source.tar.gz + puzzles.draft +) +sha256sums=( + 3fe3686757e69d1267e830ba527d15ff6d1a68e34f830842dcaf35f58b43d501 + SKIP +) + +build() { + apt update + apt install git -y + pip3 install okp + + # do the build + ARCH=arm BUILD=release make puzzles -r +} + +package() { + mkdir -p "$pkgdir"/opt/etc/draft + mkdir -p "$pkgdir"/opt/etc/puzzles + install -D -m 755 "$srcdir"/build/release/puzzles "$pkgdir"/opt/bin/puzzles + install -D -m 755 "$srcdir"/puzzles.draft "$pkgdir"/opt/etc/draft/ + install -D -m 644 "$srcdir"/config/* -t "$pkgdir"/opt/etc/puzzles/config/ + install -D -m 644 "$srcdir"/help/* -t "$pkgdir"/opt/etc/puzzles/help/ + install -D -m 644 "$srcdir"/icons/* -t "$pkgdir"/opt/etc/puzzles/icons/ +} diff --git a/package/puzzles/puzzles.draft b/package/puzzles/puzzles.draft new file mode 100644 index 000000000..d54a4a863 --- /dev/null +++ b/package/puzzles/puzzles.draft @@ -0,0 +1,6 @@ +# Copyright (c) 2020 - 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +name=Simon Tatham's Puzzles +desc=A portable puzzle pack ported to the rM +call=/opt/bin/puzzles diff --git a/package/puzzles/toltec.patch b/package/puzzles/toltec.patch new file mode 100644 index 000000000..77b1c9545 --- /dev/null +++ b/package/puzzles/toltec.patch @@ -0,0 +1,21 @@ +diff --git a/src/config.cpp b/src/config.cpp +index ab69543..41d2543 100644 +--- a/src/config.cpp ++++ b/src/config.cpp +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -15,6 +16,8 @@ + #include "puzzles.hpp" + #include "paths.hpp" + ++using namespace std; ++ + struct Parser { + Config * cfg; + std::map color_order; From e2e983f8097ce94d8d1bfa8b3b05af69b79350dc Mon Sep 17 00:00:00 2001 From: raisjn <70462544+raisjn@users.noreply.github.com> Date: Sun, 4 Apr 2021 16:39:53 -0700 Subject: [PATCH 2/3] Update package --- package/puzzles/package | 1 + 1 file changed, 1 insertion(+) diff --git a/package/puzzles/package b/package/puzzles/package index b7e0cfeaf..fce3c2839 100644 --- a/package/puzzles/package +++ b/package/puzzles/package @@ -10,6 +10,7 @@ license=MIT pkgdesc="Simon Tatham's Puzzle Package" url="https://github.com/mrichards42/remarkable_puzzles" section="games" +flags=(patch_rm2fb) image=python:v1.4 source=( From 77da1d7b094191caf69b5a3a50935732853e4771 Mon Sep 17 00:00:00 2001 From: raisjn <70462544+raisjn@users.noreply.github.com> Date: Fri, 9 Apr 2021 19:29:39 -0700 Subject: [PATCH 3/3] Update puzzles.draft --- package/puzzles/puzzles.draft | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/puzzles/puzzles.draft b/package/puzzles/puzzles.draft index d54a4a863..42e2f095a 100644 --- a/package/puzzles/puzzles.draft +++ b/package/puzzles/puzzles.draft @@ -1,6 +1,6 @@ # Copyright (c) 2020 - 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -name=Simon Tatham's Puzzles +name=Puzzles desc=A portable puzzle pack ported to the rM call=/opt/bin/puzzles