[skip-ci] sfml: update to 2.5.1

This commit is contained in:
Jeff Huang 2018-11-20 01:41:09 +01:00
parent 5471453a9a
commit ed9836e56c
3 changed files with 8 additions and 288 deletions

View File

@ -1,208 +0,0 @@
# Locate SFML library
# This module defines
# SFML_FOUND, if false, do not try to link to SFML
# SFML_LIBRARY, the name of the librarys to link against
# SFML_INCLUDE_DIR, where to find SFML headers
#
# By default this script will link to the shared-nondebug version of SFML
# You can change this by define this variables befor calling FIND_PACKAGE
#
# SFML_DEBUG - If defined it will link to the debug version of SFML
# SFML_STATIC - If defined it will link to the static version of SFML
#
# For example:
# SET(SFML_STATIC true)
# FIND_PACKAGE(SFML REQUIRED COMPONENTS System Window)
#
# Created by Nils Hasenbanck. Based on the FindSDL_*.cmake modules,
# created by Eric Wing, which were influenced by the FindSDL.cmake
# module, but with modifications to recognize OS X frameworks and
# additional Unix paths (FreeBSD, etc).
#
# Changelog:
# 2010-04-04 - Add support for visual studio 2008 (9.0)
# 2010-04-09 - Add support for visual studio 2005 (8.0)
# - Now the test for the requested components is also implemented.
# - It also will only link to the requested components
# - You can chose wich debug/nondebug static/shared versions of the librarys you want to link to
SET(SFML_LIBRARY "")
SET(SFML_INCLUDE_DIR "")
SET( SFMLDIR $ENV{SFMLDIR} )
IF(WIN32 AND NOT(CYGWIN))
# Convert backslashes to slashes
STRING(REGEX REPLACE "\\\\" "/" SFMLDIR "${SFMLDIR}")
ENDIF(WIN32 AND NOT(CYGWIN))
SET(SFML_COMPONENTS
System
Audio
Graphics
Network
Window
)
SET(SFML_MODE
_SHARED_NONDEBUG
_SHARED_DEBUG
_STATIC_NONDEBUG
_STATIC_DEBUG
)
SET(SFML_INCLUDE_SEARCH_DIR
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SFML
/usr/include/SFML
/usr/local/include
/usr/include
/sw/include/SFML # Fink
/sw/include
/opt/local/include/SFML # DarwinPorts
/opt/local/include
/opt/csw/include/SFML # Blastwave
/opt/csw/include
/opt/include/SFML
/opt/include
${SFMLDIR}
${SFMLDIR}/include
)
SET(SFML_LIBRARY_SEARCH_DIR
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
${SFMLDIR}
${SFMLDIR}/lib/vc2008
${SFMLDIR}/lib/vc2005
)
#looking for the include files
FOREACH(COMPONENT ${SFML_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
STRING(TOLOWER ${COMPONENT} LOWERCOMPONENT)
FIND_PATH(SFML_${UPPERCOMPONENT}_INCLUDE_DIR
${COMPONENT}.hpp
PATH_SUFFIXES include SFML
PATHS ${SFML_INCLUDE_SEARCH_DIR}
)
IF(SFML_${UPPERCOMPONENT}_INCLUDE_DIR)
IF(WIN32)
# In wxWIN we need the root include directory without the "/SFML" at the end... so we have to remove it.
# This is a oversized "remove 5 chars at the right end of the string" function:
string(LENGTH ${SFML_${UPPERCOMPONENT}_INCLUDE_DIR} STRING_SIZE)
math(EXPR STRING_SIZE ${STRING_SIZE}-5)
string(SUBSTRING "${SFML_${UPPERCOMPONENT}_INCLUDE_DIR}" 0 ${STRING_SIZE} SFML_${UPPERCOMPONENT}_INCLUDE_DIR)
ENDIF(WIN32)
LIST(APPEND SFML_INCLUDE_DIR ${SFML_${UPPERCOMPONENT}_INCLUDE_DIR})
LIST(REMOVE_DUPLICATES SFML_INCLUDE_DIR)
ENDIF(SFML_${UPPERCOMPONENT}_INCLUDE_DIR)
ENDFOREACH(COMPONENT)
#looking for the librarys
FOREACH(MODE ${SFML_MODE})
string(COMPARE EQUAL ${MODE} "_SHARED_NONDEBUG" string_equal_result)
IF(string_equal_result)
SET(_STA "")
SET(_DBG "")
ENDIF(string_equal_result)
string(COMPARE EQUAL ${MODE} "_SHARED_DEBUG" string_equal_result)
IF(string_equal_result)
SET(_STA "")
SET(_DBG "-d")
ENDIF(string_equal_result)
string(COMPARE EQUAL ${MODE} "_STATIC_NONDEBUG" string_equal_result)
IF(string_equal_result)
SET(_STA "-s")
SET(_DBG "")
ENDIF(string_equal_result)
string(COMPARE EQUAL ${MODE} "_STATIC_DEBUG" string_equal_result)
IF(string_equal_result)
SET(_STA "-s")
SET(_DBG "-d")
ENDIF(string_equal_result)
FOREACH(COMPONENT ${SFML_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
STRING(TOLOWER ${COMPONENT} LOWERCOMPONENT)
FIND_LIBRARY(SFML_${UPPERCOMPONENT}_LIBRARY${MODE}
NAMES sfml-${LOWERCOMPONENT}${_STA}${_DBG}
PATH_SUFFIXES lib64 lib
PATHS ${SFML_LIBRARY_SEARCH_DIR}
)
ENDFOREACH(COMPONENT)
IF(WIN32)
#Now we are looking for "sfml-main.lib".
#Because we need it if we give ADD_EXECUTABLE the WIN32 switch to creat a GUI application (that one without a cmd promt)
FIND_LIBRARY( SFML_MAIN_LIBRARY${MODE}
NAMES sfml-main${_DBG}
PATH_SUFFIXES lib64 lib
PATHS ${SFML_LIBRARY_SEARCH_DIR}
)
ENDIF(WIN32)
ENDFOREACH(MODE)
#Test if we have the include directory, the system lib and other needed components
#We also fill SFML_LIBRARY here with all the files we like to link to
IF(NOT(SFML_DEBUG) AND NOT(SFML_STATIC))
SET(MODE_LABEL "_SHARED_NONDEBUG")
ENDIF(NOT(SFML_DEBUG) AND NOT(SFML_STATIC))
IF(SFML_DEBUG AND NOT(SFML_STATIC))
SET(MODE_LABEL "_SHARED_DEBUG")
ENDIF(SFML_DEBUG AND NOT(SFML_STATIC))
IF(NOT(SFML_DEBUG) AND SFML_STATIC)
SET(MODE_LABEL "_STATIC_NONDEBUG")
ENDIF(NOT(SFML_DEBUG) AND SFML_STATIC)
IF(SFML_DEBUG AND SFML_STATIC)
SET(MODE_LABEL "_STATIC_DEBUG")
ENDIF(SFML_DEBUG AND SFML_STATIC)
LIST(APPEND SFML_LIBRARY ${SFML_MAIN_LIBRARY${MODE_LABEL}})
LIST(APPEND SFML_FIND_COMPONENTS "System") #We allways need at last the System component
LIST(REMOVE_DUPLICATES SFML_FIND_COMPONENTS)
SET(SFML_FOUND "YES")
FOREACH(COMPONENT ${SFML_FIND_COMPONENTS})
SET( MODUL_NAME SFML_${COMPONENT}_LIBRARY${MODE_LABEL} )
STRING(TOUPPER ${MODUL_NAME} MODUL_NAME)
IF(NOT ${MODUL_NAME})
SET(SFML_FOUND "NO")
MESSAGE("-- SFML: Could not locate : ${MODUL_NAME}")
ELSE(NOT ${MODUL_NAME})
LIST(APPEND SFML_LIBRARY ${${MODUL_NAME}})
ENDIF(NOT ${MODUL_NAME})
ENDFOREACH(COMPONENT)
LIST(REMOVE_DUPLICATES SFML_LIBRARY)
IF(NOT SFML_INCLUDE_DIR)
SET(SFML_FOUND "NO")
MESSAGE("-- SFML: Could not locate include directory")
ENDIF(NOT SFML_INCLUDE_DIR)
IF(NOT SFML_FOUND)
MESSAGE(FATAL_ERROR "Components of SFML are missing!")
ENDIF(NOT SFML_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SFML DEFAULT_MSG SFML_LIBRARY SFML_INCLUDE_DIR)

View File

@ -1,16 +1,16 @@
# Contribution from Arch https://www.archlinux.org/packages/community/x86_64/sfml/
pkgname=sfml
pkgver=2.3.2
pkgver=2.5.1
pkgrel=1
pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API'
arch=('x86_64')
url='http://www.sfml-dev.org/'
url='https://www.sfml-dev.org/'
license=('zlib')
depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2' 'xcb-util-image')
makedepends=('mesa' 'cmake' 'doxygen')
depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2' 'xcb-util-image' 'libx11')
makedepends=('mesa' 'cmake' 'doxygen' 'systemd')
source=("https://github.com/SFML/SFML/archive/${pkgver}.tar.gz")
sha256sums=('55e7c864938e03ceb7d6d05c66f8e0dc886e632805d0ae17c222da317ba14e4c')
sha256sums=('438c91a917cc8aa19e82c6f59f8714da353c488584a007d401efac8368e1c785')
build() {
cd "$srcdir"/SFML-${pkgver}
@ -18,10 +18,10 @@ build() {
mkdir -p build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-SFML_USE_SYSTEM_DEPS=ON \
-DSFML_BUILD_EXAMPLES=1 \
-DSFML_BUILD_DOC=1 \
-DSFML_INSTALL_PKGCONFIG_FILES=1 \
-DCMAKE_CXX_FLAGS="-DGLXContextID=XID $CXXFLAGS"
-DSFML_INSTALL_PKGCONFIG_FILES=1
make
make doc
}
@ -31,8 +31,6 @@ package() {
make DESTDIR="$pkgdir/" install
install -Dm644 "$pkgdir/usr/share/SFML/cmake/Modules/FindSFML.cmake" "$pkgdir/usr/share/cmake-3.0/Modules/FindSFML.cmake"
install -Dm644 ../license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 ../license.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -1,70 +0,0 @@
Only in SFML-1.6-old/lib: libsfml-graphics.so.1.6
Binary files SFML-1.6-old/lib/libsfml-network.so.1.6 and SFML-1.6/lib/libsfml-network.so.1.6 differ
Binary files SFML-1.6-old/lib/libsfml-system.so.1.6 and SFML-1.6/lib/libsfml-system.so.1.6 differ
Binary files SFML-1.6-old/lib/libsfml-window.so.1.6 and SFML-1.6/lib/libsfml-window.so.1.6 differ
diff -ur SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
--- SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp 2010-01-27 15:00:05.000000000 +0100
+++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp 2010-08-16 12:27:33.983627625 +0200
@@ -28,10 +28,10 @@
#include <SFML/Graphics/ImageLoader.hpp>
extern "C"
{
- #include <SFML/Graphics/libjpeg/jpeglib.h>
- #include <SFML/Graphics/libjpeg/jerror.h>
+ #include <jpeglib.h>
+ #include <jerror.h>
}
-#include <SFML/Graphics/libpng/png.h>
+#include <png.h>
#include <SFML/Graphics/SOIL/SOIL.h>
#include <iostream>
Only in SFML-1.6-old/src/SFML/Graphics: ImageLoader.cpp.rej
diff -ur SFML-1.6-old/src/SFML/Graphics/Makefile SFML-1.6/src/SFML/Graphics/Makefile
--- SFML-1.6-old/src/SFML/Graphics/Makefile 2010-01-27 15:00:05.000000000 +0100
+++ SFML-1.6/src/SFML/Graphics/Makefile 2010-08-16 12:25:13.663501212 +0200
@@ -1,15 +1,5 @@
SRC = $(wildcard *.cpp)
-SRCGLEW = $(wildcard ./GLEW/*.c)
-SRCJPEG = $(wildcard ./libjpeg/*.c)
-SRCPNG = $(wildcard ./libpng/*.c)
-SRCSOIL = $(wildcard ./SOIL/*.c)
-SRCZLIB = $(wildcard ./zlib/*.c)
OBJ = $(SRC:.cpp=.o)
-OBJGLEW = $(SRCGLEW:.c=.o)
-OBJJPEG = $(SRCJPEG:.c=.o)
-OBJPNG = $(SRCPNG:.c=.o)
-OBJSOIL = $(SRCSOIL:.c=.o)
-OBJZLIB = $(SRCZLIB:.c=.o)
ifeq ($(STATIC), yes)
LIB = libsfml-graphics-s.a
@@ -23,22 +13,19 @@
all: $(LIB)
-libsfml-graphics-s.a: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
- $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+libsfml-graphics-s.a: $(OBJ)
+ $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) -static -lGLEW -ljpeg -lpng -lsoil -lz -lSOIL
-libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
- $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
+libsfml-graphics.so: $(OBJ)
+ $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lGLEW -ljpeg -lpng -lSOIL -lz -lfreetype -lX11 -lGL
$(OBJ): %.o: %.cpp
$(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
-$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB): %.o: %.c
- $(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
-
.PHONY: clean mrproper
clean:
- @rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+ @rm -rf $(OBJ)
mrproper: clean
@rm -rf $(LIBNAME)
Only in SFML-1.6-old/src/SFML/Graphics: Makefile.rej