View | Details | Raw Unified | Return to bug 205485 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-8 / +9 lines)
Lines 2-14 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	megaglest
4
PORTNAME=	megaglest
5
PORTVERSION=	3.9.0.4
5
PORTVERSION=	3.12.0
6
PORTREVISION=	8
7
CATEGORIES=	games
6
CATEGORIES=	games
8
MASTER_SITES=	SF/${PORTNAME}/archived/${PORTNAME}_3.9.0/
9
DISTNAME=	${PORTNAME}-source-${PORTVERSION}
7
DISTNAME=	${PORTNAME}-source-${PORTVERSION}
10
8
11
MAINTAINER=	ports@FreeBSD.org
9
MAINTAINER=	monwarez@mailoo.org
12
COMMENT=	Open source 3D real-time strategy game
10
COMMENT=	Open source 3D real-time strategy game
13
11
14
LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
12
LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
Lines 20-25 Link Here
20
		${LOCALBASE}/include/miniupnpc/miniupnpc.h:${PORTSDIR}/net/miniupnpc
18
		${LOCALBASE}/include/miniupnpc/miniupnpc.h:${PORTSDIR}/net/miniupnpc
21
RUN_DEPENDS=	${DATADIR}/tutorials/2_basic_tutorial/2_basic_tutorial.xml:${PORTSDIR}/games/megaglest-data
19
RUN_DEPENDS=	${DATADIR}/tutorials/2_basic_tutorial/2_basic_tutorial.xml:${PORTSDIR}/games/megaglest-data
22
20
21
USE_GITHUB=	yes
22
GH_ACCOUNT=	MegaGlest
23
GH_PROJECT=	megaglest-source
24
23
SUB_FILES=	pkg-message
25
SUB_FILES=	pkg-message
24
26
25
USES=		cmake compiler:c++11-lib display:build dos2unix jpeg lua \
27
USES=		cmake compiler:c++11-lib display:build dos2unix jpeg lua \
Lines 28-38 Link Here
28
USE_SDL=	yes
30
USE_SDL=	yes
29
USE_WX=		3.0
31
USE_WX=		3.0
30
USE_CXXSTD=	c++11
32
USE_CXXSTD=	c++11
31
WX_UNICODE=	yes
32
33
33
CFLAGS+=	-I${LOCALBASE}/include
34
CFLAGS+=	-I${LOCALBASE}/include
34
LDFLAGS+=	-L${LOCALBASE}/lib -lssl -lcrypto
35
LDFLAGS+=	-L${LOCALBASE}/lib -lssl -lcrypto
35
WRKSRC=		${WRKDIR}/${PORTNAME}-3.9.0
36
36
37
OPTIONS_DEFINE=	EDITOR DOCS
37
OPTIONS_DEFINE=	EDITOR DOCS
38
OPTIONS_SUB=	yes
38
OPTIONS_SUB=	yes
Lines 49-61 Link Here
49
do-install:
49
do-install:
50
	${STRIP_CMD} ${WRKSRC}/source/glest_game/megaglest
50
	${STRIP_CMD} ${WRKSRC}/source/glest_game/megaglest
51
	@${MKDIR} ${STAGEDIR}${DATADIR}
51
	@${MKDIR} ${STAGEDIR}${DATADIR}
52
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons
52
	${INSTALL_PROGRAM} ${WRKSRC}/source/glest_game/megaglest ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
53
	${INSTALL_PROGRAM} ${WRKSRC}/source/glest_game/megaglest ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
53
.for f in glest.ini glestkeys.ini servers.ini
54
.for f in mk/linux/glest.ini mk/shared/glestkeys.ini mk/shared/servers.ini
54
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
55
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DATADIR}
55
.endfor
56
.endfor
56
.if ${PORT_OPTIONS:MDOCS}
57
.if ${PORT_OPTIONS:MDOCS}
57
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
58
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
58
. for f in AUTHORS.source_code.txt CHANGELOG.txt README.txt COPYRIGHT.source_code.txt
59
. for f in docs/AUTHORS.source_code.txt docs/CHANGELOG.txt docs/README.txt docs/COPYRIGHT.source_code.txt
59
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
60
	${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
60
. endfor
61
. endfor
61
.endif
62
.endif
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (megaglest-source-3.9.0.4.tar.xz) = 3362ade61af3c01c2d8976d2d481769698dc0c800f35251b8c5489f8e41d9bc3
1
SHA256 (megaglest-source-3.12.0_GH0.tar.xz) = 13c0ed6320f52558939cadcb1b1d16e6ac94cb3b22be6d4d761723ef41e87297
2
SIZE (megaglest-source-3.9.0.4.tar.xz) = 1596692
2
SIZE (megaglest-source-3.12.0_GH0.tar.xz) = 3638252
(-)files/patch-source-shared_lib-sources-platform-posix-ircclient.cpp (-2 / +2 lines)
Lines 1-5 Link Here
1
--- source/shared_lib/sources/platform/posix/ircclient.cpp.orig	2013-11-22 15:51:23.000000000 -0600
1
--- source/shared_lib/sources/platform/posix/ircclient.cpp.orig	2016-03-26 14:06:43 UTC
2
+++ source/shared_lib/sources/platform/posix/ircclient.cpp	2013-11-22 15:51:42.000000000 -0600
2
+++ source/shared_lib/sources/platform/posix/ircclient.cpp
3
@@ -19,10 +19,7 @@
3
@@ -19,10 +19,7 @@
4
 #if !defined(DISABLE_IRCCLIENT)
4
 #if !defined(DISABLE_IRCCLIENT)
5
 
5
 
(-)files/patch-source__shared_lib__CMakeLists.txt (-24 lines)
Lines 1-21 Link Here
1
commit fc07d9caf22ee609c03b2edd5ca03b17fd5c2098
2
Author: Michael Palimaka <kensington@gentoo.org>
3
Date:   Wed May 13 04:22:45 2015 +1000
4
5
    Fix build with >=cmake-3.2.
6
7
    The FindOpenGL module no longer pulls in X11 libraries.
8
9
--- source/shared_lib/CMakeLists.txt
10
+++ source/shared_lib/CMakeLists.txt
11
@@ -95,6 +95,10 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
12
 		SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENGL_LIBRARY})
13
 	ENDIF()
14
 
15
+        IF(UNIX)
16
+		FIND_PACKAGE(X11 REQUIRED)
17
+		SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${X11_LIBRARIES})
18
+        ENDIF()
19
 
20
         IF(WANT_XERCES)
21
 	        FIND_PACKAGE(XercesC REQUIRED)
22
yes
23
native
24
text/plain
(-)files/patch-source_shared__lib_sources_miniz_miniz.c (-22 lines)
Lines 1-19 Link Here
1
--- source/shared_lib/sources/miniz/miniz.c.orig	2015-04-13 04:50:02 UTC
2
+++ source/shared_lib/sources/miniz/miniz.c
3
@@ -2765,6 +2765,7 @@ mz_uint tdefl_create_comp_flags_from_zip
4
 // http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/.
5
 void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out)
6
 {
7
+  static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06};
8
   tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0;
9
   if (!pComp) return NULL;
10
   MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; }
11
@@ -2778,7 +2779,7 @@ void *tdefl_write_image_to_png_file_in_m
12
   *pLen_out = out_buf.m_size-41;
13
   {
14
     mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
15
-      0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,"\0\0\04\02\06"[num_chans],0,0,0,0,0,0,0,
16
+      0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0,
17
       (mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0x49,0x44,0x41,0x54};
18
     c=(mz_uint32)mz_crc32(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>>24);
19
     memcpy(out_buf.m_pBuf, pnghdr, 41);
20
yes
21
native
22
text/plain
(-)files/patch-source_shared__lib_sources_platform_common_platform__common.cpp (+14 lines)
Line 0 Link Here
1
--- source/shared_lib/sources/platform/common/platform_common.cpp.orig	2016-03-26 14:08:38 UTC
2
+++ source/shared_lib/sources/platform/common/platform_common.cpp
3
@@ -124,7 +124,7 @@ tm threadsafe_localtime(const time_t &ti
4
 // extracting std::time_t from std:chrono for "now"
5
 time_t systemtime_now() {
6
 #if __cplusplus > 199711L
7
-	system_time_point system_now = std::chrono::system_clock::now();
8
+	auto system_now = std::chrono::system_clock::now();
9
 	return std::chrono::system_clock::to_time_t(system_now);
10
 #else
11
 	return time(NULL);
12
yes
13
native
14
text/plain
(-)files/patch-source_shared__lib_sources_platform_posix_socket.cpp (-17 lines)
Lines 1-14 Link Here
1
--- source/shared_lib/sources/platform/posix/socket.cpp.orig	2015-10-14 18:18:16 UTC
2
+++ source/shared_lib/sources/platform/posix/socket.cpp
3
@@ -2554,7 +2554,11 @@ int UPNP_Tools::upnp_init(void *param) {
4
 		int upnp_error = 0;
5
 
6
 #ifndef MINIUPNPC_VERSION_PRE1_6
7
+#if MINIUPNPC_API_VERSION >= 14
8
+		devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, 2, &upnp_error);
9
+#else
10
 		devlist = upnpDiscover(upnp_delay, upnp_multicastif, upnp_minissdpdsock, upnp_sameport, upnp_ipv6, &upnp_error);
11
+#endif
12
 
13
 		if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"UPnP discover returned upnp_error = %d.\n",upnp_error);
14
 		if(SystemFlags::VERBOSE_MODE_ENABLED) printf("UPnP discover returned upnp_error = %d.\n",upnp_error);
15
yes
16
native
17
text/plain
(-)pkg-plist (-5 / +5 lines)
Lines 1-9 Link Here
1
%%EDITOR%%bin/megaglest_editor
2
bin/megaglest
1
bin/megaglest
2
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.source_code.txt
3
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt
4
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.source_code.txt
5
%%PORTDOCS%%%%DOCSDIR%%/README.txt
3
%%DATADIR%%/glest.ini
6
%%DATADIR%%/glest.ini
4
%%DATADIR%%/glestkeys.ini
7
%%DATADIR%%/glestkeys.ini
5
%%DATADIR%%/servers.ini
8
%%DATADIR%%/servers.ini
6
%%PORTDOCS%%%%DOCSDIR%%/README.txt
9
@dir share/icons
7
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.source_code.txt
8
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt
9
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS.source_code.txt

Return to bug 205485