summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-09-28 16:53:48 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-09-28 18:50:03 -0400
commitcecff2663a5b57278bd8e6e5f7a60ce86292614f (patch)
tree9d7c50da96366748d152b4e8e8f6952dcef96aa7 /games-puzzle/flobopuyo
parentapp-xemacs/xslide: Remove redundant version (diff)
downloadgentoo-cecff2663a5b57278bd8e6e5f7a60ce86292614f.tar.gz
gentoo-cecff2663a5b57278bd8e6e5f7a60ce86292614f.tar.bz2
gentoo-cecff2663a5b57278bd8e6e5f7a60ce86292614f.zip
games-puzzle/flobopuyo: EAPI6->8, fix runtime with optimizations
Works with -O0, but broke at -O2 likely some gcc versions ago. Also: * cleanup patches, and while there have Makefile use pkg-config, echo commands, and respect CPPFLAGS * add missing [joystick], bison, and flex deps * removed dead HOMEPAGE, no replacement found Closes: https://bugs.gentoo.org/815262 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-puzzle/flobopuyo')
-rw-r--r--games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc4.patch25
-rw-r--r--games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc41.patch28
-rw-r--r--games-puzzle/flobopuyo/files/flobopuyo-0.20-libs.patch136
-rw-r--r--games-puzzle/flobopuyo/files/flobopuyo-0.20-makefile.patch62
-rw-r--r--games-puzzle/flobopuyo/files/flobopuyo-0.20-segfault.patch84
-rw-r--r--games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild50
-rw-r--r--games-puzzle/flobopuyo/flobopuyo-0.20-r3.ebuild56
7 files changed, 221 insertions, 220 deletions
diff --git a/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc4.patch b/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc4.patch
deleted file mode 100644
index 6c5d39445a4c..000000000000
--- a/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc4.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: flobopuyo-0.20/IosVector.cpp
-===================================================================
---- flobopuyo-0.20.orig/IosVector.cpp
-+++ flobopuyo-0.20/IosVector.cpp
-@@ -102,6 +102,6 @@ void IosVector::increaseVectorSize()
- void IosVector::dumpVector() const {
- fprintf(stderr, "Size: %d\n", getSize());
- for (int i = 0, j = getSize() ; i < j ; i++)
-- fprintf(stderr, "elt[%d]=%d ", i, (int)getElementAt(i));
-+ fprintf(stderr, "elt[%d]=%p ", i, getElementAt(i));
- fprintf(stderr, "\n");
- }
-Index: flobopuyo-0.20/PuyoGame.cpp
-===================================================================
---- flobopuyo-0.20.orig/PuyoGame.cpp
-+++ flobopuyo-0.20/PuyoGame.cpp
-@@ -45,7 +45,7 @@ PuyoState PuyoRandomSystem::getPuyoForSe
- return (PuyoState)newItem;
- }
- else
-- return (PuyoState)(int)(sequenceItems.getElementAt(sequence));
-+ return (PuyoState)(long)(sequenceItems.getElementAt(sequence));
- }
-
- PuyoPuyo::PuyoPuyo(PuyoState state)
diff --git a/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc41.patch b/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc41.patch
index 6b3f54ef5630..765bcae8d21e 100644
--- a/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc41.patch
+++ b/games-puzzle/flobopuyo/files/flobopuyo-0.20-gcc41.patch
@@ -1,13 +1,23 @@
-Index: flobopuyo-0.20/PuyoGame.h
-===================================================================
---- flobopuyo-0.20.orig/PuyoGame.h
-+++ flobopuyo-0.20/PuyoGame.h
-@@ -46,7 +46,7 @@ public:
- virtual ~PuyoPuyo() {};
- PuyoState getPuyoState();
+https://bugs.gentoo.org/106406
+https://bugs.gentoo.org/121259
+--- a/IosVector.cpp
++++ b/IosVector.cpp
+@@ -104,3 +104,3 @@
+ for (int i = 0, j = getSize() ; i < j ; i++)
+- fprintf(stderr, "elt[%d]=%d ", i, (int)getElementAt(i));
++ fprintf(stderr, "elt[%d]=%p ", i, getElementAt(i));
+ fprintf(stderr, "\n");
+--- a/PuyoGame.cpp
++++ b/PuyoGame.cpp
+@@ -47,3 +47,3 @@
+ else
+- return (PuyoState)(int)(sequenceItems.getElementAt(sequence));
++ return (PuyoState)(long)(sequenceItems.getElementAt(sequence));
+ }
+--- a/PuyoGame.h
++++ b/PuyoGame.h
+@@ -48,3 +48,3 @@
void setPuyoState(PuyoState state);
- bool PuyoPuyo::isFalling();
+ bool isFalling();
int getPuyoX() const;
- int getPuyoY() const;
- void setPuyoXY(int X, int Y);
diff --git a/games-puzzle/flobopuyo/files/flobopuyo-0.20-libs.patch b/games-puzzle/flobopuyo/files/flobopuyo-0.20-libs.patch
deleted file mode 100644
index b9b55a333cb6..000000000000
--- a/games-puzzle/flobopuyo/files/flobopuyo-0.20-libs.patch
+++ /dev/null
@@ -1,136 +0,0 @@
---- a/Makefile.orig 2004-10-08 18:41:12.000000000 -0400
-+++ b/Makefile 2008-08-06 19:48:47.000000000 -0400
-@@ -41,15 +41,13 @@
- ##############
-
- SDL_CONFIG=sdl-config
--CC=g++
--CXX=g++
-
--CFLAGS= -DDATADIR=\"${DATADIR}\"
--LDFLAGS=
-+CXXFLAGS+= -DDATADIR=\"${DATADIR}\"
-
- ifneq ($(PLATFORM), $(CYGWIN_VERSION))
--CFLAGS:=$(CFLAGS) `$(SDL_CONFIG) --cflags` -I/sw/include
--LDFLAGS:=$(LDFLAGS) `$(SDL_CONFIG) --cflags --libs`
-+CXXFLAGS:=$(CXXFLAGS) `$(SDL_CONFIG) --cflags` -I/sw/include
-+LDFLAGS:=$(LDFLAGS)
-+LIBS:=$(LIBS) `$(SDL_CONFIG) --cflags --libs`
- endif
-
- HFILES= HiScores.h IosException.h IosImgProcess.h IosVector.h PuyoCommander.h\
-@@ -71,46 +69,46 @@
- ################
- # Mac OS X
- ifeq ($(PLATFORM), Darwin)
--CFLAGS:=$(CFLAGS) -DMACOSX -UDATADIR
-+CXXFLAGS:=$(CXXFLAGS) -DMACOSX -UDATADIR
- endif
-
- ################
- # Win32
- ifeq ($(PLATFORM), $(CYGWIN_VERSION))
--CFLAGS:=$(CFLAGS) -mno-cygwin -mwindows -DWIN32 -DYY_NEVER_INTERACTIVE=1 -I$(WINSDLINCLUDE)
--LDFLAGS:=$(LDFLAGS) -L$(WINSDLDEVLIBS) -lmingw32 -ljpeg -lzlib -lpng1 -lSDL_image -lSDL_mixer -lSDL -lSDLmain
-+CXXFLAGS:=$(CXXFLAGS) -mno-cygwin -mwindows -DWIN32 -DYY_NEVER_INTERACTIVE=1 -I$(WINSDLINCLUDE)
-+LDFLAGS:=$(LDFLAGS) -L$(WINSDLDEVLIBS)
-+LIBS:=$(LIBS) -lmingw32 -ljpeg -lzlib -lpng1 -lSDL_image -lSDL_mixer -lSDL -lSDLmain
- endif
-
- ifeq ($(ENABLE_AUDIO), true)
--CFLAGS:=$(CFLAGS) -DUSE_AUDIO=1
-+CXXFLAGS:=$(CXXFLAGS) -DUSE_AUDIO=1
- OBJFILES:=$(OBJFILES)
- endif
-
- ifeq ($(ENABLE_OPENGL), true)
--CFLAGS:=$(CFLAGS) -DHAVE_OPENGL=1
-+CXXFLAGS:=$(CXXFLAGS) -DHAVE_OPENGL=1
- OBJFILES:=$(OBJFILES) glSDL.o
- ifeq ($(PLATFORM), Linux)
--LDFLAGS:=$(LDFLAGS) -lGL
-+LDFLAGS:=$(LDFLAGS)
-+LIBS:=$(LIBS) -lGL
- endif
- endif
-
- ifeq ($(ENABLE_DGA), true)
- ifeq ($(PLATFORM), Linux)
--CFLAGS:=$(CFLAGS) -DUSE_DGA=1
-+CXXFLAGS:=$(CXXFLAGS) -DUSE_DGA=1
- endif
- endif
-
- ifeq ($(DEBUG), true)
--CFLAGS:=$(CFLAGS) -DDEBUG=1 -g
-+CXXFLAGS:=$(CXXFLAGS) -DDEBUG=1 -g
- LDFLAGS:=$(LDFLAGS) -g
- endif
-
--CXXFLAGS=${CFLAGS}
--
- all: prelude flobopuyo
-
- flobopuyo: ${OBJFILES}
-- @echo "[flobopuyo]" && g++ $(CFLAGS) $(LDFLAGS) -o flobopuyo -lSDL_mixer -lSDL_image ${OBJFILES}
-+ @echo "[flobopuyo]" && $(CXX) $(LDFLAGS) $(OBJFILES) -o flobopuyo $(LIBS) -lSDL_mixer -lSDL_image
- @echo "--------------------------------------"
- @echo " Compilation finished"
- @[ "x`cat WARNINGS | wc -l`" != "x0" ] && echo -e "--------------------------------------\n There have been some warnings:\n" && cat WARNINGS && rm -f WARNINGS && echo "--------------------------------------" || true
-@@ -121,14 +119,14 @@
- prelude:
- @rm -f WARNINGS
- @touch WARNINGS
-- @echo "Compiling with CFLAGS=$(CFLAGS)"
-+ @echo "Compiling with CXXFLAGS=$(CXXFLAGS)"
- @echo "Compiling with LDFLAGS=$(LDFLAGS)"
-
- %.o:%.c
-- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
-+ @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
-
- %.o:%.cpp
-- @echo "[$@]" && $(CXX) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
-+ @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
-
- PuyoDoomMelt.o:PuyoDoomMelt.c ${HFILES}
- HiScores.o:HiScores.cpp HiScores.h preferences.h
-@@ -155,10 +153,10 @@
- IosException.o:IosException.cpp
- IosVector.o:IosVector.cpp
- glSDL.o:glSDL.c
-- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
-+ @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
- @rm -f EXT_WARNINGS
- SDL_prim.o:SDL_prim.c
-- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
-+ @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
- @rm -f EXT_WARNINGS
- corona.o:corona.cpp
- corona32.o:corona32.cpp
-@@ -178,7 +176,6 @@
- rm -f .DS_Store */.DS_Store */*/.DS_Store .gdb_history
-
- install: flobopuyo
-- strip flobopuyo
- mkdir -p ${INSTALL_BINDIR}
- mkdir -p ${INSTALL_DATADIR}
- cp -r data/* ${INSTALL_DATADIR}
-@@ -191,7 +188,7 @@
- chmod a+rx ${INSTALL_BINDIR}/flobopuyo
-
- flobopuyo-static: prelude ${OBJFILES}
-- @echo "[flobopuyo-static]" && g++ $(CFLAGS) -o flobopuyo-static ${OBJFILES}\
-+ @echo "[flobopuyo-static]" && g++ $(CXXFLAGS) -o flobopuyo-static ${OBJFILES}\
- /sw/lib/libSDL_mixer.a /sw/lib/libvorbisfile.a /sw/lib/libvorbis.a /sw/lib/libogg.a /sw/lib/libsmpeg.a /sw/lib/libSDL_image.a /sw/lib/libjpeg.a /sw/lib/libpng.a -lz `$(SDL_CONFIG) --static-libs`
- @echo "--------------------------------------"
- @echo " Compilation finished"
-@@ -207,7 +204,6 @@
- rm -rf $(bundle_name)/Contents/Resources/data/CVS $(bundle_name)/Contents/Resources/data/*/CVS
- rm -rf $(bundle_name)/Contents/Resources/data/.xvpics $(bundle_name)/Contents/Resources/data/*/.xvpics
- rm -f $(bundle_name)/Contents/Resources/data/.DS_Store $(bundle_name)/Contents/Resources/data/*/.DS_Store
-- strip $(bundle_name)/Contents/MacOS/flobopuyo
-
- mac-package: bundle
- mkdir -p $(macimage_name)
diff --git a/games-puzzle/flobopuyo/files/flobopuyo-0.20-makefile.patch b/games-puzzle/flobopuyo/files/flobopuyo-0.20-makefile.patch
new file mode 100644
index 000000000000..670f18889cab
--- /dev/null
+++ b/games-puzzle/flobopuyo/files/flobopuyo-0.20-makefile.patch
@@ -0,0 +1,62 @@
+Set non-/games paths, respect FLAGS, add LIBS to pass them in right order,
+use pkg-config, don't strip, and show commands/errors directly.
+
+https://bugs.gentoo.org/125550
+https://bugs.gentoo.org/126835
+https://bugs.gentoo.org/234013
+--- a/Makefile
++++ b/Makefile
+@@ -15,4 +15,4 @@
+ PREFIX=/usr/local
+-DATADIR=$(PREFIX)/share/games/flobopuyo
+-INSTALL_BINDIR=$(DESTDIR)/$(PREFIX)/games
++DATADIR=$(PREFIX)/share/flobopuyo
++INSTALL_BINDIR=$(DESTDIR)/$(PREFIX)/bin
+ INSTALL_DATADIR=$(DESTDIR)/$(DATADIR)
+@@ -44,10 +44,10 @@
+ CC=g++
+-CXX=g++
+
+-CFLAGS= -DDATADIR=\"${DATADIR}\"
+-LDFLAGS=
++CFLAGS:=$(CXXFLAGS) $(CPPFLAGS) -DDATADIR=\"$(DATADIR)\"
+
+ ifneq ($(PLATFORM), $(CYGWIN_VERSION))
+-CFLAGS:=$(CFLAGS) `$(SDL_CONFIG) --cflags` -I/sw/include
+-LDFLAGS:=$(LDFLAGS) `$(SDL_CONFIG) --cflags --libs`
++OPENGL-false=
++OPENGL-$(ENABLE_OPENGL)=opengl
++CFLAGS:=$(CFLAGS) $(shell $(PKG_CONFIG) --cflags $(OPENGL-true) sdl SDL_image SDL_mixer)
++LIBS:=$(LIBS) $(shell $(PKG_CONFIG) --libs $(OPENGL-true) sdl SDL_image SDL_mixer)
+ endif
+@@ -92,3 +92,2 @@
+ ifeq ($(PLATFORM), Linux)
+-LDFLAGS:=$(LDFLAGS) -lGL
+ endif
+@@ -112,3 +111,3 @@
+ flobopuyo: ${OBJFILES}
+- @echo "[flobopuyo]" && g++ $(CFLAGS) $(LDFLAGS) -o flobopuyo -lSDL_mixer -lSDL_image ${OBJFILES}
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o flobopuyo $(OBJFILES) $(LIBS)
+ @echo "--------------------------------------"
+@@ -127,6 +126,6 @@
+ %.o:%.c
+- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
++ $(CXX) $(CXXFLAGS) -c $<
+
+ %.o:%.cpp
+- @echo "[$@]" && $(CXX) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
++ $(CXX) $(CXXFLAGS) -c $<
+
+@@ -157,6 +156,6 @@
+ glSDL.o:glSDL.c
+- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
++ $(CXX) $(CXXFLAGS) -c $<
+ @rm -f EXT_WARNINGS
+ SDL_prim.o:SDL_prim.c
+- @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
++ $(CXX) $(CXXFLAGS) -c $<
+ @rm -f EXT_WARNINGS
+@@ -180,3 +179,2 @@
+ install: flobopuyo
+- strip flobopuyo
+ mkdir -p ${INSTALL_BINDIR}
diff --git a/games-puzzle/flobopuyo/files/flobopuyo-0.20-segfault.patch b/games-puzzle/flobopuyo/files/flobopuyo-0.20-segfault.patch
new file mode 100644
index 000000000000..2edf49c03c11
--- /dev/null
+++ b/games-puzzle/flobopuyo/files/flobopuyo-0.20-segfault.patch
@@ -0,0 +1,84 @@
+Fatch adjusted from Fedora to fix segfault when using optimizations.
+https://bugs.gentoo.org/815262
+--- a/PuyoGame.cpp
++++ b/PuyoGame.cpp
+@@ -639,3 +639,3 @@
+ PuyoPuyo *markedPuyo = getPuyoAt(u, v);
+- if (markedPuyo->getPuyoState() == PUYO_MARKED) {
++ if (markedPuyo && markedPuyo->getPuyoState() == PUYO_MARKED) {
+ // mark the puyo so we wont'do the job twice
+--- a/PuyoGame.h
++++ b/PuyoGame.h
+@@ -112,6 +112,18 @@
+ PuyoState getCompanionState() const { return companionPuyo->getPuyoState(); }
+- PuyoState getFallingState() const { return fallingPuyo->getPuyoState(); }
++ PuyoState getFallingState() const {
++ if (fallingPuyo)
++ return fallingPuyo->getPuyoState();
++ return PUYO_EMPTY;
++ }
+
+- int getFallingX() const { return fallingPuyo->getPuyoX(); }
+- int getFallingY() const { return fallingPuyo->getPuyoY(); }
++ int getFallingX() const {
++ if (fallingPuyo)
++ return fallingPuyo->getPuyoX();
++ return 0;
++ }
++ int getFallingY() const {
++ if (fallingPuyo)
++ return fallingPuyo->getPuyoY();
++ return 0;
++ }
+ int getCompanionX() const { return companionPuyo->getPuyoX(); }
+--- a/PuyoIA.cpp
++++ b/PuyoIA.cpp
+@@ -111,6 +111,6 @@
+ {
+- if ((c_x<(PUYODIMX - 1)) && (c_color == (game->getPuyoAt(c_x+1,c_y))->getPuyoState())) /* Test du pattern a droite */
++ if ((c_x<(PUYODIMX - 1)) && (c_color == (game->getPuyoCellAt(c_x+1,c_y))))
+ {
+- PuyoState cColorA = (game->getPuyoAt(c_x+1,c_y+1))->getPuyoState();
+- if ((c_color!=cColorA) && (cColorA>5) && (cColorA<11) && (cColorA == (game->getPuyoAt(c_x+1,c_y-1))->getPuyoState()))
++ PuyoState cColorA = (game->getPuyoCellAt(c_x+1,c_y+1));
++ if ((c_color!=cColorA) && (cColorA>5) && (cColorA<11) && (cColorA == (game->getPuyoCellAt(c_x+1,c_y-1))))
+ {
+@@ -120,6 +120,6 @@
+
+- if ((c_x>0) && (c_color == (game->getPuyoAt(c_x-1,c_y))->getPuyoState())) /* Test du pattern a gauche */
++ if ((c_x>0) && (c_color == (game->getPuyoCellAt(c_x-1,c_y))))
+ {
+- PuyoState cColorB = (game->getPuyoAt(c_x-1,c_y+1))->getPuyoState();
+- if ((c_color!=cColorB) && (cColorB>5) && (cColorB<11) && (cColorB == (game->getPuyoAt(c_x-1,c_y-1))->getPuyoState()))
++ PuyoState cColorB = (game->getPuyoCellAt(c_x-1,c_y+1));
++ if ((c_color!=cColorB) && (cColorB>5) && (cColorB<11) && (cColorB == (game->getPuyoCellAt(c_x-1,c_y-1))))
+ {
+@@ -131,3 +131,3 @@
+ {
+- if (c_color == (game->getPuyoAt(c_x,c_y+2))->getPuyoState())
++ if (c_color == (game->getPuyoCellAt(c_x,c_y+2)))
+ {
+@@ -140,6 +140,6 @@
+ {
+- if ((f_x<(PUYODIMX - 1)) && (f_color == (game->getPuyoAt(f_x+1,f_y))->getPuyoState())) /* Test du pattern a droite */
++ if ((f_x<(PUYODIMX - 1)) && (f_color == (game->getPuyoCellAt(f_x+1,f_y))))
+ {
+- PuyoState fColorA = (game->getPuyoAt(f_x+1,f_y+1))->getPuyoState();
+- if ((f_color!=fColorA) && (fColorA>5) && (fColorA<11) && (fColorA == (game->getPuyoAt(f_x+1,f_y-1))->getPuyoState()))
++ PuyoState fColorA = (game->getPuyoCellAt(f_x+1,f_y+1));
++ if ((f_color!=fColorA) && (fColorA>5) && (fColorA<11) && (fColorA == (game->getPuyoCellAt(f_x+1,f_y-1))))
+ {
+@@ -149,6 +149,6 @@
+
+- if ((f_x>0) && (f_color == (game->getPuyoAt(f_x-1,f_y))->getPuyoState())) /* Test du pattern a gauche */
++ if ((f_x>0) && (f_color == (game->getPuyoCellAt(f_x-1,f_y))))
+ {
+ PuyoState fColorB = (game->getPuyoAt(f_x-1,f_y+1))->getPuyoState();
+- if ((f_color!=fColorB) && (fColorB>5) && (fColorB<11) && (fColorB == (game->getPuyoAt(f_x-1,f_y-1))->getPuyoState()))
++ if ((f_color!=fColorB) && (fColorB>5) && (fColorB<11) && (fColorB == (game->getPuyoCellAt(f_x-1,f_y-1))))
+ {
+@@ -160,3 +160,3 @@
+ {
+- if (f_color == (game->getPuyoAt(f_x,f_y+2))->getPuyoState())
++ if (f_color == (game->getPuyoCellAt(f_x,f_y+2)))
+ {
diff --git a/games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild b/games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild
deleted file mode 100644
index 717a4ba609cb..000000000000
--- a/games-puzzle/flobopuyo/flobopuyo-0.20-r2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit desktop toolchain-funcs
-
-DESCRIPTION="Clone of the famous PuyoPuyo game"
-HOMEPAGE="http://www.ios-software.com/?page=projet&quoi=29"
-SRC_URI="http://www.ios-software.com/flobopuyo/${P}.tgz
- mirror://gentoo/${PN}.png"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="opengl"
-
-DEPEND="media-libs/libsdl
- media-libs/sdl-image[jpeg,png]
- media-libs/sdl-mixer[mod]
- opengl? ( virtual/opengl )
-"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
- eapply \
- "${FILESDIR}"/${P}-gcc4.patch \
- "${FILESDIR}"/${P}-gcc41.patch \
- "${FILESDIR}"/${P}-libs.patch
-
- find . -type f -name ".*" -exec rm -f \{\} \;
- sed -i \
- -e "s:^DATADIR=.*:DATADIR=\"/usr/share/${PN}\":" \
- -e "/^INSTALL_BINDIR/s:/\$(PREFIX)/games:/usr/bin:" \
- Makefile \
- || die
-}
-
-src_compile() {
- emake \
- CXX="$(tc-getCXX)" \
- ENABLE_OPENGL="$(use opengl && echo true || echo false)"
-}
-
-src_install() {
- default
- doman man/flobopuyo.6
- doicon "${DISTDIR}/${PN}.png"
- make_desktop_entry flobopuyo FloboPuyo
-}
diff --git a/games-puzzle/flobopuyo/flobopuyo-0.20-r3.ebuild b/games-puzzle/flobopuyo/flobopuyo-0.20-r3.ebuild
new file mode 100644
index 000000000000..295962f0e661
--- /dev/null
+++ b/games-puzzle/flobopuyo/flobopuyo-0.20-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Clone of the famous PuyoPuyo game"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="
+ mirror://gentoo/${P}.tgz
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="opengl"
+
+RDEPEND="
+ media-libs/libsdl[joystick,sound,video]
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-mixer[mod]
+ opengl? ( media-libs/libglvnd )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc41.patch
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-segfault.patch
+)
+
+src_prepare() {
+ default
+
+ rm data/sfx/._bi || die
+}
+
+src_compile() {
+ tc-export CC CXX PKG_CONFIG
+
+ emake PREFIX="${EPREFIX}"/usr ENABLE_OPENGL=$(usex opengl true false)
+}
+
+src_install() {
+ emake PREFIX="${EPREFIX}"/usr DESTDIR="${D}" install
+
+ dodoc Changelog TODO
+ doman man/flobopuyo.6
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry flobopuyo FloboPuyo
+}