Skip to content

Instantly share code, notes, and snippets.

@catwell
Created June 7, 2012 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catwell/2892060 to your computer and use it in GitHub Desktop.
Save catwell/2892060 to your computer and use it in GitHub Desktop.
qt5-qtjsbackend-git
# Maintainer: Anselmo L. S. Melo <anselmolsm@gmail.com>
pkgname=qt5-qtjsbackend-git
pkgver=20120608
pkgrel=1
pkgdesc="Qt 5: qtjsbackend module (includes QtV8)"
arch=('i686' 'x86_64')
url="https://qt.gitorious.org/qt/qtjsbackend"
license=('LGPL')
depends=()
makedepends=('gcc' 'git' 'qt5-qtbase-git')
source=()
md5sums=()
_gitroot="git://gitorious.org/qt/qtjsbackend.git"
_gitname=qt5-qtjsbackend
build() {
cd "${srcdir}"
if [ ! -d "${srcdir}/${_gitname}" ]; then
git clone ${_gitroot} ${_gitname}
else
cd ${_gitname} && git pull origin
fi
msg "GIT checkout done."
cd "${srcdir}"
cp -rf "${_gitname}" "${_gitname}-build"
cd "${_gitname}-build"
/opt/qt5/bin/qmake
_x=src/3rdparty/v8/src/profile-generator.cc
sed -i $_x -e 's/#define JSON_A(s) "\["s"\]"/#define JSON_A(s) "\[" s "\]"/'
sed -i $_x -e 's/#define JSON_O(s) "{"s"}"/#define JSON_O(s) "{" s "}"/'
sed -i $_x -e 's/#define JSON_S(s) "\\""s"\\""/#define JSON_S(s) "\\"" s "\\""/'
_x=src/3rdparty/v8/src/x64/disasm-x64.cc
sed -i $_x -e 's/"V8_PTR_PREFIX"x"/" V8_PTR_PREFIX "x"/'
make
}
package() {
cd "${srcdir}/${_gitname}-build"
make INSTALL_ROOT="${pkgdir}" install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment