aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoryuri <yuri@FreeBSD.org>2018-02-23 08:54:45 +0800
committeryuri <yuri@FreeBSD.org>2018-02-23 08:54:45 +0800
commit6e53e1196b4bf0f8feefdc0cab55fd0ac5e33afb (patch)
tree764f73234cd3e278df75ee2af38471f7611c8173 /games
parentb200437ac133548988db5e921d61218e5d267522 (diff)
downloadfreebsd-ports-gnome-6e53e1196b4bf0f8feefdc0cab55fd0ac5e33afb.tar.gz
freebsd-ports-gnome-6e53e1196b4bf0f8feefdc0cab55fd0ac5e33afb.tar.zst
freebsd-ports-gnome-6e53e1196b4bf0f8feefdc0cab55fd0ac5e33afb.zip
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)
Diffstat (limited to 'games')
-rw-r--r--games/openclonk/Makefile20
-rw-r--r--games/openclonk/distinfo5
-rw-r--r--games/openclonk/files/patch-CMakeLists.txt20
-rw-r--r--games/openclonk/files/patch-src_network_C4NetIO.cpp50
-rw-r--r--games/openclonk/files/patch-src_network_C4NetIO.h10
-rw-r--r--games/openclonk/pkg-plist12
6 files changed, 106 insertions, 11 deletions
diff --git a/games/openclonk/Makefile b/games/openclonk/Makefile
index add7c09fdeeb..a48b8cf33e29 100644
--- a/games/openclonk/Makefile
+++ b/games/openclonk/Makefile
@@ -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 \
+BROKEN_powerpc64= fails to compile: C4Texture.cpp:260:13: error: 'stoul' is not a member of 'std'
+
+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
-BROKEN_powerpc64= fails to compile: C4Texture.cpp:260:13: error: 'stoul' is not a member of 'std'
+WRKSRC= ${WRKDIR}/openclonk-release-${PORTVERSION}-src
-USES= compiler:c++14-lang cmake:noninja desktop-file-utils jpeg pkgconfig tar:bzip2
-USE_GL= glew
-USE_GNOME= gtk30
-USE_SDL= sdl mixer
+# 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|' \
diff --git a/games/openclonk/distinfo b/games/openclonk/distinfo
index d10e7f328803..2563547dd9d6 100644
--- a/games/openclonk/distinfo
+++ b/games/openclonk/distinfo
@@ -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
diff --git a/games/openclonk/files/patch-CMakeLists.txt b/games/openclonk/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e30285fee150
--- /dev/null
+++ b/games/openclonk/files/patch-CMakeLists.txt
@@ -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)
diff --git a/games/openclonk/files/patch-src_network_C4NetIO.cpp b/games/openclonk/files/patch-src_network_C4NetIO.cpp
new file mode 100644
index 000000000000..854dedf3ddc0
--- /dev/null
+++ b/games/openclonk/files/patch-src_network_C4NetIO.cpp
@@ -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())
+ {
diff --git a/games/openclonk/files/patch-src_network_C4NetIO.h b/games/openclonk/files/patch-src_network_C4NetIO.h
new file mode 100644
index 000000000000..b7df80888025
--- /dev/null
+++ b/games/openclonk/files/patch-src_network_C4NetIO.h
@@ -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;
diff --git a/games/openclonk/pkg-plist b/games/openclonk/pkg-plist
index fb6355d3ed75..7c167117fd30 100644
--- a/games/openclonk/pkg-plist
+++ b/games/openclonk/pkg-plist
@@ -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