summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2018-09-30 19:22:18 +0000
committermaya <maya@pkgsrc.org>2018-09-30 19:22:18 +0000
commitd79afcf9a9d41c6f2efc4ae4d7305df0f73366a7 (patch)
treec1108cb34e09de388eabdbadbfa5033d7959fd4d /mk
parent57c0b62ed9b2b2fad8182a11649ed0de65457eec (diff)
downloadpkgsrc-d79afcf9a9d41c6f2efc4ae4d7305df0f73366a7.tar.gz
Add love.mk, helps generate wrappers to execute LOVE2D games
with the correct LOVE version.
Diffstat (limited to 'mk')
-rw-r--r--mk/love.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/mk/love.mk b/mk/love.mk
new file mode 100644
index 00000000000..4e51dfd0633
--- /dev/null
+++ b/mk/love.mk
@@ -0,0 +1,23 @@
+# $NetBSD: love.mk,v 1.1 2018/09/30 19:22:18 maya Exp $
+#
+# Wrapper for LOVE2D games.
+# Creates launchers for the required version.
+#
+# The following system variables must be defined before:
+# LOVE_GAME Name of the executable created
+# LOVE_DATA .love filename
+# LOVE_VERSION LOVE version to be used. 0.8, 0.9, ..
+
+do-build:
+ ${ECHO} '#!/bin/sh' > ${WRKSRC}/${LOVE_GAME}
+ ${ECHO} '${PREFIX}/love${LOVE_VERSION}/bin/love ${PREFIX}/share/games/${LOVE_DATA}' \
+ >> ${WRKSRC}/${LOVE_GAME}
+
+LOVE_VERSION_NODOT=${LOVE_VERSION:S/.//}
+
+INSTALLATION_DIRS+= bin share/games
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/${LOVE_DATA} ${DESTDIR}${PREFIX}/share/games/${LOVE_DATA}
+ ${INSTALL_SCRIPT} ${WRKSRC}/${LOVE_GAME} ${DESTDIR}${PREFIX}/bin/${LOVE_GAME}
+
+DEPENDS+= love${LOVE_VERSION_NODOT}-[0-9]*:../../wip/love${LOVE_VERSION_NODOT}