2006-06-13 17:11:48 +02:00
|
|
|
# New ports collection makefile for: google-earth
|
|
|
|
# Date created: Jun 13 2006
|
|
|
|
# Whom: Florent Thoumie <flz@FreeBSD.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= google-earth
|
2009-11-26 22:06:50 +01:00
|
|
|
PORTVERSION= 5.1.3533.1731
|
2007-07-22 21:53:52 +02:00
|
|
|
CATEGORIES= astro deskutils geography
|
2007-09-09 22:11:07 +02:00
|
|
|
MASTER_SITES= http://dl.google.com/earth/client/current/
|
2009-01-11 19:45:31 +01:00
|
|
|
DISTNAME= GoogleEarthLinux
|
|
|
|
EXTRACT_SUFX= .bin
|
|
|
|
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
|
2006-06-13 17:11:48 +02:00
|
|
|
EXTRACT_ONLY= # none
|
|
|
|
|
2007-09-17 23:23:48 +02:00
|
|
|
MAINTAINER= nox@FreeBSD.org
|
2006-06-13 17:11:48 +02:00
|
|
|
COMMENT= Explore, Search and Discover
|
|
|
|
|
2007-04-13 13:39:30 +02:00
|
|
|
EXTRACT_DEPENDS= unmakeself:${PORTSDIR}/archivers/unmakeself
|
2009-01-21 17:17:47 +01:00
|
|
|
RUN_DEPENDS= update-mime-database:${PORTSDIR}/misc/shared-mime-info
|
2006-06-13 17:11:48 +02:00
|
|
|
|
|
|
|
RESTRICTED= Not sure about redistribution rights
|
|
|
|
|
2006-07-10 13:02:08 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\..*//g}/
|
|
|
|
|
2006-06-13 17:11:48 +02:00
|
|
|
USE_LINUX= yes
|
2009-03-19 18:28:51 +01:00
|
|
|
USE_LINUX_APPS= xorglibs
|
2006-07-03 16:00:05 +02:00
|
|
|
USE_GNOME= desktopfileutils
|
2006-06-13 17:11:48 +02:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
UNMAKESELF= ${LOCALBASE}/bin/unmakeself
|
|
|
|
|
|
|
|
.if defined(WITH_NVIDIA_GL)
|
|
|
|
RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver
|
|
|
|
.else
|
2009-04-12 17:35:57 +02:00
|
|
|
USE_LINUX_APPS+= dri
|
2006-06-13 17:11:48 +02:00
|
|
|
.endif
|
|
|
|
|
2009-10-19 21:35:15 +02:00
|
|
|
.if ${OSVERSION}<700055
|
|
|
|
IGNORE= FreeBSD>=7.X is needed with Linux emulation 2.6.x.
|
2009-10-20 20:27:50 +02:00
|
|
|
.elif ${OSVERSION}<800076 && \
|
|
|
|
(! defined (OVERRIDE_LINUX_NONBASE_PORTS) || \
|
|
|
|
! (${OVERRIDE_LINUX_NONBASE_PORTS} == f10))
|
|
|
|
IGNORE= needs non-default linux ports (define OVERRIDE_LINUX_BASE_PORT=f10 and OVERRIDE_LINUX_NONBASE_PORTS=f10)
|
2009-10-19 21:35:15 +02:00
|
|
|
.endif
|
|
|
|
|
2007-04-13 13:39:30 +02:00
|
|
|
do-extract:
|
2006-06-13 17:11:48 +02:00
|
|
|
@${MKDIR} ${WRKSRC}
|
2009-01-11 19:45:31 +01:00
|
|
|
@${CP} ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} ${WRKSRC}
|
2006-07-03 16:00:05 +02:00
|
|
|
@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
|
2007-04-13 13:39:30 +02:00
|
|
|
|
2009-08-06 18:41:35 +02:00
|
|
|
pre-patch:
|
2006-06-13 17:11:48 +02:00
|
|
|
@${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} -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
|
2007-04-13 13:39:30 +02:00
|
|
|
|
|
|
|
do-build:
|
2006-07-29 01:06:19 +02:00
|
|
|
@${SETENV} SETUP_INSTALLPATH=${DATADIR} ${WRKSRC}/postinstall.sh
|
2009-08-06 18:41:35 +02:00
|
|
|
@cd ${WRKSRC} && ${RM} -rf setup.* preuninstall.sh postinstall.sh \
|
|
|
|
bin/googleearth.orig
|
2009-01-24 22:00:09 +01:00
|
|
|
|
|
|
|
pre-su-install:
|
2008-09-18 23:13:50 +02:00
|
|
|
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${WRKSRC}
|
2006-06-13 17:11:48 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${MKDIR} ${DATADIR}
|
2006-07-03 16:00:05 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/googleearth-mimetypes.xml ${PREFIX}/share/mime/packages/
|
2007-06-02 16:32:39 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/Google-googleearth.desktop ${PREFIX}/share/applications/googleearth.desktop
|
2007-04-13 13:39:30 +02:00
|
|
|
${CP} -rp ${WRKSRC}/* ${DATADIR}
|
|
|
|
${RM} -f ${DATADIR}/googleearth-mimetypes.xml ${DATADIR}/googleearth.desktop
|
2006-06-13 17:11:48 +02:00
|
|
|
${LN} -sf ${DATADIR}/bin/googleearth ${PREFIX}/bin/
|
2006-07-03 16:00:05 +02:00
|
|
|
-@update-mime-database ${PREFIX}/share/mime
|
|
|
|
-@update-desktop-database
|
2006-06-13 17:11:48 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|