[physfs] 2.0.2

Tom Callaway spot at fedoraproject.org
Thu Dec 15 20:42:36 UTC 2011


commit 0f6501ca334f0aade12247078319ec71b60d771c
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Thu Dec 15 15:42:35 2011 -0500

    2.0.2

 .gitignore                         |    1 +
 physfs-2.0.2-system-lzma-sdk.patch |   77 ++++++++++++++++++++++++++++++++++++
 physfs-2.0.2-unused.patch          |   15 +++++++
 physfs.spec                        |   42 +++++++++++--------
 sources                            |    2 +-
 5 files changed, 118 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 159150f..100a2b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 physfs-1.0.2.tar.gz
+/physfs-2.0.2.tar.gz
diff --git a/physfs-2.0.2-system-lzma-sdk.patch b/physfs-2.0.2-system-lzma-sdk.patch
new file mode 100644
index 0000000..65a57de
--- /dev/null
+++ b/physfs-2.0.2-system-lzma-sdk.patch
@@ -0,0 +1,77 @@
+diff -up physfs-2.0.2/archivers/lzma.c.system-lzmasdk physfs-2.0.2/archivers/lzma.c
+--- physfs-2.0.2/archivers/lzma.c.system-lzmasdk	2011-10-17 15:20:32.452804224 -0400
++++ physfs-2.0.2/archivers/lzma.c	2011-10-17 15:20:43.228664029 -0400
+@@ -18,9 +18,9 @@
+ #define __PHYSICSFS_INTERNAL__
+ #include "physfs_internal.h"
+ 
+-#include "lzma/C/7zCrc.h"
+-#include "lzma/C/Archive/7z/7zIn.h"
+-#include "lzma/C/Archive/7z/7zExtract.h"
++#include "C/7zCrc.h"
++#include "C/Archive/7z/7zIn.h"
++#include "C/Archive/7z/7zExtract.h"
+ 
+ 
+ /* 7z internal from 7zIn.c */
+diff -up physfs-2.0.2/CMakeLists.txt.system-lzmasdk physfs-2.0.2/CMakeLists.txt
+--- physfs-2.0.2/CMakeLists.txt.system-lzmasdk	2011-02-18 16:17:31.000000000 -0500
++++ physfs-2.0.2/CMakeLists.txt	2011-10-17 15:21:33.081016247 -0400
+@@ -11,6 +11,8 @@ SET(PHYSFS_VERSION 2.0.2)
+ # Increment this if/when we break backwards compatibility.
+ SET(PHYSFS_SOVERSION 1)
+ 
++SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
++
+ # I hate that they define "WIN32" ... we're about to move to Win64...I hope!
+ IF(WIN32 AND NOT WINDOWS)
+     SET(WINDOWS TRUE)
+@@ -216,7 +218,21 @@ OPTION(PHYSFS_ARCHIVE_7Z "Enable 7zip su
+ IF(PHYSFS_ARCHIVE_7Z)
+     ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_7Z=1)
+     # !!! FIXME: rename to 7z.c?
+-    SET(PHYSFS_SRCS ${PHYSFS_SRCS} ${LZMA_SRCS})
++    FIND_PACKAGE(LZMASDK)
++
++    IF(LZMASDK_FOUND)
++        OPTION(PHYSFS_INTERNAL_LZMASDK "Link own lzma-sdk instead of system library" FALSE)
++    ELSE(HAVE_SYSTEM_LZMASDK)
++        SET(PHYSFS_INTERNAL_LZMASDK TRUE)
++    ENDIF(LZMASDK_FOUND)
++
++    IF(PHYSFS_INTERNAL_LZMASDK)
++        SET(PHYSFS_SRCS ${PHYSFS_SRCS} ${LZMA_SRCS})
++        INCLUDE_DIRECTORIES(lzma)
++    ELSE(PHYSFS_INTERNAL_LZMASDK)
++        SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${LZMASDK_LIBRARY})
++        INCLUDE_DIRECTORIES(${LZMASDK_INCLUDE_DIR})
++    ENDIF(PHYSFS_INTERNAL_LZMASDK)
+ ENDIF(PHYSFS_ARCHIVE_7Z)
+ 
+ OPTION(PHYSFS_ARCHIVE_GRP "Enable Build Engine GRP support" TRUE)
+diff -up physfs-2.0.2/cmake/Modules/FindLZMASDK.cmake.system-lzmasdk physfs-2.0.2/cmake/Modules/FindLZMASDK.cmake
+--- physfs-2.0.2/cmake/Modules/FindLZMASDK.cmake.system-lzmasdk	2011-10-17 15:19:46.350404763 -0400
++++ physfs-2.0.2/cmake/Modules/FindLZMASDK.cmake	2011-10-17 15:19:46.349404776 -0400
+@@ -0,0 +1,22 @@
++# - Find lzma-sdk
++# Find the native LZMASDK includes and library.
++# Once done this will define
++#
++#  LZMASDK_INCLUDE_DIRS   - where to find C/Archive/7z/7zExtract.h, etc.
++#  LZMASDK_LIBRARIES      - List of libraries when using lzmasdk.
++#  LZMASDK_FOUND          - True if lzmasdk found.
++
++find_path(LZMASDK_INCLUDE_DIR NAMES C/Archive/7z/7zExtract.h PATH_SUFFIXES lzma457)
++find_library(LZMASDK_LIBRARY NAMES lzmasdk457)
++
++set(LZMASDK_LIBRARIES ${LZMASDK_LIBRARY} )
++set(LZMASDK_INCLUDE_DIRS ${LZMASDK_INCLUDE_DIR} )
++
++include(FindPackageHandleStandardArgs)
++# handle the QUIETLY and REQUIRED arguments and set LZMASDK_FOUND to TRUE
++# if all listed variables are TRUE
++find_package_handle_standard_args(LZMASDK  DEFAULT_MSG
++                                  LZMASDK_LIBRARY LZMASDK_INCLUDE_DIR)
++
++mark_as_advanced(LZMASDK_INCLUDE_DIR LZMASDK_LIBRARY )
++
diff --git a/physfs-2.0.2-unused.patch b/physfs-2.0.2-unused.patch
new file mode 100644
index 0000000..8841a06
--- /dev/null
+++ b/physfs-2.0.2-unused.patch
@@ -0,0 +1,15 @@
+diff -up physfs-2.0.2/archivers/wad.c.unused physfs-2.0.2/archivers/wad.c
+--- physfs-2.0.2/archivers/wad.c.unused	2011-10-17 14:28:53.904209913 -0400
++++ physfs-2.0.2/archivers/wad.c	2011-10-17 14:29:18.139905650 -0400
+@@ -245,9 +245,9 @@ static int wad_load_entries(const char *
+     PHYSFS_uint32 fileCount;
+     PHYSFS_uint32 directoryOffset;
+     WADentry *entry;
+-    char lastDirectory[9];
++    /* char lastDirectory[9]; */
+ 
+-    lastDirectory[8] = 0; /* Make sure lastDirectory stays null-terminated. */
++    /* lastDirectory[8] = 0; */ /* Make sure lastDirectory stays null-terminated. */
+ 
+     BAIL_IF_MACRO(!wad_open(name, forWriting, &fh, &fileCount,&directoryOffset), NULL, 0);
+     info->entryCount = fileCount;
diff --git a/physfs.spec b/physfs.spec
index 420f8c5..19e2f7a 100644
--- a/physfs.spec
+++ b/physfs.spec
@@ -1,14 +1,15 @@
 Name:		physfs
-Version:	1.0.2
-Release:	3%{?dist}
+Version:	2.0.2
+Release:	1%{?dist}
 License:	zlib
 Group:		System Environment/Libraries
 Summary:	Library to provide abstract access to various archives
 URL:		http://www.icculus.org/physfs/
 Source0:	http://www.icculus.org/physfs/downloads/physfs-%{version}.tar.gz
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:	doxygen, zlib-devel, readline-devel, libtool
-Patch0:		physfs-1.0.2-fix-soname-version.patch
+Patch0:		physfs-2.0.2-unused.patch
+Patch1:		physfs-2.0.2-system-lzma-sdk.patch
+BuildRequires:	doxygen, zlib-devel, readline-devel, libtool, cmake
+BuildRequires:	wxGTK-devel, lzma-sdk457-devel
 
 %description
 PhysicsFS is a library to provide abstract access to various archives. It is
@@ -30,7 +31,7 @@ home directory, where in the real filesystem your program is running, etc.
 %package devel
 Summary:	Development libraries and headers for physfs
 Group:		Development/Libraries
-Requires:	%{name} = %{version}-%{release}
+Requires:	%{name}%{?_isa} = %{version}-%{release}
 
 %description devel
 This package contains the libraries and headers necessary for developing
@@ -38,15 +39,16 @@ packages with physfs functionality.
 
 %prep
 %setup -q
-%patch0 -p1 -b .soname
+%patch0 -p1 -b .unused
+%patch1 -p1 -b .system-lzmasdk
+rm -rf lzma
 
 %build
-%configure
+%cmake .
 make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool
 doxygen
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
 rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
@@ -61,34 +63,38 @@ mv $RPM_BUILD_ROOT%{_mandir}/man3/minor.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs-
 mv $RPM_BUILD_ROOT%{_mandir}/man3/patch.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs-patch.3
 mv $RPM_BUILD_ROOT%{_mandir}/man3/url.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs-url.3
 
+# Rename poorly named manpages
+for i in Deinit Free Init Malloc Realloc opaque; do
+  mv $RPM_BUILD_ROOT%{_mandir}/man3/$i.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs-$i.3
+done
+
 # Fix multilib conflicts
-touch -r LICENSE docs/html/*
-touch -r LICENSE docs/latex/*
+touch -r LICENSE.txt docs/html/*
+touch -r LICENSE.txt docs/latex/*
 
 # Get rid of static library.
 rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
-%defattr(-,root,root,-)
-%doc CHANGELOG CREDITS LICENSE TODO
+%doc CHANGELOG.txt CREDITS.txt LICENSE.txt TODO.txt
 %{_libdir}/*.so.*
-%{_bindir}/test_physfs
 
 %files devel
-%defattr(-,root,root,-)
 %doc docs/html/
+%{_bindir}/test_physfs
+%{_bindir}/wxtest_physfs
 %{_includedir}/physfs.h
 %{_libdir}/*.so
 %{_mandir}/man3/*
 
 %changelog
+* Fri Dec  9 2011 Tom Callaway <spot at fedoraproject.org> - 2.0.2-1
+- update to 2.0.2
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.2-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/sources b/sources
index 4c625a3..99596e3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-175c4f134611229421c9ac8e4ed8f1f7  physfs-1.0.2.tar.gz
+4e8927c3d30279b03e2592106eb9184a  physfs-2.0.2.tar.gz


More information about the scm-commits mailing list