[numptyphysics/f21] Update. New upstream.

Lubomir Rintel lkundrak at fedoraproject.org
Fri Feb 20 14:45:29 UTC 2015


commit fb80a0e546a15acc7d18af6831d921da5111959b
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Fri Feb 20 15:44:23 2015 +0100

    Update. New upstream.

 .gitignore                                         |  1 +
 0001-glaserl-fix-build.patch                       | 26 +++++++++
 ...k-for-libGL.so.1-in-the-correct-directory.patch | 38 +++++++++++++
 numptyphysics-0.4-datadir.patch                    | 12 -----
 numptyphysics-0.4-gcc47.patch                      | 11 ----
 numptyphysics-0.4-missing-link.patch               | 12 -----
 numptyphysics.desktop                              |  7 ---
 numptyphysics.spec                                 | 62 ++++++++++------------
 sources                                            |  2 +-
 9 files changed, 95 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 73f92ed..908e0f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 numptyphysics.tar.gz
 numptyphysics-levels-2008-09-27.tar.gz
 /harmattan-numptyphysics-a22cde2.tar.gz
+/numptyphysics-4837e29715af9ebf7cb5d764b67bfc0890b76089.tar.gz
diff --git a/0001-glaserl-fix-build.patch b/0001-glaserl-fix-build.patch
new file mode 100644
index 0000000..6f2adf1
--- /dev/null
+++ b/0001-glaserl-fix-build.patch
@@ -0,0 +1,26 @@
+From fa266d32d1dcc8b5474e62cc55441cbe4ca6e84d Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Fri, 20 Feb 2015 15:10:26 +0100
+Subject: [PATCH] glaserl: fix build
+
+Quote CFLAGS so that more than a single flag can be used.
+---
+ mk/glaserl.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mk/glaserl.mk b/mk/glaserl.mk
+index ac30cc5..ecc5227 100644
+--- a/mk/glaserl.mk
++++ b/mk/glaserl.mk
+@@ -5,7 +5,7 @@ GLASERL_LIBRARY := libglaserl.a
+ 
+ LOCAL_LIBS += $(GLASERL_SOURCE)/$(GLASERL_LIBRARY)
+ $(GLASERL_SOURCE)/$(GLASERL_LIBRARY):
+-	CFLAGS=$(CFLAGS) $(MAKE) -C $(GLASERL_SOURCE) $(GLASERL_LIBRARY)
++	CFLAGS='$(CFLAGS)' $(MAKE) -C $(GLASERL_SOURCE) $(GLASERL_LIBRARY)
+ 
+ ADDITIONAL_DISTCLEAN_TARGETS += glaserl_distclean
+ glaserl_distclean:
+-- 
+2.1.0
+
diff --git a/0001-sdl2-look-for-libGL.so.1-in-the-correct-directory.patch b/0001-sdl2-look-for-libGL.so.1-in-the-correct-directory.patch
new file mode 100644
index 0000000..8aa3f62
--- /dev/null
+++ b/0001-sdl2-look-for-libGL.so.1-in-the-correct-directory.patch
@@ -0,0 +1,38 @@
+From 07a3b81f13764d538a247028e907dc1b9233c0e6 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Fri, 20 Feb 2015 13:58:27 +0100
+Subject: [PATCH] sdl2: look for libGL.so.1 in the correct directory
+
+It's /usr/lib64 on some Linux distros and architecture combinations (or even
+/usr/lib/arch-id, according to file-hierarchy(7)).
+
+7d6c7efdabcf970d9b59b85ac3e4f545450fcd1f
+---
+ platform/sdl2/platform.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/platform/sdl2/platform.in b/platform/sdl2/platform.in
+index e6d24e2..56b656d 100644
+--- a/platform/sdl2/platform.in
++++ b/platform/sdl2/platform.in
+@@ -9,11 +9,16 @@ add_pkgconfig(SDL2_image)
+ add_pkgconfig(SDL2_ttf)
+ add_pkgconfig(gio-2.0)
+ 
++LIBDIR = $(shell systemd-path system-library-arch)
++ifeq ($(LIBDIR),)
++LIBDIR = /usr/lib
++endif
++
+ # OpenGL library
+ ifeq ($(shell uname),Darwin)
+ LIBS += -framework OpenGL
+ else
+-ifneq ($(wildcard /usr/lib/libGL.so.1),)
++ifneq ($(wildcard $(LIBDIR)/libGL.so.1),)
+ add_pkgconfig(gl)
+ else
+ add_pkgconfig(glesv2)
+-- 
+2.1.0
+
diff --git a/numptyphysics.spec b/numptyphysics.spec
index dff0542..f8eb41a 100644
--- a/numptyphysics.spec
+++ b/numptyphysics.spec
@@ -1,20 +1,28 @@
+%global commit 4837e29715af9ebf7cb5d764b67bfc0890b76089
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
 Name:           numptyphysics
+# Last known version number
 Version:        0.4
-Release:        0.6.20120726gita22cde2%{?dist}
+Release:        0.6.20140108git%{shortcommit}%{?dist}
 Summary:        A crayon-drawing based physics puzzle game 
 
 Group:          Amusements/Games
 License:        GPLv3+
-URL:            http://numptyphysics.garage.maemo.org/
-Source0:        https://github.com/harmattan/numptyphysics/tarball/a22cde2/harmattan-numptyphysics-a22cde2.tar.gz
-Source1:        numptyphysics.desktop
-#Source10:       numptyphysics-levels-2008-09-27.tar.gz
-Patch0:         numptyphysics-0.4-gcc47.patch
-Patch1:         numptyphysics-0.4-missing-link.patch
-Patch2:		numptyphysics-0.4-datadir.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  SDL_image-devel SDL_ttf-devel SDL-devel vim-common zlib-devel
+URL:            http://thp.io/2015/numptyphysics/
+Source0:        https://github.com/thp/numptyphysics/archive/%{commit}/%{name}-%{commit}.tar.gz
+# https://github.com/thp/numptyphysics/pull/6
+Patch0:         0001-sdl2-look-for-libGL.so.1-in-the-correct-directory.patch
+# https://github.com/thp/numptyphysics/pull/7
+Patch1:         0001-glaserl-fix-build.patch
+BuildRequires:  pkgconfig(sdl2)
+BuildRequires:  pkgconfig(SDL2_image)
+BuildRequires:  pkgconfig(SDL2_ttf)
+BuildRequires:  pkgconfig(gio-2.0)
+BuildRequires:  pkgconfig(gl)
 BuildRequires:  desktop-file-utils
+Requires:       hicolor-icon-theme
+Provides:       bundled(Box2D) = 2.0.1
 
 %description
 Harness gravity with your crayon and set about creating blocks, ramps,
@@ -23,44 +31,32 @@ the little yellow thing.
 
 
 %prep
-%setup -q -n harmattan-numptyphysics-a22cde2
-%patch0 -p1 -b .gcc47
-%patch1 -p1 -b .link
-%patch2 -p1 -b .datadir
+%setup -q -n %{name}-%{commit}
+%patch0 -p1 -b .opengl
+%patch1 -p1 -b .cflags
 
 
 %build
-make %{?_smp_mflags} CCOPTS="%{optflags}"
+CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make %{?_smp_mflags} V=1
 
 
 %install
-# Directory structure
-install -d $RPM_BUILD_ROOT%{_datadir}/numptyphysics
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -d $RPM_BUILD_ROOT%{_datadir}/pixmaps
-
-# Files
-install -pm 644 data/* $RPM_BUILD_ROOT%{_datadir}/numptyphysics
-install -pm 755 numptyphysics $RPM_BUILD_ROOT%{_bindir}
-install -pm 644 data/numptyphysics.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/numptyphysics.png
-
-# Additional levels
-#tar xzf %{SOURCE10} -C $RPM_BUILD_ROOT%{_datadir}/numptyphysics
-
-# Icon
-desktop-file-install %{SOURCE1} \
-        --dir=$RPM_BUILD_ROOT%{_datadir}/applications
+make install DESTDIR=%{buildroot}
+desktop-file-validate %{buildroot}%{_datadir}/applications/numptyphysics.desktop
 
 
 %files
-%defattr(-,root,root,-)
 %{_bindir}/numptyphysics
 %{_datadir}/numptyphysics
-%{_datadir}/pixmaps/numptyphysics.png
 %{_datadir}/applications/numptyphysics.desktop
+%{_datadir}/icons/hicolor/256x256/apps/numptyphysics.png
+%{_mandir}/man6/numptyphysics.6*
 
 
 %changelog
+* Fri Feb 20 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.4-0.6.20140108git4837e29
+- Update. New upstream.
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4-0.6.20120726gita22cde2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index db27323..f6b8af7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-626b92cf9c72e2cbf5097ca9ba07ef45  harmattan-numptyphysics-a22cde2.tar.gz
+0f08ddfe5516ec682a420c2626ac1324  numptyphysics-4837e29715af9ebf7cb5d764b67bfc0890b76089.tar.gz


More information about the scm-commits mailing list