pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
OpenTESArena: import OpenTESArena-0.8.0 as wip/OpenTESArena
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Mon Sep 24 22:04:23 2018 +0200
Changeset: 6cf8c74d5258cd8feaa86342974f3c13de0903cd
Modified Files:
Makefile
Added Files:
OpenTESArena/DESCR
OpenTESArena/Makefile
OpenTESArena/PLIST
OpenTESArena/distinfo
OpenTESArena/patches/patch-OpenTESArena_src_Interface_ProvinceMapPanel.cpp
OpenTESArena/patches/patch-OpenTESArena_src_Interface_TextCinematicPanel.cpp
OpenTESArena/patches/patch-OpenTESArena_src_Utilities_Platform.cpp
Log Message:
OpenTESArena: import OpenTESArena-0.8.0 as wip/OpenTESArena
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6cf8c74d5258cd8feaa86342974f3c13de0903cd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
OpenTESArena/DESCR | 5 +++
OpenTESArena/Makefile | 40 ++++++++++++++++++++++
OpenTESArena/PLIST | 6 ++++
OpenTESArena/distinfo | 9 +++++
...OpenTESArena_src_Interface_ProvinceMapPanel.cpp | 17 +++++++++
...enTESArena_src_Interface_TextCinematicPanel.cpp | 15 ++++++++
.../patch-OpenTESArena_src_Utilities_Platform.cpp | 28 +++++++++++++++
8 files changed, 121 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index ebe0982b75..ccc7e19fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@ SUBDIR+= MesaLib-dfbsd
SUBDIR+= MoleInvasion
SUBDIR+= OpenGLUT
SUBDIR+= OpenIPMI
+SUBDIR+= OpenTESArena
SUBDIR+= PHPUnit
SUBDIR+= PPower4
SUBDIR+= PatternPaint
diff --git a/OpenTESArena/DESCR b/OpenTESArena/DESCR
new file mode 100644
index 0000000000..83086f00c0
--- /dev/null
+++ b/OpenTESArena/DESCR
@@ -0,0 +1,5 @@
+This open-source project aims to be a modern engine re-implementation
+for "The Elder Scrolls: Arena" by Bethesda Softworks.
+
+The game data is needed to run the game, see share/doc/OpenTESArena/README.md
+for information on how to obtain the game data.
diff --git a/OpenTESArena/Makefile b/OpenTESArena/Makefile
new file mode 100644
index 0000000000..cc55beeaf7
--- /dev/null
+++ b/OpenTESArena/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD$
+
+GITHUB_PROJECT= OpenTESArena
+DISTNAME= ${GITHUB_TAG}
+PKGNAME= ${GITHUB_PROJECT}-0.8.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=afritz1/}
+DIST_SUBDIR= ${GITHUB_PROJECT}
+GITHUB_TAG= opentesarena-${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/afritz1/OpenTESArena/
+COMMENT= Open-source re-implementation of The Elder Scrolls: Arena
+LICENSE= mit
+
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+SUBST_CLASSES+= search-path
+SUBST_STAGE.search-path= pre-configure
+SUBST_MESSAGE.search-path= Search for files in PREFIX.
+SUBST_FILES.search-path+= OpenTESArena/src/Utilities/Platform.cpp
+SUBST_SED.search-path= -e 's,@@PKGSRC_DATA_DIR@@,${PREFIX}/share/OpenTESArena/,g'
+
+INSTALLATION_DIRS+= bin
+INSTALLATION_DIRS+= share/doc/OpenTESArena
+INSTALLATION_DIRS+= share/OpenTESArena/data/text
+INSTALLATION_DIRS+= share/OpenTESArena/options
+
+do-install:
+ ${INSTALL_GAME} ${WRKSRC}/TESArena ${DESTDIR}${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/OpenTESArena/
+ ${INSTALL_DATA} ${WRKSRC}/data/*.* ${DESTDIR}${PREFIX}/share/OpenTESArena/data/
+ ${INSTALL_DATA} ${WRKSRC}/data/text/*.* ${DESTDIR}${PREFIX}/share/OpenTESArena/data/text/
+ ${INSTALL_DATA} ${WRKSRC}/options/*.* ${DESTDIR}${PREFIX}/share/OpenTESArena/options/
+
+.include "../../audio/libwildmidi/buildlink3.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/OpenTESArena/PLIST b/OpenTESArena/PLIST
new file mode 100644
index 0000000000..74ad1b4d63
--- /dev/null
+++ b/OpenTESArena/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD$
+bin/TESArena
+share/OpenTESArena/data/icon.bmp
+share/OpenTESArena/data/text/aExeStrings.txt
+share/OpenTESArena/options/options-default.txt
+share/doc/OpenTESArena/README.md
diff --git a/OpenTESArena/distinfo b/OpenTESArena/distinfo
new file mode 100644
index 0000000000..771fc5e034
--- /dev/null
+++ b/OpenTESArena/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (OpenTESArena/opentesarena-0.8.0.tar.gz) = 6f74e8ae44de41bf50597ef230258eb22d96ce90
+RMD160 (OpenTESArena/opentesarena-0.8.0.tar.gz) = 5db4c46fd5ed683b49549ebb7b6c0b85771e13fb
+SHA512 (OpenTESArena/opentesarena-0.8.0.tar.gz) = c81f27e88fb44ac481bf5d34a49a0d841d51b97c51206a3b374b852dd2e5a76d542bf1899e767b9ab7ae93ceceb82a2c3e21220ed4ff6800c08e1f3421d582fd
+Size (OpenTESArena/opentesarena-0.8.0.tar.gz) = 3874829 bytes
+SHA1 (patch-OpenTESArena_src_Interface_ProvinceMapPanel.cpp) = 175f7e2527d90e65414d56d2ed886d025947e386
+SHA1 (patch-OpenTESArena_src_Interface_TextCinematicPanel.cpp) = 40598c6f15038bcaf785a4ab3fe6c187bd6361c8
+SHA1 (patch-OpenTESArena_src_Utilities_Platform.cpp) = ca299fe19539227e19cdc4285a841c0dcc24739e
diff --git a/OpenTESArena/patches/patch-OpenTESArena_src_Interface_ProvinceMapPanel.cpp b/OpenTESArena/patches/patch-OpenTESArena_src_Interface_ProvinceMapPanel.cpp
new file mode 100644
index 0000000000..55aa057def
--- /dev/null
+++ b/OpenTESArena/patches/patch-OpenTESArena_src_Interface_ProvinceMapPanel.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Work around std::sqrt not defined.
+
+--- OpenTESArena/src/Interface/ProvinceMapPanel.cpp.orig 2018-09-23 18:19:37.000000000 +0000
++++ OpenTESArena/src/Interface/ProvinceMapPanel.cpp
+@@ -353,8 +353,8 @@ int ProvinceMapPanel::getClosestLocation
+ {
+ const Int2 diff = point - originalPosition;
+ const Int2 closestDiff = closestPosition - originalPosition;
+- const double distance = std::sqrt((diff.x * diff.x) + (diff.y * diff.y));
+- const double closestDistance = std::sqrt(
++ const double distance = sqrt((diff.x * diff.x) + (diff.y * diff.y));
++ const double closestDistance = sqrt(
+ (closestDiff.x * closestDiff.x) + (closestDiff.y * closestDiff.y));
+ return distance < closestDistance;
+ };
diff --git a/OpenTESArena/patches/patch-OpenTESArena_src_Interface_TextCinematicPanel.cpp b/OpenTESArena/patches/patch-OpenTESArena_src_Interface_TextCinematicPanel.cpp
new file mode 100644
index 0000000000..3f98e76f44
--- /dev/null
+++ b/OpenTESArena/patches/patch-OpenTESArena_src_Interface_TextCinematicPanel.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Work around std::ceil not defined.
+
+--- OpenTESArena/src/Interface/TextCinematicPanel.cpp.orig 2017-12-28 01:36:36.000000000 +0000
++++ OpenTESArena/src/Interface/TextCinematicPanel.cpp
+@@ -43,7 +43,7 @@ TextCinematicPanel::TextCinematicPanel(G
+
+ // Group up to three text lines per text box.
+ std::vector<std::unique_ptr<TextBox>> textBoxes;
+- int textBoxesToMake = static_cast<int>(std::ceil(newLineCount / 3)) + 1;
++ int textBoxesToMake = static_cast<int>(ceil(newLineCount / 3)) + 1;
+ for (int i = 0; i < textBoxesToMake; i++)
+ {
+ std::string textBoxText;
diff --git a/OpenTESArena/patches/patch-OpenTESArena_src_Utilities_Platform.cpp b/OpenTESArena/patches/patch-OpenTESArena_src_Utilities_Platform.cpp
new file mode 100644
index 0000000000..66c83b5818
--- /dev/null
+++ b/OpenTESArena/patches/patch-OpenTESArena_src_Utilities_Platform.cpp
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Return the pkgsrc data directory as the base path to search for files.
+Use XDG directories on the BSDs as well.
+
+It does not look like SDL2 reports the DragonFlyBSD platform?
+
+--- OpenTESArena/src/Utilities/Platform.cpp.orig 2018-09-23 18:19:37.000000000 +0000
++++ OpenTESArena/src/Utilities/Platform.cpp
+@@ -45,6 +45,8 @@ std::string Platform::getPlatform()
+
+ std::string Platform::getBasePath()
+ {
++ return "@@PKGSRC_DATA_DIR@@";
++
+ // Allocate the base path from SDL.
+ char *basePathPtr = SDL_GetBasePath();
+
+@@ -82,7 +84,8 @@ std::string Platform::getOptionsPath()
+ // Convert Windows backslashes to forward slashes.
+ return String::replace(optionsPathString, '\\', '/');
+ }
+- else if (platform == "Linux")
++ /* DragonFlyBSD ? */
++ else if (platform == "Linux" || platform == "FreeBSD" || platform == "NetBSD" || platform == "OpenBSD")
+ {
+ return Platform::getXDGConfigHomeEnv() + "/OpenTESArena/options/";
+ }
Home |
Main Index |
Thread Index |
Old Index