aboutsummaryrefslogtreecommitdiffstats
path: root/astro/google-earth/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'astro/google-earth/Makefile')
-rw-r--r--astro/google-earth/Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/astro/google-earth/Makefile b/astro/google-earth/Makefile
index 8b4a1001e2d8..c1f5e2558818 100644
--- a/astro/google-earth/Makefile
+++ b/astro/google-earth/Makefile
@@ -2,7 +2,7 @@
PORTNAME= google-earth
PORTVERSION= 6.0.3.2197
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 3
CATEGORIES= astro deskutils geography
MASTER_SITES= http://dl.google.com/earth/client/advanced/previous/:previous \
@@ -20,19 +20,24 @@ RESTRICTED= Not really sure about the redistribution terms
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\..*//g}/
+OPTIONS_DEFINE= NVIDIA
+
USE_LINUX= yes
USE_LINUX_APPS= xorglibs curl
USES= perl5 shared-mime-info desktop-file-utils
USE_PERL5= patch build
+#SUB_FILES= bin/googleearth
.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
UNMAKESELF= ${LOCALBASE}/bin/unmakeself
-.if defined(WITH_NVIDIA_GL)
+.if ${PORT_OPTIONS:MNVIDIA}
RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver
.else
-USE_LINUX_APPS+= dri
+USE_LINUX_APPS+= dri libpciaccess
+LIBGL_ALWAYS_SOFTWARE=LIBGL_ALWAYS_SOFTWARE=yes
.endif
# Fixed by the first post-patch target line? Also, linprocfs needs to be mounted.
@@ -48,9 +53,10 @@ do-extract:
@cd ${WRKSRC} && ${TAR} xf googleearth-linux-x86.tar && ${RM} -f googleearth-linux-x86.tar
post-patch:
- @${REINPLACE_CMD} -i "" -e '/OS.*=/s|linux|FreeBSD|' ${WRKSRC}/drivers.ini
- @${REINPLACE_CMD} -i "" -e 's|^# Set the home.*|GOOGLEEARTH_DATA_PATH=${DATADIR}|' ${WRKSRC}/bin/googleearth
- @${REINPLACE_CMD} -i "" -e "s|^# Let's boogie.*|rm -f \$${HOME}/.googleearth/instance-running-lock|" ${WRKSRC}/bin/googleearth
+ @${REINPLACE_CMD} -e '/OS.*=/s|linux|FreeBSD|' ${WRKSRC}/drivers.ini
+ @${REINPLACE_CMD} -e 's|^# Set the home.*|GOOGLEEARTH_DATA_PATH=${DATADIR}|; \
+ s|%%LIBGL_ALWAYS_SOFTWARE%%|${LIBGL_ALWAYS_SOFTWARE}|' ${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|\"\$$SETUP_INSTALLPATH/|\"${WRKSRC}/|' ${WRKSRC}/postinstall.sh
@${REINPLACE_CMD} -i "" -e 's|\$$SETUP_INSTALLPATH/googleearth |${PREFIX}/bin/googleearth |' ${WRKSRC}/postinstall.sh