1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

games/unknown-horizons: update to 2019.1

PR:             216459
Submitted by:   amdmi3
Approved by:    fiziologus@gmail.com (maintainer timeout)
This commit is contained in:
Piotr Kubaj 2020-01-14 16:09:46 +00:00
parent 74a26f5881
commit a49966ff36
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=523026
4 changed files with 70 additions and 6802 deletions

View File

@ -2,61 +2,45 @@
# $FreeBSD$
PORTNAME= unknown-horizons
PORTVERSION= 2013.3
PORTREVISION= 2
PORTVERSION= 2019.1
CATEGORIES= games
MAINTAINER= fiziologus@gmail.com
COMMENT= Real time simulation game
BROKEN= unfetchable
DEPRECATED= Broken, uses EOLed python27
EXPIRATION_DATE= 2020-02-19
LICENSE= GPLv2+
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/doc/licenses/GPL
BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
${LOCALBASE}/bin/xsltproc:textproc/libxslt
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/fife/__init__.py:games/py-fife@${PY_FLAVOR} \
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fife>0:games/py-fife@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
${PYTHON_SITELIBDIR}/yaml/__init__.py:devel/py-yaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}gdbm>0:databases/py-gdbm@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
ONLY_FOR_ARCHS= i386 amd64
USES= gettext-tools gnome python:2.7 shebangfix tar:xz
USES= gettext-tools gnome python:3.5+ shebangfix
USE_GITHUB= yes
USE_GNOME= intltool
USE_PYTHON= distutils
PYDISTUTILS_PKGNAME= UnknownHorizons
USE_PYTHON= autoplist distutils noflavors
SHEBANG_FILES= run_uh.py
NO_ARCH= yes
.include <bsd.port.pre.mk>
OPTIONS_DEFINE= ENET NLS
OPTIONS_DEFAULT= ENET
.if ${ARCH} == i386
ENET_DIR= x86
PLIST_SUB+= X86_ONLY=""
.else
PLIST_SUB+= X86_ONLY="@comment "
.endif
ENET_DESC= Multipliplayer support through pyenet
ENET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyenet>0:net/py-pyenet@${PY_FLAVOR}
.if ${ARCH} == amd64
ENET_DIR= x64
PLIST_SUB+= X64_ONLY=""
.else
PLIST_SUB+= X64_ONLY="@comment "
.endif
post-patch-ENET-off:
@${REINPLACE_CMD} -e 's|import enet|return None|' ${WRKSRC}/horizons/network/__init__.py
post-patch:
@${REINPLACE_CMD} -e "s|http://docbook.sourceforge.net/release/xsl/current|${LOCALBASE}/share/xsl/docbook|" \
-e "s|share/man/man6|man/man6|" ${WRKSRC}/setup.py
post-patch-NLS-off:
@${REINPLACE_CMD} -e '/build.sub_commands.append.*build_i18n/ d' ${WRKSRC}/setup.py
# Install multiplayer lib (enet+pyenet)
post-install:
@${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/horizons/network/libs/freebsd-${ENET_DIR}
${INSTALL_LIB} ${WRKSRC}/horizons/network/libs/freebsd-${ENET_DIR}/enet.so \
${STAGEDIR}${PYTHON_SITELIBDIR}/horizons/network/libs/freebsd-${ENET_DIR}/enet.so
# (rene) prune unwanted files to pass 'make check-plist'
@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/UnknownHorizons-_unknown_-py${PYTHON_VER}.egg-info
do-build:
cd ${WRKSRC} && ${SETENV} UH_USER_DIR=${WRKSRC} ${PYTHON_CMD} horizons/engine/generate_atlases.py 2048
.include <bsd.port.post.mk>
post-install-NLS-off:
@${RM} -r ${STAGEDIR}${PREFIX}/share/locale
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (unknown-horizons-unknown-horizons-2013.3_GH0.tar.gz) = db9ffe365aa0be95bb808891573d4a135db980ba5a2316f1cf9a30e6505a638e
SIZE (unknown-horizons-unknown-horizons-2013.3_GH0.tar.gz) = 152988408
TIMESTAMP = 1575379586
SHA256 (unknown-horizons-unknown-horizons-2019.1_GH0.tar.gz) = a417fd3d342212fd190e4f21be82ef13c10e1ed7c288fbbe46e46200cf3de4d8
SIZE (unknown-horizons-unknown-horizons-2019.1_GH0.tar.gz) = 266260509

View File

@ -0,0 +1,43 @@
--- setup.py.orig 2019-01-12 15:15:42 UTC
+++ setup.py
@@ -39,7 +39,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 False:
executable_path = 'games'
else:
executable_path = 'bin'
@@ -54,7 +54,7 @@ data = [
(executable_path, ('unknown-horizons', )),
('share/pixmaps', ('content/packages/unknown-horizons.xpm', )),
('share/unknown-horizons', ('content/settings-template.xml', )),
- ('share/man/man6', ('content/packages/unknown-horizons.6', )),
+ ('man/man6', ('content/packages/unknown-horizons.6', )),
]
for root, dirs, files in [x for x in os.walk('content') if len(x[2])]:
@@ -136,13 +136,6 @@ class _build_i18n(distutils.cmd.Command):
targetpath = os.path.join("share/locale", lang, "LC_MESSAGES")
mo_files.append((targetpath, [mo_file]))
- # Write translation stats to file and have it included in package
- stats_filename = os.path.join('content', 'lang', 'stats.json')
- with open(stats_filename, 'w') as f:
- json.dump(translation_stats, f)
-
- self.distribution.data_files.append((os.path.join('share', 'locale'), [stats_filename]))
-
return mo_files
def generate_atlases(self, size):
@@ -228,7 +221,7 @@ class _build_i18n(distutils.cmd.Command):
rmtree(os.path.join("content", "lang"))
copytree(os.path.join("build", "mo"), os.path.join("content", "lang"))
- self.generate_atlases(2048)
+ #self.generate_atlases(2048)
build.sub_commands.append(('build_i18n', None))

File diff suppressed because it is too large Load Diff