games/fgrun: Updated for version 20131117_973f772.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2013-11-18 18:29:01 +01:00 committed by Robby Workman
parent bcdc93d0d4
commit 83940e056e
6 changed files with 67 additions and 50 deletions

View file

@ -1,29 +0,0 @@
--- fgrun-1.6.2/src/wizard_funcs.cxx.orig 2012-09-11 14:57:53.176639212 +0200
+++ fgrun-1.6.2/src/wizard_funcs.cxx 2012-09-11 15:11:35.995000085 +0200
@@ -296,7 +296,7 @@
{
fg_scenery = buf;
}
- else if (reloadPath && systemPrefs.get( "fg_scenery", buf, "", buflen-1))
+ else if (systemPrefs.get( "fg_scenery", buf, "", buflen-1))
{
fg_scenery = buf;
prefs.set("fg_scenery", buf);
@@ -338,7 +338,7 @@
{
ts_dir = iVal;
}
- else if (reloadPath && systemPrefs.get("ts_dir", iVal, 0))
+ else if (systemPrefs.get("ts_dir", iVal, 0))
{
prefs.set("ts_dir", ts_dir);
systemPrefs.get("ts_dir_init", iVal, 0);
@@ -353,7 +353,7 @@
{
ts_exe_->value(buf);
}
- else if (reloadPath && systemPrefs.get( "ts_exe", buf, "", buflen-1))
+ else if (systemPrefs.get( "ts_exe", buf, "", buflen-1))
{
ts_exe_->value( buf );
prefs.set("ts_exe", buf);

View file

@ -3,8 +3,8 @@
# Written by Diego Pantano <poplin.dp@gmail.com>
PRGNAM=fgrun
VERSION=${VERSION:-1.6.2}
BUILD=${BUILD:-2}
VERSION=${VERSION:-20131117_973f772}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -40,18 +40,30 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Fix a few bugs.
patch -p1 < $CWD/fgrun-1.6.1-fix-crash-when-setting-defaults.patch
patch -p1 < $CWD/fgrun-1.6.2-fix-reloadpath-logic.patch
patch -p1 < $CWD/patches/fgrun-1.6.1-fix-crash-when-setting-defaults.patch
patch -p1 < $CWD/patches/fgrun-1.6.2-fix-reloadpath-logic.patch
patch -p1 < $CWD/patches/fgrun-1.7.0-update-required-SimGear-version.patch
sed \
-e "s|fltk-config|fltk13-config|" \
-e "s|fluid|fluid13|" \
-e "s|\${CMAKE_CURRENT_LIST_DIR}|/usr/share/cmake-2.8/Modules|" \
/usr/share/cmake-2.8/Modules/FindFLTK.cmake \
> CMakeModules/FindFLTK13.cmake
sed -i \
-e "s|FLTK\ REQUIRED|FLTK13\ REQUIRED|" \
-e "s|FLTK_FOUND|FLTK13_FOUND|" \
CMakeLists.txt
mkdir -p build
cd build
@ -59,19 +71,17 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSIMGEAR_SHARED=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
mkdir -p $PKG/etc/fltk/flightgear.org
install -m 0644 $CWD/fgrun.prefs $PKG/etc/fltk/flightgear.org/fgrun.prefs.new
install -m 0644 -D $CWD/fgrun.prefs $PKG/etc/fltk/flightgear.org/fgrun.prefs.new
install -m 0644 -D $CWD/fgrun.desktop $PKG/usr/share/applications/fgrun.desktop
install -m 0644 -D $CWD/fgrun.png $PKG/usr/share/pixmaps/fgrun.png
mkdir -p $PKG/usr/share/{applications,pixmaps}
install -m 0644 $CWD/fgrun.desktop $PKG/usr/share/applications/
install -m 0644 $CWD/fgrun.png $PKG/usr/share/pixmaps/
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,10 +1,10 @@
PRGNAM="fgrun"
VERSION="1.6.2"
VERSION="20131117_973f772"
HOMEPAGE="http://sourceforge.net/projects/fgrun/"
DOWNLOAD="http://downloads.sourceforge.net/fgrun/fgrun-1.6.2.tar.bz2"
MD5SUM="683c0f97be2163e85a518ee706d92177"
DOWNLOAD="http://ponce.cc/slackware/sources/repo/fgrun-20131117_973f772.tar.xz"
MD5SUM="05dbca9d72ca4c96ee97642c81ef4e82"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="fltk"
REQUIRES="fltk13 FlightGear"
MAINTAINER="Diego Pantano"
EMAIL="poplin_dp@gmail.com"

View file

@ -0,0 +1,11 @@
--- fgrun-1.6.2/src/wizard_funcs.cxx.orig 2012-09-11 14:57:53.176639212 +0200
+++ fgrun-1.6.2/src/wizard_funcs.cxx 2012-09-11 15:11:35.995000085 +0200
@@ -296,7 +296,7 @@
{
fg_scenery = buf;
}
- else if (reloadPath && systemPrefs.get( "fg_scenery", buf, "", buflen-1))
+ else if (systemPrefs.get( "fg_scenery", buf, "", buflen-1))
{
fg_scenery = buf;
prefs.set("fg_scenery", buf);

View file

@ -0,0 +1,25 @@
From 436f659bdcef3726ece7928e221ba7ea7805381e Mon Sep 17 00:00:00 2001
From: Fabrice Bellet <fabrice@bellet.info>
Date: Sun, 22 Sep 2013 12:55:33 +0200
Subject: [PATCH 5/5] Update required SimGear version
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa95c59..4b6fea5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,7 @@ find_package(Boost REQUIRED)
find_package(ZLIB REQUIRED)
find_package(FLTK REQUIRED)
find_package(OpenSceneGraph 2.8.1 REQUIRED osgText osgDB osgParticle osgUtil osgViewer osgGA)
-find_package(SimGear 2.8.0 REQUIRED)
+find_package(SimGear 2.12.0 REQUIRED)
if (ENABLE_NLS)
find_package(Gettext)
endif (ENABLE_NLS)
--
1.8.3.1