mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
BillardGL: add recipe and patch for version 1.75
This commit is contained in:
59
games-sports/billardgl/additional-files/haiku_icon.rdef
Normal file
59
games-sports/billardgl/additional-files/haiku_icon.rdef
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* BillardGL.rdef
|
||||
*/
|
||||
|
||||
resource app_signature "application/x-vnd.BillardGL";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 75,
|
||||
minor = 0,
|
||||
variety = 0,
|
||||
internal = 0,
|
||||
short_info = "1.75",
|
||||
long_info = "BillardGL is a GPL 3D OpenGL Billard Simulator"
|
||||
};
|
||||
|
||||
|
||||
resource vector_icon {
|
||||
$"6E636966090400EC04002C03F9FAF704003003F4CD1A050003F8F9F604004D04"
|
||||
$"0021100204CBE2C905CDEBC493C9D9CD77BD3FCE5CC34CCFDBB733CCDDB5FBC3"
|
||||
$"9AB3F2C80CB804BF28C49EBE43BE92BCC4CAAABFC20204CBE2C905CDEBC493C9"
|
||||
$"D9CD77BD3FCE5CC34CCFDBB733CCDDB5FBC39AB3F2C80CB804BF28C49EBE43BE"
|
||||
$"92BCC4CAAABFC20204CA6EBEB7CA6EB83ECA6EC52FBEB7CA6FC530CA6EB83ECA"
|
||||
$"6F1FBEB71FC5301FB83EBEB61FB83E1FC52FB2FE0204CA6EBEB7CA6EB83ECA6E"
|
||||
$"C52FBEB7CA6FC530CA6EB83ECA6F1FBEB71FC5301FB83EBEB61FB83E1FC52FB2"
|
||||
$"FE0204B735B5C4BE17B776B51DB771B327BD0FB403B9A1BC31BEFCC746C6AFC2"
|
||||
$"06C259C89CC52DCA4CBEA1CA76C2D1C54FBA3D0204B735B5C4BE17B776B51DB7"
|
||||
$"71B327BD0FB403B9A1BC31BEFCC746C6AFC206C259C89CC52DCA4CBEA1CA76C2"
|
||||
$"D1C54FBA3D0204C4AABD46C4AABA47C4AAC044BF3EC2B2C23CC2B2BC3FC2B2B9"
|
||||
$"D1BD46B9D1C045B9D1BA47BF3DB7D9BC3FB7D9C23CB7D90204C4AABD46C4AABA"
|
||||
$"47C4AAC044BF3EC2B2C23CC2B2BC3FC2B2B9D1BD46B9D1C045B9D1BA47BF3DB7"
|
||||
$"D9BC3FB7D9C23CB7D90206C139B941C1BBB977C069B8E9BEC3B9A5BF73B924BD"
|
||||
$"F9BA37BD9737BD71BB32BDAFBCD9BEE7BDA3BE36BD74BFCBBDE3C16ABCEEC0C4"
|
||||
$"BD89C219BC4EC241BA6DC281BB54C21DB9E90205C0D9BA03C0BDB9F644BA35C1"
|
||||
$"8DBB43C19FBAC2C174BC33BF85BCDCC07FBD00BF00BCCCBE83BBDCBE92BC5DBE"
|
||||
$"5FBAD0C080B9EBBF6BB9CAC09FB9EF0206C139B941C1BBB977C069B8E9BEC3B9"
|
||||
$"A5BF73B924BDF9BA37BD9737BD71BB32BDAFBCD9BEE7BDA3BE36BD74BFCBBDE3"
|
||||
$"C16ABCEEC0C4BD89C219BC4EC241BA6DC281BB54C21DB9E90205C0D9BA03C0BD"
|
||||
$"B9F644BA35C18DBB43C19FBAC2C174BC33BF85BCDCC07FBD00BF00BCCCBE83BB"
|
||||
$"DCBE92BC5DBE5FBAD0C080B9EBBF6BB9CAC09FB9EF0204C049BCE8BF51BDB5C0"
|
||||
$"70BD4AC11ABD25C0F3BCC2C022BDF2BDD2C04BBEA8BFFCBD89C066BC59BFA4BC"
|
||||
$"80C007BD51BED70204C049BCE8BF51BDB5C070BD4AC11ABD25C0F3BCC2C022BD"
|
||||
$"F2BDD2C04BBEA8BFFCBD89C066BC59BFA4BC80C007BD51BED70204C8F5BE7EC8"
|
||||
$"F6B85DC8F6C49FBE23C998C41DC998B828C998B350BE7EB34FC4A0B34FB85DBE"
|
||||
$"22B364B828B365C41DB3640204C8F5BE7EC8F6B85DC8F6C49FBE23C998C41DC9"
|
||||
$"98B828C998B350BE7EB34FC4A0B34FB85DBE22B364B828B365C41DB3640E0A00"
|
||||
$"0100023F90A20000000000003F99D843FC31B3AB1A0A010101123F90A2000000"
|
||||
$"0000003F99D843FC31B3AB1A01178002040A020102023F90A20000000000003F"
|
||||
$"99D843FC31B3AB1A0A030103123F90A20000000000003F888443FC31B4253201"
|
||||
$"178002040A040104023F90A20000000000003F99D843FC31B3AB1A0A05010512"
|
||||
$"3F90A20000000000003F99D843FC31B3AB1A01178000040A060106023F90A200"
|
||||
$"00000000003F99D843FC31B3AB1A0A030107123F90A20000000000003F99D843"
|
||||
$"FC31B3AB1A01178002040A05020809023F90A20000000000003F99D843FC31B3"
|
||||
$"AB1A0A05020A0B123F90A20000000000003F99D843FC31B3AB1A01178000040A"
|
||||
$"05010C023F90A20000000000003F99D843FC31B3AB1A0A05010D123F90A20000"
|
||||
$"000000003F99D843FC31B3AB1A01178000040A07010E023F90A2000000000000"
|
||||
$"3F99D843FC31B3AB1A0A08010F123F90A20000000000003F99D843FC31B3AB1A"
|
||||
$"0117800204"
|
||||
};
|
||||
47
games-sports/billardgl/billardgl-1.75.recipe
Normal file
47
games-sports/billardgl/billardgl-1.75.recipe
Normal file
@@ -0,0 +1,47 @@
|
||||
SUMMARY="A 3D OpenGL Billard Simulator"
|
||||
DESCRIPTION="
|
||||
BillardGL is a very nice looking OpenGL pool billiard simulation, which was \
|
||||
developed within the scope of the course "Computergraphics" at the University \
|
||||
of Freiburg (Germany)"
|
||||
REVISION="1"
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2001-2008 Tobias Nopper"
|
||||
HOMEPAGE="http://www.billardgl.de"
|
||||
|
||||
SRC_URI="http://prdownloads.sourceforge.net/billardgl/BillardGL-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="9b865b1254aa30125480ec7ea2ce00d91524db066a524b78492545782856df96"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
billardgl = $portVersion
|
||||
app:BillardGL
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku_devel
|
||||
cmd:g++
|
||||
cmd:make
|
||||
"
|
||||
|
||||
SOURCE_DIR="BillardGL-$portVersion/src"
|
||||
|
||||
PATCHES="billardgl-$portVersion.patchset"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/BillardGL
|
||||
cp BillardGL $appsDir/BillardGL
|
||||
cp -r lang $appsDir/BillardGL
|
||||
cp -r Texturen $appsDir/BillardGL
|
||||
addResourcesToBinaries $portDir/additional-files/haiku_icon.rdef $appsDir/BillardGL/BillardGL
|
||||
}
|
||||
132
games-sports/billardgl/patches/billardgl-1.75.patchset
Normal file
132
games-sports/billardgl/patches/billardgl-1.75.patchset
Normal file
@@ -0,0 +1,132 @@
|
||||
From 22d3838f2067b7d6cc83b93b3fbe4bc971babbf0 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3deyes@gmail.com>
|
||||
Date: Fri, 27 Mar 2015 09:41:50 +0300
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/BillardGL.cpp b/BillardGL.cpp
|
||||
index 1566fe3..39f934d 100644
|
||||
--- a/BillardGL.cpp
|
||||
+++ b/BillardGL.cpp
|
||||
@@ -11,6 +11,10 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+#include <unistd.h>
|
||||
+#endif
|
||||
+
|
||||
#include "Textfeld.h"
|
||||
#include "Schild.h"
|
||||
#include "Tisch.h"
|
||||
@@ -262,7 +266,16 @@ void timerEvent() {
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
- //char string[10];
|
||||
+ //char string[10];
|
||||
+#if defined(__HAIKU__)
|
||||
+ if (argc && argv[0]) {
|
||||
+ char * slash = strrchr(argv[0], '/');
|
||||
+ char c = *(slash+1);
|
||||
+ *(slash + 1) = '\0';
|
||||
+ chdir(argv[0]);
|
||||
+ *(slash + 1) = c;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
KommandoZeilenParameter(argc,argv);
|
||||
|
||||
@@ -285,7 +298,11 @@ int main(int argc, char **argv)
|
||||
glutFullScreen();
|
||||
} else {
|
||||
glutInitWindowSize (BildschirmAufloesung,(BildschirmAufloesung*3)/4);
|
||||
+#if !defined(__HAIKU__)
|
||||
glutInitWindowPosition (0, 0);
|
||||
+#else
|
||||
+ glutInitWindowPosition (100, 100);
|
||||
+#endif
|
||||
glutCreateWindow ("BillardGL 1.7");
|
||||
}
|
||||
|
||||
diff --git a/KommandoZeilenParameter.cpp b/KommandoZeilenParameter.cpp
|
||||
index 5ff8285..44cdae7 100644
|
||||
--- a/KommandoZeilenParameter.cpp
|
||||
+++ b/KommandoZeilenParameter.cpp
|
||||
@@ -8,8 +8,13 @@
|
||||
void SchreibeKonfiguration(){
|
||||
FILE *f;
|
||||
#ifndef _WIN32
|
||||
- char dateiname[40];
|
||||
+ char dateiname[80];
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf(dateiname,"%s/config/settings/BillardGL.conf.v7",getenv("HOME"));
|
||||
+#else
|
||||
sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
|
||||
+#endif
|
||||
+
|
||||
f=fopen(dateiname,"w+");
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
@@ -65,8 +70,12 @@ void SchreibeKonfiguration(){
|
||||
void LeseKonfiguration(){
|
||||
FILE *f;
|
||||
#ifndef _WIN32
|
||||
- char dateiname[40];
|
||||
- sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
|
||||
+ char dateiname[80];
|
||||
+#ifdef __HAIKU__
|
||||
+ sprintf(dateiname,"%s/config/settings/BillardGL.conf.v7",getenv("HOME"));
|
||||
+#else
|
||||
+ sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
|
||||
+#endif
|
||||
f=fopen(dateiname,"r");
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
@@ -153,8 +162,11 @@ void KommandoZeilenParameter(int argc,char **argv) {
|
||||
AmbientesLicht = 1;
|
||||
TischLampen = 2;
|
||||
GrueneLampe = 0;
|
||||
-
|
||||
+#if defined(__HAIKU__)
|
||||
+ FullScreen = 0;
|
||||
+#else
|
||||
FullScreen = 1;
|
||||
+#endif
|
||||
|
||||
EffektLautstaerke = .5;
|
||||
MusikLautstaerke = .5;
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2418824..000b578 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -8,11 +8,11 @@
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -pipe -Wall -W -DNO_DEBUG -g
|
||||
-CXXFLAGS= -pipe -Wall -W -DNO_DEBUG -g
|
||||
+CXXFLAGS= -pipe -Wall -W -DNO_DEBUG
|
||||
INCPATH = -I/usr/X11R6/include
|
||||
LINK = g++
|
||||
LFLAGS =
|
||||
-LIBS = -L/usr/X11R6/lib -lGL -lGLU -lglut -lXmu -lXext -lX11 -lm -lXi
|
||||
+LIBS = -lGL -lGLU -lglut
|
||||
|
||||
## -lqgl -lGLU
|
||||
|
||||
diff --git a/Namen.h b/Namen.h
|
||||
index fa3874b..b04a5c1 100644
|
||||
--- a/Namen.h
|
||||
+++ b/Namen.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#define COMPUTERGEGNERSPIEL 104
|
||||
#define TUTORIAL 105
|
||||
|
||||
-#ifndef _WIN32
|
||||
+#if !defined(_WIN32) && !defined(__HAIKU__)
|
||||
#define PFAD "/usr/share/BillardGL/"
|
||||
#endif
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user