* 54321, new recipe for an old game

* 54321, new recipe
This commit is contained in:
Schrijvers Luc
2023-05-15 09:29:03 +02:00
committed by GitHub
parent 7fd093ac36
commit 8b02a304ed
3 changed files with 167 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
SUMMARY="5 games in 1"
DESCRIPTION="54321 is five games in four-, three-, or two- dimensions for \
one player. 54321 takes five classic two-dimensional puzzle games and \
extends them into three and four dimensions."
HOMEPAGE="https://old.nklein.com/products/54321/"
COPYRIGHT="2001 Patrick Stein"
LICENSE="nklein"
REVISION="1"
SOURCE_URI="$HOMEPAGE/1.0.2001.11.16/54321.tgz"
CHECKSUM_SHA256="ff2bd7afec6d85d29fcf235875285520a4aa5b009c6a0dd7a56619821d79fddb"
SOURCE_DIR="54321"
PATCHES="54321-$portVersion.patchset"
ARCHITECTURES="?all x86_gcc2"
PROVIDES="
54321 = $portVersion
app:54321 = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpng16
lib:libSDL_1.2
lib:libSDL_image_1.2
lib:libz
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpng16
devel:libSDL_1.2
devel:libSDL_image_1.2
devel:libz
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:make
"
BUILD()
{
make -f GNUmakefile ARCH=BeOS
}
INSTALL()
{
mkdir -p $appsDir/54321
cp -R Release/* $appsDir/54321
addAppDeskbarSymlink $appsDir/54321/bin/BeOS/54321
}

View File

@@ -0,0 +1,13 @@
We made all images (except for the xhtml, css, and paypal icons at the bottom), text,
software, and other stuff on this web site. We authorize you to do anything you like with
these so long as you do not restrict the rights of others to do what they like with them.
We're not saying you have to give away your products. We're just saying that all of the items
on this site have a Universal, Non-Exclusive License.
For example, if you wanted to take some of these images or some of this software and
plaster your name on them and sell them, fine. But, you cannot keep Sally Q.
Public from taking those same items and plastering her name on them and selling them.
You just can't. It's all as hers as it is yours.
All of that said, it'd please us plenty if you slung appreciation, accolades, credit, and/or
cash our way as you see fit.

View File

@@ -0,0 +1,103 @@
From f134edeb7ab537bf10335a1081eba9bb21a02f27 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 22 Dec 2018 13:43:58 +0100
Subject: add the proper place to look for the SDL headers/libs
diff --git a/archs/BeOS/variables.GNU b/archs/BeOS/variables.GNU
index 2e1b65a..d02d976 100644
--- a/archs/BeOS/variables.GNU
+++ b/archs/BeOS/variables.GNU
@@ -5,10 +5,10 @@ STRIP := strip
MKDIR_CMD = test -d $(@D) || mkdir -p $(@D)
############################################################
-CPPFLAGS += -I/boot/develop/tools/gnupro/include/SDL
+CPPFLAGS=-I"$(shell finddir B_SYSTEM_HEADERS_DIRECTORY)/SDL"
LDFLAGS += \
- -L$(HOME)/config/lib -lSDL -lSDL_image -lSDLmain
+ -L$(shell finddir B_SYSTEM_LIB_DIRECTORY) -lSDL -lSDL_image -lSDLmain
prog: Release/54321-$(ARCH)
--
2.19.1
From 7719307a888f8efa53c178f6589d2b1e884c22ab Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 22 Dec 2018 13:47:06 +0100
Subject: use main() instead of SDL_main()
diff --git a/code/main.cpp b/code/main.cpp
index 9c28c76..f174994 100644
--- a/code/main.cpp
+++ b/code/main.cpp
@@ -29,7 +29,7 @@
#include "life.h"
#include "lifeController.h"
extern "C" int
- SDL_main( int argc, char** argv )
+ main( int argc, char** argv )
{
unsigned int initFlags = 0;
initFlags |= SDL_INIT_VIDEO;
--
2.19.1
From 05898ad3d124d5d4cf8304a4008732d4228de54d Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 22 Dec 2018 13:53:35 +0100
Subject: disable fullscreen on startup
diff --git a/code/main.cpp b/code/main.cpp
index f174994..15853be 100644
--- a/code/main.cpp
+++ b/code/main.cpp
@@ -42,7 +42,7 @@
videoFlags |= SDL_SWSURFACE;
if ( argc <= 1 ) {
- videoFlags |= SDL_FULLSCREEN;
+ videoFlags |= SDL_HWPALETTE;
}
SDL_Surface* screen = ::SDL_SetVideoMode(
--
2.19.1
From 65e74c582f04594e7c5a9d5e5e525ccb06f85c72 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 22 Dec 2018 13:55:58 +0100
Subject: make it launch from Tracker
diff --git a/code/main.cpp b/code/main.cpp
index 15853be..3291e6d 100644
--- a/code/main.cpp
+++ b/code/main.cpp
@@ -28,9 +28,16 @@
#include "lifeView.h"
#include "life.h"
#include "lifeController.h"
+ #ifdef __HAIKU__
+ #include <unistd.h>
+ #include <libgen.h>
+ #endif
extern "C" int
main( int argc, char** argv )
{
+ #ifdef __HAIKU__
+ chdir(dirname(argv[0]));
+ #endif
unsigned int initFlags = 0;
initFlags |= SDL_INIT_VIDEO;
initFlags |= SDL_INIT_AUDIO;
--
2.19.1