aboutsummaryrefslogtreecommitdiff
path: root/games/ember/files
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2005-10-04 17:55:56 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2005-10-04 17:55:56 +0000
commit2dfa8b23ce718052b003952e2cf0df96d2ff3091 (patch)
treee9976297961cfdf2e0f76133310c4463a3f36574 /games/ember/files
parente6ee415d32a0ca52a3522a462e9bd7a7749251db (diff)
downloadports-2dfa8b23ce718052b003952e2cf0df96d2ff3091.tar.gz
ports-2dfa8b23ce718052b003952e2cf0df96d2ff3091.zip
Notes
Diffstat (limited to 'games/ember/files')
-rw-r--r--games/ember/files/patch-ember131
-rw-r--r--games/ember/files/patch-src-framework-osdir.h196
-rw-r--r--games/ember/files/patch-src-framework-prefix.cpp74
-rw-r--r--games/ember/files/patch-src-services-logging-LoggingService.h10
4 files changed, 411 insertions, 0 deletions
diff --git a/games/ember/files/patch-ember b/games/ember/files/patch-ember
new file mode 100644
index 000000000000..18aa9e40e171
--- /dev/null
+++ b/games/ember/files/patch-ember
@@ -0,0 +1,131 @@
+--- /dev/null Mon Oct 3 20:13:37 2005
++++ ember Mon Oct 3 20:17:51 2005
+@@ -0,0 +1,128 @@
++#!/bin/sh
++
++
++
++# Function to find the real directory a program resides in.
++# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
++FindPath()
++{
++ fullpath="`echo $0 | grep /`"
++ if [ "$fullpath" = "" ]; then
++ oIFS="$IFS"
++ IFS=:
++ for path in $PATH
++ do if [ -x "$path/$0" ]; then
++ if [ "$path" = "" ]; then
++ path="."
++ fi
++ fullpath="$path/$0"
++ break
++ fi
++ done
++ IFS="$oIFS"
++ fi
++ if [ "$fullpath" = "" ]; then
++ fullpath="$0"
++ fi
++
++ # Is the sed/ls magic portable?
++ if [ -L "$fullpath" ]; then
++ #fullpath="`ls -l "$fullpath" | awk '{print $01}'`"
++ fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'`
++ fi
++ dirname $fullpath
++}
++
++
++
++
++
++# Setup variables
++#get the dir where this script resides in
++set -- $(FindPath)
++path=$*
++test=$1
++#if [ "$fullpath" = "" ]; then
++if [ "$test" = "." ]; then
++ path=${PWD}
++fi
++prefix=${path}/..
++
++#prefix=$HOME/opt/ember_static_x86/
++echo "According to my calculations Ember should be installed in $prefix"
++
++
++
++#scriptPath=$0
++#prefix=`dirname ${scriptPath}`/..
++
++exec_prefix=${prefix}
++bindir=${exec_prefix}/bin
++datadir=${prefix}/share/games/ember
++etcdir=${prefix}/etc/ember
++homedata=$HOME/.ember
++
++WFUT_JAR=WFUT.jar
++
++# Create dir if required
++if [ ! -d $homedata ] ; then
++ echo "Created ~/.ember to store all game data."
++ mkdir $homedata
++fi
++
++# Determine if java executable exists in path
++JAVA=`which java`
++if [ -x $JAVA ] ; then
++
++ # See if Updater exists in home dir
++ if [ ! -e $homedata/$WFUT_JAR ] ; then
++ # Check to see if its in the install dir
++ if [ -e $datadir/$WFUT_JAR ] ; then
++ # Install into home dir
++ echo "Installing Updater"
++
++ # Copy WFUT to home dir
++ cp $datadir/$WFUT_JAR $homedata
++
++ fi
++ fi
++
++ #make sure the configfile also is copied
++ if [ ! -e $homedata/configfile ] ; then
++ echo "No config file for WFUT found, trying to install."
++ if [ -e $etcdir/configfile ] ; then
++ # Copy WFUT to home dir
++ cp $etcdir/configfile $homedata/
++ echo "Copied config file for WFUT."
++ fi
++ fi
++
++
++ # Run Updater if it exists
++#it should exist
++# if [ -e $homedata/$WFUT_JAR ] ; then
++ # Store Current dir
++ CUR_DIR=`pwd`
++ # We need to change here so updater knows where to find / store data
++ cd $homedata
++ # Update
++ echo "Updating data from the server, this might take some time on a slow connection (circa 30 Mb of data)"
++ xterm -T "Downloading media..." -e $JAVA -jar $WFUT_JAR update ember-media
++ # Restore dir
++ cd $CUR_DIR
++# fi
++else
++ echo "Java not found in path. Updater cannot be run. For now, that means that you won't get the media necessary, so I will quit right now. In the future this dependecy on java will disappear though."
++ exit
++fi
++
++LD_LIBRARY=$prefix/lib/ember:$LD_LIBRARY
++LD_LIBRARY_PATH=$prefix/lib/ember:$LD_LIBRARY_PATH
++export LD_LIBRARY
++export LD_LIBRARY_PATH
++
++# Execute real ember binary
++echo "Starting Ember...."
++#we have to do the LD_PRELOAD thing, because else at least I get an error: libnvidia-tls.so.1: cannot handle TLS data /ehj
++LD_PRELOAD=libGL.so.1 $bindir/ember.bin --binrelocloading
++
diff --git a/games/ember/files/patch-src-framework-osdir.h b/games/ember/files/patch-src-framework-osdir.h
new file mode 100644
index 000000000000..2902f3e3cf89
--- /dev/null
+++ b/games/ember/files/patch-src-framework-osdir.h
@@ -0,0 +1,196 @@
+--- /dev/null Mon Oct 3 19:55:00 2005
++++ src/framework/osdir.h Sat Sep 24 01:01:11 2005
+@@ -0,0 +1,193 @@
++/**
++ * Copyright (C) 2002 Bart Vanhauwaert
++ *
++ * Permission to use, copy, modify, distribute and sell this software
++ * for any purpose is hereby granted without fee. This license
++ * includes (but is not limited to) standalone compilation or as part
++ * of a larger project.
++ *
++ * This software is provided "as is" without express or implied warranty.
++ *
++ * For a full statement on warranty and terms and conditions for
++ * copying, distribution and modification, please see the comment block
++ * at the end of this file.
++ *
++ * Version 1
++ *
++ */
++
++#ifndef OSLINK_OSDIR_HEADER_H_
++#define OSLINK_OSDIR_HEADER_H_
++
++#if defined(unix) || defined(__unix) || defined(__unix__)
++#define OSLINK_OSDIR_POSIX
++#elif defined(_WIN32)
++#define OSLINK_OSDIR_WINDOWS
++#else
++#define OSLINK_OSDIR_NOTSUPPORTED
++#endif
++
++#include <string>
++
++#if defined(OSLINK_OSDIR_NOTSUPPORTED)
++
++namespace oslink
++{
++ class directory
++ {
++ public:
++ directory(const std::string&) { }
++ operator void*() const { return (void*)0; }
++ std::string next() { return ""; }
++ };
++}
++
++#elif defined(OSLINK_OSDIR_POSIX)
++
++#include <sys/types.h>
++#include <dirent.h>
++
++namespace oslink
++{
++ class directory
++ {
++ public:
++ directory(const std::string& aName)
++ : handle(opendir(aName.c_str())), willfail(false)
++ {
++ if (!handle)
++ willfail = true;
++ else
++ {
++ dirent* entry = readdir(handle);
++ if (entry)
++ current = entry->d_name;
++ else
++ willfail = true;
++ }
++ }
++ ~directory()
++ {
++ if (handle)
++ closedir(handle);
++ }
++ operator void*() const
++ {
++ return willfail ? (void*)0:(void*)(-1);
++ }
++ std::string next()
++ {
++ std::string prev(current);
++ dirent* entry = readdir(handle);
++ if (entry)
++ current = entry->d_name;
++ else
++ willfail = true;
++ return prev;
++ }
++ private:
++ DIR* handle;
++ bool willfail;
++ std::string current;
++ };
++}
++
++#elif defined(OSLINK_OSDIR_WINDOWS)
++
++#include <windows.h>
++#include <winbase.h>
++
++namespace oslink
++{
++ class directory
++ {
++ public:
++ directory(const std::string& aName)
++ : handle(INVALID_HANDLE_VALUE), willfail(false)
++ {
++ // First check the attributes trying to access a non-directory with
++ // FindFirstFile takes ages
++ DWORD attrs = GetFileAttributes(aName.c_str());
++ if ( (attrs == 0xFFFFFFFF) || ((attrs && FILE_ATTRIBUTE_DIRECTORY) == 0) )
++ {
++ willfail = true;
++ return;
++ }
++ std::string Full(aName);
++ // Circumvent a problem in FindFirstFile with c:\\* as parameter
++ if ( (Full.length() > 0) && (Full[Full.length()-1] != '\\') )
++ Full += "\\";
++ WIN32_FIND_DATA entry;
++ handle = FindFirstFile( (Full+"*").c_str(), &entry);
++ if (handle == INVALID_HANDLE_VALUE)
++ willfail = true;
++ else
++ current = entry.cFileName;
++ }
++ ~directory()
++ {
++ if (handle != INVALID_HANDLE_VALUE)
++ FindClose(handle);
++ }
++
++ operator void*() const
++ {
++ return willfail ? (void*)0:(void*)(-1);
++ }
++ std::string next()
++ {
++ std::string prev = current;
++ WIN32_FIND_DATA entry;
++ int ok = FindNextFile(handle, &entry);
++ if (!ok)
++ willfail = true;
++ else
++ current = entry.cFileName;
++ return current;
++ }
++ private:
++ HANDLE handle;
++ bool willfail;
++ std::string current;
++ };
++}
++
++
++#endif
++
++#endif
++
++/**
++ *
++ * The "library", below, refers to the collection of software functions
++ * and/or data contained in this file, prepared so as to be conveniently
++ * compiled and linked with application programs (which use some of those
++ * functions and data) to form executables.
++ *
++ * NO WARRANTY
++ *
++ * 1. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
++ * WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
++ * EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
++ * OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
++ * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
++ * LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
++ * THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
++ *
++ * 2. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
++ * WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
++ * AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
++ * FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
++ * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
++ * LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
++ * RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
++ * FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
++ * SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
++ * DAMAGES.
++ *
++ * END OF TERMS AND CONDITIONS
++ *
++ */
++
diff --git a/games/ember/files/patch-src-framework-prefix.cpp b/games/ember/files/patch-src-framework-prefix.cpp
new file mode 100644
index 000000000000..1d9500ea5cb1
--- /dev/null
+++ b/games/ember/files/patch-src-framework-prefix.cpp
@@ -0,0 +1,74 @@
+--- src/framework/prefix.cpp.orig Mon Oct 3 19:05:02 2005
++++ src/framework/prefix.cpp Mon Oct 3 19:19:25 2005
+@@ -32,7 +32,7 @@
+
+ #ifndef BR_PTHREADS
+ /* Change 1 to 0 if you don't want pthread support */
+- #define BR_PTHREADS 1
++ #define BR_PTHREADS 0
+ #endif /* BR_PTHREADS */
+
+ #include <stdlib.h>
+@@ -105,14 +105,14 @@
+ FILE *f;
+ char *path;
+
+- br_return_val_if_fail (symbol != NULL, NULL);
++ br_return_val_if_fail (symbol != NULL, (char *)NULL);
+
+ f = fopen ("/proc/self/maps", "r");
+ if (!f) {
+ if (fallback_func)
+ return fallback_func(symbol, fallback_data);
+ else
+- return NULL;
++ return (char *)NULL;
+ }
+
+ while (!feof (f))
+@@ -151,7 +151,7 @@
+ }
+
+ fclose (f);
+- return NULL;
++ return (char *)NULL;
+ }
+
+
+@@ -173,10 +173,10 @@
+ {
+ char *path, *prefix;
+
+- br_return_val_if_fail (symbol != NULL, NULL);
++ br_return_val_if_fail (symbol != NULL, (char *)NULL);
+
+ path = br_locate (symbol);
+- if (!path) return NULL;
++ if (!path) return (char *)NULL;
+
+ prefix = br_extract_prefix (path);
+ free (path);
+@@ -203,11 +203,11 @@
+ {
+ char *tmp, *newpath;
+
+- br_return_val_if_fail (symbol != NULL, NULL);
+- br_return_val_if_fail (path != NULL, NULL);
++ br_return_val_if_fail (symbol != NULL, (char *)NULL);
++ br_return_val_if_fail (path != NULL, (char *)NULL);
+
+ tmp = br_locate_prefix (symbol);
+- if (!tmp) return NULL;
++ if (!tmp) return (char *)NULL;
+
+ if (strcmp (tmp, "/") == 0)
+ newpath = strdup (path);
+@@ -215,7 +215,7 @@
+ newpath = br_strcat (tmp, path);
+
+ /* Get rid of compiler warning ("br_prepend_prefix never used") */
+- if (0) br_prepend_prefix (NULL, NULL);
++ if (0) br_prepend_prefix (NULL, (char *)NULL);
+
+ free (tmp);
+ return newpath;
diff --git a/games/ember/files/patch-src-services-logging-LoggingService.h b/games/ember/files/patch-src-services-logging-LoggingService.h
new file mode 100644
index 000000000000..64b10e48758a
--- /dev/null
+++ b/games/ember/files/patch-src-services-logging-LoggingService.h
@@ -0,0 +1,10 @@
+--- src/services/logging/LoggingService.h.orig Tue Oct 4 17:58:10 2005
++++ src/services/logging/LoggingService.h Tue Oct 4 17:58:25 2005
+@@ -28,6 +28,7 @@
+ //#include <sigc++/object_slot.h>
+
+ #include <ctime>
++#include <stdarg.h>
+
+
+ namespace Ember