summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/uqm/DESCR7
-rw-r--r--games/uqm/Makefile70
-rw-r--r--games/uqm/PLIST6
-rw-r--r--games/uqm/distinfo9
-rw-r--r--games/uqm/patches/patch-build_unix_build__functions48
5 files changed, 140 insertions, 0 deletions
diff --git a/games/uqm/DESCR b/games/uqm/DESCR
new file mode 100644
index 00000000000..f803b895c12
--- /dev/null
+++ b/games/uqm/DESCR
@@ -0,0 +1,7 @@
+Ur-Quan Masters is a port of the original Star Control 2 for 3DO Consoles.
+
+The project started in August 2002, when Toys For Bob released the partially
+ported sources of Star Control 2 3DO version to the fan community. Our goal
+is to port this wonderful game to current personal computers and operating
+systems. It is and will remain 100% free of charge, and anyone can contribute
+to the project and thus help make it even better.
diff --git a/games/uqm/Makefile b/games/uqm/Makefile
new file mode 100644
index 00000000000..80311884c2f
--- /dev/null
+++ b/games/uqm/Makefile
@@ -0,0 +1,70 @@
+# $NetBSD: Makefile,v 1.1 2013/01/05 22:19:19 wiz Exp $
+#
+
+DISTNAME= uqm-0.7.0-source
+PKGNAME= ${DISTNAME:S/-source//}
+PKGREVISION= 1
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sc2/}
+EXTRACT_SUFX= .tgz
+DISTFILES= ${DEFAULT_DISTFILES} uqm-0.7.0-content.uqm
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://sc2.sourceforge.net/
+COMMENT= Ur-Quan Masters
+# GPL and Creative Commons Attribution-NonCommercial-ShareAlike 2.5
+# At the moment cc-by-nc-sa-2.5v-license is not present in pkgsrc/licenses/,
+# this is why LICENSE is commented out.
+#LICENSE= gnu-gpl-v2 AND cc-by-nc-sa-2.5v-license
+
+DIST_SUBDIR= uqm
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+USE_TOOLS= gmake pkg-config
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
+
+# Do not ignore custom CFLAGS and LDFLAGS
+SUBST_CLASSES+= build
+SUBST_STAGE.build= pre-configure
+SUBST_MESSAGE.build= Fixing build.vars.in
+SUBST_FILES.build= build.vars.in
+SUBST_SED.build+= -e '/CFLAGS/ s;@CFLAGS@;${CFLAGS:Q} @CFLAGS@;'
+SUBST_SED.build+= -e '/LDFLAGS/ s;@LDFLAGS@;${LDFLAGS:Q} @LDFLAGS@;'
+
+# The procedure described in ${WRKSRC}/build/unix/README.packages
+# to make the configure process non-interactive does not work so as a
+# workaround we comment out the sh(1) read built-in command.
+SUBST_CLASSES+= nomenu
+SUBST_STAGE.nomenu= pre-configure
+SUBST_MESSAGE.nomenu= Make configure process non-interactive.
+SUBST_FILES.nomenu= build/unix/menu_functions
+SUBST_SED.nomenu+= -e 's/read /\#read /'
+
+SUBST_CLASSES+= config
+SUBST_STAGE.config= post-configure
+SUBST_MESSAGE.config= Fixing config.state.
+SUBST_FILES.config= config.state
+SUBST_SED.config+= -e 's;opengl;pure;' # Disable OpenGL support
+SUBST_SED.config+= -e 's;/usr/local/games;${PREFIX};'
+
+INSTALLATION_DIRS= bin lib/uqm share/uqm/content/packages share/doc/uqm
+
+do-configure:
+ cd ${WRKSRC} && ./build.sh uqm config
+
+do-build:
+ cd ${WRKSRC} && ./build.sh uqm reprocess_config && ./build.sh uqm
+
+do-install:
+ cd ${WRKSRC} && env DESTDIR=${DESTDIR} ./build.sh uqm install
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/uqm-0.7.0-content.uqm \
+ ${DESTDIR}${PREFIX}/share/uqm/content/packages
+ ${INSTALL_DATA} ${WRKSRC}/doc/users/manual.txt \
+ ${DESTDIR}${PREFIX}/share/doc/uqm
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../audio/libmikmod/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../graphics/SDL_image/buildlink3.mk"
+.include "../../multimedia/libogg/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/uqm/PLIST b/games/uqm/PLIST
new file mode 100644
index 00000000000..4a8b20cac71
--- /dev/null
+++ b/games/uqm/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1 2013/01/05 22:19:19 wiz Exp $
+bin/uqm
+lib/uqm/uqm
+share/doc/uqm/manual.txt
+share/uqm/content/packages/${PKGNAME}-content.uqm
+share/uqm/content/version
diff --git a/games/uqm/distinfo b/games/uqm/distinfo
new file mode 100644
index 00000000000..8f83354acd4
--- /dev/null
+++ b/games/uqm/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2013/01/05 22:19:19 wiz Exp $
+
+SHA1 (uqm/uqm-0.7.0-content.uqm) = 2dea07390708790779ae25886e9331b5eb0bdf68
+RMD160 (uqm/uqm-0.7.0-content.uqm) = 92d0e6bde471fd3c6b9147211f09263c1a9482f7
+Size (uqm/uqm-0.7.0-content.uqm) = 11538533 bytes
+SHA1 (uqm/uqm-0.7.0-source.tgz) = 55e5257690650e63f131024ab8fdfdddcf5627bc
+RMD160 (uqm/uqm-0.7.0-source.tgz) = b760ad256075e4e225e44e5a738a013a9a5e6483
+Size (uqm/uqm-0.7.0-source.tgz) = 1562003 bytes
+SHA1 (patch-build_unix_build__functions) = 373f53c2b1da5def252e212af077f7fdb4505f75
diff --git a/games/uqm/patches/patch-build_unix_build__functions b/games/uqm/patches/patch-build_unix_build__functions
new file mode 100644
index 00000000000..af51a2e13e3
--- /dev/null
+++ b/games/uqm/patches/patch-build_unix_build__functions
@@ -0,0 +1,48 @@
+$NetBSD: patch-build_unix_build__functions,v 1.1 2013/01/05 22:19:19 wiz Exp $
+
+Add DESTDIR support.
+
+--- build/unix/build_functions.orig 2011-05-20 19:25:22.000000000 +0000
++++ build/unix/build_functions
+@@ -221,30 +221,30 @@ mkdirhier() {
+ # $3 - Mode of destination file/directory
+ # $4 - Owner of destination file/directory
+ installsome() {
+- local SRC DEST MODE OWNDER DESTDIR SRCNAME
++ local SRC DEST MODE OWNDER DESTH SRCNAME
+ SRC="$1"
+ DEST="$2"
+ MODE="$3"
+ OWNDER="$4"
+
+- DESTDIR="${DEST%/*}"
+- if [ ! -d "$DESTDIR" ]; then
+- mkdirhier "$DESTDIR" 0755
++ DESTH="${DEST%/*}"
++ if [ ! -d "${DESTDIR}${DESTH}" ]; then
++ mkdirhier "${DESTDIR}${DESTH}" 0755
+ fi
+ SRCNAME="${SRC##*/}"
+- cp -pr -- "$SRC" "$DEST"
++ cp -pr -- "$SRC" "${DESTDIR}${DEST}"
+ if [ -n "$MODE" ]; then
+- if [ -d "$DEST" ]; then
+- chmod -R "$MODE" "${DEST}${SRCNAME}"
++ if [ -d "${DESTDIR}${DEST}" ]; then
++ chmod -R "$MODE" "${DESTDIR}${DEST}${SRCNAME}"
+ else
+- chmod "$MODE" "$DEST"
++ chmod "$MODE" "${DESTDIR}${DEST}"
+ fi
+ fi
+ if [ -n "$OWNER" ]; then
+- if [ -d "$DEST" ]; then
+- chown -R "$OWNER" "${DEST}${SRCNAME}"
++ if [ -d "${DESTDIR}${DEST}" ]; then
++ chown -R "$OWNER" "${DESTDIR}${DEST}${SRCNAME}"
+ else
+- chown "$OWNER" "$DEST"
++ chown "$OWNER" "${DESTDIR}${DEST}"
+ fi
+ fi
+ }