[egoboo] Allow use of symlinks so that font files can be accessed

Bruno Wolff III bruno at fedoraproject.org
Wed Mar 14 03:30:55 UTC 2012


commit 009aeb533bb6b6d9d1ddf1d5055d730b69fd8ef4
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Tue Mar 13 22:29:46 2012 -0500

    Allow use of symlinks so that font files can be accessed
    
    PhysFS blocks access to symlinks by default, but we aren't allowed
    to put font files in the app data and need to use symlinks to get
    at font files.

 egoboo-symlinks.patch |   18 ++++++++++++++++++
 egoboo.spec           |    8 +++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/egoboo-symlinks.patch b/egoboo-symlinks.patch
new file mode 100644
index 0000000..41ebef0
--- /dev/null
+++ b/egoboo-symlinks.patch
@@ -0,0 +1,18 @@
+--- src/game/egoboo_vfs.c.orig	2012-03-13 22:24:11.759731380 -0500
++++ src/game/egoboo_vfs.c	2012-03-13 22:25:48.275998101 -0500
+@@ -152,6 +152,8 @@
+     // set the root path to be the Data Directory, regardless of the executable's path
+     snprintf( tmp_path, SDL_arraysize( tmp_path ), "%s" SLASH_STR, fs_getDataDirectory() );
+     PHYSFS_init( tmp_path );
++    // Allow symlinks to reach fonts
++    PHYSFS_permitSymbolicLinks( 1 );
+ 
+     //---- !!!! make sure the basic directories exist !!!!
+ 
+@@ -2599,4 +2601,4 @@
+ 
+     // Put base path on search path...
+     PHYSFS_addToSearchPath( fs_getDataDirectory(), 1 );
+-}
+\ No newline at end of file
++}
diff --git a/egoboo.spec b/egoboo.spec
index c018b5d..5ff27e5 100644
--- a/egoboo.spec
+++ b/egoboo.spec
@@ -1,6 +1,6 @@
 Name:           egoboo
 Version:        2.8.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A top down graphical (3D) RPG in the spirit of Nethack
 Group:          Amusements/Games
 License:        GPLv3
@@ -21,6 +21,8 @@ Patch2:         egoboo-enet13.patch
 Patch3:         egoboo-badprint.patch
 Patch4:         egoboo-paths.patch
 Patch5:         egoboo-direction.patch
+# PhysFS blocks symlinks by default, but we need them for fonts
+Patch6:         egoboo-symlinks.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  SDL_mixer-devel SDL_ttf-devel SDL_image-devel enet-devel
 BuildRequires:  desktop-file-utils physfs-devel
@@ -44,6 +46,7 @@ dimension.
 %patch3 -b .badprint
 %patch4 -b .paths
 %patch5 -b .direction
+%patch6 -b .symlinks
 
 %build
 make -C src
@@ -77,6 +80,9 @@ desktop-file-install --vendor fedora            \
 
 
 %changelog
+* Tue Mar 13 2012 Bruno Wolff III <bruno at wolff.to> 2.8.1-2
+- Allow symlinks so we can access font files
+
 * Sun Mar 11 2012 Bruno Wolff III <bruno at wolff.to> 2.8.1-1
 - Update to upstream 2.8.1
 - Changelog: http://egoboo.sourceforge.net/forum/viewtopic.php?p=1119#1119


More information about the scm-commits mailing list