summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2022-10-29 00:44:57 +0200
committerPacho Ramos <pacho@gentoo.org>2022-10-29 00:47:01 +0200
commit1554cb63d8cf42132e194290366165f7ada66e6f (patch)
treeb86b44e89ffb10959d55d0acd41c12e812fa528a /dev-games/clanlib
parentdev-util/colm: Drop .la files and fix sed delimiter for CFLAGS (diff)
downloadgentoo-1554cb63d8cf42132e194290366165f7ada66e6f.tar.gz
gentoo-1554cb63d8cf42132e194290366165f7ada66e6f.tar.bz2
gentoo-1554cb63d8cf42132e194290366165f7ada66e6f.zip
dev-games/clanlib: Drop .la files, fix dependencies and fixes from Fedora
Closes: https://bugs.gentoo.org/842165 Closes: https://bugs.gentoo.org/599634 Closes: https://bugs.gentoo.org/819396 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'dev-games/clanlib')
-rw-r--r--dev-games/clanlib/clanlib-2.3.7-r3.ebuild119
-rw-r--r--dev-games/clanlib/files/clanlib-2.3.7-gcc47.patch107
-rw-r--r--dev-games/clanlib/files/clanlib-2.3.7-gcc7.patch20
-rw-r--r--dev-games/clanlib/files/clanlib-2.3.7-no-ldflags-for-conftest.patch19
-rw-r--r--dev-games/clanlib/files/clanlib-2.3.7-no-wm_type-in-fs.patch12
-rw-r--r--dev-games/clanlib/files/clanlib-2.3.7-non-x86.patch38
6 files changed, 315 insertions, 0 deletions
diff --git a/dev-games/clanlib/clanlib-2.3.7-r3.ebuild b/dev-games/clanlib/clanlib-2.3.7-r3.ebuild
new file mode 100644
index 000000000000..6707f8386f74
--- /dev/null
+++ b/dev-games/clanlib/clanlib-2.3.7-r3.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+MY_P=ClanLib-${PV}
+DESCRIPTION="Multi-platform game development library"
+HOMEPAGE="http://www.clanlib.org/"
+SRC_URI="http://clanlib.org/download/releases-2.0/${MY_P}.tgz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="ZLIB"
+SLOT="2.3"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ipv6 mikmod opengl sound sqlite cpu_flags_x86_sse2 static-libs vorbis X"
+REQUIRED_USE="opengl? ( X )"
+
+BDEPEND="
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ dev-lang/perl
+ media-gfx/graphviz
+ )
+"
+RDEPEND="
+ sys-libs/zlib
+ X? (
+ app-arch/bzip2
+ media-libs/libpng:0
+ media-libs/freetype
+ media-libs/fontconfig
+ virtual/jpeg:0
+ x11-libs/libX11
+ opengl? ( virtual/opengl )
+ )
+ mikmod? (
+ media-libs/alsa-lib
+ media-libs/libmikmod
+ )
+ sqlite? ( dev-db/sqlite:3 )
+ sound? ( media-libs/alsa-lib )
+ vorbis? (
+ media-libs/alsa-lib
+ media-libs/libogg
+ media-libs/libvorbis
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-autotools.patch
+ "${FILESDIR}"/${P}-doc.patch
+ "${FILESDIR}"/${P}-freetype_pkgconfig.patch #764902
+ "${FILESDIR}"/${P}-glibc2.34.patch
+ "${FILESDIR}"/${P}-32bit-opengl.patch
+ # From Fedora
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-gcc7.patch
+ "${FILESDIR}"/${P}-non-x86.patch
+ "${FILESDIR}"/${P}-no-ldflags-for-conftest.patch
+ "${FILESDIR}"/${P}-no-wm_type-in-fs.patch
+)
+
+DOCS=( CODING_STYLE CREDITS PATCHES README )
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ ln -sf ../../../Sources/API Documentation/Utilities/ReferenceDocs/ClanLib || die
+}
+
+src_configure() {
+ # Add -DPACKAGE_BUGREPORT?
+ local myeconfargs=(
+ $(use_enable doc docs)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable opengl clanGL)
+ $(use_enable opengl clanGL1)
+ $(use_enable opengl clanGUI)
+ $(use_enable X clanDisplay)
+ $(use_enable vorbis clanVorbis)
+ $(use_enable mikmod clanMikMod)
+ $(use_enable sqlite clanSqlite)
+ $(use_enable ipv6 getaddr)
+ )
+
+ use sound \
+ || use vorbis \
+ || use mikmod \
+ || myeconfargs+=( --disable-clanSound )
+
+ tc-export PKG_CONFIG
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake
+
+ use doc && emake html
+}
+
+# html files are keeped in a directory that is dependent on the SLOT
+# so to keep eventual bookmarks to the doc from version to version
+src_install() {
+ default
+
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ if use doc ; then
+ emake DESTDIR="${D}" install-html
+ dodoc -r Examples Resources
+ fi
+}
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-gcc47.patch b/dev-games/clanlib/files/clanlib-2.3.7-gcc47.patch
new file mode 100644
index 000000000000..58b55ccf0291
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-2.3.7-gcc47.patch
@@ -0,0 +1,107 @@
+diff -up ClanLib-2.3.4/Sources/Core/IOData/file_help.cpp~ ClanLib-2.3.4/Sources/Core/IOData/file_help.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/file_help.cpp~ 2011-07-22 10:03:21.000000000 +0200
++++ ClanLib-2.3.4/Sources/Core/IOData/file_help.cpp 2012-01-12 22:16:39.779011207 +0100
+@@ -34,6 +34,7 @@
+ #include "API/Core/System/exception.h"
+
+ #ifndef WIN32
++#include <unistd.h>
+ #include <sys/stat.h>
+ #endif
+
+diff -up ClanLib-2.3.4/Sources/Core/IOData/path_help.cpp~ ClanLib-2.3.4/Sources/Core/IOData/path_help.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/path_help.cpp~ 2011-08-03 10:13:57.000000000 +0200
++++ ClanLib-2.3.4/Sources/Core/IOData/path_help.cpp 2012-01-12 22:18:30.754009662 +0100
+@@ -43,6 +43,7 @@
+
+ #ifndef WIN32
+ #include <cstring>
++#include <unistd.h>
+ #endif
+
+ /////////////////////////////////////////////////////////////////////////////
+diff -up ClanLib-2.3.4/Sources/Core/IOData/iodevice_provider_pipe_connection.cpp~ ClanLib-2.3.4/Sources/Core/IOData/iodevice_provider_pipe_connection.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/iodevice_provider_pipe_connection.cpp~ 2011-01-27 10:03:39.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/IOData/iodevice_provider_pipe_connection.cpp 2012-01-12 22:24:55.536004557 +0100
+@@ -33,6 +33,7 @@
+ #include "API/Core/Text/string_help.h"
+ #include "API/Core/Text/string_format.h"
+ #ifndef WIN32
++#include <unistd.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #ifndef UNIX_PATH_MAX
+diff -up ClanLib-2.3.4/Sources/Core/IOData/pipe_listen_impl.cpp~ ClanLib-2.3.4/Sources/Core/IOData/pipe_listen_impl.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/pipe_listen_impl.cpp~ 2011-01-13 12:17:34.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/IOData/pipe_listen_impl.cpp 2012-01-12 22:25:17.359004259 +0100
+@@ -36,6 +36,7 @@
+ #include "API/Core/Text/string_help.h"
+ #ifndef WIN32
+ #include "Network/Socket/event_provider_unixsocket.h"
++#include <unistd.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+ #ifndef UNIX_PATH_MAX
+diff -up ClanLib-2.3.4/Sources/Core/IOData/security_identifier.cpp~ ClanLib-2.3.4/Sources/Core/IOData/security_identifier.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/security_identifier.cpp~ 2011-01-13 12:17:34.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/IOData/security_identifier.cpp 2012-01-12 22:26:06.047003649 +0100
+@@ -31,6 +31,9 @@
+ #include "API/Core/System/exception.h"
+ #ifdef WIN32
+ #include <AclAPI.h>
++#else
++#include <unistd.h>
++#include <sys/types.h>
+ #endif
+
+ /////////////////////////////////////////////////////////////////////////////
+diff -up ClanLib-2.3.4/Sources/Core/IOData/virtual_directory.cpp~ ClanLib-2.3.4/Sources/Core/IOData/virtual_directory.cpp
+--- ClanLib-2.3.4/Sources/Core/IOData/virtual_directory.cpp~ 2011-11-25 09:16:46.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/IOData/virtual_directory.cpp 2012-01-12 22:26:37.583003215 +0100
+@@ -38,6 +38,10 @@
+ #include "API/Core/System/weakptr.h"
+ #include "API/Core/Text/string_help.h"
+
++#ifndef WIN32
++#include <unistd.h>
++#endif
++
+ /////////////////////////////////////////////////////////////////////////////
+ // CL_VirtualDirectory_Impl Class:
+
+diff -up ClanLib-2.3.4/Sources/Core/System/Unix/service_unix.cpp~ ClanLib-2.3.4/Sources/Core/System/Unix/service_unix.cpp
+--- ClanLib-2.3.4/Sources/Core/System/Unix/service_unix.cpp~ 2011-01-13 12:17:34.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/System/Unix/service_unix.cpp 2012-01-12 22:29:12.478001042 +0100
+@@ -35,6 +35,7 @@
+ #include "service_unix.h"
+ #include <iostream>
+ #include <signal.h>
++#include <unistd.h>
+
+ /////////////////////////////////////////////////////////////////////////////
+ // CL_Service_Unix Construction:
+diff -up ClanLib-2.3.4/Sources/Core/Text/console_logger.cpp~ ClanLib-2.3.4/Sources/Core/Text/console_logger.cpp
+--- ClanLib-2.3.4/Sources/Core/Text/console_logger.cpp~ 2011-01-13 12:17:34.000000000 +0100
++++ ClanLib-2.3.4/Sources/Core/Text/console_logger.cpp 2012-01-12 22:27:54.446002158 +0100
+@@ -33,6 +33,10 @@
+ #include "API/Core/Text/string_format.h"
+ #include "API/Core/System/datetime.h"
+
++#ifndef WIN32
++#include <unistd.h>
++#endif
++
+ /////////////////////////////////////////////////////////////////////////////
+ // CL_ConsoleLogger Construction:
+
+diff -up ClanLib-2.3.4/Sources/Display/X11/x11_window.cpp~ ClanLib-2.3.4/Sources/Display/X11/x11_window.cpp
+--- ClanLib-2.3.4/Sources/Display/X11/x11_window.cpp~ 2012-01-12 22:18:49.000000000 +0100
++++ ClanLib-2.3.4/Sources/Display/X11/x11_window.cpp 2012-01-12 22:30:46.492999847 +0100
+@@ -50,6 +50,7 @@
+ #include "display_message_queue_x11.h"
+ #include <X11/Xatom.h>
+ #include <cstdio>
++#include <unistd.h>
+ #include "../Window/input_context_impl.h"
+ #include <X11/XKBlib.h>
+ #include <dlfcn.h>
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-gcc7.patch b/dev-games/clanlib/files/clanlib-2.3.7-gcc7.patch
new file mode 100644
index 000000000000..22cce76debfb
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-2.3.7-gcc7.patch
@@ -0,0 +1,20 @@
+diff -up ClanLib-2.3.7/configure.ac~ ClanLib-2.3.7/configure.ac
+--- ClanLib-2.3.7/configure.ac~ 2012-04-11 08:55:49.000000000 +0200
++++ ClanLib-2.3.7/configure.ac 2017-02-21 11:57:23.482504683 +0100
+@@ -119,7 +119,6 @@ case $target in
+ *)
+ X11="yes"
+ WIN32="no"
+- CXXFLAGS="$CXXFLAGS -std=c++0x"
+ ;;
+ esac
+
+@@ -259,7 +258,7 @@ if test "$use_sse2" != "no"; then
+ fi
+
+ if test "$WIN32" = "no"; then
+- extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -pthread -std=c++0x"
++ extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -pthread"
+ else
+ extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -mthreads -std=c++0x"
+ fi
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-no-ldflags-for-conftest.patch b/dev-games/clanlib/files/clanlib-2.3.7-no-ldflags-for-conftest.patch
new file mode 100644
index 000000000000..c22e58106485
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-2.3.7-no-ldflags-for-conftest.patch
@@ -0,0 +1,19 @@
+diff -up ClanLib-2.3.7/acinclude.m4~ ClanLib-2.3.7/acinclude.m4
+--- ClanLib-2.3.7/acinclude.m4~ 2011-11-24 11:57:30.000000000 +0100
++++ ClanLib-2.3.7/acinclude.m4 2015-04-02 15:22:52.060631122 +0200
+@@ -5,6 +5,7 @@ dnl CLANLIB_CHECK_LIB(lib, testprog, mod
+ define([CLANLIB_CHECK_LIB],[if test "$enable_$3" != "no"; then
+ OLDLIBS="$LIBS"; LIBS="$5"; AC_MSG_CHECKING(for $1)
+ OLD_CXXFLAGS="$CXXFLAGS"; CXXFLAGS="$6";
++ OLD_LDFLAGS="$LDFLAGS"; LDFLAGS=;
+ AC_RUN_IFELSE([AC_LANG_SOURCE($2)], [CL_RESULT=yes], [CL_RESULT=no], [AC_LINK_IFELSE([AC_LANG_SOURCE($2)], [CL_RESULT="yes, linked"],[CL_RESULT=no])])
+ AC_MSG_RESULT([$CL_RESULT])
+ if test "$CL_RESULT" = "no"; then
+@@ -14,6 +15,7 @@ define([CLANLIB_CHECK_LIB],[if test "$en
+ extra_LIBS_$3=" $extra_LIBS_$3 $LIBS "
+ fi
+ CXXFLAGS="$OLD_CXXFLAGS"
++ LDFLAGS="$OLD_LDFLAGS"
+ LIBS="$OLDLIBS"
+ fi])
+
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-no-wm_type-in-fs.patch b/dev-games/clanlib/files/clanlib-2.3.7-no-wm_type-in-fs.patch
new file mode 100644
index 000000000000..48799baa42c2
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-2.3.7-no-wm_type-in-fs.patch
@@ -0,0 +1,12 @@
+diff -up ClanLib-2.3.7/Sources/Display/X11/x11_window.cpp~ ClanLib-2.3.7/Sources/Display/X11/x11_window.cpp
+--- ClanLib-2.3.7/Sources/Display/X11/x11_window.cpp~ 2013-08-01 16:32:37.866001296 +0200
++++ ClanLib-2.3.7/Sources/Display/X11/x11_window.cpp 2013-08-01 16:33:26.267001811 +0200
+@@ -289,7 +289,7 @@ void CL_X11Window::create(XVisualInfo *v
+ // Retrieve the frame size (emulating microsoft windows)
+ bool window_is_frameless = false;
+ bool window_has_thin_frame = false;
+- if ((!desc.has_caption()) || (!desc.get_decorations()))
++ if (!desc.is_fullscreen() && (!desc.has_caption() || !desc.get_decorations()))
+ {
+ if (desc.is_tool_window())
+ {
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-non-x86.patch b/dev-games/clanlib/files/clanlib-2.3.7-non-x86.patch
new file mode 100644
index 000000000000..acaa8520b645
--- /dev/null
+++ b/dev-games/clanlib/files/clanlib-2.3.7-non-x86.patch
@@ -0,0 +1,38 @@
+diff -up ClanLib-2.3.6/Sources/Core/System/detect_cpu_ext.cpp.non-x86 ClanLib-2.3.6/Sources/Core/System/detect_cpu_ext.cpp
+--- ClanLib-2.3.6/Sources/Core/System/detect_cpu_ext.cpp.non-x86 2011-11-15 13:15:42.000000000 +0100
++++ ClanLib-2.3.6/Sources/Core/System/detect_cpu_ext.cpp 2013-01-08 13:33:20.000000000 +0100
+@@ -30,7 +30,7 @@
+ #include "Core/precomp.h"
+ #include "API/Core/System/system.h"
+
+-#ifdef CL_ARM_PLATFORM
++#if ! (defined(__i386__) || defined(__x86_64__) || defined(__amd64__))
+ bool CL_System::detect_cpu_extension(CL_CPU_ExtensionPPC ext)
+ {
+ throw ("Congratulations, you've just been selected to code this feature!");
+@@ -48,11 +48,12 @@ bool CL_System::detect_cpu_extension(CL_
+ #ifdef __GNUC__
+
+
+-#ifdef __amd64__
++#if defined(__amd64__) || defined(__x86_64__)
+
+ #define __cpuid(out, infoType)\
+ asm("cpuid": "=a" ((out)[0]), "=b" ((out)[1]), "=c" ((out)[2]), "=d" ((out)[3]): "a" (infoType));
+-#else
++
++#elif defined(__i386__)
+
+ #define __cpuid(out, infoType) \
+ asm volatile( "pushl %%ebx \n" \
+@@ -61,6 +62,10 @@ bool CL_System::detect_cpu_extension(CL_
+ "popl %%ebx" \
+ : "=a" ((out)[0]), "=r" ((out)[1]), "=c" ((out)[2]), "=d" ((out)[3]): "a" (infoType));
+
++#else
++
++#define __cpuid(out, infoType) {}
++
+ #endif
+
+ #endif