1 # Contributor: Lisa Denia <eiffel56@gmail.com>
5 pkgdesc="An embeddable mozilla web rendering engine"
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"
19 if [ -d $_svnmod/.svn ]; then
20 (cd $_svnmod && svn up -r $pkgver)
22 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
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"
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
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
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
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
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