- Add mirror for distfile

- Use standard CC-BY-NC-SA-3.0 license
- Add gl to USE_GL
- Remove bsd.port.options.mk include
- Use new options helpers
- Use EXTRACT_* variables for post-extract target
- Use POST_PLIST for build-plist-empty target

PR:		215539
Submitted by:	lightside@gmx.com (maintainer)
This commit is contained in:
Dmitry Marakasov 2016-12-26 11:12:53 +00:00
parent ed07556941
commit 4ceb5bd553
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=429491

View file

@ -9,87 +9,77 @@ MASTER_SITES= http://diaspora.fs2downloads.com/ \
http://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/:intfiles \ http://ftp.internat.freebsd.org/pub/FreeBSD/distfiles/:intfiles \
http://ftp.tw.freebsd.org/distfiles/:twfiles http://ftp.tw.freebsd.org/distfiles/:twfiles
DISTFILES= Diaspora_R1_Linux.tar.lzma:freespacemods,DEFAULT \ DISTFILES= Diaspora_R1_Linux.tar.lzma:freespacemods,DEFAULT \
Diaspora_R1_Patch_1.1.tar.lzma:intfiles,twfiles \ Diaspora_R1_Patch_1.1.tar.lzma:intfiles,twfiles,DEFAULT \
Diaspora_R1_Patch_1.1.1.tar.lzma Diaspora_R1_Patch_1.1.1.tar.lzma
MAINTAINER= lightside@gmx.com MAINTAINER= lightside@gmx.com
COMMENT= Single and multiplayer space fighter combat game COMMENT= Single and multiplayer space fighter combat game
LICENSE= CCBYNCSAv3 VOLITION GPLv2 LICENSE= CC-BY-NC-SA-3.0 VOLITION GPLv2
LICENSE_COMB= multi LICENSE_COMB= multi
LICENSE_NAME_CCBYNCSAv3= Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license
LICENSE_NAME_VOLITION= Volition license LICENSE_NAME_VOLITION= Volition license
LICENSE_FILE_CCBYNCSAv3= ${WRKDIR_DIASPORA}/License.txt LICENSE_FILE_CC-BY-NC-SA-3.0= ${WRKDIR_DIASPORA}/License.txt
LICENSE_FILE_VOLITION= ${WRKSRC}/COPYING LICENSE_FILE_VOLITION= ${WRKSRC}/COPYING
LICENSE_FILE_GPLv2= ${WRKDIR_DIASPORA}/wxlauncher/GPLv2.txt LICENSE_FILE_GPLv2= ${WRKDIR_DIASPORA}/wxlauncher/GPLv2.txt
LICENSE_PERMS_CCBYNCSAv3= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
LICENSE_PERMS_VOLITION= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept LICENSE_PERMS_VOLITION= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
LIB_DEPENDS+= libjansson.so:devel/jansson \ LIB_DEPENDS= libjansson.so:devel/jansson \
libpng.so:graphics/png \ libpng.so:graphics/png \
libogg.so:audio/libogg \ libogg.so:audio/libogg \
libvorbisfile.so:audio/libvorbis \ libvorbisfile.so:audio/libvorbis \
libtheora.so:multimedia/libtheora libtheora.so:multimedia/libtheora
USES= autoreconf jpeg lua:51 openal pkgconfig tar:lzma USES= autoreconf jpeg lua:51 openal pkgconfig tar:lzma
USE_GL= yes USE_GL= gl glu
USE_SDL= sdl USE_SDL= sdl
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
WRKDIR_DIASPORA= ${WRKDIR}/Diaspora_R1_Linux/Diaspora WRKDIR_DIASPORA=${WRKDIR}/Diaspora_R1_Linux/Diaspora
WRKSRC= ${WRKDIR_DIASPORA}/fs2_open WRKSRC= ${WRKDIR_DIASPORA}/fs2_open
PORTDATA= data *.vp PORTDATA= data *.vp
PORTDOCS= * PORTDOCS= *
SUB_FILES= fs2_open_${PORTNAME} SUB_FILES= fs2_open_${PORTNAME}
PLIST_FILES+= bin/fs2_open_${PORTNAME} \ PLIST_FILES= bin/fs2_open_${PORTNAME} \
libexec/fs2_open_${PORTNAME} \ libexec/fs2_open_${PORTNAME} \
share/pixmaps/${PORTNAME}.png share/pixmaps/${PORTNAME}.png
DESKTOP_ENTRIES= "Diaspora" "${COMMENT}" \ DESKTOP_ENTRIES="Diaspora" "${COMMENT}" \
"${PORTNAME}" "fs2_open_${PORTNAME}" \ "${PORTNAME}" "fs2_open_${PORTNAME}" \
"Game;Simulation;" false "Game;Simulation;" false
OPTIONS_DEFINE= DOCS INCJOYBTNS SPEECH WXLAUNCHER OPTIONS_DEFINE= DOCS INCJOYBTNS SPEECH WXLAUNCHER
OPTIONS_DEFAULT= SPEECH WXLAUNCHER OPTIONS_DEFAULT= SPEECH WXLAUNCHER
INCJOYBTNS_DESC= Increase a number of joystick buttons from 32 to 98 INCJOYBTNS_DESC= Increase a number of joystick buttons from 32 to 98
INCJOYBTNS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-increase_joy_buttons_fixed.patch INCJOYBTNS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-increase_joy_buttons_fixed.patch
SPEECH_DESC= Text to speech SPEECH_DESC= Text to speech
SPEECH_CONFIGURE_ENABLE= speech SPEECH_CONFIGURE_ENABLE= speech
WXLAUNCHER_DESC= Use wxlauncher to manage application profile WXLAUNCHER_DESC= Use wxlauncher to manage application profile
WXLAUNCHER_DESKTOP_ENTRIES= "Diaspora Launcher" "${COMMENT}" \
"${PORTNAME}" "fs2_open_${PORTNAME}_launcher" \
"Game;Simulation;" false
WXLAUNCHER_PLIST_FILES= bin/fs2_open_${PORTNAME}_launcher \
%%DATADIR%%/fs2_open_${PORTNAME}
WXLAUNCHER_RUN_DEPENDS= wxlauncher:games/wxlauncher WXLAUNCHER_RUN_DEPENDS= wxlauncher:games/wxlauncher
WXLAUNCHER_SUB_FILES= fs2_open_${PORTNAME}_launcher
WXLAUNCHER_VARS= PORTDATA+="resources *.ini *.png *.bmp"
.include <bsd.port.options.mk> POST_PLIST+= build-plist-empty
.if ${PORT_OPTIONS:MWXLAUNCHER}
PORTDATA+= resources *.ini *.png *.bmp
SUB_FILES+= fs2_open_${PORTNAME}_launcher
PLIST_FILES+= bin/fs2_open_${PORTNAME}_launcher \
%%DATADIR%%/fs2_open_${PORTNAME}
DESKTOP_ENTRIES+= "Diaspora Launcher" "${COMMENT}" \
"${PORTNAME}" "fs2_open_${PORTNAME}_launcher" \
"Game;Simulation;" false
.endif
post-extract: .SILENT post-extract: .SILENT
.for v in 1.1 1.1.1 .for v in 1.1 1.1.1
(cd ${WRKDIR} && tar -xf Patch_Files.${v}.tar -C ${WRKDIR_DIASPORA} && \ (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${RM} Patch_Files.${v}.tar) Patch_Files.${v}.tar ${EXTRACT_AFTER_ARGS} -C ${WRKDIR_DIASPORA} \
&& ${RM} Patch_Files.${v}.tar)
.endfor .endfor
.if ${PORT_OPTIONS:MWXLAUNCHER}
post-extract-WXLAUNCHER-on: .SILENT
(cd ${WRKDIR_DIASPORA} && ${CP} -f pro00099.template.ini pro00099.ini) (cd ${WRKDIR_DIASPORA} && ${CP} -f pro00099.template.ini pro00099.ini)
# Backup data/cmdline_fso.cfg, because executable might merge it with # Backup data/cmdline_fso.cfg, because executable might merge it with
# user settings # user settings
(cd ${WRKDIR_DIASPORA}/data && ${MV} -f cmdline_fso.cfg cmdline_fso.cfg.bak) (cd ${WRKDIR_DIASPORA}/data && ${MV} -f cmdline_fso.cfg cmdline_fso.cfg.bak)
.endif
post-patch: .SILENT post-patch: .SILENT
.if ${PORT_OPTIONS:MWXLAUNCHER}
${REINPLACE_CMD} -e \
's|/PATH/TO/YOUR/DIASPORA/FOLDER/HERE|${DATADIR}|' \
${WRKDIR_DIASPORA}/pro00099.ini
.endif
${REINPLACE_CMD} -e '/^AC_INIT/s/3\.7\.1/${PORTNAME}/ ; \ ${REINPLACE_CMD} -e '/^AC_INIT/s/3\.7\.1/${PORTNAME}/ ; \
s/freebsd/${OPSYS:tl}/ ; \ s/freebsd/${OPSYS:tl}/ ; \
s/ -m64 -march=athlon64 -ansi// ; \ s/ -m64 -march=athlon64 -ansi// ; \
@ -98,6 +88,11 @@ post-patch: .SILENT
${REINPLACE_CMD} -e 's|(640x480)x16|(1024x768)x32|' \ ${REINPLACE_CMD} -e 's|(640x480)x16|(1024x768)x32|' \
${BUILD_WRKSRC}/code/osapi/osapi_unix.cpp ${BUILD_WRKSRC}/code/osapi/osapi_unix.cpp
post-patch-WXLAUNCHER-on: .SILENT
${REINPLACE_CMD} -e \
's|/PATH/TO/YOUR/DIASPORA/FOLDER/HERE|${DATADIR}|' \
${WRKDIR_DIASPORA}/pro00099.ini
do-install: do-install:
${INSTALL_SCRIPT} ${WRKDIR}/fs2_open_${PORTNAME} \ ${INSTALL_SCRIPT} ${WRKDIR}/fs2_open_${PORTNAME} \
${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/bin
@ -105,21 +100,21 @@ do-install:
${STAGEDIR}${PREFIX}/libexec ${STAGEDIR}${PREFIX}/libexec
(cd ${WRKDIR_DIASPORA} && ${COPYTREE_SHARE} "${PORTDATA}" \ (cd ${WRKDIR_DIASPORA} && ${COPYTREE_SHARE} "${PORTDATA}" \
${STAGEDIR}${DATADIR}) ${STAGEDIR}${DATADIR})
${INSTALL_DATA} ${WRKDIR_DIASPORA}/resources/modimg.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
do-install-DOCS-on:
(cd ${WRKDIR} && ${COPYTREE_SHARE} "README*.txt" ${STAGEDIR}${DOCSDIR}) (cd ${WRKDIR} && ${COPYTREE_SHARE} "README*.txt" ${STAGEDIR}${DOCSDIR})
(cd ${WRKDIR_DIASPORA} && ${COPYTREE_SHARE} "*.pdf *.rtf README.txt" \ (cd ${WRKDIR_DIASPORA} && ${COPYTREE_SHARE} "*.pdf *.rtf README.txt" \
${STAGEDIR}${DOCSDIR}) ${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC} && ${COPYTREE_SHARE} "AUTHORS ChangeLog" \ (cd ${WRKSRC} && ${COPYTREE_SHARE} "AUTHORS ChangeLog" \
${STAGEDIR}${DOCSDIR}) ${STAGEDIR}${DOCSDIR})
${INSTALL_DATA} ${WRKDIR_DIASPORA}/resources/modimg.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png do-install-WXLAUNCHER-on:
.if ${PORT_OPTIONS:MWXLAUNCHER}
${INSTALL_SCRIPT} ${WRKDIR}/fs2_open_${PORTNAME}_launcher \ ${INSTALL_SCRIPT} ${WRKDIR}/fs2_open_${PORTNAME}_launcher \
${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/bin
# Create a symbolic link, which used by launcher # Create a symbolic link, which used by launcher
${LN} -sf ${PREFIX}/libexec/fs2_open_${PORTNAME} ${STAGEDIR}${DATADIR} ${LN} -sf ${PREFIX}/libexec/fs2_open_${PORTNAME} ${STAGEDIR}${DATADIR}
.endif
add-plist-post: build-plist-empty
build-plist-empty: .SILENT build-plist-empty: .SILENT
# Add required empty directories to TMPPLIST # Add required empty directories to TMPPLIST