diff options
author | 2017-12-29 10:41:51 +0100 | |
---|---|---|
committer | 2017-12-29 12:08:17 +0100 | |
commit | 86acf45d180080c3244e56719cad915f9ea11bf3 (patch) | |
tree | d3afd7b9860f5622331374c22ed1f4eb2db87789 | |
parent | app-portage/eix: Version bump. LINGUAS -> L10N (diff) | |
download | mv-86acf45d180080c3244e56719cad915f9ea11bf3.tar.gz mv-86acf45d180080c3244e56719cad915f9ea11bf3.tar.bz2 mv-86acf45d180080c3244e56719cad915f9ea11bf3.zip |
sci-geosciences/googleearth: New ebuild, partially based on bug 642334
-rw-r--r-- | metadata/pkg_desc_index | 1 | ||||
-rw-r--r-- | profiles/use.local.desc | 2 | ||||
-rw-r--r-- | sci-geosciences/googleearth/Manifest | 4 | ||||
-rw-r--r-- | sci-geosciences/googleearth/files/googleearth-7-pro-desktopfile.patch | 17 | ||||
-rw-r--r-- | sci-geosciences/googleearth/files/googleearth-mimetypes.xml | 21 | ||||
-rw-r--r-- | sci-geosciences/googleearth/googleearth-7.1.8.3036.ebuild | 172 | ||||
-rw-r--r-- | sci-geosciences/googleearth/googleearth-7.3.0.3832.ebuild | 179 | ||||
-rw-r--r-- | sci-geosciences/googleearth/metadata.xml | 12 |
8 files changed, 408 insertions, 0 deletions
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index index 44a82ec4..ef72edc2 100644 --- a/metadata/pkg_desc_index +++ b/metadata/pkg_desc_index @@ -92,6 +92,7 @@ net-libs/wvstreams 4.6.1-r3: A network programming library in C++ net-misc/openrdate 1.2: use TCP or UDP to retrieve the current time of another machine net-misc/sshstart 3.00: Start ssh-agent/ssh-add only if you really use ssh or friends net-print/foo2zjs 20160722: Support for printing to ZjStream-based printers +sci-geosciences/googleearth 7.1.8.3036 7.3.0.3832: A 3D interface to the planet sci-mathematics/genius 1.0.21: Genius Mathematics Tool and the GEL Language sci-mathematics/reduce 20141130-r2: A general-purpose computer algebra system sys-apps/cpi 3.1: A wrapper for cp -i -a, making use of diff diff --git a/profiles/use.local.desc b/profiles/use.local.desc index 00707b1e..2c0ace70 100644 --- a/profiles/use.local.desc +++ b/profiles/use.local.desc @@ -232,6 +232,8 @@ net-print/foo2zjs:foo2zjs_devices_sa610 - Samsung CLP-610 ICM net-print/foo2zjs:foo2zjs_devices_xp6110 - Xerox Phaser 6110 and 6110MFP ICM net-print/foo2zjs:foo2zjs_devices_xp6115 - Xerox Phaser 6115MFP ICM net-print/foo2zjs:foomaticdb - Add support for the foomatic printing driver database +sci-geosciences/googleearth:bundled-libs - Use bundled libraries. +sci-geosciences/googleearth:bundled-qt - Use bundled qt. sys-apps/less:less-select - Add the less-select feature (additional options and a binary helper). sys-apps/less:lesspipe - Default to lesspipe.sh from app-text/lesspipe instead of the gentoo specific lesspipe. sys-apps/less:original-gentoo - Use the gentoo default for the LESS variable. diff --git a/sci-geosciences/googleearth/Manifest b/sci-geosciences/googleearth/Manifest new file mode 100644 index 00000000..cea27ad5 --- /dev/null +++ b/sci-geosciences/googleearth/Manifest @@ -0,0 +1,4 @@ +DIST google-earth-pro-stable_7.1.8.3036-r0_amd64.deb 45663202 SHA512 6257f8d5e7a178c538e72db7ae7fa4b4242a5b0abb5458f81fa47a3a45c2cb79888c8815e80320b7c1bd071fb021589c3e30d73ebf246027aed6a4e7477739f8 +DIST google-earth-pro-stable_7.1.8.3036-r0_i386.deb 44460270 SHA512 74176fd389bcfb1de681b5c3e51260da8bdae1d62abd520fc457ff2b6161d6a85fa98fb012774019e23b8043c2cf74b6a14bda05f55a25ade945f9fdcdc719c3 +DIST google-earth-pro-stable_7.3.0.3832-r0_amd64.deb 57842874 SHA512 af75d6dc223983aba7f84685c8f12bb06b4972fe0a50a883c5ee3321c37b16cd25ac7c60da3c80f4bf7cec41011827fab9f66ba2c9c3f404cd7270f610815251 +DIST google-earth-pro-stable_7.3.0.3832-r0_i386.deb 56685312 SHA512 7bdf9cdf5d431b55ccc02e15e9f58bb9b3ed6590a6f53afe7202ba2d8fd38be333e9bfe273ea64502a78fb4263021da15b16cf474ea48a3742f0ce622eb8d151 diff --git a/sci-geosciences/googleearth/files/googleearth-7-pro-desktopfile.patch b/sci-geosciences/googleearth/files/googleearth-7-pro-desktopfile.patch new file mode 100644 index 00000000..e5de8c31 --- /dev/null +++ b/sci-geosciences/googleearth/files/googleearth-7-pro-desktopfile.patch @@ -0,0 +1,17 @@ +--- google-earth-pro.desktop ++++ google-earth-pro.desktop +@@ -3,10 +3,10 @@ + Name=Google Earth + GenericName=3D planet viewer + Comment=Explore, search and discover the planet +-Exec=/opt/google/earth/pro/google-earth-pro %f ++Exec=/opt/googleearth/googleearth %f + Terminal=false +-MultipleArgs=false ++X-MultipleArgs=false + Icon=google-earth-pro + Type=Application +-Categories=Application;Network +-MimeType=application/vnd.google-earth.kml+xml;application/vnd.google-earth.kmz;application/earthviewer;application/keyhole ++Categories=Network; ++MimeType=application/vnd.google-earth.kml+xml;application/vnd.google-earth.kmz;application/earthviewer;application/keyhole; diff --git a/sci-geosciences/googleearth/files/googleearth-mimetypes.xml b/sci-geosciences/googleearth/files/googleearth-mimetypes.xml new file mode 100644 index 00000000..3ecfa97c --- /dev/null +++ b/sci-geosciences/googleearth/files/googleearth-mimetypes.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="application/vnd.google-earth.kml+xml"> + <comment>Keyhole Markup Language data</comment> + <glob pattern="*.kml"/> + </mime-type> + + <mime-type type="application/vnd.google-earth.kmz"> + <comment>Keyhole Markup Language archive</comment> + <glob pattern="*.kmz"/> + </mime-type> + + <mime-type type="application/keyhole"> + <comment>Keyhole Markup Language data</comment> + </mime-type> + + <mime-type type="application/earthviewer"> + <comment>Keyhole Markup Language data</comment> + </mime-type> +</mime-info> + diff --git a/sci-geosciences/googleearth/googleearth-7.1.8.3036.ebuild b/sci-geosciences/googleearth/googleearth-7.1.8.3036.ebuild new file mode 100644 index 00000000..86dab4df --- /dev/null +++ b/sci-geosciences/googleearth/googleearth-7.1.8.3036.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit desktop eutils fdo-mime gnome2-utils pax-utils unpacker versionator + +DESCRIPTION="A 3D interface to the planet" +HOMEPAGE="https://www.google.com/earth/desktop/" +MY_PV=$(replace_all_version_separators '_' $(get_version_component_range 1-3)) +SRC_URI="x86? ( https://dl.google.com/dl/earth/client/GE7/release_${MY_PV}/google-earth-pro-stable_${PV}-r0_i386.deb ) + amd64? ( https://dl.google.com/dl/earth/client/GE7/release_${MY_PV}/google-earth-pro-stable_${PV}-r0_amd64.deb )" +LICENSE="googleearth GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror splitdebug" +IUSE="+bundled-libs" + +QA_PREBUILT="*" + +# TODO: find a way to unbundle libQt +# ./googleearth-bin: symbol lookup error: ./libbase.so: undefined symbol: _Z34QBasicAtomicInt_fetchAndAddOrderedPVii + +RDEPEND=" + dev-libs/glib:2 + dev-libs/nspr + media-libs/fontconfig + media-libs/freetype + net-misc/curl + sys-devel/gcc[cxx] + sys-libs/zlib + virtual/glu + virtual/opengl + virtual/ttf-fonts + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXi + x11-libs/libXext + x11-libs/libXrender + x11-libs/libXau + x11-libs/libXdmcp + !bundled-libs? ( + dev-db/sqlite:3 + dev-libs/expat + dev-libs/nss + sci-libs/proj + )" +# sci-libs/gdal-1* +DEPEND="dev-util/patchelf" + +S=${WORKDIR}/opt/google/earth/pro + +pkg_nofetch() { + einfo "Wrong checksum or file size means that Google silently replaced the distfile with a newer version." + einfo "Note that Gentoo cannot mirror the distfiles due to license reasons, so we have to follow the bump." + einfo "Please file a version bump bug on https://bugs.gentoo.org (search existing bugs for googleearth first!)." + einfo "By redigesting the file yourself, you will install a different version than the ebuild says, untested!" +} + +src_unpack() { + # default src_unpack fails with deb2targz installed, also this unpacks the data.tar.lzma as well + unpack_deb ${A} + + if ! use bundled-libs ; then + einfo "removing bundled libs" + cd opt/google/earth/pro || die + # sci-libs/gdal-1* + # rm -v libgdal.so.1 || die + # dev-db/sqlite + rm -v libsqlite3.so || die + # dev-libs/nss + rm -v libplc4.so libplds4.so libnspr4.so libnssckbi.so libfreebl3.so \ + libnssdbm3.so libnss3.so libnssutil3.so libsmime3.so libnsssysinit.so \ + libsoftokn3.so libssl3.so || die + # dev-libs/expat + rm -v libexpat.so.1 || die + # sci-libs/proj + rm -v libproj.so.0 || die + # dev-qt/qtcore:4 dev-qt/qtgui:4 dev-qt/qtwebkit:4 +# rm -v libQt{Core,Gui,Network,WebKit}.so.4 || die +# rm -rv plugins/imageformats || die + fi +} + +src_prepare() { + + # we have no ld-lsb.so.3 symlink + # thanks to Nathan Phillip Brink <ohnobinki@ohnopublishing.net> for suggesting patchelf + einfo "running patchelf" + patchelf --set-interpreter /$(get_libdir)/ld-linux$(usex amd64 "-x86-64" "").so.2 ${PN}-bin || die "patchelf failed" + + # Set RPATH for preserve-libs handling (bug #265372). + local x + for x in * ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + fperms u+w "${x}" + patchelf --set-rpath '$ORIGIN' "${x}" || + die "patchelf failed on ${x}" + done + # prepare file permissions so that >patchelf-0.8 can work on the files + fperms u+w plugins/*.so plugins/imageformats/*.so + for x in plugins/*.so ; do + [[ -f ${x} ]] || continue + patchelf --set-rpath '$ORIGIN/..' "${x}" || + die "patchelf failed on ${x}" + done + for x in plugins/imageformats/*.so ; do + [[ -f ${x} ]] || continue + patchelf --set-rpath '$ORIGIN/../..' "${x}" || + die "patchelf failed on ${x}" + done + + epatch "${FILESDIR}"/${PN}-${PV%%.*}-pro-desktopfile.patch + default +} + +src_install() { + make_wrapper ${PN} ./${PN} /opt/${PN} . + + insinto /usr/share/mime/packages + doins "${FILESDIR}/${PN}-mimetypes.xml" || die + + domenu google-earth-pro.desktop + + for size in 16 22 24 32 48 64 128 256 ; do + newicon -s ${size} product_logo_${size}.png google-earth-pro.png + done + + rm -rf xdg-mime xdg-settings google-earth-pro google-earth-pro.desktop product_logo_* + + insinto /opt/${PN} + doins -r * + + fperms +x /opt/${PN}/${PN}{,-bin} + cd "${ED}" || die + find . -type f -name "*.so.*" -exec fperms +x '{}' + + + pax-mark -m "${ED%/}"/opt/${PN}/${PN}-bin +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + elog "When you get a crash starting Google Earth, try adding a file ~./.config/Google/GoogleEarthPlus.conf" + elog "with the following options:" + elog "lastTip = 4" + elog "enableTips = false" + elog "" + elog "In addition, the use of free video drivers may cause problems associated with using the Mesa" + elog "library. In this case, Google Earth 6x likely only works with the Gallium3D variant." + elog "To select the 32bit graphic library use the command:" + elog " eselect mesa list" + elog "For example, for Radeon R300 (x86):" + elog " eselect mesa set r300 2" + elog "For Intel Q33 (amd64):" + elog " eselect mesa set 32bit i965 2" + elog "You may need to restart X afterwards" + + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update +} diff --git a/sci-geosciences/googleearth/googleearth-7.3.0.3832.ebuild b/sci-geosciences/googleearth/googleearth-7.3.0.3832.ebuild new file mode 100644 index 00000000..97935adc --- /dev/null +++ b/sci-geosciences/googleearth/googleearth-7.3.0.3832.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit desktop eutils fdo-mime gnome2-utils pax-utils unpacker versionator + +DESCRIPTION="A 3D interface to the planet" +HOMEPAGE="https://www.google.com/earth/desktop/" +MY_PV=$(replace_all_version_separators '_' $(get_version_component_range 1-3)) +SRC_URI="x86? ( https://dl.google.com/dl/earth/client/GE7/release_${MY_PV}/google-earth-pro-stable_${PV}-r0_i386.deb ) + amd64? ( https://dl.google.com/dl/earth/client/GE7/release_${MY_PV}/google-earth-pro-stable_${PV}-r0_amd64.deb )" +LICENSE="googleearth GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="mirror splitdebug" +IUSE="+bundled-libs +bundled-qt" + +QA_PREBUILT="*" + +RDEPEND=" + dev-libs/glib:2 + dev-libs/nspr + media-libs/fontconfig + media-libs/freetype + net-misc/curl + sys-devel/gcc[cxx] + sys-libs/zlib + virtual/glu + virtual/opengl + virtual/ttf-fonts + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXi + x11-libs/libXext + x11-libs/libXrender + x11-libs/libXau + x11-libs/libXdmcp + !bundled-libs? ( + dev-libs/expat + sci-libs/proj + ) + !bundled-qt? ( + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5[widgets] + dev-qt/qtnetwork:5 + dev-qt/qtopengl:5 + dev-qt/qtpositioning:5 + dev-qt/qtprintsupport:5 + dev-qt/qtsensors:5 + dev-qt/qtscript:5[scripttools] + dev-qt/qtwebchannel:5 + dev-qt/qtwebkit:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + )" +# sci-libs/gdal-1* +DEPEND="dev-util/patchelf" + +S=${WORKDIR}/opt/google/earth/pro + +pkg_nofetch() { + einfo "Wrong checksum or file size means that Google silently replaced the distfile with a newer version." + einfo "Note that Gentoo cannot mirror the distfiles due to license reasons, so we have to follow the bump." + einfo "Please file a version bump bug on https://bugs.gentoo.org (search existing bugs for googleearth first!)." + einfo "By redigesting the file yourself, you will install a different version than the ebuild says, untested!" +} + +src_unpack() { + # default src_unpack fails with deb2targz installed, also this unpacks the data.tar.lzma as well + unpack_deb ${A} + + if ! use bundled-libs ; then + einfo "removing bundled libs" + cd opt/google/earth/pro || die + # sci-libs/gdal-1* + # rm -v libgdal.so.1 || die + # dev-libs/expat + rm -v libexpat.so.1 || die + # sci-libs/proj + rm -v libproj.so.0 || die +# rm -rv plugins/imageformats || die + fi + if ! use bundled-qt ; then + rm -v libQt5{Core,DBus,Gui,Multimedia,MultimediaWidgets,Network,OpenGL,Positioning,PrintSupport,Qml,Quick,Script,ScriptTools,Sensors,Sql,WebChannel,WebKit,WebKitWidgets,Widgets,X11Extras,XcbQpa}.so.5 || die + fi +} + +src_prepare() { + + # we have no ld-lsb.so.3 symlink + # thanks to Nathan Phillip Brink <ohnobinki@ohnopublishing.net> for suggesting patchelf + einfo "running patchelf" + patchelf --set-interpreter /$(get_libdir)/ld-linux$(usex amd64 "-x86-64" "").so.2 ${PN}-bin || die "patchelf failed" + + # Set RPATH for preserve-libs handling (bug #265372). + local x + for x in * ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + fperms u+w "${x}" + patchelf --set-rpath '$ORIGIN' "${x}" || + die "patchelf failed on ${x}" + done + # prepare file permissions so that >patchelf-0.8 can work on the files + fperms u+w plugins/*.so plugins/imageformats/*.so + for x in plugins/*.so ; do + [[ -f ${x} ]] || continue + patchelf --set-rpath '$ORIGIN/..' "${x}" || + die "patchelf failed on ${x}" + done + for x in plugins/imageformats/*.so ; do + [[ -f ${x} ]] || continue + patchelf --set-rpath '$ORIGIN/../..' "${x}" || + die "patchelf failed on ${x}" + done + + epatch "${FILESDIR}"/${PN}-${PV%%.*}-pro-desktopfile.patch + default +} + +src_install() { + make_wrapper ${PN} ./${PN} /opt/${PN} . + + insinto /usr/share/mime/packages + doins "${FILESDIR}/${PN}-mimetypes.xml" || die + + domenu google-earth-pro.desktop + + for size in 16 22 24 32 48 64 128 256 ; do + newicon -s ${size} product_logo_${size}.png google-earth-pro.png + done + + rm -rf xdg-mime xdg-settings google-earth-pro google-earth-pro.desktop product_logo_* + + insinto /opt/${PN} + doins -r * + + fperms +x /opt/${PN}/${PN}{,-bin} + cd "${ED}" || die + find . -type f -name "*.so.*" -exec fperms +x '{}' + + + pax-mark -m "${ED%/}"/opt/${PN}/${PN}-bin +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + elog "When you get a crash starting Google Earth, try adding a file ~./.config/Google/GoogleEarthPlus.conf" + elog "with the following options:" + elog "lastTip = 4" + elog "enableTips = false" + elog "" + elog "In addition, the use of free video drivers may cause problems associated with using the Mesa" + elog "library. In this case, Google Earth 6x likely only works with the Gallium3D variant." + elog "To select the 32bit graphic library use the command:" + elog " eselect mesa list" + elog "For example, for Radeon R300 (x86):" + elog " eselect mesa set r300 2" + elog "For Intel Q33 (amd64):" + elog " eselect mesa set 32bit i965 2" + elog "You may need to restart X afterwards" + + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update + fdo-mime_mime_database_update + gnome2_icon_cache_update +} diff --git a/sci-geosciences/googleearth/metadata.xml b/sci-geosciences/googleearth/metadata.xml new file mode 100644 index 00000000..dc031f82 --- /dev/null +++ b/sci-geosciences/googleearth/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>martin@mvath.de</email> + <name>Martin Väth</name> + </maintainer> + <use> + <flag name="bundled-libs">Use bundled libraries.</flag> + <flag name="bundled-qt">Use bundled qt.</flag> + </use> +</pkgmetadata> |