Bong: new recipe (#1931)

This commit is contained in:
tts2k
2018-01-04 18:59:35 +07:00
committed by fbrosson
parent b111186902
commit e91da748c1
3 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
SUMMARY="BeOS version of Pong"
DESCRIPTION="Bong is a FreeWare game for BeOS, based on the old arcade classic \
Pong"
HOMEPAGE="https://github.com/HaikuArchives/Bong"
COPYRIGHT="1997 by Gertjan van Ratingen"
LICENSE="bong"
REVISION="1"
srcGitRev="906d822b79bdae9328fe743dffe2871f96a30e0e"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="41fab18b900db644e39a08f2d5463e0a367720c21093f492d5d2cfaa8086da0f"
SOURCE_FILENAME="bong-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="Bong-$srcGitRev"
PATCHES="bong-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 ?x86 x86_64"
PROVIDES="
bong = $portVersion
app:bong = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
makefile_engine
cmd:g++
cmd:make
cmd:sed
"
PATCH()
{
sed -i -e "/^#if 0$/,/^#endif$/ s/.*//;" bong.cpp
}
BUILD()
{
make $jobArgs OBJ_DIR=objects MACHINE=BePC CC=g++ LD=g++
}
INSTALL()
{
install -d $appsDir
install -t $appsDir objects/bong
addAppDeskbarSymlink $appsDir/bong Bong
}

View File

@@ -0,0 +1 @@
freeware, do as you will

View File

@@ -0,0 +1,49 @@
From e8b839f39b3c5b3bc2bc502fa120072f1491e71b Mon Sep 17 00:00:00 2001
From: tts2k <tranthaison2000@gmail.com>
Date: Thu, 21 Dec 2017 05:26:23 +0000
Subject: fix for haiku
diff --git a/bong.cpp b/bong.cpp
index 9f4c5c0..4a022a4 100644
--- a/bong.cpp
+++ b/bong.cpp
@@ -1179,7 +1179,7 @@ void bongView::HandlePopupMenu(float x, float y)
BLooper *looper;
BHandler *target = selected->Target(&looper);
if (target == NULL) target = looper->PreferredHandler();
- copy = new BMessage(selected->Message());
+ copy = new BMessage(*(selected->Message()));
looper->PostMessage(copy, target);
delete copy;
selected->SetMarked(TRUE);
--
2.15.0
From 741ad47c8e4e17985f08e2a95ea3b20d022091e3 Mon Sep 17 00:00:00 2001
From: tts2k <tranthaison2000@gmail.com>
Date: Mon, 25 Dec 2017 11:57:04 +0000
Subject: Prevent bong_timer from being deleted twice
diff --git a/bong.cpp b/bong.cpp
index 4a022a4..741166d 100644
--- a/bong.cpp
+++ b/bong.cpp
@@ -502,7 +502,11 @@ bong::~bong()
bool bong::QuitRequested(void)
{
// bong_timer->PostMessage(B_QUIT_REQUESTED);
- bong_timer->Quit();
+ if (bong_timer != NULL) {
+ bong_timer->Lock();
+ bong_timer->Quit();
+ bong_timer = NULL;
+ }
if (BApplication::QuitRequested())
{
return TRUE;
--
2.15.0