This is an automated email from the git hooks/post-receive script.

locutusofborg-guest pushed a commit to branch master
in repository hedgewars.

commit 36da3f112540150b1e3c451615db91fccb9bfb9a
Author: Gianfranco Costamagna <[email protected]>
Date:   Sun Jan 19 18:18:15 2014 +0100

    Trying to use system physfs and fonts, reorganized debian/copyright file
---
 debian/changelog                         |   2 +-
 debian/control                           |   3 +-
 debian/copyright                         | 194 +++++++++++++----------
 debian/patches/series                    |   2 +
 debian/patches/using_system_fonts.patch  | 165 +++++++++++++++++++
 debian/patches/using_system_physfs.patch | 263 +++++++++++++++++++++++++++++++
 6 files changed, 541 insertions(+), 88 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 06353ad..fe3328e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedgewars (0.9.20.5-2) UNRELEASED; urgency=low
+hedgewars (0.9.20.5-3) experimental; urgency=low
 
   * Trying to use the system libphysfs library
   * debian/control:
diff --git a/debian/control b/debian/control
index c5c3042..73dfafd 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Priority: extra
 Maintainer: Debian Games Team <[email protected]>
 Uploaders: Dmitry E. Oboukhov <[email protected]>,
  Gianfranco Costamagna <[email protected]>
+Standards-Version: 3.9.5
 Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~),
  cmake,
  qt4-qmake,
@@ -36,8 +37,6 @@ Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~),
 # finding system fonts
  fonts-dejavu-core,
  ttf-wqy-zenhei
-
-Standards-Version: 3.9.5
 Homepage: http://hedgewars.org
 VCS-Git: git://anonscm.debian.org/pkg-games/hedgewars.git
 VCS-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/hedgewars.git
diff --git a/debian/copyright b/debian/copyright
index 25f05be..9ec4ac0 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,49 +1,65 @@
-This package was debianized by Dmitry E. Oboukhov <[email protected]> on
-Mon, 27 Nov 2006 13:58:41 +0300.
-
-It was downloaded from:
-       http://hedgewars.org/
-
-Upstream Author:
-       Andrey Korotaev <[email protected]>
-       Igor Ulyanov aka Displacer <[email protected]>
-
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://hedgewars.org/
+Upstream-Contact: Andrey Korotaev <[email protected]>, Igor Ulyanov aka 
Displacer <[email protected]>
 
+Files: *
+Copyright:
+        2004-2014 Andrey Korotaev <[email protected]>
+        2006-2008 Igor Ulyanov aka Displacer <[email protected]>
+License: GPL-2
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+Files: hedgewars/*
 Copyright:
-       2004-2014 Andrey Korotaev <[email protected]>
-       2006-2008 Igor Ulyanov aka Displacer <[email protected]>
-
-       hedgewars/*
        2004-2013 Andrey Korotaev <[email protected]>
        1994-2006 Tecgraf, PUC-Rio (Lua wrapper)
        2012      Richard Deurwaarder <[email protected]> (uTouch.pas)
        2002-2009 Wolfgang Ehrhardt (adler32.pas)
+License: GPL-2
 
-       cmake_modules/*
+Files: cmake_modules/*
+Copyright:
        2012      Petroules Corporation (TargetArch.cmake)
 
-       gameServer/*
+Files: gameServer/*
+Copyright:
        2009 Anthony Simpson (Data/TConfig.hs)
+License: GPL-2
 
-       (not used by linux)
-       misc/winutils/include/*
+Files: misc/winutils/include/*
+Copyright:
        1997-2012 Sam Lantinga <[email protected]> (SDL_*.h, begin_code.h, 
close_code.h)
        1991-2004 Silicon Graphics, Inc. (SDL_opengl.h)
        1995-2010 Jean-loup Gailly and Mark Adler (zlib.h)
        1995-2010 Jean-loup Gailly (zconf.h)
 
-       (not used by linux)
-       misc/winutils/include/png.h misc/winutils/include/pngconf.h
+Files: misc/winutils/include/png.h misc/winutils/include/pngconf.h
+Copyright:
        1998-2012 Glenn Randers-Pehrson
        1996,1997 Andreas Dilger (Version 0.96)
        1995,1996 Guy Eric Schalnat, Group 42, Inc. (Version 0.88)
 
-       (not used by linux)
-       misc/winutils/include/libavformat/*
+Files: misc/winutils/include/libavformat/*
+Copyright:
        2001      Fabrice Bellard
 
-       (not used by linux)
-       misc/winutils/include/libavcodec/*
+Files: misc/winutils/include/libavcodec/*
+Copyright:
        2008      NVIDIA (vdpau.h)
        2008-2009 Splitted-Desktop Systems (vaapi.h)
        2011      Sebastien Zwickert (vda.h)
@@ -51,13 +67,13 @@ Copyright:
        2001      Fabrice Bellard (avcodec.h)
        2003      Ivan Kalvachev (xvmc.h)
 
-       (not used by linux)
-       misc/winutils/include/GL/glut.h
+Files: misc/winutils/include/GL/glut.h
+Copyright:
        1994,1995 Mark J. Kilgard
         1996,1998 Mark J. Kilgard
 
-       (not used by linux)
-       misc/winutils/include/libavutil/*
+Files: misc/winutils/include/libavutil/*
+Copyright:
        2005,2006 Michael Niedermayer <[email protected]>
        2007,2008 Michael Niedermayer <[email protected]>
        2006,2007 Mans Rullgard (adler32.h, avstring.h)
@@ -70,12 +86,12 @@ Copyright:
        2006      Ryan Martell <[email protected]> (base64.h)
        2006      Reimar Doeffinger (lzo.h)
 
-       (hedgewars will use the embedded libphysfs until the development 
release 2.1.0 will be released as stable and packaged)
-       misc/libphysfs/*
+Files: misc/libphysfs/*
+Copyright:
        2007      Ryan C. Gordon
 
-       (not used by linux)
-       project_files/Android-build/*
+Files: project_files/Android-build/*
+Copyright:
        2011-2012 Richard Deurwaarder <[email protected]>
        2012      Simeon Maxein <[email protected]>
        2004-2013 Andrey Korotaev <[email protected]>
@@ -83,10 +99,12 @@ Copyright:
        2005,2009 Ivan SZKIBA (Licenses/ini4j)
        2005-2008 The Android Open Source Project
 
-       (not used by linux)
-       frontlib/iniparser/*
+Files: frontlib/iniparser/*
+Copyright:
        2000-2012 Nicolas Devillard
-       frontlib/*
+
+Files: frontlib/*
+Copyright:
        2012      Simeon Maxein <[email protected]>
        2004-2013 Andrey Korotaev <[email protected]> (hwconsts.h, net/netconn.c)
        1999,2002 Aladdin Enterprises. (md5/md5.{c,h})
@@ -96,11 +114,12 @@ Copyright:
        2004-2006 Free Software Foundation, Inc. (base64/base64.c)
        2009-2012 Free Software Foundation, Inc. (base64/base64.c)
 
-       (not used by linux)
-       cmdlineClient/cmdlineClient.c
+Files: cmdlineClient/cmdlineClient.c
+Copyright:
        2012      Simeon Maxein <[email protected]>
 
-       QTfrontend/*
+Files: QTfrontend/*
+Copyright:
        2004-2013 Andrey Korotaev <[email protected]>
        2006-2008 Igor Ulyanov <[email protected]>
        2012-2013 Vittorio Giovara <[email protected]> 
(HWApplication.h, weapons.h)
@@ -110,68 +129,73 @@ Copyright:
        2007      Rainer Brockerhoff (util/platform/)
        2006-2009 M Cubed Software (util/platform/)
 
-       share/*
+Files: share/*
+Copyright:
        2004-2014 Hedgewars Project
        2012      Vatten (Scripts/Multiplayer/Continental_supplies.lua)
 
-       Images in Data/Front, Data/Graphics/Graves,
+Files: Images in Data/Front Data/Graphics/Graves
+Copyright:
        themes "ethereal", "norsk", "wood", "xtheme":
                Copyright 2005 Alexey Andreev <[email protected]>
        
-       theme "olympics"
+Files: theme "olympics"
+Copyright:
                Copyright 2009 Guillaume Englert <[email protected]>
 
-       theme "cave"
+Files: theme "cave"
+Copyright:
                Copyright 2011 Guillaume Englert <[email protected]>
 
-       images in Data/Graphics,
-       sounds in Data/Sounds,
-       themes "avematan", "bubbles", "tibet"
+Files: images in Data/Graphics
+Copyright:
+               Copyright 2004, 2005, 2006 Andrey Korotaev <[email protected]>
+
+Files: sounds in Data/Sounds
+Copyright:
                Copyright 2004, 2005, 2006 Andrey Korotaev <[email protected]>
 
-       Map and theme "cheese":
+Files: themes "avematan" "bubbles" "tibet"
+Copyright:
+               Copyright 2004, 2005, 2006 Andrey Korotaev <[email protected]>
+
+Files: Map and theme "cheese"
+Copyright:
                based on Wormux map "cheese" by Anthony Carré <yeknan AT yahoo 
DOT fr>
 
-       Map and theme "Volcano": 
-               by Damion Brookes <[email protected]>
+Files: Map and theme "Volcano" 
+Copyright:
+               Damion Brookes <[email protected]>
 
-       (not used by linux)
-       tools/
+Files: tools/*
+Copyright:
        2012     Vittorio Giovara <[email protected]> 
(w32DownloadUnzip.vbs)
        2011     Jared Hobbs (support/dmg-license.py)
 
-More informations on file:
-       QTfrontend/res/html/about.html
-
-License:
-   This package is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This package is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this package; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-
-   Images and sounds are distributed under the terms of the 
-   GNU FDL licence.
-
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL-2'.
-
-Data/Fonts/DroidSansFallback.ttf:
-       Google Droid are © The Android Open Source Project under the
-       terms of the Apache license (2.0). Google Droid changes are in
-       public domain.
-On Debian systems, the complete text of the Apache License version 2.0
-can be found in `/usr/share/common-licenses/Apache-2.0'.
-
-The Debian packaging is © 2006, Dmitry E. Oboukhov <[email protected]>,
-2012-2014 Gianfranco Costamagna <[email protected]> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'.
+Files: debian/*
+Copyright: 2006      Dmitry E. Oboukhov <[email protected]>
+           2012-2014 Gianfranco Costamagna <[email protected]>
+License: GPL-2+
+ This program is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.  See the GNU General Public License for more
+ details.
+ .
+ You should have received a copy of the GNU General Public
+ License along with this package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+Comment:
+ More information on file QTfrontend/res/html/about.html
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..42a5938
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+using_system_physfs.patch
+using_system_fonts.patch
diff --git a/debian/patches/using_system_fonts.patch 
b/debian/patches/using_system_fonts.patch
new file mode 100644
index 0000000..d218444
--- /dev/null
+++ b/debian/patches/using_system_fonts.patch
@@ -0,0 +1,165 @@
+# HG changeset patch
+# User sheepluva
+# Date 1390062751 -3600
+#      Sat Jan 18 17:32:31 2014 +0100
+# Branch 0.9.20
+# Node ID ab94889bd185654aac3a587c162ed5e4ce90445c
+# Parent  f74ae7ee358599195c8e646f1f8e8652d0d38a24
+Description:
+backport of system fonts inclusion patches
+
+diff -r f74ae7ee3585 -r ab94889bd185 CMakeLists.txt
+--- a/CMakeLists.txt   Sat Jan 18 16:55:50 2014 +0100
++++ b/CMakeLists.txt   Sat Jan 18 17:32:31 2014 +0100
+@@ -38,6 +38,10 @@
+     set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder 
path")
+ endif()
+ 
++#system paths for finding required fonts (see share/hedgewars/Data/fonts)
++#subdirectories will NOT be searched.
++#all fonts that can't be found will be bundled with hedgewars
++set(FONTS_DIRS "" CACHE STRING "Additional paths to folders where required 
fonts can be found ( ; is separator)")
+ 
+ #versioning
+ set(CPACK_PACKAGE_VERSION_MAJOR 0)
+diff -r f74ae7ee3585 -r ab94889bd185 hedgewars/CMakeLists.txt
+--- a/hedgewars/CMakeLists.txt Sat Jan 18 16:55:50 2014 +0100
++++ b/hedgewars/CMakeLists.txt Sat Jan 18 17:32:31 2014 +0100
+@@ -23,6 +23,17 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in 
${CMAKE_CURRENT_BINARY_DIR}/config.inc)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ 
++# convert list into pascal array
++list(LENGTH FONTS_DIRS ndirs)
++set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
++foreach(fontdir ${FONTS_DIRS})
++    set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
++endforeach(fontdir)
++set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
++
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in 
${CMAKE_CURRENT_BINARY_DIR}/config.inc)
++include_directories(${CMAKE_CURRENT_BINARY_DIR})
++
+ 
+ #set the sources with the correct order of dependencies so that cmake won't 
be confused
+ set(engine_sources
+diff -r f74ae7ee3585 -r ab94889bd185 hedgewars/config.inc.in
+--- a/hedgewars/config.inc.in  Sat Jan 18 16:55:50 2014 +0100
++++ b/hedgewars/config.inc.in  Sat Jan 18 17:32:31 2014 +0100
+@@ -26,3 +26,4 @@
+       cRevisionString = '${HEDGEWARS_REVISION}';
+       cHashString = '${HEDGEWARS_HASH}';
+       cDefaultPathPrefix = '${HEDGEWARS_FULL_DATADIR}/Data';
++      cFontsPaths: ${FONTS_DIRS_ARRAY}
+diff -r f74ae7ee3585 -r ab94889bd185 hedgewars/uPhysFSLayer.pas
+--- a/hedgewars/uPhysFSLayer.pas       Sat Jan 18 16:55:50 2014 +0100
++++ b/hedgewars/uPhysFSLayer.pas       Sat Jan 18 17:32:31 2014 +0100
+@@ -3,6 +3,8 @@
+ interface
+ uses SDLh, LuaPas;
+ 
++{$INCLUDE "config.inc"}
++
+ const PhysfsLibName = {$IFDEF 
PHYSFS_INTERNAL}'libhwphysfs'{$ELSE}'libphysfs'{$ENDIF};
+ const PhyslayerLibName = 'libphyslayer';
+ 
+@@ -41,12 +43,13 @@
+ function PHYSFSRWOPS_openRead(fname: PChar): PSDL_RWops; cdecl ; external 
PhyslayerLibName;
+ function PHYSFSRWOPS_openWrite(fname: PChar): PSDL_RWops; cdecl; external 
PhyslayerLibName;
+ 
+-function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : 
LongInt; cdecl; external PhysfsLibName;
++function PHYSFS_mount(newDir, mountPoint: PChar; appendToPath: LongBool) : 
LongBool; cdecl; external PhysfsLibName;
+ function PHYSFS_openRead(fname: PChar): PFSFile; cdecl; external 
PhysfsLibName;
+ function PHYSFS_eof(f: PFSFile): LongBool; cdecl; external PhysfsLibName;
+ function PHYSFS_readBytes(f: PFSFile; buffer: pointer; len: Int64): Int64; 
cdecl; external PhysfsLibName;
+ function PHYSFS_close(f: PFSFile): LongBool; cdecl; external PhysfsLibName;
+ function PHYSFS_exists(fname: PChar): LongBool; cdecl; external PhysfsLibName;
++function PHYSFS_getLastError(): PChar; cdecl; external PhysfsLibName;
+ 
+ procedure hedgewarsMountPackages(); cdecl; external PhyslayerLibName;
+ 
+@@ -127,9 +130,23 @@
+         pfsBlockRead:= r
+ end;
+ 
++procedure pfsMount(path: AnsiString; mountpoint: PChar);
++begin
++    if PHYSFS_mount(Str2PChar(path), mountpoint, false) then
++        AddFileLog('[PhysFS] mount ' + path + ' at ' + mountpoint + ' : ok')
++    else
++        AddFileLog('[PhysFS] mount ' + path + ' at ' + mountpoint + ' : 
FAILED ("' + PHYSFS_getLastError() + '")');
++end;
++
++procedure pfsMountAtRoot(path: AnsiString);
++begin
++    pfsMount(path, '/');
++end;
++
+ procedure initModule;
+ var i: LongInt;
+     cPhysfsId: shortstring;
++    fp: PChar;
+ begin
+ {$IFDEF HWLIBRARY}
+     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
+@@ -141,16 +158,21 @@
+     i:= PHYSFS_init(Str2PChar(cPhysfsId));
+     AddFileLog('[PhysFS] init: ' + inttostr(i));
+ 
+-    i:= PHYSFS_mount(Str2PChar(PathPrefix), nil, false);
+-    AddFileLog('[PhysFS] mount ' + PathPrefix + ': ' + inttostr(i));
+-    i:= PHYSFS_mount(Str2PChar(UserPathPrefix + '/Data'), nil, false);
+-    AddFileLog('[PhysFS] mount ' + UserPathPrefix + '/Data: ' + inttostr(i));
++    // mount system fonts paths first
++    for i:= low(cFontsPaths) to high(cFontsPaths) do
++        begin
++            fp := cFontsPaths[i];
++            if fp <> nil then
++                pfsMount(fp, '/Fonts');
++        end;
++
++    pfsMountAtRoot(PathPrefix);
++    pfsMountAtRoot(UserPathPrefix + '/Data');
+ 
+     hedgewarsMountPackages;
+ 
+-    i:= PHYSFS_mount(Str2PChar(UserPathPrefix), nil, false);
+     // need access to teams and frontend configs (for bindings)
+-    AddFileLog('[PhysFS] mount ' + UserPathPrefix + ': ' + inttostr(i)); 
++    pfsMountAtRoot(UserPathPrefix);
+ end;
+ 
+ procedure freeModule;
+diff -r f74ae7ee3585 -r ab94889bd185 share/hedgewars/Data/Fonts/CMakeLists.txt
+--- a/share/hedgewars/Data/Fonts/CMakeLists.txt        Sat Jan 18 16:55:50 
2014 +0100
++++ b/share/hedgewars/Data/Fonts/CMakeLists.txt        Sat Jan 18 17:32:31 
2014 +0100
+@@ -1,4 +1,26 @@
+-install(FILES
++set(FONTFILES
+     DejaVuSans-Bold.ttf
+-    wqy-zenhei.ttc
+-    DESTINATION ${SHAREPATH}Data/Fonts)
++    wqy-zenhei.ttc)
++
++if (FONTS_DIRS)
++    foreach(fontfile ${FONTFILES})
++        set(missing 1)
++        foreach(fontdir ${FONTS_DIRS})
++            if (EXISTS "${fontdir}/${fontfile}")
++                message(STATUS "Fonts: Found ${fontfile} in ${fontdir}")
++                set(missing 0)
++                break()
++            endif()
++        endforeach(fontdir)
++        if(missing)
++            set(MISSINGFONTFILES ${MISSINGFONTFILES} ${fontfile})
++            message(STATUS "Fonts: Could not find ${fontfile}, it will be 
installed")
++        endif()
++    endforeach(fontfile)
++else()
++    set(MISSINGFONTFILES ${FONTFILES})
++endif()
++
++if (MISSINGFONTFILES)
++    install(FILES ${MISSINGFONTFILES} DESTINATION ${SHAREPATH}Data/Fonts)
++endif()
diff --git a/debian/patches/using_system_physfs.patch 
b/debian/patches/using_system_physfs.patch
new file mode 100644
index 0000000..de07633
--- /dev/null
+++ b/debian/patches/using_system_physfs.patch
@@ -0,0 +1,263 @@
+# HG changeset patch
+# User sheepluva
+# Date 1390060550 -3600
+#      Sat Jan 18 16:55:50 2014 +0100
+# Branch 0.9.20
+# Node ID f74ae7ee358599195c8e646f1f8e8652d0d38a24
+# Parent  9d79a52c5586b3f2350c3d9dea6b9906b011c3ab
+Description:
+backport of PhysicsFS 2.0 compatibility patches
+
+diff -r 9d79a52c5586 -r f74ae7ee3585 CMakeLists.txt
+--- a/CMakeLists.txt   Sat Jan 04 02:36:55 2014 +0100
++++ b/CMakeLists.txt   Sat Jan 18 16:55:50 2014 +0100
+@@ -18,12 +18,12 @@
+ 
+ #libraries are built shared unless explicitly added as a static
+ option(BUILD_SHARED_LIBS "Build libraries as shared modules (on)" ON)
+-#set this to ON when 2.1.0 becomes more widespread (and only for linux)
+-option(PHYSFS_SYSTEM "Use system physfs (off)" OFF)
+ 
+ if(WIN32 OR APPLE)
++    option(PHYSFS_SYSTEM "Use system physfs (off)" OFF)
+     option(LUA_SYSTEM "Use system lua (off)" OFF)
+ else()
++    option(PHYSFS_SYSTEM "Use system physfs (on)" ON)
+     option(LUA_SYSTEM "Use system lua (on)" ON)
+ endif()
+ 
+@@ -152,8 +152,9 @@
+         string(REGEX MATCH "([0-9]+)" physfs_patchversion 
"${physfs_patchversion}")
+         set(physfs_detected_ver 
"${physfs_majorversion}.${physfs_minorversion}.${physfs_patchversion}")
+ 
+-        if (physfs_detected_ver VERSION_LESS "2.1.0")
+-            message(FATAL_ERROR "PhysFS version is too old (dected 
${physfs_detected_ver}, required 2.1.0)")
++        if (physfs_detected_ver VERSION_LESS "2.0.0")
++            message(FATAL_ERROR "PhysFS version is too old (detected 
${physfs_detected_ver}, required 2.0.0)\n"
++                                "Perform an update or rerun cmake with 
-DPHYSFS_SYSTEM=off to build the internal version")
+             set(physfs_too_old true)
+         endif()
+     endif()
+diff -r 9d79a52c5586 -r f74ae7ee3585 INSTALL
+--- a/INSTALL  Sat Jan 04 02:36:55 2014 +0100
++++ b/INSTALL  Sat Jan 18 16:55:50 2014 +0100
+@@ -8,7 +8,7 @@
+  - SDL_image >= 1.2
+  - SDL_ttf >= 2.0
+  - Lua >= 5.1.0
+- - Physfs >= 2.1.0
++ - Physfs >= 2.0.0
+ For server:
+  - Glasgow Haskell Compiler >= 6.10
+  - bytestring-show package
+diff -r 9d79a52c5586 -r f74ae7ee3585 hedgewars/CMakeLists.txt
+--- a/hedgewars/CMakeLists.txt Sat Jan 04 02:36:55 2014 +0100
++++ b/hedgewars/CMakeLists.txt Sat Jan 18 16:55:50 2014 +0100
+@@ -141,7 +141,7 @@
+     add_flag_append(CMAKE_Pascal_FLAGS "-XLAlua=${lua_output_name}")
+ endif()
+ 
+-if(PHYSFS_FOUND)
++if(PHYSFS_SYSTEM)
+     get_filename_component(PHYSFS_LIBRARY_DIR ${PHYSFS_LIBRARY} PATH)
+     add_flag_append(CMAKE_Pascal_FLAGS "-Fl${PHYSFS_LIBRARY}")
+ else()
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/CMakeLists.txt
+--- a/misc/libphyslayer/CMakeLists.txt Sat Jan 04 02:36:55 2014 +0100
++++ b/misc/libphyslayer/CMakeLists.txt Sat Jan 18 16:55:50 2014 +0100
+@@ -7,6 +7,7 @@
+ ## extra functions needed by Hedgewars
+ ## TODO: maybe it's better to have them in a separate library?
+ set(PHYSLAYER_SRCS
++    physfscompat.c
+     physfsrwops.c
+     physfslualoader.c
+     hwpacksmounter.c
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/hwpacksmounter.h
+--- a/misc/libphyslayer/hwpacksmounter.h       Sat Jan 04 02:36:55 2014 +0100
++++ b/misc/libphyslayer/hwpacksmounter.h       Sat Jan 18 16:55:50 2014 +0100
+@@ -3,6 +3,8 @@
+ 
+ #include "physfs.h"
+ 
++#include "physfscompat.h"
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/physfscompat.c
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/misc/libphyslayer/physfscompat.c Sat Jan 18 16:55:50 2014 +0100
+@@ -0,0 +1,73 @@
++/*
++ * Hedgewars, a free turn based strategy game
++ * Copyright (c) 2004-2014 Andrey Korotaev <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; version 2 of the License
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
++ */
++
++#include "physfscompat.h"
++
++#ifdef HW_PHYSFS_COMPAT
++
++PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat)
++{
++    PHYSFS_File * handle;
++
++    if (PHYSFS_exists(fname))
++    {
++        handle = PHYSFS_openRead(fname);
++        if (handle)
++        {
++            stat->filesize = PHYSFS_fileLength(handle);
++            PHYSFS_close(handle);
++            handle = 0;
++        }
++        else
++            stat->filesize = -1;
++
++        stat->modtime = PHYSFS_getLastModTime(fname);
++        stat->createtime = -1;
++        stat->accesstime = -1;
++
++        if (PHYSFS_isSymbolicLink(fname))
++            stat->filetype = PHYSFS_FILETYPE_SYMLINK;
++        else if (PHYSFS_isDirectory(fname))
++            stat->filetype = PHYSFS_FILETYPE_DIRECTORY;
++        else stat->filetype = PHYSFS_FILETYPE_REGULAR;
++
++        stat->readonly = 0; /* not supported */
++
++        /* success */
++        return 1;
++    }
++
++    /* does not exist, can't stat */
++    return 0;
++}
++
++PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
++                                           PHYSFS_uint64 len)
++{
++    return PHYSFS_read(handle, buffer, 1, len);
++}
++
++
++PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
++                                            const void *buffer,
++                                            PHYSFS_uint64 len)
++{
++    return PHYSFS_write(handle, buffer, 1, len);
++}
++
++#endif /* HW_PHYSFS_COMPAT */
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/physfscompat.h
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ b/misc/libphyslayer/physfscompat.h Sat Jan 18 16:55:50 2014 +0100
+@@ -0,0 +1,71 @@
++/*
++ * Hedgewars, a free turn based strategy game
++ * Copyright (c) 2004-2014 Andrey Korotaev <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; version 2 of the License
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
++ */
++
++#ifndef _HEDGEWARS_PHYSFSCOMPAT_C_
++#define _HEDGEWARS_PHYSFSCOMPAT_C_
++
++#include "physfs.h"
++
++#if PHYSFS_VER_MAJOR == 2
++#if PHYSFS_VER_MINOR == 0
++
++#define HW_PHYSFS_COMPAT
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define PHYSFS_DECL __EXPORT__
++
++typedef enum PHYSFS_FileType
++{
++      PHYSFS_FILETYPE_REGULAR,
++      PHYSFS_FILETYPE_DIRECTORY,
++      PHYSFS_FILETYPE_SYMLINK,
++      PHYSFS_FILETYPE_OTHER
++} PHYSFS_FileType;
++
++typedef struct PHYSFS_Stat
++{
++      PHYSFS_sint64 filesize;
++      PHYSFS_sint64 modtime;
++      PHYSFS_sint64 createtime;
++      PHYSFS_sint64 accesstime;
++      PHYSFS_FileType filetype;
++      int readonly;
++} PHYSFS_Stat;
++
++PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat);
++
++PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
++                                           PHYSFS_uint64 len);
++
++
++PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
++                                            const void *buffer,
++                                            PHYSFS_uint64 len);
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* PHYSFS_VER_MAJOR == 2 */
++#endif /* PHYSFS_VER_MINOR == 0 */
++
++#endif /* _HEDGEWARS_PHYSFSCOMPAT_C_ */
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/physfslualoader.c
+--- a/misc/libphyslayer/physfslualoader.c      Sat Jan 04 02:36:55 2014 +0100
++++ b/misc/libphyslayer/physfslualoader.c      Sat Jan 18 16:55:50 2014 +0100
+@@ -1,6 +1,8 @@
+ #include "lua.h"
+ #include "physfs.h"
+ 
++#include "physfscompat.h"
++
+ #define BUFSIZE 1024
+ 
+ void *physfsReaderBuffer;
+diff -r 9d79a52c5586 -r f74ae7ee3585 misc/libphyslayer/physfsrwops.h
+--- a/misc/libphyslayer/physfsrwops.h  Sat Jan 04 02:36:55 2014 +0100
++++ b/misc/libphyslayer/physfsrwops.h  Sat Jan 18 16:55:50 2014 +0100
+@@ -26,6 +26,8 @@
+ #include "physfs.h"
+ #include "SDL.h"
+ 
++#include "physfscompat.h"
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/collab-maint/hedgewars.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to