summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-games/guichan/files/guichan-0.8.2-as-needed.patch8
-rw-r--r--dev-games/guichan/files/guichan-0.8.2-automake-1.13.patch4
-rw-r--r--dev-games/guichan/files/guichan-0.8.2-slibtool-undefined-references.patch48
-rw-r--r--dev-games/guichan/guichan-0.8.2.ebuild28
4 files changed, 72 insertions, 16 deletions
diff --git a/dev-games/guichan/files/guichan-0.8.2-as-needed.patch b/dev-games/guichan/files/guichan-0.8.2-as-needed.patch
index 79eb563c0f8d..c4d8228e9ac6 100644
--- a/dev-games/guichan/files/guichan-0.8.2-as-needed.patch
+++ b/dev-games/guichan/files/guichan-0.8.2-as-needed.patch
@@ -1,13 +1,13 @@
---- src/Makefile.am
-+++ src/Makefile.am
+--- a/src/Makefile.am
++++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = widgets @GUICHAN_EXTRADIRS@ hge openlayer contrib
+SUBDIRS = widgets . @GUICHAN_EXTRADIRS@ hge openlayer contrib
INCLUDES = -I$(top_srcdir)/include
---- src/sdl/Makefile.am
-+++ src/sdl/Makefile.am
+--- a/src/sdl/Makefile.am
++++ b/src/sdl/Makefile.am
@@ -6,6 +6,8 @@
libguichan_sdl_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
diff --git a/dev-games/guichan/files/guichan-0.8.2-automake-1.13.patch b/dev-games/guichan/files/guichan-0.8.2-automake-1.13.patch
index e2f46097b82a..abc0d80ef62d 100644
--- a/dev-games/guichan/files/guichan-0.8.2-automake-1.13.patch
+++ b/dev-games/guichan/files/guichan-0.8.2-automake-1.13.patch
@@ -1,5 +1,5 @@
---- guichan-0.8.2/configure.in
-+++ guichan-0.8.2/configure.in
+--- a/configure.in
++++ b/configure.in
@@ -38,7 +38,7 @@
AC_SUBST(LT_AGE)
diff --git a/dev-games/guichan/files/guichan-0.8.2-slibtool-undefined-references.patch b/dev-games/guichan/files/guichan-0.8.2-slibtool-undefined-references.patch
new file mode 100644
index 000000000000..bec3cc9bb484
--- /dev/null
+++ b/dev-games/guichan/files/guichan-0.8.2-slibtool-undefined-references.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/779040
+
+commit a1e784de2edc4784c440246998fb8ad28065cc39
+Author: orbea <orbea@riseup.net>
+Date: Tue Mar 30 07:34:15 2021 -0700
+
+ build: Fix the build with -no-undefined.
+
+--- a/src/allegro/Makefile.am
++++ b/src/allegro/Makefile.am
+@@ -3,6 +3,7 @@ lib_LTLIBRARIES = libguichan_allegro.la
+ INCLUDES = -I$(top_srcdir)/include
+
+ libguichan_allegro_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
++libguichan_allegro_la_LIBADD = $(top_srcdir)/src/libguichan.la -lalleg
+
+ libguichan_allegro_la_SOURCES = \
+ allegro.cpp \
+@@ -10,4 +11,4 @@ libguichan_allegro_la_SOURCES = \
+ allegrographics.cpp \
+ allegroimage.cpp \
+ allegroimageloader.cpp \
+- allegroinput.cpp
+\ No newline at end of file
++ allegroinput.cpp
+--- a/src/opengl/Makefile.am
++++ b/src/opengl/Makefile.am
+@@ -3,6 +3,7 @@ lib_LTLIBRARIES = libguichan_opengl.la
+ INCLUDES = -I$(top_srcdir)/include
+
+ libguichan_opengl_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
++libguichan_opengl_la_LIBADD = $(top_srcdir)/src/libguichan.la -lGL
+
+ libguichan_opengl_la_SOURCES = \
+ opengl.cpp \
+diff --git a/src/sdl/Makefile.am b/src/sdl/Makefile.am
+index 61b3d50..728ca3c 100644
+--- a/src/sdl/Makefile.am
++++ b/src/sdl/Makefile.am
+@@ -6,7 +6,7 @@ INCLUDES = -I$(top_srcdir)/include
+
+ libguichan_sdl_la_LDFLAGS = -no-undefined -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+-libguichan_sdl_la_LIBADD = -lSDL_image -L$(top_srcdir)/src -lguichan
++libguichan_sdl_la_LIBADD = $(top_srcdir)/src/libguichan.la -lSDL -lSDL_image
+
+ libguichan_sdl_la_SOURCES = \
+ sdl.cpp \
diff --git a/dev-games/guichan/guichan-0.8.2.ebuild b/dev-games/guichan/guichan-0.8.2.ebuild
index 049a09d0547b..9ecf5c198b84 100644
--- a/dev-games/guichan/guichan-0.8.2.ebuild
+++ b/dev-games/guichan/guichan-0.8.2.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils autotools ltprune
+EAPI=7
-DESCRIPTION="a portable C++ GUI library designed for games using Allegro, SDL and/or OpenGL"
+inherit autotools
+
+DESCRIPTION="A portable C++ GUI library designed for games using Allegro, SDL and/or OpenGL"
HOMEPAGE="http://guichan.sourceforge.net/"
SRC_URI="https://guichan.googlecode.com/files/${P}.tar.gz"
@@ -13,18 +14,24 @@ SLOT="0"
KEYWORDS="amd64 x86"
IUSE="allegro opengl sdl static-libs"
-DEPEND="allegro? ( <media-libs/allegro-5 )
+DEPEND="
+ allegro? ( media-libs/allegro:0 )
opengl? ( virtual/opengl )
sdl? (
media-libs/libsdl
media-libs/sdl-image
)"
-RDEPEND=${DEPEND}
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-as-needed.patch
+ "${FILESDIR}"/${P}-automake-1.13.patch
+ "${FILESDIR}"/${P}-slibtool-undefined-references.patch
+)
src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-as-needed.patch \
- "${FILESDIR}"/${P}-automake-1.13.patch
+ default
+
mv configure.in configure.ac || die
eautoreconf
}
@@ -40,5 +47,6 @@ src_configure() {
src_install() {
default
- prune_libtool_files
+
+ find "${ED}" -name '*.la' -delete || die
}