aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-04-23 08:19:26 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-04-23 08:19:26 +0800
commitf19255206fcabee0c6716984eb84347129b76880 (patch)
tree7fa75dafece1f0cbfe5494f6ded4148c87e2cfd5 /games
parentd6772f921255b77163b65ba85bb5e6254714ce90 (diff)
downloadfreebsd-ports-gnome-f19255206fcabee0c6716984eb84347129b76880.tar.gz
freebsd-ports-gnome-f19255206fcabee0c6716984eb84347129b76880.tar.zst
freebsd-ports-gnome-f19255206fcabee0c6716984eb84347129b76880.zip
- Update to 3.12.0
- While here, convert to options helpers PR: 205485 Submitted by: monwarez@mailoo.org (maintainer)
Diffstat (limited to 'games')
-rw-r--r--games/megaglest/Makefile35
-rw-r--r--games/megaglest/distinfo4
-rw-r--r--games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp4
-rw-r--r--games/megaglest/files/patch-source__shared_lib__CMakeLists.txt21
-rw-r--r--games/megaglest/files/patch-source_shared__lib_include_platform_sdl_platform__main.h11
-rw-r--r--games/megaglest/files/patch-source_shared__lib_sources_platform_common_platform__common.cpp11
-rw-r--r--games/megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp14
-rw-r--r--games/megaglest/pkg-plist16
8 files changed, 53 insertions, 63 deletions
diff --git a/games/megaglest/Makefile b/games/megaglest/Makefile
index c717204974cc..c08f0cb4fbd2 100644
--- a/games/megaglest/Makefile
+++ b/games/megaglest/Makefile
@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= megaglest
-PORTVERSION= 3.11.1
+PORTVERSION= 3.12.0
CATEGORIES= games
-DISTNAME= ${PORTNAME}-source-${PORTVERSION}
MAINTAINER= monwarez@mailoo.org
COMMENT= Open source 3D real-time strategy game
@@ -28,20 +27,19 @@ GH_PROJECT= megaglest-source
SUB_FILES= pkg-message
USES= cmake compiler:c++11-lib display:build dos2unix jpeg lua \
- openal:al,alut pkgconfig tar:xz
+ openal:al,alut pkgconfig
USE_GL= glew gl glu
-USE_SDL= yes
+USE_SDL= sdl2
USE_WX= 3.0
USE_CXXSTD= c++11
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -lssl -lcrypto
-OPTIONS_DEFINE= EDITOR DOCS
+OPTIONS_DEFINE= EDITOR DOCS VIEWER
OPTIONS_SUB= yes
EDITOR_DESC= Install MegaGlest Editor
-
-.include <bsd.port.options.mk>
+VIEWER_DESC= Install Megaglest G3D viewer
post-patch:
@${REINPLACE_CMD} -e 's,/usr/local/include/lua51,${LUA_INCDIR},g ; \
@@ -50,23 +48,26 @@ post-patch:
${WRKSRC}/mk/cmake/Modules/FindLUA.cmake
do-install:
- ${STRIP_CMD} ${WRKSRC}/source/glest_game/megaglest
@${MKDIR} ${STAGEDIR}${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/mk/linux/megaglest.desktop ${STAGEDIR}${PREFIX}/share/applications/
- @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons
- ${INSTALL_DATA} ${WRKSRC}/mk/linux/megaglest.png ${STAGEDIR}${PREFIX}/share/icons/
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
+ ${INSTALL_DATA} ${WRKSRC}/mk/shared/megaglest.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
${INSTALL_PROGRAM} ${WRKSRC}/source/glest_game/megaglest ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.for f in mk/linux/glest.ini mk/shared/glestkeys.ini mk/shared/servers.ini
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
.endfor
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
-. for f in docs/AUTHORS.source_code.txt docs/CHANGELOG.txt docs/README.txt docs/COPYRIGHT.source_code.txt
+.for f in docs/AUTHORS.source_code.txt docs/CHANGELOG.txt docs/README.txt docs/COPYRIGHT.source_code.txt
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
-. endfor
-.endif
-.if ${PORT_OPTIONS:MEDITOR}
+.endfor
+
+do-install-EDITOR-on:
${INSTALL_PROGRAM} ${WRKSRC}/source/glest_map_editor/megaglest_editor ${STAGEDIR}${PREFIX}/bin/megaglest_editor
-.endif
+ ${INSTALL_DATA} ${WRKSRC}/mk/shared/editor.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
+
+do-install-VIEWER-on:
+ ${INSTALL_PROGRAM} ${WRKSRC}/source/g3d_viewer/megaglest_g3dviewer ${STAGEDIR}${PREFIX}/bin/megaglest_g3dviewer
+ ${INSTALL_DATA} ${WRKSRC}/mk/shared/g3dviewer.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
.include <bsd.port.mk>
diff --git a/games/megaglest/distinfo b/games/megaglest/distinfo
index 3d371f3bf3c5..0d9b309395bc 100644
--- a/games/megaglest/distinfo
+++ b/games/megaglest/distinfo
@@ -1,2 +1,2 @@
-SHA256 (megaglest-source-3.11.1_GH0.tar.xz) = 6bbbbb69d01bc765f439a60c74178b75dc47753cc126e6758e3bc740d8b42a21
-SIZE (megaglest-source-3.11.1_GH0.tar.xz) = 4807372
+SHA256 (MegaGlest-megaglest-source-3.12.0_GH0.tar.gz) = 13c0ed6320f52558939cadcb1b1d16e6ac94cb3b22be6d4d761723ef41e87297
+SIZE (MegaGlest-megaglest-source-3.12.0_GH0.tar.gz) = 3638252
diff --git a/games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp b/games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp
index 1330f3686fd4..8111d731697e 100644
--- a/games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp
+++ b/games/megaglest/files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp
@@ -1,5 +1,5 @@
---- source/shared_lib/sources/platform/posix/ircclient.cpp.orig 2013-11-22 15:51:23.000000000 -0600
-+++ source/shared_lib/sources/platform/posix/ircclient.cpp 2013-11-22 15:51:42.000000000 -0600
+--- source/shared_lib/sources/platform/posix/ircclient.cpp.orig 2016-04-02 12:36:57 UTC
++++ source/shared_lib/sources/platform/posix/ircclient.cpp
@@ -19,10 +19,7 @@
#if !defined(DISABLE_IRCCLIENT)
diff --git a/games/megaglest/files/patch-source__shared_lib__CMakeLists.txt b/games/megaglest/files/patch-source__shared_lib__CMakeLists.txt
deleted file mode 100644
index 1f318bdf00b4..000000000000
--- a/games/megaglest/files/patch-source__shared_lib__CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-commit fc07d9caf22ee609c03b2edd5ca03b17fd5c2098
-Author: Michael Palimaka <kensington@gentoo.org>
-Date: Wed May 13 04:22:45 2015 +1000
-
- Fix build with >=cmake-3.2.
-
- The FindOpenGL module no longer pulls in X11 libraries.
-
---- source/shared_lib/CMakeLists.txt
-+++ source/shared_lib/CMakeLists.txt
-@@ -95,6 +95,10 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
- SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
- ENDIF()
-
-+ IF(UNIX)
-+ FIND_PACKAGE(X11 REQUIRED)
-+ SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES})
-+ ENDIF()
-
- IF(WANT_XERCES)
- FIND_PACKAGE(XercesC REQUIRED)
diff --git a/games/megaglest/files/patch-source_shared__lib_include_platform_sdl_platform__main.h b/games/megaglest/files/patch-source_shared__lib_include_platform_sdl_platform__main.h
new file mode 100644
index 000000000000..3913089c2c72
--- /dev/null
+++ b/games/megaglest/files/patch-source_shared__lib_include_platform_sdl_platform__main.h
@@ -0,0 +1,11 @@
+--- source/shared_lib/include/platform/sdl/platform_main.h.orig 2016-04-02 12:37:33 UTC
++++ source/shared_lib/include/platform/sdl/platform_main.h
+@@ -667,7 +667,7 @@ int mainSetup(int argc, char **argv) {
+ }
+ else {
+ if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
+- if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
++ if(SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_EVENTS) < 0) {
+ if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
+ std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << "\n";
+ return 3;
diff --git a/games/megaglest/files/patch-source_shared__lib_sources_platform_common_platform__common.cpp b/games/megaglest/files/patch-source_shared__lib_sources_platform_common_platform__common.cpp
new file mode 100644
index 000000000000..150f6bf430b7
--- /dev/null
+++ b/games/megaglest/files/patch-source_shared__lib_sources_platform_common_platform__common.cpp
@@ -0,0 +1,11 @@
+--- source/shared_lib/sources/platform/common/platform_common.cpp.orig 2016-04-02 12:36:57 UTC
++++ source/shared_lib/sources/platform/common/platform_common.cpp
+@@ -124,7 +124,7 @@ tm threadsafe_localtime(const time_t &ti
+ // extracting std::time_t from std:chrono for "now"
+ time_t systemtime_now() {
+ #if __cplusplus > 199711L
+- system_time_point system_now = std::chrono::system_clock::now();
++ auto system_now = std::chrono::system_clock::now();
+ return std::chrono::system_clock::to_time_t(system_now);
+ #else
+ return time(NULL);
diff --git a/games/megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp b/games/megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp
deleted file mode 100644
index f204b718d25e..000000000000
--- a/games/megaglest/files/patch-source_shared__lib_sources_platform_posix_socket.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- source/shared_lib/sources/platform/posix/socket.cpp.orig 2015-10-14 18:18:16 UTC
-+++ source/shared_lib/sources/platform/posix/socket.cpp
-@@ -2554,7 +2554,11 @@ int UPNP_Tools::upnp_init(void *param) {
- int upnp_error = 0;
-
- #ifndef MINIUPNPC_VERSION_PRE1_6
-+#if MINIUPNPC_API_VERSION >= 14
-+ devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, 2, &upnp_error);
-+#else
- devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error);
-+#endif
-
- if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"UPnP discover returned upnp_error = %d.\n",upnp_error);
- if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP discover returned upnp_error = %d.\n",upnp_error);
diff --git a/games/megaglest/pkg-plist b/games/megaglest/pkg-plist
index e509ebe2c3f0..63cb1e69951c 100644
--- a/games/megaglest/pkg-plist
+++ b/games/megaglest/pkg-plist
@@ -1,11 +1,13 @@
-%%EDITOR%%bin/megaglest_editor
bin/megaglest
+%%EDITOR%%bin/megaglest_editor
+%%VIEWER%%bin/megaglest_g3dviewer
+%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.source_code.txt
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt
+%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.source_code.txt
+%%PORTDOCS%%%%DOCSDIR%%/README.txt
+%%EDITOR%%share/pixmaps/editor.ico
+%%VIEWER%%share/pixmaps/g3dviewer.ico
+share/pixmaps/megaglest.ico
%%DATADIR%%/glest.ini
%%DATADIR%%/glestkeys.ini
%%DATADIR%%/servers.ini
-%%PORTDOCS%%%%DOCSDIR%%/README.txt
-%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.source_code.txt
-%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.source_code.txt
-share/applications/megaglest.desktop
-share/icons/megaglest.png