[SFML/f15] Initial import
belegdol
belegdol at fedoraproject.org
Fri Jan 13 01:37:04 UTC 2012
commit e3dd31a5bbaa3543bf73109b2c4987622c29a16d
Author: Julian Sikorski <belegdol at fedoraproject.org>
Date: Fri Jan 13 02:36:29 2012 +0100
Initial import
.gitignore | 1 +
SFML-1.6-cflags.patch | 12 +++++
SFML-1.6-gcc.patch | 22 +++++++++
SFML-1.6-libpng15.patch | 21 ++++++++
SFML-1.6-shared-libs.patch | 111 ++++++++++++++++++++++++++++++++++++++++++++
SFML.spec | 99 +++++++++++++++++++++++++++++++++++++++
sources | 1 +
7 files changed, 267 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..38df26e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/SFML-1.6-sdk-linux-64.tar.gz
diff --git a/SFML-1.6-cflags.patch b/SFML-1.6-cflags.patch
new file mode 100644
index 0000000..59f6f38
--- /dev/null
+++ b/SFML-1.6-cflags.patch
@@ -0,0 +1,12 @@
+diff -up SFML-1.6/src/SFML/Makefile.cflags SFML-1.6/src/SFML/Makefile
+--- SFML-1.6/src/SFML/Makefile.cflags 2012-01-12 14:28:34.182831629 +0100
++++ SFML-1.6/src/SFML/Makefile 2012-01-12 14:28:34.658839383 +0100
+@@ -17,7 +17,7 @@ endif
+
+ export CC = gcc
+ export CPP = g++
+-export CFLAGS = -W -Wall -pedantic -I../../../include -I../../ $(DEBUGFLAGS) $(BUILDFLAGS)
++export CFLAGS = -I../../../include -I../../ $(DEBUGFLAGS) $(BUILDFLAGS)
+ export CFLAGSEXT = -I../../../include -I../.. $(DEBUGFLAGS) $(BUILDFLAGS)
+ export LDFLAGS = $(LINKFLAGS)
+ export LIBPATH = ../../../lib
diff --git a/SFML-1.6-gcc.patch b/SFML-1.6-gcc.patch
new file mode 100644
index 0000000..400fe6b
--- /dev/null
+++ b/SFML-1.6-gcc.patch
@@ -0,0 +1,22 @@
+diff -up SFML-1.6/include/SFML/System/Resource.hpp.gcc SFML-1.6/include/SFML/System/Resource.hpp
+--- SFML-1.6/include/SFML/System/Resource.hpp.gcc 2010-01-27 14:53:54.000000000 +0100
++++ SFML-1.6/include/SFML/System/Resource.hpp 2012-01-12 15:20:59.693521927 +0100
+@@ -29,6 +29,7 @@
+ // Headers
+ ////////////////////////////////////////////////////////////
+ #include <set>
++#include <cstddef>
+
+
+ namespace sf
+diff -up SFML-1.6/src/SFML/Window/Linux/Joystick.cpp.gcc SFML-1.6/src/SFML/Window/Linux/Joystick.cpp
+--- SFML-1.6/src/SFML/Window/Linux/Joystick.cpp.gcc 2012-01-12 15:22:54.550833303 +0100
++++ SFML-1.6/src/SFML/Window/Linux/Joystick.cpp 2012-01-12 15:22:57.362842023 +0100
+@@ -26,6 +26,7 @@
+ // Headers
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Window/Joystick.hpp>
++#include <unistd.h>
+ #include <sstream>
+
+
diff --git a/SFML-1.6-libpng15.patch b/SFML-1.6-libpng15.patch
new file mode 100644
index 0000000..4cea433
--- /dev/null
+++ b/SFML-1.6-libpng15.patch
@@ -0,0 +1,21 @@
+diff -up SFML-1.6/src/SFML/Graphics/ImageLoader.cpp.libpng15 SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
+--- SFML-1.6/src/SFML/Graphics/ImageLoader.cpp.libpng15 2012-01-12 15:11:36.936555241 +0100
++++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp 2012-01-12 15:11:36.947555282 +0100
+@@ -44,7 +44,7 @@ namespace
+ void PngErrorHandler(png_structp Png, png_const_charp Message)
+ {
+ std::cerr << "Failed to write PNG image. Reason : " << Message << std::endl;
+- longjmp(Png->jmpbuf, 1);
++ longjmp(png_jmpbuf(Png), 1);
+ }
+ }
+
+@@ -289,7 +289,7 @@ bool ImageLoader::WritePng(const std::st
+ }
+
+ // For proper error handling...
+- if (setjmp(Png->jmpbuf))
++ if (setjmp(png_jmpbuf(Png)))
+ {
+ png_destroy_write_struct(&Png, &PngInfo);
+ return false;
diff --git a/SFML-1.6-shared-libs.patch b/SFML-1.6-shared-libs.patch
new file mode 100644
index 0000000..459d87d
--- /dev/null
+++ b/SFML-1.6-shared-libs.patch
@@ -0,0 +1,111 @@
+diff -up SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp.shared-libs SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp
+--- SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp.shared-libs 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/GraphicsContext.hpp 2011-12-23 14:09:16.677153387 +0100
+@@ -30,7 +30,7 @@
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Config.hpp>
+ #include <SFML/System/NonCopyable.hpp>
+-#include <SFML/Graphics/GLEW/glew.h>
++#include <GL/glew.h>
+ #include <iostream>
+ #include <string>
+
+diff -up SFML-1.6/src/SFML/Graphics/ImageLoader.cpp.shared-libs SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
+--- SFML-1.6/src/SFML/Graphics/ImageLoader.cpp.shared-libs 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp 2011-12-23 14:09:16.677153387 +0100
+@@ -28,11 +28,11 @@
+ #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 <SFML/Graphics/SOIL/SOIL.h>
++#include <png.h>
++#include <SOIL/SOIL.h>
+ #include <iostream>
+
+
+diff -up SFML-1.6/src/SFML/Graphics/Makefile.shared-libs SFML-1.6/src/SFML/Graphics/Makefile
+--- SFML-1.6/src/SFML/Graphics/Makefile.shared-libs 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Makefile 2011-12-23 14:09:16.678153391 +0100
+@@ -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 @@ endif
+
+ 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)
+
+-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)
+diff -up SFML-1.6/src/SFML/Window/Linux/WindowImplX11.cpp.shared-libs SFML-1.6/src/SFML/Window/Linux/WindowImplX11.cpp
+--- SFML-1.6/src/SFML/Window/Linux/WindowImplX11.cpp.shared-libs 2010-01-27 15:00:27.000000000 +0100
++++ SFML-1.6/src/SFML/Window/Linux/WindowImplX11.cpp 2011-12-23 14:09:16.686153426 +0100
+@@ -27,8 +27,8 @@
+ ////////////////////////////////////////////////////////////
+ #include <SFML/Window/WindowStyle.hpp> // important to be included first (conflict with None)
+ #include <SFML/Window/Linux/WindowImplX11.hpp>
+-#include <SFML/Window/glext/glxext.h>
+-#include <SFML/Window/glext/glext.h>
++#include <GL/glxext.h>
++#include <GL/glext.h>
+ #include <SFML/System/Unicode.hpp>
+ #include <X11/keysym.h>
+ #include <X11/extensions/Xrandr.h>
+diff -up SFML-1.6/src/SFML/Window/Makefile.shared-libs SFML-1.6/src/SFML/Window/Makefile
+--- SFML-1.6/src/SFML/Window/Makefile.shared-libs 2010-01-27 15:00:37.000000000 +0100
++++ SFML-1.6/src/SFML/Window/Makefile 2011-12-23 14:09:35.056234664 +0100
+@@ -1,6 +1,5 @@
+ SRC = $(wildcard *.cpp ./Linux/*.cpp)
+ OBJ = $(SRC:.cpp=.o)
+-OBJGLEW = $(SRCGLEW:.c=.o)
+
+ ifeq ($(STATIC), yes)
+ LIB = libsfml-window-s.a
+@@ -18,7 +17,7 @@ libsfml-window-s.a: $(OBJ)
+ $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ)
+
+ libsfml-window.so: $(OBJ)
+- $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) -lX11 -lXrandr -lGL
++ $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lGLEW -lX11 -lXrandr -lGL
+
+ $(OBJ): %.o: %.cpp
+ $(CPP) -o $@ -c $< $(CFLAGS)
diff --git a/SFML.spec b/SFML.spec
new file mode 100644
index 0000000..9841a11
--- /dev/null
+++ b/SFML.spec
@@ -0,0 +1,99 @@
+Name: SFML
+Version: 1.6
+Release: 4%{?dist}
+Summary: Simple and Fast Multimedia Library
+
+# src/SFML/Audio/stb_vorbis/stb_vorbis.{c,h} are Public Domain
+License: zlib and Public Domain
+URL: http://www.sfml-dev.org/
+Source0: http://downloads.sourceforge.net/sfml/%{name}-%{version}-sdk-linux-64.tar.gz
+Patch0: %{name}-1.6-gcc.patch
+Patch1: %{name}-1.6-shared-libs.patch
+Patch2: %{name}-1.6-cflags.patch
+Patch3: %{name}-1.6-libpng15.patch
+
+BuildRequires: freetype-devel
+BuildRequires: glew-devel
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
+BuildRequires: libsndfile-devel
+BuildRequires: SOIL-devel
+BuildRequires: libXrandr-devel
+BuildRequires: openal-devel
+
+%description
+SFML is a portable and easy to use multimedia API written in C++. You can see
+it as a modern, object-oriented alternative to SDL.
+SFML is composed of several packages to perfectly suit your needs. You can use
+SFML as a minimal windowing system to interface with OpenGL, or as a
+fully-featured multimedia library for building games or interactive programs.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .gcc
+%patch1 -p1 -b .shared-libs
+%patch2 -p1 -b .cflags
+%patch3 -p1 -b .libpng15
+
+# clean up bundled libs and prebuilt binaries
+find . -depth \( -iname glew -o -iname glext -o -iname libjpeg -o -iname libpng -o -iname SOIL -o -iname zlib \) -exec rm -rf {} \;
+rm -rf lib doc/%{name}.chm
+find samples/bin -type f -not -path \*datas\* -exec rm {} \;
+
+# fix line endings
+find . -type f -not \( -name \*.gif -o -name \*.jpg -o -name \*.png -o -name \*.ttf -o -name \*.wav \) -exec sed -i "s|\r||" {} \;
+
+# fix permissions
+find . -type f -exec chmod -x {} \;
+
+%build
+make %{?_smp_mflags} DEBUGFLAGS="$RPM_OPT_FLAGS"
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT DESTLIBDIR=$RPM_BUILD_ROOT%{_libdir} \
+ DESTINCDIR=$RPM_BUILD_ROOT%{_includedir}
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc license.txt readme-en.txt
+%{_libdir}/*.so.*
+
+%files devel
+%doc doc/*
+%{_includedir}/%{name}
+%{_libdir}/*.so
+
+
+%changelog
+* Fri Jan 13 2012 Julian Sikorski <belegdol at fedoraproject.org> - 1.6-4
+- Fixed the License tag
+
+* Thu Jan 12 2012 Julian Sikorski <belegdol at fedoraproject.org> - 1.6-3
+- Use one patch and variables in place of sed to fix the makefile
+- Fixed building with libpng-1.5 using a patch from Gentoo
+- Updated the gcc patch for gcc-4.7
+
+* Fri Dec 23 2011 Julian Sikorski <belegdol at fedoraproject.org> - 1.6-2
+- s/libSOIL/SOIL
+- Fixed the shared libs usage
+
+* Wed Nov 30 2011 Julian Sikorski <belegdol at fedoraproject.org> - 1.6-1
+- Initial RPM release based on Debian package
+
diff --git a/sources b/sources
index e69de29..d6b8dbd 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7a9b3a1ef6d14cd25090e440ccdbb3a8 SFML-1.6-sdk-linux-64.tar.gz
More information about the scm-commits
mailing list