pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

thedarkmod: Add a basic do-install stage.



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Tue Apr 16 12:29:23 2019 +0100
Changeset:	c6111cdffe3387fd2cb7b00392a8527711754f57

Modified Files:
	thedarkmod/Makefile
	thedarkmod/PLIST
	thedarkmod/TODO
	thedarkmod/distinfo
	thedarkmod/patches/patch-SConstruct

Log Message:
thedarkmod: Add a basic do-install stage.

Still no automated installation of data files.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c6111cdffe3387fd2cb7b00392a8527711754f57

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 thedarkmod/Makefile                 | 46 +++++++++++++++++++++++++++++--------
 thedarkmod/PLIST                    | 11 +++++++++
 thedarkmod/TODO                     |  1 -
 thedarkmod/distinfo                 |  2 +-
 thedarkmod/patches/patch-SConstruct |  9 ++++++++
 5 files changed, 57 insertions(+), 12 deletions(-)

diffs:
diff --git a/thedarkmod/Makefile b/thedarkmod/Makefile
index b7163582fb..0976cf9d16 100644
--- a/thedarkmod/Makefile
+++ b/thedarkmod/Makefile
@@ -9,7 +9,7 @@ EXTRACT_SUFX=	.7z
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://www.thedarkmod.com/main/
 COMMENT=	First-person stealth video game inspired by the Thief series
-LICENSE=	gnu-gpl-v3
+LICENSE=	gnu-gpl-v3 AND modified-bsd
 
 WRKSRC=		${WRKDIR}
 
@@ -18,12 +18,10 @@ USE_LANGUAGES=	c c++
 GCC_REQD+=	8.0
 PYTHON_VERSIONS_ACCEPTED=	27
 
-CXXFLAGS+=	-Wfatal-errors
+CXXFLAGS+=	-DUSE_FILE32API
 
 .include "../../mk/bsd.prefs.mk"
 
-CXXFLAGS+=	-DUSE_FILE32API
-
 SCONS_ARGS+=	${_MAKE_JOBS}
 
 .if ${MACHINE_ARCH} == "x86_64"
@@ -32,19 +30,47 @@ SCONS_ARGS+=	TARGET_ARCH="x64"
 SCONS_ARGS+=	TARGET_ARCH="x86"
 .endif
 
+BUILD_DEPENDS+=	ImageMagick-[0-9]*:../../graphics/ImageMagick
+
+INSTALLATION_DIRS+=	bin
+INSTALLATION_DIRS+=	libexec
+INSTALLATION_DIRS+=	share/applications
+.for size in 16 32 48 64 128 256
+INSTALLATION_DIRS+=	share/icons/hicolor/${size}x${size}/apps
+.endfor
+INSTALLATION_DIRS+=	share/thedarkmod
+
 do-build:
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
-	CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
-	LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} VERBOSE=1 BUILD="release"
+	    CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
+	    LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} VERBOSE=1 BUILD="release"
+	${PREFIX}/bin/convert ${WRKSRC}/sys/win32/rc/res/darkmod.ico[5] \
+	    ${WRKDIR}/tdm-256.png
+	${PREFIX}/bin/convert ${WRKSRC}/tdm_update/tdm_package/darkmod.ico[4] \
+	    ${WRKDIR}/tdm-128.png
+	${PREFIX}/bin/convert ${WRKSRC}/tdm_update/tdm_package/darkmod.ico[3] \
+	    ${WRKDIR}/tdm-64.png
+	${PREFIX}/bin/convert ${WRKSRC}/tdm_update/tdm_package/darkmod.ico[2] \
+	    ${WRKDIR}/tdm-48.png
+	${PREFIX}/bin/convert ${WRKSRC}/tdm_update/tdm_package/darkmod.ico[1] \
+	    ${WRKDIR}/tdm-32.png
+	${PREFIX}/bin/convert ${WRKSRC}/tdm_update/tdm_package/darkmod.ico[0] \
+	    ${WRKDIR}/tdm-16.png
+	${SED} -e 's,@PREFIX@,${PREFIX},g' < ${FILESDIR}/thedarkmod.sh.in > \
+	    ${WRKDIR}/thedarkmod.sh
 
 do-install:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
-	CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
-	LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} \
-	--prefix=${DESTDIR}${PREFIX} install
+	${INSTALL_SCRIPT} ${WRKDIR}/thedarkmod.sh ${DESTDIR}${PREFIX}/bin/thedarkmod
+	${INSTALL_PROGRAM} ${WRKSRC}/thedarkmod ${DESTDIR}${PREFIX}/libexec
+	${INSTALL_DATA} ${FILESDIR}/thedarkmod.desktop ${DESTDIR}${PREFIX}/share/applications
+.for size in 16 32 48 64 128 256
+	${INSTALL_DATA} ${WRKDIR}/tdm-${size}.png \
+	    ${DESTDIR}${PREFIX}/share/icons/hicolor/${size}x${size}/apps/thedarkmod.png
+.endfor
 
 .include "../../audio/openal-soft/buildlink3.mk"
 .include "../../devel/scons/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk"
 .include "../../multimedia/ffmpeg4/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"
diff --git a/thedarkmod/PLIST b/thedarkmod/PLIST
index e69de29bb2..7485f9e672 100644
--- a/thedarkmod/PLIST
+++ b/thedarkmod/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD$
+bin/thedarkmod.sh
+libexec/thedarkmod
+share/applications/thedarkmod.desktop
+share/icons/hicolor/128x128/apps/thedarkmod.png
+share/icons/hicolor/16x16/apps/thedarkmod.png
+share/icons/hicolor/256x256/apps/thedarkmod.png
+share/icons/hicolor/32x32/apps/thedarkmod.png
+share/icons/hicolor/48x48/apps/thedarkmod.png
+share/icons/hicolor/64x64/apps/thedarkmod.png
+@pkgdir share/thedarkmod
diff --git a/thedarkmod/TODO b/thedarkmod/TODO
index 46d321aef0..654ff77d6f 100644
--- a/thedarkmod/TODO
+++ b/thedarkmod/TODO
@@ -1,4 +1,3 @@
-do-install.
 Include the data files from the mirrors. (http://mirrors.thedarkmod.com/)
 	Not versioned. Probably get installed to ~/thedarkmod, fetch them with a script.
 		Or mirror them for pkgsrc.
diff --git a/thedarkmod/distinfo b/thedarkmod/distinfo
index 13077c2600..cacef63d76 100644
--- a/thedarkmod/distinfo
+++ b/thedarkmod/distinfo
@@ -4,7 +4,7 @@ SHA1 (thedarkmod.2.07.src.7z) = e615af9e67990ed48cee98eb218d389d4b095b4c
 RMD160 (thedarkmod.2.07.src.7z) = 94ded62dcb4a5b0e0b9bcc24e40131ecd4c58b19
 SHA512 (thedarkmod.2.07.src.7z) = e76aba85722af0e496b604a20fb9f33a44867f0179187d018a6f4dcde5a28987913ead473e86aa0810d2b37c198bfaba48c9f5ccc895af0dfc5863baf15e6db4
 Size (thedarkmod.2.07.src.7z) = 52411631 bytes
-SHA1 (patch-SConstruct) = 26e4aef4b00a2bb4f989323952b637ed71ead301
+SHA1 (patch-SConstruct) = e2542ba22f52c51fd215e65c651b064808bfb8d2
 SHA1 (patch-TypeInfo_main.cpp) = ad58a4917b961c48858af61f25c8565dcb50d54f
 SHA1 (patch-game_anim_Anim__Blend.cpp) = 326457af38817439b623dd20679be67779aca3d4
 SHA1 (patch-idlib_bv_Frustum.cpp) = 29ab03477c8689820d0c0543f3a00956557b1c5b
diff --git a/thedarkmod/patches/patch-SConstruct b/thedarkmod/patches/patch-SConstruct
index b0028ed615..1e36fc9804 100644
--- a/thedarkmod/patches/patch-SConstruct
+++ b/thedarkmod/patches/patch-SConstruct
@@ -26,3 +26,12 @@ $NetBSD$
  CORELINKFLAGS = [ ]
  
  # for release build, further optimisations that may not work on all files
+@@ -373,7 +374,7 @@ SConscript( g_build + '/core/glimp/sys/s
+ VariantDir( g_build + '/core', '.', duplicate = 0 )
+ thedarkmod = SConscript( g_build + '/core/sys/scons/SConscript.darkmod' )
+ 
+-exe_name = 'thedarkmod.' + ('x64' if TARGET_ARCH == 'x64' else cpu)
++exe_name = 'thedarkmod'
+ # Note: this target only runs if you append ".." (without quotes) as the last argument to scons command line
+ # It copies executable into ../darkmod, which is default location of darkmod installation in development environment
+ InstallAs( '../darkmod/' + exe_name, thedarkmod )


Home | Main Index | Thread Index | Old Index