Update to unknown-horizons-2019.1

Upstream switched to Python3
This commit is contained in:
kirby 2020-09-11 06:02:30 +00:00
parent fd2e50cee5
commit 482e45681d
5 changed files with 876 additions and 404 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2019/11/07 11:02:40 kmos Exp $
# $OpenBSD: Makefile,v 1.6 2020/09/11 06:02:30 kirby Exp $
COMMENT = economic historical real-time strategy game
MODPY_EGG_VERSION = 2017.2
MODPY_EGG_VERSION = 2019.1
PKGNAME = unknown-horizons-${MODPY_EGG_VERSION}
REVISION = 0
GH_ACCOUNT = unknown-horizons
GH_PROJECT = unknown-horizons
@ -19,18 +18,37 @@ PERMIT_PACKAGE = Yes
MODULES = lang/python \
textproc/intltool
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
MODPY_ADJ_FILES = unknown-horizons
MODPY_PYTEST = Yes
SEPARATE_BUILD = Yes
PORTHOME = ${WRKDIR}
BUILD_DEPENDS = devel/gettext,-tools
BUILD_DEPENDS = devel/gettext,-tools \
devel/py-pathlib${MODPY_FLAVOR} \
graphics/py-Pillow${MODPY_FLAVOR} \
sysutils/py-distro
RUN_DEPENDS = devel/desktop-file-utils \
games/fifengine
TEST_DEPENDS = devel/py-greenlet \
devel/py-mock \
devel/py-nose \
textproc/py-polib \
textproc/py-yaml
devel/py-future${MODPY_FLAVOR} \
games/fifengine>=0.4.2 \
textproc/py-yaml${MODPY_FLAVOR}
TEST_DEPENDS = devel/py-greenlet${MODPY_FLAVOR} \
devel/py-mock${MODPY_FLAVOR} \
devel/py-nose${MODPY_FLAVOR} \
textproc/py-polib${MODPY_FLAVOR} \
textproc/py-yaml${MODPY_FLAVOR}
#https://github.com/unknown-horizons/unknown-horizons/issues/2938
NO_TEST = Yes
post-install:
.for i in actionsets.json atlas.sql tilesets.json
${INSTALL_DATA} ${WRKSRC}/content/$i \
${PREFIX}/share/unknown-horizons/content/
.endfor
${INSTALL_DATA} ${WRKSRC}/content/gfx/atlas/* \
${PREFIX}/share/unknown-horizons/content/gfx/atlas/
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (unknown-horizons-2017.2.tar.gz) = 8185ao+qGpEtnbwSd/ODvXQrrkQMkriR0u+DJb6W0ts=
SIZE (unknown-horizons-2017.2.tar.gz) = 266301163
SHA256 (unknown-horizons-2019.1.tar.gz) = pBf9PTQiEv0ZDk8hvoLvE8EOHtfCiPu+RuRiAM895Ng=
SIZE (unknown-horizons-2019.1.tar.gz) = 266260509

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-horizons_constants_py,v 1.1.1.1 2017/11/04 22:04:24 bentley Exp $
Index: horizons/constants.py
--- horizons/constants.py.orig
+++ horizons/constants.py
@@ -84,10 +84,10 @@ def get_git_version():
##Versioning
class VERSION:
RELEASE_NAME = "Unknown Horizons %s"
- RELEASE_VERSION = get_git_version()
+ #RELEASE_VERSION = get_git_version()
# change for release:
IS_DEV_VERSION = True
- #RELEASE_VERSION = u'2017.2'
+ RELEASE_VERSION = u'2017.2'
REQUIRED_FIFE_MAJOR_VERSION = 0
REQUIRED_FIFE_MINOR_VERSION = 4

View File

@ -1,7 +1,30 @@
$OpenBSD: patch-setup_py,v 1.1.1.1 2017/11/04 22:04:24 bentley Exp $
--- setup.py.orig Wed Jan 18 01:11:17 2017
+++ setup.py Wed Jan 18 01:11:21 2017
@@ -51,7 +51,7 @@ data = [
$OpenBSD: patch-setup_py,v 1.2 2020/09/11 06:02:30 kirby Exp $
Fix build with python3.8.
Upstream commit 2fdb225f62f66bf474e19d9b1bcfbaf691672c43
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -32,6 +32,8 @@ from distutils.core import setup
from distutils.spawn import find_executable
from shutil import copytree, rmtree
+import distro
+
import horizons
from horizons.constants import VERSION
from horizons.ext import polib
@@ -39,7 +41,7 @@ from horizons.ext import polib
# Ensure we are in the correct directory
os.chdir(os.path.realpath(os.path.dirname(__file__)))
-if platform.dist()[0].lower() in ('debian', 'ubuntu'):
+if distro.linux_distribution(full_distribution_name=False)[0] in ('debian', 'mint', 'ubuntu'):
executable_path = 'games'
else:
executable_path = 'bin'
@@ -54,7 +56,7 @@ data = [
(executable_path, ('unknown-horizons', )),
('share/pixmaps', ('content/packages/unknown-horizons.xpm', )),
('share/unknown-horizons', ('content/settings-template.xml', )),
@ -9,4 +32,4 @@ $OpenBSD: patch-setup_py,v 1.1.1.1 2017/11/04 22:04:24 bentley Exp $
+ ('man/man6', ('content/packages/unknown-horizons.6', )),
]
for root, dirs, files in filter(lambda x: len(x[2]), os.walk('content')):
for root, dirs, files in [x for x in os.walk('content') if len(x[2])]:

File diff suppressed because it is too large Load Diff