Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[puzzles][0.2.2] add simon tatham's portable puzzle package #326

Merged
merged 7 commits into from
May 2, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions package/puzzles/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/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"
flags=(patch_rm2fb)

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/
}
6 changes: 6 additions & 0 deletions package/puzzles/puzzles.draft
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2020 - 2021 The Toltec Contributors
# SPDX-License-Identifier: MIT

name=Puzzles
desc=A portable puzzle pack ported to the rM
call=/opt/bin/puzzles
21 changes: 21 additions & 0 deletions package/puzzles/toltec.patch
Original file line number Diff line number Diff line change
@@ -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 <cstdlib>
#include <fstream>
#include <iostream>
+#include <sstream>
#include <map>
#include <string>

@@ -15,6 +16,8 @@
#include "puzzles.hpp"
#include "paths.hpp"

+using namespace std;
+
struct Parser {
Config * cfg;
std::map<std::string, int> color_order;