mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 15:08:57 +02:00
Pingus: fix build, add icon
This commit is contained in:
67
games-puzzle/pingus/additional-files/pingus.rdef.in
Normal file
67
games-puzzle/pingus/additional-files/pingus.rdef.in
Normal file
@@ -0,0 +1,67 @@
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = @MINOR@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Pingus",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon array {
|
||||
$"6E63696607020116024048000000000000004018004A70004A900000FFFF4905"
|
||||
$"010106FCFF900506050104FF730400750E0A042020C9E920C9E9C9E920C9E90A"
|
||||
$"04B325B2F4CC15B2F4CC15CBE5B325CBE5022CC1BFB458C333B43BC033B479BE"
|
||||
$"2728BEEEB533BD60B72CBCF7B964BD0EB854BCDEBA95BD5BBC11BD35BB86BD81"
|
||||
$"BC9DBD6ABCB5BD83BC8CBC0CBEFFB7F5C1C5B9AF41B78EC227B720C35DB72FC2"
|
||||
$"A9B710C411B7E7C51AB777C4C2B8C5C5CABAA3C5B7B9ACC5D2BB04C5ACBB65C5"
|
||||
$"98BB1EC5A035C5F6BB4BC698BB52C643BB07C68BBA79C688BAC2C68231C69AB8"
|
||||
$"A7C7B3B905C70DB814C8B9B8DCCAD2B85BC9C5B88FCB1AB867CBE7B866CB7EB8"
|
||||
$"67CC4EB8E1CCF72ECCB2BA56CE48BE46D018BC17CF85C06FD0A9C5CCCF51C2F9"
|
||||
$"D081C5CCCF51C5CCCF56C5CCCF56C5CCCF56C600CF47C600CF47C65CCF83C724"
|
||||
$"CFB4C6C2CFAEC7FECFC5C979CF22C8BDCF83CAEECE5ECDAFCB2CCC69CD02CE01"
|
||||
$"CAB4CDF7C9C3CE09CA22CDE6C963CD9AC8DCCDBFC91CCD4DC85FCC7FC79ECCF0"
|
||||
$"C7FCCC09C73BCAE7C698CB82C6D4CAD6C601CA7AC4F0CAA1C57BCA9FC4EBCAC8"
|
||||
$"C4E6CA9E4DCB2EC4CFCC25C439CB9EC4BDCC69C3F6CCB8C300CCB2C37FCCBFC2"
|
||||
$"81CC5BC1CBCC8EC219CBCFC0FACAA9C067CB4CC0C8CA04C005C89DBF37C94BBF"
|
||||
$"9FC7FDBED7C70FBE23C76FBE75C785BE0CC879BDD3C7FCBDF7C921BDA4CA59BD"
|
||||
$"28C9C7BD6ECAA3BD03CB31BCA5CAE9BCDDCB77BC6BCBF1BB6FCBD2BC1DCC0EBA"
|
||||
$"D3CB8FB9F1CBCDBA42CB4FB9A2CAD1B94FCB11B977CA55B901C954B89EC9D4B8"
|
||||
$"CCC8E2B875C81BB840C874B859C7BDB6F3C600B53AC707B5D6C4B6B4740007BE"
|
||||
$"BBC31FBEBBC31FBE00C360BA8AC43EBBF5C418B920C467B906C2D0B803C3C2BA"
|
||||
$"6FC17BBEBBBD71BD1C41BF73BC3EBE77B981BE55BB37BE9BB7C9C1EDB5C3BF83"
|
||||
$"B5F6C456B591C702B94CC6D2B698C702B94C0003BD01C49BBD01C49BBCB0C8A5"
|
||||
$"B9EACBDFBCCBCB1ABCA2CE53C562CDEAC025D02AC562CDEA04032FC53ABDB3C5"
|
||||
$"3ABDB3C51FBF8ACB33C28ECA84C189CBE1C39458C3600204C5C7B926C5C7B86D"
|
||||
$"C5C7B9DFC4A5BA76C545BA76C407BA76C386B926C386B9DFC386B86DC4A5B7D8"
|
||||
$"C407B7D8C545B7D80204C70FB972C71CB972C60FB980C4B4BB3DC53ABA45C42D"
|
||||
$"BC364EBCD3C517BCBAC5F5BD14CA92BB23CA69BC02CAB9BA450203C661CDF7C5"
|
||||
$"8ACD33C85FCF8DCC8FCA06CC4DCACCCCD3C942C95EC7E1CAADC785C80DC83C00"
|
||||
$"02BA7CCAD8BA7CCAD8B92AC8ADBBDAC83CBA0AC750BBDAC83C0004C511CD33C5"
|
||||
$"11CD33C31DCCA8C1D3C777C253CA36C14FC4A5C4C0C112C29CC155C6E7C0D2C9"
|
||||
$"93C6F458C37AC993C6F40208BA45B2F4BA45B2F4B64BB2F4B31ABA20B31AB626"
|
||||
$"B31ABA20B31ACAF1B31ACAF1B31ACEEBBA45D222B64BD222BA45D222CB1BD222"
|
||||
$"CB1BD222CF16D222D247CAF1D247CEEBD247CAF1D247BA20D247BA20D247B626"
|
||||
$"CB1BB2F4CF16B2F4CB1BB2F4020834B438B74FB43834B438CA69B438CA69B438"
|
||||
$"CE11B438D104BAD2D104B72CD104BAD2D104CA45D104CA45D104CDEBCA69D0DF"
|
||||
$"CE11D0DFCA69D0DF34D0DF34D0DFB74FD0DFB45ECA45B45ECDEBB45ECA45B45E"
|
||||
$"BAD2B45EBAD2B45EB72C0609B66C03213D2F2526B3A5B6D5B63CB40D2E21525B"
|
||||
$"27C945B43ECBA8B73A5E303D414355432B430D0A06010C023F46D70000000000"
|
||||
$"003C51AE413E254A63390A00010C023F1C1D0000000000003F2989C0788DC0AB"
|
||||
$"750A05010D023FBF7E0000000000003FC0512AD387B2B9170A04020B0C023F0A"
|
||||
$"930000000000003F154DBAECF9B8D02A0A020102023EC3400000000000003EDA"
|
||||
$"4B4289E04326C00A030103123EC3400000000000003EDA4B4289E04326C00117"
|
||||
$"8322040A030104123EC3400000000000003EDA4B4289E04326C001178322040A"
|
||||
$"030105123EC3400000000000003EDA4B4289E04326C001178322040A03010602"
|
||||
$"3EC3400000000000003EDA4B4289E04326C00A030107123EC340000000000000"
|
||||
$"3EDA4B4289E04326C001178322040A040108123EC3400000000000003EDA4B42"
|
||||
$"89E04326C001178322040A030109123EC3400000000000003EDA4B4289E04326"
|
||||
$"C001178322040A03010A123EC3400000000000003EDA4B4289E04326C0011783"
|
||||
$"2204"
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8a29e8c8dc97c3f2d911f5dc57160ff519e0d21b Mon Sep 17 00:00:00 2001
|
||||
From 2460a24e103a3eda07c55e482b5f428a78fb7c53 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 21 Sep 2017 21:16:29 +0200
|
||||
Subject: Haiku patch
|
||||
@@ -19,7 +19,7 @@ index 54b6468..b862fc7 100644
|
||||
|
||||
# build test and utils
|
||||
diff --git a/src/util/system.cpp b/src/util/system.cpp
|
||||
index 8b80140..649be87 100644
|
||||
index 8b80140..84902e7 100644
|
||||
--- a/src/util/system.cpp
|
||||
+++ b/src/util/system.cpp
|
||||
@@ -42,6 +42,11 @@
|
||||
@@ -46,5 +46,108 @@ index 8b80140..649be87 100644
|
||||
char* homedir = getenv("HOME");
|
||||
|
||||
--
|
||||
2.13.1
|
||||
2.26.0
|
||||
|
||||
|
||||
From d3bf62c54c3b2735675398ef7209187329042c19 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 8 May 2020 20:47:44 +1000
|
||||
Subject: Fix build
|
||||
|
||||
|
||||
diff --git a/SConscript b/SConscript
|
||||
index b862fc7..b416d62 100644
|
||||
--- a/SConscript
|
||||
+++ b/SConscript
|
||||
@@ -126,12 +126,12 @@ class Project:
|
||||
def configure_end(self):
|
||||
self.env = self.conf.Finish()
|
||||
|
||||
- print "Reports:"
|
||||
- print self.reports
|
||||
+ print("Reports:")
|
||||
+ print(self.reports)
|
||||
|
||||
if not self.fatal_error == "":
|
||||
- print "Fatal Errors:"
|
||||
- print self.fatal_error
|
||||
+ print("Fatal Errors:")
|
||||
+ print(self.fatal_error)
|
||||
Exit(1)
|
||||
|
||||
def configure_gxx(self):
|
||||
diff --git a/src/engine/display/display.cpp b/src/engine/display/display.cpp
|
||||
index 31ba040..5174edf 100644
|
||||
--- a/src/engine/display/display.cpp
|
||||
+++ b/src/engine/display/display.cpp
|
||||
@@ -94,6 +94,7 @@ Display::create_window(FramebufferType framebuffer_type, const Size& size, bool
|
||||
|
||||
switch (framebuffer_type)
|
||||
{
|
||||
+#ifndef __HAIKU__
|
||||
case OPENGL_FRAMEBUFFER:
|
||||
#ifdef HAVE_OPENGL
|
||||
s_framebuffer = std::unique_ptr<Framebuffer>(new OpenGLFramebuffer());
|
||||
@@ -102,7 +103,7 @@ Display::create_window(FramebufferType framebuffer_type, const Size& size, bool
|
||||
raise_exception(std::runtime_error, "OpenGL support was not compiled in");
|
||||
#endif
|
||||
break;
|
||||
-
|
||||
+#endif
|
||||
case NULL_FRAMEBUFFER:
|
||||
s_framebuffer = std::unique_ptr<Framebuffer>(new NullFramebuffer());
|
||||
s_framebuffer->set_video_mode(size, fullscreen, resizable);
|
||||
diff --git a/src/pingus/screens/demo_session.cpp b/src/pingus/screens/demo_session.cpp
|
||||
index d613756..1ecf762 100644
|
||||
--- a/src/pingus/screens/demo_session.cpp
|
||||
+++ b/src/pingus/screens/demo_session.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "pingus/screens/demo_session.hpp"
|
||||
|
||||
+#include <functional>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From b9175d071d3b7ef77216d6f0c0aae130db409ced Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 8 May 2020 22:49:23 +1000
|
||||
Subject: Set working directory
|
||||
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index fa3584c..7030963 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -15,12 +15,24 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <SDL.h>
|
||||
+#ifdef __HAIKU__
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
|
||||
#include "pingus/pingus_main.hpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
PingusMain app;
|
||||
+#ifdef __HAIKU__
|
||||
+ char *binpath = realpath(argv[0], NULL);
|
||||
+ if (binpath != NULL) {
|
||||
+ char *appdir = strrchr(binpath, '/');
|
||||
+ *appdir = '\0';
|
||||
+ chdir(binpath);
|
||||
+ free(binpath);
|
||||
+ }
|
||||
+#endif
|
||||
return app.run(argc, argv);
|
||||
}
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ other operating systems supported by SDL. It is covered under the GPL."
|
||||
HOMEPAGE="https://pingus.seul.org"
|
||||
COPYRIGHT="1998-2011 Ingo Ruhnke"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="3"
|
||||
REVISION="4"
|
||||
SOURCE_URI="https://github.com/Pingus/pingus/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="c4cd89e1d350d2472f32de5f6266ac9f3658a3620eace3f79efac45db4323b65"
|
||||
PATCHES="pingus-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="pingus.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -23,9 +24,9 @@ REQUIRES="
|
||||
lib:libglu$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_image$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
lib:libsdl_1.2$secondaryArchSuffix
|
||||
lib:libsdl_image_1.2$secondaryArchSuffix
|
||||
lib:libsdl_mixer_1.2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
@@ -36,9 +37,9 @@ BUILD_REQUIRES="
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:libsdl_image$secondaryArchSuffix
|
||||
devel:libsdl_mixer$secondaryArchSuffix
|
||||
devel:libsdl_1.2$secondaryArchSuffix
|
||||
devel:libsdl_image_1.2$secondaryArchSuffix
|
||||
devel:libsdl_mixer_1.2$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
@@ -51,18 +52,40 @@ BUILD_PREREQUIRES="
|
||||
|
||||
BUILD()
|
||||
{
|
||||
scons BINDIR=$appsDir/Pingus \
|
||||
scons \
|
||||
with_opengl=false \
|
||||
BINDIR=$appsDir/Pingus \
|
||||
DATADIR=$appsDir/Pingus/data \
|
||||
MANDIR=$manDir $jobArgs
|
||||
MANDIR=$manDir
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/Pingus/data
|
||||
|
||||
make install BINDIR=$appsDir/Pingus \
|
||||
make install \
|
||||
BINDIR=$appsDir/Pingus \
|
||||
DATADIR=$appsDir/Pingus/data \
|
||||
MANDIR=$manDir
|
||||
|
||||
addAppDeskbarSymlink $appsDir/Pingus/pingus Pingus
|
||||
mv $appsDir/Pingus/pingus.bin $appsDir/Pingus/Pingus
|
||||
rm $appsDir/Pingus/pingus
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.pingus"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/pingus.rdef.in > $sourceDir/pingus.rdef
|
||||
|
||||
addResourcesToBinaries $sourceDir/pingus.rdef \
|
||||
$appsDir/Pingus/Pingus
|
||||
|
||||
addAppDeskbarSymlink $appsDir/Pingus/Pingus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user