diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-05-27 18:10:16 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-05-27 18:14:32 +0200 |
commit | 342fb1fabd14e1f13fa16ba904804c2bdadb57f8 (patch) | |
tree | 2b302898e9fe0f8cb946975693c43676bfd28605 /games-puzzle | |
parent | games-misc/yadex: Drop old (diff) | |
download | gentoo-342fb1fabd14e1f13fa16ba904804c2bdadb57f8.tar.gz gentoo-342fb1fabd14e1f13fa16ba904804c2bdadb57f8.tar.bz2 gentoo-342fb1fabd14e1f13fa16ba904804c2bdadb57f8.zip |
games-puzzle/numptyphysics: Add 0.3.4,fix 9999 (#567036 by Samuel BAUER)
Package-Manager: Portage-2.3.38, Repoman-2.3.9
Diffstat (limited to 'games-puzzle')
4 files changed, 123 insertions, 26 deletions
diff --git a/games-puzzle/numptyphysics/Manifest b/games-puzzle/numptyphysics/Manifest index 5476485a38d6..b8b327c51d46 100644 --- a/games-puzzle/numptyphysics/Manifest +++ b/games-puzzle/numptyphysics/Manifest @@ -11,6 +11,7 @@ DIST jhoff80.npz 4612 BLAKE2B 167174fe7e7ed9a765964a4325ac7478d1f60b7e5ea22c55b0 DIST leonet.npz 4885 BLAKE2B 94355b22e995ba91c2c57afa6572d5a669f600d7a21b890a11150c88145727914595d39fb2ee2a8c1d3f21320ed69b06991bf7db521ff68984fae04600b18487 SHA512 789cdde6313b7cc9e8616c7969d86ed44866baa9ae88befa605d7066ca8134f167aac9490afa3918305929dbbc0acaf46708e02be4353f98ebeb3dbe3b0eefa1 DIST melvin.npz 18147 BLAKE2B 285580aa6561e4842aee385f349c77fc8bc05ffb645f623a3fd586ad9737e6248c6a742835c2d17eca4a467f3933b16fc9278315f4d04e98f07b0532762016bf SHA512 391a82b4c42cd2597dd06b299f15cf41302ec593658929d320b66caa69cd73e7cbe3128a18c811017c3b73c435a6f42b763c6e531c8fd193715bc41f85a6b5c2 DIST noodleman.npz 46574 BLAKE2B 408ec52adc0b65965858e54c9b281e418cdfce46fd125d30736719fd181fc0a2543f5bb486868b949db740c4a08d07b3f8abf7f3525daff2348e2eb0d24d7080 SHA512 a088c2c86303985e7d8beec34809f09fcf8e510f7c2af2530620774d1f6579ac1e5ac73989b8e423079c1171a79c92a0cb6e6e01dca950fc519007c91b86ea82 +DIST numptyphysics-0.3.4.tar.gz 1646818 BLAKE2B a78b68437bf446036b227dd9e37bcc3b7e3098f9998aa4a6172e68736b5b840db153538c063a20a02b3a1e7e2d5b0c9b3e976f5ffa8b631a44b8544e9c34bb24 SHA512 2934303737309c058f64ba9dc24a292553e065c7604c8f0964365a9ca2ef68356a68515df5d71b2d3a0f59d115ebcc8b052a17f66ca2cfd5ffa80b68a38ca407 DIST papky.npz 2075 BLAKE2B f638dfae861027a7c89fdfdb305b273cc07aef26ae16e1e2b11bac467d0b13a663d700ca0c6aa1c3630c0b20eb453c27c87b700182e701754f25b0be3b3c16e5 SHA512 69733167ef00f64c19e4f8805e1a881332698e26950f996fc5d41e9e5580f5578b2b9d3f9781bacc9293519e139b7d531891b91f36c45031ac06da6e8e78fbfa DIST perli.npz 15452 BLAKE2B 9c57af22a31eead27a3e48605c362a4018a3bc9e6227ac1e9e813a9ca2f8c3e2f771d6bbfc7fe1f7415989a14852105802ea054d12ddb5c6ce2697b47dadec03 SHA512 cee513ed0e728334f0e60571e38dc68e476681bad8a22497ac01f790c6975bbffba727ede054bfc6f594f289c9bf6346c3e9b3537145707c3ed6f4d6c21136c8 DIST qole.npz 6533 BLAKE2B 35b24ea2a5462c079099ed511abbca8abf6e7362646574726027187166cac817509ff6c1bce3ef0e57d5e086adf9585edf9e00421a0a4954e755a8b056f718da SHA512 dc624c5ffdcb0f9f18c20db7a08d7e9d9d4fa5314e3fabfa730e21bb0a27d4b415432ec66eab64d8252c7fe4793a2cff231e856ca06d85c61558a867bf2fb03b diff --git a/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch b/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch new file mode 100644 index 000000000000..e3a7b2ee372f --- /dev/null +++ b/games-puzzle/numptyphysics/files/numptyphysics-0.3.4-gentoo.patch @@ -0,0 +1,44 @@ +diff --git a/external/glaserl/makefile b/external/glaserl/makefile +index 4120459..f49d9e7 100644 +--- a/external/glaserl/makefile ++++ b/external/glaserl/makefile +@@ -1,7 +1,5 @@ + TARGET := libglaserl.a + +-CFLAGS += -g -O2 +- + SOURCES := $(wildcard *.c) + OBJECTS := $(SOURCES:.c=.o) + +diff --git a/makefile b/makefile +index 0f9a9b6..292b759 100644 +--- a/makefile ++++ b/makefile +@@ -1,7 +1,6 @@ + APP := numptyphysics + + SOURCES := $(wildcard src/*.cpp) +-CXXFLAGS += -std=c++11 -Isrc -Wall -Wno-sign-compare + + all: app + +@@ -13,7 +12,7 @@ app: $(TARGET) + + $(TARGET): $(OBJECTS) $(LOCAL_LIBS) + $(SILENTMSG) "\tLD\t$@\n" +- $(SILENTCMD) $(CXX) -o $@ $^ $(LIBS) ++ $(SILENTCMD) $(CXX) -o $@ $^ $(LDFLAGS) $(LIBS) + + clean: $(ADDITIONAL_CLEAN_TARGETS) + $(SILENTMSG) "\tCLEAN\n" +diff --git a/src/Os.cpp b/src/Os.cpp +index b5d7fb9..6a0ccf4 100644 +--- a/src/Os.cpp ++++ b/src/Os.cpp +@@ -262,5 +262,5 @@ Os::globalDataDir() + } + + // System-wide installation +- return thp::format("%s/../share/%s/data", g_appDir.c_str(), appName().c_str()); ++ return "/usr/share/numptyphysics/data"; + } diff --git a/games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild b/games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild new file mode 100644 index 000000000000..7e0ad57dfbe3 --- /dev/null +++ b/games-puzzle/numptyphysics/numptyphysics-0.3.4.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils gnome2-utils flag-o-matic + +DESCRIPTION="A drawing puzzle game in the spirit of Crayon Physics using the same excellent Box2D engine" +HOMEPAGE="http://thp.io/2015/numptyphysics/" + +# This is only the SRC_URI for the user levels. The code is in git repo. +SRC_URI="user-levels? ( + https://github.com/thp/numptyphysics/archive/0.3.4.tar.gz -> ${P}.tar.gz + http://numptyphysics.garage.maemo.org/levels/butelo/butelo.npz + http://numptyphysics.garage.maemo.org/levels/catalyst/catalyst.npz + http://numptyphysics.garage.maemo.org/levels/christeck/christeck.npz + http://numptyphysics.garage.maemo.org/levels/dneary/dneary.npz + http://numptyphysics.garage.maemo.org/levels/gnuton/gnuton.npz + http://numptyphysics.garage.maemo.org/levels/gudger/gudger.npz + http://numptyphysics.garage.maemo.org/levels/guile/guile.npz + http://numptyphysics.garage.maemo.org/levels/hurd/hurd.npz + http://numptyphysics.garage.maemo.org/levels/ioan/ioan.npz + http://numptyphysics.garage.maemo.org/levels/jhoff80/jhoff80.npz + http://numptyphysics.garage.maemo.org/levels/leonet/leonet.npz + http://numptyphysics.garage.maemo.org/levels/melvin/melvin.npz + http://numptyphysics.garage.maemo.org/levels/noodleman/noodleman.npz + http://numptyphysics.garage.maemo.org/levels/papky/papky.npz + http://numptyphysics.garage.maemo.org/levels/perli/perli.npz + http://numptyphysics.garage.maemo.org/levels/qole/qole.npz + http://numptyphysics.garage.maemo.org/levels/siminz/siminz.npz + http://numptyphysics.garage.maemo.org/levels/szymanowski/szymanowski.npz + http://numptyphysics.garage.maemo.org/levels/therealbubba/therealbubba.npz + http://numptyphysics.garage.maemo.org/levels/werre/werre.npz + http://numptyphysics.garage.maemo.org/levels/zeez/zeez.npz +)" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+user-levels" + +RDEPEND=" + media-libs/libsdl2[opengl,video] + media-libs/sdl2-image[png] + media-libs/sdl2-ttf + virtual/opengl + dev-libs/glib:2 +" +DEPEND="${DEPEND} + virtual/pkgconfig +" + +src_prepare() { + default + append-cxxflags -std=c++11 -Isrc + eapply ${FILESDIR}/${P}-gentoo.patch +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild b/games-puzzle/numptyphysics/numptyphysics-9999.ebuild index aed85c6e8840..01e05708917e 100644 --- a/games-puzzle/numptyphysics/numptyphysics-9999.ebuild +++ b/games-puzzle/numptyphysics/numptyphysics-9999.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit eutils gnome2-utils flag-o-matic git-r3 games +EAPI=6 +inherit eutils gnome2-utils flag-o-matic git-r3 DESCRIPTION="Crayon Physics-like drawing puzzle game using the same excellent Box2D engine" HOMEPAGE="http://thp.io/2015/numptyphysics/" @@ -53,37 +53,21 @@ src_unpack() { src_prepare() { append-cxxflags -std=c++11 -Isrc - epatch "${FILESDIR}"/${P}-gentoo.patch - sed -i \ - -e "s^@GENTOO_DATADIR@^${GAMES_DATADIR}/${PN}/data^" \ + sed -i '/-g -O2/d' external/Box2D/Source/Makefile \ + external/glaserl/makefile || die + sed -i "/return thp::/s% thp::.*$%\"/usr/share/${PN}/data\";%" \ src/Os.cpp || die -} - -src_install() { - dogamesbin ${PN} - insinto "${GAMES_DATADIR}/${PN}" - doins -r data - - if use user-levels ; then - local f - - for f in ${A} ; do - [[ ${f} = ${f/.tar.gz/} ]] && doins "${DISTDIR}"/${f} - done - fi - make_desktop_entry ${PN} 'Numpty Physics' - doicon -s 256 platform/freedesktop/numptyphysics.png - doman platform/freedesktop/numptyphysics.6 - prepgamesdirs + sed -e '/CXXFLAGS +=/s/\(CXXFLAGS +=\).*\( -DAPP=.*\)/\1\2/' \ + -e '/SILENTCMD/s/$(LIBS)$/$(LDFLAGS) $(LIBS)/' \ + -i makefile || die + eapply_user } pkg_preinst() { - games_pkg_preinst gnome2_icon_savelist } pkg_postinst() { - games_pkg_postinst gnome2_icon_cache_update } |