Changeset View
Changeset View
Standalone View
Standalone View
astro/google-earth/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= google-earth | PORTNAME= google-earth | ||||
PORTVERSION= 6.0.3.2197 | PORTVERSION= 7.1.5.1557 | ||||
PORTREVISION= 5 | |||||
PORTEPOCH= 3 | PORTEPOCH= 3 | ||||
CATEGORIES= astro deskutils geography | CATEGORIES= astro deskutils geography | ||||
MASTER_SITES= http://dl.google.com/earth/client/advanced/previous/:previous \ | MASTER_SITES= http://dl.google.com/earth/client/advanced/previous/:previous \ | ||||
http://dl.google.com/earth/client/current/:current | http://dl.google.com/earth/client/current/:current | ||||
DISTFILES= GoogleEarthLinux.bin:current | DISTFILES= GoogleEarthLinux.bin:current | ||||
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION} | DIST_SUBDIR= ${PORTNAME}/${PORTVERSION} | ||||
EXTRACT_ONLY= # none | |||||
MAINTAINER= ports@FreeBSD.org | MAINTAINER= ports@FreeBSD.org | ||||
COMMENT= Explore, Search, and Discover | COMMENT= Virtual globe, map and geographical information program | ||||
EXTRACT_DEPENDS= unmakeself:archivers/unmakeself | |||||
RESTRICTED= Not really sure about the redistribution terms | RESTRICTED= Not really sure about the redistribution terms | ||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\..*//g}/ | |||||
OPTIONS_DEFAULT= LINUX_DRI | OPTIONS_DEFAULT= LINUX_DRI | ||||
OPTIONS_SINGLE= LIBGL | OPTIONS_SINGLE= LIBGL | ||||
OPTIONS_SINGLE_LIBGL= LINUX_DRI NVIDIA_GL NVIDIA_GL_340 NVIDIA_GL_304 | OPTIONS_SINGLE_LIBGL= LINUX_DRI NVIDIA_GL NVIDIA_GL_340 NVIDIA_GL_304 | ||||
LINUX_DRI_DESC= libGL support via Linux DRI libraries | LINUX_DRI_DESC= libGL support via Linux DRI libraries | ||||
NVIDIA_GL_340_DESC= libGL support via nvidia-driver-340 | NVIDIA_GL_340_DESC= libGL support via nvidia-driver-340 | ||||
NVIDIA_GL_304_DESC= libGL support via nvidia-driver-304 | NVIDIA_GL_304_DESC= libGL support via nvidia-driver-304 | ||||
USE_LINUX= yes | USE_LINUX= yes | ||||
USE_LINUX_APPS= xorglibs curl nss | USE_LINUX_APPS= xorglibs curl nss | ||||
USES= perl5 shared-mime-info desktop-file-utils | USES= desktop-file-utils makeself perl5 shared-mime-info | ||||
USE_PERL5= patch build | USE_PERL5= patch build | ||||
NO_WRKSUBDIR= yes | |||||
#SUB_FILES= bin/googleearth | |||||
UNMAKESELF= ${LOCALBASE}/bin/unmakeself | |||||
NVIDIA_GL_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver | NVIDIA_GL_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver | ||||
NVIDIA_GL_340_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver-340 | NVIDIA_GL_340_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver-340 | ||||
NVIDIA_GL_304_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver-304 | NVIDIA_GL_304_RUN_DEPENDS= ${LINUXBASE}/usr/lib/libGL.so.1:x11/nvidia-driver-304 | ||||
LINUX_DRI_USE= LINUX_APPS=dri,libpciaccess | LINUX_DRI_USE= LINUX_APPS=dri,libpciaccess | ||||
# Fixed by the first post-patch target line? Also, linprocfs needs to be mounted. | post-extract: | ||||
#BROKEN= seems to crash on >= 9.x/amd64: http://www.freebsd.org/cgi/query-pr.cgi?pr=160422 | @cd ${WRKSRC} && ${TAR} xf googleearth-data.tar && ${RM} googleearth-data.tar | ||||
@cd ${WRKSRC} && ${TAR} xf googleearth-linux-x86.tar && ${RM} googleearth-linux-x86.tar | |||||
adamw: `tar` arguments should **always** have dashes. If users have `${TAR}` redefined to anything… | |||||
woodsb02AuthorUnsubmitted Not Done Inline ActionsI did add the dashes, but I did not compound this because it would need to be longer. Instead of: It would have to be: woodsb02: I did add the dashes, but I did not compound this because it would need to be longer.
Instead… | |||||
do-extract: | |||||
@${MKDIR} ${WRKSRC} | |||||
@${CP} ${DISTDIR}/${DIST_SUBDIR}/${_DISTFILES} ${WRKSRC} | |||||
@cd ${WRKSRC} && ${UNMAKESELF} ${_DISTFILES} && ${RM} -f ${_DISTFILES} | |||||
@cd ${WRKSRC} && ${TAR} xf googleearth-data.tar && ${RM} -f googleearth-data.tar | |||||
@cd ${WRKSRC} && ${TAR} xf googleearth-linux-x86.tar && ${RM} -f googleearth-linux-x86.tar | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e '/OS.*=/s|linux|FreeBSD|' ${WRKSRC}/drivers.ini | @${REINPLACE_CMD} -e '/OS.*=/s|linux|FreeBSD|' ${WRKSRC}/drivers.ini | ||||
@${REINPLACE_CMD} -e 's|^# Set the home.*|GOOGLEEARTH_DATA_PATH=${DATADIR}|' ${WRKSRC}/bin/googleearth | @${REINPLACE_CMD} -e 's|^# Set the home.*|GOOGLEEARTH_DATA_PATH=${DATADIR}|' ${WRKSRC}/bin/googleearth | ||||
@${REINPLACE_CMD} -i "" -e "s|^# Let's boogie.*|rm -f ${LINUXBASE}\$${HOME}/.googleearth/instance-running-lock|" ${WRKSRC}/bin/googleearth | @${REINPLACE_CMD} -i "" -e "s|^# Let's boogie.*|rm -f ${LINUXBASE}\$${HOME}/.googleearth/instance-running-lock|" ${WRKSRC}/bin/googleearth | ||||
@${REINPLACE_CMD} -i "" -e 's/^TMPPATH.*/exit 0/' ${WRKSRC}/postinstall.sh | @${REINPLACE_CMD} -i "" -e 's/^TMPPATH.*/exit 0/' ${WRKSRC}/postinstall.sh | ||||
@${REINPLACE_CMD} -i "" -e 's|\"\$$SETUP_INSTALLPATH/|\"${WRKSRC}/|' ${WRKSRC}/postinstall.sh | @${REINPLACE_CMD} -i "" -e 's|\"\$$SETUP_INSTALLPATH/|\"${WRKSRC}/|' ${WRKSRC}/postinstall.sh | ||||
@${REINPLACE_CMD} -i "" -e 's|\$$SETUP_INSTALLPATH/googleearth |${PREFIX}/bin/googleearth |' ${WRKSRC}/postinstall.sh | @${REINPLACE_CMD} -i "" -e 's|\$$SETUP_INSTALLPATH/googleearth |${PREFIX}/bin/googleearth |' ${WRKSRC}/postinstall.sh | ||||
${RM} ${WRKSRC}/libcurl.so.4 | ${RM} ${WRKSRC}/libcurl.so.4 | ||||
${PERL} -i -pe 's|/lib/ld-lsb.so.3\0\0\0|/lib/ld-linux.so.2\0|' ${WRKSRC}/googleearth-bin | ${PERL} -i -pe 's|/lib/ld-lsb.so.3\0\0\0|/lib/ld-linux.so.2\0|' ${WRKSRC}/googleearth-bin | ||||
post-patch-LINUX_DRI-off: | post-patch-LINUX_DRI-off: | ||||
@${REINPLACE_CMD} 's|%%LIBGL_ALWAYS_SOFTWARE%%||' ${WRKSRC}/bin/googleearth | @${REINPLACE_CMD} 's|%%LIBGL_ALWAYS_SOFTWARE%%||' ${WRKSRC}/bin/googleearth | ||||
post-patch-LINUX_DRI-on: | post-patch-LINUX_DRI-on: | ||||
@${REINPLACE_CMD} 's|%%LIBGL_ALWAYS_SOFTWARE%%|LIBGL_ALWAYS_SOFTWARE=yes|' ${WRKSRC}/bin/googleearth | @${REINPLACE_CMD} 's|%%LIBGL_ALWAYS_SOFTWARE%%|LIBGL_ALWAYS_SOFTWARE=yes|' ${WRKSRC}/bin/googleearth | ||||
do-build: | do-build: | ||||
@${SETENV} SETUP_INSTALLPATH=${DATADIR} ${WRKSRC}/postinstall.sh | @${SETENV} SETUP_INSTALLPATH=${DATADIR} ${WRKSRC}/postinstall.sh | ||||
@cd ${WRKSRC} && ${RM} -rf setup.* preuninstall.sh postinstall.sh \ | @cd ${WRKSRC} && ${RM} -r setup.* preuninstall.sh postinstall.sh \ | ||||
bin/googleearth.orig | bin/googleearth.orig | ||||
do-install: | do-install: | ||||
${MKDIR} ${STAGEDIR}${DATADIR} | ${MKDIR} ${STAGEDIR}${DATADIR} | ||||
${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages | ${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages | ||||
${INSTALL_DATA} ${WRKSRC}/googleearth-mimetypes.xml \ | ${INSTALL_DATA} ${WRKSRC}/googleearth-mimetypes.xml \ | ||||
${STAGEDIR}${PREFIX}/share/mime/packages/ | ${STAGEDIR}${PREFIX}/share/mime/packages/ | ||||
${INSTALL_DATA} ${WRKSRC}/Google-googleearth.desktop \ | ${INSTALL_DATA} ${WRKSRC}/Google-googleearth.desktop \ | ||||
${STAGEDIR}${PREFIX}/share/applications/googleearth.desktop | ${STAGEDIR}${PREFIX}/share/applications/googleearth.desktop | ||||
${CP} -rp ${WRKSRC}/* ${STAGEDIR}${DATADIR} | ${RM} ${WRKSRC}/googleearth-mimetypes.xml \ | ||||
${RM} -f ${STAGEDIR}${DATADIR}/googleearth-mimetypes.xml \ | ${WRKSRC}/googleearth.desktop | ||||
${STAGEDIR}${DATADIR}/googleearth.desktop | (cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}) | ||||
matUnsubmitted Done Inline ActionsChanging from CP to COPYTREE_SHARE is a great step. Just make sure there are no files that need to be executable or something in there, like, maybe, googleearth :-) mat: Changing from CP to COPYTREE_SHARE is a great step.
Just make sure there are no files that… | |||||
${INSTALL_SCRIPT} ${FILESDIR}/browserwrapper \ | ${INSTALL_SCRIPT} ${FILESDIR}/browserwrapper \ | ||||
${STAGEDIR}${DATADIR}/bin/ | ${STAGEDIR}${DATADIR}/bin/ | ||||
${LN} -sf ../${DATADIR_REL}/bin/googleearth \ | ${LN} -sf ../${DATADIR_REL}/bin/googleearth \ | ||||
${STAGEDIR}${PREFIX}/bin/ | ${STAGEDIR}${PREFIX}/bin/ | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
tar arguments should always have dashes. If users have ${TAR} redefined to anything else, using bare xf will cause it to break.
As an example:
While here, you can reduce the compound into