physfs: update 2.0.3 --> 3.0.1

This commit is contained in:
Tony Theodore 2018-08-14 00:04:02 +10:00
parent 28424c6d15
commit d214fd0f7b
2 changed files with 7 additions and 54 deletions

View File

@ -1,46 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
This patch was adapted for PhysicsFS 2.0.3's file layout from
https://hg.icculus.org/icculus/physfs/rev/67031168b061.
# HG changeset patch
# User David Yip <dwyip@peach-bun.com>
# Date 1471367884 18000
# Tue Aug 16 12:18:04 2016 -0500
# Branch stable-2.0
# Node ID 990fd55ba0c4979db59888283c7dde6c359927e2
# Parent 34ebe997c5c07f57aff8e56695cd89856800d11d
Replace unsigned long cast with cast to uintptr_t.
When targeting MinGW-w64's x86_64 target, unsigned long is 4 bytes but void* is
8 bytes. This mismatch triggers the pointer-to-int-cast warning.
diff -r 34ebe997c5c0 -r 990fd55ba0c4 archivers/lzma.c
--- a/archivers/lzma.c Fri Jan 01 12:53:41 2016 -0500
+++ b/archivers/lzma.c Tue Aug 16 12:18:04 2016 -0500
@@ -9,6 +9,7 @@
#if (defined PHYSFS_SUPPORTS_7Z)
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -130,7 +131,7 @@
SZ_RESULT SzFileReadImp(void *object, void *buffer, size_t size,
size_t *processedSize)
{
- FileInputStream *s = (FileInputStream *)((unsigned long)object - offsetof(FileInputStream, inStream)); /* HACK! */
+ FileInputStream *s = (FileInputStream *)((uintptr_t)object - offsetof(FileInputStream, inStream)); /* HACK! */
size_t processedSizeLoc = __PHYSFS_platformRead(s->file, buffer, 1, size);
if (processedSize != 0)
*processedSize = processedSizeLoc;
@@ -145,7 +146,7 @@
*/
SZ_RESULT SzFileSeekImp(void *object, CFileSize pos)
{
- FileInputStream *s = (FileInputStream *)((unsigned long)object - offsetof(FileInputStream, inStream)); /* HACK! */
+ FileInputStream *s = (FileInputStream *)((uintptr_t)object - offsetof(FileInputStream, inStream)); /* HACK! */
if (__PHYSFS_platformSeek(s->file, (PHYSFS_uint64) pos))
return SZ_OK;
return SZE_FAIL;

View File

@ -3,8 +3,8 @@
PKG := physfs
$(PKG)_WEBSITE := https://icculus.org/physfs/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.0.3
$(PKG)_CHECKSUM := ca862097c0fb451f2cacd286194d071289342c107b6fe69079c079883ff66b69
$(PKG)_VERSION := 3.0.1
$(PKG)_CHECKSUM := b77b9f853168d9636a44f75fca372b363106f52d789d18a2f776397bf117f2f1
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2
$(PKG)_URL := https://icculus.org/physfs/downloads/$($(PKG)_FILE)
@ -18,15 +18,14 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
cd '$(1)' && '$(TARGET)-cmake' . \
$(if $(BUILD_SHARED), \
-DPHYSFS_BUILD_SHARED=TRUE \
-DPHYSFS_BUILD_STATIC=FALSE, \
-DPHYSFS_BUILD_SHARED=FALSE) \
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DPHYSFS_BUILD_STATIC=$(CMAKE_STATIC_BOOL) \
-DPHYSFS_BUILD_SHARED=$(CMAKE_SHARED_BOOL) \
-DPHYSFS_INTERNAL_ZLIB=FALSE \
-DPHYSFS_BUILD_TEST=FALSE \
-DPHYSFS_BUILD_WX_TEST=FALSE
$(MAKE) -C '$(1)' -j '$(JOBS)' install
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic -std=c99 \