aboutsummaryrefslogtreecommitdiff
path: root/games/anki
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2021-03-20 08:39:27 +0000
committerKai Knoblich <kai@FreeBSD.org>2021-03-20 08:39:27 +0000
commit97766e4b095aa7be76b6b9896c9c1e7c5b8884d6 (patch)
tree9a1c8f92289f8869a4d9c0a8e16b4ef5673b4146 /games/anki
parentcd7107cf48444a4bad561afc4be302088c4bb93d (diff)
downloadports-97766e4b095aa7be76b6b9896c9c1e7c5b8884d6.tar.gz
ports-97766e4b095aa7be76b6b9896c9c1e7c5b8884d6.zip
games/anki: Fix packaging with Python 3.8
* Add a workaround to make the transition from Python 3.7 to Python 3.8 possible because the name of the .so file is slightly different between the two releases. * Also add CARGO_INSTALL to avoid warnings about ignored duplicate scripts for the target "do-install". PR: 253815
Notes
Notes: svn path=/head/; revision=568854
Diffstat (limited to 'games/anki')
-rw-r--r--games/anki/Makefile13
-rw-r--r--games/anki/pkg-plist2
2 files changed, 13 insertions, 2 deletions
diff --git a/games/anki/Makefile b/games/anki/Makefile
index 95fee447d617..c05e0b1203c5 100644
--- a/games/anki/Makefile
+++ b/games/anki/Makefile
@@ -325,6 +325,7 @@ CARGO_CARGOLOCK= ${WRKSRC}/rspy/Cargo.lock
CARGO_CARGOTOML= ${WRKSRC}/rspy/Cargo.toml
CARGO_BUILD= no
+CARGO_INSTALL= no
MAKE_ARGS= DEVEL="rspy pylib ts qt" PYTHON_FILE="${PYTHON_CMD}" SHELL="${LOCALBASE}/bin/bash"
# devel/py-maturin acts as a wrapper for "cargo" and "rustc". Ensure that it
@@ -334,6 +335,8 @@ MAKE_ENV= ${CARGO_ENV} npm_config_offline=true
ALL_TARGET= build
+PLIST_SUB= _PY_SONAME=${_PY_SONAME}
+
OPTIONS_DEFINE= NLS
OPTIONS_DEFAULT= MPV
OPTIONS_GROUP= PLAYER
@@ -352,6 +355,14 @@ NLS_USES= gettext
# expected.
_MY_BUILDHASH= 84dcaa86
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 3800
+_PY_SONAME= .cpython-${PYTHON_SUFFIX}m
+.else
+_PY_SONAME= ${PYTHON_EXT_SUFFIX}
+.endif
+
# Place the translation files to the appropriate directories
post-extract:
@${RLN} ${WRKSRC_i18ncore} ${WRKSRC}/rslib/ftl/repo
@@ -434,4 +445,4 @@ make-npm-cache:
&& ${TAR} -czf ${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX} .npm \
&& ${ECHO} "Please upload the file ${WRKDIR}/${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX}"
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/anki/pkg-plist b/games/anki/pkg-plist
index 2782547e46ac..48d85612f54d 100644
--- a/games/anki/pkg-plist
+++ b/games/anki/pkg-plist
@@ -138,7 +138,7 @@ man/man1/anki.1.gz
%%DATADIR%%/anki/template_legacy.py
%%DATADIR%%/anki/types.py
%%DATADIR%%/anki/utils.py
-%%DATADIR%%/ankirspy.cpython-%%PYTHON_SUFFIX%%m.so
+%%DATADIR%%/ankirspy%%_PY_SONAME%%.so
%%DATADIR%%/aqt/__init__.py
%%DATADIR%%/aqt/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.opt-1.pyc
%%DATADIR%%/aqt/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc