diff options
author | Det | 2015-06-14 04:13:27 +0300 |
---|---|---|
committer | Det | 2015-06-14 04:14:15 +0300 |
commit | 4f05b83ba39005277501d2db192522e6582b0bda (patch) | |
tree | 77c9475b7d2ab4fe0c813a78698ac88df36d0c07 | |
download | aur-4f05b83ba39005277501d2db192522e6582b0bda.tar.gz |
Initial import: 7.1.4.1529-1
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 102 | ||||
-rw-r--r-- | baifaao.cpp | 7 | ||||
-rw-r--r-- | google-earth-mimetypes.xml | 20 | ||||
-rw-r--r-- | google-earth.install | 50 | ||||
-rw-r--r-- | googleearth | 17 |
6 files changed, 233 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..43ff9cb408f1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +pkgbase = google-earth + pkgdesc = A 3D interface to view satellite images of Earth and other objects + pkgver = 7.1.4.1529 + pkgrel = 1 + url = https://www.google.com/earth/index.html + install = google-earth.install + arch = i686 + arch = x86_64 + license = custom:earth + makedepends = pacman>=4.2.0 + depends = desktop-file-utils + depends = hicolor-icon-theme + depends = ld-lsb>=3-5 + depends = lib32-fontconfig + depends = lib32-glu + depends = lib32-libgl + depends = lib32-libsm + depends = lib32-libxrender + depends = lib32-mesa + depends = shared-mime-info + depends = xdg-utils + optdepends = lib32-catalyst-utils: For AMD Catalyst + optdepends = lib32-nvidia-utils: For the NVIDIA driver + options = !emptydirs + source = google-earth-stable_7.1.4.1529_i386.deb::https://dl.google.com/earth/client/current/google-earth-stable_current_i386.deb + source = googleearth + source = google-earth-mimetypes.xml + source = baifaao.cpp + md5sums = b8847cb867bdb3ff892149f0fd68f036 + md5sums = e84f5d51ea3545c131d1794f89f6464a + md5sums = e3c67b8d05c3de50535bd7e45eee728e + md5sums = 598d579a1c3199c77850d86ba78f7b44 + source_x86_64_unstable = google-earth-stable_7.1.4.1529_amd64.deb::https://dl.google.com/earth/client/current/google-earth-stable_current_amd64.deb + md5sums_x86_64_unstable = 7bbba9d4d64f2a9b38752e259d849bda + +pkgname = google-earth + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..05f976139040 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Det <nimetonmaili g-mail> +# Contributors: 458italia, Madek, Berseker, Syr +# Check the latest version with: +# curl -s https://dl.google.com/dl/earth/client/current/google-earth-stable_current_x86_64.rpm | head -c96 | strings | cut -d "-" -f4 + +# Attempt to fix crashes and blank Panoramio: "1" to enable. +# - http://forums.fedoraforum.org/showthread.php?p=1678303#post1678303 +_attempt_fix=0 + +# Build an unstable 64-bit build: "1" to enable. +_64=0 + +pkgname=google-earth +pkgver=7.1.4.1529 +pkgrel=1 +pkgdesc="A 3D interface to view satellite images of Earth and other objects" +arch=('i686' 'x86_64') +url="https://www.google.com/earth/index.html" +license=('custom:earth') +# Bin32 +depends=('desktop-file-utils' 'hicolor-icon-theme' 'ld-lsb>=3-5' 'lib32-fontconfig' 'lib32-glu' + 'lib32-libgl' 'lib32-libsm' 'lib32-libxrender' 'lib32-mesa' 'shared-mime-info' 'xdg-utils') +[[ $_attempt_fix = 1 ]] && depends+=('gcc-multilib' 'lib32-freeimage' 'lib32-libpng15' 'lib32-qt4') +optdepends=('lib32-catalyst-utils: For AMD Catalyst' + 'lib32-nvidia-utils: For the NVIDIA driver') +# Native 32/64-bit +_arch=i386 +[[ $CARCH = x86_64 ]] && [[ $_64 = 1 ]] && _arch=amd64 +if [[ $CARCH = i686 ]] || [[ $_arch = amd64 ]]; then + depends=('desktop-file-utils' 'fontconfig' 'glu' 'hicolor-icon-theme' 'ld-lsb>=3-5' + 'libgl' 'libsm' 'libxrender' 'mesa' 'shared-mime-info' 'xdg-utils') + [[ $_attempt_fix = 1 ]] && depends+=('freeimage' 'libpng15' 'qtwebkit') + optdepends=('catalyst-utils: For AMD Catalyst' + 'nvidia-utils: For the NVIDIA driver') +fi +makedepends=('pacman>=4.2.0') +options=('!emptydirs') +install=$pkgname.install +source=("google-earth-stable_${pkgver}_${_arch}.deb::https://dl.google.com/earth/client/current/google-earth-stable_current_${_arch}.deb" + 'googleearth' + 'google-earth-mimetypes.xml' + 'baifaao.cpp') +md5sums=('b8847cb867bdb3ff892149f0fd68f036' + 'e84f5d51ea3545c131d1794f89f6464a' + 'e3c67b8d05c3de50535bd7e45eee728e' + '598d579a1c3199c77850d86ba78f7b44') +[[ $_arch = amd64 ]] && md5sums[0]='7bbba9d4d64f2a9b38752e259d849bda' + +_instdir=/opt/google/earth/free/ + +# Build() the baifaao.so +if [[ $_attempt_fix = 1 ]]; then + # bin32? + if [[ $CARCH = x86_64 ]] && [[ $_64 != 1 ]]; then + _m32=-m32 + fi + + build() { + gcc -I /usr/include/qt4/ $_m32 -O3 -fPIC --shared baifaao.cpp -o baifaao.so + } +fi + +package() { + msg2 "Extracting the data.tar.lzma..." + bsdtar -xf data.tar.lzma -C "$pkgdir/" + + msg2 "Moving stuff in place..." + # The .desktop + mv "$pkgdir"/$_instdir/google-earth.desktop "$pkgdir"/usr/share/applications/ + + # Icons + for i in 16 22 24 32 48 64 128 256; do + install -Dm644 "$pkgdir"/$_instdir/product_logo_$i.png "$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/google-earth.png + done + + # The MIME package + install -Dm644 google-earth-mimetypes.xml "$pkgdir"/usr/share/mime/packages/google-earth-mimetypes.xml + + # The license (too many different ones to do this in "source=()") + install -d "$pkgdir"/usr/share/licenses/google-earth/ + curl -Ls ${url/i*}/license.html -o "$pkgdir"/usr/share/licenses/google-earth/license.html + + msg2 "Removing the Debian-intended cron job and duplicated images..." + rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/$_instdir/product_logo_*.png + + if [[ $_attempt_fix = 1 ]]; then + msg2 "Attempting a fix on Panoramio and certain crashes..." + # Install baifaao.so + install -m755 baifaao.so "$pkgdir"/$_instdir/ + + # Preload it + install -m755 googleearth "$pkgdir"/$_instdir/ + + # bin32? + if [[ "$_m32" ]]; then + sed -i "s,/usr/lib,/usr/lib32,g" "$pkgdir"/$_instdir/googleearth + fi + + # Remove the old, bundled Qt libs + rm "$pkgdir"/$_instdir/libQt* + fi +} diff --git a/baifaao.cpp b/baifaao.cpp new file mode 100644 index 000000000000..ea6885fb38b2 --- /dev/null +++ b/baifaao.cpp @@ -0,0 +1,7 @@ +/* amirpli 2013/11/28 */ +#include <QtCore/QAtomicInt> +extern "C" { + int _Z34QBasicAtomicInt_fetchAndAddOrderedPVii(QAtomicInt* a, int b) { + return a->fetchAndAddOrdered(b); + } +}
\ No newline at end of file diff --git a/google-earth-mimetypes.xml b/google-earth-mimetypes.xml new file mode 100644 index 000000000000..5bb218b4c87a --- /dev/null +++ b/google-earth-mimetypes.xml @@ -0,0 +1,20 @@ +<?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>
\ No newline at end of file diff --git a/google-earth.install b/google-earth.install new file mode 100644 index 000000000000..58a172690470 --- /dev/null +++ b/google-earth.install @@ -0,0 +1,50 @@ +# Colored makepkg-like functions +msg_blue() { + printf "${blue}==>${bold} $1${all_off}\n" +} + +note() { + printf "${blue}==>${yellow} NOTE:$2${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + +# 64-bit? +if [[ $(uname -m) = x86_64 ]]; then + _64=true +fi + +_update() { + msg_blue "Updating desktop MIME database..." + update-desktop-database -q + msg_blue "Updating MIME database..." + update-mime-database usr/share/mime >/dev/null + msg_blue "Updating icon cache..." + xdg-icon-resource forceupdate &>/dev/null +} + +post_install() { + _update + if [[ $_64 ]]; then + note "The binary is called 'google-earth'." "1" + note "If experiencing graphical corruption: + $ rm -r ~/.googleearth/Cache/" "2" + else + note "The launcher is called 'google-earth'." + fi +} + +post_upgrade() { + _update + if [[ $_64 ]]; then + note "If experiencing graphical corruption: + $ rm -r ~/.googleearth/Cache/" + fi +} + +post_remove() { + _update +} diff --git a/googleearth b/googleearth new file mode 100644 index 000000000000..f5a6c18d097c --- /dev/null +++ b/googleearth @@ -0,0 +1,17 @@ +#!/bin/sh +# Always run Google Earth from this shell script and not directly! +# This script makes sure the app looks in the right place for libraries +# that might also reside elsewhere. +# +# Ryan C. Gordon, Thu Jul 20 14:32:33 PDT 2006 + +# We alredy know the path +cd /opt/google/earth/free + +## Fix the coordinates regression: +## http://productforums.google.com/forum/#!msg/earth/dlzBfGl4eKM/723naNYBo30J +#export LC_NUMERIC=en_US.UTF-8 + +# Fix Panoramio along with certain crashes +LD_PRELOAD=/usr/lib/libfreeimage.so.3:./baifaao.so:/usr/lib/libpng15.so \ +LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./googleearth-bin "$@" |