1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

Improve the way we use optional high-resolution textures:

- Forget about Milky Way texture for now as it causes rendering artifacts;
- While most of those textures are indeed better than the ones provided by
  default (e.g., Jupiter and Ganymede), some of those are actually worse
  (e.g. Venus).  Use simple file size-based logic to decide if a texture
  is worth a replacement.
This commit is contained in:
Alexey Dokuchaev 2015-01-14 08:51:31 +00:00
parent 7483da328d
commit 99e812ed93
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=377001
4 changed files with 23 additions and 8 deletions

View File

@ -45,7 +45,7 @@ PLIST_SUB+= MORE_STARS="@comment "
.if ${PORT_OPTIONS:MHR_TEXTURES}
MASTER_SITES+= SF/${PORTNAME}/textures:gfx
DISTFILES+= textures-1K.zip:gfx milkyway.zip:gfx # yes, in this order
DISTFILES+= textures-1K.zip:gfx
PLIST_SUB+= TEXTURES=""
.else
PLIST_SUB+= TEXTURES="@comment "
@ -79,7 +79,18 @@ post-install:
${STAGEDIR}${DATADIR}/stars/default
.endif
.if ${PORT_OPTIONS:MHR_TEXTURES}
${INSTALL_DATA} ${WRKDIR}/*.png ${STAGEDIR}${DATADIR}/textures
(cd ${WRKDIR} && for f in *.png; do \
new=`${STAT} -f '%z' $$f` ; \
existing=`${STAT} -qf '%z' \
${STAGEDIR}${DATADIR}/textures/$$f || \
${ECHO_CMD} 0` ; \
${TEST} $$new -gt $$existing && \
${ECHO_CMD} "-- Replacing texture: $$f\
(has larger file size or missing)" ; \
${INSTALL_DATA} $$f ${STAGEDIR}${DATADIR}/textures ; \
done)
@${REINPLACE_CMD} -e '1410s|nomap|vesta|' \
${STAGEDIR}${DATADIR}/data/ssystem.ini
.endif
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View File

@ -12,5 +12,3 @@ SHA256 (stars_8_2v0_1.cat) = f1c0b3f25737f405ed4a2a045091d348885ffceb47258c3e32a
SIZE (stars_8_2v0_1.cat) = 559068934
SHA256 (textures-1K.zip) = 3622b73e9cfb65ba537072b0ed3b5ef92951e70878ace7557931d841c5bb3bec
SIZE (textures-1K.zip) = 20216182
SHA256 (milkyway.zip) = cffc11d22a1e0596e8d01800f54627a67a3ebcc745e5d138819e40d247aaa0d1
SIZE (milkyway.zip) = 6389431

View File

@ -42,7 +42,7 @@ PLIST_SUB+= MORE_STARS="@comment "
.if ${PORT_OPTIONS:MHR_TEXTURES}
MASTER_SITES+= SF/${PORTNAME}/textures:gfx
DISTFILES+= textures-1K.zip:gfx milkyway.zip:gfx # yes, in this order
DISTFILES+= textures-1K.zip:gfx
.endif
.if ${PORT_OPTIONS:MMULTIMEDIA}
@ -60,7 +60,15 @@ post-install:
${STAGEDIR}${DATADIR}/stars/default
.endif
.if ${PORT_OPTIONS:MHR_TEXTURES}
${INSTALL_DATA} ${WRKDIR}/*.png ${STAGEDIR}${DATADIR}/textures
(cd ${WRKDIR} && for f in *.png; do \
new=`${STAT} -f '%z' $$f` ; \
existing=`${STAT} -f '%z' \
${STAGEDIR}${DATADIR}/textures/$$f` ; \
${TEST} $$new -gt $$existing && \
${ECHO_CMD} "-- Replacing texture: $$f\
(has larger file size)" ; \
${INSTALL_DATA} $$f ${STAGEDIR}${DATADIR}/textures ; \
done)
.endif
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View File

@ -12,5 +12,3 @@ SHA256 (stars_8_2v0_1.cat) = f1c0b3f25737f405ed4a2a045091d348885ffceb47258c3e32a
SIZE (stars_8_2v0_1.cat) = 559068934
SHA256 (textures-1K.zip) = 3622b73e9cfb65ba537072b0ed3b5ef92951e70878ace7557931d841c5bb3bec
SIZE (textures-1K.zip) = 20216182
SHA256 (milkyway.zip) = cffc11d22a1e0596e8d01800f54627a67a3ebcc745e5d138819e40d247aaa0d1
SIZE (milkyway.zip) = 6389431