diff options
author | D. Can Celasun | 2018-08-16 07:41:10 +0200 |
---|---|---|
committer | D. Can Celasun | 2018-08-16 07:41:10 +0200 |
commit | 30117be3f3c79d07ddbe8b2b7328f9bd0e39e713 (patch) | |
tree | 2c1b5211614e0fb17a15eee8945d49a6bb96feb0 | |
parent | e025a0af8d422d5f0d1e7ccd31e340473acb5512 (diff) | |
download | aur-30117be3f3c79d07ddbe8b2b7328f9bd0e39e713.tar.gz |
[visual-studio-code-bin] Use private copies of libxml2 and icu
We need older versions built against glibc 2.27 for the file browser to
be usable.
Thanks to dogumon on AUR for debugging this.
-rw-r--r-- | PKGBUILD | 30 |
1 files changed, 25 insertions, 5 deletions
@@ -3,7 +3,7 @@ pkgname=visual-studio-code-bin _pkgname=visual-studio-code pkgver=1.26.0 -pkgrel=2 +pkgrel=3 pkgdesc="Visual Studio Code: Editor for building and debugging modern web and cloud applications (official binary version)" arch=('x86_64' 'i686') url="https://code.visualstudio.com/" @@ -17,19 +17,21 @@ optdepends=('gvfs: Needed for move to trash functionality') source_x86_64=(code_x64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/${pkgver}/linux-x64/stable ${_pkgname}.desktop https://archive.archlinux.org/packages/g/glibc/glibc-2.27-3-${CARCH}.pkg.tar.xz + https://archive.archlinux.org/packages/l/libxml2/libxml2-2.9.8-2-${CARCH}.pkg.tar.xz + https://archive.archlinux.org/packages/i/icu/icu-61.1-1-${CARCH}.pkg.tar.xz ) source_i686=(code_ia32_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/${pkgver}/linux-ia32/stable ${_pkgname}.desktop - https://archive.archlinux.org/packages/g/glibc/glibc-2.27-3-${CARCH}.pkg.tar.xz ) options=("!strip" "staticlibs") noextract=("glibc-2.27-3-${CARCH}.pkg.tar.xz") sha256sums_x86_64=('618ca429e23777ef6b512c0cbd78bc711a7cf6f58752d9f805ced1dc62abb8f0' '488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212' - 'a9e1b18d7f613be660556dbd6883781e88a0f5113230147e230d3e2f268792dc') + 'a9e1b18d7f613be660556dbd6883781e88a0f5113230147e230d3e2f268792dc' + '9a860e1dcc4f1686d5764cf1e9dd59fcdb4f07ca018aecd6631564ee33e6d6ab' + '5f35b1bf4cd2b13050e53a2c98016defa97232b1c838e91d0413a1c84b803a2c') sha256sums_i686=('fd150bee8e1be4f5461013b8fee19f855200d046643e4ea5387aad170ad5f12b' - '488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212' - 'a9e1b18d7f613be660556dbd6883781e88a0f5113230147e230d3e2f268792dc') + '488592034dd5f979083bbd80788d33e253bb3ac3e52d50faee80e715a924a212') package() { _pkg=VSCode-linux-x64 if [ "${CARCH}" = "i686" ]; then @@ -49,6 +51,10 @@ package() { cp -r "${srcdir}/${_pkg}/"* "${pkgdir}/opt/${_pkgname}" -R ln -s /opt/${_pkgname}/bin/code "${pkgdir}"/usr/bin/code + if [ "${CARCH}" = "i686" ]; then + return 0; + fi + _ldir="/opt/$_pkgname" _pdir="$pkgdir/$_ldir" _pexe="$_pdir/code" @@ -57,4 +63,18 @@ package() { rm "$_pdir/glibc/"{.BUILDINFO,.INSTALL,.MTREE,.PKGINFO} patchelf --set-interpreter "$_ldir/glibc/usr/lib/ld-linux-x86-64.so.2" "$_pexe" patchelf --set-rpath "$_ldir:$_ldir/glibc/usr/lib" "$_pexe" + + mkdir -p "${pkgdir}"/opt/${_pkgname}/libs + tar -xJC "${srcdir}" -f "libxml2-2.9.8-2-${CARCH}.pkg.tar.xz" > /dev/null 2>&1 + tar -xJC "${srcdir}" -f "icu-61.1-1-${CARCH}.pkg.tar.xz" > /dev/null 2>&1 + cp "${srcdir}"/usr/lib/* "${pkgdir}"/opt/${_pkgname}/libs -r + + cat <<- EOF > "${pkgdir}"/opt/${_pkgname}/code_libs +#!/bin/sh +LD_LIBRARY_PATH=/opt/${_pkgname}/libs code +EOF + + chmod +x "${pkgdir}"/opt/${_pkgname}/code_libs + sed -i 's|/opt/visual-studio-code/code|/opt/visual-studio-code/code_libs|' "${pkgdir}/usr/share/applications/${_pkgname}.desktop" + sed -i '35s|^|LD_LIBRARY_PATH=/opt/visual-studio-code/libs |' "${pkgdir}"/opt/${_pkgname}/bin/code } |