pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import Stratagus 2.4.2 as wip/stratagus



Module Name:	pkgsrc-wip
Committed By:	Charlotte Koch <cfkoch%edgebsd.org@localhost>
Pushed By:	cfkoch
Date:		Sat Jul 6 13:24:09 2019 -0700
Changeset:	c716ceac1c468291c9a114d163aefaf4d08a41b1

Added Files:
	stratagus/DESCR
	stratagus/Makefile
	stratagus/PLIST
	stratagus/distinfo
	stratagus/patches/patch-CMakeLists.txt
	stratagus/patches/patch-src_ui_interface.cpp
	stratagus/patches/patch-src_video_graphic.cpp
	stratagus/patches/patch-src_video_sdl.cpp
	stratagus/patches/patch-src_video_video.cpp

Log Message:
Import Stratagus 2.4.2 as wip/stratagus

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c716ceac1c468291c9a114d163aefaf4d08a41b1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 stratagus/DESCR                               |  4 +++
 stratagus/Makefile                            | 33 +++++++++++++++++
 stratagus/PLIST                               |  3 ++
 stratagus/distinfo                            | 11 ++++++
 stratagus/patches/patch-CMakeLists.txt        | 51 +++++++++++++++++++++++++++
 stratagus/patches/patch-src_ui_interface.cpp  | 20 +++++++++++
 stratagus/patches/patch-src_video_graphic.cpp | 23 ++++++++++++
 stratagus/patches/patch-src_video_sdl.cpp     | 21 +++++++++++
 stratagus/patches/patch-src_video_video.cpp   | 20 +++++++++++
 9 files changed, 186 insertions(+)

diffs:
diff --git a/stratagus/DESCR b/stratagus/DESCR
new file mode 100644
index 0000000000..c8c6ada2da
--- /dev/null
+++ b/stratagus/DESCR
@@ -0,0 +1,4 @@
+Stratagus is a free cross-platform real-time strategy gaming engine. It
+includes support for playing over the internet/LAN, or playing a computer
+opponent. The engine is configurable and can be used to create games with a
+wide-range of features specific to your needs. Stratagus is written in C++.
diff --git a/stratagus/Makefile b/stratagus/Makefile
new file mode 100644
index 0000000000..98ce512234
--- /dev/null
+++ b/stratagus/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD$
+
+DISTNAME=	stratagus-2.4.2
+CATEGORIES=	games
+GITHUB_PROJECT=	stratagus
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+MASTER_SITES=	${MASTER_SITE_GITHUB:=Wargus/}
+
+MAINTAINER=	cfkoch%edgebsd.org@localhost
+HOMEPAGE=	https://github.com/Wargus/stratagus
+COMMENT=	Real-time strategy gaming engine
+LICENSE=	gnu-gpl-v2
+
+EXTRACT_USING=	gtar
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+
+BUILD_DEPENDS+=	tolua++-1.0.93:../../wip/tolua++
+
+CMAKE_ARGS+=	-DWANT_METASERVER=OFF
+CMAKE_ARGS+=	-DWITH_RENDERER=NativeSDL
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../audio/libmikmod/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../graphics/mng/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../lang/lua51/buildlink3.mk"
+.include "../../multimedia/libtheora/buildlink3.mk"
+.include "../../wip/tolua++/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/stratagus/PLIST b/stratagus/PLIST
new file mode 100644
index 0000000000..64e2827026
--- /dev/null
+++ b/stratagus/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/png2stratagus
+games/stratagus
diff --git a/stratagus/distinfo b/stratagus/distinfo
new file mode 100644
index 0000000000..e7093adf46
--- /dev/null
+++ b/stratagus/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+SHA1 (stratagus-2.4.2.tar.gz) = 83170db200f0f7fe293a48ac90e9645f6605e6cc
+RMD160 (stratagus-2.4.2.tar.gz) = a83ab6a87e98fa10cdb2f4d938a7010042ba6fb7
+SHA512 (stratagus-2.4.2.tar.gz) = 4539295f7575883ae6fe7f1ae48aedefcf08ce55bffeb6f1e9275ed0138c499f8b838904002f873065d8d441932f5df4f223d34144669c461b523ce7a28b0bc9
+Size (stratagus-2.4.2.tar.gz) = 1114717 bytes
+SHA1 (patch-CMakeLists.txt) = 8cac871f9fa73f0fc11aa81a8699f435f2081dc7
+SHA1 (patch-src_ui_interface.cpp) = 46451e5e21d826793849db852f15d0ab849f65c0
+SHA1 (patch-src_video_graphic.cpp) = 73ce87e430c9752a02558c08366f5c86c49e69ba
+SHA1 (patch-src_video_sdl.cpp) = c6b77dca09b0bbeee38eb11fdbaa511e512ac56b
+SHA1 (patch-src_video_video.cpp) = aa9952143dd25bc877c0fb6bbc8f9b4b64aab48a
diff --git a/stratagus/patches/patch-CMakeLists.txt b/stratagus/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..8dd177bd45
--- /dev/null
+++ b/stratagus/patches/patch-CMakeLists.txt
@@ -0,0 +1,51 @@
+# $NetBSD$
+
+Make the building and installation of the metaserver optional.
+
+--- CMakeLists.txt.orig	2018-09-29 11:47:42.000000000 -0700
++++ CMakeLists.txt	2019-07-06 12:03:25.664440117 -0700
+@@ -627,7 +627,7 @@
+ 	set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.a")
+ endif()
+ 
+-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
++set (CMAKE_MODULE_PATH "/usr/pkgsrc/wip/stratagus/work/.buildlink/cmake-Modules" "/usr/pkgsrc/wip/stratagus/work/.buildlink/cmake-Modules" ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+ 
+ find_package(Lua51 REQUIRED)
+ find_package(PNG REQUIRED)
+@@ -698,6 +698,8 @@
+ option(ENABLE_USEGAMEDIR "Place all files created by Stratagus(logs, savegames) in game directory(old behavior), otherwise place everything in user directory(new behavior)" OFF)
+ option(ENABLE_MULTIBUILD "Compile Stratagus on all CPU cores simltaneously in MSVC" ON)
+ 
++option(WANT_METASERVER "Build and install the metaserver" ON)
++
+ if(NOT WITH_RENDERER)
+ 	if(OPENGL_FOUND)
+ 		set(WITH_RENDERER "OpenGL")
+@@ -1121,7 +1123,7 @@
+ 
+ source_group(metaserver FILES ${metaserver_SRCS} ${metaserver_HDRS})
+ 
+-if(SQLITE_FOUND)
++if(SQLITE_FOUND AND WANT_METASERVER)
+ 	add_executable(metaserver ${metaserver_SRCS} ${metaserver_HDRS})
+ 	target_link_libraries(metaserver ${SDL_LIBRARY} ${SQLITE_LIBRARIES})
+ 
+@@ -1207,7 +1209,7 @@
+ if(ENABLE_UPX AND SELF_PACKER_FOR_EXECUTABLE)
+ 	self_packer(stratagus)
+ 	self_packer(png2stratagus)
+-	if(SQLITE_FOUND)
++	if(SQLITE_FOUND AND WANT_METASERVER)
+ 		self_packer(metaserver)
+ 	endif()
+ endif()
+@@ -1244,7 +1246,7 @@
+ install(TARGETS stratagus DESTINATION ${GAMEDIR})
+ install(TARGETS png2stratagus DESTINATION ${BINDIR})
+ 
+-if(SQLITE_FOUND)
++if(SQLITE_FOUND AND WANT_METASERVER)
+ 	install(TARGETS metaserver DESTINATION ${BINDIR} RENAME stratagus-metaserver)
+ endif()
+ 
diff --git a/stratagus/patches/patch-src_ui_interface.cpp b/stratagus/patches/patch-src_ui_interface.cpp
new file mode 100644
index 0000000000..7328aa3d1d
--- /dev/null
+++ b/stratagus/patches/patch-src_ui_interface.cpp
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+Don't assume that we've enabled OpenGL support.
+
+--- ./src/ui/interface.cpp.orig	2019-07-06 12:41:25.523375960 -0700
++++ ./src/ui/interface.cpp	2019-07-06 12:42:09.515534108 -0700
+@@ -733,11 +733,13 @@
+ 		case SDLK_SLASH:
+ 		case SDLK_BACKSLASH:
+ 			if (KeyModifiers & ModifierAlt) {
++#if defined(USE_OPENGL) || defined(USE_GLES)
+ 				if (GLShaderPipelineSupported) {
+ 					char shadername[1024] = { '\0' };
+ 					LoadShaders(key == SDLK_SLASH ? 1 : -1, shadername);
+ 					SetMessage("%s", shadername);
+ 				}
++#endif
+ 			}
+ 			break;
+ 
diff --git a/stratagus/patches/patch-src_video_graphic.cpp b/stratagus/patches/patch-src_video_graphic.cpp
new file mode 100644
index 0000000000..d9e00b577c
--- /dev/null
+++ b/stratagus/patches/patch-src_video_graphic.cpp
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+Don't assume that we've enabled OpenGL support.
+
+--- ./src/video/graphic.cpp.orig	2019-07-06 12:48:14.597944334 -0700
++++ ./src/video/graphic.cpp	2019-07-06 13:01:30.326334963 -0700
+@@ -1648,7 +1648,8 @@
+ 	}
+ }
+ 
+-bool CGraphic::DeleteColorCyclingTextures() {
++#if defined(USE_OPENGL) || defined(USE_GLES)
++bool DeleteColorCyclingTextures() {
+ 	if (!ColorCyclingTextures) return false;
+ 	for (int i = 0; i < NumColorCycles; i++) {
+ 		glDeleteTextures(NumTextures, ColorCyclingTextures[i]);
+@@ -1658,5 +1659,6 @@
+ 	ColorCyclingTextures = NULL;
+ 	return true;
+ }
++#endif
+ 
+ //@}
diff --git a/stratagus/patches/patch-src_video_sdl.cpp b/stratagus/patches/patch-src_video_sdl.cpp
new file mode 100644
index 0000000000..472e244e03
--- /dev/null
+++ b/stratagus/patches/patch-src_video_sdl.cpp
@@ -0,0 +1,21 @@
+# $NetBSD$
+
+Don't assume that we've enabled OpenGL support.
+
+--- ./src/video/sdl.cpp.orig	2019-07-06 13:08:50.493609592 -0700
++++ ./src/video/sdl.cpp	2019-07-06 13:09:05.285127661 -0700
+@@ -639,12 +639,14 @@
+ 	if (TheScreen == NULL) {
+ 		fprintf(stderr, "Couldn't set %dx%dx%d video mode: %s\n",
+ 				Video.Width, Video.Height, Video.Depth, SDL_GetError());
++#if defined(USE_OPENGL) || defined(USE_GLES)
+ 		if (UseOpenGL) {
+ 			fprintf(stderr, "Re-trying video without OpenGL\n");
+ 			UseOpenGL = false;
+ 			InitVideoSdl();
+ 			return;
+ 		}
++#endif
+ 		if (Video.FullScreen) {
+ 			fprintf(stderr, "Re-trying video without fullscreen mode\n");
+ 			Video.FullScreen = false;
diff --git a/stratagus/patches/patch-src_video_video.cpp b/stratagus/patches/patch-src_video_video.cpp
new file mode 100644
index 0000000000..c3ea9990a6
--- /dev/null
+++ b/stratagus/patches/patch-src_video_video.cpp
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+Don't assume that we've enabled OpenGL support.
+
+--- ./src/video/video.cpp.orig	2019-07-06 13:04:36.686202361 -0700
++++ ./src/video/video.cpp	2019-07-06 13:04:46.356626653 -0700
+@@ -394,11 +394,13 @@
+ 
+ void SetColorCycleAll(bool value)
+ {
++#if defined(USE_OPENGL) || defined(USE_GLES)
+ 	if (UseOpenGL) {
+ 		// FIXME: In OpenGL-mode, we can only cycle the tileset graphic
+ 		return;
+ 	}
+ 	CColorCycling::GetInstance().ColorCycleAll = value;
++#endif
+ }
+ 
+ /**


Home | Main Index | Thread Index | Old Index