From fb80a0e546a15acc7d18af6831d921da5111959b Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Feb 20 2015 14:45:13 +0000 Subject: Update. New upstream. --- 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 +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 +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-0.4-datadir.patch b/numptyphysics-0.4-datadir.patch deleted file mode 100644 index 3e5d50d..0000000 --- a/numptyphysics-0.4-datadir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urb harmattan-numptyphysics-a22cde2/makefile harmattan-numptyphysics-a22cde2.b/makefile ---- harmattan-numptyphysics-a22cde2/makefile 2012-07-26 16:52:01.611055981 +0300 -+++ harmattan-numptyphysics-a22cde2.b/makefile 2012-07-26 17:08:13.949539087 +0300 -@@ -4,7 +4,7 @@ - DESTDIR ?= - PREFIX = /opt/numptyphysics - --CXXFLAGS += -DINSTALL_BASE_PATH=\"$(PREFIX)/data\" -+CXXFLAGS += -DINSTALL_BASE_PATH=\"/usr/share/numptyphysics\" - - SOURCES = $(wildcard *.cpp) - diff --git a/numptyphysics-0.4-gcc47.patch b/numptyphysics-0.4-gcc47.patch deleted file mode 100644 index 70e2521..0000000 --- a/numptyphysics-0.4-gcc47.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -urb harmattan-numptyphysics-a22cde2/happyhttp.cpp harmattan-numptyphysics-a22cde2.b/happyhttp.cpp ---- harmattan-numptyphysics-a22cde2/happyhttp.cpp 2012-07-25 20:42:31.000000000 +0300 -+++ harmattan-numptyphysics-a22cde2.b/happyhttp.cpp 2012-07-26 16:50:04.193390958 +0300 -@@ -34,6 +34,7 @@ - #include - #include // for gethostbyname() - #include -+ #include - #endif - - #ifdef WIN32 diff --git a/numptyphysics-0.4-missing-link.patch b/numptyphysics-0.4-missing-link.patch deleted file mode 100644 index 15d1025..0000000 --- a/numptyphysics-0.4-missing-link.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urb harmattan-numptyphysics-a22cde2.b/makefile harmattan-numptyphysics-a22cde2/makefile ---- harmattan-numptyphysics-a22cde2.b/makefile 2012-07-26 16:52:01.611055981 +0300 -+++ harmattan-numptyphysics-a22cde2/makefile 2012-07-26 16:53:30.942725990 +0300 -@@ -11,7 +11,7 @@ - all: $(APP) - - # Required modules (uses pkg-config) --PKGS = sdl SDL_image -+PKGS = sdl SDL_image zlib x11 - - CXXFLAGS += $(shell pkg-config --cflags $(PKGS)) - LIBS += $(shell pkg-config --libs $(PKGS)) diff --git a/numptyphysics.desktop b/numptyphysics.desktop deleted file mode 100644 index 518b29b..0000000 --- a/numptyphysics.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Numpty Physics -Exec=numptyphysics -Icon=numptyphysics -Categories=Game;LogicGame;KidsGame;Simulation; -Terminal=false 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 - 0.4-0.6.20140108git4837e29 +- Update. New upstream. + * Sun Aug 17 2014 Fedora Release Engineering - 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