games/openclonk: Update to 8.0
Additional port changes: * Changed to DISTVERSION * Moved BROKEN_powerpc64 to a proper place * Updated LIB_DEPENDS,USES,USE_GL,USE_SDL * Choosing OpenAL through CMAKE_ARGS * Added 3 patches PR: 226111 Submitted by: Kevin Zheng <kevinz5000@gmail.com> (maintainer) Approved by: tcberner (mentor, implicit)
This commit is contained in:
parent
72f953df9a
commit
7faebcb501
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=462656
@ -2,9 +2,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= openclonk
|
||||
PORTVERSION= 7.0
|
||||
DISTVERSION= 8.0
|
||||
DISTVERSIONSUFFIX= -src
|
||||
PORTREVISION= 10
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.openclonk.org/builds/release/${DISTVERSION}/
|
||||
|
||||
@ -15,20 +14,25 @@ LICENSE= ISCL CC0-1.0
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_ISCL= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libboost_thread.so:devel/boost-libs \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libogg.so:audio/libogg \
|
||||
libpng.so:graphics/png \
|
||||
libvorbis.so:audio/libvorbis
|
||||
|
||||
BROKEN_powerpc64= fails to compile: C4Texture.cpp:260:13: error: 'stoul' is not a member of 'std'
|
||||
|
||||
USES= compiler:c++14-lang cmake:noninja desktop-file-utils jpeg pkgconfig tar:bzip2
|
||||
USE_GL= glew
|
||||
USE_GNOME= gtk30
|
||||
USE_SDL= sdl mixer
|
||||
LIB_DEPENDS= libalut.so:audio/freealut \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libminiupnpc.so:net/miniupnpc \
|
||||
libogg.so:audio/libogg \
|
||||
libpng.so:graphics/png \
|
||||
libtinyxml.so:textproc/tinyxml \
|
||||
libvorbis.so:audio/libvorbis
|
||||
|
||||
WRKSRC= ${WRKDIR}/openclonk-release-${PORTVERSION}-src
|
||||
|
||||
# make install has parallel issues with ninja
|
||||
USES= compiler:c++14-lang cmake:noninja desktop-file-utils jpeg openal pkgconfig tar:bzip2
|
||||
USE_GL= gl glew glu
|
||||
USE_SDL= sdl2
|
||||
USE_XORG= x11 xpm
|
||||
INSTALLS_ICONS= yes
|
||||
CMAKE_ARGS= -DAudio_TK:STRING="OpenAL"
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|DESTINATION games|DESTINATION bin|' \
|
||||
|
@ -1,2 +1,3 @@
|
||||
SHA256 (openclonk-7.0-src.tar.bz2) = bc1a231d72774a7aa8819e54e1f79be27a21b579fb057609398f2aa5700b0732
|
||||
SIZE (openclonk-7.0-src.tar.bz2) = 102143348
|
||||
TIMESTAMP = 1517953047
|
||||
SHA256 (openclonk-8.0-src.tar.bz2) = 6fc88e8c9bb0ca7eb3e3c8f60af80f77bd6d8f23632bb03f4f5e6ac4e97ae354
|
||||
SIZE (openclonk-8.0-src.tar.bz2) = 121422616
|
||||
|
20
games/openclonk/files/patch-CMakeLists.txt
Normal file
20
games/openclonk/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
--- CMakeLists.txt.orig 2018-02-08 07:27:37 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -320,8 +320,6 @@ if(READLINE_FOUND)
|
||||
endif()
|
||||
SET(HAVE_LIBREADLINE ${READLINE_FOUND} CACHE INTERNAL "libreadline available")
|
||||
|
||||
-find_package(GTK3 COMPONENTS gthread gio gobject glib OPTIONAL_COMPONENTS gtksourceview)
|
||||
-
|
||||
# Select an audio library
|
||||
find_package("Audio")
|
||||
if(Audio_FOUND)
|
||||
@@ -339,8 +337,6 @@ set(HAVE_SDL ${SDL2_FOUND})
|
||||
include_directories(SYSTEM ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
# Qt5 for editor
|
||||
-find_path(Qt5DIR qt.pro PATHS ${CMAKE_ADDITIONAL_DEPS_PATH}/qt-5.5.0)
|
||||
-find_package(Qt5Widgets 5.4 PATHS ${Qt5DIR}/qtbase/lib/cmake/Qt5Widgets)
|
||||
if(Qt5Widgets_FOUND)
|
||||
SET(WITH_QT_EDITOR ${Qt5Widgets_FOUND} "Qt editor dialogues available")
|
||||
set(CMAKE_AUTOMOC ON)
|
50
games/openclonk/files/patch-src_network_C4NetIO.cpp
Normal file
50
games/openclonk/files/patch-src_network_C4NetIO.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
--- src/network/C4NetIO.cpp.orig 2018-02-04 15:39:08 UTC
|
||||
+++ src/network/C4NetIO.cpp
|
||||
@@ -523,6 +523,11 @@ C4NetIO::HostAddress::AddressFamily C4Ne
|
||||
gen.sa_family == AF_INET6 ? IPv6 : UnknownFamily;
|
||||
}
|
||||
|
||||
+size_t C4NetIO::HostAddress::GetAddrLen() const
|
||||
+{
|
||||
+ return GetFamily() == IPv4 ? sizeof(sockaddr_in) : sizeof(sockaddr_in6);
|
||||
+}
|
||||
+
|
||||
void C4NetIO::EndpointAddress::SetPort(uint16_t port)
|
||||
{
|
||||
switch (gen.sa_family)
|
||||
@@ -1195,7 +1200,7 @@ bool C4NetIOTCP::Connect(const C4NetIO::
|
||||
#endif
|
||||
|
||||
// connect (async)
|
||||
- if (::connect(nsock, &addr, sizeof addr) == SOCKET_ERROR)
|
||||
+ if (::connect(nsock, &addr, addr.GetAddrLen()) == SOCKET_ERROR)
|
||||
{
|
||||
if (!HaveWouldBlockError()) // expected
|
||||
{
|
||||
@@ -1368,7 +1373,7 @@ C4NetIOTCP::Peer *C4NetIOTCP::Accept(SOC
|
||||
addr_t caddr = ConnectAddr;
|
||||
|
||||
// accept incoming connection?
|
||||
- C4NetIO::addr_t addr; socklen_t iAddrSize = sizeof addr;
|
||||
+ C4NetIO::addr_t addr; socklen_t iAddrSize = addr.GetAddrLen();
|
||||
if (nsock == INVALID_SOCKET)
|
||||
{
|
||||
// accept from listener
|
||||
@@ -1497,7 +1502,7 @@ bool C4NetIOTCP::Listen(uint16_t inListe
|
||||
// bind listen socket
|
||||
addr_t addr = addr_t::Any;
|
||||
addr.SetPort(inListenPort);
|
||||
- if (::bind(lsock, &addr, sizeof(addr)) == SOCKET_ERROR)
|
||||
+ if (::bind(lsock, &addr, addr.GetAddrLen()) == SOCKET_ERROR)
|
||||
{
|
||||
SetError("socket bind failed", true);
|
||||
closesocket(lsock); lsock = INVALID_SOCKET;
|
||||
@@ -2122,7 +2127,7 @@ bool C4NetIOSimpleUDP::Send(const C4NetI
|
||||
// send it
|
||||
C4NetIO::addr_t addr = rPacket.getAddr();
|
||||
if (::sendto(sock, getBufPtr<char>(rPacket), rPacket.getSize(), 0,
|
||||
- &addr, sizeof(addr))
|
||||
+ &addr, addr.GetAddrLen())
|
||||
!= int(rPacket.getSize()) &&
|
||||
!HaveWouldBlockError())
|
||||
{
|
10
games/openclonk/files/patch-src_network_C4NetIO.h
Normal file
10
games/openclonk/files/patch-src_network_C4NetIO.h
Normal file
@ -0,0 +1,10 @@
|
||||
--- src/network/C4NetIO.h.orig 2018-02-04 15:39:08 UTC
|
||||
+++ src/network/C4NetIO.h
|
||||
@@ -94,6 +94,7 @@ public:
|
||||
HostAddress(const sockaddr *addr) { SetHost(addr); }
|
||||
|
||||
AddressFamily GetFamily() const;
|
||||
+ size_t GetAddrLen() const;
|
||||
|
||||
void SetScopeId(int scopeId);
|
||||
int GetScopeId() const;
|
@ -1,5 +1,6 @@
|
||||
bin/c4group
|
||||
bin/openclonk
|
||||
share/appdata/openclonk.appdata.xml
|
||||
share/applications/openclonk.desktop
|
||||
share/icons/hicolor/128x128/apps/openclonk.png
|
||||
share/icons/hicolor/256x256/apps/openclonk.png
|
||||
@ -12,7 +13,16 @@ share/icons/hicolor/64x64/apps/openclonk.png
|
||||
%%DATADIR%%/Graphics.ocg
|
||||
%%DATADIR%%/Material.ocg
|
||||
%%DATADIR%%/Missions.ocf
|
||||
%%DATADIR%%/Music.ocg
|
||||
%%DATADIR%%/Music.ocg/@CrushedIceCocktail.ogg
|
||||
%%DATADIR%%/Music.ocg/Cavern.ogg
|
||||
%%DATADIR%%/Music.ocg/IslandDreams.ogg
|
||||
%%DATADIR%%/Music.ocg/LucidDream.ogg
|
||||
%%DATADIR%%/Music.ocg/Motorway.ogg
|
||||
%%DATADIR%%/Music.ocg/Offshore.ogg
|
||||
%%DATADIR%%/Music.ocg/TheSkylands.ogg
|
||||
%%DATADIR%%/Music.ocg/UrbanBolero.ogg
|
||||
%%DATADIR%%/Music.ocg/Version.txt
|
||||
%%DATADIR%%/Music.ocg/authors.txt
|
||||
%%DATADIR%%/Objects.ocd
|
||||
%%DATADIR%%/Parkour.ocf
|
||||
%%DATADIR%%/Sound.ocg
|
||||
|
Loading…
Reference in New Issue
Block a user