updated on Fri Jan 20 20:16:25 UTC 2012
[aur-mirror.git] / llmozlib2-svn / PKGBUILD
blob6200415ad8e466242cfeb8569199cb025ac36264
1 # Contributor: Lisa Denia <eiffel56@gmail.com>
2 pkgname=llmozlib2-svn
3 pkgver=26
4 pkgrel=1
5 pkgdesc="An embeddable mozilla web rendering engine"
6 arch=('i686' 'x86_64')
7 url="http://wiki.secondlife.com/wiki/LLMozLib2"
8 license=('MPL' 'GPL' 'LGPL')
9 depends=("xulrunner-linden-cvs>=20090817")
10 makedepends=('subversion' 'make' 'sed')
11 provides=("llmozlib2")
13 _svntrunk="https://svn.secondlife.com/svn/llmozlib/trunk/llmozlib2"
14 _svnmod="llmozlib2"
16 build() {
17   cd "$srcdir"
19   if [ -d $_svnmod/.svn ]; then
20     (cd $_svnmod && svn up -r $pkgver)
21   else
22     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
23   fi
25   msg "SVN checkout done or server timeout"
26   msg "Starting make..."
28   rm -rf "$srcdir/$_svnmod-build"
29   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
30   cd "$srcdir/$_svnmod-build"
32   #
33   # BUILD
34   #
36   # We have to install everything ourself since the official install script is just a dirty hack
37   _INCS="/webbrwsr/ /docshell/ /dom/ /xpcom/ /widget/ 
38         /gfx/ /string/ /uriloader/ /view/ /layout/ 
39         /content/ /locale/ /profdirserviceprovider/ /xulapp/ 
40         /pref/ /necko/ /nkcache/ /js/ /appshell/ /sdk/"
41   _LIBS="libmozjs.so libnspr4.so libplc4.so libplds4.so libprofdirserviceprovider_s.a libxpcom.so libxul.so"
42   _RUNTIME="chrome components greprefs plugins res *.so"
43   mkdir -p ${pkgdir}/usr/include/
44   mkdir -p ${pkgdir}/usr/lib/llmozlib2/lib_release
45   mkdir -p ${pkgdir}/usr/lib/llmozlib2/runtime_release
46   ln -s /opt/xulrunner-linden/include/xulrunner-1.8.1.21/ ${pkgdir}/usr/include/llmozlib2
47   for _i in ${_LIBS}; do
48     ln -s /opt/xulrunner-linden/lib/xulrunner-1.8.1.21/${_i} ${pkgdir}/usr/lib/llmozlib2/lib_release/${_i}  || return 1
49   done
50   for _i in ${_RUNTIME} $(cd /opt/xulrunner-linden/lib/xulrunner-1.8.1.21/ && /bin/ls *.so); do
51     ln -sf /opt/xulrunner-linden/lib/xulrunner-1.8.1.21/${_i} ${pkgdir}/usr/lib/llmozlib2/runtime_release/  || return 1
52   done
54   # We also have to compile and install llmozlib2 itself manually
55   _SRCS='llembeddedbrowser.cpp llembeddedbrowserwindow.cpp llmozlib2.cpp'
56   for _i in ${_SRCS}; do
57     echo "Building ${_i}"
58     g++ -DMOZILLA_INTERNAL_API -DLL_LINUX=1 -fno-stack-protector -ggdb -fvisibility=hidden\
59     $(find ${pkgdir}/usr/include/llmozlib2/ -type d | sed s/^/-I/) -c ${_i} || return 1
60   done
61   ar rcs libllmozlib2.a $(echo ${_SRCS} | sed 's/\.cpp/.o/g') || return 1
63   install -D -m644 libllmozlib2.a ${pkgdir}/usr/lib/libllmozlib2.a || return 1
64   install -D -m644 llmozlib2.h ${pkgdir}/usr/include/llmozlib2.h || return 1