summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--community-staging/calibre/PKGBUILD67
-rw-r--r--community-staging/calibre/calibre.install12
-rw-r--r--community-staging/calibre/desktop_integration.patch68
-rw-r--r--community-staging/couchdb/PKGBUILD40
-rw-r--r--community-staging/couchdb/couchdb.install22
-rw-r--r--community-staging/couchdb/rc-script.patch90
-rw-r--r--community-staging/dwdiff/PKGBUILD24
-rw-r--r--community-staging/gnustep-base/ChangeLog6
-rw-r--r--community-staging/gnustep-base/PKGBUILD34
-rw-r--r--community-staging/goldendict/PKGBUILD37
-rw-r--r--community-staging/goldendict/goldendict-paths.diff10
-rw-r--r--community-staging/goldendict/goldendict.changelog8
-rw-r--r--community-staging/ibus-qt/PKGBUILD31
-rw-r--r--community-staging/libfbclient/ChangeLog26
-rw-r--r--community-staging/libfbclient/LICENSE44
-rwxr-xr-xcommunity-staging/libfbclient/PKGBUILD40
-rw-r--r--community-staging/mapnik/PKGBUILD52
-rw-r--r--community-staging/mapnik/mapnik.install11
-rw-r--r--community-staging/open-vm-tools/PKGBUILD68
-rw-r--r--community-staging/open-vm-tools/open-vm-tools-X11Bool.patch15
-rw-r--r--community-staging/open-vm-tools/open-vm-tools.conf.d6
-rw-r--r--community-staging/open-vm-tools/open-vm-tools.install10
-rw-r--r--community-staging/open-vm-tools/open-vm-tools.rc.d101
-rw-r--r--community-staging/open-vm-tools/scripts-network-FS19541.patch40
-rw-r--r--community-staging/open-vm-tools/scripts-network.patch63
-rw-r--r--community-staging/open-vm-tools/tools.conf1
-rw-r--r--community-staging/open-vm-tools/vmware-guestd6
-rw-r--r--community-staging/open-vm-tools/xautostart.conf6
-rw-r--r--community-staging/openttd/PKGBUILD38
-rw-r--r--community-staging/openttd/openttd.install17
-rw-r--r--community-staging/parrot/ChangeLog5
-rw-r--r--community-staging/parrot/PKGBUILD44
-rw-r--r--community-staging/sword/PKGBUILD26
-rw-r--r--community-staging/tea/PKGBUILD35
-rw-r--r--community-staging/tea/tea.desktop10
-rw-r--r--community-staging/tea/tea.install4
-rw-r--r--community-staging/tracker/PKGBUILD50
-rw-r--r--community-staging/tracker/tracker.install11
-rw-r--r--community-staging/xulrunner-oss/PKGBUILD70
-rw-r--r--community-staging/xulrunner-oss/mozconfig56
-rw-r--r--community-staging/xulrunner-oss/mozilla-pkgconfig.patch60
-rw-r--r--community-staging/xulrunner-oss/oss.patch31
-rw-r--r--community-staging/xulrunner-oss/port_gnomevfs_to_gio.patch1316
-rw-r--r--community-staging/xulrunner-oss/xulrunner-omnijar.patch1737
-rw-r--r--community-staging/xulrunner-oss/xulrunner-version.patch12
-rw-r--r--community-staging/yaz/PKGBUILD38
-rw-r--r--community-testing/perl-digest-md5/PKGBUILD30
-rw-r--r--community/balsa/PKGBUILD6
-rw-r--r--community/cegui/PKGBUILD29
-rw-r--r--community/clementine/PKGBUILD4
-rw-r--r--community/csfml/PKGBUILD60
-rw-r--r--community/etherape/PKGBUILD6
-rw-r--r--community/frogatto/PKGBUILD4
-rw-r--r--community/gambas3/PKGBUILD2
-rw-r--r--community/gnome-packagekit/PKGBUILD13
-rw-r--r--community/gource/PKGBUILD4
-rw-r--r--community/gtkwave/PKGBUILD20
-rw-r--r--community/highlight/PKGBUILD6
-rw-r--r--community/john/PKGBUILD13
-rw-r--r--community/lightspark/PKGBUILD2
-rw-r--r--community/naev/PKGBUILD18
-rw-r--r--community/performous/PKGBUILD6
-rw-r--r--community/perl-digest-md5/PKGBUILD14
-rw-r--r--community/qbittorrent/PKGBUILD12
-rw-r--r--community/rawtherapee/PKGBUILD19
-rw-r--r--community/rawtherapee/rawtherapee.install27
-rw-r--r--community/root/PKGBUILD2
-rw-r--r--community/roxterm/PKGBUILD9
-rw-r--r--community/rss-glx/PKGBUILD8
-rw-r--r--community/rss-glx/rss-glx.install1
-rw-r--r--community/sfml/PKGBUILD120
-rw-r--r--community/spring/PKGBUILD4
-rw-r--r--community/supertux/PKGBUILD15
-rw-r--r--community/tracker/PKGBUILD11
-rw-r--r--community/vdrift/PKGBUILD4
-rw-r--r--community/vnstat/PKGBUILD15
-rw-r--r--community/widelands/PKGBUILD4
-rw-r--r--core/bison/PKGBUILD10
-rw-r--r--core/bison/bison.install2
-rw-r--r--core/cryptsetup/PKGBUILD10
-rw-r--r--core/cryptsetup/encrypt_install1
-rw-r--r--core/dnsutils/PKGBUILD23
-rw-r--r--core/less/PKGBUILD12
-rw-r--r--core/lvm2/11-dm-initramfs.rules3
-rw-r--r--core/lvm2/PKGBUILD21
-rw-r--r--core/lvm2/lvm2_install1
-rw-r--r--core/make/PKGBUILD33
-rw-r--r--core/make/bug30612.patch66
-rw-r--r--core/make/bug30723.patch12
-rw-r--r--core/make/make-3.82-sort-blank.patch17
-rw-r--r--core/make/make.install2
-rw-r--r--core/module-init-tools/PKGBUILD8
-rw-r--r--core/pkg-config/PKGBUILD22
-rw-r--r--core/sudo/PKGBUILD20
-rw-r--r--extra/bind/PKGBUILD18
-rw-r--r--extra/bind/notools.patch5
-rw-r--r--extra/bind/so_bsdcompat.patch15
-rw-r--r--extra/cppunit/PKGBUILD32
-rw-r--r--extra/cppunit/gcc4.5.patch15
-rw-r--r--extra/cups/PKGBUILD21
-rw-r--r--extra/enblend-enfuse/PKGBUILD20
-rw-r--r--extra/fetchmail/PKGBUILD5
-rw-r--r--extra/fetchmail/fetchmail.install8
-rw-r--r--extra/glew/PKGBUILD12
-rw-r--r--extra/gnome-power-manager/PKGBUILD11
-rw-r--r--extra/gnome-power-manager/fix-suspend.patch31
-rw-r--r--extra/hugin/PKGBUILD4
-rw-r--r--extra/koffice/PKGBUILD23
-rw-r--r--extra/koffice/gcc46.patch23
-rw-r--r--extra/kwebkitpart/PKGBUILD20
-rw-r--r--extra/libass/PKGBUILD17
-rw-r--r--extra/libdvbpsi/PKGBUILD16
-rw-r--r--extra/libpano13/PKGBUILD21
-rw-r--r--extra/libreoffice/PKGBUILD843
-rw-r--r--extra/libreoffice/buildfix_bison25.diff23
-rw-r--r--extra/libreoffice/buildfix_boost.diff40
-rw-r--r--extra/libreoffice/buildfix_ct2n.diff17
-rw-r--r--extra/libreoffice/buildfix_i116795.diff22
-rw-r--r--extra/libreoffice/vbahelper.visibility.patch33
-rw-r--r--extra/libssh/PKGBUILD14
-rw-r--r--extra/mercurial/PKGBUILD6
-rw-r--r--extra/mysql/PKGBUILD65
-rw-r--r--extra/openjdk6/PKGBUILD8
-rw-r--r--extra/raptor/PKGBUILD6
-rw-r--r--extra/strigi/PKGBUILD8
-rw-r--r--extra/subversion/PKGBUILD22
-rw-r--r--extra/telepathy-gabble/PKGBUILD8
-rw-r--r--extra/telepathy-glib/PKGBUILD6
-rw-r--r--extra/telepathy-qt4/PKGBUILD6
-rw-r--r--extra/v4l-utils/PKGBUILD13
-rw-r--r--extra/vala/PKGBUILD8
-rw-r--r--extra/vlc/PKGBUILD4
-rw-r--r--extra/wireshark/PKGBUILD8
-rw-r--r--extra/xfce4-xkb-plugin/PKGBUILD6
-rw-r--r--extra/xvidcore/PKGBUILD12
-rw-r--r--extra/zsh/PKGBUILD17
-rw-r--r--libre/abuse-libre/PKGBUILD50
-rw-r--r--libre/abuse-libre/abuse.install14
-rw-r--r--libre/abuse-libre/rePKGBUILD33
-rw-r--r--libre/initscripts/PKGBUILD4
-rw-r--r--libre/kernel26-libre/PKGBUILD7
-rw-r--r--libre/libretools/PKGBUILD2
-rw-r--r--libre/libretools/libretools.install6
-rw-r--r--staging/boost/4994-compile-fix-for-Python32-v2.patch16
-rw-r--r--staging/boost/PKGBUILD112
-rw-r--r--staging/boost/boost-1.46.0-spirit.patch59
-rw-r--r--staging/brltty/PKGBUILD49
-rwxr-xr-xstaging/brltty/brltty68
-rw-r--r--staging/brltty/brltty-4.2-S_ISCHR.patch11
-rw-r--r--staging/brltty/brltty.conf2
-rw-r--r--staging/enchant/PKGBUILD30
-rw-r--r--staging/gptfdisk/PKGBUILD35
-rw-r--r--staging/hunspell/PKGBUILD28
-rw-r--r--staging/kdesdk/PKGBUILD243
-rw-r--r--staging/kdesdk/fix-python2-path.patch64
-rw-r--r--staging/kdesdk/kdesdk-kate.install12
-rw-r--r--staging/kdesdk/kdesdk-okteta.install12
-rw-r--r--staging/kdesdk/kdesdk.install11
-rw-r--r--staging/libreoffice/PKGBUILD701
-rw-r--r--staging/libreoffice/buildfix_64bit_system_libjpeg.diff11
-rw-r--r--staging/libreoffice/buildfix_bison25.diff23
-rw-r--r--staging/libreoffice/buildfix_boost.diff40
-rw-r--r--staging/libreoffice/buildfix_ct2n.diff17
-rw-r--r--staging/libreoffice/buildfix_i116795.diff22
-rw-r--r--staging/libreoffice/libreoffice.install25
-rw-r--r--staging/libreoffice/vbahelper.visibility.patch33
-rw-r--r--staging/libwebkit/PKGBUILD61
-rw-r--r--staging/libwebkit/gcc46.patch11
-rw-r--r--staging/libwebkit/libwebkit.install11
-rw-r--r--staging/libwebkit/replace-switch-with-given-when.patch45
-rw-r--r--staging/php/PKGBUILD379
-rw-r--r--staging/php/apache.conf13
-rw-r--r--staging/php/logrotate.d.php-fpm6
-rw-r--r--staging/php/php-fpm.conf.in.patch80
-rw-r--r--staging/php/php.ini.patch126
-rw-r--r--staging/php/rc.d.php-fpm158
-rw-r--r--staging/php/suhosin-patch-5.3.6-0.9.10.patch.gzbin0 -> 40881 bytes
-rw-r--r--staging/xulrunner/PKGBUILD63
-rw-r--r--staging/xulrunner/mozconfig56
-rw-r--r--staging/xulrunner/mozilla-pkgconfig.patch60
-rw-r--r--staging/xulrunner/port_gnomevfs_to_gio.patch1316
-rw-r--r--staging/xulrunner/xulrunner-omnijar.patch1737
-rw-r--r--staging/xulrunner/xulrunner-version.patch12
-rw-r--r--testing/coreutils/PKGBUILD69
-rw-r--r--testing/coreutils/coreutils-pam.patch428
-rw-r--r--testing/coreutils/coreutils-uname.patch173
-rw-r--r--testing/coreutils/coreutils.install21
-rw-r--r--testing/coreutils/su.pam9
-rw-r--r--testing/dvdrip/PKGBUILD4
-rw-r--r--testing/dvdrip/dvdrip.install12
-rw-r--r--testing/git/PKGBUILD14
-rw-r--r--testing/imagemagick/PKGBUILD8
-rw-r--r--testing/iproute2/PKGBUILD50
-rw-r--r--testing/man-db/1361_1360.diff25
-rw-r--r--testing/man-db/PKGBUILD60
-rw-r--r--testing/man-db/convert-mans11
-rwxr-xr-xtesting/man-db/man-db.cron.daily39
-rw-r--r--testing/man-db/man-db.install22
-rw-r--r--testing/module-init-tools/PKGBUILD39
-rw-r--r--testing/module-init-tools/modprobe.conf3
-rw-r--r--testing/net-tools/PKGBUILD43
-rw-r--r--testing/net-tools/gcc340.patch46
-rw-r--r--testing/net-tools/net-tools-1.60-2.6-compilefix.patch23
-rw-r--r--testing/net-tools/net-tools-1.60-miiioctl.patch17
-rw-r--r--testing/net-tools/net-tools-1.60-nameif.patch58
-rw-r--r--testing/net-tools/net-tools-1.60-nameif_strncpy.patch13
-rw-r--r--testing/net-tools/net-tools.patch52
-rw-r--r--testing/pidgin/PKGBUILD114
-rw-r--r--testing/pidgin/nm09-more.patch49
-rw-r--r--testing/pidgin/nm09-pidgin.patch38
-rw-r--r--testing/pidgin/pidgin.install11
-rw-r--r--testing/subversion/PKGBUILD98
-rw-r--r--testing/subversion/subversion.rpath.fix.patch10
-rw-r--r--testing/subversion/subversion.suppress.deprecation.warnings.patch22
-rw-r--r--testing/subversion/svn11
-rw-r--r--testing/subversion/svnmerge.py2370
-rwxr-xr-xtesting/subversion/svnserve42
-rw-r--r--testing/subversion/svnserve.conf7
-rw-r--r--testing/udev/81-arch.rules83
-rw-r--r--testing/udev/PKGBUILD101
-rw-r--r--testing/udev/static-audio-nodes-group.patch27
-rw-r--r--testing/udev/static-nodes-permissions.patch57
-rw-r--r--testing/udev/udev.install65
-rw-r--r--testing/yp-tools/PKGBUILD26
-rw-r--r--testing/ypbind-mt/PKGBUILD39
-rw-r--r--testing/ypbind-mt/nisdomainname.conf4
-rwxr-xr-xtesting/ypbind-mt/ypbind35
-rw-r--r--testing/ypbind-mt/ypbind.conf4
228 files changed, 16177 insertions, 910 deletions
diff --git a/community-staging/calibre/PKGBUILD b/community-staging/calibre/PKGBUILD
new file mode 100644
index 000000000..5ad10d94b
--- /dev/null
+++ b/community-staging/calibre/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 48634 2011-06-03 16:47:30Z stephane $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Petrov Roman <nwhisper@gmail.com>
+# Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com>
+
+pkgname=calibre
+pkgver=0.8.3
+pkgrel=2
+pkgdesc="Ebook management application"
+arch=('i686' 'x86_64')
+url="http://calibre-ebook.com/"
+license=('GPL3')
+depends=('python-dateutil' 'python2-cssutils' 'python2-cherrypy'
+ 'python-mechanize' 'podofo' 'libwmf' 'python-beautifulsoup'
+ 'imagemagick' 'poppler-qt' 'chmlib' 'python-lxml' 'libusb'
+ 'python-imaging' 'desktop-file-utils' 'shared-mime-info'
+ 'python-dnspython' 'unrar' 'python2-pyqt' 'icu')
+makedepends=('python2-pycountry')
+optdepends=('ipython: to use calibre-debug')
+install=calibre.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ desktop_integration.patch)
+md5sums=('aee05cac444f68491f2a3d68b22da53e'
+ 'f4b80e3b34e34bce68b3f052ff52dee8')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ #rm -rf src/{cherrypy,pyPdf}
+ rm -rf src/cherrypy
+ sed -i -e "s/ldflags = shlex.split(ldflags)/ldflags = shlex.split(ldflags) + ['-fPIC']/" setup/extensions.py
+ sed -i -e 's:\(#!/usr/bin/env[ ]\+python$\|#!/usr/bin/python$\):\12:g' \
+ $(find . -regex ".*.py\|.*.recipe")
+
+ python2 setup.py build
+ python2 setup.py resources
+ python2 setup.py translations
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ patch -Np1 -i "${srcdir}/desktop_integration.patch"
+
+ # More on desktop integration (e.g. enforce arch defaults)
+ sed -i -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \
+ -e "s|self.opts.staging_sharedir, 'man/man1'|self.opts.staging_root, 'usr/share/man/man1'|" \
+ -e "s|manpath, prog+'.1'+__appname__+'.bz2'|manpath, prog+'.1'+'.bz2'|" \
+ -e "s|old_udev = '/etc|old_udev = '${pkgdir}/etc|" \
+ -e "s/^Name=calibre/Name=Calibre/g" src/calibre/linux.py
+
+ # Fix the environment module location
+ sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py
+
+ install -d "${pkgdir}/usr/lib/python2.7/site-packages"
+ python2 setup.py install --root="${pkgdir}" --prefix=/usr \
+ --staging-bindir="${pkgdir}/usr/bin" \
+ --staging-libdir="${pkgdir}/usr/lib" \
+ --staging-sharedir="${pkgdir}/usr/share"
+
+ find "${pkgdir}" -type d -empty -delete
+
+ # Decompress the man pages so makepkg will do it for us.
+ for decom in "${pkgdir}"/usr/share/man/man1/*.bz2; do
+ bzip2 -d "${decom}"
+ done
+}
diff --git a/community-staging/calibre/calibre.install b/community-staging/calibre/calibre.install
new file mode 100644
index 000000000..6210bd0ab
--- /dev/null
+++ b/community-staging/calibre/calibre.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-staging/calibre/desktop_integration.patch b/community-staging/calibre/desktop_integration.patch
new file mode 100644
index 000000000..40d48c03e
--- /dev/null
+++ b/community-staging/calibre/desktop_integration.patch
@@ -0,0 +1,68 @@
+--- a/src/calibre/linux.py 2011-05-27 18:42:14.000000000 +0200
++++ b/src/calibre/linux.py 2011-05-29 14:57:49.000000000 +0200
+@@ -340,51 +340,39 @@
+
+ with TemporaryDirectory() as tdir:
+ with CurrentDir(tdir):
+- render_img('mimetypes/lrf.png', 'calibre-lrf.png')
+- check_call('xdg-icon-resource install --noupdate --context mimetypes --size 128 calibre-lrf.png application-lrf', shell=True)
+- self.icon_resources.append(('mimetypes', 'application-lrf', '128'))
+- check_call('xdg-icon-resource install --noupdate --context mimetypes --size 128 calibre-lrf.png text-lrs', shell=True)
+- self.icon_resources.append(('mimetypes', 'application-lrs',
+- '128'))
+- render_img('lt.png', 'calibre-gui.png')
+- check_call('xdg-icon-resource install --noupdate --size 128 calibre-gui.png calibre-gui', shell=True)
+- self.icon_resources.append(('apps', 'calibre-gui', '128'))
+- render_img('viewer.png', 'calibre-viewer.png')
+- check_call('xdg-icon-resource install --size 128 calibre-viewer.png calibre-viewer', shell=True)
+- self.icon_resources.append(('apps', 'calibre-viewer', '128'))
++ dir = os.path.join(self.opts.staging_sharedir,'../pixmaps')
++ os.mkdir(dir)
++ render_img('mimetypes/lrf.png', os.path.join(dir,'calibre-lrf.png'))
++ render_img('lt.png', os.path.join(dir, 'calibre-gui.png'))
++ render_img('viewer.png', os.path.join(dir, 'calibre-viewer.png'))
+
+ mimetypes = set([])
+ for x in all_input_formats():
+ mt = guess_type('dummy.'+x)[0]
+- if mt and 'chemical' not in mt and 'ctc-posml' not in mt:
++ if mt and 'chemical' not in mt and 'text' not in mt and 'pdf' not in mt and 'xhtml' not in mt:
+ mimetypes.add(mt)
+
+ def write_mimetypes(f):
+ f.write('MimeType=%s;\n'%';'.join(mimetypes))
+
+- f = open('calibre-lrfviewer.desktop', 'wb')
++ dir = os.path.join(self.opts.staging_sharedir,'../applications')
++ os.mkdir(dir)
++ f = open(os.path.join(dir, 'calibre-lrfviewer.desktop'), 'wb')
+ f.write(VIEWER)
+ f.close()
+- f = open('calibre-ebook-viewer.desktop', 'wb')
++ f = open(os.path.join(dir, 'calibre-ebook-viewer.desktop'), 'wb')
+ f.write(EVIEWER)
+ write_mimetypes(f)
+ f.close()
+- f = open('calibre-gui.desktop', 'wb')
++ f = open(os.path.join(dir, 'calibre-gui.desktop'), 'wb')
+ f.write(GUI)
+ write_mimetypes(f)
+ f.close()
+- des = ('calibre-gui.desktop', 'calibre-lrfviewer.desktop',
+- 'calibre-ebook-viewer.desktop')
+- for x in des:
+- cmd = ['xdg-desktop-menu', 'install', '--noupdate', './'+x]
+- check_call(' '.join(cmd), shell=True)
+- self.menu_resources.append(x)
+- check_call(['xdg-desktop-menu', 'forceupdate'])
+- f = open('calibre-mimetypes', 'wb')
++ dir = os.path.join(self.opts.staging_sharedir,'../mime/packages/')
++ os.makedirs(dir)
++ f = open(os.path.join(dir, 'calibre.xml'), 'wb')
+ f.write(MIME)
+ f.close()
+- self.mime_resources.append('calibre-mimetypes')
+- check_call('xdg-mime install ./calibre-mimetypes', shell=True)
+ except Exception:
+ if self.opts.fatal_errors:
+ raise
diff --git a/community-staging/couchdb/PKGBUILD b/community-staging/couchdb/PKGBUILD
new file mode 100644
index 000000000..4327a8094
--- /dev/null
+++ b/community-staging/couchdb/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 48637 2011-06-03 16:51:06Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
+# Previous Contributor: Michael Fellinger <m.fellinger@gmail.com>
+
+pkgname=couchdb
+pkgver=1.0.2
+pkgrel=3
+pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
+arch=('i686' 'x86_64')
+url="http://couchdb.apache.org"
+license=('APACHE')
+depends=('icu' 'erlang' 'spidermonkey' 'openssl' 'curl')
+makedepends=('gcc')
+install=couchdb.install
+options=('!libtool')
+backup=('etc/couchdb/local.ini'
+ 'etc/conf.d/couchdb'
+ 'etc/logrotate.d/couchdb')
+source=("http://www.apache.org/dist/$pkgname/$pkgver/apache-$pkgname-$pkgver.tar.gz"
+ "rc-script.patch")
+md5sums=('7ffbbe0f23f672181c89923c9f7a1de1'
+ 'e9b5595338efbdc1a5db13284a296612')
+
+build() {
+ cd "$srcdir/apache-$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+ patch etc/init/couchdb <$srcdir/rc-script.patch
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 etc/default/couchdb $pkgdir/etc/conf.d/couchdb
+ sed -i 's|\(CONFIGURATION_FILE=/etc/\)default\(/couchdb\)|\1conf.d\2|' $pkgdir/etc/rc.d/couchdb
+ sed -i 's|\(COUCHDB_OPTIONS=\)|\1"-p /var/run/couchdb/couchdb.pid"|' $pkgdir/etc/conf.d/couchdb
+ sed -i 's|$COUCHDB -s|$COUCHDB $COUCHDB_OPTIONS -s|' $pkgdir/etc/rc.d/couchdb
+ sed -i 's|su $COUCHDB_USER -c|su $COUCHDB_USER -s /bin/bash -c|' $pkgdir/etc/rc.d/couchdb
+
+ rm -rf $pkgdir/etc/default/ $pkgdir/var/run
+}
diff --git a/community-staging/couchdb/couchdb.install b/community-staging/couchdb/couchdb.install
new file mode 100644
index 000000000..5eff459c7
--- /dev/null
+++ b/community-staging/couchdb/couchdb.install
@@ -0,0 +1,22 @@
+post_install() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+ mkdir -p /var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+pre_upgrade() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+}
+
+post_upgrade() {
+ mkdir -p $pkgdir/var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+post_remove() {
+ userdel couchdb &>/dev/null
+}
diff --git a/community-staging/couchdb/rc-script.patch b/community-staging/couchdb/rc-script.patch
new file mode 100644
index 000000000..d38f4dc6c
--- /dev/null
+++ b/community-staging/couchdb/rc-script.patch
@@ -0,0 +1,90 @@
+--- couchdb.org 2011-04-01 19:56:32.000000000 +0000
++++ couchdb 2011-04-01 19:59:17.000000000 +0000
+@@ -1,4 +1,7 @@
+-#!/bin/sh -e
++#!/bin/bash
++#general config
++. /etc/rc.conf
++. /etc/rc.d/functions
+
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ # use this file except in compliance with the License. You may obtain a copy of
+@@ -29,7 +32,7 @@
+ NAME=couchdb
+ SCRIPT_NAME=`basename $0`
+ COUCHDB=/usr/bin/couchdb
+-CONFIGURATION_FILE=/etc/default/couchdb
++CONFIGURATION_FILE=/etc/conf.d/couchdb
+ RUN_DIR=/var/run/couchdb
+ LSB_LIBRARY=/lib/lsb/init-functions
+
+@@ -61,8 +63,9 @@
+ fi
+
+ start_couchdb () {
+- # Start Apache CouchDB as a background process.
++ stat_busy "Starting the CouchDB daemon"
+
++ [ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb
+ command="$COUCHDB -b"
+ if test -n "$COUCHDB_STDOUT_FILE"; then
+ command="$command -o $COUCHDB_STDOUT_FILE"
+@@ -79,38 +82,38 @@
+ mkdir -p "$RUN_DIR"
+ if test -n "$COUCHDB_USER"; then
+ chown $COUCHDB_USER "$RUN_DIR"
+- if su $COUCHDB_USER -c "$command" > /dev/null; then
+- return $SCRIPT_OK
++ if su $COUCHDB_USER -s /bin/bash -c "$command" > /dev/null; then
++ stat_done
+ else
+- return $SCRIPT_ERROR
++ stat_fail
+ fi
+ else
+ if $command > /dev/null; then
+- return $SCRIPT_OK
++ stat_done
+ else
+- return $SCRIPT_ERROR
++ stat_fail
+ fi
+ fi
+ }
+
+ stop_couchdb () {
+- # Stop the running Apache CouchDB process.
++ stat_busy "Stopping the CouchDB daemon"
+
+ command="$COUCHDB -d"
+ if test -n "$COUCHDB_OPTIONS"; then
+ command="$command $COUCHDB_OPTIONS"
+ fi
+ if test -n "$COUCHDB_USER"; then
+- if su $COUCHDB_USER -c "$command" > /dev/null; then
+- return $SCRIPT_OK
++ if su $COUCHDB_USER -s /bin/bash -c "$command" > /dev/null; then
++ stat_done
+ else
+- return $SCRIPT_ERROR
++ stat_fail
+ fi
+ else
+ if $command > /dev/null; then
+- return $SCRIPT_OK
++ stat_done
+ else
+- return $SCRIPT_ERROR
++ stat_fail
+ fi
+ fi
+ }
+@@ -118,7 +121,7 @@
+ display_status () {
+ # Display the status of the running Apache CouchDB process.
+
+- $COUCHDB -s
++ $COUCHDB $COUCHDB_OPTIONS -s
+ }
+
+ parse_script_option_list () {
diff --git a/community-staging/dwdiff/PKGBUILD b/community-staging/dwdiff/PKGBUILD
new file mode 100644
index 000000000..4585b2ae9
--- /dev/null
+++ b/community-staging/dwdiff/PKGBUILD
@@ -0,0 +1,24 @@
+# $Id: PKGBUILD 48640 2011-06-03 16:55:04Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=dwdiff
+pkgver=1.9
+pkgrel=2
+pkgdesc="a front-end for the diff program that operates at the word level instead of the line level"
+arch=('i686' 'x86_64')
+url="http://os.ghalkes.nl/dwdiff.html"
+depends=('diffutils' 'icu')
+license=('GPL')
+source=(http://os.ghalkes.nl/dist/$pkgname-$pkgver.tgz)
+md5sums=('f483d8d8dab7a972ef21d5096e07fd47')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make prefix="$pkgdir"/usr install
+}
diff --git a/community-staging/gnustep-base/ChangeLog b/community-staging/gnustep-base/ChangeLog
new file mode 100644
index 000000000..590f23f5e
--- /dev/null
+++ b/community-staging/gnustep-base/ChangeLog
@@ -0,0 +1,6 @@
+2007-07-24 Snowman <eric@archlinux>
+ * rebuilt against toolchain in current
+ * fixed SMP build
+ * fixed file ownership
+2007-06-26 tardo <tardo@nagi-fanboi.net>
+* Built for x86_64
diff --git a/community-staging/gnustep-base/PKGBUILD b/community-staging/gnustep-base/PKGBUILD
new file mode 100644
index 000000000..a2a05176b
--- /dev/null
+++ b/community-staging/gnustep-base/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 48665 2011-06-03 22:32:57Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
+# Contributor: Sebastian Sareyko <public@nooms.de>
+
+pkgname=gnustep-base
+pkgver=1.22.0
+pkgrel=2
+pkgdesc="The GNUstep base package"
+arch=('i686' 'x86_64')
+url="http://www.gnustep.org/"
+license=("GPL" "LGPL")
+depends=(libxslt avahi gmp gcc-libs openssl libffi gnustep-make gnutls)
+makedepends=(gcc-objc)
+conflicts=('gnustep-base-svn')
+groups=('gnustep-core')
+options=('!emptydirs' '!makeflags')
+source=(ftp://ftp.gnustep.org/pub/gnustep/core/$pkgname-$pkgver.tar.gz)
+md5sums=('7faab4891ae6c1e7a6c806d6da368410')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ source /etc/profile.d/GNUstep.sh
+ ./configure --prefix=/usr --sysconfdir=/etc/GNUstep --with-ffi-include=/usr/lib/libffi-3.0.9/include/
+ # fix file ownership
+ sed -i 's/tar -xf $(TIMEZONE_ARCHIVE);/tar -xf $(TIMEZONE_ARCHIVE);chown -R root:root * ;/' NSTimeZones/Makefile.postamble
+ make VERBOSE=1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ chown -R root.root "$pkgdir/"
+}
diff --git a/community-staging/goldendict/PKGBUILD b/community-staging/goldendict/PKGBUILD
new file mode 100644
index 000000000..237e20083
--- /dev/null
+++ b/community-staging/goldendict/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 48628 2011-06-03 15:58:27Z stephane $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: m0rph <m0rph.mailbox@gmail.com>
+
+pkgname=goldendict
+pkgver=1.0.1
+pkgrel=3
+pkgdesc="Feature-rich dictionary lookup program"
+arch=('i686' 'x86_64')
+url="http://goldendict.berlios.de/"
+license=('GPL3')
+depends=('hunspell' 'libvorbis' 'libxtst' 'libzip' 'openssl' 'phonon')
+makedepends=('patch')
+changelog=$pkgname.changelog
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-src.tar.bz2 \
+ $pkgname-paths.diff)
+md5sums=('d56bb854936015104029d1f0b98b61bb'
+ '4488d4353e5522796c00785f0ce265e1')
+
+build(){
+ cd ${srcdir}
+
+ patch -Np0 -i ${srcdir}/$pkgname-paths.diff
+
+ qmake
+ make
+ qmake
+}
+
+package() {
+ cd ${srcdir}
+
+ make INSTALL_ROOT=${pkgdir} install
+
+#removing unneeded
+ rm -rf ${pkgdir}/usr/share/app-install
+}
diff --git a/community-staging/goldendict/goldendict-paths.diff b/community-staging/goldendict/goldendict-paths.diff
new file mode 100644
index 000000000..812dfdb97
--- /dev/null
+++ b/community-staging/goldendict/goldendict-paths.diff
@@ -0,0 +1,10 @@
+--- goldendict.pro~ 2010-12-27 22:52:21.000000000 +0100
++++ goldendict.pro 2010-12-27 22:52:21.000000000 +0100
+@@ -63,2 +63,2 @@
+- isEmpty( PREFIX ):PREFIX = /usr/local
+- DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\"
++ isEmpty( PREFIX ):PREFIX = /usr
++ DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/goldendict/\\\"
+@@ -66 +66 @@
+- locale.path = $$PREFIX/share/apps/goldendict/locale/
++ locale.path = $$PREFIX/share/goldendict/locale/
diff --git a/community-staging/goldendict/goldendict.changelog b/community-staging/goldendict/goldendict.changelog
new file mode 100644
index 000000000..8ec311fe1
--- /dev/null
+++ b/community-staging/goldendict/goldendict.changelog
@@ -0,0 +1,8 @@
+2010-12-27 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * Update to major release 1.0.1
+
+2010-02-16 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * FS#18350 fixed in 0.9.0-5
+
+2009-06-21 Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+ * Package moved to [community] in v0.9.0
diff --git a/community-staging/ibus-qt/PKGBUILD b/community-staging/ibus-qt/PKGBUILD
new file mode 100644
index 000000000..51d3beb3d
--- /dev/null
+++ b/community-staging/ibus-qt/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 48593 2011-06-03 07:34:58Z andrea $
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: garion < garion @ mailoo.org >
+# Contributor: leemars
+
+pkgname=ibus-qt
+pkgver=1.3.1
+pkgrel=3
+pkgdesc='IBus qt library and IBus qt input method plugin'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://ibus.googlecode.com'
+depends=('qt' 'ibus' 'icu')
+makedepends=('cmake' 'automoc4' 'doxygen')
+source=("http://ibus.googlecode.com/files/${pkgname}-${pkgver}-Source.tar.gz")
+md5sums=('769e8872ca8a59327b2073ce2f142589')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+
+ cmake ../${pkgname}-${pkgver}-Source \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/community-staging/libfbclient/ChangeLog b/community-staging/libfbclient/ChangeLog
new file mode 100644
index 000000000..f02bd5ff5
--- /dev/null
+++ b/community-staging/libfbclient/ChangeLog
@@ -0,0 +1,26 @@
+
+2009-06-08 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Rebuilt for the new icu
+
+2009-04-09 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 2.1.2
+
+2008-08-10 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 2.1.1
+
+2008-05-10 Mateusz Herych <heniekk@gmail.com>
+
+ * Updated for x86_64 - 2.1.0
+
+2008-04-28 Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+ * Updated for i686 - 2.1.0
+ * Sure, firebird is the hell to build. Waiting contributions ;-)
+
+2007-07-06 tardo <tardo@nagi-fanboi.net>
+
+ * Built for x86_64
+ * This is the most fucked up pkg evar.
diff --git a/community-staging/libfbclient/LICENSE b/community-staging/libfbclient/LICENSE
new file mode 100644
index 000000000..e735b0cc1
--- /dev/null
+++ b/community-staging/libfbclient/LICENSE
@@ -0,0 +1,44 @@
+
+LICENSES
+--------
+
+The applicable and approved licenses for the source files
+of the Firebird RDBMS project are:
+
+ 1) InterBase Public License (IPL), version 1.0
+ http://bdn.borland.com/article/0,1410,30198,00.html
+
+ 2) Initial Developer's Public License (IDPL), version 1.0
+ http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl
+
+The IPL is copyright of Borland Corp., the other licenses are copyright
+by the source code authors and contributors.
+
+
+USAGE RULES
+-----------
+
+1) The source code which was released under the IPL must keep this license.
+ All modifications / adaptations of this code are still subjects of the IPL.
+
+2) The files that are derived from the IPL covered code, must also keep
+ this license. It means that if any new file contains some code covered by
+ the IPL, then this file should be released under the IPL too.
+
+3) The new files developed by the members of the Firebird project should
+ be released under the IDPL.
+
+4) The new files contributed by people who are not members of the Firebird
+ project should follow the rule #3. If an author (initial developer) doesn't
+ specify the license to be used, the person who applies the contributed code
+ to the CVS tree (a committer) becomes responsible for the license assigned
+ to the contributed code.
+
+5) Every non-binary file that exists in the CVS tree, should have a header
+ section which describes the license this code is released under. If a file
+ contains no header, it means that this code is freeware and nobody owns the
+ appropriate copyrights.
+
+
+You may find the exhibits for the approved licenses in /doc/license directory
+of the CVS tree.
diff --git a/community-staging/libfbclient/PKGBUILD b/community-staging/libfbclient/PKGBUILD
new file mode 100755
index 000000000..26409e5a0
--- /dev/null
+++ b/community-staging/libfbclient/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 48689 2011-06-04 20:28:04Z lcarlier $
+# Maintainer: Carlier Laurent <lordheavym@gmail.com>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+pkgname=libfbclient
+pkgver=2.5.0.26074
+pkgrel=3
+pkgdesc="Client library for Firebird."
+arch=('i686' 'x86_64')
+url="http://www.firebirdsql.org/"
+license=('custom')
+depends=('gcc-libs' 'icu')
+source=(http://downloads.sourceforge.net/firebird/Firebird-$pkgver-0.tar.bz2
+ LICENSE)
+md5sums=('780f162ee71f087fc277adf09f966529'
+ '0d61798861e159c85dbdf0f30fe2f2ce')
+
+build() {
+ cd $srcdir/Firebird-$pkgver-0
+
+ ./configure --prefix=/usr --with-system-icu --without-fbudf \
+ --without-fbsbin --without-fbconf --without-fbdoc --without-fbsample \
+ --without-fbsample-db --without-fbintl --without-fbmisc --without-fbhelp \
+ --without-fbsecure-db --with-fbmsg=/usr/share/firebird --without-fblog \
+ --without-fbglock --without-fbplugins
+
+ make
+}
+
+package() {
+ cd $srcdir/Firebird-$pkgver-0
+
+ mkdir -p $pkgdir/usr/{bin,share/firebird}
+ cp -R gen/firebird/{lib,include} $pkgdir/usr
+ rm -f $pkgdir/usr/lib/libedit.a
+ install -m644 gen/firebird/*.msg $pkgdir/usr/share/firebird
+ install -m755 gen/firebird/bin/fb_config $pkgdir/usr/bin
+ mkdir -p $srcdir/usr/share/licenses/$pkgname/
+ install -D -m644 ${srcdir}/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/community-staging/mapnik/PKGBUILD b/community-staging/mapnik/PKGBUILD
new file mode 100644
index 000000000..a008e5c60
--- /dev/null
+++ b/community-staging/mapnik/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 48662 2011-06-03 19:43:21Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: David Dent <thewinch@gmail.com>
+# Contributor: orbisvicis <orbisvicis@gmail.com>
+
+pkgname=mapnik
+pkgver=0.7.1
+pkgrel=10
+pkgdesc="Free Toolkit for developing mapping applications. Above all Mapnik is about rendering beautiful maps."
+arch=('i686' 'x86_64')
+url="http://mapnik.org/"
+license=('LGPL')
+depends=('boost-libs' 'icu' 'libpng' 'libjpeg' 'libtiff' 'freetype2'
+ 'libxml2' 'python2' 'proj' 'cairo' 'cairomm' 'pycairo'
+ 'postgresql-libs' 'postgis' 'gdal' 'curl' 'libtool')
+ # already in core ('zlib' 'sqlite3')
+optdepends=('libxslt: Web Map Service'
+ 'python-lxml: Web Map Service'
+ 'python-imaging: Web Map Service'
+ 'python-nose: Web Map Service'
+ 'apache: Web Map Service'
+ 'mod_fastcgi: Web Map Service - or:'
+ 'mod_fcgid: Web Map Service - or:'
+ 'mod_wsgi: Web Map Service'
+ )
+makedepends=('scons' 'boost') # already in core ('pkg-config')
+conflicts=('mapnik-svn')
+install="mapnik.install"
+source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('8f65fda2a792518d6f6be8a85f62fc73')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ #patch SConstruct so libs end up in /usr/lib not /usr/lib64 on X86_64
+ sed -i -e "/LIBDIR_SCHEMA=/s/lib64/lib/" SConstruct
+
+ sed -i 's/-ansi -Wall/-ansi -DBOOST_FILESYSTEM_VERSION=2 -Wall/' SConstruct
+
+ scons configure \
+ PREFIX="/usr" \
+ INPUT_PLUGINS=all \
+ DESTDIR="$pkgdir"
+ scons
+}
+package(){
+ cd "$srcdir/$pkgname-$pkgver"
+ scons install
+
+ # fix permissions on SCons-autogenerated files
+ chmod 644 "${pkgdir}/usr/lib/python2.7/site-packages/mapnik/paths.py"
+}
diff --git a/community-staging/mapnik/mapnik.install b/community-staging/mapnik/mapnik.install
new file mode 100644
index 000000000..46f265d5b
--- /dev/null
+++ b/community-staging/mapnik/mapnik.install
@@ -0,0 +1,11 @@
+post_install() {
+ /sbin/ldconfig
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-staging/open-vm-tools/PKGBUILD b/community-staging/open-vm-tools/PKGBUILD
new file mode 100644
index 000000000..9a97df2e4
--- /dev/null
+++ b/community-staging/open-vm-tools/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id: PKGBUILD 48659 2011-06-03 19:34:11Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Krzysztof Raczkowski <raczkow@gmail.com>
+
+pkgname=open-vm-tools
+pkgver=2011.03.28
+_pkgsubver=387002
+pkgrel=4
+pkgdesc="The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools."
+arch=('i686' 'x86_64')
+url="http://open-vm-tools.sourceforge.net/"
+license=('LGPL')
+depends=('open-vm-tools-modules' 'libdnet' 'icu' 'procps' 'glib2' 'uriparser' 'libsigc++' 'libxss')
+makedepends=('chrpath' 'doxygen' 'gtkmm' 'fuse' 'libxtst')
+optdepends=('gtkmm' 'libnotify' 'libxtst' 'fuse' 'libsm')
+options=('docs' '!libtool')
+install=$pkgname.install
+source=(http://switch.dl.sourceforge.net/$pkgname/$pkgname-$pkgver-${_pkgsubver}.tar.gz
+ scripts-network.patch
+ scripts-network-FS19541.patch
+ open-vm-tools-X11Bool.patch
+ open-vm-tools.conf.d
+ open-vm-tools.rc.d
+ tools.conf
+ vmware-guestd
+ xautostart.conf)
+md5sums=('a9c72ab0b8f7778d444e69e9d3b95527'
+ '06f7448e274db2a911f582e276088fc9'
+ 'b183ec265200d68431a5e4eb1b0c8cf5'
+ '8c333a979578bdc0c3134c1dd6bb7353'
+ '79b0a14d86191fee70a4639da8bd7785'
+ '67cb83a9e5a4dd016c1a1da2863ca36d'
+ 'b55d15e2c4be396aad709aeca91033d3'
+ '73cc1a2665b0dd62427733d62ead8b9a'
+ '75a25d83417e683957321f97a00f8465')
+
+build() {
+ cd "$srcdir/$pkgname-${pkgver}-${_pkgsubver}"
+ [ $NOEXTRACT -eq 1 ] || {
+ sed -i 's#3.2.7#3.2.8#' configure configure.ac
+ sed -i 's#CFLAGS="$CFLAGS -Werror"##' configure configure.ac
+ }
+ [ -f Makefile ] || ./configure --prefix=/usr --without-kernel-modules
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-${pkgver}-${_pkgsubver}"
+
+ make install DESTDIR=$pkgdir
+ install -D -m 755 scripts/common/vmware-xdg-detect-de $pkgdir/usr/bin/vmware-xdg-detect-de
+ chmod 07755 $pkgdir/usr/bin/vmware-user-suid-wrapper
+
+ cd $pkgdir
+ patch -Np1 -i $srcdir/scripts-network.patch etc/vmware-tools/scripts/vmware/network
+ patch -Np1 -i $srcdir/scripts-network-FS19541.patch etc/vmware-tools/scripts/vmware/network
+
+ install -D -m 755 $srcdir/open-vm-tools.rc.d $pkgdir/etc/rc.d/open-vm-tools
+ install -D -m 644 $srcdir/open-vm-tools.conf.d $pkgdir/etc/conf.d/open-vm-tools
+ install -D -m 644 $srcdir/tools.conf $pkgdir/etc/vmware-tools/tools.conf
+ install -D -m 644 $srcdir/xautostart.conf $pkgdir/etc/vmware-tools/xautostart.conf
+ install -D -m 644 $srcdir/vmware-guestd $pkgdir/etc/pam.d/vmware-guestd
+ rm -rf $pkgdir/usr/etc
+
+ ln -fs /usr/sbin/mount.vmhgfs $pkgdir/sbin/mount.vmhgfs
+
+ cd $pkgdir && find -type f -exec sh -c "file {} | grep ELF >/dev/null && echo {} && chrpath -d {}" \;
+}
diff --git a/community-staging/open-vm-tools/open-vm-tools-X11Bool.patch b/community-staging/open-vm-tools/open-vm-tools-X11Bool.patch
new file mode 100644
index 000000000..f12581807
--- /dev/null
+++ b/community-staging/open-vm-tools/open-vm-tools-X11Bool.patch
@@ -0,0 +1,15 @@
+diff -wbBur open-vm-tools-2010.08.24-292196.org/lib/include/vm_basic_types.h open-vm-tools-2010.08.24-292196/lib/include/vm_basic_types.h
+--- open-vm-tools-2010.08.24-292196.org/lib/include/vm_basic_types.h 2010-08-24 19:59:22.000000000 +0000
++++ open-vm-tools-2010.08.24-292196/lib/include/vm_basic_types.h 2010-08-30 09:38:48.000000000 +0000
+@@ -83,8 +83,11 @@
+
+ /* STRICT ANSI means the Xserver build and X defines Bool differently. */
+ #if !defined(__STRICT_ANSI__) || defined(__FreeBSD__) || defined(__MINGW32__)
++# ifndef _XTYPEDEF_BOOL
++# define _XTYPEDEF_BOOL
+ typedef char Bool;
+ #endif
++#endif
+
+ #ifndef FALSE
+ #define FALSE 0
diff --git a/community-staging/open-vm-tools/open-vm-tools.conf.d b/community-staging/open-vm-tools/open-vm-tools.conf.d
new file mode 100644
index 000000000..83f7864e8
--- /dev/null
+++ b/community-staging/open-vm-tools/open-vm-tools.conf.d
@@ -0,0 +1,6 @@
+# Enable support for Drag'n'Drop
+VM_DRAG_AND_DROP="yes"
+
+# vmware-guestd settings
+GUESTD_BIN="/usr/sbin/vmware-guestd"
+PIDFILE="/var/run/vmware-guestd.pid"
diff --git a/community-staging/open-vm-tools/open-vm-tools.install b/community-staging/open-vm-tools/open-vm-tools.install
new file mode 100644
index 000000000..88d9b88e6
--- /dev/null
+++ b/community-staging/open-vm-tools/open-vm-tools.install
@@ -0,0 +1,10 @@
+post_install() {
+ [ ! -d "/mnt/hgfs" ] && mkdir /mnt/hgfs
+ echo ">>>"
+ echo ">>> You can mount VMware Shared Folders via:"
+ echo ">>> mount -t vmhgfs .host:/ /mnt/hgfs"
+ echo ">>>"
+ echo ">>> or by adding this line to /etc/fstab:"
+ echo ">>> .host:/ /mnt/hgfs vmhgfs defaults 0 0"
+ echo ">>>"
+}
diff --git a/community-staging/open-vm-tools/open-vm-tools.rc.d b/community-staging/open-vm-tools/open-vm-tools.rc.d
new file mode 100644
index 000000000..0c9221489
--- /dev/null
+++ b/community-staging/open-vm-tools/open-vm-tools.rc.d
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/open-vm-tools ] && . /etc/conf.d/open-vm-tools
+
+PID=`pidof -o %PPID /usr/bin/vmtoolsd`
+case "$1" in
+ start)
+ stat_busy "Starting Open Virtual Machine Tools"
+
+ if [ "$VM_DRAG_AND_DROP" == "yes" ]; then
+ VMBLOCK=`grep -w vmblock /proc/modules`
+ [ -z "$VMBLOCK" ] && modprobe vmblock
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi
+
+ DND_TMPDIR="/tmp/VMwareDnD"
+ if [ ! -d "$DND_TMPDIR" ]; then
+ mkdir $DND_TMPDIR
+ chmod 1777 $DND_TMPDIR
+ fi
+
+ mount -t vmblock none /proc/fs/vmblock/mountPoint
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi
+ fi
+
+
+ for m in vmhgfs vmsync; do
+ VMMOD=`grep -w $m /proc/modules`
+ [ -z "$VMMOD" ] && \
+ { modprobe $m
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi; }
+ done
+
+
+ [ -z "$PID" ] && /usr/bin/vmtoolsd --background $PIDFILE
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon open-vm-tools
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Open Virtual Machine Tools"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+# if [ $? -gt 0 ]; then
+# stat_fail
+# exit 1
+# fi
+
+ for m in vmhgfs vmsync vmci; do
+ VMMOD=`grep -w $m /proc/modules`
+ [ ! -z "$VMMOD" ] && rmmod $m
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 4
+ fi
+ done
+
+ if [ "$VM_DRAG_AND_DROP" == "yes" ]; then
+ MOUNTPOINT=`grep -w "none /proc/fs/vmblock/mountPoint vmblock" /proc/modules`
+ [ -z "$MOUNTPOINT" ] && umount /proc/fs/vmblock/mountPoint
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 5
+ fi
+
+ DND_TMPDIR="/tmp/VMwareDnD"
+ rm -r $DND_TMPDIR
+
+ VMBLOCK=`grep -w vmblock /proc/modules`
+ [ ! -z "$VMBLOCK" ] && rmmod vmblock
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 6
+ fi
+ fi
+
+ rm_daemon open-vm-tools
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/open-vm-tools/scripts-network-FS19541.patch b/community-staging/open-vm-tools/scripts-network-FS19541.patch
new file mode 100644
index 000000000..1f65b9824
--- /dev/null
+++ b/community-staging/open-vm-tools/scripts-network-FS19541.patch
@@ -0,0 +1,40 @@
+--- network 2010-04-28 12:30:51.000000000 +0200
++++ network.bak 2010-05-20 12:12:50.000000000 +0200
+@@ -76,7 +76,7 @@
+ else
+ echo `date` "[rescue_nic] activating $nic ..."
+
+- ifup $nic
++ ifconfig $nic up
+ exitCode=`expr $exitCode \| $?`
+ fi
+ done < $activeList
+@@ -103,7 +103,7 @@
+ TranquilizeNetworkManager() {
+ # `which' may be a bit noisy, so we'll shush it.
+ dbusSend=`which dbus-send 2>/dev/null`
+- if [ $? -eq 0 ]; then
++ if [ $? -eq 0 ] && [ `pidof dbus-daemon` ]; then
+ # NetworkManager 0.6
+ $dbusSend --system --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager \
+@@ -133,7 +133,7 @@
+ WakeNetworkManager() {
+ # `which' may be a bit noisy, so we'll shush it.
+ dbusSend=`which dbus-send 2>/dev/null`
+- if [ $? -eq 0 ]; then
++ if [ $? -eq 0 ] && [ `pidof dbus-daemon` ]; then
+ # NetworkManager 0.6
+ $dbusSend --system --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager \
+@@ -165,8 +165,8 @@
+
+ # XXX Are these really necessary? If so, we should have seen customer
+ # complaints by now.
+- which ifup >/dev/null 2>&1 || Panic "ifup not in search path."
+- which ifconfig >/dev/null 2>&1 || Panic "ifconfig not in search path."
++# which ifup >/dev/null 2>&1 || Panic "ifup not in search path."
++ which ifconfig >/dev/null 2>&1 || Panic "ifconfig not in search path."
+
+ case "$1" in
+ poweron-vm)
diff --git a/community-staging/open-vm-tools/scripts-network.patch b/community-staging/open-vm-tools/scripts-network.patch
new file mode 100644
index 000000000..13ea7f565
--- /dev/null
+++ b/community-staging/open-vm-tools/scripts-network.patch
@@ -0,0 +1,63 @@
+--- network.org 2010-04-28 10:21:14.000000000 +0000
++++ network 2010-04-28 10:24:00.000000000 +0000
+@@ -34,51 +34,6 @@
+
+
+ #
+-# find_networking_script --
+-#
+-# Searches common Linux distro init/rc paths to find a singular network
+-# services script.
+-#
+-# Result:
+-# Returns a valid networking script path on success or "error" on failure.
+-#
+-# Side effects:
+-# None.
+-#
+-
+-find_networking_script() {
+- local script="error"
+- for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do
+- if [ -d "$dir/rc0.d" ] &&
+- [ -d "$dir/rc1.d" ] &&
+- [ -d "$dir/rc2.d" ] &&
+- [ -d "$dir/rc3.d" ] &&
+- [ -d "$dir/rc4.d" ] &&
+- [ -d "$dir/rc5.d" ] &&
+- [ -d "$dir/rc6.d" ]; then
+-
+- # Now find the appropriate networking script.
+- if [ -d "$dir/init.d" ]; then
+- if [ -x "$dir/init.d/network" ]; then
+- script="$dir/init.d/network"
+- elif [ -x "$dir/init.d/networking" ]; then
+- script="$dir/init.d/networking"
+- fi
+- else
+- if [ -x "$dir/network" ]; then
+- script="$dir/network"
+- elif [ -x "$dir/networking" ]; then
+- script="$dir/networking"
+- fi
+- fi
+- fi
+- done
+-
+- echo "$script"
+-}
+-
+-
+-#
+ # save_active_NIC_list --
+ #
+ # Records a list of every active NIC to /var/run/vmware-active-nics.
+@@ -205,7 +160,7 @@
+ exitCode=0
+ activeList=/var/run/vmware-active-nics
+
+- networkScript=`find_networking_script`
++ networkScript=/etc/rc.d/network
+ [ "$networkScript" != "error" ] || Panic "Cannot find system networking script."
+
+ # XXX Are these really necessary? If so, we should have seen customer
diff --git a/community-staging/open-vm-tools/tools.conf b/community-staging/open-vm-tools/tools.conf
new file mode 100644
index 000000000..0bb2681b1
--- /dev/null
+++ b/community-staging/open-vm-tools/tools.conf
@@ -0,0 +1 @@
+bindir = "/usr/bin"
diff --git a/community-staging/open-vm-tools/vmware-guestd b/community-staging/open-vm-tools/vmware-guestd
new file mode 100644
index 000000000..ac80c0385
--- /dev/null
+++ b/community-staging/open-vm-tools/vmware-guestd
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth sufficient /lib/security/pam_unix2.so shadow nullok
+auth required /lib/security/pam_unix_auth.so shadow nullok
+account sufficient /lib/security/pam_unix2.so
+account required /lib/security/pam_unix_acct.so
diff --git a/community-staging/open-vm-tools/xautostart.conf b/community-staging/open-vm-tools/xautostart.conf
new file mode 100644
index 000000000..829f379ce
--- /dev/null
+++ b/community-staging/open-vm-tools/xautostart.conf
@@ -0,0 +1,6 @@
+gnome-panel
+ksmserver
+startkde
+kwrapper
+panel
+xfce4-panel
diff --git a/community-staging/openttd/PKGBUILD b/community-staging/openttd/PKGBUILD
new file mode 100644
index 000000000..5a2aedccc
--- /dev/null
+++ b/community-staging/openttd/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 48655 2011-06-03 19:25:38Z stephane $
+# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
+
+pkgname=openttd
+pkgver=1.1.0
+pkgrel=2
+pkgdesc='An engine for running Transport Tycoon Deluxe.'
+arch=('i686' 'x86_64')
+url='http://www.openttd.org'
+license=('GPL')
+depends=('libpng' 'sdl' 'icu' 'fontconfig' 'lzo2' 'hicolor-icon-theme' 'desktop-file-utils')
+install=openttd.install
+optdepends=('openttd-opengfx: free graphics'
+ 'openttd-opensfx: free soundset')
+source=("http://binaries.openttd.org/releases/${pkgver}/${pkgname}-${pkgver}-source.tar.xz")
+md5sums=('b5b1f2ecc7327505e360047236b09d06')
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ ./configure \
+ --prefix-dir=/usr \
+ --binary-name=${pkgname} \
+ --binary-dir=bin \
+ --data-dir=share/${pkgname} \
+ --install-dir=${pkgdir} \
+ --doc-dir=share/doc/${pkgname} \
+ --menu-name="OpenTTD" \
+ --personal-dir=.${pkgname}
+
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make install
+}
diff --git a/community-staging/openttd/openttd.install b/community-staging/openttd/openttd.install
new file mode 100644
index 000000000..85b22a1c5
--- /dev/null
+++ b/community-staging/openttd/openttd.install
@@ -0,0 +1,17 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor > /dev/null 2>&1
+ update-desktop-database > /dev/null 2>&1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ update-desktop-database > /dev/null 2>&1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor > /dev/null 2>&1
+ update-desktop-database > /dev/null 2>&1
+}
diff --git a/community-staging/parrot/ChangeLog b/community-staging/parrot/ChangeLog
new file mode 100644
index 000000000..725287638
--- /dev/null
+++ b/community-staging/parrot/ChangeLog
@@ -0,0 +1,5 @@
+
+2008-01-06 Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+ * Added for x86_64
+
diff --git a/community-staging/parrot/PKGBUILD b/community-staging/parrot/PKGBUILD
new file mode 100644
index 000000000..eb5f198b7
--- /dev/null
+++ b/community-staging/parrot/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 48652 2011-06-03 17:21:22Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributer: mpie <michael.kyne-phillips1@ntlworld.com>
+
+pkgname=parrot
+pkgver=3.3.0
+#_rel=devel
+_rel=stable
+pkgrel=2
+pkgdesc="standalone virtual machine that can be used to execute bytecode compiled dynamic languages"
+arch=(i686 x86_64)
+url="http://www.parrotcode.org/"
+license=('GPL')
+depends=('gmp' 'gdbm' 'readline' 'icu' 'openssl' 'libffi')
+makedepends=('perl-json')
+optdepends=('freeglut')
+options=(!emptydirs !makeflags)
+source=(ftp://ftp.parrot.org/pub/parrot/releases/${_rel}/$pkgver/parrot-$pkgver.tar.gz)
+md5sums=('335d50fbef245bfe6d0bb277e224c728')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ sed -i 's#auto::sha1##' lib/Parrot/Configure/Step/List.pm
+ sed -i 's#auto::git_describe##' lib/Parrot/Configure/Step/List.pm
+
+ [ $NOEXTRACT -eq 1 ] || perl Configure.pl --prefix=/usr --parrot_is_shared
+
+ find -type f -name Makefile | while read F; do
+ grep "$srcdir" $F && sed -i "s#-Wl,-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
+ grep "$srcdir" $F && sed -i "s#-rpath=$srcdir/parrot-$pkgver/blib/lib##" $F || true
+ done
+
+ OLD_LIB_PATH=$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$srcdir/parrot-$pkgver/blib/lib
+ make -j1 all parrot_utils docs html RPATH_BLIB=
+
+ export LD_LIBRARY_PATH=`pwd`/blib/lib
+ make -j1 DESTDIR=$pkgdir install-dev
+
+ sed -i "s#$srcdir#/usr/src#" $pkgdir/usr/lib/parrot/$pkgver/tools/lib/Parrot/Config/Generated.pm
+
+ export LD_LIBRARY_PATH=$OLD_LIB_PATH
+}
diff --git a/community-staging/sword/PKGBUILD b/community-staging/sword/PKGBUILD
new file mode 100644
index 000000000..0ad02180e
--- /dev/null
+++ b/community-staging/sword/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: TripleE <eric1548@yahoo.com>
+
+pkgname=sword
+pkgver=1.6.2
+pkgrel=3
+pkgdesc="SWORD libraries for Bible programs"
+arch=('i686' 'x86_64')
+url="http://www.crosswire.org/sword/index.jsp"
+license=('GPL')
+depends=('curl' 'icu' 'clucene')
+source=(http://www.crosswire.org/ftpmirror/pub/${pkgname}/source/v1.6/${pkgname}-${pkgver}.tar.gz)
+md5sums=('a7dc4456e20e915fec46d774b690e305')
+backup=('etc/sword.conf')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --with-icu
+ make
+}
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ make DESTDIR="${pkgdir}" install_config
+}
+
diff --git a/community-staging/tea/PKGBUILD b/community-staging/tea/PKGBUILD
new file mode 100644
index 000000000..4ab5fde5d
--- /dev/null
+++ b/community-staging/tea/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 48620 2011-06-03 13:51:59Z ibiru $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Roman Kyrylych <roman@archlinux.org>
+# Contributor: Michal Kaliszka <desmont@gmail.com>
+# Contributor: Zsolt Varadi <sysop_xxl@fibermail.hu>
+
+pkgname=tea
+pkgver=29.0.3
+pkgrel=2
+pkgdesc="A QT-based text editor for Linux and *BSD. With an ultimate small size TEA provides you hundreds of functions."
+arch=('i686' 'x86_64')
+url="http://tea-editor.sourceforge.net/"
+license=('GPL')
+depends=('qt' 'aspell' 'hunspell')
+install=tea.install
+source=(http://downloads.sourceforge.net/tea-editor/${pkgname}-${pkgver}.tar.bz2
+ tea.desktop)
+md5sums=('1c900e7f57a0fe72fb4cc481450a5b32'
+ '377ace3363124f4c086de0babb820761')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ qmake PREFIX=/usr/bin
+ make
+}
+
+package(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make INSTALL_ROOT="${pkgdir}" install
+
+ install -Dm644 "${srcdir}/tea.desktop" "${pkgdir}/usr/share/applications/tea.desktop"
+ install -Dm644 icons/tea_icon_v2.png "${pkgdir}/usr/share/pixmaps/tea.png"
+}
diff --git a/community-staging/tea/tea.desktop b/community-staging/tea/tea.desktop
new file mode 100644
index 000000000..818704a26
--- /dev/null
+++ b/community-staging/tea/tea.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Tea
+Comment=A small programmer's QT editor
+Exec=tea %U
+Terminal=false
+Type=Application
+StartupNotify=true
+Icon=tea.png
+Categories=Application;Utility;TextEditor;
diff --git a/community-staging/tea/tea.install b/community-staging/tea/tea.install
new file mode 100644
index 000000000..d7904254b
--- /dev/null
+++ b/community-staging/tea/tea.install
@@ -0,0 +1,4 @@
+post_upgrade() {
+ echo "############################################"
+ echo "for the old GTK branch of TEA install teagtk"
+}
diff --git a/community-staging/tracker/PKGBUILD b/community-staging/tracker/PKGBUILD
new file mode 100644
index 000000000..f6ec9331b
--- /dev/null
+++ b/community-staging/tracker/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 48646 2011-06-03 17:05:43Z stephane $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Alexander Fehr <pizzapunk gmail com>
+
+pkgname=tracker
+pkgver=0.10.15
+pkgrel=2
+pkgdesc="Powerful object database, tag/metadata database, search tool and indexer"
+arch=('i686' 'x86_64')
+url="http://www.gnome.org/projects/tracker/"
+license=('GPL')
+depends=('upower' 'poppler-glib' 'gstreamer0.10-base' 'libgee' 'gnome-desktop' 'libnotify' 'xdg-utils' 'gtkhtml'
+ 'libgsf' 'gnome-panel-bonobo' 'exempi' 'networkmanager')
+makedepends=('intltool' 'gnome-panel' 'nautilus' 'evolution' 'totem-plparser' 'icu')
+optdepends=('nautilus'
+ 'enca'
+ 'gtkhtml'
+ 'gnome-panel'
+ 'totem-plparser'
+ 'icu'
+ 'taglib'
+ 'giflib')
+options=('!libtool')
+conflicts=('libtracker')
+provides=("libtracker")
+install=tracker.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/tracker/0.10/tracker-$pkgver.tar.bz2)
+md5sums=('c948ef3988b08e81cad3ff980b17a0fd')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # python2 fix
+ export PYTHON=`which python2`
+ for file in tests/functional-tests/*.py; do
+ sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
+ sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' $file
+ done
+
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/$pkgname \
+ --enable-video-extractor=gstreamer --disable-unac --disable-hal \
+ --disable-devkit-power --disable-miner-evolution
+ touch docs/manpages/tracker-search-bar.1
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/community-staging/tracker/tracker.install b/community-staging/tracker/tracker.install
new file mode 100644
index 000000000..b95cc069d
--- /dev/null
+++ b/community-staging/tracker/tracker.install
@@ -0,0 +1,11 @@
+post_install() {
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+}
diff --git a/community-staging/xulrunner-oss/PKGBUILD b/community-staging/xulrunner-oss/PKGBUILD
new file mode 100644
index 000000000..613d9f41b
--- /dev/null
+++ b/community-staging/xulrunner-oss/PKGBUILD
@@ -0,0 +1,70 @@
+# $Id: PKGBUILD 114705 2011-03-15 15:11:28Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+pkgname=xulrunner-oss
+pkgver=2.0.1
+_ffoxver=4.0.1
+pkgrel=2
+pkgdesc="Mozilla Runtime Environment compiled with OSS support"
+arch=('i686' 'x86_64')
+license=('MPL' 'GPL' 'LGPL')
+depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'libevent' 'sqlite3>=3.7.4' 'libnotify')
+makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13')
+url="http://wiki.mozilla.org/XUL:Xul_Runner"
+source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
+ mozconfig
+ mozilla-pkgconfig.patch
+ xulrunner-version.patch
+ xulrunner-omnijar.patch
+ port_gnomevfs_to_gio.patch
+ oss.patch)
+options=('!emptydirs')
+conflicts=('xulrunner')
+provides=("xulrunner=${pkgver}")
+md5sums=('9abda7d23151e97913c8555a64c13f34'
+ '2358a2ddd35bcdd62ff42442dfe548d9'
+ '639ea80e823543dd415b90c0ee804186'
+ 'a0236f6c3e55f60b7888d8cf137ff209'
+ '0bf82bc6677e3ce57fd20a147fe8d7b1'
+ '42f83468b296452fb754a81a4317ca64'
+ '81032ce49c2a5ac15d62155bcc42d3ed')
+
+build() {
+ cd "${srcdir}/mozilla-2.0"
+ cp "${srcdir}/mozconfig" .mozconfig
+
+ #fix libdir/sdkdir - fedora
+ patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch"
+
+ #Force installation to the same path for every version
+ patch -Np1 -i "${srcdir}/xulrunner-version.patch"
+
+ patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch"
+
+ patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch"
+
+ patch -Np0 -i "${srcdir}/oss.patch"
+ sed -i 's/sydney_audio_alsa/sydney_audio_oss/' media/libsydneyaudio/src/Makefile.in
+ sed -i '/EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)/d' layout/build/Makefile.in
+ sed -i '/EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)/d' toolkit/library/libxul-config.mk
+
+ unset CFLAGS
+ unset CXXFLAGS
+ export CXXFLAGS="-fpermissive"
+
+ make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
+}
+
+package() {
+ cd "${srcdir}/mozilla-2.0"
+ make -j1 -f client.mk DESTDIR="${pkgdir}" install
+
+ #Remove included dictionaries, add symlink to system myspell path.
+ #Note: this will cause file conflicts when users have installed dictionaries in the old location
+ rm -rf "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
+ ln -sf /usr/share/myspell/dicts "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
+
+ # add xulrunner library path to ld.so.conf
+ install -d ${pkgdir}/etc/ld.so.conf.d
+ echo "/usr/lib/xulrunner-2.0" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf
+}
diff --git a/community-staging/xulrunner-oss/mozconfig b/community-staging/xulrunner-oss/mozconfig
new file mode 100644
index 000000000..03a352920
--- /dev/null
+++ b/community-staging/xulrunner-oss/mozconfig
@@ -0,0 +1,56 @@
+. $topsrcdir/xulrunner/config/mozconfig
+
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-system-png
+ac_add_options --with-system-libevent
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-cairo
+ac_add_options --with-pthreads
+
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-extensions=default
+ac_add_options --enable-startup-notification
+ac_add_options --enable-pango
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-smil
+ac_add_options --enable-canvas3d
+ac_add_options --enable-places
+ac_add_options --enable-shared-js
+ac_add_options --enable-url-classifier
+
+ac_add_options --enable-optimize
+ac_add_options --enable-strip
+ac_add_options --enable-install-strip
+ac_add_options --enable-jemalloc
+ac_add_options --enable-xterm-updates
+ac_add_options --enable-printing
+ac_add_options --enable-xinerama
+
+ac_add_options --disable-javaxpcom
+ac_add_options --disable-crashreporter
+ac_add_options --disable-updater
+ac_add_options --disable-tests
+ac_add_options --disable-xprint
+ac_add_options --disable-mochitest
+ac_add_options --disable-debug
+ac_add_options --disable-installer
+ac_add_options --disable-pedantic
+
+ac_add_options --enable-gio
+ac_add_options --disable-gnomevfs
+ac_add_options --enable-gconf
+ac_add_options --enable-libnotify
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
diff --git a/community-staging/xulrunner-oss/mozilla-pkgconfig.patch b/community-staging/xulrunner-oss/mozilla-pkgconfig.patch
new file mode 100644
index 000000000..2203efcde
--- /dev/null
+++ b/community-staging/xulrunner-oss/mozilla-pkgconfig.patch
@@ -0,0 +1,60 @@
+diff -Nur mozilla-2.0.orig/xulrunner/installer/libxul-embedding.pc.in mozilla-2.0/xulrunner/installer/libxul-embedding.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/libxul-embedding.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/libxul-embedding.pc.in 2011-03-13 03:25:12.350027359 -0700
+@@ -6,5 +6,6 @@
+ Name: libxul-embedding
+ Description: Static library for version-independent embedding of the Mozilla runtime
+ Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib -lxpcomglue -ldl
+ Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
+diff -Nur mozilla-2.0.orig/xulrunner/installer/libxul.pc.in mozilla-2.0/xulrunner/installer/libxul.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/libxul.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/libxul.pc.in 2011-03-13 03:25:28.010027359 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+ idldir=%idldir%
+
+diff -Nur mozilla-2.0.orig/xulrunner/installer/Makefile.in mozilla-2.0/xulrunner/installer/Makefile.in
+--- mozilla-2.0.orig/xulrunner/installer/Makefile.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/Makefile.in 2011-03-13 03:25:55.570027359 -0700
+@@ -121,6 +121,7 @@
+ -e "s|%includedir%|$(includedir)|" \
+ -e "s|%idldir%|$(idldir)|" \
+ -e "s|%sdkdir%|$(sdkdir)|" \
++ -e "s|%libdir%|$(installdir)|" \
+ -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
+ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
+ -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-03-13 03:26:18.676694023 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-03-13 03:26:41.566694025 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-js.pc.in mozilla-2.0/xulrunner/installer/mozilla-js.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-js.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-js.pc.in 2011-03-13 03:27:19.680027357 -0700
+@@ -7,4 +7,4 @@
+ Version: %MOZILLA_VERSION%
+ Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
+-Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
++Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE
diff --git a/community-staging/xulrunner-oss/oss.patch b/community-staging/xulrunner-oss/oss.patch
new file mode 100644
index 000000000..ca79879fd
--- /dev/null
+++ b/community-staging/xulrunner-oss/oss.patch
@@ -0,0 +1,31 @@
+--- configure.in 2011-03-16 04:58:10.640027357 -0700
++++ configure.in.orig 2011-03-16 04:58:39.313360691 -0700
+@@ -6266,20 +6266,6 @@
+ AC_DEFINE(MOZ_TREMOR)
+ fi
+
+-dnl ========================================================
+-dnl = Check alsa availability on Linux if using sydneyaudio
+-dnl ========================================================
+-
+-dnl If using sydneyaudio with Linux, ensure that the alsa library is available
+-if test -n "$MOZ_SYDNEYAUDIO"; then
+- case "$target_os" in
+-linux*)
+- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
+- [echo "$MOZ_ALSA_PKG_ERRORS"
+- AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
+- ;;
+- esac
+-fi
+
+ dnl ========================================================
+ dnl Splashscreen
+@@ -9294,7 +9280,6 @@
+ AC_SUBST(MOZ_TREMOR)
+ AC_SUBST(MOZ_WEBM)
+ AC_SUBST(MOZ_OGG)
+-AC_SUBST(MOZ_ALSA_LIBS)
+ AC_SUBST(VPX_AS)
+ AC_SUBST(VPX_ASFLAGS)
+ AC_SUBST(VPX_DASH_C_FLAG)
diff --git a/community-staging/xulrunner-oss/port_gnomevfs_to_gio.patch b/community-staging/xulrunner-oss/port_gnomevfs_to_gio.patch
new file mode 100644
index 000000000..797baff42
--- /dev/null
+++ b/community-staging/xulrunner-oss/port_gnomevfs_to_gio.patch
@@ -0,0 +1,1316 @@
+diff -r 49a1b2aa43c5 extensions/gio/Makefile.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/Makefile.in Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,69 @@
++# vim:set ts=8 sw=8 sts=8 noet:
++# ***** BEGIN LICENSE BLOCK *****
++# Version: MPL 1.1/GPL 2.0/LGPL 2.1
++#
++# The contents of this file are subject to the Mozilla Public License Version
++# 1.1 (the "License"); you may not use this file except in compliance with
++# the License. You may obtain a copy of the License at
++# http://www.mozilla.org/MPL/
++#
++# Software distributed under the License is distributed on an "AS IS" basis,
++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++# for the specific language governing rights and limitations under the
++# License.
++#
++# The Original Code is the Mozilla gnome-vfs extension.
++#
++# The Initial Developer of the Original Code is IBM Corporation.
++#
++# Portions created by IBM Corporation are Copyright (C) 2004
++# IBM Corporation. All Rights Reserved.
++#
++# Contributor(s):
++# Darin Fisher <darin@meer.net>
++# Jan Horak <jhorak@redhat.com>
++#
++# Alternatively, the contents of this file may be used under the terms of
++# either the GNU General Public License Version 2 or later (the "GPL"), or
++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++# in which case the provisions of the GPL or the LGPL are applicable instead
++# of those above. If you wish to allow use of your version of this file only
++# under the terms of either the GPL or the LGPL, and not to allow others to
++# use your version of this file under the terms of the MPL, indicate your
++# decision by deleting the provisions above and replace them with the notice
++# and other provisions required by the GPL or the LGPL. If you do not delete
++# the provisions above, a recipient may use your version of this file under
++# the terms of any one of the MPL, the GPL or the LGPL.
++#
++# ***** END LICENSE BLOCK *****
++
++DEPTH = ../..
++topsrcdir = @top_srcdir@
++srcdir = @srcdir@
++VPATH = @srcdir@
++
++include $(DEPTH)/config/autoconf.mk
++
++MODULE = nkgio
++LIBRARY_NAME = nkgio
++SHORT_LIBNAME = nkgio
++IS_COMPONENT = 1
++
++CPPSRCS = \
++ nsGIOProtocolHandler.cpp \
++ $(NULL)
++
++LOCAL_INCLUDES = $(MOZ_GIO_CFLAGS)
++
++EXTRA_DSO_LDOPTS = \
++ $(XPCOM_GLUE_LDOPTS) \
++ $(NSPR_LIBS) \
++ $(MOZ_GIO_LIBS) \
++ $(NULL)
++
++# make sure this component is never statically linked into the main
++# application. this is necessary since we don't want to force users
++# to install gio in order to use the rest of mozilla ;-)
++FORCE_SHARED_LIB= 1
++
++include $(topsrcdir)/config/rules.mk
+diff -r 49a1b2aa43c5 extensions/gio/makefiles.sh
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/makefiles.sh Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,41 @@
++#! /bin/sh
++# ***** BEGIN LICENSE BLOCK *****
++# Version: MPL 1.1/GPL 2.0/LGPL 2.1
++#
++# The contents of this file are subject to the Mozilla Public License Version
++# 1.1 (the "License"); you may not use this file except in compliance with
++# the License. You may obtain a copy of the License at
++# http://www.mozilla.org/MPL/
++#
++# Software distributed under the License is distributed on an "AS IS" basis,
++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++# for the specific language governing rights and limitations under the
++# License.
++#
++# The Original Code is Mozilla Build System
++#
++# The Initial Developer of the Original Code is
++# Ben Turner <mozilla@songbirdnest.com>
++#
++# Portions created by the Initial Developer are Copyright (C) 2007
++# the Initial Developer. All Rights Reserved.
++#
++# Contributor(s):
++#
++# Alternatively, the contents of this file may be used under the terms of
++# either the GNU General Public License Version 2 or later (the "GPL"), or
++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++# in which case the provisions of the GPL or the LGPL are applicable instead
++# of those above. If you wish to allow use of your version of this file only
++# under the terms of either the GPL or the LGPL, and not to allow others to
++# use your version of this file under the terms of the MPL, indicate your
++# decision by deleting the provisions above and replace them with the notice
++# and other provisions required by the GPL or the LGPL. If you do not delete
++# the provisions above, a recipient may use your version of this file under
++# the terms of any one of the MPL, the GPL or the LGPL.
++#
++# ***** END LICENSE BLOCK *****
++
++add_makefiles "
++ extensions/gio/Makefile
++"
+diff -r 49a1b2aa43c5 extensions/gio/nsGIOProtocolHandler.cpp
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/nsGIOProtocolHandler.cpp Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,1163 @@
++/* vim:set ts=2 sw=2 et cindent: */
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is the Mozilla gnome-vfs extension.
++ *
++ * The Initial Developer of the Original Code is IBM Corporation.
++ *
++ * Portions created by IBM Corporation are Copyright (C) 2004
++ * IBM Corporation. All Rights Reserved.
++ *
++ * Contributor(s):
++ * Darin Fisher <darin@meer.net>
++ * Jan Horak <jhorak@redhat.com>
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++/*
++ * This code is based on original Mozilla gnome-vfs extension. It implements
++ * input stream provided by GVFS/GIO.
++*/
++#include "mozilla/ModuleUtils.h"
++#include "nsIPrefService.h"
++#include "nsIPrefBranch2.h"
++#include "nsIObserver.h"
++#include "nsThreadUtils.h"
++#include "nsProxyRelease.h"
++#include "nsIStringBundle.h"
++#include "nsIStandardURL.h"
++#include "nsMimeTypes.h"
++#include "nsNetUtil.h"
++#include "mozilla/Monitor.h"
++#include <gio/gio.h>
++
++#define MOZ_GIO_SCHEME "moz-gio"
++#define MOZ_GIO_SUPPORTED_PROTOCOLS "network.gio.supported-protocols"
++
++//-----------------------------------------------------------------------------
++
++// NSPR_LOG_MODULES=gio:5
++#ifdef PR_LOGGING
++static PRLogModuleInfo *sGIOLog;
++#define LOG(args) PR_LOG(sGIOLog, PR_LOG_DEBUG, args)
++#else
++#define LOG(args)
++#endif
++
++
++//-----------------------------------------------------------------------------
++static nsresult
++MapGIOResult(gint code)
++{
++ switch (code)
++ {
++ case G_IO_ERROR_NOT_FOUND: return NS_ERROR_FILE_NOT_FOUND; // shows error
++ case G_IO_ERROR_INVALID_ARGUMENT: return NS_ERROR_INVALID_ARG;
++ case G_IO_ERROR_NOT_SUPPORTED: return NS_ERROR_NOT_AVAILABLE;
++ case G_IO_ERROR_NO_SPACE: return NS_ERROR_FILE_NO_DEVICE_SPACE;
++ case G_IO_ERROR_READ_ONLY: return NS_ERROR_FILE_READ_ONLY;
++ case G_IO_ERROR_PERMISSION_DENIED: return NS_ERROR_FILE_ACCESS_DENIED; // wrong password/login
++ case G_IO_ERROR_CLOSED: return NS_BASE_STREAM_CLOSED; // was EOF
++ case G_IO_ERROR_NOT_DIRECTORY: return NS_ERROR_FILE_NOT_DIRECTORY;
++ case G_IO_ERROR_PENDING: return NS_ERROR_IN_PROGRESS;
++ case G_IO_ERROR_EXISTS: return NS_ERROR_FILE_ALREADY_EXISTS;
++ case G_IO_ERROR_IS_DIRECTORY: return NS_ERROR_FILE_IS_DIRECTORY;
++ case G_IO_ERROR_NOT_MOUNTED: return NS_ERROR_NOT_CONNECTED; // shows error
++ case G_IO_ERROR_HOST_NOT_FOUND: return NS_ERROR_UNKNOWN_HOST; // shows error
++ case G_IO_ERROR_CANCELLED: return NS_ERROR_ABORT;
++ case G_IO_ERROR_NOT_EMPTY: return NS_ERROR_FILE_DIR_NOT_EMPTY;
++ case G_IO_ERROR_FILENAME_TOO_LONG: return NS_ERROR_FILE_NAME_TOO_LONG;
++ case G_IO_ERROR_INVALID_FILENAME: return NS_ERROR_FILE_INVALID_PATH;
++ case G_IO_ERROR_TIMED_OUT: return NS_ERROR_NET_TIMEOUT; // shows error
++ case G_IO_ERROR_WOULD_BLOCK: return NS_BASE_STREAM_WOULD_BLOCK;
++ case G_IO_ERROR_FAILED_HANDLED: return NS_ERROR_ABORT; // Cancel on login dialog
++
++/* unhandled:
++ G_IO_ERROR_NOT_REGULAR_FILE,
++ G_IO_ERROR_NOT_SYMBOLIC_LINK,
++ G_IO_ERROR_NOT_MOUNTABLE_FILE,
++ G_IO_ERROR_TOO_MANY_LINKS,
++ G_IO_ERROR_ALREADY_MOUNTED,
++ G_IO_ERROR_CANT_CREATE_BACKUP,
++ G_IO_ERROR_WRONG_ETAG,
++ G_IO_ERROR_WOULD_RECURSE,
++ G_IO_ERROR_BUSY,
++ G_IO_ERROR_WOULD_MERGE,
++ G_IO_ERROR_TOO_MANY_OPEN_FILES
++*/
++ // Make GCC happy
++ default:
++ return NS_ERROR_FAILURE;
++ }
++
++ return NS_ERROR_FAILURE;
++}
++
++static nsresult
++MapGIOResult(GError *result)
++{
++ if (!result)
++ return NS_OK;
++ else
++ return MapGIOResult(result->code);
++}
++/** Return values for mount operation.
++ * These enums are used as mount operation return values.
++ */
++typedef enum {
++ MOUNT_OPERATION_IN_PROGRESS, /** \enum operation in progress */
++ MOUNT_OPERATION_SUCCESS, /** \enum operation successful */
++ MOUNT_OPERATION_FAILED /** \enum operation not successful */
++} MountOperationResult;
++//-----------------------------------------------------------------------------
++/**
++ * Sort function compares according to file type (directory/file)
++ * and alphabethical order
++ * @param a pointer to GFileInfo object to compare
++ * @param b pointer to GFileInfo object to compare
++ * @return -1 when first object should be before the second, 0 when equal,
++ * +1 when second object should be before the first
++ */
++static gint
++FileInfoComparator(gconstpointer a, gconstpointer b)
++{
++ GFileInfo *ia = ( GFileInfo *) a;
++ GFileInfo *ib = ( GFileInfo *) b;
++ if (g_file_info_get_file_type(ia) == G_FILE_TYPE_DIRECTORY
++ && g_file_info_get_file_type(ib) != G_FILE_TYPE_DIRECTORY)
++ return -1;
++ if (g_file_info_get_file_type(ib) == G_FILE_TYPE_DIRECTORY
++ && g_file_info_get_file_type(ia) != G_FILE_TYPE_DIRECTORY)
++ return 1;
++
++ return strcasecmp(g_file_info_get_name(ia), g_file_info_get_name(ib));
++}
++
++/* Declaration of mount callback functions */
++static void mount_enclosing_volume_finished (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data);
++static void mount_operation_ask_password (GMountOperation *mount_op,
++ const char *message,
++ const char *default_user,
++ const char *default_domain,
++ GAskPasswordFlags flags,
++ gpointer user_data);
++//-----------------------------------------------------------------------------
++
++class nsGIOInputStream : public nsIInputStream
++{
++ public:
++ NS_DECL_ISUPPORTS
++ NS_DECL_NSIINPUTSTREAM
++
++ nsGIOInputStream(const nsCString &uriSpec)
++ : mSpec(uriSpec)
++ , mChannel(nsnull)
++ , mHandle(nsnull)
++ , mStream(nsnull)
++ , mBytesRemaining(PR_UINT32_MAX)
++ , mStatus(NS_OK)
++ , mDirList(nsnull)
++ , mDirListPtr(nsnull)
++ , mDirBufCursor(0)
++ , mDirOpen(PR_FALSE)
++ , mMonitorMountInProgress("GIOInputStream::MountFinished") { }
++
++ ~nsGIOInputStream() { Close(); }
++
++ void SetChannel(nsIChannel *channel)
++ {
++ // We need to hold an owning reference to our channel. This is done
++ // so we can access the channel's notification callbacks to acquire
++ // a reference to a nsIAuthPrompt if we need to handle an interactive
++ // mount operation.
++ //
++ // However, the channel can only be accessed on the main thread, so
++ // we have to be very careful with ownership. Moreover, it doesn't
++ // support threadsafe addref/release, so proxying is the answer.
++ //
++ // Also, it's important to note that this likely creates a reference
++ // cycle since the channel likely owns this stream. This reference
++ // cycle is broken in our Close method.
++
++ NS_ADDREF(mChannel = channel);
++ }
++ void SetMountResult(MountOperationResult result, gint error_code);
++ private:
++ nsresult DoOpen();
++ nsresult DoRead(char *aBuf, PRUint32 aCount, PRUint32 *aCountRead);
++ nsresult SetContentTypeOfChannel(const char *contentType);
++ nsresult MountVolume();
++ nsresult DoOpenDirectory();
++ nsresult DoOpenFile(GFileInfo *info);
++ nsCString mSpec;
++ nsIChannel *mChannel; // manually refcounted
++ GFile *mHandle;
++ GFileInputStream *mStream;
++ PRUint64 mBytesRemaining;
++ nsresult mStatus;
++ GList *mDirList;
++ GList *mDirListPtr;
++ nsCString mDirBuf;
++ PRUint32 mDirBufCursor;
++ PRPackedBool mDirOpen;
++ MountOperationResult mMountRes;
++ mozilla::Monitor mMonitorMountInProgress;
++ gint mMountErrorCode;
++};
++/**
++ * Set result of mount operation and notify monitor waiting for results.
++ * This method is called in main thread as long as it is used only
++ * in mount_enclosing_volume_finished function.
++ * @param result Result of mount operation
++ */
++void
++nsGIOInputStream::SetMountResult(MountOperationResult result, gint error_code)
++{
++ mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
++ mMountRes = result;
++ mMountErrorCode = error_code;
++ mon.Notify();
++}
++
++/**
++ * Start mount operation and wait in loop until it is finished. This method is
++ * called from thread which is trying to read from location.
++ */
++nsresult
++nsGIOInputStream::MountVolume() {
++ GMountOperation* mount_op = g_mount_operation_new();
++ g_signal_connect (mount_op, "ask-password",
++ G_CALLBACK (mount_operation_ask_password), mChannel);
++ mMountRes = MOUNT_OPERATION_IN_PROGRESS;
++ /* g_file_mount_enclosing_volume uses a dbus request to mount the volume.
++ Callback mount_enclosing_volume_finished is called in main thread
++ (not this thread on which this method is called). */
++ g_file_mount_enclosing_volume(mHandle,
++ G_MOUNT_MOUNT_NONE,
++ mount_op,
++ NULL,
++ mount_enclosing_volume_finished,
++ this);
++ mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
++ /* Waiting for finish of mount operation thread */
++ while (mMountRes == MOUNT_OPERATION_IN_PROGRESS)
++ mon.Wait();
++
++ g_object_unref(mount_op);
++
++ if (mMountRes == MOUNT_OPERATION_FAILED) {
++ return MapGIOResult(mMountErrorCode);
++ } else {
++ return NS_OK;
++ }
++}
++
++/**
++ * Create list of infos about objects in opened directory
++ * Return: NS_OK when list obtained, otherwise error code according
++ * to failed operation.
++ */
++nsresult
++nsGIOInputStream::DoOpenDirectory()
++{
++ GError *error = NULL;
++
++ GFileEnumerator *f_enum = g_file_enumerate_children(mHandle,
++ "standard::*,time::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++ if (!f_enum) {
++ nsresult rv = MapGIOResult(error);
++ g_warning("Cannot read from directory: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++ // fill list of file infos
++ GFileInfo *info = g_file_enumerator_next_file(f_enum, NULL, &error);
++ while (info) {
++ mDirList = g_list_append(mDirList, info);
++ info = g_file_enumerator_next_file(f_enum, NULL, &error);
++ }
++ g_object_unref(f_enum);
++ if (error) {
++ g_warning("Error reading directory content: %s", error->message);
++ nsresult rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ mDirOpen = PR_TRUE;
++
++ // Sort list of file infos by using FileInfoComparator function
++ mDirList = g_list_sort(mDirList, FileInfoComparator);
++ mDirListPtr = mDirList;
++
++ // Write base URL (make sure it ends with a '/')
++ mDirBuf.Append("300: ");
++ mDirBuf.Append(mSpec);
++ if (mSpec.get()[mSpec.Length() - 1] != '/')
++ mDirBuf.Append('/');
++ mDirBuf.Append('\n');
++
++ // Write column names
++ mDirBuf.Append("200: filename content-length last-modified file-type\n");
++
++ // Write charset (assume UTF-8)
++ // XXX is this correct?
++ mDirBuf.Append("301: UTF-8\n");
++ SetContentTypeOfChannel(APPLICATION_HTTP_INDEX_FORMAT);
++ return NS_OK;
++}
++
++/**
++ * Create file stream and set mime type for channel
++ * @param info file info used to determine mime type
++ * @return NS_OK when file stream created successfuly, error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoOpenFile(GFileInfo *info)
++{
++ GError *error = NULL;
++
++ mStream = g_file_read(mHandle, NULL, &error);
++ if (!mStream) {
++ nsresult rv = MapGIOResult(error);
++ g_warning("Cannot read from file: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++
++ const char * content_type = g_file_info_get_content_type(info);
++ if (content_type) {
++ char *mime_type = g_content_type_get_mime_type(content_type);
++ if (mime_type) {
++ if (strcmp(mime_type, APPLICATION_OCTET_STREAM) != 0) {
++ SetContentTypeOfChannel(mime_type);
++ }
++ g_free(mime_type);
++ }
++ } else {
++ g_warning("Missing content type.");
++ }
++
++ mBytesRemaining = g_file_info_get_size(info);
++ // Update the content length attribute on the channel. We do this
++ // synchronously without proxying. This hack is not as bad as it looks!
++ mChannel->SetContentLength(mBytesRemaining);
++
++ return NS_OK;
++}
++
++/**
++ * Start file open operation, mount volume when needed and according to file type
++ * create file output stream or read directory content.
++ * @return NS_OK when file or directory opened successfully, error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoOpen()
++{
++ nsresult rv;
++ GError *error = NULL;
++
++ NS_ASSERTION(mHandle == nsnull, "already open");
++
++ mHandle = g_file_new_for_uri( mSpec.get() );
++
++ GFileInfo *info = g_file_query_info(mHandle,
++ "standard::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++
++ if (error) {
++ if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_MOUNTED) {
++ // location is not yet mounted, try to mount
++ g_error_free(error);
++ if (NS_IsMainThread())
++ return NS_ERROR_NOT_CONNECTED;
++ error = NULL;
++ rv = MountVolume();
++ if (rv != NS_OK) {
++ return rv;
++ }
++ // get info again
++ info = g_file_query_info(mHandle,
++ "standard::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++ // second try to get file info from remote files after media mount
++ if (!info) {
++ g_warning("Unable to get file info: %s", error->message);
++ rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ } else {
++ g_warning("Unable to get file info: %s", error->message);
++ rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ }
++ // Get file type to handle directories and file differently
++ GFileType f_type = g_file_info_get_file_type(info);
++ if (f_type == G_FILE_TYPE_DIRECTORY) {
++ // directory
++ rv = DoOpenDirectory();
++ } else if (f_type != G_FILE_TYPE_UNKNOWN) {
++ // file
++ rv = DoOpenFile(info);
++ } else {
++ g_warning("Unable to get file type.");
++ rv = NS_ERROR_FILE_NOT_FOUND;
++ }
++ if (info)
++ g_object_unref(info);
++ return rv;
++}
++
++/**
++ * Read content of file or create file list from directory
++ * @param aBuf read destination buffer
++ * @param aCount length of destination buffer
++ * @param aCountRead number of read characters
++ * @return NS_OK when read successfully, NS_BASE_STREAM_CLOSED when end of file,
++ * error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoRead(char *aBuf, PRUint32 aCount, PRUint32 *aCountRead)
++{
++ nsresult rv = NS_ERROR_NOT_AVAILABLE;
++ if (mStream) {
++ // file read
++ GError *error = NULL;
++ PRUint32 bytes_read = g_input_stream_read(G_INPUT_STREAM(mStream),
++ aBuf,
++ aCount,
++ NULL,
++ &error);
++ if (error) {
++ rv = MapGIOResult(error);
++ *aCountRead = 0;
++ g_warning("Cannot read from file: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++ *aCountRead = bytes_read;
++ mBytesRemaining -= *aCountRead;
++ return NS_OK;
++ }
++ else if (mDirOpen) {
++ // directory read
++ while (aCount && rv != NS_BASE_STREAM_CLOSED)
++ {
++ // Copy data out of our buffer
++ PRUint32 bufLen = mDirBuf.Length() - mDirBufCursor;
++ if (bufLen)
++ {
++ PRUint32 n = PR_MIN(bufLen, aCount);
++ memcpy(aBuf, mDirBuf.get() + mDirBufCursor, n);
++ *aCountRead += n;
++ aBuf += n;
++ aCount -= n;
++ mDirBufCursor += n;
++ }
++
++ if (!mDirListPtr) // Are we at the end of the directory list?
++ {
++ rv = NS_BASE_STREAM_CLOSED;
++ }
++ else if (aCount) // Do we need more data?
++ {
++ GFileInfo *info = (GFileInfo *) mDirListPtr->data;
++
++ // Prune '.' and '..' from directory listing.
++ const char * fname = g_file_info_get_name(info);
++ if (fname && fname[0] == '.' &&
++ (fname[1] == '\0' || (fname[1] == '.' && fname[2] == '\0')))
++ {
++ mDirListPtr = mDirListPtr->next;
++ continue;
++ }
++
++ mDirBuf.Assign("201: ");
++
++ // The "filename" field
++ nsCString escName;
++ nsCOMPtr<nsINetUtil> nu = do_GetService(NS_NETUTIL_CONTRACTID);
++ if (nu && fname) {
++ nu->EscapeString(nsDependentCString(fname),
++ nsINetUtil::ESCAPE_URL_PATH, escName);
++
++ mDirBuf.Append(escName);
++ mDirBuf.Append(' ');
++ }
++
++ // The "content-length" field
++ // XXX truncates size from 64-bit to 32-bit
++ mDirBuf.AppendInt(PRInt32(g_file_info_get_size(info)));
++ mDirBuf.Append(' ');
++
++ // The "last-modified" field
++ //
++ // NSPR promises: PRTime is compatible with time_t
++ // we just need to convert from seconds to microseconds
++ GTimeVal gtime;
++ g_file_info_get_modification_time(info, &gtime);
++
++ PRExplodedTime tm;
++ PRTime pt = ((PRTime) gtime.tv_sec) * 1000000;
++ PR_ExplodeTime(pt, PR_GMTParameters, &tm);
++ {
++ char buf[64];
++ PR_FormatTimeUSEnglish(buf, sizeof(buf),
++ "%a,%%20%d%%20%b%%20%Y%%20%H:%M:%S%%20GMT ", &tm);
++ mDirBuf.Append(buf);
++ }
++
++ // The "file-type" field
++ switch (g_file_info_get_file_type(info))
++ {
++ case G_FILE_TYPE_REGULAR:
++ mDirBuf.Append("FILE ");
++ break;
++ case G_FILE_TYPE_DIRECTORY:
++ mDirBuf.Append("DIRECTORY ");
++ break;
++ case G_FILE_TYPE_SYMBOLIC_LINK:
++ mDirBuf.Append("SYMBOLIC-LINK ");
++ break;
++ default:
++ break;
++ }
++ mDirBuf.Append('\n');
++
++ mDirBufCursor = 0;
++ mDirListPtr = mDirListPtr->next;
++ }
++ }
++ }
++ return rv;
++}
++
++/**
++ * This class is used to implement SetContentTypeOfChannel.
++ */
++class nsGIOSetContentTypeEvent : public nsRunnable
++{
++ public:
++ nsGIOSetContentTypeEvent(nsIChannel *channel, const char *contentType)
++ : mChannel(channel), mContentType(contentType)
++ {
++ // stash channel reference in mChannel. no AddRef here! see note
++ // in SetContentTypeOfchannel.
++ }
++
++ NS_IMETHOD Run()
++ {
++ mChannel->SetContentType(mContentType);
++ return NS_OK;
++ }
++
++ private:
++ nsIChannel *mChannel;
++ nsCString mContentType;
++};
++
++nsresult
++nsGIOInputStream::SetContentTypeOfChannel(const char *contentType)
++{
++ // We need to proxy this call over to the main thread. We post an
++ // asynchronous event in this case so that we don't delay reading data, and
++ // we know that this is safe to do since the channel's reference will be
++ // released asynchronously as well. We trust the ordering of the main
++ // thread's event queue to protect us against memory corruption.
++
++ nsresult rv;
++ nsCOMPtr<nsIRunnable> ev =
++ new nsGIOSetContentTypeEvent(mChannel, contentType);
++ if (!ev)
++ {
++ rv = NS_ERROR_OUT_OF_MEMORY;
++ }
++ else
++ {
++ rv = NS_DispatchToMainThread(ev);
++ }
++ return rv;
++}
++
++NS_IMPL_THREADSAFE_ISUPPORTS1(nsGIOInputStream, nsIInputStream)
++
++/**
++ * Free all used memory and close stream.
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Close()
++{
++ if (mStream)
++ {
++ g_object_unref(mStream);
++ mStream = nsnull;
++ }
++
++ if (mHandle)
++ {
++ g_object_unref(mHandle);
++ mHandle = nsnull;
++ }
++
++ if (mDirList)
++ {
++ // Destroy the list of GIOFileInfo objects...
++ g_list_foreach(mDirList, (GFunc) g_object_unref, nsnull);
++ g_list_free(mDirList);
++ mDirList = nsnull;
++ mDirListPtr = nsnull;
++ }
++
++ if (mChannel)
++ {
++ nsresult rv = NS_OK;
++
++ nsCOMPtr<nsIThread> thread = do_GetMainThread();
++ if (thread)
++ rv = NS_ProxyRelease(thread, mChannel);
++
++ NS_ASSERTION(thread && NS_SUCCEEDED(rv), "leaking channel reference");
++ mChannel = nsnull;
++ }
++
++ mSpec.Truncate(); // free memory
++
++ // Prevent future reads from re-opening the handle.
++ if (NS_SUCCEEDED(mStatus))
++ mStatus = NS_BASE_STREAM_CLOSED;
++
++ return NS_OK;
++}
++
++/**
++ * Return number of remaining bytes available on input
++ * @param aResult remaining bytes
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Available(PRUint32 *aResult)
++{
++ if (NS_FAILED(mStatus))
++ return mStatus;
++
++ /* When remaining bytes are bigger than max PRUint32 value an aResult must
++ be set to PRUint32 maximum */
++ if (mBytesRemaining > PR_UINT32_MAX)
++ *aResult = PR_UINT32_MAX;
++ else
++ *aResult = mBytesRemaining;
++
++ return NS_OK;
++}
++
++/**
++ * Trying to read from stream. When location is not available it tries to mount it.
++ * @param aBuf buffer to put read data
++ * @param aCount length of aBuf
++ * @param aCountRead number of bytes actually read
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Read(char *aBuf,
++ PRUint32 aCount,
++ PRUint32 *aCountRead)
++{
++ *aCountRead = 0;
++ // Check if file is already opened, otherwise open it
++ if (!mStream && !mDirOpen && mStatus == NS_OK) {
++ mStatus = DoOpen();
++ if (NS_FAILED(mStatus)) {
++ return mStatus;
++ }
++ }
++
++ mStatus = DoRead(aBuf, aCount, aCountRead);
++ // Check if all data has been read
++ if (mStatus == NS_BASE_STREAM_CLOSED)
++ return NS_OK;
++
++ // Check whenever any error appears while reading
++ return mStatus;
++}
++
++NS_IMETHODIMP
++nsGIOInputStream::ReadSegments(nsWriteSegmentFun aWriter,
++ void *aClosure,
++ PRUint32 aCount,
++ PRUint32 *aResult)
++{
++ // There is no way to implement this using GnomeVFS, but fortunately
++ // that doesn't matter. Because we are a blocking input stream, Necko
++ // isn't going to call our ReadSegments method.
++ NS_NOTREACHED("nsGIOInputStream::ReadSegments");
++ return NS_ERROR_NOT_IMPLEMENTED;
++}
++
++NS_IMETHODIMP
++nsGIOInputStream::IsNonBlocking(PRBool *aResult)
++{
++ *aResult = PR_FALSE;
++ return NS_OK;
++}
++
++//-----------------------------------------------------------------------------
++
++/**
++ * Called when finishing mount operation. Result of operation is set in
++ * nsGIOInputStream. This function is called in main thread as an async request
++ * typically from dbus.
++ * @param source_object GFile object which requested the mount
++ * @param res result object
++ * @param user_data pointer to nsGIOInputStream
++ */
++static void
++mount_enclosing_volume_finished (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data)
++{
++ GError *error = NULL;
++
++ nsGIOInputStream* istream = static_cast<nsGIOInputStream*>(user_data);
++
++ g_file_mount_enclosing_volume_finish(G_FILE (source_object), res, &error);
++
++ if (error) {
++ g_warning("Mount failed: %s %d", error->message, error->code);
++ istream->SetMountResult(MOUNT_OPERATION_FAILED, error->code);
++ g_error_free(error);
++ } else {
++ istream->SetMountResult(MOUNT_OPERATION_SUCCESS, 0);
++ }
++}
++
++/**
++ * This function is called when username or password are requested from user.
++ * This function is called in main thread as async request from dbus.
++ * @param mount_op mount operation
++ * @param message message to show to user
++ * @param default_user preffered user
++ * @param default_domain domain name
++ * @param flags what type of information is required
++ * @param user_data nsIChannel
++ */
++static void
++mount_operation_ask_password (GMountOperation *mount_op,
++ const char *message,
++ const char *default_user,
++ const char *default_domain,
++ GAskPasswordFlags flags,
++ gpointer user_data)
++{
++ nsIChannel *channel = (nsIChannel *) user_data;
++ if (!channel) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // We can't handle request for domain
++ if (flags & G_ASK_PASSWORD_NEED_DOMAIN) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++
++ nsCOMPtr<nsIAuthPrompt> prompt;
++ NS_QueryNotificationCallbacks(channel, prompt);
++
++ // If no auth prompt, then give up. We could failover to using the
++ // WindowWatcher service, but that might defeat a consumer's purposeful
++ // attempt to disable authentication (for whatever reason).
++ if (!prompt) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Parse out the host and port...
++ nsCOMPtr<nsIURI> uri;
++ channel->GetURI(getter_AddRefs(uri));
++ if (!uri) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++
++ nsCAutoString scheme, hostPort;
++ uri->GetScheme(scheme);
++ uri->GetHostPort(hostPort);
++
++ // It doesn't make sense for either of these strings to be empty. What kind
++ // of funky URI is this?
++ if (scheme.IsEmpty() || hostPort.IsEmpty()) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Construct the single signon key. Altering the value of this key will
++ // cause people's remembered passwords to be forgotten. Think carefully
++ // before changing the way this key is constructed.
++ nsAutoString key, realm;
++
++ NS_ConvertUTF8toUTF16 dispHost(scheme);
++ dispHost.Append(NS_LITERAL_STRING("://"));
++ dispHost.Append(NS_ConvertUTF8toUTF16(hostPort));
++
++ key = dispHost;
++ if (*default_domain != '\0')
++ {
++ // We assume the realm string is ASCII. That might be a bogus assumption,
++ // but we have no idea what encoding GnomeVFS is using, so for now we'll
++ // limit ourselves to ISO-Latin-1. XXX What is a better solution?
++ realm.Append('"');
++ realm.Append(NS_ConvertASCIItoUTF16(default_domain));
++ realm.Append('"');
++ key.Append(' ');
++ key.Append(realm);
++ }
++ // Construct the message string...
++ //
++ // We use Necko's string bundle here. This code really should be encapsulated
++ // behind some Necko API, after all this code is based closely on the code in
++ // nsHttpChannel.cpp.
++ nsCOMPtr<nsIStringBundleService> bundleSvc =
++ do_GetService(NS_STRINGBUNDLE_CONTRACTID);
++ if (!bundleSvc) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ nsCOMPtr<nsIStringBundle> bundle;
++ bundleSvc->CreateBundle("chrome://global/locale/commonDialogs.properties",
++ getter_AddRefs(bundle));
++ if (!bundle) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ nsAutoString nsmessage;
++
++ if (flags & G_ASK_PASSWORD_NEED_PASSWORD) {
++ if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
++ if (!realm.IsEmpty()) {
++ const PRUnichar *strings[] = { realm.get(), dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterLoginForRealm").get(),
++ strings, 2, getter_Copies(nsmessage));
++ } else {
++ const PRUnichar *strings[] = { dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterUserPasswordFor").get(),
++ strings, 1, getter_Copies(nsmessage));
++ }
++ } else {
++ NS_ConvertUTF8toUTF16 userName(default_user);
++ const PRUnichar *strings[] = { userName.get(), dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterPasswordFor").get(),
++ strings, 2, getter_Copies(nsmessage));
++ }
++ } else {
++ g_warning("Unknown mount operation request (flags: %x)", flags);
++ }
++
++ if (nsmessage.IsEmpty()) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Prompt the user...
++ nsresult rv;
++ PRBool retval = PR_FALSE;
++ PRUnichar *user = nsnull, *pass = nsnull;
++ if (default_user) {
++ // user will be freed by PromptUsernameAndPassword
++ user = ToNewUnicode(NS_ConvertUTF8toUTF16(default_user));
++ }
++ if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
++ rv = prompt->PromptUsernameAndPassword(nsnull, nsmessage.get(),
++ key.get(),
++ nsIAuthPrompt::SAVE_PASSWORD_PERMANENTLY,
++ &user, &pass, &retval);
++ } else {
++ rv = prompt->PromptPassword(nsnull, nsmessage.get(),
++ key.get(),
++ nsIAuthPrompt::SAVE_PASSWORD_PERMANENTLY,
++ &pass, &retval);
++ }
++ if (NS_FAILED(rv) || !retval) { // was || user == '\0' || pass == '\0'
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ /* GIO should accept UTF8 */
++ g_mount_operation_set_username(mount_op, NS_ConvertUTF16toUTF8(user).get());
++ g_mount_operation_set_password(mount_op, NS_ConvertUTF16toUTF8(pass).get());
++ nsMemory::Free(user);
++ nsMemory::Free(pass);
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_HANDLED);
++}
++
++//-----------------------------------------------------------------------------
++
++class nsGIOProtocolHandler : public nsIProtocolHandler
++ , public nsIObserver
++{
++ public:
++ NS_DECL_ISUPPORTS
++ NS_DECL_NSIPROTOCOLHANDLER
++ NS_DECL_NSIOBSERVER
++
++ nsresult Init();
++
++ private:
++ void InitSupportedProtocolsPref(nsIPrefBranch *prefs);
++ PRBool IsSupportedProtocol(const nsCString &spec);
++
++ nsCString mSupportedProtocols;
++};
++
++NS_IMPL_ISUPPORTS2(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
++
++nsresult
++nsGIOProtocolHandler::Init()
++{
++#ifdef PR_LOGGING
++ sGIOLog = PR_NewLogModule("gio");
++#endif
++
++ nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
++ if (prefs)
++ {
++ InitSupportedProtocolsPref(prefs);
++ prefs->AddObserver(MOZ_GIO_SUPPORTED_PROTOCOLS, this, PR_FALSE);
++ }
++
++ return NS_OK;
++}
++
++void
++nsGIOProtocolHandler::InitSupportedProtocolsPref(nsIPrefBranch *prefs)
++{
++ // Get user preferences to determine which protocol is supported.
++ // Gvfs/GIO has a set of supported protocols like obex, network, archive,
++ // computer, dav, cdda, gphoto2, trash, etc. Some of these seems to be
++ // irrelevant to process by browser. By default accept only smb and sftp
++ // protocols so far.
++ nsresult rv = prefs->GetCharPref(MOZ_GIO_SUPPORTED_PROTOCOLS,
++ getter_Copies(mSupportedProtocols));
++ if (NS_SUCCEEDED(rv)) {
++ mSupportedProtocols.StripWhitespace();
++ ToLowerCase(mSupportedProtocols);
++ }
++ else
++ mSupportedProtocols.Assign("smb:,sftp:"); // use defaults
++
++ LOG(("gio: supported protocols \"%s\"\n", mSupportedProtocols.get()));
++}
++
++PRBool
++nsGIOProtocolHandler::IsSupportedProtocol(const nsCString &aSpec)
++{
++ const char *specString = aSpec.get();
++ const char *colon = strchr(specString, ':');
++ if (!colon)
++ return PR_FALSE;
++
++ PRUint32 length = colon - specString + 1;
++
++ // <scheme> + ':'
++ nsCString scheme(specString, length);
++
++ char *found = PL_strcasestr(mSupportedProtocols.get(), scheme.get());
++ if (!found)
++ return PR_FALSE;
++
++ if (found[length] != ',' && found[length] != '\0')
++ return PR_FALSE;
++
++ return PR_TRUE;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetScheme(nsACString &aScheme)
++{
++ aScheme.Assign(MOZ_GIO_SCHEME);
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetDefaultPort(PRInt32 *aDefaultPort)
++{
++ *aDefaultPort = -1;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetProtocolFlags(PRUint32 *aProtocolFlags)
++{
++ // Is URI_STD true of all GnomeVFS URI types?
++ *aProtocolFlags = URI_STD | URI_DANGEROUS_TO_LOAD;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::NewURI(const nsACString &aSpec,
++ const char *aOriginCharset,
++ nsIURI *aBaseURI,
++ nsIURI **aResult)
++{
++ const nsCString flatSpec(aSpec);
++ LOG(("gio: NewURI [spec=%s]\n", flatSpec.get()));
++
++ if (!aBaseURI)
++ {
++ // XXX Is it good to support all GIO protocols?
++ if (!IsSupportedProtocol(flatSpec))
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++
++ PRInt32 colon_location = flatSpec.FindChar(':');
++ if (colon_location <= 0)
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++
++ // Verify that GIO supports this URI scheme.
++ PRBool uri_scheme_supported = PR_FALSE;
++
++ GVfs *gvfs = g_vfs_get_default();
++
++ if (!gvfs) {
++ g_warning("Cannot get GVfs object.");
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++ }
++
++ const gchar* const * uri_schemes = g_vfs_get_supported_uri_schemes(gvfs);
++
++ while (*uri_schemes != NULL) {
++ // While flatSpec ends with ':' the uri_scheme does not. Therefore do not
++ // compare last character.
++ if (StringHead(flatSpec, colon_location).Equals(*uri_schemes)) {
++ uri_scheme_supported = PR_TRUE;
++ break;
++ }
++ uri_schemes++;
++ }
++
++ if (!uri_scheme_supported) {
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++ }
++ }
++
++ nsresult rv;
++ nsCOMPtr<nsIStandardURL> url =
++ do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
++ if (NS_FAILED(rv))
++ return rv;
++
++ rv = url->Init(nsIStandardURL::URLTYPE_STANDARD, -1, flatSpec,
++ aOriginCharset, aBaseURI);
++ if (NS_SUCCEEDED(rv))
++ rv = CallQueryInterface(url, aResult);
++ return rv;
++
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
++{
++ NS_ENSURE_ARG_POINTER(aURI);
++ nsresult rv;
++
++ nsCAutoString spec;
++ rv = aURI->GetSpec(spec);
++ if (NS_FAILED(rv))
++ return rv;
++
++ nsRefPtr<nsGIOInputStream> stream = new nsGIOInputStream(spec);
++ if (!stream)
++ {
++ rv = NS_ERROR_OUT_OF_MEMORY;
++ }
++ else
++ {
++ // start out assuming an unknown content-type. we'll set the content-type
++ // to something better once we open the URI.
++ rv = NS_NewInputStreamChannel(aResult,
++ aURI,
++ stream,
++ NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE));
++ if (NS_SUCCEEDED(rv))
++ stream->SetChannel(*aResult);
++ }
++ return rv;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::AllowPort(PRInt32 aPort,
++ const char *aScheme,
++ PRBool *aResult)
++{
++ // Don't override anything.
++ *aResult = PR_FALSE;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::Observe(nsISupports *aSubject,
++ const char *aTopic,
++ const PRUnichar *aData)
++{
++ if (strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) {
++ nsCOMPtr<nsIPrefBranch> prefs = do_QueryInterface(aSubject);
++ InitSupportedProtocolsPref(prefs);
++ }
++ return NS_OK;
++}
++
++//-----------------------------------------------------------------------------
++
++#define NS_GIOPROTOCOLHANDLER_CID \
++{ /* ee706783-3af8-4d19-9e84-e2ebfe213480 */ \
++ 0xee706783, \
++ 0x3af8, \
++ 0x4d19, \
++ {0x9e, 0x84, 0xe2, 0xeb, 0xfe, 0x21, 0x34, 0x80} \
++}
++
++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOProtocolHandler, Init)
++NS_DEFINE_NAMED_CID(NS_GIOPROTOCOLHANDLER_CID);
++
++static const mozilla::Module::CIDEntry kVFSCIDs[] = {
++ { &kNS_GIOPROTOCOLHANDLER_CID, false, NULL, nsGIOProtocolHandlerConstructor },
++ { NULL }
++};
++
++static const mozilla::Module::ContractIDEntry kVFSContracts[] = {
++ { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MOZ_GIO_SCHEME, &kNS_GIOPROTOCOLHANDLER_CID },
++ { NULL }
++};
++
++static const mozilla::Module kVFSModule = {
++ mozilla::Module::kVersion,
++ kVFSCIDs,
++ kVFSContracts
++};
++
++NSMODULE_DEFN(nsGIOModule) = &kVFSModule;
+diff -r 49a1b2aa43c5 netwerk/base/src/nsIOService.cpp
+--- a/netwerk/base/src/nsIOService.cpp Tue Dec 21 12:42:59 2010 +0100
++++ b/netwerk/base/src/nsIOService.cpp Tue Jan 11 11:17:52 2011 +0100
+@@ -454,6 +454,27 @@
+ }
+
+ #ifdef MOZ_X11
++ // check to see whether GVFS can handle this URI scheme. if it can
++ // create a nsIURI for the "scheme:", then we assume it has support for
++ // the requested protocol. otherwise, we failover to using the default
++ // protocol handler.
++
++ rv = CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"moz-gio",
++ result);
++ if (NS_SUCCEEDED(rv)) {
++ nsCAutoString spec(scheme);
++ spec.Append(':');
++
++ nsIURI *uri;
++ rv = (*result)->NewURI(spec, nsnull, nsnull, &uri);
++ if (NS_SUCCEEDED(rv)) {
++ NS_RELEASE(uri);
++ return rv;
++ }
++
++ NS_RELEASE(*result);
++ }
++
+ // check to see whether GnomeVFS can handle this URI scheme. if it can
+ // create a nsIURI for the "scheme:", then we assume it has support for
+ // the requested protocol. otherwise, we failover to using the default
diff --git a/community-staging/xulrunner-oss/xulrunner-omnijar.patch b/community-staging/xulrunner-oss/xulrunner-omnijar.patch
new file mode 100644
index 000000000..66ec5206c
--- /dev/null
+++ b/community-staging/xulrunner-oss/xulrunner-omnijar.patch
@@ -0,0 +1,1737 @@
+# HG changeset patch
+# Parent a7dea879b4b445a23186f438900562155bb39e99
+Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/
+
+diff --git a/layout/style/jar.mn b/layout/style/jar.mn
+--- a/layout/style/jar.mn
++++ b/layout/style/jar.mn
+@@ -1,8 +1,10 @@
+ toolkit.jar:
+ * res/ua.css (ua.css)
+ res/html.css (html.css)
+ res/quirk.css (quirk.css)
+ res/viewsource.css (viewsource.css)
+ * res/forms.css (forms.css)
+ res/arrow.gif (arrow.gif)
+ res/arrowd.gif (arrowd.gif)
++
++% resource gre-resources %res/
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -75,17 +75,16 @@ static nsResProtocolHandler *gResHandler
+ //
+ // this enables PR_LOG_ALWAYS level information and places all output in
+ // the file log.txt
+ //
+ static PRLogModuleInfo *gResLog;
+ #endif
+
+ #define kGRE NS_LITERAL_CSTRING("gre")
+-#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources")
+
+ //----------------------------------------------------------------------------
+ // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution
+ //----------------------------------------------------------------------------
+
+ nsresult
+ nsResURL::EnsureFile()
+ {
+@@ -197,28 +196,16 @@ nsResProtocolHandler::Init()
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+ // make resource://gre/ point to the GRE directory
+ //
+ rv = AddSpecialDir(NS_GRE_DIR, kGRE);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+- // make resource://gre-resources/ point to gre toolkit[.jar]/res
+- nsCOMPtr<nsIURI> greURI;
+- nsCOMPtr<nsIURI> greResURI;
+- GetSubstitution(kGRE, getter_AddRefs(greURI));
+-#ifdef MOZ_CHROME_FILE_FORMAT_JAR
+- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/");
+-#else
+- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/");
+-#endif
+- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI,
+- getter_AddRefs(greResURI));
+- SetSubstitution(kGRE_RESOURCES, greResURI);
+ //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir...
+ // but once I finish multiple chrome registration I'm not sure that it is needed
+
+ // XXX dveditz: resource://pchrome/ defeats profile directory salting
+ // if web content can load it. Tread carefully.
+
+ return rv;
+ }
+@@ -242,22 +229,16 @@ nsResProtocolHandler::Init(nsIFile *aOmn
+ // these entries should be kept in sync with the normal Init function
+
+ // resource:/// points to jar:omni.jar!/
+ SetSubstitution(EmptyCString(), uri);
+
+ // resource://gre/ points to jar:omni.jar!/
+ SetSubstitution(kGRE, uri);
+
+- urlStr += "chrome/toolkit/res/";
+- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/
+- SetSubstitution(kGRE_RESOURCES, uri);
+ return NS_OK;
+ }
+ #endif
+
+ #ifdef MOZ_IPC
+ static PLDHashOperator
+ EnumerateSubstitution(const nsACString& aKey,
+ nsIURI* aURI,
+# HG changeset patch
+# Parent 3038cccba1a071d6b418e15442d0f2d9f3dcb11d
+Bug 620931 part 2 - When building --with-libxul-sdk, use the right preferences directory
+
+diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
+--- a/browser/locales/Makefile.in
++++ b/browser/locales/Makefile.in
+@@ -183,17 +183,17 @@ install:: $(addsuffix .xml,$(SEARCH_PLUG
+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
+
+
+ libs-%:
+ $(NSINSTALL) -D $(DIST)/install
+ @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
+ @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+ @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
++ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1
+ @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+
+
+ repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
+ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
+ @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
+ $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
+ $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
+diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk
+--- a/toolkit/mozapps/installer/packager.mk
++++ b/toolkit/mozapps/installer/packager.mk
+@@ -307,17 +307,17 @@ OMNIJAR_FILES = \
+ res \
+ defaults \
+ greprefs.js \
+ jsloader \
+ $(NULL)
+
+ NON_OMNIJAR_FILES += \
+ chrome/icons/\* \
+- defaults/pref/channel-prefs.js \
++ $(PREF_DIR)/channel-prefs.js \
+ res/cursors/\* \
+ res/MainMenu.nib/\* \
+ $(NULL)
+
+ PACK_OMNIJAR = \
+ rm -f omni.jar components/binary.manifest && \
+ grep -h '^binary-component' components/*.manifest > binary.manifest ; \
+ sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \
+# HG changeset patch
+# Parent cd8df8030f7ad7530692bd7c4391a8009df56a02
+Bug 620931 part 3 - Allow GRE and XUL application to use omni.jar independently
+
+We now store two independent locations for an omni.jar, allowing GRE/XRE and
+XUL application to each have their own omni.jar. And since xulrunner setups
+are very independent from the XUL applications, we implement support for both
+omni.jar and non omni.jar cases in the same runtime, with the side effect of
+allowing to switch from one to the other manually without rebuilding the
+binaries.
+
+We let the mozilla::Omnijar API handle both cases, so that callers don't need
+too much work to support them.
+
+We also make the preferences service load the same set of preferences in all
+the various cases (unified vs. separate, omni.jar vs. no omni.jar).
+
+The child process launcher for IPC is modified to pass the base directories
+needed for the mozilla::Omnijar API initialization in the child process.
+
+Finally, the startupcache file name canonicalization is modified to separate
+APP and GRE resources.
+
+diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp
+--- a/ipc/glue/GeckoChildProcessHost.cpp
++++ b/ipc/glue/GeckoChildProcessHost.cpp
+@@ -440,26 +440,29 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ // other end of the socketpair() from us
+
+ std::vector<std::string> childArgv;
+
+ childArgv.push_back(exePath.value());
+
+ childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end());
+
+-#ifdef MOZ_OMNIJAR
+ // Make sure the child process can find the omnijar
+ // See XRE_InitCommandLine in nsAppRunner.cpp
+- nsCAutoString omnijarPath;
+- if (mozilla::OmnijarPath()) {
+- mozilla::OmnijarPath()->GetNativePath(omnijarPath);
+- childArgv.push_back("-omnijar");
+- childArgv.push_back(omnijarPath.get());
++ nsCAutoString path;
++ nsCOMPtr<nsIFile> file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE);
++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
++ childArgv.push_back("-grebase");
++ childArgv.push_back(path.get());
+ }
+-#endif
++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP);
++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
++ childArgv.push_back("-appbase");
++ childArgv.push_back(path.get());
++ }
+
+ childArgv.push_back(pidstring);
+
+ #if defined(MOZ_CRASHREPORTER)
+ # if defined(OS_LINUX)
+ int childCrashFd, childCrashRemapFd;
+ if (!CrashReporter::CreateNotificationPipeForChild(
+ &childCrashFd, &childCrashRemapFd))
+@@ -552,26 +555,29 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ for (std::vector<std::string>::iterator it = aExtraOpts.begin();
+ it != aExtraOpts.end();
+ ++it) {
+ cmdLine.AppendLooseValue(UTF8ToWide(*it));
+ }
+
+ cmdLine.AppendLooseValue(std::wstring(mGroupId.get()));
+
+-#ifdef MOZ_OMNIJAR
+ // Make sure the child process can find the omnijar
+ // See XRE_InitCommandLine in nsAppRunner.cpp
+- nsAutoString omnijarPath;
+- if (mozilla::OmnijarPath()) {
+- mozilla::OmnijarPath()->GetPath(omnijarPath);
+- cmdLine.AppendLooseValue(UTF8ToWide("-omnijar"));
+- cmdLine.AppendLooseValue(omnijarPath.get());
++ nsAutoString path;
++ nsCOMPtr<nsIFile> file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE);
++ if (file && NS_SUCCEEDED(file->GetPath(path))) {
++ cmdLine.AppendLooseValue(UTF8ToWide("-grebase"));
++ cmdLine.AppendLooseValue(path.get());
+ }
+-#endif
++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP);
++ if (file && NS_SUCCEEDED(file->GetPath(path))) {
++ cmdLine.AppendLooseValue(UTF8ToWide("-appbase"));
++ cmdLine.AppendLooseValue(path.get());
++ }
+
+ cmdLine.AppendLooseValue(UTF8ToWide(pidstring));
+
+ #if defined(MOZ_CRASHREPORTER)
+ cmdLine.AppendLooseValue(
+ UTF8ToWide(CrashReporter::GetChildNotificationPipe()));
+ #endif
+
+diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+--- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp
++++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+@@ -81,16 +81,17 @@
+ #include "nsIConsoleService.h"
+ #include "nsIStorageStream.h"
+ #include "nsIStringStream.h"
+ #include "prmem.h"
+ #if defined(XP_WIN)
+ #include "nsILocalFileWin.h"
+ #endif
+ #include "xpcprivate.h"
++#include "nsIResProtocolHandler.h"
+
+ #ifdef MOZ_ENABLE_LIBXUL
+ #include "mozilla/scache/StartupCache.h"
+ #include "mozilla/scache/StartupCacheUtils.h"
+ #endif
+ #include "mozilla/Omnijar.h"
+
+ #include "jsdbgapi.h"
+@@ -621,34 +622,21 @@ mozJSComponentLoader::LoadModule(nsILoca
+
+ const mozilla::Module*
+ mozJSComponentLoader::LoadModuleFromJAR(nsILocalFile *aJarFile,
+ const nsACString &aComponentPath)
+ {
+ #if !defined(XPCONNECT_STANDALONE)
+ nsresult rv;
+
+- nsCAutoString fullSpec;
+-
+-#ifdef MOZ_OMNIJAR
+- PRBool equal;
+- rv = aJarFile->Equals(mozilla::OmnijarPath(), &equal);
+- if (NS_SUCCEEDED(rv) && equal) {
+- fullSpec = "resource://gre/";
+- } else {
+-#endif
+- nsCAutoString fileSpec;
+- NS_GetURLSpecFromActualFile(aJarFile, fileSpec);
+- fullSpec = "jar:";
+- fullSpec += fileSpec;
+- fullSpec += "!/";
+-#ifdef MOZ_OMNIJAR
+- }
+-#endif
+-
++ nsCAutoString fullSpec, fileSpec;
++ NS_GetURLSpecFromActualFile(aJarFile, fileSpec);
++ fullSpec = "jar:";
++ fullSpec += fileSpec;
++ fullSpec += "!/";
+ fullSpec += aComponentPath;
+
+ nsCOMPtr<nsIURI> uri;
+ rv = NS_NewURI(getter_AddRefs(uri), fullSpec);
+ if (NS_FAILED(rv))
+ return NULL;
+
+ nsAutoString hashstring;
+@@ -833,57 +821,138 @@ class JSScriptHolder
+ JSScriptHolder(JSContext *cx, JSScript *script)
+ : mCx(cx), mScript(script) {}
+ ~JSScriptHolder() { ::JS_DestroyScript(mCx, mScript); }
+ private:
+ JSContext *mCx;
+ JSScript *mScript;
+ };
+
++static const char baseName[2][5] = { "gre/", "app/" };
++
++static inline PRBool
++canonicalizeBase(nsCAutoString &spec, nsACString &out, mozilla::Omnijar::Type aType)
++{
++ nsCAutoString base;
++ nsresult rv = mozilla::Omnijar::GetURIString(aType, base);
++
++ if (NS_FAILED(rv) || !base.Length())
++ return PR_FALSE;
++
++ if (base.Compare(spec.get(), PR_FALSE, base.Length()))
++ return PR_FALSE;
++
++ out.Append("/resource/");
++ out.Append(baseName[aType]);
++ out.Append(Substring(spec, base.Length()));
++ return PR_TRUE;
++}
+ /**
+ * PathifyURI transforms mozilla .js uris into useful zip paths
+ * to make it makes it easier to manipulate startup cache entries
+ * using standard zip tools.
+ * Transformations applied:
+- * * jsloader/<scheme> prefix is used to group mozJSComponentLoader cache entries in
++ * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in
+ * a top-level zip directory.
+- * * In MOZ_OMNIJAR case resource:/// and resource://gre/ URIs refer to the same path
+- * so treat both of them as resource://gre/
++ * * resource:// URIs are resolved to their corresponding file/jar URI to
++ * canonicalize resources URIs other than gre and app.
++ * * Paths under GRE or APP directory have their base path replaced with
++ * resource/gre or resource/app to avoid depending on install location.
++ * * jar:file:///path/to/file.jar!/sub/path urls are replaced with
++ * /path/to/file.jar/sub/path
+ * * .bin suffix is added to the end of the path to indicate that jsloader/ entries
+ * are binary representations of JS source.
+ * For example:
+- * resource://gre/modules/XPCOMUtils.jsm becomes
+- * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin
++ * resource://gre/modules/XPCOMUtils.jsm or
++ * file://$GRE_DIR/modules/XPCOMUtils.jsm or
++ * jar:file://$GRE_DIR/omni.jar!/modules/XPCOMUtils.jsm become
++ * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin
++ * file://$PROFILE_DIR/extensions/{uuid}/components/component.js becomes
++ * jsloader/$PROFILE_DIR/extensions/%7Buuid%7D/components/component.js.bin
++ * jar:file://$PROFILE_DIR/extensions/some.xpi!/components/component.js becomes
++ * jsloader/$PROFILE_DIR/extensions/some.xpi/components/component.js.bin
+ */
+ static nsresult
+ PathifyURI(nsIURI *in, nsACString &out)
+ {
+- out = "jsloader/";
+- nsCAutoString scheme;
+- nsresult rv = in->GetScheme(scheme);
+- NS_ENSURE_SUCCESS(rv, rv);
+- out.Append(scheme);
+- nsCAutoString host;
+- // OK for GetHost to fail since it's not implemented sometimes
+- in->GetHost(host);
+-#ifdef MOZ_OMNIJAR
+- if (scheme.Equals("resource") && host.Length() == 0){
+- host = "gre";
+- }
+-#endif
+- if (host.Length()) {
+- out.Append("/");
+- out.Append(host);
+- }
+- nsCAutoString path;
+- rv = in->GetPath(path);
+- NS_ENSURE_SUCCESS(rv, rv);
+- out.Append(path);
+- out.Append(".bin");
+- return NS_OK;
++ PRBool equals;
++ nsresult rv;
++ nsCOMPtr<nsIURI> uri = in;
++ nsCAutoString spec;
++
++ out = "jsloader";
++
++ // Resolve resource:// URIs. At the end of this if/else block, we
++ // have both spec and uri variables identifying the same URI.
++ if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) {
++ nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIProtocolHandler> ph;
++ rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIResProtocolHandler> irph(do_QueryInterface(ph, &rv));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = irph->ResolveURI(in, spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri));
++ NS_ENSURE_SUCCESS(rv, rv);
++ } else {
++ rv = in->GetSpec(spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++ }
++
++ if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) &&
++ !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) {
++ if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) {
++ nsCOMPtr<nsIFileURL> baseFileURL;
++ baseFileURL = do_QueryInterface(uri, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCAutoString path;
++ rv = baseFileURL->GetPath(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ out.Append(path);
++ } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) {
++ nsCOMPtr<nsIJARURI> jarURI = do_QueryInterface(uri, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIURI> jarFileURI;
++ rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIFileURL> jarFileURL;
++ jarFileURL = do_QueryInterface(jarFileURI, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCAutoString path;
++ rv = jarFileURL->GetPath(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++ out.Append(path);
++
++ rv = jarURI->GetJAREntry(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++ out.Append("/");
++ out.Append(path);
++ } else { // Very unlikely
++ nsCAutoString spec;
++ rv = uri->GetSpec(spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ out.Append("/");
++ out.Append(spec);
++ }
++ }
++
++ out.Append(".bin");
++ return NS_OK;
+ }
+
+ /* static */
+ #ifdef MOZ_ENABLE_LIBXUL
+ nsresult
+ mozJSComponentLoader::ReadScript(StartupCache* cache, nsIURI *uri,
+ JSContext *cx, JSScript **script)
+ {
+diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp
+--- a/modules/libjar/nsJAR.cpp
++++ b/modules/libjar/nsJAR.cpp
+@@ -171,26 +171,23 @@ nsJAR::Open(nsIFile* zipFile)
+ if (mLock) return NS_ERROR_FAILURE; // Already open!
+
+ mZipFile = zipFile;
+ mOuterZipEntry.Truncate();
+
+ mLock = PR_NewLock();
+ NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY);
+
+-#ifdef MOZ_OMNIJAR
+ // The omnijar is special, it is opened early on and closed late
+ // this avoids reopening it
+- PRBool equals;
+- nsresult rv = zipFile->Equals(mozilla::OmnijarPath(), &equals);
+- if (NS_SUCCEEDED(rv) && equals) {
+- mZip = mozilla::OmnijarReader();
++ nsZipArchive *zip = mozilla::Omnijar::GetReader(zipFile);
++ if (zip) {
++ mZip = zip;
+ return NS_OK;
+ }
+-#endif
+ return mZip->OpenArchive(zipFile);
+ }
+
+ NS_IMETHODIMP
+ nsJAR::OpenInner(nsIZipReader *aZipReader, const char *aZipEntry)
+ {
+ NS_ENSURE_ARG_POINTER(aZipReader);
+ NS_ENSURE_ARG_POINTER(aZipEntry);
+@@ -234,23 +231,22 @@ nsJAR::Close()
+ mLock = nsnull;
+ }
+
+ mParsedManifest = PR_FALSE;
+ mManifestData.Reset();
+ mGlobalStatus = JAR_MANIFEST_NOT_PARSED;
+ mTotalItemsInManifest = 0;
+
+-#ifdef MOZ_OMNIJAR
+- if (mZip == mozilla::OmnijarReader()) {
++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) ||
++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) {
+ mZip.forget();
+ mZip = new nsZipArchive();
+ return NS_OK;
+ }
+-#endif
+ return mZip->CloseArchive();
+ }
+
+ NS_IMETHODIMP
+ nsJAR::Test(const char *aEntryName)
+ {
+ return mZip->Test(aEntryName);
+ }
+@@ -391,22 +387,21 @@ nsJAR::GetInputStreamWithSpec(const nsAC
+ NS_IMETHODIMP
+ nsJAR::GetCertificatePrincipal(const char* aFilename, nsIPrincipal** aPrincipal)
+ {
+ //-- Parameter check
+ if (!aPrincipal)
+ return NS_ERROR_NULL_POINTER;
+ *aPrincipal = nsnull;
+
+-#ifdef MOZ_OMNIJAR
+ // Don't check signatures in the omnijar - this is only
+ // interesting for extensions/XPIs.
+- if (mZip == mozilla::OmnijarReader())
++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) ||
++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)))
+ return NS_OK;
+-#endif
+
+ //-- Parse the manifest
+ nsresult rv = ParseManifest();
+ if (NS_FAILED(rv)) return rv;
+ if (mGlobalStatus == JAR_NO_MANIFEST)
+ return NS_OK;
+
+ PRInt16 requestedStatus;
+diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp
+--- a/modules/libpref/src/nsPrefService.cpp
++++ b/modules/libpref/src/nsPrefService.cpp
+@@ -67,20 +67,18 @@
+
+ #include "prefapi.h"
+ #include "prefread.h"
+ #include "prefapi_private_data.h"
+ #include "PrefTuple.h"
+
+ #include "nsITimelineService.h"
+
+-#ifdef MOZ_OMNIJAR
+ #include "mozilla/Omnijar.h"
+ #include "nsZipArchive.h"
+-#endif
+
+ // Definitions
+ #define INITIAL_PREF_FILES 10
+ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
+
+ // Prototypes
+ static nsresult openPrefFile(nsIFile* aFile);
+ static nsresult pref_InitInitialObjects(void);
+@@ -793,124 +791,144 @@ static nsresult pref_LoadPrefsInDirList(
+ pref_LoadPrefsInDir(dir, nsnull, 0);
+ }
+ }
+ }
+ }
+ return NS_OK;
+ }
+
+-//----------------------------------------------------------------------------------------
+-// Initialize default preference JavaScript buffers from
+-// appropriate TEXT resources
+-//----------------------------------------------------------------------------------------
+-static nsresult pref_InitDefaults()
+-{
+- nsCOMPtr<nsIFile> greprefsFile;
+- nsresult rv;
+-
+- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- rv = openPrefFile(greprefsFile);
+- if (NS_FAILED(rv)) {
+- NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
+- }
+-
+- return NS_OK;
+-}
+-
+-#ifdef MOZ_OMNIJAR
+ static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
+ {
+ nsZipItemPtr<char> manifest(jarReader, name, true);
+ NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
+
+ PrefParseState ps;
+ PREF_InitParseState(&ps, PREF_ReaderCallback, NULL);
+ nsresult rv = PREF_ParseBuf(&ps, manifest, manifest.Length());
+ PREF_FinalizeParseState(&ps);
+
+ return rv;
+ }
+
+-static nsresult pref_InitAppDefaultsFromOmnijar()
+-{
+- nsresult rv;
+-
+- nsZipArchive* jarReader = mozilla::OmnijarReader();
+- if (!jarReader)
+- return pref_InitDefaults();
+-
+- rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsZipFind *findPtr;
+- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr);
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsAutoPtr<nsZipFind> find(findPtr);
+-
+- nsTArray<nsCString> prefEntries;
+- const char *entryName;
+- PRUint16 entryNameLen;
+- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
+- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
+- }
+-
+- prefEntries.Sort();
+- for (PRUint32 i = prefEntries.Length(); i--; ) {
+- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get());
+- if (NS_FAILED(rv))
+- NS_WARNING("Error parsing preferences.");
+- }
+-
+- return NS_OK;
+-}
+-#endif
+-
++//----------------------------------------------------------------------------------------
++// Initialize default preference JavaScript buffers from
++// appropriate TEXT resources
++//----------------------------------------------------------------------------------------
+ static nsresult pref_InitInitialObjects()
+ {
+ nsresult rv;
+
+- // first we parse the GRE default prefs. This also works if we're not using a GRE,
+-#ifdef MOZ_OMNIJAR
+- rv = pref_InitAppDefaultsFromOmnijar();
+-#else
+- rv = pref_InitDefaults();
+-#endif
+- NS_ENSURE_SUCCESS(rv, rv);
++ // In omni.jar case, we load the following prefs:
++ // - jar:$gre/omni.jar!/greprefs.js
++ // - jar:$gre/omni.jar!/defaults/pref/*.js
++ // In non omni.jar case, we load:
++ // - $gre/greprefs.js
++ //
++ // When $app == $gre, we additionally load, in all cases:
++ // - $gre/defaults/pref/*.js
++ // This is kept for bug 591866 (channel-prefs.js should not be in omni.jar).
++ // We load all files instead of channel-prefs.js only to have the same
++ // behaviour as $app != $gre.
++ //
++ // When $app != $gre, we additionally load, in omni.jar case:
++ // - jar:$app/omni.jar!/defaults/preferences/*.js
++ // - $app/defaults/preferences/*.js
++ // and in non omni.jar case:
++ // - $app/defaults/preferences/*.js
+
+- nsCOMPtr<nsIFile> defaultPrefDir;
+- // now parse the "application" default preferences
+- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
+- NS_ENSURE_SUCCESS(rv, rv);
++ nsZipFind *findPtr;
++ nsAutoPtr<nsZipFind> find;
++ nsTArray<nsCString> prefEntries;
++ const char *entryName;
++ PRUint16 entryNameLen;
+
+- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
+- static const char* specialFiles[] = {
++ nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE);
++ if (jarReader) {
++ // Load jar:$gre/omni.jar!/greprefs.js
++ rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ // Load jar:$gre/omni.jar!/defaults/pref/*.js
++ rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ find = findPtr;
++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
++ }
++
++ prefEntries.Sort();
++ for (PRUint32 i = prefEntries.Length(); i--; ) {
++ rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get());
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing preferences.");
++ }
++ } else {
++ // Load $gre/greprefs.js
++ nsCOMPtr<nsIFile> greprefsFile;
++ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = openPrefFile(greprefsFile);
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
++ }
++
++ if (!mozilla::Omnijar::HasOmnijar(mozilla::Omnijar::APP)) {
++ // Load $gre/defaults/pref/*.js
++ nsCOMPtr<nsIFile> defaultPrefDir;
++
++ rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
++ static const char* specialFiles[] = {
+ #if defined(XP_MAC) || defined(XP_MACOSX)
+ "macprefs.js"
+ #elif defined(XP_WIN)
+ "winpref.js"
+ #elif defined(XP_UNIX)
+ "unix.js"
+-#if defined(_AIX)
++#if defined(VMS)
++ , "openvms.js"
++#elif defined(_AIX)
+ , "aix.js"
+ #endif
+ #elif defined(XP_OS2)
+ "os2pref.js"
++#elif defined(XP_BEOS)
++ "beos.js"
+ #endif
+- };
++ };
+
+- rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
+- if (NS_FAILED(rv)) {
+- NS_WARNING("Error parsing application default preferences.");
++ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing application default preferences.");
++ }
++
++ // Load jar:$app/omni.jar!/defaults/preferences/*.js
++ nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
++ if (appJarReader) {
++ rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
++ NS_ENSURE_SUCCESS(rv, rv);
++ find = findPtr;
++ prefEntries.Clear();
++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
++ }
++ prefEntries.Sort();
++ for (PRUint32 i = prefEntries.Length(); i--; ) {
++ rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get());
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing preferences.");
++ }
+ }
+
+ rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID,
+ nsnull, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID);
+
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -152,97 +152,62 @@ nsResProtocolHandler::nsResProtocolHandl
+ }
+
+ nsResProtocolHandler::~nsResProtocolHandler()
+ {
+ gResHandler = nsnull;
+ }
+
+ nsresult
+-nsResProtocolHandler::AddSpecialDir(const char* aSpecialDir, const nsACString& aSubstitution)
+-{
+- nsCOMPtr<nsIFile> file;
+- nsresult rv = NS_GetSpecialDirectory(aSpecialDir, getter_AddRefs(file));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsCOMPtr<nsIURI> uri;
+- rv = mIOService->NewFileURI(file, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- return SetSubstitution(aSubstitution, uri);
+-}
+-
+-nsresult
+ nsResProtocolHandler::Init()
+ {
+ if (!mSubstitutions.Init(32))
+ return NS_ERROR_UNEXPECTED;
+
+ nsresult rv;
+
+ mIOService = do_GetIOService(&rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+-#ifdef MOZ_OMNIJAR
+- nsCOMPtr<nsIFile> omniJar(mozilla::OmnijarPath());
+- if (omniJar)
+- return Init(omniJar);
+-#endif
+-
+- // these entries should be kept in sync with the omnijar Init function
++ nsCAutoString appURI, greURI;
++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+- // make resource:/// point to the application directory
++ // make resource:/// point to the application directory or omnijar
+ //
+- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString());
++ nsCOMPtr<nsIURI> uri;
++ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = SetSubstitution(EmptyCString(), uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+ // make resource://gre/ point to the GRE directory
+ //
+- rv = AddSpecialDir(NS_GRE_DIR, kGRE);
++ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0.
++ rv = NS_NewURI(getter_AddRefs(uri), greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++ }
++
++ rv = SetSubstitution(kGRE, uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir...
+ // but once I finish multiple chrome registration I'm not sure that it is needed
+
+ // XXX dveditz: resource://pchrome/ defeats profile directory salting
+ // if web content can load it. Tread carefully.
+
+ return rv;
+ }
+
+-#ifdef MOZ_OMNIJAR
+-nsresult
+-nsResProtocolHandler::Init(nsIFile *aOmniJar)
+-{
+- nsresult rv;
+- nsCOMPtr<nsIURI> uri;
+- nsCAutoString omniJarSpec;
+- NS_GetURLSpecFromActualFile(aOmniJar, omniJarSpec, mIOService);
+-
+- nsCAutoString urlStr("jar:");
+- urlStr += omniJarSpec;
+- urlStr += "!/";
+-
+- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- // these entries should be kept in sync with the normal Init function
+-
+- // resource:/// points to jar:omni.jar!/
+- SetSubstitution(EmptyCString(), uri);
+-
+- // resource://gre/ points to jar:omni.jar!/
+- SetSubstitution(kGRE, uri);
+-
+- return NS_OK;
+-}
+-#endif
+-
+ #ifdef MOZ_IPC
+ static PLDHashOperator
+ EnumerateSubstitution(const nsACString& aKey,
+ nsIURI* aURI,
+ void* aArg)
+ {
+ nsTArray<ResourceMapping>* resources =
+ static_cast<nsTArray<ResourceMapping>*>(aArg);
+diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp
+--- a/startupcache/StartupCache.cpp
++++ b/startupcache/StartupCache.cpp
+@@ -237,27 +237,36 @@ StartupCache::GetBuffer(const char* id,
+ nsZipItemPtr<char> zipItem(mArchive, id, true);
+ if (zipItem) {
+ *outbuf = zipItem.Forget();
+ *length = zipItem.Length();
+ return NS_OK;
+ }
+ }
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarReader()) {
++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)) {
+ // no need to checksum omnijarred entries
+- nsZipItemPtr<char> zipItem(mozilla::OmnijarReader(), id);
++ nsZipItemPtr<char> zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::APP), id);
+ if (zipItem) {
+ *outbuf = zipItem.Forget();
+ *length = zipItem.Length();
+ return NS_OK;
+ }
+ }
+-#endif
++
++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) {
++ // no need to checksum omnijarred entries
++ nsZipItemPtr<char> zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE), id);
++ if (zipItem) {
++ *outbuf = zipItem.Forget();
++ *length = zipItem.Length();
++ return NS_OK;
++ }
++ }
++
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+
+ // Makes a copy of the buffer, client retains ownership of inbuf.
+ nsresult
+ StartupCache::PutBuffer(const char* id, const char* inbuf, PRUint32 len)
+ {
+ WaitOnWriteThread();
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
+@@ -3897,35 +3897,45 @@ XRE_InitCommandLine(int aArgc, char* aAr
+ CommandLine::Init(aArgc, canonArgs);
+
+ for (int i = 0; i < aArgc; ++i)
+ free(canonArgs[i]);
+ delete[] canonArgs;
+ #endif
+ #endif
+
+-#ifdef MOZ_OMNIJAR
+- const char *omnijarPath = nsnull;
+- ArgResult ar = CheckArg("omnijar", PR_FALSE, &omnijarPath);
++ const char *path = nsnull;
++ ArgResult ar = CheckArg("grebase", PR_FALSE, &path);
+ if (ar == ARG_BAD) {
+- PR_fprintf(PR_STDERR, "Error: argument -omnijar requires an omnijar path\n");
++ PR_fprintf(PR_STDERR, "Error: argument -grebase requires a path argument\n");
+ return NS_ERROR_FAILURE;
+ }
+
+- if (!omnijarPath)
++ if (!path)
+ return rv;
+
+- nsCOMPtr<nsILocalFile> omnijar;
+- rv = NS_NewNativeLocalFile(nsDependentCString(omnijarPath), PR_TRUE,
+- getter_AddRefs(omnijar));
+- if (NS_SUCCEEDED(rv))
+- mozilla::SetOmnijar(omnijar);
+-#endif
+-
+- return rv;
++ nsCOMPtr<nsILocalFile> greBase;
++ rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase));
++ if (NS_FAILED(rv))
++ return rv;
++
++ ar = CheckArg("appbase", PR_FALSE, &path);
++ if (ar == ARG_BAD) {
++ PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n");
++ return NS_ERROR_FAILURE;
++ }
++
++ nsCOMPtr<nsILocalFile> appBase;
++ if (path) {
++ rv = XRE_GetFileFromPath(path, getter_AddRefs(appBase));
++ if (NS_FAILED(rv))
++ return rv;
++ }
++
++ return mozilla::Omnijar::SetBase(greBase, appBase);
+ }
+
+ nsresult
+ XRE_DeinitCommandLine()
+ {
+ nsresult rv = NS_OK;
+
+ #if defined(MOZ_IPC)
+diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
+--- a/toolkit/xre/nsEmbedFunctions.cpp
++++ b/toolkit/xre/nsEmbedFunctions.cpp
+@@ -512,19 +512,17 @@ XRE_InitChildProcess(int aArgc,
+ }
+
+ // Run the UI event loop on the main thread.
+ uiMessageLoop.MessageLoop::Run();
+
+ // Allow ProcessChild to clean up after itself before going out of
+ // scope and being deleted
+ process->CleanUp();
+-#ifdef MOZ_OMNIJAR
+- mozilla::SetOmnijar(nsnull);
+-#endif
++ mozilla::Omnijar::SetBase(nsnull, nsnull);
+ }
+ }
+
+ NS_LogTerm();
+ return XRE_DeinitCommandLine();
+ }
+
+ MessageLoop*
+diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in
+--- a/xpcom/build/Makefile.in
++++ b/xpcom/build/Makefile.in
+@@ -64,28 +64,25 @@ CSRCS = \
+ $(NULL)
+
+ CPPSRCS = \
+ $(XPCOM_GLUE_SRC_LCPPSRCS) \
+ $(XPCOM_GLUENS_SRC_LCPPSRCS) \
+ nsXPComInit.cpp \
+ nsXPCOMStrings.cpp \
+ Services.cpp \
++ Omnijar.cpp \
+ $(NULL)
+
+ ifndef MOZ_ENABLE_LIBXUL
+ ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
+ CPPSRCS += dlldeps.cpp
+ endif
+ endif
+
+-ifdef MOZ_OMNIJAR
+-CPPSRCS += Omnijar.cpp
+-endif
+-
+ SHARED_LIBRARY_LIBS = \
+ $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \
+ ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \
+ ../io/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \
+ ../components/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \
+ ../threads/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \
+ ../proxy/src/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \
+ ../base/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \
+diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp
+--- a/xpcom/build/Omnijar.cpp
++++ b/xpcom/build/Omnijar.cpp
+@@ -16,16 +16,17 @@
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Michael Wu <mwu@mozilla.com>
++ * Mike Hommey <mh@glandium.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+@@ -33,69 +34,175 @@
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ #include "Omnijar.h"
+
+-#include "nsILocalFile.h"
+-#include "nsXULAppAPI.h"
++#include "nsIFile.h"
+ #include "nsZipArchive.h"
++#include "nsNetUtil.h"
+
+-static nsILocalFile* sOmnijarPath = nsnull;
+-static nsZipArchive* sOmnijarReader = nsnull;
++namespace mozilla {
+
+-static void
+-SetupReader()
++nsIFile *Omnijar::sPath[2] = { nsnull, nsnull };
++PRBool Omnijar::sIsOmnijar[2] = { PR_FALSE, PR_FALSE };
++
++#ifdef MOZ_ENABLE_LIBXUL
++nsZipArchive *Omnijar::sReader[2] = { nsnull, nsnull };
++#endif
++
++static already_AddRefed<nsIFile>
++ComputePath(nsIFile *aPath, PRBool &aIsOmnijar)
+ {
+- if (!sOmnijarPath) {
+- return;
++ PRBool isDir;
++ aIsOmnijar = PR_FALSE;
++ if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir)
++ return nsnull;
++
++ nsCOMPtr<nsIFile> path;
++#ifdef MOZ_ENABLE_LIBXUL
++ // Search for omni.jar in the given directory
++ if (!isDir || NS_FAILED(aPath->Clone(getter_AddRefs(path))))
++ return nsnull;
++
++ if (NS_FAILED(path->AppendNative(NS_LITERAL_CSTRING("omni.jar"))))
++ return nsnull;
++
++ if (NS_FAILED(path->Exists(&aIsOmnijar)))
++ return nsnull;
++#endif
++
++ if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path))))
++ return nsnull;
++
++ return path.forget();
++}
++
++nsresult
++Omnijar::SetBase(nsIFile *aGrePath, nsIFile *aAppPath)
++{
++ NS_ABORT_IF_FALSE(aGrePath || !aAppPath, "Omnijar::SetBase(NULL, something) call forbidden");
++
++#ifdef MOZ_ENABLE_LIBXUL
++ if (sReader[GRE]) {
++ sReader[GRE]->CloseArchive();
++ delete sReader[GRE];
++ }
++ if (sReader[APP]) {
++ sReader[APP]->CloseArchive();
++ delete sReader[APP];
++ }
++ sReader[APP] = sReader[GRE] = nsnull;
++#endif
++
++ nsresult rv;
++ PRBool equals;
++ if (aAppPath) {
++ rv = aAppPath->Equals(aGrePath, &equals);
++ NS_ENSURE_SUCCESS(rv, rv);
++ } else {
++ equals = PR_TRUE;
+ }
+
+- nsZipArchive* zipReader = new nsZipArchive();
+- if (!zipReader) {
+- NS_IF_RELEASE(sOmnijarPath);
+- return;
++ nsCOMPtr<nsIFile> grePath = ComputePath(aGrePath, sIsOmnijar[GRE]);
++ nsCOMPtr<nsIFile> appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]);
++
++ NS_IF_RELEASE(sPath[GRE]);
++ sPath[GRE] = grePath;
++ NS_IF_ADDREF(sPath[GRE]);
++
++ NS_IF_RELEASE(sPath[APP]);
++ sPath[APP] = appPath;
++ NS_IF_ADDREF(sPath[APP]);
++
++ return NS_OK;
++}
++
++already_AddRefed<nsIFile>
++Omnijar::GetBase(Type aType)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ if (!sIsOmnijar[aType]) {
++ NS_IF_ADDREF(sPath[aType]);
++ return sPath[aType];
+ }
+
+- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) {
++ nsCOMPtr<nsIFile> file, path;
++ if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file))))
++ return nsnull;
++
++ if (NS_FAILED(file->GetParent(getter_AddRefs(path))))
++ return nsnull;
++ return path.forget();
++}
++
++#ifdef MOZ_ENABLE_LIBXUL
++nsZipArchive *
++Omnijar::GetReader(Type aType)
++{
++ if (!sIsOmnijar[aType])
++ return nsnull;
++
++ if (sReader[aType])
++ return sReader[aType];
++
++ nsZipArchive* zipReader = new nsZipArchive();
++ if (!zipReader)
++ return nsnull;
++
++ if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) {
+ delete zipReader;
+- NS_IF_RELEASE(sOmnijarPath);
+- return;
++ return nsnull;
+ }
+
+- sOmnijarReader = zipReader;
++ return (sReader[aType] = zipReader);
+ }
+
+-nsILocalFile*
+-mozilla::OmnijarPath()
++nsZipArchive *
++Omnijar::GetReader(nsIFile *aPath)
+ {
+- if (!sOmnijarReader)
+- SetupReader();
++ PRBool equals;
++ nsresult rv;
+
+- return sOmnijarPath;
++ if (sIsOmnijar[GRE]) {
++ rv = sPath[GRE]->Equals(aPath, &equals);
++ if (NS_SUCCEEDED(rv) && equals)
++ return GetReader(GRE);
++ }
++ if (sIsOmnijar[APP]) {
++ rv = sPath[APP]->Equals(aPath, &equals);
++ if (NS_SUCCEEDED(rv) && equals)
++ return GetReader(APP);
++ }
++ return nsnull;
++}
++#endif
++
++nsresult
++Omnijar::GetURIString(Type aType, nsCString &result)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ result = "";
++
++ if ((aType == APP) && (!sPath[APP]))
++ return NS_OK;
++
++ nsCAutoString omniJarSpec;
++ nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ if (sIsOmnijar[aType]) {
++ result = "jar:";
++ result += omniJarSpec;
++ result += "!";
++ } else {
++ result = omniJarSpec;
++ }
++ result += "/";
++ return NS_OK;
+ }
+
+-nsZipArchive*
+-mozilla::OmnijarReader()
+-{
+- if (!sOmnijarReader)
+- SetupReader();
+-
+- return sOmnijarReader;
+-}
+-
+-void
+-mozilla::SetOmnijar(nsILocalFile* aPath)
+-{
+- NS_IF_RELEASE(sOmnijarPath);
+- if (sOmnijarReader) {
+- sOmnijarReader->CloseArchive();
+- delete sOmnijarReader;
+- sOmnijarReader = nsnull;
+- }
+-
+- sOmnijarPath = aPath;
+- NS_IF_ADDREF(sOmnijarPath);
+-}
+-
++} /* namespace mozilla */
+diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h
+--- a/xpcom/build/Omnijar.h
++++ b/xpcom/build/Omnijar.h
+@@ -16,16 +16,17 @@
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Michael Wu <mwu@mozilla.com>
++ * Mike Hommey <mh@glandium.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+@@ -34,29 +35,137 @@
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ #ifndef mozilla_Omnijar_h
+ #define mozilla_Omnijar_h
+
+-class nsILocalFile;
++#include "nscore.h"
++#include "nsTArray.h"
++#include "nsCOMPtr.h"
++#include "nsString.h"
++
++class nsIFile;
+ class nsZipArchive;
+-
+-#ifdef MOZ_OMNIJAR
++class nsIURI;
+
+ namespace mozilla {
+
++#ifdef MOZ_ENABLE_LIBXUL
++#define OMNIJAR_EXPORT
++#else
++#define OMNIJAR_EXPORT NS_EXPORT
++#endif
++
++class OMNIJAR_EXPORT Omnijar {
++private:
+ /**
+- * This returns the path to the omnijar.
+- * If the omnijar isn't available, this function will return null.
+- * Callers should fallback to flat packaging if null.
++ * Store an nsIFile for either a base directory when there is no omni.jar,
++ * or omni.jar itself. We can store two paths here, one for GRE
++ * (corresponding to resource://gre/) and one for APP
++ * (corresponding to resource:/// and resource://app/), but only
++ * store one when both point to the same location (unified).
+ */
+-nsILocalFile *OmnijarPath();
+-nsZipArchive *OmnijarReader();
+-void SetOmnijar(nsILocalFile* aPath);
++static nsIFile *sPath[2];
++/**
++ * Store whether the corresponding sPath is an omni.jar or a directory
++ */
++static PRBool sIsOmnijar[2];
++
++#ifdef MOZ_ENABLE_LIBXUL
++/**
++ * Cached nsZipArchives for the corresponding sPath
++ */
++static nsZipArchive *sReader[2];
++#endif
++
++public:
++enum Type {
++ GRE = 0,
++ APP = 1
++};
++
++/**
++ * Returns whether SetBase has been called at least once with
++ * a valid nsIFile
++ */
++static PRBool
++IsInitialized()
++{
++ // GRE path is always set after initialization.
++ return sPath[0] != nsnull;
++}
++
++/**
++ * Sets the base directories for GRE and APP. APP base directory
++ * may be nsnull, in case the APP and GRE directories are the same.
++ */
++static nsresult SetBase(nsIFile *aGrePath, nsIFile *aAppPath);
++
++/**
++ * Returns an nsIFile pointing to the omni.jar file for GRE or APP.
++ * Returns nsnull when there is no corresponding omni.jar.
++ * Also returns nsnull for APP in the unified case.
++ */
++static already_AddRefed<nsIFile>
++GetPath(Type aType)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ if (sIsOmnijar[aType]) {
++ NS_IF_ADDREF(sPath[aType]);
++ return sPath[aType];
++ }
++ return nsnull;
++}
++
++/**
++ * Returns whether GRE or APP use an omni.jar. Returns PR_False when
++ * using an omni.jar in the unified case.
++ */
++static PRBool
++HasOmnijar(Type aType)
++{
++ return sIsOmnijar[aType];
++}
++
++/**
++ * Returns the base directory for GRE or APP. In the unified case,
++ * returns nsnull for APP.
++ */
++static already_AddRefed<nsIFile> GetBase(Type aType);
++
++/**
++ * Returns a nsZipArchive pointer for the omni.jar file for GRE or
++ * APP. Returns nsnull in the same cases GetPath() would.
++ */
++#ifdef MOZ_ENABLE_LIBXUL
++static nsZipArchive *GetReader(Type aType);
++#else
++static nsZipArchive *GetReader(Type aType) { return nsnull; }
++#endif
++
++/**
++ * Returns a nsZipArchive pointer for the given path IAOI the given
++ * path is the omni.jar for either GRE or APP.
++ */
++#ifdef MOZ_ENABLE_LIBXUL
++static nsZipArchive *GetReader(nsIFile *aPath);
++#else
++static nsZipArchive *GetReader(nsIFile *aPath) { return nsnull; }
++#endif
++
++/**
++ * Returns the URI string corresponding to the omni.jar or directory
++ * for GRE or APP. i.e. jar:/path/to/omni.jar!/ for omni.jar and
++ * /path/to/base/dir/ otherwise. Returns an empty string for APP in
++ * the unified case.
++ * The returned URI is guaranteed to end with a slash.
++ */
++static nsresult GetURIString(Type aType, nsCString &result);
++
++}; /* class Omnijar */
+
+ } /* namespace mozilla */
+
+-#endif /* MOZ_OMNIJAR */
+-
+ #endif /* mozilla_Omnijar_h */
+diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp
+--- a/xpcom/build/nsXPComInit.cpp
++++ b/xpcom/build/nsXPComInit.cpp
+@@ -462,35 +462,35 @@ NS_InitXPCOM2(nsIServiceManager* *result
+ nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib);
+ }
+
+ if (appFileLocationProvider) {
+ rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider);
+ if (NS_FAILED(rv)) return rv;
+ }
+
+-#ifdef MOZ_OMNIJAR
+ NS_TIME_FUNCTION_MARK("Next: Omnijar init");
+
+- if (!mozilla::OmnijarPath()) {
+- nsCOMPtr<nsILocalFile> omnijar;
++ if (!mozilla::Omnijar::IsInitialized()) {
++ nsCOMPtr<nsILocalFile> greDir, appDir;
+ nsCOMPtr<nsIFile> file;
+
+- rv = NS_ERROR_FAILURE;
+ nsDirectoryService::gService->Get(NS_GRE_DIR,
+ NS_GET_IID(nsIFile),
+ getter_AddRefs(file));
+- if (file)
+- rv = file->Append(NS_LITERAL_STRING("omni.jar"));
+- if (NS_SUCCEEDED(rv))
+- omnijar = do_QueryInterface(file);
+- if (NS_SUCCEEDED(rv))
+- mozilla::SetOmnijar(omnijar);
++ greDir = do_QueryInterface(file);
++
++ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR,
++ NS_GET_IID(nsIFile),
++ getter_AddRefs(file));
++ appDir = do_QueryInterface(file);
++
++ rv = mozilla::Omnijar::SetBase(greDir, appDir);
++ NS_ENSURE_SUCCESS(rv, rv);
+ }
+-#endif
+
+ #ifdef MOZ_IPC
+ if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) {
+ NS_TIME_FUNCTION_MARK("Next: IPC command line init");
+
+ #ifdef OS_WIN
+ CommandLine::Init(0, nsnull);
+ #else
+@@ -769,18 +769,16 @@ ShutdownXPCOM(nsIServiceManager* servMgr
+ sCommandLineWasInitialized = false;
+ }
+ if (sExitManager) {
+ delete sExitManager;
+ sExitManager = nsnull;
+ }
+ #endif
+
+-#ifdef MOZ_OMNIJAR
+- mozilla::SetOmnijar(nsnull);
+-#endif
++ mozilla::Omnijar::SetBase(nsnull, nsnull);
+
+ NS_LogTerm();
+
+ return NS_OK;
+ }
+
+ } // namespace mozilla
+diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp
+--- a/xpcom/components/nsComponentManager.cpp
++++ b/xpcom/components/nsComponentManager.cpp
+@@ -175,18 +175,16 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA
+ #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) \
+ NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (contractid: %s)", MOZ_FUNCTION_NAME, \
+ __LINE__, (cid))
+ #else
+ #define COMPMGR_TIME_FUNCTION_CID(cid) do {} while (0)
+ #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0)
+ #endif
+
+-#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///")
+-
+ nsresult
+ nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const
+ {
+ nsresult rv;
+ nsXPIDLCString value;
+ nsCOMPtr<nsICategoryManager> catman;
+ nsComponentManagerImpl *compMgr = nsComponentManagerImpl::gComponentManager;
+ if (!compMgr) {
+@@ -390,47 +388,44 @@ nsresult nsComponentManagerImpl::Init()
+
+ nsCategoryManager::GetSingleton()->SuppressNotifications(true);
+
+ RegisterModule(&kXPCOMModule, NULL);
+
+ for (PRUint32 i = 0; i < sStaticModules->Length(); ++i)
+ RegisterModule((*sStaticModules)[i], NULL);
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarPath()) {
+- nsCOMPtr<nsIZipReader> omnijarReader = new nsJAR();
+- rv = omnijarReader->Open(mozilla::OmnijarPath());
+- if (NS_SUCCEEDED(rv))
+- RegisterJarManifest(omnijarReader, "chrome.manifest", false);
++ nsCOMPtr<nsIFile> appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP);
++ if (appOmnijar) {
++ cl = sModuleLocations->InsertElementAt(1); // Insert after greDir
++ cl->type = NS_COMPONENT_LOCATION;
++ cl->location = do_QueryInterface(appOmnijar);
++ cl->jar = true;
+ }
+-#endif
++ nsCOMPtr<nsIFile> greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE);
++ if (greOmnijar) {
++ cl = sModuleLocations->InsertElementAt(0);
++ cl->type = NS_COMPONENT_LOCATION;
++ cl->location = do_QueryInterface(greOmnijar);
++ cl->jar = true;
++ }
+
+ for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) {
+ ComponentLocation& l = sModuleLocations->ElementAt(i);
+ if (!l.jar) {
+ RegisterManifestFile(l.type, l.location, false);
+ continue;
+ }
+
+ nsCOMPtr<nsIZipReader> reader = do_CreateInstance(kZipReaderCID, &rv);
+ rv = reader->Open(l.location);
+ if (NS_SUCCEEDED(rv))
+ RegisterJarManifest(reader, "chrome.manifest", false);
+ }
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarPath()) {
+- cl = sModuleLocations->InsertElementAt(0);
+- cl->type = NS_COMPONENT_LOCATION;
+- cl->location = mozilla::OmnijarPath();
+- cl->jar = true;
+- }
+-#endif
+-
+ nsCategoryManager::GetSingleton()->SuppressNotifications(false);
+
+ mStatus = NORMAL;
+
+ return NS_OK;
+ }
+
+ void
+# HG changeset patch
+# Parent ff1b810f78226d7f4010909d3cde05a57fdcf20c
+Bug 620931 part 4 - Fix resource://app/ to always point to the same as resource:///
+
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -74,16 +74,17 @@ static nsResProtocolHandler *gResHandler
+ // set NSPR_LOG_FILE=log.txt
+ //
+ // this enables PR_LOG_ALWAYS level information and places all output in
+ // the file log.txt
+ //
+ static PRLogModuleInfo *gResLog;
+ #endif
+
++#define kAPP NS_LITERAL_CSTRING("app")
+ #define kGRE NS_LITERAL_CSTRING("gre")
+
+ //----------------------------------------------------------------------------
+ // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution
+ //----------------------------------------------------------------------------
+
+ nsresult
+ nsResURL::EnsureFile()
+@@ -179,16 +180,22 @@ nsResProtocolHandler::Init()
+ nsCOMPtr<nsIURI> uri;
+ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ rv = SetSubstitution(EmptyCString(), uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
++ // make resource://app/ point to the application directory or omnijar
++ //
++ rv = SetSubstitution(kAPP, uri);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ //
+ // make resource://gre/ point to the GRE directory
+ //
+ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0.
+ rv = NS_NewURI(getter_AddRefs(uri), greURI);
+ NS_ENSURE_SUCCESS(rv, rv);
+ }
+
+ rv = SetSubstitution(kGRE, uri);
+diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
+--- a/toolkit/xre/nsXREDirProvider.cpp
++++ b/toolkit/xre/nsXREDirProvider.cpp
+@@ -300,19 +300,16 @@ nsXREDirProvider::GetFile(const char* aP
+ }
+ }
+ else if (!strcmp(aProperty, XRE_EXECUTABLE_FILE) && gArgv[0]) {
+ nsCOMPtr<nsILocalFile> lf;
+ rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf));
+ if (NS_SUCCEEDED(rv))
+ file = lf;
+ }
+- else if (!strcmp(aProperty, "resource:app")) {
+- rv = GetAppDir()->Clone(getter_AddRefs(file));
+- }
+
+ else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) {
+ return mProfileDir->Clone(aFile);
+ }
+ else if (!strcmp(aProperty, NS_APP_PROFILE_LOCAL_DIR_STARTUP)) {
+ if (mProfileLocalDir)
+ return mProfileLocalDir->Clone(aFile);
+
+# HG changeset patch
+# Parent 7d2228db71a299afca60babff632a967d2d6c456
+Bug 620931 part 5 - Enable omni.jar by default on xulrunner
+
+diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh
+--- a/xulrunner/confvars.sh
++++ b/xulrunner/confvars.sh
+@@ -36,15 +36,16 @@
+ #
+ # ***** END LICENSE BLOCK *****
+
+ MOZ_APP_NAME=xulrunner
+ MOZ_APP_DISPLAYNAME=XULRunner
+ MOZ_UPDATER=1
+ MOZ_XULRUNNER=1
+ MOZ_ENABLE_LIBXUL=1
++MOZ_CHROME_FILE_FORMAT=omni
+ MOZ_STATIC_BUILD_UNSUPPORTED=1
+ MOZ_APP_VERSION=$MOZILLA_VERSION
+ if test "$MOZ_STORAGE"; then
+ MOZ_PLACES=1
+ fi
+ MOZ_EXTENSIONS_DEFAULT=" gnomevfs"
+ MOZ_URL_CLASSIFIER=1
diff --git a/community-staging/xulrunner-oss/xulrunner-version.patch b/community-staging/xulrunner-oss/xulrunner-version.patch
new file mode 100644
index 000000000..8e81b23ea
--- /dev/null
+++ b/community-staging/xulrunner-oss/xulrunner-version.patch
@@ -0,0 +1,12 @@
+diff -Nur mozilla-2.0.orig/xulrunner/installer/Makefile.in mozilla-2.0/xulrunner/installer/Makefile.in
+--- mozilla-2.0.orig/xulrunner/installer/Makefile.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/Makefile.in 2011-03-13 01:58:19.663360705 -0800
+@@ -44,6 +44,8 @@
+
+ include $(DEPTH)/config/autoconf.mk
+
++MOZ_APP_VERSION="2.0"
++
+ NO_PKG_FILES = \
+ xulrunner-config \
+ regchrome* \
diff --git a/community-staging/yaz/PKGBUILD b/community-staging/yaz/PKGBUILD
new file mode 100644
index 000000000..bf42c005f
--- /dev/null
+++ b/community-staging/yaz/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 48643 2011-06-03 16:57:46Z stephane $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: William Rea <sillywilly@gmail.com>
+# Contributor: Robert Emil Berge <filoktetes@linuxophic.org>
+
+pkgname=yaz
+pkgver=4.1.7
+pkgrel=2
+pkgdesc="A toolkit supporting the development of Z39.50/SRW/SRU clients and servers"
+arch=('i686' 'x86_64')
+license=('BSD')
+url="http://www.indexdata.dk/yaz"
+depends=('openssl' 'libxslt' 'icu')
+options=('!libtool')
+source=("http://ftp.indexdata.dk/pub/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('d4b94fc70bfc105fc034c4b51b7b5cae')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --enable-shared=yaz \
+ --with-openssl=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+
+ install -Dm644 LICENSE \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-testing/perl-digest-md5/PKGBUILD b/community-testing/perl-digest-md5/PKGBUILD
new file mode 100644
index 000000000..c0d7a1512
--- /dev/null
+++ b/community-testing/perl-digest-md5/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 48561 2011-06-02 06:48:37Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Ashok `ScriptDevil` Gautham <ScriptDevil@gmail.com>
+
+pkgname=perl-digest-md5
+pkgver=2.51
+pkgrel=2
+pkgdesc="Digest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/Digest-MD5"
+license=('GPL' 'PerlArtistic')
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD5-$pkgver.tar.gz)
+md5sums=('73967d50b9d19990a1d609fe2b1e36c3')
+
+build() {
+ cd "$srcdir/Digest-MD5-$pkgver"
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd "$srcdir/Digest-MD5-$pkgver"
+ make install DESTDIR="$pkgdir/"
+ # remove perllocal.pod and .packlist
+ find "$pkgdir" -name perllocal.pod -delete
+ find "$pkgdir" -name .packlist -delete
+}
diff --git a/community/balsa/PKGBUILD b/community/balsa/PKGBUILD
index a69250356..a3b91bee5 100644
--- a/community/balsa/PKGBUILD
+++ b/community/balsa/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 48198 2011-05-29 16:56:14Z bfanella $
+# $Id: PKGBUILD 48556 2011-06-02 02:30:07Z bfanella $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Maintainer: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Roman Kyrylych <roman@archlinux.org>
pkgname=balsa
pkgver=2.4.9
-pkgrel=3
+pkgrel=4
pkgdesc="An e-mail client for GNOME"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url='http://pawsa.fedorapeople.org/balsa/'
-depends=('libgssglue' 'gmime' 'libwebkit' 'libesmtp' 'libnotify' 'gpgme' 'gtksourceview2' 'gtkspell' 'gnome-icon-theme')
+depends=('gmime' 'libwebkit' 'libesmtp' 'libnotify' 'gpgme' 'gtksourceview2' 'gtkspell' 'gnome-icon-theme')
makedepends=('perlxml' 'gnome-doc-utils' 'intltool' 'namcap')
install=balsa.install
source=(http://pawsa.fedorapeople.org/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
diff --git a/community/cegui/PKGBUILD b/community/cegui/PKGBUILD
index 3b9c76b53..c84ee1806 100644
--- a/community/cegui/PKGBUILD
+++ b/community/cegui/PKGBUILD
@@ -1,39 +1,32 @@
-# $Id: PKGBUILD 37913 2011-01-19 01:10:11Z lcarlier $
-# Maintainer:
+# $Id: PKGBUILD 48542 2011-06-01 17:05:37Z stephane $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>,
# Contributor: Bjorn Lindeijer <bjorn@lindeijer.nl>
pkgname=cegui
pkgver=0.7.5
-pkgrel=1
+pkgrel=4
pkgdesc="A free library providing windowing and widgets for graphics APIs/engines"
-arch=(i686 x86_64 'mips64el')
+arch=('i686' 'x86_64')
url="http://crayzedsgui.sourceforge.net"
#options=('!libtool')
license=("MIT")
depends=('pcre' 'glew' 'expat' 'freetype2' 'libxml2' 'devil' 'freeglut' 'lua' 'silly')
-makedepends=('python2')
+makedepends=('python2' 'doxygen')
source=(http://downloads.sourceforge.net/crayzedsgui/CEGUI-$pkgver.tar.gz)
md5sums=('38c79d1fdfaaa10f481c99a2ac479516')
build() {
cd $srcdir/CEGUI-${pkgver}
-
-# old configure from cegui-0.6.X, to remove later!
-# ./configure --prefix=/usr \
-# --sysconfdir=/etc \
-# --enable-devil \
-# --enable-silly \
-# --disable-xerces-c \
-# --with-default-image-codec=SILLYImageCodec \
-# --enable-lua
+
+ sed -i '1i#include <cstddef>' cegui/include/CEGUIString.h
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-xerces-c \
--enable-null-renderer
-make
+ make
}
package() {
@@ -41,6 +34,10 @@ package() {
make DESTDIR=${pkgdir} install
- install -D -m644 doc/COPYING ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+ #build docs
+ cd doc/doxygen && doxygen
+ cd .. && make DESTDIR=${pkgdir} install-html
+
+ install -Dm644 COPYING ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}
diff --git a/community/clementine/PKGBUILD b/community/clementine/PKGBUILD
index 00e3e3cf1..c53ec3d23 100644
--- a/community/clementine/PKGBUILD
+++ b/community/clementine/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 46607 2011-05-09 23:12:17Z stephane $
+# $Id: PKGBUILD 48537 2011-06-01 16:56:54Z stephane $
#Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
#Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
#Contributor: Dany Martineau <dany.luc.martineau@gmail.com>
pkgname=clementine
pkgver=0.7.1
-pkgrel=3
+pkgrel=5
pkgdesc="A music player and library organizer"
url="http://www.clementine-player.org/"
license=('GPL')
diff --git a/community/csfml/PKGBUILD b/community/csfml/PKGBUILD
new file mode 100644
index 000000000..d0920b18d
--- /dev/null
+++ b/community/csfml/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 47932 2011-05-26 06:40:32Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+
+pkgname=csfml
+
+_git=true
+
+if [[ "${_git}" = "true" ]]; then
+ pkgver=1.99.git20110526
+fi
+
+pkgrel=1
+pkgdesc='C bindings for sfml'
+arch=('i686' 'x86_64')
+url='http://www.sfml-dev.org/'
+license=('zlib')
+depends=('sfml')
+makedepends=('git' 'cmake' 'doxygen')
+
+_gitroot='https://github.com/LaurentGomila/SFML.git'
+_gitname='SFML'
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot
+ cd $_gitname
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ cd bindings/c/
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DBUILD_DOC=true
+ make
+ make doc
+}
+
+package() {
+ cd "$srcdir/$_gitname-build/bindings/c/build/"
+
+ make DESTDIR="$pkgdir/" install
+
+ install -Dm644 ../license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ make clean
+}
+
diff --git a/community/etherape/PKGBUILD b/community/etherape/PKGBUILD
index 54a5683f3..2e3713e94 100644
--- a/community/etherape/PKGBUILD
+++ b/community/etherape/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 40756 2011-02-26 14:25:14Z jlichtblau $
+# $Id: PKGBUILD 48609 2011-06-03 09:54:50Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
pkgname=etherape
-pkgver=0.9.10
+pkgver=0.9.12
pkgrel=1
pkgdesc="A graphical network monitor for various OSI layers and protocols"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,7 +13,7 @@ license=('GPL2')
depends=('libgnomeui' 'libpcap')
makedepends=('rarian' 'gnome-doc-utils')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-md5sums=('e763b919b46f94f3cccc72f05d9075bb')
+sha1sums=('8e9cc85e73e44eccb236f488111e02f418ab095d')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/community/frogatto/PKGBUILD b/community/frogatto/PKGBUILD
index fb3b6553d..434ddd9fb 100644
--- a/community/frogatto/PKGBUILD
+++ b/community/frogatto/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 47675 2011-05-24 19:05:16Z svenstaro $
+# $Id: PKGBUILD 47897 2011-05-26 00:34:36Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Tom Wambold <tom5760@gmail.com>
pkgname='frogatto'
arch=('i686' 'x86_64')
pkgver=1.1
-pkgrel=2
+pkgrel=3
pkgdesc="An old-school 2d platformer game, starring a certain quixotic frog"
url="http://www.frogatto.com"
license=('GPL')
diff --git a/community/gambas3/PKGBUILD b/community/gambas3/PKGBUILD
index 54a07dce9..a5e7f7318 100644
--- a/community/gambas3/PKGBUILD
+++ b/community/gambas3/PKGBUILD
@@ -12,7 +12,7 @@ pkgname=('gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script' 'gamba
'gambas3-gb-report' 'gambas3-gb-sdl' 'gambas3-gb-sdl-sound' 'gambas3-gb-settings' 'gambas3-gb-signal'
'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml' 'gambas3-gb-xml-rpc' 'gambas3-gb-xml-xslt' 'gambas3-gb-web')
pkgver=2.99.1
-pkgrel=2
+pkgrel=3
pkgdesc="A free development environment based on a Basic interpreter."
arch=('i686' 'x86_64' 'mips64el')
url="http://gambas.sourceforge.net/"
diff --git a/community/gnome-packagekit/PKGBUILD b/community/gnome-packagekit/PKGBUILD
index 20c933ec7..390f39a73 100644
--- a/community/gnome-packagekit/PKGBUILD
+++ b/community/gnome-packagekit/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 48001 2011-05-26 23:17:43Z jconder $
+# $Id: PKGBUILD 48532 2011-06-01 14:10:40Z jconder $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
pkgname=gnome-packagekit
-pkgver=3.0.2
+pkgver=3.0.3
pkgrel=1
pkgdesc='Collection of graphical tools for PackageKit to be used in the GNOME desktop'
arch=('i686' 'x86_64')
@@ -10,13 +10,13 @@ url='http://www.packagekit.org/'
license=('GPL')
depends=('dconf' 'desktop-file-utils' 'gnome-menus' 'gtk3'
'hicolor-icon-theme' 'libnotify' 'packagekit')
-makedepends=('gconf' 'gtk-doc' 'gnome-common' 'intltool' 'libcanberra' 'upower')
+makedepends=('gconf' 'gtk-doc' 'intltool' 'libcanberra' 'upower')
optdepends=('gnome-settings-daemon-updates: update and message notifications')
options=('!emptydirs' '!libtool')
install="$pkgname.install"
-source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2"
+source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
'arch.patch')
-sha256sums=('faaae52d839a66d0bcb7d7cf97ef62d11bccf558e6aa9fdb0dbc8d61dbaf714f'
+sha256sums=('3042bb008548f70a98ff4d90da86ad7ddbdd2ec03c37daaf87b8e6341a03d211'
'9c809ac3c8bbf870442e7bc4123c70b144930a287b28626be1b8bae95edf71ac')
build() {
@@ -26,8 +26,7 @@ build() {
sed -i 's@python@python2@' 'python/enum-convertor.py'
export PYTHON=/usr/bin/python2
- # TODO: remove gnome-common dependency and switch back to configure
- gnome-autogen.sh --prefix=/usr \
+ ./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-gtk-doc \
--disable-schemas-compile \
diff --git a/community/gource/PKGBUILD b/community/gource/PKGBUILD
index 5c834fe41..4502d9d26 100644
--- a/community/gource/PKGBUILD
+++ b/community/gource/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 47420 2011-05-23 01:24:33Z svenstaro $
+# $Id: PKGBUILD 47914 2011-05-26 01:27:25Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Jose Valecillos <valecillosjg (at) gmail (dot) com>
# Contributor: Olivier Ramonat <olivier at ramonat dot fr>
pkgname=gource
pkgver=0.34
-pkgrel=1
+pkgrel=2
pkgdesc="software version control visualization"
license=(GPL3)
arch=(i686 x86_64 'mips64el')
diff --git a/community/gtkwave/PKGBUILD b/community/gtkwave/PKGBUILD
index bac1db048..def0b693b 100644
--- a/community/gtkwave/PKGBUILD
+++ b/community/gtkwave/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Jared Casper <jaredcasper@gmail.com>
pkgname=gtkwave
-pkgver=3.3.21
+pkgver=3.3.22
pkgrel=1
pkgdesc='A wave viewer which reads LXT, LXT2, VZT, GHW and VCD/EVCD files'
arch=('i686' 'x86_64' 'mips64el')
@@ -10,12 +10,12 @@ url='http://gtkwave.sourceforge.net'
license=('GPL' 'MIT')
depends=('gtk2')
makedepends=('gperf')
-install="${pkgname}.install"
-source=("http://gtkwave.sourceforge.net/${pkgname}-${pkgver}.tar.gz")
-md5sums=('ae3a99a2304f45703471629c7b614ef6')
+install='gtkwave.install'
+source=("http://gtkwave.sourceforge.net/gtkwave-${pkgver}.tar.gz")
+md5sums=('106d5b6554793b6ce418d469870b61ca')
build() {
- cd ${pkgname}-${pkgver}
+ cd gtkwave-${pkgver}
./configure \
--prefix=/usr \
@@ -26,12 +26,12 @@ build() {
}
package() {
- cd ${pkgname}-${pkgver}
+ cd gtkwave-${pkgver}
make -j1 prefix=${pkgdir}/usr mandir=${pkgdir}/usr/share/man install
- install -D -m644 ${srcdir}/${pkgname}-${pkgver}/.gtkwaverc \
- ${pkgdir}/usr/share/${pkgname}/sample.gtkwaverc
- install -D -m644 ${srcdir}/${pkgname}-${pkgver}/MIT.TXT \
- ${pkgdir}/usr/share/licenses/${pkgname}/MIT.TXT
+ install -D -m644 ${srcdir}/gtkwave-${pkgver}/.gtkwaverc \
+ ${pkgdir}/usr/share/gtkwave/sample.gtkwaverc
+ install -D -m644 ${srcdir}/gtkwave-${pkgver}/MIT.TXT \
+ ${pkgdir}/usr/share/licenses/gtkwave/MIT.TXT
}
diff --git a/community/highlight/PKGBUILD b/community/highlight/PKGBUILD
index 12c2fcb6c..765fa9457 100644
--- a/community/highlight/PKGBUILD
+++ b/community/highlight/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 43919 2011-03-31 14:31:46Z bluewind $
+# $Id: PKGBUILD 48668 2011-06-04 07:12:24Z bluewind $
# Maintainer: Florian Pritz <flo@xinu.at>
# Contributor: Jan Fader <jan.fader@web.de>
pkgbase=highlight
pkgname=(highlight highlight-gui)
-pkgver=3.4
+pkgver=3.5
pkgrel=1
url="http://www.andre-simon.de/doku/highlight/highlight.html"
license=('GPL')
arch=('i686' 'x86_64' 'mips64el')
makedepends=(qt lua boost)
source=(http://www.andre-simon.de/zip/$pkgname-$pkgver.tar.bz2)
-md5sums=('9f1c39ca3a04c4599a7f3fda9928de47')
+md5sums=('0bb8cef23209bb6f31a581cb6e7bff77')
build() {
cd "$srcdir/$pkgbase-$pkgver"
diff --git a/community/john/PKGBUILD b/community/john/PKGBUILD
index db91491a9..c4f02caa8 100644
--- a/community/john/PKGBUILD
+++ b/community/john/PKGBUILD
@@ -6,26 +6,27 @@
pkgname=john
pkgver=1.7.7
-pkgrel=1
-pkgdesc="John The Ripper - A fast password cracker. Additional patches (NTLM, MySQL, Kerberos V5, etc.) included."
-arch=('i686' 'x86_64' 'mips64el')
+pkgrel=2
+_jumbover=5
+pkgdesc="John The Ripper - A fast password cracker (jumbo-$_jumbover included)"
+arch=('i686' 'x86_64')
url="http://www.openwall.com/$pkgname/"
license=('GPL2' 'custom')
depends=('openssl')
backup=('etc/john/john.conf')
source=(http://www.openwall.com/$pkgname/g/$pkgname-$pkgver.tar.bz2
- http://www.openwall.com/john/g/john-$pkgver-jumbo-1.diff.gz
+ http://www.openwall.com/john/g/john-$pkgver-jumbo-$_jumbover.diff.gz
ftp://ftp.kfki.hu/pub/packages/security/ssh/ossh/libdes-4.04b.tar.gz
params.h.patch)
md5sums=('be316618de834a58573a21225d4a2674'
- 'ee776d17726e7c15e90f2cf7ca85492f'
+ '40efadf002fb68d8287e60654593a531'
'c8d5c69f86c2eedb485583b0305284a1'
'f69ed632eba8fb9e45847a4b4a323787')
build() {
# jumbo patch
cd ${srcdir}/$pkgname-$pkgver
- patch -p1 < ${srcdir}/$pkgname-$pkgver-jumbo-1.diff
+ patch -p1 < ${srcdir}/$pkgname-$pkgver-jumbo-$_jumbover.diff
cd ${srcdir}/john-$pkgver/src/
# patch default params
diff --git a/community/lightspark/PKGBUILD b/community/lightspark/PKGBUILD
index 46ab4dbec..4e4d7cbc6 100644
--- a/community/lightspark/PKGBUILD
+++ b/community/lightspark/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=lightspark
pkgver=0.4.8.1
-pkgrel=1
+pkgrel=2
pkgdesc='An alternative Flash Player for Linux.'
arch=('i686' 'x86_64' 'mips64el')
url='http://lightspark.sourceforge.net'
diff --git a/community/naev/PKGBUILD b/community/naev/PKGBUILD
index 629a4d257..68a832741 100644
--- a/community/naev/PKGBUILD
+++ b/community/naev/PKGBUILD
@@ -1,10 +1,9 @@
-# $Id: PKGBUILD 47428 2011-05-23 01:57:56Z svenstaro $
+# $Id: PKGBUILD 48678 2011-06-04 13:28:51Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Johan Rehnberg <cleanrock@gmail.com>
pkgname=naev
-pkgver=0.5.0beta2
-_pkgver=0.5.0-beta2
+pkgver=0.5.0
pkgrel=1
pkgdesc='2D action/rpg space game'
arch=('i686' 'x86_64' 'mips64el')
@@ -12,21 +11,18 @@ url="http://code.google.com/p/naev/"
license=('GPL3')
depends=('openal' 'libvorbis' 'sdl_image' 'sdl_mixer' 'libgl' 'libxml2' 'freetype2' 'libpng' 'naev-data')
makedepends=('freeglut')
-source=("http://naev.googlecode.com/files/${pkgname}-${_pkgver}.tar.bz2"
- "naev.png" "naev.desktop")
-md5sums=('45d3abff357a347c3f2e9db93d184ba3'
- '5945aa4fa7c0b046ad48f2fb9cbbbdd3'
- '134032fb35eb2953e9a1bbee3a6dcf63')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('f7d754a17ace87aac540d0d6d48313d6')
build() {
- cd "$srcdir/$pkgname-$_pkgver"
+ cd "$srcdir/$pkgname-$pkgver"
- ./configure --prefix=/usr --disable-debug --disable-shave --with-ndata-path=/usr/share/naev/ndata-${_pkgver}
+ ./configure --prefix=/usr --disable-debug --disable-shave --with-ndata-path=/usr/share/naev/ndata-${pkgver}
make
}
package() {
- cd "$srcdir/$pkgname-$_pkgver"
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}
diff --git a/community/performous/PKGBUILD b/community/performous/PKGBUILD
index 16518d9c9..01aab85d1 100644
--- a/community/performous/PKGBUILD
+++ b/community/performous/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 47641 2011-05-24 14:35:06Z tdziedzic $
+# $Id: PKGBUILD 47952 2011-05-26 11:21:56Z lcarlier $
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=performous
pkgver=0.6.1
-pkgrel=5
+pkgrel=6
pkgdesc='A free game like "Singstar", "Rockband" or "Stepmania"'
arch=('i686' 'x86_64')
url="http://performous.org/"
@@ -24,7 +24,7 @@ build() {
# fix config loading with libxml++
export LDFLAGS=${LDFLAGS/-Wl,--as-needed/}
- # fix to built against boost 1.46
+ # fix to built against boost 1.46, upstream (git) now support v3
export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=2"
cmake -DCMAKE_BUILD_TYPE=Release \
diff --git a/community/perl-digest-md5/PKGBUILD b/community/perl-digest-md5/PKGBUILD
index 53b147ef9..6ca71610c 100644
--- a/community/perl-digest-md5/PKGBUILD
+++ b/community/perl-digest-md5/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 35628 2010-12-21 23:03:54Z tdziedzic $
+# $Id: PKGBUILD 48551 2011-06-01 19:52:59Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Ashok `ScriptDevil` Gautham <ScriptDevil@gmail.com>
pkgname=perl-digest-md5
-pkgver=2.40
-pkgrel=2
+pkgver=2.51
+pkgrel=1
pkgdesc="Digest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm"
arch=('i686' 'x86_64' 'mips64el')
url="http://search.cpan.org/dist/Digest-MD5"
@@ -12,16 +12,18 @@ license=('GPL' 'PerlArtistic')
depends=('perl>=5.10.0')
options=(!emptydirs)
source=(http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD5-$pkgver.tar.gz)
-md5sums=('97051183c4ff7012bdeaf55881164f4b')
+md5sums=('73967d50b9d19990a1d609fe2b1e36c3')
build() {
cd "$srcdir/Digest-MD5-$pkgver"
-
# install module in vendor directories.
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make
- make install DESTDIR="$pkgdir/"
+}
+package() {
+ cd "$srcdir/Digest-MD5-$pkgver"
+ make install DESTDIR="$pkgdir/"
# remove perllocal.pod and .packlist
find "$pkgdir" -name perllocal.pod -delete
find "$pkgdir" -name .packlist -delete
diff --git a/community/qbittorrent/PKGBUILD b/community/qbittorrent/PKGBUILD
index 82b0f5e0b..06b82a406 100644
--- a/community/qbittorrent/PKGBUILD
+++ b/community/qbittorrent/PKGBUILD
@@ -3,8 +3,8 @@
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
pkgname=qbittorrent
-pkgver=2.7.3
-pkgrel=2
+pkgver=2.8.0
+pkgrel=1
pkgdesc="A bittorrent client written in C++ / Qt4 using the good libtorrent library"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.qbittorrent.org/"
@@ -14,13 +14,13 @@ makedepends=('boost' 'geoip')
optdepends=('python2: needed for search'
'geoip: improves peer country resolution')
install='qbittorrent.install'
-source=("http://downloads.sourceforge.net/sourceforge/qbittorrent/${pkgname}-${pkgver}.tar.gz"
+source=("http://downloads.sourceforge.net/sourceforge/qbittorrent/qbittorrent-${pkgver}.tar.gz"
'python2.patch')
-md5sums=('ff1b294133f8dadc781c8f0df50d248d'
+md5sums=('6337b679b40f56fdd2dd49d795fd5405'
'db0d79fee8ce3470ad3741d36b02a94c')
build() {
- cd ${pkgname}-${pkgver}
+ cd qbittorrent-${pkgver}
sed -i \
-e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
@@ -36,7 +36,7 @@ build() {
}
package() {
- cd ${pkgname}-${pkgver}
+ cd qbittorrent-${pkgver}
make INSTALL_ROOT=${pkgdir} install
}
diff --git a/community/rawtherapee/PKGBUILD b/community/rawtherapee/PKGBUILD
index 7abaab16f..9be9c6f15 100644
--- a/community/rawtherapee/PKGBUILD
+++ b/community/rawtherapee/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 36068 2010-12-26 11:58:33Z stativ $
+# $Id: PKGBUILD 48519 2011-06-01 11:08:54Z stativ $
# Maintainer: Lukas Jirkovsky <l.jirkovsky AT gmail.com>
# Contributor: Bogdan Szczurek <thebodzio(at)gmail.com>
# Contributor: Vaclav Kramar <vaclav.kramar@tiscali.cz>
# Contributor: Archie <mymaud@gmail.com>
pkgname=rawtherapee
-pkgver=3.0a1_742
+pkgver=3.1m5
pkgrel=1
pkgdesc="RAW photo editor"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.rawtherapee.com/"
license=('GPL')
-depends=('libsigc++' 'gtkmm' 'libiptcdata' 'lcms')
+depends=('bzip2' 'libsigc++' 'gtkmm' 'libiptcdata' 'lcms2' 'desktop-file-utils')
makedepends=('mercurial' 'cmake')
install=rawtherapee.install
source=(rawtherapee.desktop rawtherapee.png)
@@ -20,8 +20,8 @@ md5sums=('83f14b57b27f066705b0aec7ad56c53d'
_root="https://rawtherapee.googlecode.com/hg/"
_repo="rawtherapee"
-_branch="branch_3.0"
-_changeset="71045bfba97e" # changeset $pkgver
+#_branch="branch_3.0"
+#_changeset="71045bfba97e" # changeset $pkgver
build() {
cd "$srcdir"
@@ -30,10 +30,10 @@ build() {
if [ -d $_repo ] ; then
cd $_repo
hg pull
- hg up -r $_changeset
+ hg up "Dev-$pkgver"
msg "The local files are updated."
else
- hg clone -b $_branch -u $_changeset $_root $_repo
+ hg clone -u "Dev-$pkgver" $_root $_repo
fi
msg "Mercurial checkout done or server timeout"
@@ -45,7 +45,10 @@ build() {
mkdir "$srcdir/$_repo-build"
cd "$srcdir/$_repo-build"
- cmake -DCMAKE_INSTALL_PREFIX=/usr ../$_repo
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_MYFILE_MMAP=OFF \
+ ../$_repo
make
}
diff --git a/community/rawtherapee/rawtherapee.install b/community/rawtherapee/rawtherapee.install
index ccf3323ae..6162b34dd 100644
--- a/community/rawtherapee/rawtherapee.install
+++ b/community/rawtherapee/rawtherapee.install
@@ -1,24 +1,21 @@
-post_upgrade() {
-
-if [ ${2%%_*} == "3.0a1" ]; then
- TMP=${2##*_}
- TMP=${TMP%%-*}
+post_install() {
+ echo "update desktop mime database..."
+ update-desktop-database -q
+ update-mime-database usr/share/mime 1>&2 > /dev/null
+}
- if [ $TMP -lt 316 ]; then
- echo "Profile extension has changed from .pp2 to .pp3"
- echo -e "since rawtherapee-3.0a1_54-1\n"
- echo "If you used rawtherapee-3.0a1_54-1 or any earlier 3.0 version"
- echo "you have to change the extension manually.\n"
- echo "NOTE: pp2 profiles from rawtherapee 2.4 and older"
- echo "are not compatible."
- fi
+post_upgrade() {
+ post_install $1
- if [ $TMP -lt 589 ]; then
+ if [ ${2%%_*} == "3.0a1" ]; then
echo "There were lots of changes to the behavior of the majority of tools."
echo "This may cause your files to look differently than before."
fi
-fi
+}
+post_remove() {
+ post_install $1
}
+
# vim:set ts=2 sw=2 et:
diff --git a/community/root/PKGBUILD b/community/root/PKGBUILD
index 6a0d17ffa..833eb0211 100644
--- a/community/root/PKGBUILD
+++ b/community/root/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=root
pkgver=5.28.00d
-pkgrel=1
+pkgrel=2
pkgdesc='C++ data analysis framework and interpreter from CERN.'
arch=('i686' 'x86_64' 'mips64el')
url='http://root.cern.ch'
diff --git a/community/roxterm/PKGBUILD b/community/roxterm/PKGBUILD
index 0b3816e2e..b111d1f73 100644
--- a/community/roxterm/PKGBUILD
+++ b/community/roxterm/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 42205 2011-03-15 16:59:11Z ttopper $
+# $Id: PKGBUILD 48623 2011-06-03 14:19:38Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Alexander Fehr <pizzapunk gmail com>
pkgname=roxterm
-pkgver=1.21.4
+pkgver=1.22.1
pkgrel=1
pkgdesc="Tabbed, VTE-based terminal emulator"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,8 +13,9 @@ depends=('libglade' 'dbus-glib' 'vte' 'hicolor-icon-theme' 'dbus' 'dbus-core' 'g
makedepends=('docbook-xsl' 'xmlto' 'po4a')
install=roxterm.install
source=(http://downloads.sourceforge.net/roxterm/roxterm-$pkgver.tar.gz)
-md5sums=('a3ac0c34ce5ae82063ff4b4b518e07c1')
-sha1sums=('0667ec61ef7ba30e6602faec80959e59e75104f0')
+md5sums=('522067d466545753cb3df369b582ce60')
+sha1sums=('40743fa8d93c5ddf76676bb7df4bf0c6f97351ad')
+
build() {
cd "${srcdir}/roxterm-${pkgver}"
diff --git a/community/rss-glx/PKGBUILD b/community/rss-glx/PKGBUILD
index f900e83f8..eefd27b01 100644
--- a/community/rss-glx/PKGBUILD
+++ b/community/rss-glx/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 20029 2010-07-01 19:03:57Z ibiru $
+# $Id: PKGBUILD 48037 2011-05-27 16:21:40Z spupykin $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Corrado 'bardo' Primier <corrado.primier@mail.polimi.it>
# Contributor: Tate "Tatey" Johnson <tatey86@tpg.com.au>
pkgname=rss-glx
pkgver=0.9.1
-pkgrel=5
+pkgrel=6
pkgdesc="The Really Slick Screensavers port to GLX"
arch=('i686' 'x86_64' 'mips64el')
url="http://rss-glx.sourceforge.net/"
@@ -33,7 +33,7 @@ build() {
make CFLAGS="$CFLAGS -I/usr/include/ImageMagick"
make DESTDIR=${pkgdir} install
-#FS#18300
+ # FS#18300
install -d ${pkgdir}/usr/lib/xscreensaver/
list=$(ls ${pkgdir}/usr/bin --ignore rss-glx_install.pl)
for i in $list; do
@@ -43,5 +43,3 @@ build() {
install -d ${pkgdir}/usr/share/applications/screensavers
install -m644 ${srcdir}/${pkgname}-desktops/*.desktop ${pkgdir}/usr/share/applications/screensavers
}
-
-# vim:set ts=2 sw=2 et:
diff --git a/community/rss-glx/rss-glx.install b/community/rss-glx/rss-glx.install
index 3ffe7103c..758642618 100644
--- a/community/rss-glx/rss-glx.install
+++ b/community/rss-glx/rss-glx.install
@@ -10,4 +10,3 @@ EOM
post_remove() {
update-desktop-database -q
}
-
diff --git a/community/sfml/PKGBUILD b/community/sfml/PKGBUILD
index ce1b6c0ff..806e373d4 100644
--- a/community/sfml/PKGBUILD
+++ b/community/sfml/PKGBUILD
@@ -1,96 +1,60 @@
-# $Id: PKGBUILD 23743 2010-08-16 10:49:18Z svenstaro $
+# $Id: PKGBUILD 47923 2011-05-26 03:12:35Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
-# Contributor: scj <scj archlinux us>
+# Contributor: Ondrej Martinak <omartinak@gmail.com>
pkgname=sfml
-pkgver=1.6
-pkgrel=3
-pkgdesc="A simple, fast, cross-platform and object-oriented multimedia API."
-arch=('i686' 'x86_64' 'mips64el')
-url="http://www.sfml-dev.org"
-license=('custom:zlib')
-depends=('libxrandr' 'libsndfile' 'openal' 'glew' 'libjpeg' 'libpng' 'soil' 'zlib' 'freetype2')
-optdepends=('qt: build qt-sample' 'wxgtk: build wxwidgets-sample')
-install=sfml.install
-source=(http://downloads.sourceforge.net/${pkgname}/SFML-${pkgver}-sdk-linux-64.tar.gz
- use-system-libs.patch)
-md5sums=('7a9b3a1ef6d14cd25090e440ccdbb3a8'
- '505ea908fb6e4b9359061d8d55373963')
-build() {
- cd "${srcdir}/SFML-${pkgver}"
+_git=true
- # apply patch to use system libs in favor of included ones (fixes many problems)
- patch -Np1 < ../use-system-libs.patch
+if [[ "${_git}" = "true" ]]; then
+ pkgver=1.99.git20110526
+fi
- # compile sfml
- make
+pkgrel=1
+pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API'
+arch=('i686' 'x86_64')
+url='http://www.sfml-dev.org/'
+license=('zlib')
+depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2')
+makedepends=('git' 'mesa' 'cmake' 'doxygen')
- # prepare samples
- sed -e '/export LDFLAGS/d' -i samples/Makefile
+_gitroot='https://github.com/LaurentGomila/SFML.git'
+_gitname='SFML'
- #check optional dependencies
- if [ ! -e "/usr/bin/wx-config" ]; then
- sed -e 's/wxwidgets-sample //' -i samples/Makefile
- fi
- if [ ! -e "/usr/include/QtGui" ]; then
- sed -e 's/qt-sample //' -i samples/Makefile
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot
+ cd $_gitname
fi
- # fix some samples
- sed -e 's|qt4/||g' -i samples/qt/Makefile
- sed -e '/#include <iostream>/a\#include <stdlib.h>' -i \
- samples/sockets/Sockets.cpp \
- samples/voip/VoIP.cpp
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
- # fix the library softlinks for samples
- cd lib
- for lib in *; do
- ln -sf $lib ${lib/.${pkgver}/}
- done
- cd ..
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
- # compile samples
- LDFLAGS="-L${srcdir}/SFML-${pkgver}/lib" make sfml-samples
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DBUILD_DOC=true \
+ -DBUILD_EXAMPLES=true
+ make
+ make doc
}
package() {
- cd "${srcdir}/SFML-${pkgver}"
-
- # prepare some dirs
- mkdir -p ${pkgdir}/usr/lib \
- ${pkgdir}/usr/include \
- ${pkgdir}/usr/share/sfml \
- ${pkgdir}/usr/share/doc \
- ${pkgdir}/opt/SFML
+ cd "$srcdir/$_gitname-build/build"
+ make DESTDIR="$pkgdir/" install
- # install it
- sed '/export DESTDIR/d' -i src/SFML/Makefile
- make DESTDIR="${pkgdir}/usr" install
+ install -Dm644 ../license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
- # fix the library softlinks - again
- cd ${pkgdir}/usr/lib
- rm *.so
- for lib in *; do
- ln -s $lib ${lib/.${pkgver}/}
- done
- cd "${srcdir}/SFML-${pkgver}"
-
- # install samples
- cp -r samples ${pkgdir}/opt/SFML/samples
-
- # install docs
- cp -r doc ${pkgdir}/usr/share/doc/sfml
-
- # handy symlinks
- cd ${pkgdir}/usr/share/sfml
- ln -s ../../../opt/SFML/samples samples
- ln -s ../doc/sfml docs
-
- # install license
- install -Dm 644 ${srcdir}/SFML-${pkgver}/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # clean up
- find "${pkgdir}/opt/SFML/samples" -name "*.o" -delete
+ make clean
}
-# vim:set ts=2 sw=2 et:
+
diff --git a/community/spring/PKGBUILD b/community/spring/PKGBUILD
index 7a32da2c9..36a14a209 100644
--- a/community/spring/PKGBUILD
+++ b/community/spring/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 47736 2011-05-25 04:13:58Z svenstaro $
+# $Id: PKGBUILD 47908 2011-05-26 01:20:52Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=spring
pkgver=0.82.7.1
-pkgrel=3
+pkgrel=4
pkgdesc='A free 3D real-time-strategy (RTS) game engine'
arch=('i686' 'x86_64' 'mips64el')
url="http://springrts.com/"
diff --git a/community/supertux/PKGBUILD b/community/supertux/PKGBUILD
index 11665afb4..83d737e9f 100644
--- a/community/supertux/PKGBUILD
+++ b/community/supertux/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=supertux
pkgver=0.3.3
-pkgrel=2
+pkgrel=3
pkgdesc="A classic 2D jump'n run sidescroller game in a style similar to the original SuperMario games"
arch=('i686' 'x86_64' 'mips64el')
url="http://super-tux.sourceforge.net/"
@@ -16,12 +16,15 @@ source=(http://download.berlios.de/supertux/${pkgname}-${pkgver}.tar.bz2)
md5sums=('f3f803e629ee51a9de0b366a036e393d')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- cmake -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_SUBDIR_BIN=bin .
- make || return 1
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ sed -i '1i#include <cstddef>' src/supertux/screen_manager.hpp
+ cmake -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_SUBDIR_BIN=bin .
+ make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install || return 1
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
}
diff --git a/community/tracker/PKGBUILD b/community/tracker/PKGBUILD
index 4dafb3ca2..5f6a28550 100644
--- a/community/tracker/PKGBUILD
+++ b/community/tracker/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 46713 2011-05-10 20:40:42Z spupykin $
+# $Id: PKGBUILD 48573 2011-06-02 16:37:10Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Alexander Fehr <pizzapunk gmail com>
pkgname=tracker
-pkgver=0.10.10
-pkgrel=2
+pkgver=0.10.15
+pkgrel=1
pkgdesc="Powerful object database, tag/metadata database, search tool and indexer"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnome.org/projects/tracker/"
license=('GPL')
depends=('upower' 'poppler-glib' 'gstreamer0.10-base' 'libgee' 'gnome-desktop' 'libnotify' 'xdg-utils' 'gtkhtml'
'libgsf' 'gnome-panel-bonobo' 'exempi' 'networkmanager')
-makedepends=('intltool' 'gnome-panel' 'nautilus' 'evolution' 'totem-plparser')
+makedepends=('intltool' 'gnome-panel' 'nautilus' 'evolution' 'totem-plparser' 'icu')
optdepends=('nautilus'
'enca'
'gtkhtml'
@@ -25,7 +25,7 @@ conflicts=('libtracker')
provides=("libtracker")
install=tracker.install
source=(http://ftp.gnome.org/pub/GNOME/sources/tracker/0.10/tracker-$pkgver.tar.bz2)
-md5sums=('57f475814cfbf9b2e6bf9e5202ec85fc')
+md5sums=('c948ef3988b08e81cad3ff980b17a0fd')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -40,6 +40,7 @@ build() {
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/$pkgname \
--enable-video-extractor=gstreamer --disable-unac --disable-hal \
--disable-devkit-power --disable-miner-evolution
+ touch docs/manpages/tracker-search-bar.1
make
}
diff --git a/community/vdrift/PKGBUILD b/community/vdrift/PKGBUILD
index 76d52fdd7..ac9e048a5 100644
--- a/community/vdrift/PKGBUILD
+++ b/community/vdrift/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 27647 2010-09-26 17:36:38Z svenstaro $
+# $Id: PKGBUILD 47904 2011-05-26 00:55:30Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Lone_Wolf lonewolf@xs4all.nl
pkgname=vdrift
pkgver=2010.06.30
-pkgrel=2
+pkgrel=3
pkgdesc="An open source driving simulation made with drift racing in mind"
arch=('i686' 'x86_64' 'mips64el')
url="http://vdrift.net/"
diff --git a/community/vnstat/PKGBUILD b/community/vnstat/PKGBUILD
index a587a634c..cd044da6a 100644
--- a/community/vnstat/PKGBUILD
+++ b/community/vnstat/PKGBUILD
@@ -1,9 +1,10 @@
-# $Id: PKGBUILD 20111 2010-07-02 14:00:19Z tdziedzic $
+# $Id: PKGBUILD 48601 2011-06-03 09:15:53Z ttopper $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
pkgname=vnstat
-pkgver=1.10
-pkgrel=5
+pkgver=1.11
+pkgrel=1
pkgdesc="A console-based network traffic monitor"
arch=('i686' 'x86_64' 'mips64el')
url="http://humdi.net/vnstat/"
@@ -15,7 +16,7 @@ backup=(etc/vnstat.conf)
install=vnstat.install
source=(http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
http://humdi.net/vnstat/init.d/arch/vnstat)
-md5sums=('95421d968689130590348ceb80ff74a8'
+md5sums=('a5a113f9176cd61fb954f2ba297f5fdb'
'e89a566dd7514ff0d2d3fc77b2d4ca7e')
build() {
@@ -26,8 +27,8 @@ build() {
make all
make DESTDIR=$pkgdir install
- install -D -m0755 $srcdir/vnstat $pkgdir/etc/rc.d/vnstat && \
- install -D -m0644 examples/vnstat.cron $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron && \
- install -D -m0755 examples/vnstat.cgi $pkgdir/usr/share/doc/vnstat/examples/vnstat.cgi && \
+ install -D -m0755 $srcdir/vnstat $pkgdir/etc/rc.d/vnstat
+ install -D -m0644 examples/vnstat.cron $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron
+ install -D -m0755 examples/vnstat.cgi $pkgdir/usr/share/doc/vnstat/examples/vnstat.cgi
sed -i 's#root##' $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron
}
diff --git a/community/widelands/PKGBUILD b/community/widelands/PKGBUILD
index 83c43377e..c11c035a0 100644
--- a/community/widelands/PKGBUILD
+++ b/community/widelands/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 45158 2011-04-18 00:22:21Z svenstaro $
+# $Id: PKGBUILD 47900 2011-05-26 00:39:20Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <rabyte*gmail>
@@ -6,7 +6,7 @@
pkgname=widelands
pkgver=16
_realver=build16
-pkgrel=1
+pkgrel=2
pkgdesc="A realtime strategy game with emphasis on economy and transport"
arch=('i686' 'x86_64' 'mips64el')
url="http://widelands.org/"
diff --git a/core/bison/PKGBUILD b/core/bison/PKGBUILD
index b54299db9..9eaf6a155 100644
--- a/core/bison/PKGBUILD
+++ b/core/bison/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 87221 2010-08-11 03:29:16Z allan $
+# $Id: PKGBUILD 124065 2011-05-16 12:02:28Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
pkgname=bison
-pkgver=2.4.3
+pkgver=2.5
pkgrel=1
pkgdesc="The GNU general-purpose parser generator"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,12 +13,16 @@ depends=('glibc' 'm4' 'sh')
groups=('base-devel')
install=bison.install
source=(ftp://ftp.gnu.org/gnu/bison/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('c1d3ea81bc370dbd43b6f0b2cd21287e')
+md5sums=('9dba20116b13fc61a0846b0058fbe004')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --datadir=/usr/share
make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
make check
}
diff --git a/core/bison/bison.install b/core/bison/bison.install
index 890eb0366..0081a194f 100644
--- a/core/bison/bison.install
+++ b/core/bison/bison.install
@@ -1,4 +1,4 @@
-infodir=/usr/share/info
+infodir=usr/share/info
file=bison.info.gz
post_install() {
diff --git a/core/cryptsetup/PKGBUILD b/core/cryptsetup/PKGBUILD
index 9dc49b129..66812b834 100644
--- a/core/cryptsetup/PKGBUILD
+++ b/core/cryptsetup/PKGBUILD
@@ -1,22 +1,22 @@
-# $Id: PKGBUILD 123894 2011-05-14 09:00:27Z thomas $
+# $Id: PKGBUILD 125738 2011-05-28 17:14:11Z thomas $
# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=cryptsetup
-pkgver=1.3.0
+pkgver=1.3.1
pkgrel=1
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
arch=(i686 x86_64 'mips64el')
license=('GPL')
url="http://code.google.com/p/cryptsetup/"
groups=('base')
-depends=('device-mapper' 'libgcrypt' 'popt')
+depends=('device-mapper>=2.02.85-2' 'libgcrypt' 'popt')
conflicts=('mkinitcpio<0.5.99')
options=('!libtool' '!emptydirs')
source=(http://cryptsetup.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2
encrypt_hook
encrypt_install)
-sha256sums=('c675059a25061851dcaf9732a2118d75585097c8fbb3985026526988e8d76394'
+sha256sums=('7ceb18a0c91fa1546077b41b93463dd2ec9d7f83e6fd93757fb84cc608206a6a'
'64601eae6fbf3e3afceccec5877557aa208a82497c33cc94ad0a686b4022b5dc'
- '8e4920bb4b5ce96508aa0c42b9b07326b70daf630519f1aa1d8082bca709c12a')
+ '07918fc349b3a7c4a73e8ad1cc3d97a2a79ebc7655090ab9ebb00b1e092c85aa')
build() {
cd $srcdir/$pkgname-${pkgver}
diff --git a/core/cryptsetup/encrypt_install b/core/cryptsetup/encrypt_install
index 9446e6864..25a2ae45c 100644
--- a/core/cryptsetup/encrypt_install
+++ b/core/cryptsetup/encrypt_install
@@ -16,6 +16,7 @@ install ()
add_file "/lib/udev/rules.d/10-dm.rules"
add_file "/lib/udev/rules.d/13-dm-disk.rules"
add_file "/lib/udev/rules.d/95-dm-notify.rules"
+ add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules"
}
help ()
diff --git a/core/dnsutils/PKGBUILD b/core/dnsutils/PKGBUILD
index 59036132d..7bde7a420 100644
--- a/core/dnsutils/PKGBUILD
+++ b/core/dnsutils/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 122965 2011-05-07 14:46:05Z bisson $
+# $Id: PKGBUILD 125626 2011-05-27 10:41:33Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# Contributor: mario <mario_vazq@hotmail.com>
@@ -6,8 +6,8 @@
pkgname=dnsutils
# Use a period and not a hyphen before the patch level for proper versioning.
-pkgver=9.8.0.P1
-_pkgver=9.8.0-P1
+pkgver=9.8.0.P2
+_pkgver=9.8.0-P2
pkgrel=1
pkgdesc='Various DNS utilities - dig host nslookup nsupdate'
@@ -19,21 +19,30 @@ replaces=('bind-tools' 'host')
options=('!makeflags')
source=("http://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz"
'tools-only.patch')
-sha1sums=('aa8f308f218e437ac4bad616e0ae83a9b9c40c29'
+sha1sums=('b3492ad11cfbf2939d9b0fb62c52c204de58679b'
'ac88c89e25c26d73095a3dd85e1ca1070d184ded')
build() {
cd "${srcdir}/bind-${_pkgver}"
- patch -p1 < ../tools-only.patch
+
+ patch -p1 -i ../tools-only.patch
export STD_CDEFINES='-DDIG_SIGCHASE'
+
./configure \
- --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
- --with-openssl=yes --with-idn=yes --disable-linux-caps
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-openssl=yes \
+ --with-idn=yes \
+ --disable-linux-caps \
+
make
}
package() {
cd "${srcdir}/bind-${_pkgver}/bin"
+
make DESTDIR="${pkgdir}" install
+
install -Dm644 ../COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/core/less/PKGBUILD b/core/less/PKGBUILD
index 785e64aa1..78d1a17d9 100644
--- a/core/less/PKGBUILD
+++ b/core/less/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 119700 2011-04-13 21:50:08Z allan $
+# $Id: PKGBUILD 125524 2011-05-26 14:15:10Z stephane $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=less
pkgver=443
-pkgrel=1
+pkgrel=2
pkgdesc="A terminal based program for viewing text files"
license=('GPL3')
arch=('i686' 'x86_64' 'mips64el')
@@ -17,14 +17,14 @@ md5sums=('47db098fb3cdaf847b3c4be05ee954fc')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- ./configure --prefix=/usr --with-regex=pcre
+ ./configure --prefix=/usr --sysconfdir=/etc --with-regex=pcre
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make prefix=${pkgdir}/usr install
- install -dm755 ${pkgdir}/bin
- mv ${pkgdir}/usr/bin/${pkgname} ${pkgdir}/bin
+ make prefix="${pkgdir}"/usr install
+ install -dm755 "${pkgdir}"/bin
+ mv "${pkgdir}"/usr/bin/${pkgname} "${pkgdir}"/bin
}
diff --git a/core/lvm2/11-dm-initramfs.rules b/core/lvm2/11-dm-initramfs.rules
new file mode 100644
index 000000000..d2c167324
--- /dev/null
+++ b/core/lvm2/11-dm-initramfs.rules
@@ -0,0 +1,3 @@
+# needed with new udev/mkinitcpio and as implemented in dracut:
+# <http://git.kernel.org/?p=boot/dracut/dracut.git;a=commitdiff;h=12b9736228f2b34c15a9cb63be79cf7b6e865b54>
+SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS="db_persist"
diff --git a/core/lvm2/PKGBUILD b/core/lvm2/PKGBUILD
index eeea19970..39e3b4561 100644
--- a/core/lvm2/PKGBUILD
+++ b/core/lvm2/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 123786 2011-05-13 00:53:49Z eric $
+# $Id: PKGBUILD 125735 2011-05-28 17:12:36Z thomas $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Maintainer: Thomas Bächler <thomas@archlinux.org>
@@ -6,8 +6,8 @@ pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
pkgver=2.02.85
_pkgverlvm=${pkgver}
-pkgrel=1
-arch=('i686' 'x86_64' 'mips64el')
+pkgrel=2
+arch=('i686' 'x86_64')
url="http://sourceware.org/lvm2/"
license=('GPL2' 'LGPL2.1')
groups=('base')
@@ -15,15 +15,18 @@ conflicts=('mkinitcpio<0.5.99')
source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz
lvm2_install
lvm2_hook
- Be-quiet-on-removing-cache-on-read-only-fs.diff)
+ Be-quiet-on-removing-cache-on-read-only-fs.diff
+ 11-dm-initramfs.rules)
md5sums=('91785ca438e5ce679dd3a386b183d552'
- 'e29bc80d636ed17b617d9b384a5f3aa0'
+ '9fbe01c6e3fca4634b4a38ecdc2f562f'
'cf05f2c7281e24269ea9dcc6b4e106ba'
- '6db89da27928d2415a8e26cd0a842712')
+ '6db89da27928d2415a8e26cd0a842712'
+ '69e40679cd8b3658bfc619e48baae125')
sha1sums=('43ba2a3be84b2e897ae6b47b0b0be7e212216be7'
- '662fc54ce291fd79bd09701e4c3e10854f325282'
+ '3f11db76189bcbc32d6b16a1b05ca3499e3e7b47'
'1cd20e8fbad6fd7d5c0f54e831fbf58ae564b440'
- '6d7dd04be291d7537235704c816a701fd5beacc0')
+ '6d7dd04be291d7537235704c816a701fd5beacc0'
+ 'f6a554eea9557c3c236df2943bb6e7e723945c41')
build() {
cd "${srcdir}/LVM2.${_pkgverlvm}"
@@ -44,6 +47,8 @@ package_device-mapper() {
cd "${srcdir}/LVM2.${_pkgverlvm}"
make DESTDIR="${pkgdir}" install_device-mapper
+ # extra udev rule for device-mapper in initramfs
+ install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/lib/initcpio/udev/11-dm-initramfs.rules"
}
package_lvm2() {
diff --git a/core/lvm2/lvm2_install b/core/lvm2/lvm2_install
index 0c01ce69c..0df69f81b 100644
--- a/core/lvm2/lvm2_install
+++ b/core/lvm2/lvm2_install
@@ -14,6 +14,7 @@ install ()
add_file "/lib/udev/rules.d/13-dm-disk.rules"
add_file "/lib/udev/rules.d/95-dm-notify.rules"
add_file "/lib/udev/rules.d/11-dm-lvm.rules"
+ add_file "/lib/initcpio/udev/11-dm-initramfs.rules" "/lib/udev/rules.d/11-dm-initramfs.rules"
}
help ()
diff --git a/core/make/PKGBUILD b/core/make/PKGBUILD
index 99a6f602c..832522a78 100644
--- a/core/make/PKGBUILD
+++ b/core/make/PKGBUILD
@@ -1,25 +1,42 @@
-# $Id: PKGBUILD 77792 2010-04-18 03:42:45Z allan $
+# $Id: PKGBUILD 110342 2011-02-18 22:21:30Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=make
-pkgver=3.81
-pkgrel=5
+pkgver=3.82
+pkgrel=3
pkgdesc="GNU make utility to maintain groups of programs"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/make"
-license=('GPL')
+license=('GPL3')
groups=('base-devel')
depends=('glibc' 'sh')
install=$pkgname.install
-source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-md5sums=('a4e9494ac6dc3f6b0c5ff75c5d52abba')
+source=(ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ bug30612.patch
+ bug30723.patch
+ make-3.82-sort-blank.patch)
+md5sums=('1a11100f3c63fcf5753818e59d63088f'
+ 'c8f496b22191f9fb9420ab14c1a19a47'
+ '662e6450e19a5acdaa5c9fcb8ad78dea'
+ '7d01a99f389d8f08dec93ed479071ee4')
+
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- ./configure --prefix=/usr \
- --mandir=/usr/share/man --infodir=/usr/share/info
+
+ # http://savannah.gnu.org/bugs/?30612
+ patch -Np1 -i $srcdir/bug30612.patch
+
+ # http://savannah.gnu.org/bugs/?30723
+ patch -Np1 -i $srcdir/bug30723.patch
+
+ # https://bugs.archlinux.org/task/22733 (fix from Fedora)
+ patch -Np1 -i $srcdir/make-3.82-sort-blank.patch
+
+ ./configure --prefix=/usr
make
+ make check
}
package() {
diff --git a/core/make/bug30612.patch b/core/make/bug30612.patch
new file mode 100644
index 000000000..fb843bcd9
--- /dev/null
+++ b/core/make/bug30612.patch
@@ -0,0 +1,66 @@
+diff -Naur make-3.82-orig/main.c make-3.82-fix30612//main.c
+--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000
++++ make-3.82-fix30612//main.c 2010-09-23 23:33:37.908855839 +1000
+@@ -1,3 +1,4 @@
++
+ /* Argument parsing and main program of GNU Make.
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+@@ -1138,7 +1139,7 @@
+ a macro and some compilers (MSVC) don't like conditionals in macros. */
+ {
+ const char *features = "target-specific order-only second-expansion"
+- " else-if shortest-stem undefine"
++ " else-if shortest-stem undefine oneshell"
+ #ifndef NO_ARCHIVES
+ " archives"
+ #endif
+diff -Naur make-3.82-orig/read.c make-3.82-fix30612//read.c
+--- make-3.82-orig/read.c 2010-07-13 11:20:42.000000000 +1000
++++ make-3.82-fix30612//read.c 2010-09-23 23:30:58.018855839 +1000
+@@ -3028,7 +3028,7 @@
+ {
+ /* This looks like the first element in an open archive group.
+ A valid group MUST have ')' as the last character. */
+- const char *e = p + nlen;
++ const char *e = p;
+ do
+ {
+ e = next_token (e);
+@@ -3084,19 +3084,19 @@
+ Go to the next item in the string. */
+ if (flags & PARSEFS_NOGLOB)
+ {
+- NEWELT (concat (2, prefix, tp));
++ NEWELT (concat (2, prefix, tmpbuf));
+ continue;
+ }
+
+ /* If we get here we know we're doing glob expansion.
+ TP is a string in tmpbuf. NLEN is no longer used.
+ We may need to do more work: after this NAME will be set. */
+- name = tp;
++ name = tmpbuf;
+
+ /* Expand tilde if applicable. */
+- if (tp[0] == '~')
++ if (tmpbuf[0] == '~')
+ {
+- tildep = tilde_expand (tp);
++ tildep = tilde_expand (tmpbuf);
+ if (tildep != 0)
+ name = tildep;
+ }
+@@ -3152,7 +3152,11 @@
+ else
+ {
+ /* We got a chain of items. Attach them. */
+- (*newp)->next = found;
++ if (*newp)
++ (*newp)->next = found;
++ else
++ *newp = found;
++
+
+ /* Find and set the new end. Massage names if necessary. */
+ while (1)
diff --git a/core/make/bug30723.patch b/core/make/bug30723.patch
new file mode 100644
index 000000000..84e7ebe7a
--- /dev/null
+++ b/core/make/bug30723.patch
@@ -0,0 +1,12 @@
+diff -Naur make-3.82-orig/main.c make-3.82-fix30723//main.c
+--- make-3.82-orig/main.c 2010-07-19 17:10:53.000000000 +1000
++++ make-3.82-fix30723//main.c 2010-09-23 23:34:10.932188592 +1000
+@@ -2093,7 +2093,7 @@
+ const char *pv = define_makeflags (1, 1);
+ char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
+ sprintf (p, "MAKEFLAGS=%s", pv);
+- putenv (p);
++ putenv (allocated_variable_expand (p));
+ }
+
+ if (ISDB (DB_BASIC))
diff --git a/core/make/make-3.82-sort-blank.patch b/core/make/make-3.82-sort-blank.patch
new file mode 100644
index 000000000..2e73f5b7c
--- /dev/null
+++ b/core/make/make-3.82-sort-blank.patch
@@ -0,0 +1,17 @@
+diff -urp make-3.82/function.c make-3.82-pm/function.c
+--- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200
++++ make-3.82-pm/function.c 2010-10-27 01:43:27.000000000 +0200
+@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c
+ {
+ char c = *(t++);
+
+- if (! isspace ((unsigned char)c))
++ if (! isblank ((unsigned char)c))
+ continue;
+
+ ++wordi;
+
+- while (isspace ((unsigned char)*t))
++ while (isblank ((unsigned char)*t))
+ ++t;
+ }
diff --git a/core/make/make.install b/core/make/make.install
index 0c2da13c3..6cf8b0dc4 100644
--- a/core/make/make.install
+++ b/core/make/make.install
@@ -1,4 +1,4 @@
-infodir=/usr/share/info
+infodir=usr/share/info
filelist=(make.info make.info-1 make.info-2)
post_install() {
diff --git a/core/module-init-tools/PKGBUILD b/core/module-init-tools/PKGBUILD
index 08d359214..0b1f4e14c 100644
--- a/core/module-init-tools/PKGBUILD
+++ b/core/module-init-tools/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 105077 2011-01-06 02:59:10Z allan $
+# $Id: PKGBUILD 126053 2011-06-01 05:32:56Z andyrtr $
# Maintainer: Aaron Griffin <aaron@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=module-init-tools
-pkgver=3.12
-pkgrel=2
+pkgver=3.13
+pkgrel=1
pkgdesc="utilities needed by Linux systems for managing loadable kernel modules"
arch=('i686' 'x86_64' 'mips64el')
url="http://kerneltools.org"
@@ -13,7 +13,7 @@ depends=('glibc')
backup=('etc/modprobe.d/modprobe.conf')
source=(http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-$pkgver.tar.bz2
modprobe.conf)
-md5sums=('8b2257ce9abef74c4a44d825d23140f3'
+md5sums=('dc575e7df00d9f745bf23b32f927b7a6'
'316f1bda4c21af02b30252eb014a0a55')
build() {
diff --git a/core/pkg-config/PKGBUILD b/core/pkg-config/PKGBUILD
index 3dbbf0b34..f1f0657a1 100644
--- a/core/pkg-config/PKGBUILD
+++ b/core/pkg-config/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 102636 2010-12-09 12:15:21Z stephane $
+# $Id: PKGBUILD 124806 2011-05-24 14:39:31Z stephane $
# Maintainer: Allan McRae <allan@archlinux.org>
# Committer: Judd Vinet <jvinet@zeroflux.org>
pkgname=pkg-config
-pkgver=0.25
-pkgrel=3
+pkgver=0.26
+pkgrel=1
pkgdesc="A system for managing library compile/link flags"
arch=('i686' 'x86_64' 'mips64el')
url="http://pkgconfig.freedesktop.org/wiki/"
@@ -14,20 +14,22 @@ depends=('glibc' 'popt' 'glib2')
provides=("pkgconfig=${pkgver}")
conflicts=('pkgconfig')
replaces=('pkgconfig')
-source=(http://pkgconfig.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
- autoconf-2.66.patch)
-md5sums=('a3270bab3f4b69b7dc6dbdacbcae9745'
- '0fbfc1a5088f792bbeec7b5090e449f1')
+source=(http://pkgconfig.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz)
+md5sums=('47525c26a9ba7ba14bf85e01509a7234')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i $srcdir/autoconf-2.66.patch
- # Use system popt and glib
- ./configure --prefix=/usr --with-installed-glib --with-installed-popt
+ # Use system popt
+ ./configure --prefix=/usr --with-installed-popt
make
}
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR=${pkgdir} install
diff --git a/core/sudo/PKGBUILD b/core/sudo/PKGBUILD
index 06cc39661..fcb315b9e 100644
--- a/core/sudo/PKGBUILD
+++ b/core/sudo/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 120368 2011-04-22 22:01:28Z allan $
+# $Id: PKGBUILD 124889 2011-05-24 21:47:33Z eric $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=sudo
-_ver=1.8.1p1
+_ver=1.8.1p2
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
pkgrel=1
pkgdesc="Give certain users the ability to run some commands as root"
@@ -12,14 +12,14 @@ url="http://www.sudo.ws/sudo/"
license=('custom')
depends=('glibc' 'pam')
backup=('etc/sudoers' 'etc/pam.d/sudo')
+options=('!libtool' '!makeflags')
source=(ftp://ftp.sudo.ws/pub/sudo/$pkgname-$_ver.tar.gz
sudo.pam)
-options=('!libtool' '!makeflags')
-md5sums=('318337804d976c9419cf3004b707945c'
+md5sums=('e8330f0e63b0ecb2e12b5c76922818cc'
'4e7ad4ec8f2fe6a40e12bcb2c0b256e3')
build() {
- cd $srcdir/$pkgname-$_ver
+ cd "$srcdir/$pkgname-$_ver"
./configure --prefix=/usr --with-pam --libexecdir=/usr/lib \
--with-env-editor --with-all-insults --with-logfac=auth
@@ -27,11 +27,11 @@ build() {
}
package() {
- cd $srcdir/$pkgname-$_ver
- install -dm755 $pkgdir/var/lib
+ cd "$srcdir/$pkgname-$_ver"
+ install -dm755 "$pkgdir/var/lib"
- make DESTDIR=$pkgdir install
- install -Dm644 $srcdir/sudo.pam $pkgdir/etc/pam.d/sudo
+ make DESTDIR="$pkgdir" install
+ install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
- install -Dm644 doc/LICENSE $pkgdir/usr/share/licenses/sudo/LICENSE
+ install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE"
}
diff --git a/extra/bind/PKGBUILD b/extra/bind/PKGBUILD
index 173ddd0f4..3be95aabe 100644
--- a/extra/bind/PKGBUILD
+++ b/extra/bind/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 124551 2011-05-22 22:52:52Z bisson $
+# $Id: PKGBUILD 125623 2011-05-27 08:34:32Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
# Contributor: Mario Vazquez <mario_vazq@hotmail.com>
@@ -6,9 +6,9 @@
pkgname=bind
# Use a period and not a hyphen before the patch level for proper versioning.
-pkgver=9.8.0.P1
-_pkgver=9.8.0-P1
-pkgrel=3
+pkgver=9.8.0.P2
+_pkgver=9.8.0-P2
+pkgrel=1
pkgdesc='Berkeley Internet Name Daemon (BIND) is the reference implementation of the Domain Name System (DNS) protocols'
arch=('i686' 'x86_64' 'mips64el')
@@ -30,10 +30,10 @@ source=("http://ftp.isc.org/isc/bind9/${_pkgver}/${pkgname}-${_pkgver}.tar.gz"
'named.logrotate'
'localhost.zone'
'127.0.0.zone')
-sha1sums=('aa8f308f218e437ac4bad616e0ae83a9b9c40c29'
+sha1sums=('b3492ad11cfbf2939d9b0fb62c52c204de58679b'
'ee52947062c1582858187716b776afa3613608fb'
- '2f737f4e81186447ac2ef370fa8dcea0b3abec31'
- '5277cf4d6fbc5728c55b51c77c9347d28393fb7c'
+ 'b433ba99f23e3db305f8ce293fe4ce6d1b8d4cfb'
+ '17444f9d759a4bde7688bdaa304dac57a138e4c1'
'46232e9db243c6c05e170a1781d7a7f413be5d03'
'5ca7a5f2a132548a090a045a2df3acea6b35d9eb'
'7848edbfb9a848843f57c11c02b0289eefd42d00'
@@ -46,8 +46,8 @@ install=install
build() {
cd "${srcdir}/${pkgname}-${_pkgver}"
- patch -p1 -i "${srcdir}"/so_bsdcompat.patch
- patch -p1 -i "${srcdir}"/notools.patch
+ patch -p1 -i ../so_bsdcompat.patch
+ patch -p1 -i ../notools.patch
./configure \
--prefix=/usr \
diff --git a/extra/bind/notools.patch b/extra/bind/notools.patch
index 2d16fdcd5..0ad083a01 100644
--- a/extra/bind/notools.patch
+++ b/extra/bind/notools.patch
@@ -1,5 +1,6 @@
---- bind-9.7.0/bin/Makefile.in.orig 2010-03-14 21:19:23.000000000 -0400
-+++ bind-9.7.0/bin/Makefile.in 2010-03-14 21:19:37.000000000 -0400
+diff -aur old/bin/Makefile.in new/bin/Makefile.in
+--- old/bin/Makefile.in 2011-05-27 10:12:59.392416094 +0200
++++ new/bin/Makefile.in 2011-05-27 10:13:12.372521984 +0200
@@ -19,7 +19,7 @@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
diff --git a/extra/bind/so_bsdcompat.patch b/extra/bind/so_bsdcompat.patch
index cae2b835c..4d7031fcc 100644
--- a/extra/bind/so_bsdcompat.patch
+++ b/extra/bind/so_bsdcompat.patch
@@ -1,13 +1,12 @@
diff -aur old/lib/isc/unix/socket.c new/lib/isc/unix/socket.c
---- old/lib/isc/unix/socket.c 2010-03-12 04:25:20.000000000 +0100
-+++ new/lib/isc/unix/socket.c 2011-01-22 21:07:52.410000038 +0100
-@@ -681,6 +681,8 @@
- isc_sockstatscounter_fdwatchrecvfail
- };
+--- old/lib/isc/unix/socket.c 2011-02-18 05:01:16.000000000 +0100
++++ new/lib/isc/unix/socket.c 2011-05-27 10:12:01.685269374 +0200
+@@ -712,6 +712,8 @@
+ }
+ #endif
+#undef SO_BSDCOMPAT
+
static void
- manager_log(isc__socketmgr_t *sockmgr,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
-Only in new/lib/isc/unix: socket.c.orig
+ socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
+ isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/extra/cppunit/PKGBUILD b/extra/cppunit/PKGBUILD
new file mode 100644
index 000000000..b7dd30d27
--- /dev/null
+++ b/extra/cppunit/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 126261 2011-06-03 13:02:27Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org>
+
+pkgname=cppunit
+pkgver=1.12.1
+pkgrel=3
+pkgdesc="A C++ unit testing framework"
+arch=('i686' 'x86_64')
+url="http://cppunit.sourceforge.net"
+license=('LGPL')
+depends=('sh' 'gcc-libs')
+makedepends=('gcc')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+ 'gcc4.5.patch')
+md5sums=('bd30e9cf5523cdfc019b94f5e1d7fd19'
+ '7f4e3b50fa1ee8bc854ab431848dddec')
+
+build() {
+ cd "${srcdir}/$pkgname-$pkgver"
+ patch -Np1 -i ../gcc4.5.patch
+ autoreconf
+ libtoolize -f
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/$pkgname-$pkgver"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/extra/cppunit/gcc4.5.patch b/extra/cppunit/gcc4.5.patch
new file mode 100644
index 000000000..86d4a424d
--- /dev/null
+++ b/extra/cppunit/gcc4.5.patch
@@ -0,0 +1,15 @@
+--- cppunit-1.12.1.orig/src/cppunit/Makefile.am
++++ cppunit-1.12.1/src/cppunit/Makefile.am
+@@ -63,5 +63,11 @@
+
+ libcppunit_la_LDFLAGS= \
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+- -release $(LT_RELEASE)
++ -release $(LT_RELEASE) @LIBADD_DL@
+
++TESTS = t_link
++
++check_PROGRAMS = t_link
++
++t_link_SOURCES = t_link.cpp
++t_link_LDADD = libcppunit.la
diff --git a/extra/cups/PKGBUILD b/extra/cups/PKGBUILD
index 478720388..4d166fb6d 100644
--- a/extra/cups/PKGBUILD
+++ b/extra/cups/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 121078 2011-04-29 00:03:07Z stephane $
+# $Id: PKGBUILD 126330 2011-06-04 22:35:21Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgbase="cups"
pkgname=('libcups' 'cups')
pkgver=1.4.6
-pkgrel=2
-arch=('i686' 'x86_64' 'mips64el')
+pkgrel=3
+arch=('i686' 'x86_64')
license=('GPL')
url="http://www.cups.org/"
makedepends=('libtiff>=3.9.2-2' 'libpng>=1.4.0' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'poppler>=0.12.3'
@@ -25,7 +25,7 @@ md5sums=('de8fb5a29c36554925c0c6a6e2c0dae1'
build() {
cd ${srcdir}/${pkgbase}-${pkgver}
# Avahi support in the dnssd backend. patch from Fedora
- patch -Np1 -i ${srcdir}/cups-avahi.patch || return 1
+ patch -Np1 -i ${srcdir}/cups-avahi.patch
# Rebuild configure script for --enable-avahi.
aclocal -I config-scripts
@@ -36,8 +36,8 @@ build() {
--with-cups-user=daemon --with-cups-group=lp --enable-pam=yes \
--disable-ldap --libdir=/usr/lib --enable-raw-printing \
--enable-dbus --with-dbusdir=/etc/dbus-1 --enable-ssl=yes --enable-gnutls --disable-threads --enable-avahi\
- --without-php --with-pdftops=pdftops --with-optim="$CFLAGS"
- make || return 1
+ --with-php=/usr/bin/php-cgi --with-pdftops=pdftops --with-optim="$CFLAGS"
+ make
}
package_libcups() {
@@ -45,7 +45,7 @@ pkgdesc="The CUPS Printing System - client libraries and headers"
depends=('gnutls>=2.8.3' 'libtiff>=3.9.2-2' 'libpng>=1.4.0' 'krb5' 'avahi')
cd ${srcdir}/${pkgbase}-${pkgver}
- make BUILDROOT=${pkgdir} install-headers install-libs || return 1
+ make BUILDROOT=${pkgdir} install-headers install-libs
# put this into the libs pkg to make other software find the libs(no pkg-config file included)
mkdir -p ${pkgdir}/usr/bin
install -m755 ${srcdir}/${pkgbase}-${pkgver}/cups-config ${pkgdir}/usr/bin/cups-config
@@ -67,9 +67,14 @@ backup=(etc/cups/cupsd.conf
etc/pam.d/cups
etc/xinetd.d/cups-lpd)
depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'xdg-utils' 'poppler>=0.12.3' 'libusb-compat' 'dbus-core' 'hicolor-icon-theme')
+optdepends=('php: for included phpcups.so module'
+ 'ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images'
+ 'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly'
+ 'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly'
+ 'foomatic-db-nonfree: drivers use Ghostscript to convert PostScript to a printable form directly')
cd ${srcdir}/${pkgbase}-${pkgver}
- make BUILDROOT=${pkgdir} install-data install-exec || return 1
+ make BUILDROOT=${pkgdir} install-data install-exec
# this one we ship in the libcups pkg
rm -f ${pkgdir}/usr/bin/cups-config
diff --git a/extra/enblend-enfuse/PKGBUILD b/extra/enblend-enfuse/PKGBUILD
index b6d1e3271..ce46b36b6 100644
--- a/extra/enblend-enfuse/PKGBUILD
+++ b/extra/enblend-enfuse/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 64417 2010-01-20 07:24:28Z eric $
+# $Id: PKGBUILD 126103 2011-06-01 14:26:46Z stephane $
# Maintainer: tobias <tobias@archlinux.org>
# Contributor: Dominik Ryba <domryba@post.pl>
pkgname=enblend-enfuse
pkgver=4.0
-pkgrel=1
+pkgrel=2
pkgdesc="intelligent blend tool for overlapping picture"
arch=("i686" "x86_64" 'mips64el')
license=('GPL')
@@ -21,10 +21,14 @@ sha1sums=('34c3a5ce11c6ef0ef520d8a15a3cb6a94a567033' 'eae6cf48ea082865130302d0b4
build() {
cd "${srcdir}/${pkgname}-${pkgver}-753b534c819d"
- patch -p1 < ../libpng-1.4.patch || return 1
- ./configure --prefix=/usr || return 1
- make || return 1
- make DESTDIR="${pkgdir}" install || return 1
- install -D -m644 doc/enblend.info "${pkgdir}/usr/share/info/enblend.info" || return 1
- install -D -m644 doc/enfuse.info "${pkgdir}/usr/share/info/enfuse.info" || return 1
+ patch -Np1 -i ../libpng-1.4.patch
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}-753b534c819d"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 doc/enblend.info "${pkgdir}/usr/share/info/enblend.info"
+ install -D -m644 doc/enfuse.info "${pkgdir}/usr/share/info/enfuse.info"
}
diff --git a/extra/fetchmail/PKGBUILD b/extra/fetchmail/PKGBUILD
index 796d84761..511538481 100644
--- a/extra/fetchmail/PKGBUILD
+++ b/extra/fetchmail/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 124586 2011-05-23 05:55:07Z eric $
+# $Id: PKGBUILD 126284 2011-06-04 05:34:18Z eric $
# Maintainer: Aaron Griffin <aaron@archlinux.org>
pkgname=fetchmail
pkgver=6.3.19
-pkgrel=2
+pkgrel=3
pkgdesc="A remote-mail retrieval utility"
arch=('i686' 'x86_64')
url="http://fetchmail.berlios.de/"
@@ -34,4 +34,5 @@ package() {
make DESTDIR="${pkgdir}" install
install -Dm755 "${srcdir}/fetchmail.rc" "${pkgdir}/etc/rc.d/fetchmail"
install -Dm644 "${srcdir}/fetchmail.conf" "${pkgdir}/etc/conf.d/fetchmail"
+ install -d "${pkgdir}/var/lib/fetchmail"
}
diff --git a/extra/fetchmail/fetchmail.install b/extra/fetchmail/fetchmail.install
index 711cbe568..0b1cc6ae3 100644
--- a/extra/fetchmail/fetchmail.install
+++ b/extra/fetchmail/fetchmail.install
@@ -3,15 +3,15 @@ post_install() {
echo "If you run fetchmail as a daemon and not a cron job"
echo "then 'chown fetchmail /etc/fetchmailrc'"
getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
- -d '/var/run/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
+ -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
}
post_upgrade() {
getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
- -d '/var/run/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
+ -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
- if [ "$(vercmp $2 6.3.19)" -lt 0 ] ; then
- chsh -s /bin/false fetchmail
+ if [ "$(vercmp $2 6.3.19-3)" -lt 0 ] ; then
+ usermod -d '/var/lib/fetchmail' -s /bin/false fetchmail
fi
}
diff --git a/extra/glew/PKGBUILD b/extra/glew/PKGBUILD
index 195ca7647..e573f7b8d 100644
--- a/extra/glew/PKGBUILD
+++ b/extra/glew/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 108690 2011-02-02 16:13:23Z stephane $
+# $Id: PKGBUILD 125318 2011-05-25 20:28:27Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: SleepyDog
pkgname=glew
-pkgver=1.5.8
+pkgver=1.6.0
pkgrel=1
pkgdesc="The OpenGL Extension Wrangler Library"
arch=('i686' 'x86_64' 'mips64el')
@@ -11,7 +11,7 @@ url="http://glew.sourceforge.net"
license=('BSD' 'MIT' 'GPL')
depends=('libxmu' 'libxi' 'mesa')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
-sha1sums=('450946935faa20ac4950cb42ff025be2c1f7c22e')
+sha1sums=('ed555d15d0f01239b262c4cf803e97d60d8a18b6')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -21,7 +21,9 @@ build() {
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make GLEW_DEST="${pkgdir}/usr" install
+ make GLEW_DEST="${pkgdir}/usr" install.all
install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- chmod 0755 "${pkgdir}/usr/lib/libGLEW.so.${pkgver}"
+
+ rm "${pkgdir}"/usr/lib/{libGLEW,libGLEWmx}.a
+ chmod 0755 "${pkgdir}"/usr/lib/libGLEW*.so.${pkgver}
}
diff --git a/extra/gnome-power-manager/PKGBUILD b/extra/gnome-power-manager/PKGBUILD
index 61fa2a7a7..4dfe50163 100644
--- a/extra/gnome-power-manager/PKGBUILD
+++ b/extra/gnome-power-manager/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 124602 2011-05-23 10:33:56Z ibiru $
+# $Id: PKGBUILD 126303 2011-06-04 12:33:16Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-power-manager
pkgver=3.0.2
-pkgrel=1
+pkgrel=2
pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system."
arch=(i686 x86_64 'mips64el')
url="http://www.gnome.org/projects/gnome-power-manager/"
@@ -14,11 +14,14 @@ makedepends=('intltool' 'gnome-doc-utils' 'gnome-control-center')
options=(!emptydirs)
install=gnome-power-manager.install
groups=(gnome)
-source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('d0e00fdcfbc3bfb709f9ed82a14de325c51cf0bb86eeacefcda2dd7fcf6cbc2b')
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2
+ fix-suspend.patch)
+sha256sums=('d0e00fdcfbc3bfb709f9ed82a14de325c51cf0bb86eeacefcda2dd7fcf6cbc2b'
+ '898454c9a22ecdf56e555687d4d41a0dfa3d590408dc2a17ef6cf4eaec83b262')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/fix-suspend.patch"
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib/gnome-power-manager \
diff --git a/extra/gnome-power-manager/fix-suspend.patch b/extra/gnome-power-manager/fix-suspend.patch
new file mode 100644
index 000000000..acd9093cd
--- /dev/null
+++ b/extra/gnome-power-manager/fix-suspend.patch
@@ -0,0 +1,31 @@
+From 44503c5bca065290ce73b0d064a1a0db7de2936d Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Mon, 02 May 2011 23:18:58 +0000
+Subject: gpm-idle: manually update the status property
+
+gnome-session doesn't emit PropertyChanged since it uses dbus-glib,
+therefore we need to manually update the cached property when
+receiving a SessionChanged signal.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=679083
+
+Signed-off-by: Richard Hughes <richard@hughsie.com>
+---
+diff --git a/src/gpm-idle.c b/src/gpm-idle.c
+index 04225fc..0f2f1ee 100644
+--- a/src/gpm-idle.c
++++ b/src/gpm-idle.c
+@@ -424,6 +424,11 @@ gpm_idle_dbus_signal_cb (GDBusProxy *proxy, const gchar *sender_name, const gcha
+ return;
+ }
+ if (g_strcmp0 (signal_name, "StatusChanged") == 0) {
++ guint status;
++
++ g_variant_get (parameters, "(u)", &status);
++ g_dbus_proxy_set_cached_property (proxy, "status",
++ g_variant_new ("u", status));
+ g_debug ("Received gnome session status change");
+ gpm_idle_evaluate (idle);
+ return;
+--
+cgit v0.9
diff --git a/extra/hugin/PKGBUILD b/extra/hugin/PKGBUILD
index 6029c1ebe..9533f55ee 100644
--- a/extra/hugin/PKGBUILD
+++ b/extra/hugin/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 124912 2011-05-25 06:37:46Z eric $
+# $Id: PKGBUILD 125347 2011-05-26 02:15:23Z eric $
# Maintainer: Tobias Kieslich <tobias@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Dominik Ryba <domryba@post.pl>
pkgname=hugin
pkgver=2010.4.0
-pkgrel=3
+pkgrel=4
pkgdesc="A frontend to the panorama-tools"
arch=('i686' 'x86_64' 'mips64el')
url="http://hugin.sourceforge.net/"
diff --git a/extra/koffice/PKGBUILD b/extra/koffice/PKGBUILD
index 45275af63..1884dd92c 100644
--- a/extra/koffice/PKGBUILD
+++ b/extra/koffice/PKGBUILD
@@ -1,5 +1,6 @@
-# $Id: PKGBUILD 115172 2011-03-17 10:46:47Z andrea $
+# $Id: PKGBUILD 125678 2011-05-28 00:58:39Z andrea $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
pkgbase=koffice
@@ -36,23 +37,25 @@ pkgname=(
# 'koffice-kdgantt' # still an empty package
)
pkgver=2.3.3
-pkgrel=3
-arch=('i686' 'x86_64' 'mips64el')
+pkgrel=4
+arch=('i686' 'x86_64')
url='http://koffice.kde.org'
license=('GPL' 'LGPL' 'FDL')
-makedepends=('pkg-config' 'cmake' 'automoc4' 'boost' 'eigen' \
- 'kdelibs' 'gsl' 'qca' 'lcms' 'glew' 'qimageblitz' \
- 'kdepimlibs' 'pstoedit' 'poppler-qt' 'libwpd' 'libwpg' 'openexr' 'opengtl' 'kdegraphics-libs' 'sqlite3' 'docbook-xml' 'docbook-xsl')
+makedepends=('pkg-config' 'cmake' 'automoc4' 'boost' 'eigen' 'gsl' 'lcms'
+ 'glew' 'qimageblitz' 'kdepimlibs' 'pstoedit' 'poppler-qt' 'libwpd'
+ 'libwpg' 'opengtl' 'kdegraphics-libs')
groups=('koffice')
-source=("ftp://ftp.kde.org/pub/kde/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2"
- "kde4-koffice-libwpg02.patch")
+source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2"
+ 'kde4-koffice-libwpg02.patch' 'gcc46.patch')
sha256sums=('31ba0d98c0d29c7b8ab97efdeb6c618b82177b2b0ec85da088178254da43c099'
- '69106deb4081d71b5bd8f2e4f5af67ca689e4ce9f2bb49c11dbce5fb3409d612')
+ '69106deb4081d71b5bd8f2e4f5af67ca689e4ce9f2bb49c11dbce5fb3409d612'
+ 'e095c0b2bbedf41da6535a68b2275464dafd3f194566028d0135322f596e4739')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
- patch -Np1 -i "${srcdir}/kde4-koffice-libwpg02.patch"
+ patch -p1 -i "${srcdir}/kde4-koffice-libwpg02.patch"
+ patch -p1 -i "${srcdir}"/gcc46.patch
cd "${srcdir}"
mkdir build
diff --git a/extra/koffice/gcc46.patch b/extra/koffice/gcc46.patch
new file mode 100644
index 000000000..dcf8a4f85
--- /dev/null
+++ b/extra/koffice/gcc46.patch
@@ -0,0 +1,23 @@
+diff -up koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc.gcc46 koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc
+--- koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc.gcc46 2011-02-17 06:13:40.000000000 -0600
++++ koffice-2.3.2/krita/plugins/formats/exr/exr_converter.cc 2011-02-19 21:15:56.597142885 -0600
+@@ -80,6 +80,9 @@ ImageType imfTypeToKisType(Imf::PixelTyp
+ return IT_FLOAT16;
+ case Imf::FLOAT:
+ return IT_FLOAT32;
++ default:
++ // shouldn't reach here
++ return IT_UNSUPPORTED;
+ }
+ }
+
+@@ -93,6 +96,9 @@ const KoColorSpace* kisTypeToColorSpace(
+ case IT_UNKNOWN:
+ case IT_UNSUPPORTED:
+ return 0;
++ default:
++ // shouldn't reach here
++ return 0;
+ }
+ }
+
diff --git a/extra/kwebkitpart/PKGBUILD b/extra/kwebkitpart/PKGBUILD
index 52689d4b2..3472e71a8 100644
--- a/extra/kwebkitpart/PKGBUILD
+++ b/extra/kwebkitpart/PKGBUILD
@@ -1,30 +1,30 @@
-# $Id: PKGBUILD 112728 2011-03-06 12:19:29Z andrea $
+# $Id: PKGBUILD 126252 2011-06-02 23:08:29Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
pkgname=kwebkitpart
-pkgver=1.1
+pkgver=1.1.1
pkgrel=1
pkgdesc="A web browser component for KDE"
url="http://opendesktop.org/content/show.php?content=127960"
-arch=('i686' 'x86_64' 'mips64el')
-license=('GPL')
+arch=('i686' 'x86_64')
+license=('LGPL')
depends=('kdebase-runtime')
makedepends=('cmake' 'automoc4')
install=${pkgname}.install
-source=("ftp://ftp.archlinux.org/other/kde/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('1a72499b91d668409ed8ea8e5e71b398')
+source=("${pkgname}-${pkgver}.tar.bz2"::"http://quickgit.kde.org/?p=${pkgname}.git&a=snapshot&h=37bddda24735bb8eb2d9e324f983b8e84a45503e&fmt=tbz2")
+md5sums=('54c1fbb77f4a3c021b33a52a503fec8e')
build() {
- cd ${srcdir}
+ cd "${srcdir}"
mkdir build
cd build
- cmake ../${pkgname}-${pkgver} \
+ cmake ../${pkgname} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
make
}
package() {
- cd ${srcdir}/build
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/libass/PKGBUILD b/extra/libass/PKGBUILD
index bf6da4979..8da57646f 100644
--- a/extra/libass/PKGBUILD
+++ b/extra/libass/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 87470 2010-08-13 22:22:30Z giovanni $
+# $Id: PKGBUILD 126098 2011-06-01 12:39:10Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
pkgname=libass
-pkgver=0.9.11
+pkgver=0.9.12
pkgrel=1
pkgdesc="A portable library for SSA/ASS subtitles rendering"
arch=('i686' 'x86_64' 'mips64el')
@@ -12,13 +12,18 @@ license=('GPL')
depends=('enca' 'fontconfig' 'libpng')
makedepends=('pkgconfig')
options=(!libtool)
-source=(http://libass.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('f9042884397002ba40aa89dc7d34f59f')
+source=("http://libass.googlecode.com/files/${pkgname}-${pkgver}.tar.xz")
+md5sums=('fcef4b048ca2655a14073d692551cd1f')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr
- make || return 1
- make DESTDIR="${pkgdir}" install || return 1
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/libdvbpsi/PKGBUILD b/extra/libdvbpsi/PKGBUILD
index 83ab62418..e8483fba1 100644
--- a/extra/libdvbpsi/PKGBUILD
+++ b/extra/libdvbpsi/PKGBUILD
@@ -1,29 +1,29 @@
-# $Id: PKGBUILD 80128 2010-05-12 16:41:47Z andrea $
+# $Id: PKGBUILD 126352 2011-06-05 00:53:01Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Gilles CHAUVIN <gcnweb@gmail.com>
pkgname=libdvbpsi
-pkgver=0.1.7
+pkgver=0.2.0
pkgrel=1
pkgdesc="A library designed for decoding and generation of MPEG TS and DVB PSI tables"
-arch=('i686' 'x86_64' 'mips64el')
-license=('GPL')
+arch=('i686' 'x86_64')
+license=('LGPL')
depends=('glibc')
options=('!libtool')
replaces=('libdvbpsi4' 'libdvbpsi5')
conflicts=('libdvbpsi4' 'libdvbpsi5')
url="http://developers.videolan.org/libdvbpsi/"
-source=(http://download.videolan.org/pub/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('af419575719e356b908b0c6946499052')
+source=("http://download.videolan.org/pub/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('b80f3fb7fd58d35276cc4c4a84b6ac03')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr
- make || return 1
+ make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make prefix="${pkgdir}/usr" install || return 1
+ make prefix="${pkgdir}/usr" install
}
diff --git a/extra/libpano13/PKGBUILD b/extra/libpano13/PKGBUILD
index 312001abe..472c52610 100644
--- a/extra/libpano13/PKGBUILD
+++ b/extra/libpano13/PKGBUILD
@@ -1,24 +1,27 @@
-# $Id: PKGBUILD 96763 2010-10-24 16:48:37Z ibiru $
+# $Id: PKGBUILD 126350 2011-06-05 00:52:37Z eric $
# Maintainer: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
pkgname=libpano13
-pkgver=2.9.17
+pkgver=2.9.18
pkgrel=1
-pkgdesc="basic library to calculate panoramical pictures - core functions of the panotools"
+pkgdesc="Basic library to calculate panoramical pictures - core functions of the panotools"
+arch=('i686' 'x86_64')
url="http://panotools.sourceforge.net/"
-arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
depends=('libpng' 'libtiff')
makedepends=('openjdk6')
options=('!libtool')
-source=(http://downloads.sourceforge.net/sourceforge/panotools/$pkgname-$pkgver.tar.gz)
-md5sums=('54ec7c505cf38521f2fbb6e2acd2c433')
+source=(http://downloads.sourceforge.net/sourceforge/panotools/${pkgname}-${pkgver}.tar.gz)
+md5sums=('9c3a4fce8b6f1d79e395896ce5d8776e')
build() {
- cd $srcdir/$pkgname-$pkgver
-# sed -i 's:\(^.*MAX_FISHEYE_FOV.*\)160.*$:\1720.0:' filter.h
+ cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --mandir=/usr/share/man --with-java=${JAVA_HOME}
make
- make DESTDIR=$pkgdir install
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/libreoffice/PKGBUILD b/extra/libreoffice/PKGBUILD
index 9722ac9a8..4c3853010 100644
--- a/extra/libreoffice/PKGBUILD
+++ b/extra/libreoffice/PKGBUILD
@@ -1,337 +1,307 @@
-# $Id: PKGBUILD 116748 2011-03-25 17:36:36Z andyrtr $
+# $Id: PKGBUILD 125824 2011-05-30 09:43:02Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
-pkgname=('libreoffice' 'libreoffice-sdk' 'libreoffice-extension-nlpsolver' 'libreoffice-extension-pdfimport' 'libreoffice-extension-presentation-minimizer' 'libreoffice-extension-presenter-screen'
- 'libreoffice-extension-report-builder' 'libreoffice-extension-wiki-publisher' 'libreoffice-extension-ct2n' 'libreoffice-extension-hunart' 'libreoffice-extension-numbertext'
- 'libreoffice-extension-oooblogger' 'libreoffice-extension-typo' 'libreoffice-extension-watch-window' 'libreoffice-extension-diagram')
-_LOver=3.3.2.2
-pkgver=3.3.2
-pkgrel=2
-arch=('i686' 'x86_64' 'mips64el')
-_LO_tree="3.3"
-_OFFICEUPD="330"
+pkgname=('libreoffice' 'libreoffice-sdk'
+ #'libreoffice-extension-barcode' #
+ 'libreoffice-extension-diagram'
+ 'libreoffice-extension-google-docs'
+ 'libreoffice-extension-hunart'
+ #'libreoffice-extension-lightproof' # no source integration
+ #'libreoffice-extension-mysql-connector' # missing libmysqlcppconn-dev configure: error: mysql_driver.h not found. install MySQL C++ Connectivity
+ 'libreoffice-extension-nlpsolver'
+ 'libreoffice-extension-ct2n'
+ 'libreoffice-extension-numbertext'
+ 'libreoffice-extension-oooblogger'
+ 'libreoffice-extension-pdfimport'
+ 'libreoffice-extension-presenter-screen'
+ 'libreoffice-extension-presentation-minimizer'
+ 'libreoffice-extension-report-builder'
+ 'libreoffice-extension-scripting-beanshell'
+ 'libreoffice-extension-scripting-javascript'
+ 'libreoffice-extension-scripting-python'
+ 'libreoffice-extension-typo'
+ 'libreoffice-extension-validator'
+ 'libreoffice-extension-watch-window'
+ 'libreoffice-extension-wiki-publisher')
+_LOver=3.4.0.2
+pkgver=3.4.0
+pkgrel=1
+arch=('i686' 'x86_64')
+#_LO_tree="3.4"
+_OFFICEUPD="340"
license=('LGPL3')
url="http://www.libreoffice.org/"
makedepends=( # makedepends
- 'boost' 'sane' 'perl-archive-zip' 'zip' 'unzip' 'xulrunner' 'unixodbc' 'hsqldb-java'
- 'apache-ant' 'gperf' 'poppler' 'kdelibs' 'gconf' 'cppunit'
+ 'sane' 'perl-archive-zip' 'zip' 'unzip' 'xulrunner' 'unixodbc' 'hsqldb-java' #'boost' - we use internal one for now that has some gcc4.6 fixes.
+ 'apache-ant' 'gperf' 'poppler' 'kdelibs' 'gconf' 'cppunit' #'libmysqlclient'
'beanshell' 'vigra' 'libldap' 'lucene' 'libmythes' 'junit' 'libwpg' 'imagemagick'
- # for additional ooo-build features
- 'mesa>=7.5' 'gstreamer0.10-base>=0.10.26' #'mono>=2.6.1'
+ 'mesa' 'gstreamer0.10-base' 'java-runtime'
#'saxon' - currently broken
# the depends from libreoffice main pkg
- "curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.0' 'libxaw' "neon>=0.28.6"
+ "curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
- 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh'
- 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'java-runtime' 'gtk2') # keep gtk2 for install script
+ 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat'
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' # keep gtk2 for install script
+ 'ttf-dejavu') # to satisfy regression tests
+ # translate-toolkit - todo move them to extra to allow --with-system-foo builds
# http://download.documentfoundation.org/mirrors/all.html
# http://wiki.documentfoundation.org/Mirrors
-_mirror="http://download.documentfoundation.org/libreoffice/src"
-#_mirror="ftp://ftp.uni-muenster.de/pub/software/tdf/libreoffice/src"
-#_mirror="ftp://ftp.astral.ro/mirrors/tdf/libreoffice/src"
+#_mirror="http://download.documentfoundation.org/libreoffice/src"
+_mirror="http://dev-builds.libreoffice.org/pre-releases/src/"
_additional_source_url="http://hg.services.openoffice.org/binaries"
-source=(${_mirror}/${pkgbase}-build-${_LOver}.tar.gz
- ${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,l10n,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2
- ArchLinux.patch
- ${_additional_source_url}/63ddc5116488985e820075e65fbe6aa4-openssl-0.9.8o.tar.gz
- ${_additional_source_url}/09357cc74975b01714e00c5899ea1881-pixman-0.12.0.tar.gz
- ${_additional_source_url}/0b49ede71c21c0599b0cc19b353a6cb3-README_apache-commons.txt
- ${_additional_source_url}/68dd2e8253d9a7930e9fd50e2d7220d0-hunspell-1.2.9.tar.gz
- ${_additional_source_url}/128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz
- ${_additional_source_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
- ${_additional_source_url}/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
- ${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2 #,translations
${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
- ${_additional_source_url}/24be19595acad0a2cae931af77a0148a-LICENSE_source-9.0.0.7-bj.html
- ${_additional_source_url}/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
- ${_additional_source_url}/284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz
- ${_additional_source_url}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
- ${_additional_source_url}/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz
- ${_additional_source_url}/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
- ${_additional_source_url}/2f6ecca935948f7db92d925d88d0d078-icu4c-4_0_1-src.tgz
- ${_additional_source_url}/ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz
${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
- ${_additional_source_url}/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip
- ${_additional_source_url}/377a60170e5185eb63d3ed2fae98e621-README_silgraphite-2.3.1.txt
- ${_additional_source_url}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
- ${_additional_source_url}/3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
- ${_additional_source_url}/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz
- ${_additional_source_url}/48470d662650c3c074e1c3fabbc67bbd-README_source-9.0.0.7-bj.txt
- ${_additional_source_url}/48d8169acc35f97e05d8dcdfd45be7f2-lucene-2.3.2.tar.gz
- ${_additional_source_url}/4a660ce8466c9df01f19036435425c3a-glibc-2.1.3-stub.tar.gz
- ${_additional_source_url}/4ea70ea87b47e92d318d4e7f5b940f47-cairo-1.8.0.tar.gz
- ${_additional_source_url}/599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz
- ${_additional_source_url}/5aba06ede2daa9f2c11892fbd7bc3057-libserializer.zip
- http://download.go-oo.org/src/71474203939fafbe271e1263e61d083e-nss-3.12.8-with-nspr-4.8.6.tar.gz
- ${_additional_source_url}/67b42915c8432abf0a922438f00860a2-libxml.zip
- ${_additional_source_url}/7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz
- ${_additional_source_url}/7376930b0d3f3d77a685d94c4a3acda8-STLport-4.5-0119.tar.gz
- ${_additional_source_url}/79600e696a98ff95c2eba976f7a8dfbb-liblayout.zip
${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
- ${_additional_source_url}/ecb2e37e45c9933e2a963cabe03670ab-curl-7.19.7.tar.gz
- ${_additional_source_url}/8294d6c42e3553229af9934c5c0ed997-stax-api-1.0-2-sources.jar
- ${_additional_source_url}/8ea307d71d11140574bfb9fcc2487e33-libbase.zip
- ${_additional_source_url}/bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz
- ${_additional_source_url}/a06a496d7a43cbdc35e69dbe678efadb-libloader.zip
- ${_additional_source_url}/a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz
- ${_additional_source_url}/a4d9b30810a434a3ed39fc0003bbd637-LICENSE_stax-api-1.0-2-sources.html
- ${_additional_source_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+ ${_additional_source_url}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
${_additional_source_url}/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+ ${_additional_source_url}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
+ ${_additional_source_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+ ${_additional_source_url}/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz
+ ${_additional_source_url}/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz
+ ${_additional_source_url}/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
${_additional_source_url}/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
- ${_additional_source_url}/ba1015b59c112d44d7797b62fe7bee51-neon-0.29.3.tar.gz
- ${_additional_source_url}/bc702168a2af16869201dbe91e46ae48-LICENSE_Python-2.6.1
- ${_additional_source_url}/c441926f3a552ed3e5b274b62e86af16-STLport-4.0.tar.gz
- ${_additional_source_url}/ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz
- ${_additional_source_url}/d0b5af6e408b8d2958f3d83b5244f5e8-hyphen-2.4.tar.gz
- ${_additional_source_url}/d1a3205871c3c52e8a50c9f18510ae12-libformula.zip
- ${_additional_source_url}/d35724900f6a4105550293686688bbb3-silgraphite-2.3.1.tar.gz
- ${_additional_source_url}/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip
- ${_additional_source_url}/d70951c80dabecc2892c919ff5d07172-db-4.7.25.NC-custom.tar.gz
- ${_additional_source_url}/dbb3757275dc5cc80820c0b4dd24ed95-librepository.zip
- ${_additional_source_url}/dbd5f3b47ed13132f04c685d608a7547-jpeg-6b.tar.gz
- ${_additional_source_url}/e0707ff896045731ff99e99799606441-README_db-4.7.25.NC-custom.txt
- ${_additional_source_url}/e81c2f0953aa60f8062c05a4673f2be0-Python-2.6.1.tar.bz2
- ${_additional_source_url}/e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz
- ${_additional_source_url}/ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz
- ${_additional_source_url}/ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz
- ${_additional_source_url}/ee8b492592568805593f81f8cdf2a04c-expat-2.0.1.tar.gz
- ${_additional_source_url}/f3e2febd267c8e4b13df00dac211dd6d-flute.zip
- ${_additional_source_url}/f7925ba8491fe570e5164d2c72791358-libfonts.zip
- ${_additional_source_url}/fb7ba5c2182be4e73748859967455455-README_stax-api-1.0-2-sources.txt
- ${_additional_source_url}/fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz
- ${_additional_source_url}/fcc6df1160753d0b8c835d17fdeeb0a7-boost_1_39_0.tar.gz
- ${_additional_source_url}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
- ${_additional_source_url}/37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip
- ${_additional_source_url}/831126a1ee5af269923cfab6050769fe-mysql-connector-cpp.zip
- ${_additional_source_url}/067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz
- ${_additional_source_url}/cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2
- http://www.numbertext.org/linux/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip
- http://download.go-oo.org/src/47e1edaa44269bc537ae8cabebb0f638-JLanguageTool-1.0.0.tar.bz2
- http://download.go-oo.org/src/debc62758716a169df9f62e6ab2bc634-zlib-1.2.3.tar.gz
- http://download.go-oo.org/src/5ba6a61a2f66dfd5fee8cdd4cd262a37-libwpg-0.2.0.tar.bz2
- http://download.go-oo.org/src/5ff846847dab351604ad859e2fd4ed3c-libwpd-0.9.1.tar.bz2
- http://download.go-oo.org/src/9e436bff44c60dc8b97cba0c7fc11a5c-libwps-0.2.0.tar.bz2
+ ${_additional_source_url}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+ ${_additional_source_url}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+ ${_additional_source_url}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+ ${_additional_source_url}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+ ${_additional_source_url}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+ ${_additional_source_url}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+ ${_additional_source_url}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+ ${_additional_source_url}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+ ${_additional_source_url}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+ ${_additional_source_url}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+ ${_additional_source_url}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+ ${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ http://download.go-oo.org/src/7a0dcb3fe1e8c7229ab4fb868b7325e6-mdds_0.5.2.tar.bz2
http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
- http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.3.tar.bz2
- http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz
- http://download.go-oo.org//SRC680/extras-3.1.tar.bz2
- http://download.go-oo.org//SRC680/biblio.tar.bz2
- http://download.go-oo.org/src//0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz
- http://download.go-oo.org/src//e3738abd0d3ce1870dc1fd1f22bba5b1-icu4c-4_2_1-src.tgz
- http://ftp.fsf.hu/OpenOffice.org_hu/numbertext/numbertext-0.9.3.oxt
- http://ftp.fsf.hu/OpenOffice.org_hu/hunart/hunart-0.3.oxt
- http://ftp.fsf.hu/OpenOffice.org_hu/typo/typo-0.3.oxt
+ http://download.go-oo.org/extern/b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
+ http://download.go-oo.org/src/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
http://download.go-oo.org/src/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
- http://download.go-oo.org/src/ConvertTextToNumber-1.3.2.oxt
- http://ftp.devall.hu/kami/go-oo/WatchWindow_1.2.0.0.oxt
- http://ftp.devall.hu/kami/go-oo/Diagram_1.1.0.0.oxt
- http://download.go-oo.org/src/oooblogger-0.1.oxt
- buildfix_64bit_system_libjpeg.diff)
-#options=('!makeflags')
-noextract=(libreoffice-\
-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,l10n,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2)
-replaces=('openoffice-base')
-md5sums=('2f54261deaf89d8154440ea33bf12cc2'
- 'cd9f83d8dc2f85f06b2999fd3d23a74d'
- '46fb3c85cc878daabb58d94fa848a59d'
- '19698765fe35dcbb1f6d7d55c617c39f'
- '0274eb33f462e620cb2f37aa696d18b1'
- 'a5f11a035faa6160121dd2d3f984065f'
- 'd54e5f7e5cde7f648d74e382eb5e44fc'
- 'db5d3a8886ec451c11e1ef3cea132ce0'
- '4ae9b40116ef3f840b232cb3454be4e3'
- '2dc8e4b347866f9469eb6c42a9cb0b81'
- 'e9211340b2a7f48c17883db76d1e8e03'
- '688768909f823b5006162d27638aa15e'
- '26ca2152535ba45bf71d8aa3b26fc967'
- '9df0af97ec8d085864c5341678bb1d0d'
- '09b22bf1a812affbfe561230940d7da2'
- 'e3dc1c328dfdf4a288946957c69ad32b'
- '5c0a8203253d053f23613e68cdb69565'
- '2e68a800e323fd3286a0a3305e3d3e39'
- 'e91523550f9cae015923685ad3fce5ad'
- 'a17434cc2469a263ffabd345e90d8911'
- '6faf9924a74b836527906f49fcea40c2'
- 'a77cc2fdff90146485e0b1f1398bb0d4'
- '63ddc5116488985e820075e65fbe6aa4'
- '09357cc74975b01714e00c5899ea1881'
- '0b49ede71c21c0599b0cc19b353a6cb3'
- '68dd2e8253d9a7930e9fd50e2d7220d0'
- '128cfc86ed5953e57fe0f5ae98b62c2e'
- '17410483b5b5f267aa18b7e00b65e6e0'
- '1756c4fa6c616ae15973c104cd8cb256'
- '18f577b374d60b3c760a3a3350407632'
+ http://download.go-oo.org/src/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
+ buildfix_i116795.diff
+ buildfix_boost.diff
+ buildfix_ct2n.diff
+ vbahelper.visibility.patch
+ buildfix_bison25.diff)
+noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
+ 7a0dcb3fe1e8c7229ab4fb868b7325e6-mdds_0.5.2.tar.bz2
+ ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+ 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+ 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+ fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+ 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+ 2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
+ a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+ 3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz
+ 2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz
+ 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
+ af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
+ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+ 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+ 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+ 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+ f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+ 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+ d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+ 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+ ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+ db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+ 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ 7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
+ 41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
+ 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+ bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
+ 23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
+ b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
+ b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
+ 9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
+ dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
+ b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
+ 90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
+ f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2)
+md5sums=('7427ddd5ae63b6ee7aa868201dfbccaa'
+ 'a78a8e08731213da02c65060cedc5589'
+ '596da255e2728faccc8f2361171270ec'
+ '8ed9803a34d13da1764e7523d550d6b0'
+ '9be46d7c4bf3a60ee8dd0a5ef3638f82'
+ 'b60db802866ab71c485de42e6382d1bb'
+ '09e374cf3bd8f07a043883393012d69b'
+ 'af9f25aa04dc4ef7b797f7bcc743877c'
+ 'ad29de786d76d67759f9d2dd574b29be'
+ 'ff13a8ac0ea324122b75773fd80a9245'
+ '6eb8f53e01da7a945ee4cd42b7297732'
+ '90df27d4cbf490668ce4f03ff7dba521'
+ 'c0ea197183564c49306a1c79ca571e51'
+ '91e69ed3c0be542fa7f69ca3da2d7808'
+ 'a81c787b2e5469c2acc9f335b2c9e52f'
+ 'ee1c78af6553657614b1a43adf4750ac'
+ 'c970d6212618fc9b34526907eb030ce6'
+ '6d25488c81af09d87015bf487243042f'
+ '9a39234a49516b7035309e28dd4f0784'
'1f24ab1d39f4a51faf22244c94a6203f'
- '24be19595acad0a2cae931af77a0148a'
- '26b3e95ddf3d9c077c480ea45874b3b8'
- '284e768eeda0e2898b0d5bf7e26a016e'
- '2a177023f9ea8ec8bd00837605c5df1b'
- '2ae988b339daec234019a7066f96733e'
- '2c9b0f83ed5890af02c0df1c1776f39b'
- '2f6ecca935948f7db92d925d88d0d078'
- 'ca4870d899fd7e943ffc310a5421ad4d'
'35c94d2df8893241173de1d16b6034c0'
- '35efabc239af896dfb79be7ebdd6e6b9'
- '377a60170e5185eb63d3ed2fae98e621'
- '39bb3fcea1514f1369fcfc87542390fd'
- '3ade8cfe7e59ca8e65052644fed9fca4'
- '3c219630e4302863a9a83d0efde889db'
- '48470d662650c3c074e1c3fabbc67bbd'
- '48d8169acc35f97e05d8dcdfd45be7f2'
- '4a660ce8466c9df01f19036435425c3a'
- '4ea70ea87b47e92d318d4e7f5b940f47'
- '599dc4cc65a07ee868cf92a667a913d2'
- '5aba06ede2daa9f2c11892fbd7bc3057'
- '71474203939fafbe271e1263e61d083e'
- '67b42915c8432abf0a922438f00860a2'
- '7740a8ec23878a2f50120e1faa2730f2'
- '7376930b0d3f3d77a685d94c4a3acda8'
- '79600e696a98ff95c2eba976f7a8dfbb'
'798b2ffdc8bcfe7bca2cf92b62caf685'
- 'ecb2e37e45c9933e2a963cabe03670ab'
- '8294d6c42e3553229af9934c5c0ed997'
- '8ea307d71d11140574bfb9fcc2487e33'
- 'bd30e9cf5523cdfc019b94f5e1d7fd19'
- 'a06a496d7a43cbdc35e69dbe678efadb'
- 'a169ab152209200a7bad29a275cb0333'
- 'a4d9b30810a434a3ed39fc0003bbd637'
- 'a7983f859eafb2677d7ff386a023bc40'
+ 'fdb27bfe2dbe2e7b57ae194d9bf36bab'
'ada24d37d8d638b3d8a9985e80bc2978'
+ '2a177023f9ea8ec8bd00837605c5df1b'
+ 'a7983f859eafb2677d7ff386a023bc40'
+ '3c219630e4302863a9a83d0efde889db'
+ '2ae988b339daec234019a7066f96733e'
+ '2c9b0f83ed5890af02c0df1c1776f39b'
'af3c3acf618de6108d65fcdc92b492e1'
- 'ba1015b59c112d44d7797b62fe7bee51'
- 'bc702168a2af16869201dbe91e46ae48'
- 'c441926f3a552ed3e5b274b62e86af16'
- 'ca66e26082cab8bb817185a116db809b'
- 'd0b5af6e408b8d2958f3d83b5244f5e8'
- 'd1a3205871c3c52e8a50c9f18510ae12'
- 'd35724900f6a4105550293686688bbb3'
- 'd4c4d91ab3a8e52a2e69d48d34ef4df4'
- 'd70951c80dabecc2892c919ff5d07172'
- 'dbb3757275dc5cc80820c0b4dd24ed95'
- 'dbd5f3b47ed13132f04c685d608a7547'
- 'e0707ff896045731ff99e99799606441'
- 'e81c2f0953aa60f8062c05a4673f2be0'
- 'e61d0364a30146aaa3001296f853b2b9'
- 'ea570af93c284aa9e5621cd563f54f4d'
- 'ea91f2fb4212a21d708aced277e6e85a'
- 'ee8b492592568805593f81f8cdf2a04c'
- 'f3e2febd267c8e4b13df00dac211dd6d'
- 'f7925ba8491fe570e5164d2c72791358'
- 'fb7ba5c2182be4e73748859967455455'
- 'fca8706f2c4619e2fa3f8f42f8fc1e9d'
- 'fcc6df1160753d0b8c835d17fdeeb0a7'
- 'fdb27bfe2dbe2e7b57ae194d9bf36bab'
- '37282537d0ed1a087b1c8f050dc812d9'
- '831126a1ee5af269923cfab6050769fe'
- '067201ea8b126597670b5eff72e1f66c'
- 'cf8a6967f7de535ae257fa411c98eb88'
- '881af2b7dca9b8259abbca00bbbc004d'
- '47e1edaa44269bc537ae8cabebb0f638'
- 'debc62758716a169df9f62e6ab2bc634'
- '5ba6a61a2f66dfd5fee8cdd4cd262a37'
- '5ff846847dab351604ad859e2fd4ed3c'
- '9e436bff44c60dc8b97cba0c7fc11a5c'
+ 'eeb2c7ddf0d302fba4bfc6e97eac9624'
+ '39bb3fcea1514f1369fcfc87542390fd'
+ '3404ab6b1792ae5f16bbd603bd1e1d03'
+ '97b2d4dba862397f446b217e2b623e71'
+ 'f94d9870737518e3b597f9265f4e9803'
+ '8ce2fcd72becf06c41f7201d15373ed9'
+ 'd8bd5eed178db6e2b18eeed243f85aa8'
+ '3bdf40c0d199af31923e900d082ca2dd'
+ 'ace6ab49184e329db254e454a010f56d'
+ 'db60e4fde8dd6d6807523deb71ee34dc'
+ 'ba2930200c9f019c2d93a8c88c651a0f'
+ '18f577b374d60b3c760a3a3350407632'
+ '7a0dcb3fe1e8c7229ab4fb868b7325e6'
'185d60944ea767075d27247c3162b3bc'
- 'fc46e64367c3b09a1668fb9ab40c031b'
- '246e8f38b2a1af1bcff60ee0da59300b'
- '1aa219782c41ff6cabef9ecaf147556f'
- '1948e39a68f12bfa0b7eb309c14d940c'
- '0f63ee487fda8f21fafa767b3c447ac9'
- 'e3738abd0d3ce1870dc1fd1f22bba5b1'
- 'a90f17aaccfb38be917732503740e6a2'
- 'b632bdd25649cc4067bcb410bae23d2b'
- '2b3fcb8d061dbfc26bf7efbcfa6d7ae2'
+ 'b4cae0700aa1c2aef7eb7f345365e6f1'
+ '451ccf439a36a568653b024534669971'
'90401bca927835b6fbae4a707ed187c8'
+ 'f02578f5218f217a9f20e9c30e119c6a'
+ '7e7efc5d4a03126bb9ae3ae9aa2c4e87'
+ '41c9b65ad60af4b3255bbecdfef11736'
'451ccf439a36a568653b024534669971'
+ 'bbdd5639ada63e3130761daaecae1a10'
'23bd75552206dfcd8fd4e29137dcac84'
- '41c9b65ad60af4b3255bbecdfef11736'
- 'c1ce4ff1636394b3b4a2af23572159c9'
- '7ef850978f435c32abc81862404936fc')
+ 'b8cbca7b3363e6ca2d02bc0ba2b63904'
+ 'b632bdd25649cc4067bcb410bae23d2b'
+ '9d60b6cfa3ef1926848710bbcd11115b'
+ 'dbaafd21de055e582d92d7d32fe9da13'
+ 'b7b2d0e04e142f26dd96119c80757d1f'
+ '0520d63c946e272ed3bdfc863fbdc42e'
+ 'bc228237108cab7745897a9f466b6d39'
+ 'eee273f501ff45dc5f1365e78c6d57c0'
+ '43b145db28e6c0d73578ae6fd35e510d'
+ '4fa96e04b41a6e86774e74a972024b3e')
build() {
- unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH
+ unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH; unset EXTRAOPTS
[ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
[ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
- cd ${srcdir}/${pkgbase}-build-${_LOver}
+ # move all LibO sources into one build directory
+ mkdir ${srcdir}/build && cd ${srcdir}/build
+ for i in libreoffice-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}; do #,translations
+ mv ${srcdir}/$i/* .
+ done
- # our ArchLinux distribution patch until we go upstream
- patch -Np0 -i ${srcdir}/ArchLinux.patch || return 1
+ # move external sources into place
+ mkdir ${srcdir}/ext_sources && cd ${srcdir}/ext_sources
+ for source in "${noextract[@]}"; do
+ ln -s ${srcdir}/$source .
+ done
- # hotfixes not yet upstream
- # cp ${srcdir}/*.diff ${srcdir}/${pkgbase}-build-${_LOver}/patches/hotfixes/
- cp ${srcdir}/buildfix_64bit_system_libjpeg.diff ${srcdir}/${pkgbase}-build-${_LOver}/patches/hotfixes/
+ cd ${srcdir}/build
- # export C(XX)FLAGS
+ # buildfixes & bugfixes
+ patch -Np1 -i ${srcdir}/buildfix_i116795.diff
+ patch -Np1 -i ${srcdir}/buildfix_boost.diff
+ patch -Np1 -i ${srcdir}/buildfix_ct2n.diff
+ patch -Np0 -i ${srcdir}/vbahelper.visibility.patch
+ patch -Np0 -i ${srcdir}/buildfix_bison25.diff
+
+ # unset C(XX)FLAGS
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
- unset CFLAGS
- unset CXXFLAGS
-
+# unset CFLAGS
+# unset CXXFLAGS
+
+ #use the CFLAGS but remove the LibO overridden ones
+ for i in $CFLAGS; do
+ case "$i" in
+ -O?|-pipe|-Wall|-g|-fexceptions) continue;;
+ esac
+ ARCH_FLAGS="$ARCH_FLAGS $i"
+ done
+
# python2 fix
export PYTHON=python2
- # mono2.8 hack
-# sed -i -e "s/mkbundle2/mkbundle/g" patches/mono/*.diff || return 1
- # fix dekstop menu entries
- sed -i -e "s/Exec=oo/Exec=lo/g" desktop/*.desktop.in.in
- sed -i -e "s/TryExec=oo/TryExec=lo/g" desktop/*.desktop.in.in
-
# http://wiki.documentfoundation.org/Development/How_to_build/Configure_options
- if [ "$CARCH" = "x86_64" ]; then
- EXTRAOPTS="--without-stlport"
- else
- EXTRAOPTS="--with-stlport" # --without-system-boost"
- # # avoid problems with ixion for now
- sed -i '/fields-table-formula.diff/d' patches/dev300/apply || return 1
- fi
-
- ./configure --with-distro=ArchLinux \
- --with-build-version="${_LOver} ArchLinux build-${pkgrel}" \
- --without-git \
- --with-srcdir=${srcdir} \
- --with-max-jobs=${MAKEFLAGS/-j/} \
- --with-installed-ooo-dirname="${pkgbase}" \
+# if [ "$CARCH" = "x86_64" ]; then
+# EXTRAOPTS="--without-stlport"
+# else
+# EXTRAOPTS="--with-stlport" # --without-system-boost"
+# # # avoid problems with ixion for now
+# sed -i '/fields-table-formula.diff/d' patches/dev300/apply || return 1
+# fi
+
+# autoconf -v -f
+
+ # non-SMP test build
+# export MAKEFLAGS="-j1"
+ ./configure --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
+ --with-unix-wrapper="libreoffice" \
+ --with-max-jobs=${MAKEFLAGS/-j/} --with-num-cpus=${MAKEFLAGS/-j/} \
+ --with-external-tar="${srcdir}/ext_sources" \
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
- --with-docdir=/usr/share/doc/packages/"${pkgbase}" \
- --mandir=/usr/share/man \
+ --with-install-dirname="${pkgbase}" --libdir=/usr/lib --mandir=/usr/share/man \
--with-lang="" \
- --with-binsuffix=no \
+ --disable-verbose \
--enable-cairo\
- --enable-crashdump\
+ --enable-crashdump \
+ --enable-dbus \
--enable-evolution2\
- --enable-graphite\
- --disable-gio\
+ --disable-graphite\
+ --enable-gio\
+ --disable-gnome-vfs\
--disable-kde\
- --disable-mono\
--enable-kde4\
--enable-ldap \
--enable-lockdown\
--enable-opengl \
--enable-odk\
--enable-opengl\
- --enable-ogltrans \
- --enable-minimizer \
- --enable-pdfimport \
- --enable-presenter-console \
- --enable-presenter-extra-ui\
- --enable-report-builder\
- --enable-wiki-publisher \
- --with-ct2n \
- --with-hunart \
- --with-nlpsolver \
- --with-numbertext \
- --with-oooblogger \
- --with-typo \
- --with-watch-window \
- --with-diagram \
+ --enable-ext-barcode \
+ --enable-ext-diagram \
+ --enable-ext-google-docs \
+ --enable-ext-hunart \
+ --disable-ext-lightproof \
+ --disable-ext-mysql-connector \
+ --with-system-mysql \
+ --enable-ext-nlpsolver \
+ --enable-ext-ct2n \
+ --enable-ext-numbertext \
+ --enable-ext-oooblogger \
+ --enable-ext-pdfimport \
+ --enable-ext-presenter-console \
+ --enable-ext-presenter-minimizer \
+ --enable-ext-report-builder \
+ --enable-ext-scripting-beanshell \
+ --enable-ext-scripting-javascript \
+ --enable-ext-scripting-python \
+ --enable-ext-typo \
+ --enable-ext-validator \
+ --enable-ext-watch-window \
+ --enable-ext-wiki-publisher \
--without-fonts\
--without-afms\
--without-ppds\
- --without-system-agg\
--without-system-libwps\
--without-system-mdds\
--without-myspell-dicts \
@@ -340,16 +310,19 @@ build() {
--with-external-hyph-dir=/usr/share/hyphen \
--with-external-thes-dir=/usr/share/mythes \
--with-system-cppunit\
- --with-system-libwpg\
+ --with-system-libwpg \
+ --with-system-libwps \
--with-system-redland\
--without-system-saxon\
+ --with-system-libtextcat \
+ --with-external-libtextcat-data \
--with-openldap\
--with-ant-home="/usr/share/java/apache-ant"\
- --with-system-boost\
+ --without-system-boost\
--with-system-cairo\
--with-system-libs\
+ --with-system-mozilla\
--with-system-mythes\
- --with-system-unixodbc-headers\
--with-system-xrender-headers\
--with-system-headers\
--with-alloc=system\
@@ -358,52 +331,35 @@ build() {
--with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
$EXTRAOPTS || return 1
-# seems no more needed
-# --with-unix-wrapper="libreoffice" \
-
-# not yet supported
-# --enable-ext-presenter-minimizer \
-# --enable-ext-pdfimport \
-# --enable-ext-presenter-console \
-# --enable-ext-presenter-extra-ui\
-# --enable-ext-report-builder\
-# --enable-ext-wiki-publisher \
-# --enable-ext-ct2n \
-# --enable-ext-hunart \
-# --enable-ext-nlpsolver \
-# --enable-ext-numbertext \
-# --enable-ext-oooblogger \
-# --enable-ext-typo \
-# --enable-ext-watch-window \
-# --enable-ext-diagram \
-
+#--with-system-graphite --enable-graohite ?
+#--with-servlet-api-jar=JARFILE
# see http://qa.openoffice.org/issues/show_bug.cgi?id=110136
# --with-system-saxon\
# --with-saxon-jar=/usr/share/java/saxon/saxon9he.jar\
-
-# --enable-report-builder \
-# --with-additional-sections="OOXMLExport"
-
-# --with-languagetool \
-# --with-lightproof \
-# --with-validator \
-# --with-barcode \
+ touch src.downloaded
+ #./download
unset MAKEFLAGS
- ./download
- LD_PRELOAD="" make
+ ./bootstrap
+ make
}
+#check() {
+# cd ${srcdir}/build
+# make check
+#}
+
package_libreoffice() {
pkgdesc="a productivity suite that is compatible with other major office suites"
install=${pkgbase}.install
- depends=("curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.0' 'libxaw' "neon>=0.28.6"
+ depends=("curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
- 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh'
- 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'java-runtime' 'gtk2') # keep gtk2 for install script
+ 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat'
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2') # keep gtk2 for install script
+ #'java-runtime'
#'saxon'
- optdepends=( #'java-runtime: adds java support'
+ optdepends=('java-runtime: adds java support'
'libcups: adds printing support'
'gconf: adds additional gnome support'
'nss: adds support for signed files/macros'
@@ -422,40 +378,68 @@ package_libreoffice() {
'unixodbc: adds ODBC database support'
'mesa: for the OGLTrans extension'
'gstreamer0.10-base: + some gstr-plugins to support multimedia content, e.g. in impress')
-# 'mono: allows UNO automation with Mono'
backup=(etc/libreoffice/sofficerc
etc/libreoffice/bootstraprc
etc/libreoffice/psprint.conf)
- provides=('go-openoffice') #'openoffice-base'
- conflicts=('go-openoffice') #'openoffice-base'
- replaces=('go-openoffice')
-
- cd ${srcdir}/${pkgbase}-build-${_LOver}
- #bin/ooinstall <path-to-install>
- LD_PRELOAD="" make DESTDIR=${pkgdir} install
+ provides=('go-openoffice')
+ conflicts=('go-openoffice')
+ replaces=('go-openoffice' 'openoffice-base' )
+ cd ${srcdir}/build
+ make DESTDIR=${pkgdir} install
+
+ # fix missing desktop integration
+ install -dm755 ${pkgdir}/usr/bin
+ pushd ${pkgdir}/usr/bin
+ ln -vs /usr/lib/libreoffice/program/soffice ./libreoffice
+ ln -vs /usr/lib/libreoffice/program/soffice ./soffice
+ ln -vs /usr/lib/libreoffice/program/sbase ./lobase
+ ln -vs /usr/lib/libreoffice/program/scalc ./localc
+ ln -vs /usr/lib/libreoffice/program/sdraw ./lodraw
+ ln -vs /usr/lib/libreoffice/program/simpress ./loimpress
+ ln -vs /usr/lib/libreoffice/program/smath ./lomath
+ ln -vs /usr/lib/libreoffice/program/swriter ./lowriter
+ ln -vs /usr/lib/libreoffice/program/unopkg ./unopkg
+ popd
+
# move sysui desktop files into place we want to use - javafilter and qstarter, but not unneeded printeradmin
- cp ${pkgdir}/usr/lib/libreoffice/share/xdg/javafilter.desktop ${pkgdir}/usr/share/applications/
- sed -i -e "s/Exec=oo/Exec=so/g" ${pkgdir}/usr/share/applications/javafilter.desktop # https://bugs.archlinux.org/task/23361
- cp ${pkgdir}/usr/lib/libreoffice/share/xdg/qstart.desktop ${pkgdir}/usr/share/applications/
+ install -dm755 ${pkgdir}/usr/share/{applications,icons,mime/packages,pixmaps}
+ rm ${pkgdir}/usr/lib/libreoffice/share/xdg/printeradmin.desktop
+ for i in base calc draw impress javafilter math qstart startcenter writer; do
+ cp ${pkgdir}/usr/lib/libreoffice/share/xdg/$i.desktop ${pkgdir}/usr/share/applications/libreoffice-$i.desktop
+ done
# remove version in menu entry and make it visible
- sed -i -e "s/3.3 Quickstarter/Quickstarter/g" ${pkgdir}/usr/share/applications/qstart.desktop
- sed -i -e "/NoDisplay=true/d" ${pkgdir}/usr/share/applications/qstart.desktop
- # remove unneeded .desktop files from vanilla sysui
+ sed -i -e "s/3.4//g" ${pkgdir}/usr/share/applications/*.desktop
+ sed -i -e "s/Icon=libreoffice34-/Icon=/g" ${pkgdir}/usr/share/applications/*.desktop
+ sed -i -e "/NoDisplay=true/d" ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
+ echo "Icon=startcenter" >> ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
+ # remove unneeded .desktop files
rm -rf ${pkgdir}/usr/lib/libreoffice/share/xdg
+
+ # add missing icon files
+ cp -R ${srcdir}/build/sysui/desktop/icons/{hi,lo}color ${pkgdir}/usr/share/icons/
+ pushd ${pkgdir}/usr/share/pixmaps
+ for i in base calc draw impress main math printeradmin startcenter writer; do
+ ln -vs /usr/share/icons/hicolor/48x48/apps/$i.png .
+ done
+ popd
+ sed -i -e 's/Icon=libreoffice-/Icon=/' ${pkgdir}/usr/share/applications/*.desktop
+
+ # add missing mimetype file
+ install -m644 ${srcdir}/build/sysui/unxlng*/misc/libreoffice/openoffice.org.xml ${pkgdir}/usr/share/mime/packages/libreoffice.xml
# put configuration files into place
install -dm755 ${pkgdir}/etc/libreoffice
install -m644 ${pkgdir}/usr/lib/libreoffice/program/{bootstraprc,sofficerc} ${pkgdir}/etc/libreoffice/
- install -m644 ${pkgdir}/usr/lib/libreoffice/basis3.3/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
+ install -m644 ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
# install dummy links to make them found by LibO
cd ${pkgdir}/usr/lib/libreoffice/program/
ln -vsf /etc/libreoffice/{bootstraprc,sofficerc} .
- cd ${pkgdir}/usr/lib/libreoffice/basis3.3/share/psprint/
+ cd ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/
ln -vsf /etc/libreoffice/psprint.conf .
#fix http://bugs.archlinux.org/task/17656
- find ${pkgdir} -perm 444 -exec ls -lh {} \;
+ find ${pkgdir} -perm 444 -exec ls -lh {} \;
find ${pkgdir} -perm 444 -exec chmod 644 {} \;
find ${pkgdir} -perm 555 -exec ls -lh {} \;
find ${pkgdir} -perm 555 -exec chmod 755 {} \;
@@ -466,153 +450,209 @@ package_libreoffice() {
install -m644 ${srcdir}/extensions-install/package.txt ${pkgdir}/usr/lib/libreoffice/share/extensions/
# move SDK to separated package
- mkdir -p ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.3/sdk
- mv ${pkgdir}/usr/lib/libreoffice/basis3.3/sdk ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.3/
-
- mkdir -p ${srcdir}/sdk-install/usr/share/doc/packages/libreoffice/sdk
- mv ${pkgdir}/usr/share/doc/packages/libreoffice/sdk ${srcdir}/sdk-install/usr/share/doc/packages/libreoffice/
-
- mkdir -p ${srcdir}/sdk-install/usr/share/libreoffice/sdk
- mv ${pkgdir}/usr/share/libreoffice/sdk ${srcdir}/sdk-install/usr/share/libreoffice/
-
- mkdir -p ${srcdir}/sdk-install/usr/share/idl/libreoffice
- mv ${pkgdir}/usr/share/idl/libreoffice ${srcdir}/sdk-install/usr/share/idl/
+ mkdir -p ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.4/sdk
+ mv ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.4/
- mkdir -p ${srcdir}/sdk-install/usr/include/libreoffice
- mv ${pkgdir}/usr/include/libreoffice ${srcdir}/sdk-install/usr/include/
+ # cleanup gid_Module files
+ mkdir ${srcdir}/splitlist
+ mv -f ${pkgdir}/gid_Module* ${srcdir}/splitlist/
}
package_libreoffice-sdk() {
pkgdesc="Software development kit for LibreOffice"
- depends=('libreoffice')
+ depends=('libreoffice' 'gcc-libs' 'sh')
cd ${srcdir}/sdk-install
cp -r * ${pkgdir}
- cd ${pkgdir}/usr/lib/libreoffice/basis3.3/sdk
- for file in setsdkenv_unix.csh setsdkenv_unix.sh ; do
- chmod 755 $file
- done
+ cd ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk
+ mv setsdkenv_unix setsdkenv_unix.sh && chmod 755 setsdkenv_unix.sh
+ rm -f ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk/setsdkenv_unix.{csh,sh}.in
#fix permissions
find examples -type f -exec chmod -x {} \;
}
-package_libreoffice-extension-nlpsolver() {
+package_libreoffice-extension-barcode() {
- pkgdesc="This extension integrates into Calc and offers new Solver engines to use for optimizing nonlinear programming models"
+ pkgdesc="This extension generates UPC-A, EAN-13, ISBN and JAN barcodes in Draw "
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/NLPSolver.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/NLPSolver.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/nlpsolver
+ unzip -q ${srcdir}/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
+ chmod o-w -R ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
}
-package_libreoffice-extension-pdfimport() {
+package_libreoffice-extension-diagram() {
- pkgdesc="This extension allows you to import and modify PDF documents"
+ pkgdesc="An OOo Draw and Impress extension that creates your favorite diagrams with a few clicks"
+ #arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/pdfimport
+ unzip -q ${srcdir}/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/diagram
}
-package_libreoffice-extension-presentation-minimizer() {
+package_libreoffice-extension-google-docs() {
- pkgdesc="This extension reduce the file size of the current presentation"
+ pkgdesc="Google Documents extension for LibreOffice"
+ #arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presentation-minimizer
+ unzip -q ${srcdir}/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/google-docs
}
-package_libreoffice-extension-presenter-screen() {
+package_libreoffice-extension-hunart() {
- pkgdesc="This extension provides more control over your slide show presentation, such as the ability to see the upcoming slide, the slide notes, and a presentation timer whereas the audience see only the current slide"
+ pkgdesc="Hungarian cross-reference toolbar extension"
+ #arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/presenter/presenter-screen.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/presenter/presenter-screen.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presenter-screen
+ unzip -q ${srcdir}/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/hunart
}
-package_libreoffice-extension-report-builder() {
+#package_libreoffice-extension-lightproof() {
- pkgdesc="This extension creates smart-looking database reports"
+# pkgdesc="Lightproof extension for LibreOffice"
+ #arch=('any')
+# depends=('libreoffice')
+# groups=('libreoffice-extensions')
+
+# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Lightproof.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/lightproof
+#}
+
+#package_libreoffice-extension-mysql-connector() {
+
+# pkgdesc="MySQL Connector extension for LibreOffice"
+ #arch=('any')
+# depends=('libreoffice')
+# groups=('libreoffice-extensions')
+
+# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Mysql-connector.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/mysql-connector
+#}
+
+package_libreoffice-extension-nlpsolver() {
+
+ pkgdesc="This extension integrates into Calc and offers new Solver engines to use for optimizing nonlinear programming models"
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/report-builder
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/NLPSolver.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/nlpsolver
}
-package_libreoffice-extension-wiki-publisher() {
+package_libreoffice-extension-ct2n() {
- pkgdesc="This extension enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language"
+ pkgdesc="This extension enables you to convert text-cells in Calc with numbers and dates, to real numbers and dates."
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/wiki-publisher.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/wiki-publisher.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/wiki-publisher
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/ConvertTextToNumber.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/ct2n
}
-package_libreoffice-extension-ct2n() {
+package_libreoffice-extension-numbertext() {
- pkgdesc="This extension enables you to convert text-cells in Calc with numbers and dates, to real numbers and dates."
+ pkgdesc="NUMBERTEXT/MONEYTEXT extensions"
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/ConvertTextToNumber-1.3.2.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/ConvertTextToNumber.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/ct2n
+ unzip -q ${srcdir}/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/numbertext
}
-package_libreoffice-extension-hunart() {
+package_libreoffice-extension-oooblogger() {
- pkgdesc="Hungarian cross-reference toolbar extension"
+ pkgdesc="An extensions for blogging"
#arch=('any')
+ depends=('libreoffice' 'coreutils')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/oooblogger
+}
+
+package_libreoffice-extension-pdfimport() {
+
+ pkgdesc="This extension allows you to import and modify PDF documents"
+ depends=('libreoffice' 'poppler')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/pdfimport
+}
+
+package_libreoffice-extension-presenter-screen() {
+
+ pkgdesc="This extension provides more control over your slide show presentation, such as the ability to see the upcoming slide, the slide notes, and a presentation timer whereas the audience see only the current slide"
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/hunart.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/hunart.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/hunart
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presenter-screen.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presenter-screen
}
-package_libreoffice-extension-numbertext() {
+package_libreoffice-extension-presentation-minimizer() {
- pkgdesc="NUMBERTEXT/MONEYTEXT extensions"
+ pkgdesc="This extension reduce the file size of the current presentation"
+ depends=('libreoffice' 'gcc-libs')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presentation-minimizer
+}
+
+package_libreoffice-extension-report-builder() {
+
+ pkgdesc="This extension creates smart-looking database reports"
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/numbertext.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/numbertext.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/numbertext
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/report-builder
}
-package_libreoffice-extension-oooblogger() {
+package_libreoffice-extension-scripting-beanshell() {
- pkgdesc="An extensions for blogging"
- #arch=('any')
+ pkgdesc="LibreOffice extension - Enables support for scripts in BeanShell"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-beanshell.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-beanshell
+}
+
+package_libreoffice-extension-scripting-javascript() {
+
+ pkgdesc="LibreOffice extension - Enables support for scripts in JavaScript"
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/oooblogger-0.1.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/oooblogger.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/oooblogger
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-javascript.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-javascript
+}
+
+package_libreoffice-extension-scripting-python() {
+
+ pkgdesc="LibreOffice extension - Enables support for scripts in Python"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-python.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-python
}
package_libreoffice-extension-typo() {
@@ -623,30 +663,39 @@ package_libreoffice-extension-typo() {
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/typo.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/typo.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
+ unzip -q ${srcdir}/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
+ chmod o+r -R ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
}
-package_libreoffice-extension-watch-window() {
+package_libreoffice-extension-validator() {
- pkgdesc="A OOo Calc extension to add a Watch Window, which keeps the value of the monitored cell on the screen."
+ pkgdesc="Validator extension for LibreOffice"
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/WatchWindow.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/WatchWindow.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/watch-window
+ unzip -q ${srcdir}/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/validator
}
-package_libreoffice-extension-diagram() {
+package_libreoffice-extension-wiki-publisher() {
- pkgdesc="An OOo Draw and Impress extension that creates your favorite diagrams with a few clicks"
+ pkgdesc="This extension enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/wiki-publisher.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/wiki-publisher
+}
+
+package_libreoffice-extension-watch-window() {
+
+ pkgdesc="A OOo Calc extension to add a Watch Window, which keeps the value of the monitored cell on the screen."
#arch=('any')
depends=('libreoffice')
groups=('libreoffice-extensions')
install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
-# unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Diagram.oxt -d ${pkgdir}/usr/lib/ooo-3.3/share/extensions/${pkgname}
- unzip ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Diagram.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/diagram
+ unzip -q ${srcdir}/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/watch-window
}
diff --git a/extra/libreoffice/buildfix_bison25.diff b/extra/libreoffice/buildfix_bison25.diff
new file mode 100644
index 000000000..869b6c81e
--- /dev/null
+++ b/extra/libreoffice/buildfix_bison25.diff
@@ -0,0 +1,23 @@
+--- connectivity/source/parse/sqlbison.y 2011-05-20 13:21:02.000000000 -0600
++++ connectivity/source/parse/sqlbison.y 2011-05-20 13:22:11.000000000 -0600
+@@ -4338,7 +4338,7 @@
+ }
+
+ // -------------------------------------------------------------------------
+-void OSQLParser::error(sal_Char *fmt)
++void OSQLParser::error(const sal_Char *fmt)
+ {
+ if(!m_sErrorMessage.getLength())
+ {
+--- connectivity/inc/connectivity/sqlparse.hxx 2011-05-20 13:23:58.000000000 -0600
++++ connectivity/inc/connectivity/sqlparse.hxx 2011-05-20 13:23:46.000000000 -0600
+@@ -233,7 +233,7 @@
+ // returns the type for a parameter in a given function name
+ static sal_Int32 getFunctionParameterType(sal_uInt32 _nTokenId,sal_uInt32 _nPos);
+
+- void error(sal_Char *fmt);
++ void error(const sal_Char *fmt);
+ int SQLlex();
+ #ifdef YYBISON
+ void setParseTree(OSQLParseNode * pNewParseTree);
+
diff --git a/extra/libreoffice/buildfix_boost.diff b/extra/libreoffice/buildfix_boost.diff
new file mode 100644
index 000000000..d8608d0d4
--- /dev/null
+++ b/extra/libreoffice/buildfix_boost.diff
@@ -0,0 +1,40 @@
+From bae4fdbd105142cd3f317445eddc826da529a732 Mon Sep 17 00:00:00 2001
+From: Caolán McNamara <caolanm@redhat.com>
+Date: Tue, 05 Apr 2011 14:07:02 +0000
+Subject: silence some more of that annoying gcc#47679
+
+---
+diff --git a/boost/boost.gcc47679.patch b/boost/boost.gcc47679.patch
+index 1c804aa..9b33a5f 100644
+--- a/boost/boost.gcc47679.patch
++++ b/boost/boost.gcc47679.patch
+@@ -36,3 +36,26 @@
+ template <int MaxDigits>
+ inline bool allow_more_digits(std::size_t i)
+ {
++--- misc/boost_1_44_0/boost/optional/optional.hpp 2011-04-05 13:19:01.223587256 +0100
+++++ misc/build/boost_1_44_0/boost/optional/optional.hpp 2011-04-05 13:19:01.223587256 +0100
++@@ -31,6 +31,8 @@
++
++ #include "boost/optional/optional_fwd.hpp"
++
+++#include <string.h>
+++
++ #if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
++ // VC6.0 has the following bug:
++ // When a templated assignment operator exist, an implicit conversion
++@@ -114,6 +116,11 @@
++
++ public:
++
+++ aligned_storage()
+++ {
+++ memset(&dummy_, 0, sizeof(dummy_));
+++ }
+++
++ void const* address() const { return &dummy_.data[0]; }
++ void * address() { return &dummy_.data[0]; }
++ } ;
+--
+cgit v0.8.3-6-g21f6
+
diff --git a/extra/libreoffice/buildfix_ct2n.diff b/extra/libreoffice/buildfix_ct2n.diff
new file mode 100644
index 000000000..979587f79
--- /dev/null
+++ b/extra/libreoffice/buildfix_ct2n.diff
@@ -0,0 +1,17 @@
+From 90de903b28cb1884042be0eae3f8a55458c5bc29 Mon Sep 17 00:00:00 2001
+From: Caolán McNamara <caolanm@redhat.com>
+Date: Tue, 12 Apr 2011 19:35:51 +0000
+Subject: duplicate NULLs
+
+---
+diff --git a/ct2n/prj/build.lst b/ct2n/prj/build.lst
+index 91f44b7..714d926 100644
+--- a/ct2n/prj/build.lst
++++ b/ct2n/prj/build.lst
+@@ -1,3 +1,3 @@
+-ct2n ct2n : solenv NULL NULL
++ct2n ct2n : solenv NULL
+ ct2n ct2n usr1 - all ct2n_mkout NULL
+ ct2n ct2n nmake - all ct2n_ct2n NULL
+--
+cgit v0.8.3-6-g21f6
diff --git a/extra/libreoffice/buildfix_i116795.diff b/extra/libreoffice/buildfix_i116795.diff
new file mode 100644
index 000000000..8601bc164
--- /dev/null
+++ b/extra/libreoffice/buildfix_i116795.diff
@@ -0,0 +1,22 @@
+diff -r 4ab9e11cb892 connectivity/qa/makefile.mk
+--- a/connectivity/qa/makefile.mk Thu Mar 03 15:22:23 2011 +0100
++++ b/connectivity/qa/makefile.mk Fri Mar 04 09:51:48 2011 +0100
+@@ -35,9 +35,16 @@
+
+ #----- compile .java files -----------------------------------------
+
+-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar hsqldb.jar
+ JAVAFILES := $(shell @$(FIND) complex -name "*.java")
+
++JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
++
++.IF "$(SYSTEM_HSQLDB)" == "YES"
++EXTRAJARFILES = $(HSQLDB_JAR)
++.ELSE
++JARFILES += hsqldb.jar
++.ENDIF
++
+ #----- make a jar from compiled files ------------------------------
+
+ JARCLASSDIRS = $(PACKAGE)
+
diff --git a/extra/libreoffice/vbahelper.visibility.patch b/extra/libreoffice/vbahelper.visibility.patch
new file mode 100644
index 000000000..5739100d0
--- /dev/null
+++ b/extra/libreoffice/vbahelper.visibility.patch
@@ -0,0 +1,33 @@
+--- vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:27:51.507604173 +0000
++++ vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:28:26.230045727 +0000
+@@ -238,7 +238,7 @@
+
+ // including a HelperInterface implementation
+ template< typename Ifc1 >
+-class ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
++class VBAHELPER_DLLPUBLIC ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
+ {
+ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseColBase;
+ protected:
+--- sc/Library_vbaobj.mk
++++ sc/Library_vbaobj.mk
+@@ -118,7 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
+ sc/source/ui/vba/vbaquerytable \
+ sc/source/ui/vba/vbarange \
+ sc/source/ui/vba/vbasheetobject \
+- sc/source/ui/vba/vbasheetobjects \
+ sc/source/ui/vba/vbastyle \
+ sc/source/ui/vba/vbastyles \
+ sc/source/ui/vba/vbatextboxshape \
+@@ -133,6 +132,11 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
+ sc/source/ui/vba/vbawsfunction \
+ ))
+
++$(eval $(call gb_Library_add_cxxobjects,vbaobj,\
++ sc/source/ui/vba/vbasheetobjects \
++ , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
++))
++
+ ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
+ $(eval $(call gb_Library_set_ldflags,vbaobj,\
+ $$(LDFLAGS) \
diff --git a/extra/libssh/PKGBUILD b/extra/libssh/PKGBUILD
index 903f86c49..d9c8031e0 100644
--- a/extra/libssh/PKGBUILD
+++ b/extra/libssh/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 107427 2011-01-24 20:24:15Z andrea $
+# $Id: PKGBUILD 126134 2011-06-01 18:06:44Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: ice-man <icemanf@gmail.com>
# Contributor: sergeantspoon <sergeantspoon@archlinux.us>
pkgname=libssh
-pkgver=0.4.8
+pkgver=0.5.0
pkgrel=1
pkgdesc="Library for accessing ssh client services through C libraries"
url="http://www.libssh.org/"
@@ -12,11 +12,11 @@ license=('LGPL')
arch=('i686' 'x86_64' 'mips64el')
depends=('openssl')
makedepends=('cmake' 'doxygen')
-source=("http://www.libssh.org/files/0.4/${pkgname}-${pkgver}.tar.gz")
-md5sums=('d97b3feea1abe047ca8cf86d06e4b789')
+source=("http://www.libssh.org/files/0.5/${pkgname}-${pkgver}.tar.gz")
+md5sums=('9b37f45751c0ae7ba66099c1fb136946')
build() {
- cd ${srcdir}
+ cd "${srcdir}"
mkdir build
cd build
cmake ../${pkgname}-${pkgver} \
@@ -26,6 +26,6 @@ build() {
}
package(){
- cd ${srcdir}/build
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/mercurial/PKGBUILD b/extra/mercurial/PKGBUILD
index bf364d44a..a6d473f40 100644
--- a/extra/mercurial/PKGBUILD
+++ b/extra/mercurial/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 122137 2011-05-02 10:27:04Z giovanni $
+# $Id: PKGBUILD 126289 2011-06-04 09:29:40Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=mercurial
-pkgver=1.8.3
+pkgver=1.8.4
pkgrel=1
pkgdesc="A scalable distributed SCM tool"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,7 +13,7 @@ depends=('python2')
optdepends=('tk: for the hgk GUI')
source=(http://www.selenic.com/mercurial/release/${pkgname}-${pkgver}.tar.gz
mercurial.profile)
-md5sums=('7afea936dfdb21220064cac6402f8743'
+md5sums=('b3dcc3de473e003dd1cc0500dcd9de47'
'43e1d36564d4c7fbe9a091d3ea370a44')
build() {
diff --git a/extra/mysql/PKGBUILD b/extra/mysql/PKGBUILD
index 6f4d6c974..ee78f3d3c 100644
--- a/extra/mysql/PKGBUILD
+++ b/extra/mysql/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 122912 2011-05-07 10:07:11Z andrea $
+# $Id: PKGBUILD 126056 2011-06-01 08:38:57Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgbase=mysql
pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
-pkgver=5.5.12
+pkgver=5.5.13
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
@@ -15,7 +15,7 @@ options=('!libtool')
source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/${pkgbase}-${pkgver}.tar.gz"
'mysqld'
'my.cnf')
-md5sums=('53d31a0b24f3eb3176185090eff129b9'
+md5sums=('f0e519e90ee7c00fceb0730edf859d7b'
'2234207625baa29b2ff7d7b4f088abce'
'1c949c0dbea5206af0db14942d9927b6')
@@ -31,8 +31,13 @@ build() {
cmake ../${pkgbase}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMANUFACTURER="Arch Linux" \
-DSYSCONFDIR=/etc/mysql \
+ -DMYSQL_DATADIR=/var/lib/mysql \
+ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
-DINSTALL_INFODIR=share/mysql/docs \
-DINSTALL_MANDIR=share/man \
-DINSTALL_PLUGINDIR=/usr/lib/mysql/plugin \
@@ -41,23 +46,21 @@ build() {
-DINSTALL_DOCREADMEDIR=share/mysql \
-DINSTALL_SUPPORTFILESDIR=share/mysql \
-DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_DOCDIR=share/mysql/docs \
-DINSTALL_SHAREDIR=share/mysql \
-DWITH_READLINE=ON \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
-DWITH_LIBWRAP=ON \
- -DDEFAULT_CHARSET=utf8 \
- -DDEFAULT_COLLATION=utf8_general_ci \
+ -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \
-DWITH_EXTRA_CHARSETS=complex \
-DWITH_EMBEDDED_SERVER=ON \
- -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \
- -DENABLED_LOCAL_INFILE=ON \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \
-DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
- -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
make
}
@@ -71,11 +74,11 @@ package_libmysqlclient(){
make -C ${dir} DESTDIR="${pkgdir}" install
done
- install -d "${pkgdir}/usr/bin"
- install -m755 scripts/mysql_config "${pkgdir}/usr/bin/"
- install -d "${pkgdir}/usr/share/man/man1"
+ install -d "${pkgdir}"/usr/bin
+ install -m755 scripts/mysql_config "${pkgdir}"/usr/bin/
+ install -d "${pkgdir}"/usr/share/man/man1
for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do
- install -m644 "${srcdir}/${pkgbase}-${pkgver}/man/$man.1" "${pkgdir}/usr/share/man/man1/$man.1"
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
done
}
@@ -87,9 +90,9 @@ package_mysql-clients(){
make -C client DESTDIR="${pkgdir}" install
# install man pages
- install -d "${pkgdir}/usr/share/man/man1"
+ install -d "${pkgdir}"/usr/share/man/man1
for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap; do
- install -m644 "${srcdir}/${pkgbase}-${pkgver}/man/$man.1" "${pkgdir}/usr/share/man/man1/$man.1"
+ install -m644 "${srcdir}"/${pkgbase}-${pkgver}/man/$man.1 "${pkgdir}"/usr/share/man/man1/$man.1
done
# provided by mysql
@@ -104,28 +107,24 @@ package_mysql(){
optdepends=('perl-dbi' 'perl-dbd-mysql')
cd "${srcdir}"/build
- make DESTDIR=${pkgdir} install
+ make DESTDIR="${pkgdir}" install
- install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf
- install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld
+ install -Dm644 "${srcdir}"/my.cnf "${pkgdir}"/etc/mysql/my.cnf
+ install -Dm755 "${srcdir}"/mysqld "${pkgdir}"/etc/rc.d/mysqld
# provided by libmysqlclient
- rm ${pkgdir}/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
- rm ${pkgdir}/usr/lib/libmysql*
- rm -r ${pkgdir}/usr/include/
- rm ${pkgdir}/usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
+ rm "${pkgdir}"/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
+ rm "${pkgdir}"/usr/lib/libmysql*
+ rm -r "${pkgdir}"/usr/include/
+ rm "${pkgdir}"/usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
# provided by mysql-clients
- rm ${pkgdir}/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
- rm ${pkgdir}/usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
+ rm "${pkgdir}"/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
+ rm "${pkgdir}"/usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
# not needed
- rm -r ${pkgdir}/usr/{mysql-test,sql-bench}
-
- # These shouldn't be here
- rm -r ${pkgdir}/usr/docs
- install -d ${pkgdir}/var/lib/mysql
- cp -r ${pkgdir}/usr/data/* ${pkgdir}/var/lib/mysql/
- chmod -R 700 ${pkgdir}/var/lib/mysql
- rm -r ${pkgdir}/usr/data
+ rm -r "${pkgdir}"/usr/{data,mysql-test,sql-bench}
+ rm "${pkgdir}"/usr/share/man/man1/mysql-test-run.pl.1
+
+ install -dm700 "${pkgdir}"/var/lib/mysql
}
diff --git a/extra/openjdk6/PKGBUILD b/extra/openjdk6/PKGBUILD
index f9597b6e7..2efd6ec0e 100644
--- a/extra/openjdk6/PKGBUILD
+++ b/extra/openjdk6/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 117753 2011-04-04 17:40:52Z andyrtr $
+# $Id: PKGBUILD 126340 2011-06-04 23:48:31Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
@@ -11,7 +11,7 @@ _openjdk_version=b22
_openjdk_date=28_feb_2011
#pkgver=${_javaver}.${_openjdk_version}_0.hg_${_date}
pkgver=${_javaver}.${_openjdk_version}_${_icedteaver}
-pkgrel=1
+pkgrel=2
url='http://icedtea.classpath.org'
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
@@ -27,7 +27,6 @@ source=(http://icedtea.classpath.org/download/source/icedtea6-${_icedteaver}.tar
https://jax-ws.dev.java.net/files/documents/4202/150725/jdk6-jaf-b20.zip
fix_jdk_cmds_path.diff
fix_corba_cmds_path.diff
- aatext_by_default.diff
fontconfig-paths.diff
nonreparenting-wm.diff
openjdk6.profile
@@ -40,7 +39,6 @@ md5sums=('f3b31b9f591afc752372addacb1eb335'
'bc95c133620bd68c161cac9891592901'
'5da3e39fa60985576c4f37d1491efbe2'
'f7e7a212e50abb56a6ef1a2b1bd27405'
- 'ef60d567c0d9bad111212851220deafd'
'ee1afda124d5927345014ab382ef581e'
'409812b5675f9678b1c9e1a12a945a9a'
'74c4a7adc782edd087802bf92ae3d6d0'
@@ -76,7 +74,7 @@ build() {
autoreconf -i
- export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/aatext_by_default.diff patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/nonreparenting-wm.diff"
+ export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/nonreparenting-wm.diff"
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
diff --git a/extra/raptor/PKGBUILD b/extra/raptor/PKGBUILD
index c41f00a3f..a2f657246 100644
--- a/extra/raptor/PKGBUILD
+++ b/extra/raptor/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 115794 2011-03-21 16:03:23Z andyrtr $
+# $Id: PKGBUILD 126317 2011-06-04 16:06:41Z andyrtr $
# Maintainer: Andreas Radke <andyrtr at archlinux.org>
# Contributor: eric <eric@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
pkgname=raptor
-pkgver=2.0.2
+pkgver=2.0.3
pkgrel=1
pkgdesc="A C library that parses RDF/XML/N-Triples into RDF triples"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,7 +13,7 @@ depends=('libxml2>=2.7.8' 'curl>=7.21.2' 'zlib>=1.2.5' 'libxslt>=1.1.26')
license=('LGPL')
options=('!libtool')
source=(http://librdf.org/dist/source/raptor2-$pkgver.tar.gz)
-md5sums=('b0f874c200c4b3214b5bf4806ae82353')
+md5sums=('46eff4b20f8752d1146a3e0c8b2168dd')
build() {
cd ${srcdir}/raptor2-${pkgver}
diff --git a/extra/strigi/PKGBUILD b/extra/strigi/PKGBUILD
index 8ab7b13b9..0e4d8c663 100644
--- a/extra/strigi/PKGBUILD
+++ b/extra/strigi/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 118083 2011-04-05 10:45:28Z andrea $
+# $Id: PKGBUILD 126247 2011-06-02 22:55:44Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=strigi
-pkgver=git20110405
+pkgver=0.7.5
pkgrel=1
pkgdesc="Fast crawling desktop search engine with Qt4 GUI"
arch=('i686' 'x86_64' 'mips64el')
@@ -11,8 +11,8 @@ url="http://www.vandenoever.info/software/strigi/"
license=('GPL2')
depends=('qt' 'clucene' 'bzip2' 'exiv2' 'libxml2')
makedepends=('cmake' 'pkg-config')
-source=("ftp://ftp.archlinux.org/other/kde/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('dcc88c925c5ad264429ba841cab19b65')
+source=("http://www.vandenoever.info/software/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('0559e2ab65d187d30916e9ffe36e0fb6')
options=('!libtool')
build() {
diff --git a/extra/subversion/PKGBUILD b/extra/subversion/PKGBUILD
index 2c1259d85..98b02299e 100644
--- a/extra/subversion/PKGBUILD
+++ b/extra/subversion/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 121110 2011-04-29 01:29:30Z stephane $
+# $Id: PKGBUILD 126235 2011-06-02 19:57:23Z stephane $
# Maintainer: Paul Mattal <paul@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>
pkgname=subversion
-pkgver=1.6.15
+pkgver=1.6.17
pkgrel=2
pkgdesc="Replacement for CVS, another versioning system (SVN)"
arch=('i686' 'x86_64' 'mips64el')
@@ -14,7 +14,7 @@ makedepends=('krb5' 'apache' 'python2' 'perl' 'swig'
source=(http://subversion.tigris.org/downloads/$pkgname-$pkgver.tar.bz2
svnserve svn svnserve.conf svnmerge.py
subversion.rpath.fix.patch
- subversion.suppress.deprecation.warnings.patch)
+ subversion.suppress.deprecation.warnings.patch)
backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
url="http://subversion.apache.org/"
@@ -23,13 +23,13 @@ options=('!makeflags' '!libtool')
optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
export PYTHON=/usr/bin/python2
# apply patches
- patch -p0 < $srcdir/subversion.rpath.fix.patch
- patch -p1 -i $srcdir/subversion.suppress.deprecation.warnings.patch
+ patch -Np0 -i ../subversion.rpath.fix.patch
+ patch -Np1 -i ../subversion.suppress.deprecation.warnings.patch
# configure
autoreconf
@@ -42,8 +42,14 @@ build() {
(make external-all && make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all )
}
+#check() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# export LANG=C LC_ALL=C
+# make check check-swig-pl check-swig-py CLEANUP=yes
+#}
+
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
# install
export LD_LIBRARY_PATH=${pkgdir}/usr/lib:$LD_LIBRARY_PATH
@@ -83,7 +89,7 @@ package() {
install -Dm 644 ${srcdir}/${pkgname}-${pkgver}/tools/client-side/bash_completion \
${pkgdir}/etc/bash_completion.d/subversion
}
-md5sums=('113fca1d9e4aa389d7dc2b210010fa69'
+md5sums=('81e5dc5beee4b3fc025ac70c0b6caa14'
'a2b029e8385007ffb99b437b30521c90'
'a0db6dd43af33952739b6ec089852630'
'c459e299192552f61578f3438abf0664'
diff --git a/extra/telepathy-gabble/PKGBUILD b/extra/telepathy-gabble/PKGBUILD
index 47e5961f1..1c4195661 100644
--- a/extra/telepathy-gabble/PKGBUILD
+++ b/extra/telepathy-gabble/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 120355 2011-04-22 18:03:17Z ibiru $
+# $Id: PKGBUILD 126264 2011-06-03 13:39:35Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Daniel Balieiro <daniel@balieiro.com>
# Contributor: Rodrigo L. M. Flores <mail@rodrigoflores.org>
pkgname=telepathy-gabble
-pkgver=0.12.0
-pkgrel=2
+pkgver=0.12.1
+pkgrel=1
pkgdesc="A Jabber/XMPP connection manager for Telepathy"
arch=('i686' 'x86_64' 'mips64el')
url="http://telepathy.freedesktop.org"
@@ -15,7 +15,7 @@ makedepends=('libxslt' 'python2')
options=('!libtool')
source=(http://telepathy.freedesktop.org/releases/telepathy-gabble/${pkgname}-${pkgver}.tar.gz)
install=telepathy-gabble.install
-md5sums=('89e47b131911a969cc2a2ccefa1fc015')
+md5sums=('9bf48f34651545547f52712b3c117aa9')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/extra/telepathy-glib/PKGBUILD b/extra/telepathy-glib/PKGBUILD
index 024b5df26..f37422b8e 100644
--- a/extra/telepathy-glib/PKGBUILD
+++ b/extra/telepathy-glib/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 124130 2011-05-16 17:05:51Z ibiru $
+# $Id: PKGBUILD 126144 2011-06-01 19:05:33Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com
# Contributor: Bjorn Lindeijer <bjorn lindeijer nl>
pkgname=telepathy-glib
-pkgver=0.14.6
+pkgver=0.14.7
pkgrel=1
pkgdesc="GLib bindings for the Telepathy D-Bus protocol"
arch=('i686' 'x86_64' 'mips64el')
@@ -14,7 +14,7 @@ options=('!libtool' '!emptydirs')
depends=('dbus-glib')
makedepends=('libxslt' 'vala' 'gobject-introspection')
source=("http://telepathy.freedesktop.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('ab8cf90283ef3382de1d20d87c9d970a')
+md5sums=('3230f7389cd3a0ebe4436eb1f7e40c18')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/telepathy-qt4/PKGBUILD b/extra/telepathy-qt4/PKGBUILD
index 42f52fb2b..1569d216e 100644
--- a/extra/telepathy-qt4/PKGBUILD
+++ b/extra/telepathy-qt4/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 124315 2011-05-19 11:49:47Z andrea $
+# $Id: PKGBUILD 126269 2011-06-03 14:35:07Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=telepathy-qt4
-pkgver=0.6.0
+pkgver=0.6.1
pkgrel=1
pkgdesc="A library for Qt-based Telepathy clients"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,7 +13,7 @@ options=('!libtool')
depends=('qt' 'telepathy-farsight')
makedepends=('libxslt' 'python2' 'cmake')
source=("http://telepathy.freedesktop.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('2acb266af1a3f55f7104830ac8db2090')
+md5sums=('c429458a365f5114bbc9ea3fc971fc45')
build() {
cd "${srcdir}"
diff --git a/extra/v4l-utils/PKGBUILD b/extra/v4l-utils/PKGBUILD
index 8a176f2bf..7fd6833d9 100644
--- a/extra/v4l-utils/PKGBUILD
+++ b/extra/v4l-utils/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 125773 2011-05-29 13:34:22Z thomas $
+# $Id: PKGBUILD 126185 2011-06-02 11:28:46Z thomas $
# Maintainer: Thomas Bächler <thomas@archlinux.org>
pkgname=v4l-utils
-pkgver=0.8.3
-pkgrel=2
+pkgver=0.8.4
+pkgrel=1
pkgdesc="Userspace tools and conversion library for Video 4 Linux"
arch=('i686' 'x86_64' 'mips64el')
url="http://freshmeat.net/projects/libv4l"
@@ -12,9 +12,9 @@ conflicts=('libv4l')
license=('LGPL')
makedepends=('qt')
optdepends=('qt')
-depends=('glibc' 'gcc-libs' 'sysfsutils')
+depends=('glibc' 'gcc-libs' 'sysfsutils' 'libjpeg-turbo')
source=(http://linuxtv.org/downloads/v4l-utils/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('525ebed7ef6e0f6a4bb68fe10403a3725eb1ec31a4c557c68256079b00e283b5')
+sha256sums=('20bf73b0c2255dfc6ae82806ec8a663e00ab039df9ee6eadae633466841c0dd7')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -28,7 +28,4 @@ package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make install PREFIX="/usr" DESTDIR="${pkgdir}/"
rm -f "${pkgdir}/usr/bin/ivtv-ctl"
- # Fix udev rule location
- mkdir -p "${pkgdir}/lib"
- mv "${pkgdir}/etc/udev" "${pkgdir}/lib"
}
diff --git a/extra/vala/PKGBUILD b/extra/vala/PKGBUILD
index 165f3adf2..0f630f676 100644
--- a/extra/vala/PKGBUILD
+++ b/extra/vala/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 117513 2011-04-04 09:41:11Z ibiru $
+# $Id: PKGBUILD 126139 2011-06-01 18:48:36Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Timm Preetz <timm@preetz.us>
pkgname=vala
-pkgver=0.12.0
+pkgver=0.12.1
pkgrel=1
pkgdesc="Compiler for the GObject type system"
arch=('i686' 'x86_64' 'mips64el')
@@ -12,8 +12,8 @@ license=('LGPL')
depends=('glib2')
makedepends=('libxslt')
options=('!libtool')
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.12/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('9a398e16fba2c78c9bcadb05e489c9bc318e34901d43451ac5d2ce4bc46b1225')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.12/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('f102bb64549ebe88955bb9fa0f502d974413aec71fec88e3544c65adfeb0afb4')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/vlc/PKGBUILD b/extra/vlc/PKGBUILD
index 9f5d53e16..330a34938 100644
--- a/extra/vlc/PKGBUILD
+++ b/extra/vlc/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 125719 2011-05-28 14:45:23Z giovanni $
+# $Id: PKGBUILD 126365 2011-06-05 01:44:34Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>
pkgname=vlc
pkgver=1.1.9
-pkgrel=2
+pkgrel=4
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
arch=('i686' 'x86_64')
url="http://www.videolan.org/vlc/"
diff --git a/extra/wireshark/PKGBUILD b/extra/wireshark/PKGBUILD
index a83355164..5181428a6 100644
--- a/extra/wireshark/PKGBUILD
+++ b/extra/wireshark/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 121168 2011-04-29 06:39:53Z stephane $
+# $Id: PKGBUILD 126090 2011-06-01 11:36:55Z guillaume $
# Maintainer: Guillaume ALAUX <guillaume at alaux dot net>
# Contributor: Florian Pritz <bluewind at jabber dot ccc dot de>
pkgname=(wireshark-cli wireshark-gtk)
pkgbase=wireshark
-pkgver=1.4.6
-pkgrel=2
+pkgver=1.4.7
+pkgrel=1
arch=('i686' 'x86_64')
license=('GPL2')
makedepends=('bison' 'flex' 'gtk2' 'krb5' 'libpcap' 'bash' 'gnutls' 'libcap')
url="http://www.wireshark.org/"
options=(!libtool)
source=(http://www.wireshark.org/download/src/${pkgbase}-${pkgver}.tar.bz2)
-md5sums=('fd301004ebc5fac8e56c2f0d4ef6173f')
+md5sums=('b5065426d5524ddc1667314f8256c2b1')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
diff --git a/extra/xfce4-xkb-plugin/PKGBUILD b/extra/xfce4-xkb-plugin/PKGBUILD
index eb5d3e5be..df9b426b5 100644
--- a/extra/xfce4-xkb-plugin/PKGBUILD
+++ b/extra/xfce4-xkb-plugin/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 120152 2011-04-20 16:40:20Z andyrtr $
+# $Id: PKGBUILD 126312 2011-06-04 15:24:03Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
pkgname=xfce4-xkb-plugin
-pkgver=0.5.4.0
+pkgver=0.5.4.1
pkgrel=1
pkgdesc="plugin to switch keyboard layouts for the Xfce4 panel"
arch=(i686 x86_64 'mips64el')
@@ -14,7 +14,7 @@ depends=('xfce4-panel' 'libxklavier>=5.0' 'librsvg')
makedepends=('intltool')
options=('!libtool')
source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.5/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('3ea1efe366367af660e6e1d24a240b5f')
+md5sums=('8512c0b180004e1150d8c05255c202d8')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/extra/xvidcore/PKGBUILD b/extra/xvidcore/PKGBUILD
index a6db80062..360ddd8aa 100644
--- a/extra/xvidcore/PKGBUILD
+++ b/extra/xvidcore/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 119595 2011-04-12 15:34:48Z eric $
+# $Id: PKGBUILD 126345 2011-06-04 23:54:53Z eric $
# Maintainer: tobias <tobias@archlinux.org>
# Contributor: Sarah Hay <sarah@archlinux.org>
pkgname=xvidcore
-pkgver=1.3.1
+pkgver=1.3.2
pkgrel=1
pkgdesc="XviD is an open source MPEG-4 video codec"
-arch=('i686' 'x86_64' 'mips64el')
-license=('GPL')
+arch=('i686' 'x86_64')
url="http://www.xvid.org/"
+license=('GPL')
depends=('glibc')
makedepends=('nasm')
source=(http://downloads.xvid.org/downloads/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('5b1c7032809bef6fa11eb3f4fbcf78e4')
-sha1sums=('15acd3bbd4ddd39ffec7bc14f7cc2c9fe08e01c3')
+md5sums=('34389e980d4f849688f8b1e168f4e2f9')
+sha1sums=('74f9ce9c1bebcc9806bf21cb53274b8102700309')
build() {
cd "${srcdir}/${pkgname}/build/generic"
diff --git a/extra/zsh/PKGBUILD b/extra/zsh/PKGBUILD
index 365946a72..623baa922 100644
--- a/extra/zsh/PKGBUILD
+++ b/extra/zsh/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 114633 2011-03-14 21:00:40Z pierre $
+# $Id: PKGBUILD 126178 2011-06-02 11:13:57Z pierre $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=zsh
-pkgver=4.3.11
-pkgrel=2
+pkgver=4.3.12
+pkgrel=1
pkgdesc='A very advanced and programmable command interpreter (shell) for UNIX'
arch=('i686' 'x86_64' 'mips64el')
url='http://www.zsh.org/'
@@ -11,7 +11,7 @@ license=('custom')
depends=('pcre' 'libcap' 'gdbm')
install=zsh.install
source=("ftp://ftp.zsh.org/pub/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('3225c7f53b69f395e95723585d6785ed')
+md5sums=('7a82c0bf0635e046ca4e9ec1bdef3811')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -32,6 +32,8 @@ build() {
--with-term-lib='ncursesw' \
--enable-multibyte \
--enable-function-subdirs \
+ --enable-fndir=/usr/share/zsh/functions \
+ --enable-scriptdir=/usr/share/zsh/scripts \
--with-tcsetpgrp \
--enable-pcre \
--enable-cap \
@@ -39,6 +41,13 @@ build() {
make
}
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # This test wont work with the noatime mount option
+ rm Test/C02cond.ztst
+ HOME="${srcdir}" make check
+}
+
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" install
diff --git a/libre/abuse-libre/PKGBUILD b/libre/abuse-libre/PKGBUILD
new file mode 100644
index 000000000..d8e5d8e4f
--- /dev/null
+++ b/libre/abuse-libre/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 46622 2011-05-10 10:00:25Z lfleischer $
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: jlvsimoes <jlvsimoes@oninet.pt>
+# Contributor: kevin <kevin@archlinux.org>
+
+pkgname=abuse-libre
+pkgver=0.8
+pkgrel=1
+pkgdesc='A side-scroller action game that pits you against ruthless alien killers. Without unfree "Claudio"'
+arch=('i686' 'x86_64')
+url='http://abuse.zoy.org/'
+license=('GPL' 'custom:PublicDomain')
+depends=('gcc-libs' 'libgl' 'sdl' 'sdl_mixer')
+install='abuse.install'
+source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.gz")
+
+# Remove the unfree 'claudio' addon
+# $ source PKGBUILD
+# $ mksource
+mksource() {
+ pushd /tmp >/dev/null
+
+ wget http://abuse.zoy.org/raw-attachment/wiki/download/${pkgname%-libre}-${pkgver}.tar.gz \
+ -O - | tar xzf -
+
+ rm -rvf ./abuse-$pkgver/data/addon/claudio
+ tar czvf ${pkgname}-${pkgver}.tar.gz ./abuse-$pkgver
+
+ popd >/dev/null
+
+ mv -v /tmp/${pkgname}-${pkgver}.tar.gz .
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr --with-assetdir=/usr/share/abuse/orig --with-x
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -d "${pkgdir}/usr/share/licenses/abuse"
+ sed -n '1,/^$/p' src/view.cpp > "${pkgdir}/usr/share/licenses/abuse/orig.code.license"
+}
+
+md5sums=('10cac59308bff0dadb8437eff8b4d87e')
diff --git a/libre/abuse-libre/abuse.install b/libre/abuse-libre/abuse.install
new file mode 100644
index 000000000..ca888f196
--- /dev/null
+++ b/libre/abuse-libre/abuse.install
@@ -0,0 +1,14 @@
+# arg 1: the new package version
+post_install() {
+# echo "If you get a BOSS_ANT error trying to run abuse, copy /usr/share/games/abuse/gamma.lsp to ~/.abuse"
+ echo "Abuse uses the original game levels by default. To use the frabs levels"
+ echo "use '-datadir' or set 'datadir' in the abuserc to /usr/share/abuse/frabs"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+}
+
+
diff --git a/libre/abuse-libre/rePKGBUILD b/libre/abuse-libre/rePKGBUILD
new file mode 100644
index 000000000..3c9a0082d
--- /dev/null
+++ b/libre/abuse-libre/rePKGBUILD
@@ -0,0 +1,33 @@
+# This is an example rePKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar>
+source PKGBUILD
+CARCH=x86_64
+unset build package md5sums source
+_repo=community
+options=(!strip)
+source=(PKGBUILD
+ http://mirrors.kernel.org/archlinux/${_repo}/os/$CARCH/${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT
+ # files for pkg modifications
+ )
+
+build() {
+ cd "${srcdir}/"
+ rm -v .{INSTALL,PKGINFO} ${pkgname%-libre}-$pkgver-$pkgrel-$CARCH.pkg.tar.xz
+ # actions for package modifications
+ # be sure to remove source files
+
+ msg "Removing unfree 'Claudio' addon"
+ rm -rvf usr/share/abuse/orig/addon/claudio/
+}
+
+package() {
+ cd ${srcdir}
+ cp -a ./* ${pkgdir}
+}
+
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/initscripts/PKGBUILD b/libre/initscripts/PKGBUILD
index 63a7c1545..5fe5f654f 100644
--- a/libre/initscripts/PKGBUILD
+++ b/libre/initscripts/PKGBUILD
@@ -5,7 +5,7 @@
# Maintainer (Parabola): Nicolas Reynolds <fauno@kiwwwi.com.ar>
pkgname=initscripts
-pkgver=2011.05.2
+pkgver=2011.06.1
pkgrel=1.1
pkgdesc="System initialization/bootup scripts (Parabola branding)"
arch=('i686' 'x86_64')
@@ -21,8 +21,6 @@ optdepends=('bridge-utils: Network bridging support'
install=initscripts.install
source=("https://projects.parabolagnulinux.org/initscripts.git/snapshot/initscripts-${pkgver}.tar.bz2"
'wireless.conf.d')
-md5sums=('f807b43a4dd43a6cf562f10651577ad2'
- '027576534885b8d5dded9be546057b12')
package() {
cd ${srcdir}/${pkgname}-${pkgver}
diff --git a/libre/kernel26-libre/PKGBUILD b/libre/kernel26-libre/PKGBUILD
index d109f8b94..2f4c7961d 100644
--- a/libre/kernel26-libre/PKGBUILD
+++ b/libre/kernel26-libre/PKGBUILD
@@ -6,10 +6,11 @@ pkgname=('kernel26-libre' 'kernel26-libre-headers' 'kernel26-libre-docs') # Buil
_kernelname=${pkgname#kernel26-libre}
_basekernel=2.6.39
-pkgver=${_basekernel}
+pkgver=${_basekernel}.1
pkgrel=1
makedepends=('xmlto' 'docbook-xsl')
-_patchname="patch-${pkgver}-${pkgrel}-LIBRE"
+#_patchname="patch-${pkgver}-${pkgrel}-LIBRE"
+_patchname="patch-2.6.39-1-LIBRE"
arch=(i686 x86_64)
license=('GPL2')
url="http://linux-libre.fsfla.org/"
@@ -256,7 +257,7 @@ find $pkgdir -type d -exec chmod 755 {} \;
# remove a file already in kernel26 package
rm -f $pkgdir/usr/src/linux-$_kernver/Documentation/DocBook/Makefile
}
-md5sums=('8feab9fb6c177052cb79248a223fbf66'
+md5sums=('923210b0c4190733bf314e48f588c112'
'abad63eab1f9485f6b1af76f5109f1e4'
'5d40a23419b48f5b49f1f10be0e733c3'
'af5937ac06a78907ceb499351bdff7ab'
diff --git a/libre/libretools/PKGBUILD b/libre/libretools/PKGBUILD
index 55b4faa8c..287c61523 100644
--- a/libre/libretools/PKGBUILD
+++ b/libre/libretools/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=libretools
pkgver=$(date -u +%Y%m%d)
-pkgrel=1.3
+pkgrel=1
pkgdesc="Scripts for easing Parabola's tasks"
arch=('any')
url="http://parabolagnulinux.org"
diff --git a/libre/libretools/libretools.install b/libre/libretools/libretools.install
index a44bb79d1..f8f447e2f 100644
--- a/libre/libretools/libretools.install
+++ b/libre/libretools/libretools.install
@@ -1,4 +1,3 @@
-
# arg 1: the new package version
post_install() {
cat <<EOF
@@ -13,8 +12,9 @@ post_upgrade() {
cat <<EOF
Check your /etc/libretools.conf
-Make sure extra is before community on your REPOS array
-in /etc/libretools.conf
+Your REPOS array if using fullpkg should be:
+'core' 'extra' 'community' 'libre'
+
EOF
}
diff --git a/staging/boost/4994-compile-fix-for-Python32-v2.patch b/staging/boost/4994-compile-fix-for-Python32-v2.patch
new file mode 100644
index 000000000..22613b3f2
--- /dev/null
+++ b/staging/boost/4994-compile-fix-for-Python32-v2.patch
@@ -0,0 +1,16 @@
+Index: libs/python/src/converter/builtin_converters.cpp
+===================================================================
+--- libs/python/src/converter/builtin_converters.cpp (revision 67279)
++++ libs/python/src/converter/builtin_converters.cpp (working copy)
+@@ -431,7 +431,11 @@
+ if (!result.empty())
+ {
+ int err = PyUnicode_AsWideChar(
++#if PY_VERSION_HEX >= 0x03020000
++ intermediate
++#else
+ (PyUnicodeObject *)intermediate
++#endif
+ , &result[0]
+ , result.size());
+
diff --git a/staging/boost/PKGBUILD b/staging/boost/PKGBUILD
new file mode 100644
index 000000000..9329f188a
--- /dev/null
+++ b/staging/boost/PKGBUILD
@@ -0,0 +1,112 @@
+# $Id: PKGBUILD 126149 2011-06-01 20:01:54Z ibiru $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Kritoke <kritoke@gamebox.net>
+# Contributor: Luca Roccia <little_rock@users.sourceforge.net>
+
+pkgbase=boost
+pkgname=('boost-libs' 'boost')
+pkgver=1.46.1
+_boostver=${pkgver//./_}
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.boost.org/"
+makedepends=('icu' 'python' 'python2' 'bzip2' 'zlib' 'openmpi')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}_${_boostver}.tar.gz
+ 4994-compile-fix-for-Python32-v2.patch
+ boost-1.46.0-spirit.patch)
+license=('custom')
+md5sums=('341e5d993b19d099bf1a548495ea91ec'
+ 'cb59e8adbf2a45ef9264a2f4ab92b849'
+ '9d6e2f13fef23bf27d7bdddc104e182a')
+
+_stagedir="${srcdir}/stagedir"
+
+build() {
+ # set python path for bjam
+ cd "${srcdir}/${pkgbase}_${_boostver}/tools"
+ echo "using python : 2.7 : /usr/bin/python2 ;" >> build/v2/user-config.jam
+ echo "using python : 3.2 : /usr/bin/python : /usr/include/python3.2mu : /usr/lib ;" >> build/v2/user-config.jam
+ echo "using mpi ;" >> build/v2/user-config.jam
+
+ # build bjam
+ cd "${srcdir}/${pkgbase}_${_boostver}/tools/build/v2/engine/src"
+ ./build.sh cc
+
+ _bindir="bin.linuxx86"
+ [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
+
+ install -d "${_stagedir}"/usr/bin
+ install ${_bindir}/bjam "${_stagedir}"/usr/bin/bjam
+
+ # build bcp
+ cd "${srcdir}/${pkgbase}_${_boostver}/tools/bcp"
+ ../build/v2/engine/src/${_bindir}/bjam --toolset=gcc
+ install -m755 "${srcdir}/${pkgbase}_${_boostver}/dist/bin/bcp" \
+ ${_stagedir}/usr/bin/bcp
+
+ # build libs
+ cd "${srcdir}/${pkgbase}_${_boostver}"
+ #python 3.2 support
+ #https://svn.boost.org/trac/boost/ticket/4994
+ patch -Np0 -i "${srcdir}/4994-compile-fix-for-Python32-v2.patch"
+ patch -Np0 -i "${srcdir}/boost-1.46.0-spirit.patch"
+
+ # default "minimal" install: "release link=shared,static
+ # runtime-link=shared threading=single,multi"
+ # --layout=tagged will add the "-mt" suffix for multithreaded libraries
+ # and installs includes in /usr/include/boost.
+ # --layout=system no longer adds the -mt suffix for multi-threaded libs.
+ # install to ${_stagedir} in preparation for split packaging
+
+ ./tools/build/v2/engine/src/${_bindir}/bjam \
+ release debug-symbols=off threading=multi \
+ runtime-link=shared link=shared,static \
+ cflags=-fno-strict-aliasing \
+ toolset=gcc \
+ --prefix="${_stagedir}" \
+ -sTOOLS=gcc \
+ --layout=system \
+ ${MAKEFLAGS} \
+ install
+
+ # pyste is unmaintained: http://www.boost.org/doc/libs/1_46_0/libs/python/doc/index.html
+ # build pyste
+ #cd "${srcdir}/${pkgbase}_${_boostver}/libs/python/pyste/install"
+ #python2 setup.py install --root=${_stagedir} --optimize=1
+}
+
+package_boost() {
+ pkgdesc="Free peer-reviewed portable C++ source libraries - Development"
+ depends=("boost-libs=${pkgver}")
+ optdepends=('python: for python bindings'
+ 'python2: for python2 bindings')
+
+ install -d "${pkgdir}"/usr/{include,lib}
+ # headers/source files
+ cp -r "${_stagedir}"/include/ "${pkgdir}"/usr/
+
+ # static libs
+ cp -r "${_stagedir}"/lib/*.a "${pkgdir}"/usr/lib/
+
+ # utilities (bjam, bcp, pyste)
+ cp -r "${_stagedir}"/usr/* "${pkgdir}"/usr/
+
+ # license
+ install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
+ "${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt
+}
+
+package_boost-libs() {
+ pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime"
+ depends=('gcc-libs' 'bzip2' 'zlib' 'icu')
+ optdepends=('openmpi: for mpi support')
+
+ install -d "${pkgdir}/usr/lib"
+ #shared libs
+ cp -r "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib/"
+
+ # license
+ install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
+ "${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt
+}
diff --git a/staging/boost/boost-1.46.0-spirit.patch b/staging/boost/boost-1.46.0-spirit.patch
new file mode 100644
index 000000000..6fae331ee
--- /dev/null
+++ b/staging/boost/boost-1.46.0-spirit.patch
@@ -0,0 +1,59 @@
+Index: boost/spirit/home/qi/nonterminal/detail/parameterized.hpp
+===================================================================
+--- boost/spirit/home/qi/nonterminal/detail/parameterized.hpp (revision 68724)
++++ boost/spirit/home/qi/nonterminal/detail/parameterized.hpp (revision 68725)
+@@ -14,6 +14,7 @@
+
+ #include <boost/ref.hpp>
+
++#include <boost/spirit/home/support/handles_container.hpp>
+ #include <boost/spirit/home/qi/parser.hpp>
+
+ namespace boost { namespace spirit { namespace qi
+@@ -59,4 +60,16 @@ namespace boost { namespace spirit { nam
+ };
+ }}}
+
++namespace boost { namespace spirit { namespace traits
++{
++ ///////////////////////////////////////////////////////////////////////////
++ template <typename Subject, typename Params, typename Attribute
++ , typename Context, typename Iterator>
++ struct handles_container<qi::parameterized_nonterminal<Subject, Params>
++ , Attribute, Context, Iterator>
++ : handles_container<typename remove_const<Subject>::type
++ , Attribute, Context, Iterator>
++ {};
++}}}
++
+ #endif
+Index: boost/spirit/home/karma/nonterminal/detail/parameterized.hpp
+===================================================================
+--- boost/spirit/home/karma/nonterminal/detail/parameterized.hpp (revision 68724)
++++ boost/spirit/home/karma/nonterminal/detail/parameterized.hpp (revision 68725)
+@@ -14,6 +14,7 @@
+
+ #include <boost/ref.hpp>
+
++#include <boost/spirit/home/support/handles_container.hpp>
+ #include <boost/spirit/home/karma/generator.hpp>
+
+ namespace boost { namespace spirit { namespace karma
+@@ -60,4 +61,17 @@ namespace boost { namespace spirit { nam
+ };
+ }}}
+
++
++namespace boost { namespace spirit { namespace traits
++{
++ ///////////////////////////////////////////////////////////////////////////
++ template <typename Subject, typename Params, typename Attribute
++ , typename Context, typename Iterator>
++ struct handles_container<karma::parameterized_nonterminal<Subject, Params>
++ , Attribute, Context, Iterator>
++ : handles_container<typename remove_const<Subject>::type
++ , Attribute, Context, Iterator>
++ {};
++}}}
++
+ #endif
diff --git a/staging/brltty/PKGBUILD b/staging/brltty/PKGBUILD
new file mode 100644
index 000000000..e173c7e6c
--- /dev/null
+++ b/staging/brltty/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 126155 2011-06-01 20:36:52Z andyrtr $
+# Maintainer:
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=brltty
+pkgver=4.2
+pkgrel=4
+pkgdesc="Braille display driver for Linux/Unix"
+arch=('i686' 'x86_64')
+url="http://mielke.cc/brltty"
+license=('GPL' 'LGPL')
+depends=('libxaw' 'at-spi' 'gpm' 'icu' 'python2' 'tcl' 'atk' 'libxtst')
+makedepends=('pyrex' 'bluez')
+optdepends=('bluez: bluetooth support')
+backup=(etc/brltty.conf etc/conf.d/brltty.conf)
+options=('!makeflags' '!emptydirs')
+source=(http://mielke.cc/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz
+ 'brltty-4.2-S_ISCHR.patch'
+ 'brltty'
+ 'brltty.conf')
+md5sums=('192af5e634210616928496645e392097'
+ '5954b289efaf2ff17676d06de9a88854'
+ '831ebaf0c56091702929c68805d20c4f'
+ 'a8ab8b3dd059e96e1734bc9cdcf844fc')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CFLAGS+="${CFLAGS} -D_GNU_SOURCE" \
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --enable-gpm \
+ --disable-java-bindings \
+ --disable-caml-bindings \
+ PYTHON=/usr/bin/python2
+
+ patch -Np1 -i ${srcdir}/brltty-4.2-S_ISCHR.patch
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make INSTALL_ROOT="${pkgdir}" install
+ install -D -m755 ${srcdir}/brltty ${pkgdir}/etc/rc.d/brltty
+ install -D -m644 ${srcdir}/brltty.conf ${pkgdir}/etc/conf.d/brltty.conf
+ install -D -m644 Documents/brltty.conf ${pkgdir}/etc/brltty.conf
+}
diff --git a/staging/brltty/brltty b/staging/brltty/brltty
new file mode 100755
index 000000000..5ed21a52d
--- /dev/null
+++ b/staging/brltty/brltty
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+daemon_name=brltty
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name.conf
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ $daemon_name $brltty_args
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/staging/brltty/brltty-4.2-S_ISCHR.patch b/staging/brltty/brltty-4.2-S_ISCHR.patch
new file mode 100644
index 000000000..eddac9616
--- /dev/null
+++ b/staging/brltty/brltty-4.2-S_ISCHR.patch
@@ -0,0 +1,11 @@
+diff -up brltty-4.2/Programs/sys_linux.c.BAD brltty-4.2/Programs/sys_linux.c
+--- brltty-4.2/Programs/sys_linux.c.BAD 2010-05-21 09:04:10.003122084 -0400
++++ brltty-4.2/Programs/sys_linux.c 2010-05-21 09:04:19.376198268 -0400
+@@ -23,6 +23,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#include <sys/stat.h>
+ #include <linux/kd.h>
+
+ #ifdef HAVE_LINUX_INPUT_H
diff --git a/staging/brltty/brltty.conf b/staging/brltty/brltty.conf
new file mode 100644
index 000000000..94115e1d5
--- /dev/null
+++ b/staging/brltty/brltty.conf
@@ -0,0 +1,2 @@
+# Specify any arguments to pass to brltty here.
+brltty_args="" \ No newline at end of file
diff --git a/staging/enchant/PKGBUILD b/staging/enchant/PKGBUILD
new file mode 100644
index 000000000..1f95981e7
--- /dev/null
+++ b/staging/enchant/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 126152 2011-06-01 20:31:07Z andyrtr $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+
+pkgname=enchant
+pkgver=1.6.0
+pkgrel=2
+pkgdesc="A wrapper library for generic spell checking"
+arch=('i686' 'x86_64')
+url="http://www.abisource.com/enchant/"
+license=('LGPL')
+depends=('aspell' 'dbus-glib' 'hunspell')
+makedepends=('hspell')
+options=('!libtool')
+source=("http://www.abisource.com/downloads/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('de11011aff801dc61042828041fb59c7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --disable-static \
+ --disable-ispell \
+ --with-myspell-dir=/usr/share/myspell
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gptfdisk/PKGBUILD b/staging/gptfdisk/PKGBUILD
new file mode 100644
index 000000000..c3e5215e6
--- /dev/null
+++ b/staging/gptfdisk/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 126131 2011-06-01 17:33:51Z foutrelis $
+# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Hokum <hokum_at_mail_dot_ru>
+
+pkgname=gptfdisk
+pkgver=0.7.1
+pkgrel=3
+pkgdesc="A text-mode partitioning tool that works on Globally Unique Identifier (GUID) Partition Table (GPT) disks"
+arch=('i686' 'x86_64')
+url="http://www.rodsbooks.com/gdisk/"
+license=('GPL2')
+depends=('gcc-libs' 'util-linux' 'popt' 'icu')
+provides=('gdisk')
+conflicts=('gdisk')
+replaces=('gdisk')
+source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tgz)
+md5sums=('7c8d810df61e81c821bef399b832e89e')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make
+}
+
+package () {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ install -d "$pkgdir"/{sbin,usr/share/{man/man8,gdisk}}
+ install -t "$pkgdir/sbin" gdisk sgdisk fixparts
+ install -m644 -t "$pkgdir/usr/share/man/man8" {gdisk,sgdisk}.8
+ install -m644 -t "$pkgdir/usr/share/gdisk" README NEWS
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/hunspell/PKGBUILD b/staging/hunspell/PKGBUILD
new file mode 100644
index 000000000..fefa04db4
--- /dev/null
+++ b/staging/hunspell/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 125861 2011-05-30 15:55:43Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Hussam Al-Tayeb <ht990332@gmail.com>
+
+pkgname=hunspell
+pkgver=1.3.2
+pkgrel=1
+pkgdesc="Spell checker and morphological analyzer library and program"
+arch=('i686' 'x86_64')
+url="http://hunspell.sourceforge.net/"
+license=('GPL' 'LGPL' 'MPL')
+depends=('gcc-libs' 'readline')
+optdepends=('perl: for ispellaff2myspell')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/hunspell/hunspell-$pkgver.tar.gz)
+md5sums=('3121aaf3e13e5d88dfff13fb4a5f1ab8')
+
+build() {
+ cd "$srcdir/hunspell-$pkgver"
+ ./configure --prefix=/usr --disable-static \
+ --with-ui --with-readline --with-experimental
+ make
+}
+
+package() {
+ cd "$srcdir/hunspell-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/kdesdk/PKGBUILD b/staging/kdesdk/PKGBUILD
new file mode 100644
index 000000000..afb12e671
--- /dev/null
+++ b/staging/kdesdk/PKGBUILD
@@ -0,0 +1,243 @@
+# $Id: PKGBUILD 126168 2011-06-02 00:51:07Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdesdk
+pkgname=('kdesdk-cervisia'
+ 'kdesdk-dolphin-plugins'
+ 'kdesdk-kapptemplate'
+ 'kdesdk-kate'
+ 'kdesdk-kcachegrind'
+ 'kdesdk-kdeaccounts-plugin'
+ 'kdesdk-kdepalettes'
+ 'kdesdk-kioslave'
+ 'kdesdk-kmtrace'
+ 'kdesdk-kompare'
+ 'kdesdk-kpartloader'
+ 'kdesdk-kprofilemethod'
+ 'kdesdk-kstartperf'
+ 'kdesdk-kuiviewer'
+ 'kdesdk-lokalize'
+ 'kdesdk-okteta'
+ 'kdesdk-poxml'
+ 'kdesdk-scripts'
+ 'kdesdk-strigi-analyzer'
+ 'kdesdk-umbrello')
+pkgver=4.6.3
+pkgrel=2
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdesdk')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'kdepim-runtime' 'subversion'
+ 'antlr2' 'kdebase-konqueror')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'fix-python2-path.patch')
+sha1sums=('6faecbd828fda6cf0aced642287d982d3541d746'
+ 'd05ca0231869c484fd3861955d960a60aff7dcfb')
+
+build() {
+ cd ${srcdir}/${pkgbase}-${pkgver}
+
+ # Fix python2 path
+ patch -Np1 -i ${srcdir}/fix-python2-path.patch
+ sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ $(find . -name '*.py')
+
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdesdk-cervisia() {
+ pkgdesc='CVS Frontend'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/cervisia/"
+ install='kdesdk.install'
+ cd $srcdir/build/cervisia
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/cervisia
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-dolphin-plugins() {
+ pkgdesc='Extra Dolphin plugins'
+ depends=('kdebase-dolphin' 'subversion' 'git' 'kdesdk-kompare')
+ install='kdesdk.install'
+ cd $srcdir/build/dolphin-plugins/git
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/dolphin-plugins/svn
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kapptemplate() {
+ pkgdesc='KDE Template Generator'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kapptemplate/"
+ install='kdesdk.install'
+ cd $srcdir/build/kapptemplate
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kapptemplate
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kate() {
+ pkgdesc='Advanced Text Editor'
+ depends=('kdebase-runtime' 'kdebase-lib')
+ url="http://kde.org/applications/utilities/kate/"
+ install='kdesdk-kate.install'
+ cd $srcdir/build/kate
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kate
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kcachegrind() {
+ pkgdesc='Visualization of Performance Profiling Data'
+ depends=('kdebase-runtime' 'python2')
+ optdepends=('php: PHP support')
+ url="http://kde.org/applications/development/kcachegrind/"
+ install='kdesdk.install'
+ cd $srcdir/build/kcachegrind
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcachegrind
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kdeaccounts-plugin() {
+ pkgdesc='KDE Repository Accounts'
+ depends=('kdepim-runtime')
+ cd $srcdir/build/kdeaccounts-plugin
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kdepalettes() {
+ pkgdesc='Palettes for the Gimp that match the KDE standard color palette'
+ optdepends=('gimp')
+ install -D -m644 $srcdir/${pkgbase}-${pkgver}/kdepalettes/KDE_Gimp \
+ $pkgdir/usr/share/gimp/2.0/palettes/KDE.gpl
+}
+
+package_kdesdk-kioslave() {
+ pkgdesc='KDED Subversion Module'
+ depends=('kdebase-runtime' 'subversion')
+ cd $srcdir/build/kioslave
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kmtrace() {
+ pkgdesc='A KDE tool to assist with malloc debugging using glibc´s "mtrace" functionality'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kmtrace
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kmtrace
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kompare() {
+ pkgdesc='Diff/Patch Frontend'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kompare/"
+ install='kdesdk.install'
+ cd $srcdir/build/kompare
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kompare
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kpartloader() {
+ pkgdesc='A test application for KParts'
+ depends=('kdebase-runtime')
+ install='kdesdk.install'
+ cd $srcdir/build/kpartloader
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kprofilemethod() {
+ pkgdesc='Macros helping to profile'
+ cd $srcdir/build/kprofilemethod
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kstartperf() {
+ pkgdesc='Startup time measurement tool for KDE applications'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kstartperf
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kuiviewer() {
+ pkgdesc='Qt Designer UI File Viewer'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kuiviewer/"
+ install='kdesdk.install'
+ cd $srcdir/build/kuiviewer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-lokalize() {
+ pkgdesc='Computer-Aided Translation System'
+ depends=('kdebase-runtime' 'kdebindings-python')
+ url="http://kde.org/applications/development/lokalize/"
+ optdepends=('translate-toolkit: enable extra python script')
+ install='kdesdk.install'
+ cd $srcdir/build/lokalize
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/lokalize
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-okteta() {
+ pkgdesc='Hex Editor'
+ depends=('kdebase-runtime')
+ replaces=('kdeutils-okteta')
+ conflicts=('kdeutils-okteta')
+ url="http://kde.org/applications/utilities/okteta"
+ install='kdesdk-okteta.install'
+ cd $srcdir/build/okteta
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/okteta
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-poxml() {
+ pkgdesc='Translates DocBook XML files using gettext po files'
+ depends=('qt' 'antlr2')
+ cd $srcdir/build/poxml
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/poxml
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-scripts() {
+ pkgdesc='KDE SDK scripts'
+ depends=('python2')
+ cd $srcdir/build/scripts
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/scripts
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-strigi-analyzer() {
+ pkgdesc='Strigi-Analyzer for KDE SDK'
+ depends=('kdelibs')
+ cd $srcdir/build/strigi-analyzer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-umbrello() {
+ pkgdesc='UML Modeller'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/umbrello/"
+ install='kdesdk.install'
+ cd $srcdir/build/umbrello
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/umbrello
+ make DESTDIR=$pkgdir install
+}
diff --git a/staging/kdesdk/fix-python2-path.patch b/staging/kdesdk/fix-python2-path.patch
new file mode 100644
index 000000000..c2c0745d1
--- /dev/null
+++ b/staging/kdesdk/fix-python2-path.patch
@@ -0,0 +1,64 @@
+--- kdesdk-4.5.80/kcachegrind/converters/hotshot2calltree~ 2010-11-24 11:53:38.586666671 +0100
++++ kdesdk-4.5.80/kcachegrind/converters/hotshot2calltree 2010-11-24 11:53:38.623333337 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # _*_ coding: latin1 _*_
+
+ #
+--- kdesdk-4.5.80/lokalize/scripts/msgmerge.py~ 2010-11-24 11:22:42.120000002 +0100
++++ kdesdk-4.5.80/lokalize/scripts/msgmerge.py 2010-11-24 11:22:42.146666670 +0100
+@@ -114,7 +114,7 @@
+ print >>sys.stderr, "Execution failed:", e
+
+ cmd='%s/odf/xliffmerge.py -i %s -t %s -o %s' % (ourPath,xliffpathname,xlifftemplatepathname,xliffpathname)
+- if os.name!='nt': cmd='python '+cmd
++ if os.name!='nt': cmd='python2 '+cmd
+ else: cmd=cmd.replace('/','\\')
+ os.system(cmd)
+
+--- kdesdk-4.5.80/lokalize/scripts/xliff2odf.py~ 2010-11-24 11:24:10.853333336 +0100
++++ kdesdk-4.5.80/lokalize/scripts/xliff2odf.py 2010-11-24 11:24:10.883333336 +0100
+@@ -42,7 +42,7 @@
+ xliff2odf.convertxliff(xliffinput, translatedodfpathname, odf)
+
+ ourpath=([p for p in sys.path if os.path.exists(p+'/xliff2odf.py')]+[''])[0]
+- os.system('python "'+ourpath+'/xliff2odf-standalone.py" "%s" "%s" &'%(translatedodfpathname, Editor.currentEntryId()))
++ os.system('python2 "'+ourpath+'/xliff2odf-standalone.py" "%s" "%s" &'%(translatedodfpathname, Editor.currentEntryId()))
+
+ try: convert()
+ except: print 'error occured'
+--- kdesdk-4.5.80/scripts/rename_source_files~ 2010-11-24 11:45:41.040000004 +0100
++++ kdesdk-4.5.80/scripts/rename_source_files 2010-11-24 11:45:41.093333336 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+ #
+ # Copyright David Faure <faure@kde.org>, License LGPL v2
+ #
+--- kdesdk-4.5.80/scripts/svn2log.sh~ 2010-11-24 11:46:24.863333337 +0100
++++ kdesdk-4.5.80/scripts/svn2log.sh 2010-11-24 11:46:24.896666669 +0100
+@@ -17,6 +17,6 @@
+ svn cat svn://anonsvn.kde.org/home/kde/trunk/kde-common/accounts > /tmp/accounts.$PPID
+
+ echo "Creating changelog...";
+-svn log -v --xml $1 | python $CURRENT/svn2log.py --users=/tmp/accounts.$PPID --users-charset=UTF8
++svn log -v --xml $1 | python2 $CURRENT/svn2log.py --users=/tmp/accounts.$PPID --users-charset=UTF8
+
+ rm /tmp/accounts.$PPID
+--- kdesdk-4.5.80/scripts/kde_generate_export_header~ 2010-11-24 11:48:49.696666669 +0100
++++ kdesdk-4.5.80/scripts/kde_generate_export_header 2010-11-24 11:48:49.753333338 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+
+ import os, sys, string
+
+--- kdesdk-4.5.80/scripts/reviewboarddiff~ 2010-11-24 11:49:37.686666670 +0100
++++ kdesdk-4.5.80/scripts/reviewboarddiff 2010-11-24 11:49:37.740000003 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ #
+ # Generates reviewboard compatible diffs from git-svn repositories.
diff --git a/staging/kdesdk/kdesdk-kate.install b/staging/kdesdk/kdesdk-kate.install
new file mode 100644
index 000000000..a60d358ce
--- /dev/null
+++ b/staging/kdesdk/kdesdk-kate.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/kdesdk/kdesdk-okteta.install b/staging/kdesdk/kdesdk-okteta.install
new file mode 100644
index 000000000..3f06b8deb
--- /dev/null
+++ b/staging/kdesdk/kdesdk-okteta.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/kdesdk/kdesdk.install b/staging/kdesdk/kdesdk.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/staging/kdesdk/kdesdk.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/libreoffice/PKGBUILD b/staging/libreoffice/PKGBUILD
new file mode 100644
index 000000000..4fd0cf1a8
--- /dev/null
+++ b/staging/libreoffice/PKGBUILD
@@ -0,0 +1,701 @@
+# $Id: PKGBUILD 126270 2011-06-03 14:47:40Z stephane $
+# Maintainer: AndyRTR <andyrtr@archlinux.org>
+
+pkgbase="libreoffice"
+pkgname=('libreoffice' 'libreoffice-sdk'
+ #'libreoffice-extension-barcode' #
+ 'libreoffice-extension-diagram'
+ 'libreoffice-extension-google-docs'
+ 'libreoffice-extension-hunart'
+ #'libreoffice-extension-lightproof' # no source integration
+ #'libreoffice-extension-mysql-connector' # missing libmysqlcppconn-dev configure: error: mysql_driver.h not found. install MySQL C++ Connectivity
+ 'libreoffice-extension-nlpsolver'
+ 'libreoffice-extension-ct2n'
+ 'libreoffice-extension-numbertext'
+ 'libreoffice-extension-oooblogger'
+ 'libreoffice-extension-pdfimport'
+ 'libreoffice-extension-presenter-screen'
+ 'libreoffice-extension-presentation-minimizer'
+ 'libreoffice-extension-report-builder'
+ 'libreoffice-extension-scripting-beanshell'
+ 'libreoffice-extension-scripting-javascript'
+ 'libreoffice-extension-scripting-python'
+ 'libreoffice-extension-typo'
+ 'libreoffice-extension-validator'
+ 'libreoffice-extension-watch-window'
+ 'libreoffice-extension-wiki-publisher')
+_LOver=3.4.0.2
+pkgver=3.4.0
+pkgrel=2
+arch=('i686' 'x86_64')
+#_LO_tree="3.4"
+_OFFICEUPD="340"
+license=('LGPL3')
+url="http://www.libreoffice.org/"
+makedepends=( # makedepends
+ 'sane' 'perl-archive-zip' 'zip' 'unzip' 'xulrunner' 'unixodbc' 'hsqldb-java' #'boost' - we use internal one for now that has some gcc4.6 fixes.
+ 'apache-ant' 'gperf' 'poppler' 'kdelibs' 'gconf' 'cppunit' #'libmysqlclient'
+ 'beanshell' 'vigra' 'libldap' 'lucene' 'libmythes' 'junit' 'libwpg' 'imagemagick'
+ 'mesa' 'gstreamer0.10-base' 'java-runtime'
+ #'saxon' - currently broken
+ # the depends from libreoffice main pkg
+ "curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
+ 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
+ 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat'
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2' # keep gtk2 for install script
+ 'ttf-dejavu') # to satisfy regression tests
+ # translate-toolkit - todo move them to extra to allow --with-system-foo builds
+# http://download.documentfoundation.org/mirrors/all.html
+# http://wiki.documentfoundation.org/Mirrors
+_mirror="http://download.documentfoundation.org/libreoffice/src"
+#_mirror="http://dev-builds.libreoffice.org/pre-releases/src/"
+_additional_source_url="http://hg.services.openoffice.org/binaries"
+source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2 #,translations
+ ${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+ ${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+ ${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+ ${_additional_source_url}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+ ${_additional_source_url}/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+ ${_additional_source_url}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
+ ${_additional_source_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+ ${_additional_source_url}/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz
+ ${_additional_source_url}/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz
+ ${_additional_source_url}/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
+ ${_additional_source_url}/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
+ ${_additional_source_url}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+ ${_additional_source_url}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+ ${_additional_source_url}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+ ${_additional_source_url}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+ ${_additional_source_url}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+ ${_additional_source_url}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+ ${_additional_source_url}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+ ${_additional_source_url}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+ ${_additional_source_url}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+ ${_additional_source_url}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+ ${_additional_source_url}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+ ${_additional_source_url}/18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ http://download.go-oo.org/src/7a0dcb3fe1e8c7229ab4fb868b7325e6-mdds_0.5.2.tar.bz2
+ http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ http://download.go-oo.org/extern/b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
+ http://download.go-oo.org/src/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+ http://download.go-oo.org/src/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
+ http://download.go-oo.org/src/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
+ http://ooo.itc.hu/oxygenoffice/download/libreoffice/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
+ buildfix_i116795.diff
+ buildfix_boost.diff
+ buildfix_ct2n.diff
+ vbahelper.visibility.patch
+ buildfix_bison25.diff)
+noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
+ 7a0dcb3fe1e8c7229ab4fb868b7325e6-mdds_0.5.2.tar.bz2
+ ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
+ 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+ 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
+ fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
+ 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+ 2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz
+ a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+ 3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz
+ 2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz
+ 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz
+ af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz
+ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+ 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+ 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+ 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+ f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+ 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+ d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+ 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+ ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+ db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+ 18f577b374d60b3c760a3a3350407632-STLport-4.5.tar.gz
+ 7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt
+ 41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt
+ 451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+ bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt
+ 23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt
+ b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt
+ b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt
+ 9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt
+ dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
+ b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
+ 90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2
+ f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2)
+md5sums=('7427ddd5ae63b6ee7aa868201dfbccaa'
+ 'a78a8e08731213da02c65060cedc5589'
+ '596da255e2728faccc8f2361171270ec'
+ '8ed9803a34d13da1764e7523d550d6b0'
+ '9be46d7c4bf3a60ee8dd0a5ef3638f82'
+ 'b60db802866ab71c485de42e6382d1bb'
+ '09e374cf3bd8f07a043883393012d69b'
+ 'af9f25aa04dc4ef7b797f7bcc743877c'
+ 'ad29de786d76d67759f9d2dd574b29be'
+ 'ff13a8ac0ea324122b75773fd80a9245'
+ '6eb8f53e01da7a945ee4cd42b7297732'
+ '90df27d4cbf490668ce4f03ff7dba521'
+ 'c0ea197183564c49306a1c79ca571e51'
+ '91e69ed3c0be542fa7f69ca3da2d7808'
+ 'a81c787b2e5469c2acc9f335b2c9e52f'
+ 'ee1c78af6553657614b1a43adf4750ac'
+ 'c970d6212618fc9b34526907eb030ce6'
+ '6d25488c81af09d87015bf487243042f'
+ '9a39234a49516b7035309e28dd4f0784'
+ '1f24ab1d39f4a51faf22244c94a6203f'
+ '35c94d2df8893241173de1d16b6034c0'
+ '798b2ffdc8bcfe7bca2cf92b62caf685'
+ 'fdb27bfe2dbe2e7b57ae194d9bf36bab'
+ 'ada24d37d8d638b3d8a9985e80bc2978'
+ '2a177023f9ea8ec8bd00837605c5df1b'
+ 'a7983f859eafb2677d7ff386a023bc40'
+ '3c219630e4302863a9a83d0efde889db'
+ '2ae988b339daec234019a7066f96733e'
+ '2c9b0f83ed5890af02c0df1c1776f39b'
+ 'af3c3acf618de6108d65fcdc92b492e1'
+ 'eeb2c7ddf0d302fba4bfc6e97eac9624'
+ '39bb3fcea1514f1369fcfc87542390fd'
+ '3404ab6b1792ae5f16bbd603bd1e1d03'
+ '97b2d4dba862397f446b217e2b623e71'
+ 'f94d9870737518e3b597f9265f4e9803'
+ '8ce2fcd72becf06c41f7201d15373ed9'
+ 'd8bd5eed178db6e2b18eeed243f85aa8'
+ '3bdf40c0d199af31923e900d082ca2dd'
+ 'ace6ab49184e329db254e454a010f56d'
+ 'db60e4fde8dd6d6807523deb71ee34dc'
+ 'ba2930200c9f019c2d93a8c88c651a0f'
+ '18f577b374d60b3c760a3a3350407632'
+ '7a0dcb3fe1e8c7229ab4fb868b7325e6'
+ '185d60944ea767075d27247c3162b3bc'
+ 'b4cae0700aa1c2aef7eb7f345365e6f1'
+ '451ccf439a36a568653b024534669971'
+ '90401bca927835b6fbae4a707ed187c8'
+ 'f02578f5218f217a9f20e9c30e119c6a'
+ '7e7efc5d4a03126bb9ae3ae9aa2c4e87'
+ '41c9b65ad60af4b3255bbecdfef11736'
+ '451ccf439a36a568653b024534669971'
+ 'bbdd5639ada63e3130761daaecae1a10'
+ '23bd75552206dfcd8fd4e29137dcac84'
+ 'b8cbca7b3363e6ca2d02bc0ba2b63904'
+ 'b632bdd25649cc4067bcb410bae23d2b'
+ '9d60b6cfa3ef1926848710bbcd11115b'
+ 'dbaafd21de055e582d92d7d32fe9da13'
+ 'b7b2d0e04e142f26dd96119c80757d1f'
+ '0520d63c946e272ed3bdfc863fbdc42e'
+ 'bc228237108cab7745897a9f466b6d39'
+ 'eee273f501ff45dc5f1365e78c6d57c0'
+ '43b145db28e6c0d73578ae6fd35e510d'
+ '4fa96e04b41a6e86774e74a972024b3e')
+
+build() {
+
+ unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH; unset EXTRAOPTS
+ [ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
+ [ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
+ [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
+
+ # move all LibO sources into one build directory
+ mkdir ${srcdir}/build && cd ${srcdir}/build
+ for i in libreoffice-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}; do #,translations
+ mv ${srcdir}/$i/* .
+ done
+
+ # move external sources into place
+ mkdir ${srcdir}/ext_sources && cd ${srcdir}/ext_sources
+ for source in "${noextract[@]}"; do
+ ln -s ${srcdir}/$source .
+ done
+
+ cd ${srcdir}/build
+
+ # buildfixes & bugfixes
+ patch -Np1 -i ${srcdir}/buildfix_i116795.diff
+ patch -Np1 -i ${srcdir}/buildfix_boost.diff
+ patch -Np1 -i ${srcdir}/buildfix_ct2n.diff
+ patch -Np0 -i ${srcdir}/vbahelper.visibility.patch
+ patch -Np0 -i ${srcdir}/buildfix_bison25.diff
+
+ # unset C(XX)FLAGS
+ # http://www.openoffice.org/issues/show_bug.cgi?id=103205
+# unset CFLAGS
+# unset CXXFLAGS
+
+ #use the CFLAGS but remove the LibO overridden ones
+ for i in $CFLAGS; do
+ case "$i" in
+ -O?|-pipe|-Wall|-g|-fexceptions) continue;;
+ esac
+ ARCH_FLAGS="$ARCH_FLAGS $i"
+ done
+
+ # python2 fix
+ export PYTHON=python2
+
+ # http://wiki.documentfoundation.org/Development/How_to_build/Configure_options
+
+# if [ "$CARCH" = "x86_64" ]; then
+# EXTRAOPTS="--without-stlport"
+# else
+# EXTRAOPTS="--with-stlport" # --without-system-boost"
+# # # avoid problems with ixion for now
+# sed -i '/fields-table-formula.diff/d' patches/dev300/apply || return 1
+# fi
+
+# autoconf -v -f
+
+ # non-SMP test build
+# export MAKEFLAGS="-j1"
+ ./configure --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
+ --with-unix-wrapper="libreoffice" \
+ --with-max-jobs=${MAKEFLAGS/-j/} --with-num-cpus=${MAKEFLAGS/-j/} \
+ --with-external-tar="${srcdir}/ext_sources" \
+ --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
+ --with-install-dirname="${pkgbase}" --libdir=/usr/lib --mandir=/usr/share/man \
+ --with-lang="" \
+ --disable-verbose \
+ --enable-cairo\
+ --enable-crashdump \
+ --enable-dbus \
+ --enable-evolution2\
+ --disable-graphite\
+ --enable-gio\
+ --disable-gnome-vfs\
+ --disable-kde\
+ --enable-kde4\
+ --enable-ldap \
+ --enable-lockdown\
+ --enable-opengl \
+ --enable-odk\
+ --enable-opengl\
+ --enable-ext-barcode \
+ --enable-ext-diagram \
+ --enable-ext-google-docs \
+ --enable-ext-hunart \
+ --disable-ext-lightproof \
+ --disable-ext-mysql-connector \
+ --with-system-mysql \
+ --enable-ext-nlpsolver \
+ --enable-ext-ct2n \
+ --enable-ext-numbertext \
+ --enable-ext-oooblogger \
+ --enable-ext-pdfimport \
+ --enable-ext-presenter-console \
+ --enable-ext-presenter-minimizer \
+ --enable-ext-report-builder \
+ --enable-ext-scripting-beanshell \
+ --enable-ext-scripting-javascript \
+ --enable-ext-scripting-python \
+ --enable-ext-typo \
+ --enable-ext-validator \
+ --enable-ext-watch-window \
+ --enable-ext-wiki-publisher \
+ --without-fonts\
+ --without-afms\
+ --without-ppds\
+ --without-system-libwps\
+ --without-system-mdds\
+ --without-myspell-dicts \
+ --with-system-dicts \
+ --with-external-dict-dir=/usr/share/hunspell \
+ --with-external-hyph-dir=/usr/share/hyphen \
+ --with-external-thes-dir=/usr/share/mythes \
+ --with-system-cppunit\
+ --with-system-libwpg \
+ --with-system-libwps \
+ --with-system-redland\
+ --without-system-saxon\
+ --with-system-libtextcat \
+ --with-external-libtextcat-data \
+ --with-openldap\
+ --with-ant-home="/usr/share/java/apache-ant"\
+ --without-system-boost\
+ --with-system-cairo\
+ --with-system-libs\
+ --with-system-mozilla\
+ --with-system-mythes\
+ --with-system-xrender-headers\
+ --with-system-headers\
+ --with-alloc=system\
+ --with-system-lucene\
+ --with-lucene-core-jar=/usr/share/java/lucene-core.jar\
+ --with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
+ $EXTRAOPTS || return 1
+
+#--with-system-graphite --enable-graohite ?
+#--with-servlet-api-jar=JARFILE
+# see http://qa.openoffice.org/issues/show_bug.cgi?id=110136
+# --with-system-saxon\
+# --with-saxon-jar=/usr/share/java/saxon/saxon9he.jar\
+
+ touch src.downloaded
+ #./download
+ unset MAKEFLAGS
+ ./bootstrap
+ make
+}
+
+#check() {
+# cd ${srcdir}/build
+# make check
+#}
+
+package_libreoffice() {
+
+ pkgdesc="a productivity suite that is compatible with other major office suites"
+ install=${pkgbase}.install
+ depends=("curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
+ 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
+ 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'libtextcat'
+ 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'gtk2') # keep gtk2 for install script
+ #'java-runtime'
+ #'saxon'
+ optdepends=('java-runtime: adds java support'
+ 'libcups: adds printing support'
+ 'gconf: adds additional gnome support'
+ 'nss: adds support for signed files/macros'
+ 'pstoedit: translates PostScript and PDF graphics into other vector formats'
+ 'poppler: for shipped pdfimport extension'
+ 'kdelibs: for kde integration'
+ 'libmythes: for use in thesaurus'
+ 'hsqldb-java: default database format for OpenOffice.org'
+ 'beanshell: interactive java -- good for prototyping /macros'
+ 'vigra: C++ computer vision library, usable in Basebmp'
+ 'libmspack: library for Microsoft compression formats for use in FontOOo'
+ 'libwpg: library for importing and converting Corel WordPerfect(tm) Graphics images'
+ 'libldap: to get profiles via ldap'
+ 'lucene: full-text search engine library for Java needed in the help section'
+ 'sane: for scanner access'
+ 'unixodbc: adds ODBC database support'
+ 'mesa: for the OGLTrans extension'
+ 'gstreamer0.10-base: + some gstr-plugins to support multimedia content, e.g. in impress')
+ backup=(etc/libreoffice/sofficerc
+ etc/libreoffice/bootstraprc
+ etc/libreoffice/psprint.conf)
+ provides=('go-openoffice')
+ conflicts=('go-openoffice')
+ replaces=('go-openoffice' 'openoffice-base' )
+
+ cd ${srcdir}/build
+ make DESTDIR=${pkgdir} install
+
+ # fix missing desktop integration
+ install -dm755 ${pkgdir}/usr/bin
+ pushd ${pkgdir}/usr/bin
+ ln -vs /usr/lib/libreoffice/program/soffice ./libreoffice
+ ln -vs /usr/lib/libreoffice/program/soffice ./soffice
+ ln -vs /usr/lib/libreoffice/program/sbase ./lobase
+ ln -vs /usr/lib/libreoffice/program/scalc ./localc
+ ln -vs /usr/lib/libreoffice/program/sdraw ./lodraw
+ ln -vs /usr/lib/libreoffice/program/simpress ./loimpress
+ ln -vs /usr/lib/libreoffice/program/smath ./lomath
+ ln -vs /usr/lib/libreoffice/program/swriter ./lowriter
+ ln -vs /usr/lib/libreoffice/program/unopkg ./unopkg
+ popd
+
+ # move sysui desktop files into place we want to use - javafilter and qstarter, but not unneeded printeradmin
+ install -dm755 ${pkgdir}/usr/share/{applications,icons,mime/packages,pixmaps}
+ rm ${pkgdir}/usr/lib/libreoffice/share/xdg/printeradmin.desktop
+ for i in base calc draw impress javafilter math qstart startcenter writer; do
+ cp ${pkgdir}/usr/lib/libreoffice/share/xdg/$i.desktop ${pkgdir}/usr/share/applications/libreoffice-$i.desktop
+ done
+ # remove version in menu entry and make it visible
+ sed -i -e "s/3.4//g" ${pkgdir}/usr/share/applications/*.desktop
+ sed -i -e "s/Icon=libreoffice34-/Icon=/g" ${pkgdir}/usr/share/applications/*.desktop
+ sed -i -e "/NoDisplay=true/d" ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
+ echo "Icon=startcenter" >> ${pkgdir}/usr/share/applications/libreoffice-qstart.desktop
+ # remove unneeded .desktop files
+ rm -rf ${pkgdir}/usr/lib/libreoffice/share/xdg
+
+ # add missing icon files
+ cp -R ${srcdir}/build/sysui/desktop/icons/{hi,lo}color ${pkgdir}/usr/share/icons/
+ pushd ${pkgdir}/usr/share/pixmaps
+ for i in base calc draw impress main math printeradmin startcenter writer; do
+ ln -vs /usr/share/icons/hicolor/48x48/apps/$i.png .
+ done
+ popd
+ sed -i -e 's/Icon=libreoffice-/Icon=/' ${pkgdir}/usr/share/applications/*.desktop
+
+ # add missing mimetype file
+ install -m644 ${srcdir}/build/sysui/unxlng*/misc/libreoffice/openoffice.org.xml ${pkgdir}/usr/share/mime/packages/libreoffice.xml
+
+ # put configuration files into place
+ install -dm755 ${pkgdir}/etc/libreoffice
+ install -m644 ${pkgdir}/usr/lib/libreoffice/program/{bootstraprc,sofficerc} ${pkgdir}/etc/libreoffice/
+ install -m644 ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
+ # install dummy links to make them found by LibO
+ cd ${pkgdir}/usr/lib/libreoffice/program/
+ ln -vsf /etc/libreoffice/{bootstraprc,sofficerc} .
+ cd ${pkgdir}/usr/lib/libreoffice/basis3.4/share/psprint/
+ ln -vsf /etc/libreoffice/psprint.conf .
+
+ #fix http://bugs.archlinux.org/task/17656
+ find ${pkgdir} -perm 444 -exec ls -lh {} \;
+ find ${pkgdir} -perm 444 -exec chmod 644 {} \;
+ find ${pkgdir} -perm 555 -exec ls -lh {} \;
+ find ${pkgdir} -perm 555 -exec chmod 755 {} \;
+
+ # split out extensions
+ mv ${pkgdir}/usr/lib/libreoffice/share/extensions ${srcdir}/extensions-install
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ install -m644 ${srcdir}/extensions-install/package.txt ${pkgdir}/usr/lib/libreoffice/share/extensions/
+
+ # move SDK to separated package
+ mkdir -p ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.4/sdk
+ mv ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk ${srcdir}/sdk-install/usr/lib/libreoffice/basis3.4/
+
+ # cleanup gid_Module files
+ mkdir ${srcdir}/splitlist
+ mv -f ${pkgdir}/gid_Module* ${srcdir}/splitlist/
+}
+
+package_libreoffice-sdk() {
+
+ pkgdesc="Software development kit for LibreOffice"
+ depends=('libreoffice' 'gcc-libs' 'sh')
+
+ cd ${srcdir}/sdk-install
+ cp -r * ${pkgdir}
+
+ cd ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk
+ mv setsdkenv_unix setsdkenv_unix.sh && chmod 755 setsdkenv_unix.sh
+ rm -f ${pkgdir}/usr/lib/libreoffice/basis3.4/sdk/setsdkenv_unix.{csh,sh}.in
+ #fix permissions
+ find examples -type f -exec chmod -x {} \;
+}
+
+package_libreoffice-extension-barcode() {
+
+ pkgdesc="This extension generates UPC-A, EAN-13, ISBN and JAN barcodes in Draw "
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
+ chmod o-w -R ${pkgdir}/usr/lib/libreoffice/share/extensions/Barcode
+}
+
+package_libreoffice-extension-diagram() {
+
+ pkgdesc="An OOo Draw and Impress extension that creates your favorite diagrams with a few clicks"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/diagram
+}
+
+package_libreoffice-extension-google-docs() {
+
+ pkgdesc="Google Documents extension for LibreOffice"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/google-docs
+}
+
+package_libreoffice-extension-hunart() {
+
+ pkgdesc="Hungarian cross-reference toolbar extension"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/hunart
+}
+
+#package_libreoffice-extension-lightproof() {
+
+# pkgdesc="Lightproof extension for LibreOffice"
+ #arch=('any')
+# depends=('libreoffice')
+# groups=('libreoffice-extensions')
+
+# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Lightproof.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/lightproof
+#}
+
+#package_libreoffice-extension-mysql-connector() {
+
+# pkgdesc="MySQL Connector extension for LibreOffice"
+ #arch=('any')
+# depends=('libreoffice')
+# groups=('libreoffice-extensions')
+
+# install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+# unzip -q ${srcdir}/${pkgbase}-build-${_LOver}/build/libreoffice-${_LOver}/solver/${_OFFICEUPD}/unxlng*/bin/Mysql-connector.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/mysql-connector
+#}
+
+package_libreoffice-extension-nlpsolver() {
+
+ pkgdesc="This extension integrates into Calc and offers new Solver engines to use for optimizing nonlinear programming models"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/NLPSolver.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/nlpsolver
+}
+
+package_libreoffice-extension-ct2n() {
+
+ pkgdesc="This extension enables you to convert text-cells in Calc with numbers and dates, to real numbers and dates."
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/ConvertTextToNumber.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/ct2n
+}
+
+package_libreoffice-extension-numbertext() {
+
+ pkgdesc="NUMBERTEXT/MONEYTEXT extensions"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/numbertext
+}
+
+package_libreoffice-extension-oooblogger() {
+
+ pkgdesc="An extensions for blogging"
+ #arch=('any')
+ depends=('libreoffice' 'coreutils')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/oooblogger
+}
+
+package_libreoffice-extension-pdfimport() {
+
+ pkgdesc="This extension allows you to import and modify PDF documents"
+ depends=('libreoffice' 'poppler')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/pdfimport/pdfimport.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/pdfimport
+}
+
+package_libreoffice-extension-presenter-screen() {
+
+ pkgdesc="This extension provides more control over your slide show presentation, such as the ability to see the upcoming slide, the slide notes, and a presentation timer whereas the audience see only the current slide"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presenter-screen.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presenter-screen
+}
+
+package_libreoffice-extension-presentation-minimizer() {
+
+ pkgdesc="This extension reduce the file size of the current presentation"
+ depends=('libreoffice' 'gcc-libs')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/presentation-minimizer.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/presentation-minimizer
+}
+
+package_libreoffice-extension-report-builder() {
+
+ pkgdesc="This extension creates smart-looking database reports"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/report-builder.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/report-builder
+}
+
+package_libreoffice-extension-scripting-beanshell() {
+
+ pkgdesc="LibreOffice extension - Enables support for scripts in BeanShell"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-beanshell.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-beanshell
+}
+
+package_libreoffice-extension-scripting-javascript() {
+
+ pkgdesc="LibreOffice extension - Enables support for scripts in JavaScript"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-javascript.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-javascript
+}
+
+package_libreoffice-extension-scripting-python() {
+
+ pkgdesc="LibreOffice extension - Enables support for scripts in Python"
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/script-provider-for-python.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/script-provider-for-python
+}
+
+package_libreoffice-extension-typo() {
+
+ pkgdesc="Typography toolbar extension"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
+ chmod o+r -R ${pkgdir}/usr/lib/libreoffice/share/extensions/typo
+}
+
+package_libreoffice-extension-validator() {
+
+ pkgdesc="Validator extension for LibreOffice"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/validator
+}
+
+package_libreoffice-extension-wiki-publisher() {
+
+ pkgdesc="This extension enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language"
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/build/solver/${_OFFICEUPD}/unxlng*/bin/wiki-publisher.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/wiki-publisher
+}
+
+package_libreoffice-extension-watch-window() {
+
+ pkgdesc="A OOo Calc extension to add a Watch Window, which keeps the value of the monitored cell on the screen."
+ #arch=('any')
+ depends=('libreoffice')
+ groups=('libreoffice-extensions')
+
+ install -dm755 ${pkgdir}/usr/lib/libreoffice/share/extensions
+ unzip -q ${srcdir}/23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt -d ${pkgdir}/usr/lib/libreoffice/share/extensions/watch-window
+}
diff --git a/staging/libreoffice/buildfix_64bit_system_libjpeg.diff b/staging/libreoffice/buildfix_64bit_system_libjpeg.diff
new file mode 100644
index 000000000..1f4eb110f
--- /dev/null
+++ b/staging/libreoffice/buildfix_64bit_system_libjpeg.diff
@@ -0,0 +1,11 @@
+--- solenv/inc/libs.mk 2009-07-02 09:44:33.084467312 +0000
++++ solenv/inc/libs.mk.new 2009-07-02 10:44:03.420819776 +0000
+@@ -211,7 +211,7 @@
+ .IF "$(OS)" == "FREEBSD"
+ JPEG3RDLIB=/usr/local/lib/libjpeg.so
+ .ELIF "$(CPUNAME)" == "X86_64" || "$(CPUNAME)" == "S390X" || "$(CPUNAME)" == "POWERPC64"
+-JPEG3RDLIB=/usr/lib64/libjpeg.so
++JPEG3RDLIB=/usr/lib/libjpeg.so
+ .ELSE
+ JPEG3RDLIB=/usr/lib/libjpeg.so
+ .ENDIF
diff --git a/staging/libreoffice/buildfix_bison25.diff b/staging/libreoffice/buildfix_bison25.diff
new file mode 100644
index 000000000..869b6c81e
--- /dev/null
+++ b/staging/libreoffice/buildfix_bison25.diff
@@ -0,0 +1,23 @@
+--- connectivity/source/parse/sqlbison.y 2011-05-20 13:21:02.000000000 -0600
++++ connectivity/source/parse/sqlbison.y 2011-05-20 13:22:11.000000000 -0600
+@@ -4338,7 +4338,7 @@
+ }
+
+ // -------------------------------------------------------------------------
+-void OSQLParser::error(sal_Char *fmt)
++void OSQLParser::error(const sal_Char *fmt)
+ {
+ if(!m_sErrorMessage.getLength())
+ {
+--- connectivity/inc/connectivity/sqlparse.hxx 2011-05-20 13:23:58.000000000 -0600
++++ connectivity/inc/connectivity/sqlparse.hxx 2011-05-20 13:23:46.000000000 -0600
+@@ -233,7 +233,7 @@
+ // returns the type for a parameter in a given function name
+ static sal_Int32 getFunctionParameterType(sal_uInt32 _nTokenId,sal_uInt32 _nPos);
+
+- void error(sal_Char *fmt);
++ void error(const sal_Char *fmt);
+ int SQLlex();
+ #ifdef YYBISON
+ void setParseTree(OSQLParseNode * pNewParseTree);
+
diff --git a/staging/libreoffice/buildfix_boost.diff b/staging/libreoffice/buildfix_boost.diff
new file mode 100644
index 000000000..d8608d0d4
--- /dev/null
+++ b/staging/libreoffice/buildfix_boost.diff
@@ -0,0 +1,40 @@
+From bae4fdbd105142cd3f317445eddc826da529a732 Mon Sep 17 00:00:00 2001
+From: Caolán McNamara <caolanm@redhat.com>
+Date: Tue, 05 Apr 2011 14:07:02 +0000
+Subject: silence some more of that annoying gcc#47679
+
+---
+diff --git a/boost/boost.gcc47679.patch b/boost/boost.gcc47679.patch
+index 1c804aa..9b33a5f 100644
+--- a/boost/boost.gcc47679.patch
++++ b/boost/boost.gcc47679.patch
+@@ -36,3 +36,26 @@
+ template <int MaxDigits>
+ inline bool allow_more_digits(std::size_t i)
+ {
++--- misc/boost_1_44_0/boost/optional/optional.hpp 2011-04-05 13:19:01.223587256 +0100
+++++ misc/build/boost_1_44_0/boost/optional/optional.hpp 2011-04-05 13:19:01.223587256 +0100
++@@ -31,6 +31,8 @@
++
++ #include "boost/optional/optional_fwd.hpp"
++
+++#include <string.h>
+++
++ #if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
++ // VC6.0 has the following bug:
++ // When a templated assignment operator exist, an implicit conversion
++@@ -114,6 +116,11 @@
++
++ public:
++
+++ aligned_storage()
+++ {
+++ memset(&dummy_, 0, sizeof(dummy_));
+++ }
+++
++ void const* address() const { return &dummy_.data[0]; }
++ void * address() { return &dummy_.data[0]; }
++ } ;
+--
+cgit v0.8.3-6-g21f6
+
diff --git a/staging/libreoffice/buildfix_ct2n.diff b/staging/libreoffice/buildfix_ct2n.diff
new file mode 100644
index 000000000..979587f79
--- /dev/null
+++ b/staging/libreoffice/buildfix_ct2n.diff
@@ -0,0 +1,17 @@
+From 90de903b28cb1884042be0eae3f8a55458c5bc29 Mon Sep 17 00:00:00 2001
+From: Caolán McNamara <caolanm@redhat.com>
+Date: Tue, 12 Apr 2011 19:35:51 +0000
+Subject: duplicate NULLs
+
+---
+diff --git a/ct2n/prj/build.lst b/ct2n/prj/build.lst
+index 91f44b7..714d926 100644
+--- a/ct2n/prj/build.lst
++++ b/ct2n/prj/build.lst
+@@ -1,3 +1,3 @@
+-ct2n ct2n : solenv NULL NULL
++ct2n ct2n : solenv NULL
+ ct2n ct2n usr1 - all ct2n_mkout NULL
+ ct2n ct2n nmake - all ct2n_ct2n NULL
+--
+cgit v0.8.3-6-g21f6
diff --git a/staging/libreoffice/buildfix_i116795.diff b/staging/libreoffice/buildfix_i116795.diff
new file mode 100644
index 000000000..8601bc164
--- /dev/null
+++ b/staging/libreoffice/buildfix_i116795.diff
@@ -0,0 +1,22 @@
+diff -r 4ab9e11cb892 connectivity/qa/makefile.mk
+--- a/connectivity/qa/makefile.mk Thu Mar 03 15:22:23 2011 +0100
++++ b/connectivity/qa/makefile.mk Fri Mar 04 09:51:48 2011 +0100
+@@ -35,9 +35,16 @@
+
+ #----- compile .java files -----------------------------------------
+
+-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar hsqldb.jar
+ JAVAFILES := $(shell @$(FIND) complex -name "*.java")
+
++JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
++
++.IF "$(SYSTEM_HSQLDB)" == "YES"
++EXTRAJARFILES = $(HSQLDB_JAR)
++.ELSE
++JARFILES += hsqldb.jar
++.ENDIF
++
+ #----- make a jar from compiled files ------------------------------
+
+ JARCLASSDIRS = $(PACKAGE)
+
diff --git a/staging/libreoffice/libreoffice.install b/staging/libreoffice/libreoffice.install
new file mode 100644
index 000000000..27f3173ae
--- /dev/null
+++ b/staging/libreoffice/libreoffice.install
@@ -0,0 +1,25 @@
+post_install() {
+
+gtk-update-icon-cache -f -q /usr/share/icons/hicolor
+update-desktop-database -q
+update-mime-database usr/share/mime > /dev/null 2>&1
+
+echo " * see http://wiki.archlinux.org/index.php/Openoffice"
+echo " * you may want to pacman -Ss libreoffice-extensions"
+echo " to see what extensions are prepared to install"
+echo " * it's recommended to install {hunspell,mythes,hyphen}-xx pkg for spell checking"
+echo " * make sure you have installed some ttf font (ttf-dejavu recommended)"
+}
+
+post_upgrade() {
+# post_install $1
+gtk-update-icon-cache -f -q /usr/share/icons/hicolor
+update-desktop-database -q
+update-mime-database usr/share/mime > /dev/null 2>&1
+}
+
+post_remove() {
+update-desktop-database -q
+gtk-update-icon-cache -f -q /usr/share/icons/hicolor
+update-mime-database usr/share/mime > /dev/null 2>&1
+}
diff --git a/staging/libreoffice/vbahelper.visibility.patch b/staging/libreoffice/vbahelper.visibility.patch
new file mode 100644
index 000000000..5739100d0
--- /dev/null
+++ b/staging/libreoffice/vbahelper.visibility.patch
@@ -0,0 +1,33 @@
+--- vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:27:51.507604173 +0000
++++ vbahelper/inc/vbahelper/vbacollectionimpl.hxx 2011-01-28 20:28:26.230045727 +0000
+@@ -238,7 +238,7 @@
+
+ // including a HelperInterface implementation
+ template< typename Ifc1 >
+-class ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
++class VBAHELPER_DLLPUBLIC ScVbaCollectionBase : public InheritedHelperInterfaceImpl< Ifc1 >
+ {
+ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseColBase;
+ protected:
+--- sc/Library_vbaobj.mk
++++ sc/Library_vbaobj.mk
+@@ -118,7 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
+ sc/source/ui/vba/vbaquerytable \
+ sc/source/ui/vba/vbarange \
+ sc/source/ui/vba/vbasheetobject \
+- sc/source/ui/vba/vbasheetobjects \
+ sc/source/ui/vba/vbastyle \
+ sc/source/ui/vba/vbastyles \
+ sc/source/ui/vba/vbatextboxshape \
+@@ -133,6 +132,11 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\
+ sc/source/ui/vba/vbawsfunction \
+ ))
+
++$(eval $(call gb_Library_add_cxxobjects,vbaobj,\
++ sc/source/ui/vba/vbasheetobjects \
++ , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
++))
++
+ ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
+ $(eval $(call gb_Library_set_ldflags,vbaobj,\
+ $$(LDFLAGS) \
diff --git a/staging/libwebkit/PKGBUILD b/staging/libwebkit/PKGBUILD
new file mode 100644
index 000000000..032056ae3
--- /dev/null
+++ b/staging/libwebkit/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 126165 2011-06-01 22:31:25Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgbase=libwebkit
+pkgname=(libwebkit libwebkit3)
+pkgver=1.4.0
+pkgrel=2
+pkgdesc="An opensource web content engine"
+arch=('i686' 'x86_64')
+url="http://webkitgtk.org/"
+license=('custom')
+depends=('libxt' 'libxslt' 'sqlite3' 'icu' 'gstreamer0.10-base' 'libsoup' 'enchant')
+makedepends=('gperf' 'gtk-doc' 'gobject-introspection' 'python2' 'gtk2' 'gtk3')
+options=('!libtool')
+install=libwebkit.install
+source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz
+ gcc46.patch
+ replace-switch-with-given-when.patch)
+md5sums=('10c969db3b5484c71df1aa9a338377ff'
+ '970a2fa91b9827dff8e9b9edb4867701'
+ '3ba708a26b7af0e1e853867966fe14f7')
+
+build() {
+ cd "${srcdir}/webkit-${pkgver}"
+ patch -Np1 -i "${srcdir}/gcc46.patch"
+ patch -Np1 -i "${srcdir}/replace-switch-with-given-when.patch"
+ mkdir build-gtk{2,3}
+
+ ( cd build-gtk2 && _build --with-gtk=2.0 )
+ ( cd build-gtk3 && _build --with-gtk=3.0 )
+}
+
+_build() {
+ PYTHON=/usr/bin/python2 ../configure --prefix=/usr \
+ --enable-introspection \
+ --with-font-backend=freetype --enable-gtk-doc \
+ --with-unicode-backend=icu \
+ --enable-spellcheck "$@"
+ make all stamp-po
+}
+
+package_libwebkit() {
+ pkgdesc+=" (for GTK2)"
+ depends+=(gtk2)
+ provides=('webkitgtk-svn')
+ conflicts=('webkitgtk-svn')
+ replaces=('webkitgtk-svn')
+
+ cd "$srcdir/webkit-$pkgver/build-gtk2"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE"
+}
+
+package_libwebkit3() {
+ pkgdesc+=" (for GTK3)"
+ depends+=(gtk3)
+
+ cd "${srcdir}/webkit-${pkgver}/build-gtk3"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
+}
diff --git a/staging/libwebkit/gcc46.patch b/staging/libwebkit/gcc46.patch
new file mode 100644
index 000000000..befd892d4
--- /dev/null
+++ b/staging/libwebkit/gcc46.patch
@@ -0,0 +1,11 @@
+Index: trunk/Source/WebCore/dom/make_names.pl
+===================================================================
+--- trunk/Source/WebCore/dom/make_names.pl (revision 73989)
++++ trunk/Source/WebCore/dom/make_names.pl (revision 84123)
+@@ -66,5 +66,5 @@
+ $gccLocation = "/usr/bin/gcc";
+ }
+-my $preprocessor = $gccLocation . " -E -P -x c++";
++my $preprocessor = $gccLocation . " -E -x c++";
+
+ GetOptions(
diff --git a/staging/libwebkit/libwebkit.install b/staging/libwebkit/libwebkit.install
new file mode 100644
index 000000000..24072f316
--- /dev/null
+++ b/staging/libwebkit/libwebkit.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/libwebkit/replace-switch-with-given-when.patch b/staging/libwebkit/replace-switch-with-given-when.patch
new file mode 100644
index 000000000..4e64610bb
--- /dev/null
+++ b/staging/libwebkit/replace-switch-with-given-when.patch
@@ -0,0 +1,45 @@
+diff -upr webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl webkit-1.4.0/Source/WebCore/make-hash-tools.pl
+--- webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl 2011-04-25 22:27:15.000000000 +0300
++++ webkit-1.4.0/Source/WebCore/make-hash-tools.pl 2011-06-02 00:41:26.000000000 +0300
+@@ -20,7 +20,7 @@
+ # Boston, MA 02110-1301, USA.
+
+ use strict;
+-use Switch;
++use feature 'switch';
+ use File::Basename;
+
+ my $outdir = $ARGV[0];
+@@ -28,9 +28,9 @@ shift;
+ my $option = basename($ARGV[0],".gperf");
+
+
+-switch ($option) {
++given ($option) {
+
+-case "DocTypeStrings" {
++when ("DocTypeStrings") {
+
+ my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp";
+ my $docTypeStringsGperf = $ARGV[0];
+@@ -38,9 +38,9 @@ case "DocTypeStrings" {
+
+ system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
+
+-} # case "DocTypeStrings"
++} # when ("DocTypeStrings")
+
+-case "ColorData" {
++when ("ColorData") {
+
+ my $colorDataGenerated = "$outdir/ColorData.cpp";
+ my $colorDataGperf = $ARGV[0];
+@@ -48,6 +48,6 @@ case "ColorData" {
+
+ system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
+
+-} # case "ColorData"
++} # when ("ColorData")
+
+-} # switch ($option)
++} # given ($option)
diff --git a/staging/php/PKGBUILD b/staging/php/PKGBUILD
new file mode 100644
index 000000000..ccbaae0cd
--- /dev/null
+++ b/staging/php/PKGBUILD
@@ -0,0 +1,379 @@
+# $Id: PKGBUILD 126095 2011-06-01 12:12:00Z pierre $
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=php
+pkgname=('php'
+ 'php-cgi'
+ 'php-apache'
+ 'php-fpm'
+ 'php-embed'
+ 'php-pear'
+ 'php-curl'
+ 'php-enchant'
+ 'php-gd'
+ 'php-gmp'
+ 'php-intl'
+ 'php-ldap'
+ 'php-mcrypt'
+ 'php-mssql'
+ 'php-odbc'
+ 'php-pgsql'
+ 'php-pspell'
+ 'php-snmp'
+ 'php-sqlite'
+ 'php-tidy'
+ 'php-xsl')
+pkgver=5.3.6
+pkgrel=4
+_suhosinver=${pkgver}-0.9.10
+arch=('i686' 'x86_64')
+license=('PHP')
+url='http://www.php.net'
+makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'postfix'
+ 'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds'
+ 'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'libpng' 'libjpeg' 'icu'
+ 'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp' 'freetype2')
+source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
+ "suhosin-patch-${_suhosinver}.patch.gz"
+ 'php.ini.patch' 'apache.conf' 'rc.d.php-fpm' 'php-fpm.conf.in.patch'
+ 'logrotate.d.php-fpm')
+md5sums=('2286f5a82a6e8397955a0025c1c2ad98'
+ 'fff1a38877142f3ae6036dbe5a85d0a6'
+ '39eaa70d276fc3d45d6bcf6cd5ae1106'
+ 'dec2cbaad64e3abf4f0ec70e1de4e8e9'
+ 'b01be5f816988fcee7e78225836e5e27'
+ 'd50ff349da08110a7cc8c691ce2d0423'
+ '07c4e412909ac65a44ec90e7a2c4bade')
+
+build() {
+ # ldap-sasl does not compile with --as-needed
+ export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
+ export LDFLAGS="${LDFLAGS//,--as-needed}"
+
+ phpconfig="--srcdir=../${pkgbase}-${pkgver} \
+ --prefix=/usr \
+ --sysconfdir=/etc/php \
+ --localstatedir=/var \
+ --with-layout=GNU \
+ --with-config-file-path=/etc/php \
+ --with-config-file-scan-dir=/etc/php/conf.d \
+ --enable-inline-optimization \
+ --disable-debug \
+ --disable-rpath \
+ --disable-static \
+ --enable-shared \
+ --mandir=/usr/share/man \
+ --without-pear \
+ "
+
+ phpextensions="--enable-bcmath=shared \
+ --enable-calendar=shared \
+ --enable-dba=shared \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --enable-gd-native-ttf \
+ --enable-intl=shared \
+ --enable-json=shared \
+ --enable-mbregex \
+ --enable-mbstring \
+ --enable-pdo \
+ --enable-phar=shared \
+ --enable-posix=shared \
+ --enable-session \
+ --enable-shmop=shared \
+ --enable-soap=shared \
+ --enable-sockets=shared \
+ --enable-sqlite-utf8 \
+ --enable-sysvmsg=shared \
+ --enable-sysvsem=shared \
+ --enable-sysvshm=shared \
+ --enable-xml \
+ --enable-zip=shared \
+ --with-bz2=shared \
+ --with-curl=shared \
+ --with-db4=/usr \
+ --with-enchant=shared,/usr \
+ --with-freetype-dir=shared,/usr \
+ --with-gd=shared \
+ --with-gdbm=shared \
+ --with-gettext=shared \
+ --with-gmp=shared \
+ --with-iconv=shared \
+ --with-icu-dir=/usr \
+ --with-imap-ssl=shared \
+ --with-imap=shared \
+ --with-jpeg-dir=shared,/usr \
+ --with-ldap=shared \
+ --with-ldap-sasl \
+ --with-mcrypt=shared \
+ --with-mhash \
+ --with-mssql=shared \
+ --with-mysql-sock=/var/run/mysqld/mysqld.sock \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-openssl=shared \
+ --with-pcre-regex=/usr \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-odbc=shared,unixODBC,/usr \
+ --with-pdo-pgsql=shared \
+ --with-pdo-sqlite=shared,/usr \
+ --with-pgsql=shared \
+ --with-png-dir=shared,/usr \
+ --with-pspell=shared \
+ --with-regex=php \
+ --with-snmp=shared \
+ --with-sqlite3=shared,/usr \
+ --with-sqlite=shared \
+ --with-tidy=shared \
+ --with-unixODBC=shared,/usr \
+ --with-xmlrpc=shared \
+ --with-xsl=shared \
+ --with-zlib \
+ --without-db2 \
+ --without-db3 \
+ "
+
+ EXTENSION_DIR=/usr/lib/php/modules
+ export EXTENSION_DIR
+ PEAR_INSTALLDIR=/usr/share/pear
+ export PEAR_INSTALLDIR
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+
+ # apply suhosin patch
+ patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch
+
+ # adjust paths
+ patch -p0 -i ${srcdir}/php.ini.patch
+ patch -p0 -i ${srcdir}/php-fpm.conf.in.patch
+
+ # php
+ mkdir ${srcdir}/build-php
+ cd ${srcdir}/build-php
+ ln -s ../${pkgbase}-${pkgver}/configure
+ ./configure ${phpconfig} \
+ --disable-cgi \
+ --with-readline \
+ --enable-pcntl \
+ ${phpextensions}
+ make
+
+ # cgi and fcgi
+ # reuse the previous run; this will save us a lot of time
+ cp -a ${srcdir}/build-php ${srcdir}/build-cgi
+ cd ${srcdir}/build-cgi
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --enable-cgi \
+ ${phpextensions}
+ make
+
+ # apache
+ cp -a ${srcdir}/build-php ${srcdir}/build-apache
+ cd ${srcdir}/build-apache
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --with-apxs2 \
+ ${phpextensions}
+ make
+
+ # fpm
+ cp -a ${srcdir}/build-php ${srcdir}/build-fpm
+ cd ${srcdir}/build-fpm
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --enable-fpm \
+ --with-fpm-user=http \
+ --with-fpm-group=http \
+ ${phpextensions}
+ make
+
+ # embed
+ cp -a ${srcdir}/build-php ${srcdir}/build-embed
+ cd ${srcdir}/build-embed
+ ./configure ${phpconfig} \
+ --disable-cli \
+ --enable-embed=shared \
+ ${phpextensions}
+ make
+
+ # pear
+ cp -a ${srcdir}/build-php ${srcdir}/build-pear
+ cd ${srcdir}/build-pear
+ ./configure ${phpconfig} \
+ --disable-cgi \
+ --with-readline \
+ --enable-pcntl \
+ --with-pear \
+ ${phpextensions}
+ make
+}
+
+# check() {
+# cd ${srcdir}/build-php
+# make test
+# }
+
+package_php() {
+ pkgdesc='An HTML-embedded scripting language'
+ depends=('pcre' 'libxml2' 'bzip2' 'openssl')
+ replaces=('php-fileinfo')
+ provides=('php-fileinfo')
+ conflicts=('php-fileinfo')
+ backup=('etc/php/php.ini')
+
+ cd ${srcdir}/build-php
+ make -j1 INSTALL_ROOT=${pkgdir} install
+ install -d -m755 ${pkgdir}/usr/share/pear
+ # install php.ini
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini
+ install -d -m755 ${pkgdir}/etc/php/conf.d/
+
+ # remove static modules
+ rm -f ${pkgdir}/usr/lib/php/modules/*.a
+ # remove modules provided by sub packages
+ rm -f ${pkgdir}/usr/lib/php/modules/{curl,enchant,gd,gmp,intl,ldap,mcrypt,mssql,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
+}
+
+package_php-cgi() {
+ pkgdesc='CGI and FCGI SAPI for PHP'
+ depends=('php' 'pcre' 'libxml2')
+
+ install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
+}
+
+package_php-apache() {
+ pkgdesc='Apache SAPI for PHP'
+ depends=('php' 'apache' 'pcre' 'libxml2')
+ backup=('etc/httpd/conf/extra/php5_module.conf')
+
+ install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
+ install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf
+}
+
+package_php-fpm() {
+ pkgdesc='FastCGI Process Manager for PHP'
+ depends=('php')
+ backup=('etc/php/php-fpm.conf')
+
+ install -D -m755 ${srcdir}/build-fpm/sapi/fpm/php-fpm ${pkgdir}/usr/sbin/php-fpm
+ install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.8 ${pkgdir}/usr/share/man/man8/php-fpm.8
+ install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.conf ${pkgdir}/etc/php/php-fpm.conf
+ install -D -m755 ${srcdir}/rc.d.php-fpm ${pkgdir}/etc/rc.d/php-fpm
+ install -D -m644 ${srcdir}/logrotate.d.php-fpm ${pkgdir}/etc/logrotate.d/php-fpm
+ install -d -m755 ${pkgdir}/etc/php/fpm.d
+}
+
+package_php-embed() {
+ pkgdesc='Embed SAPI for PHP'
+ depends=('php' 'pcre' 'libxml2')
+
+ install -D -m755 ${srcdir}/build-embed/libs/libphp5.so ${pkgdir}/usr/lib/libphp5.so
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/sapi/embed/php_embed.h ${pkgdir}/usr/include/php/sapi/embed/php_embed.h
+}
+
+package_php-pear() {
+ pkgdesc='PHP Extension and Application Repository'
+ depends=('php' 'bash')
+ backup=('etc/php/pear.conf')
+
+ cd ${srcdir}/build-pear
+ make -j1 install-pear INSTALL_ROOT=${pkgdir}
+ local i
+ while read i; do
+ [ ! -e "$i" ] || rm -rf "$i"
+ done < <(find ${pkgdir} -name '.*')
+}
+
+package_php-curl() {
+ depends=('php' 'curl')
+ pkgdesc='curl module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/curl.so ${pkgdir}/usr/lib/php/modules/curl.so
+}
+
+package_php-enchant() {
+ depends=('php' 'enchant')
+ pkgdesc='enchant module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
+}
+
+package_php-gd() {
+ depends=('php' 'libpng' 'libjpeg' 'freetype2')
+ pkgdesc='gd module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
+}
+
+package_php-gmp() {
+ depends=('php' 'gmp')
+ pkgdesc='gmp module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/gmp.so ${pkgdir}/usr/lib/php/modules/gmp.so
+}
+
+package_php-intl() {
+ depends=('php' 'icu')
+ pkgdesc='intl module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
+}
+
+package_php-ldap() {
+ depends=('php' 'libldap')
+ pkgdesc='ldap module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so
+}
+
+package_php-mcrypt() {
+ depends=('php' 'libmcrypt' 'libtool')
+ pkgdesc='mcrypt module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
+}
+
+package_php-mssql() {
+ depends=('php' 'freetds')
+ pkgdesc='mssql module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/mssql.so ${pkgdir}/usr/lib/php/modules/mssql.so
+}
+
+package_php-odbc() {
+ depends=('php' 'unixodbc')
+ pkgdesc='ODBC modules for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
+ install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
+}
+
+package_php-pgsql() {
+ depends=('php' 'postgresql-libs')
+ pkgdesc='PostgreSQL modules for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
+ install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
+}
+
+package_php-pspell() {
+ depends=('php' 'aspell')
+ pkgdesc='pspell module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
+}
+
+package_php-snmp() {
+ depends=('php' 'net-snmp')
+ pkgdesc='snmp module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
+}
+
+package_php-sqlite() {
+ depends=('php' 'sqlite3')
+ pkgdesc='sqlite3 module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
+ install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
+}
+
+package_php-tidy() {
+ depends=('php' 'tidyhtml')
+ pkgdesc='tidy module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
+}
+
+package_php-xsl() {
+ depends=('php' 'libxslt')
+ pkgdesc='xsl module for PHP'
+ install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
+}
diff --git a/staging/php/apache.conf b/staging/php/apache.conf
new file mode 100644
index 000000000..c3ca0aad5
--- /dev/null
+++ b/staging/php/apache.conf
@@ -0,0 +1,13 @@
+# Required modules: dir_module, php5_module
+
+<IfModule dir_module>
+ <IfModule php5_module>
+ DirectoryIndex index.php index.html
+ <FilesMatch "\.php$">
+ SetHandler application/x-httpd-php
+ </FilesMatch>
+ <FilesMatch "\.phps$">
+ SetHandler application/x-httpd-php-source
+ </FilesMatch>
+ </IfModule>
+</IfModule>
diff --git a/staging/php/logrotate.d.php-fpm b/staging/php/logrotate.d.php-fpm
new file mode 100644
index 000000000..7a1ba2597
--- /dev/null
+++ b/staging/php/logrotate.d.php-fpm
@@ -0,0 +1,6 @@
+/var/log/php-fpm.log {
+ missingok
+ postrotate
+ /etc/rc.d/php-fpm logrotate >/dev/null || true
+ endscript
+}
diff --git a/staging/php/php-fpm.conf.in.patch b/staging/php/php-fpm.conf.in.patch
new file mode 100644
index 000000000..93c62430a
--- /dev/null
+++ b/staging/php/php-fpm.conf.in.patch
@@ -0,0 +1,80 @@
+--- sapi/fpm/php-fpm.conf.in 2010-12-11 08:31:47.695294987 +0100
++++ sapi/fpm/php-fpm.conf.in 2010-12-11 08:31:55.907812237 +0100
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p arguement)
+ ; - @prefix@ otherwise
+-;include=etc/fpm.d/*.conf
++;include=/etc/php/fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,7 +22,7 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = run/php-fpm/php-fpm.pid
+
+ ; Error log file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+@@ -93,7 +93,8 @@
+ ; specific port;
+ ; '/path/to/unix/socket' - to listen on a unix socket.
+ ; Note: This value is mandatory.
+-listen = 127.0.0.1:9000
++;listen = 127.0.0.1:9000
++listen = /var/run/php-fpm/php-fpm.sock
+
+ ; Set listen(2) backlog. A value of '-1' means unlimited.
+ ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+@@ -112,9 +113,9 @@
+ ; BSD-derived systems allow connections regardless of permissions.
+ ; Default Values: user and group are set as the running user
+ ; mode is set to 0666
+-;listen.owner = @php_fpm_user@
+-;listen.group = @php_fpm_group@
+-;listen.mode = 0666
++listen.owner = @php_fpm_user@
++listen.group = @php_fpm_group@
++listen.mode = 0660
+
+ ; Unix user/group of processes
+ ; Note: The user is mandatory. If the group is not set, the default user's group
+@@ -154,23 +155,23 @@
+ ; The number of child processes created on startup.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+-;pm.start_servers = 20
++pm.start_servers = 20
+
+ ; The desired minimum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.min_spare_servers = 5
++pm.min_spare_servers = 5
+
+ ; The desired maximum number of idle server processes.
+ ; Note: Used only when pm is set to 'dynamic'
+ ; Note: Mandatory when pm is set to 'dynamic'
+-;pm.max_spare_servers = 35
++pm.max_spare_servers = 35
+
+ ; The number of requests each child process should execute before respawning.
+ ; This can be useful to work around memory leaks in 3rd party libraries. For
+ ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+ ; Default Value: 0
+-;pm.max_requests = 500
++pm.max_requests = 500
+
+ ; The URI to view the FPM status page. If this value is not set, no URI will be
+ ; recognized as a status page. By default, the status page shows the following
+@@ -264,7 +265,7 @@
+ ; Chdir to this directory at the start.
+ ; Note: relative path can be used.
+ ; Default Value: current directory or / when chroot
+-;chdir = /var/www
++;chdir = /srv/http
+
+ ; Redirect worker stdout and stderr into main error log. If not set, stdout and
+ ; stderr will be redirected to /dev/null according to FastCGI specs.
diff --git a/staging/php/php.ini.patch b/staging/php/php.ini.patch
new file mode 100644
index 000000000..356e190b4
--- /dev/null
+++ b/staging/php/php.ini.patch
@@ -0,0 +1,126 @@
+--- php.ini-production 2011-02-09 01:25:44.000000000 +0100
++++ php.ini-production 2011-03-19 11:11:44.496987763 +0100
+@@ -376,7 +376,7 @@
+ ; or per-virtualhost web server configuration file. This directive is
+ ; *NOT* affected by whether Safe Mode is turned On or Off.
+ ; http://php.net/open-basedir
+-;open_basedir =
++open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/
+
+ ; This directive allows you to disable certain functions for security reasons.
+ ; It receives a comma-delimited list of function names. This directive is
+@@ -781,7 +781,7 @@
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/pear"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -804,7 +804,7 @@
+
+ ; Directory in which the loadable extensions (modules) reside.
+ ; http://php.net/extension-dir
+-; extension_dir = "./"
++extension_dir = "/usr/lib/php/modules/"
+ ; On windows:
+ ; extension_dir = "ext"
+
+@@ -938,53 +938,49 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
+-; Windows Extensions
+-; Note that ODBC support is built in, so no dll is needed for it.
+-; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+-; extension folders as well as the separate PECL DLL download (PHP 5).
+-; Be sure to appropriately set the extension_dir directive.
+-;
+-;extension=php_bz2.dll
+-;extension=php_curl.dll
+-;extension=php_fileinfo.dll
+-;extension=php_gd2.dll
+-;extension=php_gettext.dll
+-;extension=php_gmp.dll
+-;extension=php_intl.dll
+-;extension=php_imap.dll
+-;extension=php_interbase.dll
+-;extension=php_ldap.dll
+-;extension=php_mbstring.dll
+-;extension=php_exif.dll ; Must be after mbstring as it depends on it
+-;extension=php_mysql.dll
+-;extension=php_mysqli.dll
+-;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
+-;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
+-;extension=php_openssl.dll
+-;extension=php_pdo_firebird.dll
+-;extension=php_pdo_mssql.dll
+-;extension=php_pdo_mysql.dll
+-;extension=php_pdo_oci.dll
+-;extension=php_pdo_odbc.dll
+-;extension=php_pdo_pgsql.dll
+-;extension=php_pdo_sqlite.dll
+-;extension=php_pgsql.dll
+-;extension=php_pspell.dll
+-;extension=php_shmop.dll
+-
+-; The MIBS data available in the PHP distribution must be installed.
+-; See http://www.php.net/manual/en/snmp.installation.php
+-;extension=php_snmp.dll
+-
+-;extension=php_soap.dll
+-;extension=php_sockets.dll
+-;extension=php_sqlite.dll
+-;extension=php_sqlite3.dll
+-;extension=php_sybase_ct.dll
+-;extension=php_tidy.dll
+-;extension=php_xmlrpc.dll
+-;extension=php_xsl.dll
+-;extension=php_zip.dll
++;extension=bcmath.so
++;extension=bz2.so
++;extension=calendar.so
++;extension=curl.so
++;extension=dba.so
++;extension=enchant.so
++;extension=exif.so
++;extension=ftp.so
++;extension=gd.so
++extension=gettext.so
++;extension=gmp.so
++;extension=iconv.so
++;extension=imap.so
++;extension=intl.so
++;extension=json.so
++;extension=ldap.so
++;extension=mcrypt.so
++;extension=mssql.so
++;extension=mysqli.so
++;extension=mysql.so
++;extension=odbc.so
++;extension=openssl.so
++;extension=pdo_mysql.so
++;extension=pdo_odbc.so
++;extension=pdo_pgsql.so
++;extension=pdo_sqlite.so
++;extension=pgsql.so
++;extension=phar.so
++;extension=posix.so
++;extension=pspell.so
++;extension=shmop.so
++;extension=snmp.so
++;extension=soap.so
++;extension=sockets.so
++;extension=sqlite3.so
++;extension=sqlite.so
++;extension=sysvmsg.so
++;extension=sysvsem.so
++;extension=sysvshm.so
++;extension=tidy.so
++;extension=xmlrpc.so
++;extension=xsl.so
++;extension=zip.so
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ;
diff --git a/staging/php/rc.d.php-fpm b/staging/php/rc.d.php-fpm
new file mode 100644
index 000000000..54bcf4d5b
--- /dev/null
+++ b/staging/php/rc.d.php-fpm
@@ -0,0 +1,158 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+wait_for_pid () {
+ try=0
+ while test $try -lt 35 ; do
+ case "$1" in
+ 'created')
+ if [ -f "$2" ] ; then
+ try=''
+ break
+ fi
+ ;;
+ 'removed')
+ if [ ! -f "$2" ] ; then
+ try=''
+ break
+ fi
+ ;;
+ esac
+
+ stat_append '.'
+ try=`expr $try + 1`
+ sleep 1
+ done
+}
+
+test_config() {
+ stat_busy 'Checking configuration'
+ if [ $(id -u) -ne 0 ]; then
+ stat_append '(This script must be run as root)'
+ stat_die
+ fi
+
+ if [ ! -r /etc/php/php-fpm.conf ]; then
+ stat_append '(/etc/php/php-fpm.conf not found)'
+ stat_die
+ fi
+
+ local test=$(/usr/sbin/php-fpm -t 2>&1)
+ if [ $? -gt 0 ]; then
+ stat_append '(error in /etc/php/php-fpm.conf)'
+ stat_die
+ elif echo $test | grep -qi 'error'; then
+ stat_append '(error in /etc/php/php.ini)'
+ stat_die
+ fi
+
+ [ -d /var/run/php-fpm ] || install -d -m755 /var/run/php-fpm
+
+ stat_done
+}
+
+case "$1" in
+ start)
+ test_config
+ stat_busy 'Starting php-fpm'
+
+ /usr/sbin/php-fpm
+
+ if [ "$?" != 0 ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ wait_for_pid created /var/run/php-fpm/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ add_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ stop)
+ test_config
+ stat_busy 'Gracefully shutting down php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -QUIT `cat /var/run/php-fpm/php-fpm.pid`
+
+ wait_for_pid removed /var/run/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ force-quit)
+ stat_busy 'Terminating php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -TERM `cat /var/run/php-fpm/php-fpm.pid`
+
+ wait_for_pid removed /var/run/php-fpm/php-fpm.pid
+
+ if [ -n "$try" ] ; then
+ stat_fail
+ exit 1
+ else
+ rm_daemon php-fpm
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ reload)
+ test_config
+ stat_busy 'Reload service php-fpm'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -USR2 `cat /var/run/php-fpm/php-fpm.pid`
+ stat_done
+ ;;
+
+ logrotate)
+ stat_busy 'Reopen php-fpm log'
+
+ if [ ! -r /var/run/php-fpm/php-fpm.pid ] ; then
+ stat_fail
+ exit 1
+ fi
+
+ kill -USR1 `cat /var/run/php-fpm/php-fpm.pid`
+ stat_done
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|force-quit|restart|reload|logrotate}"
+ exit 1
+ ;;
+
+esac
diff --git a/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz b/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz
new file mode 100644
index 000000000..7167ce2d0
--- /dev/null
+++ b/staging/php/suhosin-patch-5.3.6-0.9.10.patch.gz
Binary files differ
diff --git a/staging/xulrunner/PKGBUILD b/staging/xulrunner/PKGBUILD
new file mode 100644
index 000000000..d9ad07e87
--- /dev/null
+++ b/staging/xulrunner/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 126161 2011-06-01 20:45:14Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+pkgname=xulrunner
+pkgver=2.0.1
+_ffoxver=4.0.1
+pkgrel=2
+pkgdesc="Mozilla Runtime Environment"
+arch=('i686' 'x86_64')
+license=('MPL' 'GPL' 'LGPL')
+depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'libevent' 'sqlite3>=3.7.4' 'libnotify')
+makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa')
+url="http://wiki.mozilla.org/XUL:Xul_Runner"
+source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
+ mozconfig
+ mozilla-pkgconfig.patch
+ xulrunner-version.patch
+ xulrunner-omnijar.patch
+ port_gnomevfs_to_gio.patch)
+options=('!emptydirs')
+md5sums=('9abda7d23151e97913c8555a64c13f34'
+ '2358a2ddd35bcdd62ff42442dfe548d9'
+ '639ea80e823543dd415b90c0ee804186'
+ 'a0236f6c3e55f60b7888d8cf137ff209'
+ '0bf82bc6677e3ce57fd20a147fe8d7b1'
+ '42f83468b296452fb754a81a4317ca64')
+build() {
+ cd "${srcdir}/mozilla-2.0"
+ cp "${srcdir}/mozconfig" .mozconfig
+
+ #fix libdir/sdkdir - fedora
+ patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch"
+
+ #Force installation to the same path for every version
+ patch -Np1 -i "${srcdir}/xulrunner-version.patch"
+
+ #https://bugzilla.mozilla.org/show_bug.cgi?id=620931
+ patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch"
+
+ #https://bugzilla.mozilla.org/show_bug.cgi?id=494163
+ patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch"
+
+ unset CFLAGS
+ unset CXXFLAGS
+
+ export CXXFLAGS="-fpermissive"
+
+ make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
+}
+
+package() {
+ cd "${srcdir}/mozilla-2.0"
+ make -j1 -f client.mk DESTDIR="${pkgdir}" install
+
+ #Remove included dictionaries, add symlink to system myspell path.
+ #Note: this will cause file conflicts when users have installed dictionaries in the old location
+ rm -rf "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
+ ln -sf /usr/share/myspell/dicts "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
+
+ # add xulrunner library path to ld.so.conf
+ install -d ${pkgdir}/etc/ld.so.conf.d
+ echo "/usr/lib/xulrunner-2.0" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf
+}
diff --git a/staging/xulrunner/mozconfig b/staging/xulrunner/mozconfig
new file mode 100644
index 000000000..03a352920
--- /dev/null
+++ b/staging/xulrunner/mozconfig
@@ -0,0 +1,56 @@
+. $topsrcdir/xulrunner/config/mozconfig
+
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-system-png
+ac_add_options --with-system-libevent
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-cairo
+ac_add_options --with-pthreads
+
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-extensions=default
+ac_add_options --enable-startup-notification
+ac_add_options --enable-pango
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-smil
+ac_add_options --enable-canvas3d
+ac_add_options --enable-places
+ac_add_options --enable-shared-js
+ac_add_options --enable-url-classifier
+
+ac_add_options --enable-optimize
+ac_add_options --enable-strip
+ac_add_options --enable-install-strip
+ac_add_options --enable-jemalloc
+ac_add_options --enable-xterm-updates
+ac_add_options --enable-printing
+ac_add_options --enable-xinerama
+
+ac_add_options --disable-javaxpcom
+ac_add_options --disable-crashreporter
+ac_add_options --disable-updater
+ac_add_options --disable-tests
+ac_add_options --disable-xprint
+ac_add_options --disable-mochitest
+ac_add_options --disable-debug
+ac_add_options --disable-installer
+ac_add_options --disable-pedantic
+
+ac_add_options --enable-gio
+ac_add_options --disable-gnomevfs
+ac_add_options --enable-gconf
+ac_add_options --enable-libnotify
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
diff --git a/staging/xulrunner/mozilla-pkgconfig.patch b/staging/xulrunner/mozilla-pkgconfig.patch
new file mode 100644
index 000000000..2203efcde
--- /dev/null
+++ b/staging/xulrunner/mozilla-pkgconfig.patch
@@ -0,0 +1,60 @@
+diff -Nur mozilla-2.0.orig/xulrunner/installer/libxul-embedding.pc.in mozilla-2.0/xulrunner/installer/libxul-embedding.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/libxul-embedding.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/libxul-embedding.pc.in 2011-03-13 03:25:12.350027359 -0700
+@@ -6,5 +6,6 @@
+ Name: libxul-embedding
+ Description: Static library for version-independent embedding of the Mozilla runtime
+ Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib -lxpcomglue -ldl
+ Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
+diff -Nur mozilla-2.0.orig/xulrunner/installer/libxul.pc.in mozilla-2.0/xulrunner/installer/libxul.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/libxul.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/libxul.pc.in 2011-03-13 03:25:28.010027359 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+ idldir=%idldir%
+
+diff -Nur mozilla-2.0.orig/xulrunner/installer/Makefile.in mozilla-2.0/xulrunner/installer/Makefile.in
+--- mozilla-2.0.orig/xulrunner/installer/Makefile.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/Makefile.in 2011-03-13 03:25:55.570027359 -0700
+@@ -121,6 +121,7 @@
+ -e "s|%includedir%|$(includedir)|" \
+ -e "s|%idldir%|$(idldir)|" \
+ -e "s|%sdkdir%|$(sdkdir)|" \
++ -e "s|%libdir%|$(installdir)|" \
+ -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
+ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
+ -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2011-03-13 03:26:18.676694023 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-gtkmozembed.pc.in 2011-03-13 03:26:41.566694025 -0700
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-2.0.orig/xulrunner/installer/mozilla-js.pc.in mozilla-2.0/xulrunner/installer/mozilla-js.pc.in
+--- mozilla-2.0.orig/xulrunner/installer/mozilla-js.pc.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/mozilla-js.pc.in 2011-03-13 03:27:19.680027357 -0700
+@@ -7,4 +7,4 @@
+ Version: %MOZILLA_VERSION%
+ Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
+-Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
++Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE
diff --git a/staging/xulrunner/port_gnomevfs_to_gio.patch b/staging/xulrunner/port_gnomevfs_to_gio.patch
new file mode 100644
index 000000000..797baff42
--- /dev/null
+++ b/staging/xulrunner/port_gnomevfs_to_gio.patch
@@ -0,0 +1,1316 @@
+diff -r 49a1b2aa43c5 extensions/gio/Makefile.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/Makefile.in Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,69 @@
++# vim:set ts=8 sw=8 sts=8 noet:
++# ***** BEGIN LICENSE BLOCK *****
++# Version: MPL 1.1/GPL 2.0/LGPL 2.1
++#
++# The contents of this file are subject to the Mozilla Public License Version
++# 1.1 (the "License"); you may not use this file except in compliance with
++# the License. You may obtain a copy of the License at
++# http://www.mozilla.org/MPL/
++#
++# Software distributed under the License is distributed on an "AS IS" basis,
++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++# for the specific language governing rights and limitations under the
++# License.
++#
++# The Original Code is the Mozilla gnome-vfs extension.
++#
++# The Initial Developer of the Original Code is IBM Corporation.
++#
++# Portions created by IBM Corporation are Copyright (C) 2004
++# IBM Corporation. All Rights Reserved.
++#
++# Contributor(s):
++# Darin Fisher <darin@meer.net>
++# Jan Horak <jhorak@redhat.com>
++#
++# Alternatively, the contents of this file may be used under the terms of
++# either the GNU General Public License Version 2 or later (the "GPL"), or
++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++# in which case the provisions of the GPL or the LGPL are applicable instead
++# of those above. If you wish to allow use of your version of this file only
++# under the terms of either the GPL or the LGPL, and not to allow others to
++# use your version of this file under the terms of the MPL, indicate your
++# decision by deleting the provisions above and replace them with the notice
++# and other provisions required by the GPL or the LGPL. If you do not delete
++# the provisions above, a recipient may use your version of this file under
++# the terms of any one of the MPL, the GPL or the LGPL.
++#
++# ***** END LICENSE BLOCK *****
++
++DEPTH = ../..
++topsrcdir = @top_srcdir@
++srcdir = @srcdir@
++VPATH = @srcdir@
++
++include $(DEPTH)/config/autoconf.mk
++
++MODULE = nkgio
++LIBRARY_NAME = nkgio
++SHORT_LIBNAME = nkgio
++IS_COMPONENT = 1
++
++CPPSRCS = \
++ nsGIOProtocolHandler.cpp \
++ $(NULL)
++
++LOCAL_INCLUDES = $(MOZ_GIO_CFLAGS)
++
++EXTRA_DSO_LDOPTS = \
++ $(XPCOM_GLUE_LDOPTS) \
++ $(NSPR_LIBS) \
++ $(MOZ_GIO_LIBS) \
++ $(NULL)
++
++# make sure this component is never statically linked into the main
++# application. this is necessary since we don't want to force users
++# to install gio in order to use the rest of mozilla ;-)
++FORCE_SHARED_LIB= 1
++
++include $(topsrcdir)/config/rules.mk
+diff -r 49a1b2aa43c5 extensions/gio/makefiles.sh
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/makefiles.sh Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,41 @@
++#! /bin/sh
++# ***** BEGIN LICENSE BLOCK *****
++# Version: MPL 1.1/GPL 2.0/LGPL 2.1
++#
++# The contents of this file are subject to the Mozilla Public License Version
++# 1.1 (the "License"); you may not use this file except in compliance with
++# the License. You may obtain a copy of the License at
++# http://www.mozilla.org/MPL/
++#
++# Software distributed under the License is distributed on an "AS IS" basis,
++# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++# for the specific language governing rights and limitations under the
++# License.
++#
++# The Original Code is Mozilla Build System
++#
++# The Initial Developer of the Original Code is
++# Ben Turner <mozilla@songbirdnest.com>
++#
++# Portions created by the Initial Developer are Copyright (C) 2007
++# the Initial Developer. All Rights Reserved.
++#
++# Contributor(s):
++#
++# Alternatively, the contents of this file may be used under the terms of
++# either the GNU General Public License Version 2 or later (the "GPL"), or
++# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++# in which case the provisions of the GPL or the LGPL are applicable instead
++# of those above. If you wish to allow use of your version of this file only
++# under the terms of either the GPL or the LGPL, and not to allow others to
++# use your version of this file under the terms of the MPL, indicate your
++# decision by deleting the provisions above and replace them with the notice
++# and other provisions required by the GPL or the LGPL. If you do not delete
++# the provisions above, a recipient may use your version of this file under
++# the terms of any one of the MPL, the GPL or the LGPL.
++#
++# ***** END LICENSE BLOCK *****
++
++add_makefiles "
++ extensions/gio/Makefile
++"
+diff -r 49a1b2aa43c5 extensions/gio/nsGIOProtocolHandler.cpp
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/extensions/gio/nsGIOProtocolHandler.cpp Tue Jan 11 11:17:52 2011 +0100
+@@ -0,0 +1,1163 @@
++/* vim:set ts=2 sw=2 et cindent: */
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is the Mozilla gnome-vfs extension.
++ *
++ * The Initial Developer of the Original Code is IBM Corporation.
++ *
++ * Portions created by IBM Corporation are Copyright (C) 2004
++ * IBM Corporation. All Rights Reserved.
++ *
++ * Contributor(s):
++ * Darin Fisher <darin@meer.net>
++ * Jan Horak <jhorak@redhat.com>
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either the GNU General Public License Version 2 or later (the "GPL"), or
++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++/*
++ * This code is based on original Mozilla gnome-vfs extension. It implements
++ * input stream provided by GVFS/GIO.
++*/
++#include "mozilla/ModuleUtils.h"
++#include "nsIPrefService.h"
++#include "nsIPrefBranch2.h"
++#include "nsIObserver.h"
++#include "nsThreadUtils.h"
++#include "nsProxyRelease.h"
++#include "nsIStringBundle.h"
++#include "nsIStandardURL.h"
++#include "nsMimeTypes.h"
++#include "nsNetUtil.h"
++#include "mozilla/Monitor.h"
++#include <gio/gio.h>
++
++#define MOZ_GIO_SCHEME "moz-gio"
++#define MOZ_GIO_SUPPORTED_PROTOCOLS "network.gio.supported-protocols"
++
++//-----------------------------------------------------------------------------
++
++// NSPR_LOG_MODULES=gio:5
++#ifdef PR_LOGGING
++static PRLogModuleInfo *sGIOLog;
++#define LOG(args) PR_LOG(sGIOLog, PR_LOG_DEBUG, args)
++#else
++#define LOG(args)
++#endif
++
++
++//-----------------------------------------------------------------------------
++static nsresult
++MapGIOResult(gint code)
++{
++ switch (code)
++ {
++ case G_IO_ERROR_NOT_FOUND: return NS_ERROR_FILE_NOT_FOUND; // shows error
++ case G_IO_ERROR_INVALID_ARGUMENT: return NS_ERROR_INVALID_ARG;
++ case G_IO_ERROR_NOT_SUPPORTED: return NS_ERROR_NOT_AVAILABLE;
++ case G_IO_ERROR_NO_SPACE: return NS_ERROR_FILE_NO_DEVICE_SPACE;
++ case G_IO_ERROR_READ_ONLY: return NS_ERROR_FILE_READ_ONLY;
++ case G_IO_ERROR_PERMISSION_DENIED: return NS_ERROR_FILE_ACCESS_DENIED; // wrong password/login
++ case G_IO_ERROR_CLOSED: return NS_BASE_STREAM_CLOSED; // was EOF
++ case G_IO_ERROR_NOT_DIRECTORY: return NS_ERROR_FILE_NOT_DIRECTORY;
++ case G_IO_ERROR_PENDING: return NS_ERROR_IN_PROGRESS;
++ case G_IO_ERROR_EXISTS: return NS_ERROR_FILE_ALREADY_EXISTS;
++ case G_IO_ERROR_IS_DIRECTORY: return NS_ERROR_FILE_IS_DIRECTORY;
++ case G_IO_ERROR_NOT_MOUNTED: return NS_ERROR_NOT_CONNECTED; // shows error
++ case G_IO_ERROR_HOST_NOT_FOUND: return NS_ERROR_UNKNOWN_HOST; // shows error
++ case G_IO_ERROR_CANCELLED: return NS_ERROR_ABORT;
++ case G_IO_ERROR_NOT_EMPTY: return NS_ERROR_FILE_DIR_NOT_EMPTY;
++ case G_IO_ERROR_FILENAME_TOO_LONG: return NS_ERROR_FILE_NAME_TOO_LONG;
++ case G_IO_ERROR_INVALID_FILENAME: return NS_ERROR_FILE_INVALID_PATH;
++ case G_IO_ERROR_TIMED_OUT: return NS_ERROR_NET_TIMEOUT; // shows error
++ case G_IO_ERROR_WOULD_BLOCK: return NS_BASE_STREAM_WOULD_BLOCK;
++ case G_IO_ERROR_FAILED_HANDLED: return NS_ERROR_ABORT; // Cancel on login dialog
++
++/* unhandled:
++ G_IO_ERROR_NOT_REGULAR_FILE,
++ G_IO_ERROR_NOT_SYMBOLIC_LINK,
++ G_IO_ERROR_NOT_MOUNTABLE_FILE,
++ G_IO_ERROR_TOO_MANY_LINKS,
++ G_IO_ERROR_ALREADY_MOUNTED,
++ G_IO_ERROR_CANT_CREATE_BACKUP,
++ G_IO_ERROR_WRONG_ETAG,
++ G_IO_ERROR_WOULD_RECURSE,
++ G_IO_ERROR_BUSY,
++ G_IO_ERROR_WOULD_MERGE,
++ G_IO_ERROR_TOO_MANY_OPEN_FILES
++*/
++ // Make GCC happy
++ default:
++ return NS_ERROR_FAILURE;
++ }
++
++ return NS_ERROR_FAILURE;
++}
++
++static nsresult
++MapGIOResult(GError *result)
++{
++ if (!result)
++ return NS_OK;
++ else
++ return MapGIOResult(result->code);
++}
++/** Return values for mount operation.
++ * These enums are used as mount operation return values.
++ */
++typedef enum {
++ MOUNT_OPERATION_IN_PROGRESS, /** \enum operation in progress */
++ MOUNT_OPERATION_SUCCESS, /** \enum operation successful */
++ MOUNT_OPERATION_FAILED /** \enum operation not successful */
++} MountOperationResult;
++//-----------------------------------------------------------------------------
++/**
++ * Sort function compares according to file type (directory/file)
++ * and alphabethical order
++ * @param a pointer to GFileInfo object to compare
++ * @param b pointer to GFileInfo object to compare
++ * @return -1 when first object should be before the second, 0 when equal,
++ * +1 when second object should be before the first
++ */
++static gint
++FileInfoComparator(gconstpointer a, gconstpointer b)
++{
++ GFileInfo *ia = ( GFileInfo *) a;
++ GFileInfo *ib = ( GFileInfo *) b;
++ if (g_file_info_get_file_type(ia) == G_FILE_TYPE_DIRECTORY
++ && g_file_info_get_file_type(ib) != G_FILE_TYPE_DIRECTORY)
++ return -1;
++ if (g_file_info_get_file_type(ib) == G_FILE_TYPE_DIRECTORY
++ && g_file_info_get_file_type(ia) != G_FILE_TYPE_DIRECTORY)
++ return 1;
++
++ return strcasecmp(g_file_info_get_name(ia), g_file_info_get_name(ib));
++}
++
++/* Declaration of mount callback functions */
++static void mount_enclosing_volume_finished (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data);
++static void mount_operation_ask_password (GMountOperation *mount_op,
++ const char *message,
++ const char *default_user,
++ const char *default_domain,
++ GAskPasswordFlags flags,
++ gpointer user_data);
++//-----------------------------------------------------------------------------
++
++class nsGIOInputStream : public nsIInputStream
++{
++ public:
++ NS_DECL_ISUPPORTS
++ NS_DECL_NSIINPUTSTREAM
++
++ nsGIOInputStream(const nsCString &uriSpec)
++ : mSpec(uriSpec)
++ , mChannel(nsnull)
++ , mHandle(nsnull)
++ , mStream(nsnull)
++ , mBytesRemaining(PR_UINT32_MAX)
++ , mStatus(NS_OK)
++ , mDirList(nsnull)
++ , mDirListPtr(nsnull)
++ , mDirBufCursor(0)
++ , mDirOpen(PR_FALSE)
++ , mMonitorMountInProgress("GIOInputStream::MountFinished") { }
++
++ ~nsGIOInputStream() { Close(); }
++
++ void SetChannel(nsIChannel *channel)
++ {
++ // We need to hold an owning reference to our channel. This is done
++ // so we can access the channel's notification callbacks to acquire
++ // a reference to a nsIAuthPrompt if we need to handle an interactive
++ // mount operation.
++ //
++ // However, the channel can only be accessed on the main thread, so
++ // we have to be very careful with ownership. Moreover, it doesn't
++ // support threadsafe addref/release, so proxying is the answer.
++ //
++ // Also, it's important to note that this likely creates a reference
++ // cycle since the channel likely owns this stream. This reference
++ // cycle is broken in our Close method.
++
++ NS_ADDREF(mChannel = channel);
++ }
++ void SetMountResult(MountOperationResult result, gint error_code);
++ private:
++ nsresult DoOpen();
++ nsresult DoRead(char *aBuf, PRUint32 aCount, PRUint32 *aCountRead);
++ nsresult SetContentTypeOfChannel(const char *contentType);
++ nsresult MountVolume();
++ nsresult DoOpenDirectory();
++ nsresult DoOpenFile(GFileInfo *info);
++ nsCString mSpec;
++ nsIChannel *mChannel; // manually refcounted
++ GFile *mHandle;
++ GFileInputStream *mStream;
++ PRUint64 mBytesRemaining;
++ nsresult mStatus;
++ GList *mDirList;
++ GList *mDirListPtr;
++ nsCString mDirBuf;
++ PRUint32 mDirBufCursor;
++ PRPackedBool mDirOpen;
++ MountOperationResult mMountRes;
++ mozilla::Monitor mMonitorMountInProgress;
++ gint mMountErrorCode;
++};
++/**
++ * Set result of mount operation and notify monitor waiting for results.
++ * This method is called in main thread as long as it is used only
++ * in mount_enclosing_volume_finished function.
++ * @param result Result of mount operation
++ */
++void
++nsGIOInputStream::SetMountResult(MountOperationResult result, gint error_code)
++{
++ mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
++ mMountRes = result;
++ mMountErrorCode = error_code;
++ mon.Notify();
++}
++
++/**
++ * Start mount operation and wait in loop until it is finished. This method is
++ * called from thread which is trying to read from location.
++ */
++nsresult
++nsGIOInputStream::MountVolume() {
++ GMountOperation* mount_op = g_mount_operation_new();
++ g_signal_connect (mount_op, "ask-password",
++ G_CALLBACK (mount_operation_ask_password), mChannel);
++ mMountRes = MOUNT_OPERATION_IN_PROGRESS;
++ /* g_file_mount_enclosing_volume uses a dbus request to mount the volume.
++ Callback mount_enclosing_volume_finished is called in main thread
++ (not this thread on which this method is called). */
++ g_file_mount_enclosing_volume(mHandle,
++ G_MOUNT_MOUNT_NONE,
++ mount_op,
++ NULL,
++ mount_enclosing_volume_finished,
++ this);
++ mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
++ /* Waiting for finish of mount operation thread */
++ while (mMountRes == MOUNT_OPERATION_IN_PROGRESS)
++ mon.Wait();
++
++ g_object_unref(mount_op);
++
++ if (mMountRes == MOUNT_OPERATION_FAILED) {
++ return MapGIOResult(mMountErrorCode);
++ } else {
++ return NS_OK;
++ }
++}
++
++/**
++ * Create list of infos about objects in opened directory
++ * Return: NS_OK when list obtained, otherwise error code according
++ * to failed operation.
++ */
++nsresult
++nsGIOInputStream::DoOpenDirectory()
++{
++ GError *error = NULL;
++
++ GFileEnumerator *f_enum = g_file_enumerate_children(mHandle,
++ "standard::*,time::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++ if (!f_enum) {
++ nsresult rv = MapGIOResult(error);
++ g_warning("Cannot read from directory: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++ // fill list of file infos
++ GFileInfo *info = g_file_enumerator_next_file(f_enum, NULL, &error);
++ while (info) {
++ mDirList = g_list_append(mDirList, info);
++ info = g_file_enumerator_next_file(f_enum, NULL, &error);
++ }
++ g_object_unref(f_enum);
++ if (error) {
++ g_warning("Error reading directory content: %s", error->message);
++ nsresult rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ mDirOpen = PR_TRUE;
++
++ // Sort list of file infos by using FileInfoComparator function
++ mDirList = g_list_sort(mDirList, FileInfoComparator);
++ mDirListPtr = mDirList;
++
++ // Write base URL (make sure it ends with a '/')
++ mDirBuf.Append("300: ");
++ mDirBuf.Append(mSpec);
++ if (mSpec.get()[mSpec.Length() - 1] != '/')
++ mDirBuf.Append('/');
++ mDirBuf.Append('\n');
++
++ // Write column names
++ mDirBuf.Append("200: filename content-length last-modified file-type\n");
++
++ // Write charset (assume UTF-8)
++ // XXX is this correct?
++ mDirBuf.Append("301: UTF-8\n");
++ SetContentTypeOfChannel(APPLICATION_HTTP_INDEX_FORMAT);
++ return NS_OK;
++}
++
++/**
++ * Create file stream and set mime type for channel
++ * @param info file info used to determine mime type
++ * @return NS_OK when file stream created successfuly, error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoOpenFile(GFileInfo *info)
++{
++ GError *error = NULL;
++
++ mStream = g_file_read(mHandle, NULL, &error);
++ if (!mStream) {
++ nsresult rv = MapGIOResult(error);
++ g_warning("Cannot read from file: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++
++ const char * content_type = g_file_info_get_content_type(info);
++ if (content_type) {
++ char *mime_type = g_content_type_get_mime_type(content_type);
++ if (mime_type) {
++ if (strcmp(mime_type, APPLICATION_OCTET_STREAM) != 0) {
++ SetContentTypeOfChannel(mime_type);
++ }
++ g_free(mime_type);
++ }
++ } else {
++ g_warning("Missing content type.");
++ }
++
++ mBytesRemaining = g_file_info_get_size(info);
++ // Update the content length attribute on the channel. We do this
++ // synchronously without proxying. This hack is not as bad as it looks!
++ mChannel->SetContentLength(mBytesRemaining);
++
++ return NS_OK;
++}
++
++/**
++ * Start file open operation, mount volume when needed and according to file type
++ * create file output stream or read directory content.
++ * @return NS_OK when file or directory opened successfully, error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoOpen()
++{
++ nsresult rv;
++ GError *error = NULL;
++
++ NS_ASSERTION(mHandle == nsnull, "already open");
++
++ mHandle = g_file_new_for_uri( mSpec.get() );
++
++ GFileInfo *info = g_file_query_info(mHandle,
++ "standard::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++
++ if (error) {
++ if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_MOUNTED) {
++ // location is not yet mounted, try to mount
++ g_error_free(error);
++ if (NS_IsMainThread())
++ return NS_ERROR_NOT_CONNECTED;
++ error = NULL;
++ rv = MountVolume();
++ if (rv != NS_OK) {
++ return rv;
++ }
++ // get info again
++ info = g_file_query_info(mHandle,
++ "standard::*",
++ G_FILE_QUERY_INFO_NONE,
++ NULL,
++ &error);
++ // second try to get file info from remote files after media mount
++ if (!info) {
++ g_warning("Unable to get file info: %s", error->message);
++ rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ } else {
++ g_warning("Unable to get file info: %s", error->message);
++ rv = MapGIOResult(error);
++ g_error_free(error);
++ return rv;
++ }
++ }
++ // Get file type to handle directories and file differently
++ GFileType f_type = g_file_info_get_file_type(info);
++ if (f_type == G_FILE_TYPE_DIRECTORY) {
++ // directory
++ rv = DoOpenDirectory();
++ } else if (f_type != G_FILE_TYPE_UNKNOWN) {
++ // file
++ rv = DoOpenFile(info);
++ } else {
++ g_warning("Unable to get file type.");
++ rv = NS_ERROR_FILE_NOT_FOUND;
++ }
++ if (info)
++ g_object_unref(info);
++ return rv;
++}
++
++/**
++ * Read content of file or create file list from directory
++ * @param aBuf read destination buffer
++ * @param aCount length of destination buffer
++ * @param aCountRead number of read characters
++ * @return NS_OK when read successfully, NS_BASE_STREAM_CLOSED when end of file,
++ * error code otherwise
++ */
++nsresult
++nsGIOInputStream::DoRead(char *aBuf, PRUint32 aCount, PRUint32 *aCountRead)
++{
++ nsresult rv = NS_ERROR_NOT_AVAILABLE;
++ if (mStream) {
++ // file read
++ GError *error = NULL;
++ PRUint32 bytes_read = g_input_stream_read(G_INPUT_STREAM(mStream),
++ aBuf,
++ aCount,
++ NULL,
++ &error);
++ if (error) {
++ rv = MapGIOResult(error);
++ *aCountRead = 0;
++ g_warning("Cannot read from file: %s", error->message);
++ g_error_free(error);
++ return rv;
++ }
++ *aCountRead = bytes_read;
++ mBytesRemaining -= *aCountRead;
++ return NS_OK;
++ }
++ else if (mDirOpen) {
++ // directory read
++ while (aCount && rv != NS_BASE_STREAM_CLOSED)
++ {
++ // Copy data out of our buffer
++ PRUint32 bufLen = mDirBuf.Length() - mDirBufCursor;
++ if (bufLen)
++ {
++ PRUint32 n = PR_MIN(bufLen, aCount);
++ memcpy(aBuf, mDirBuf.get() + mDirBufCursor, n);
++ *aCountRead += n;
++ aBuf += n;
++ aCount -= n;
++ mDirBufCursor += n;
++ }
++
++ if (!mDirListPtr) // Are we at the end of the directory list?
++ {
++ rv = NS_BASE_STREAM_CLOSED;
++ }
++ else if (aCount) // Do we need more data?
++ {
++ GFileInfo *info = (GFileInfo *) mDirListPtr->data;
++
++ // Prune '.' and '..' from directory listing.
++ const char * fname = g_file_info_get_name(info);
++ if (fname && fname[0] == '.' &&
++ (fname[1] == '\0' || (fname[1] == '.' && fname[2] == '\0')))
++ {
++ mDirListPtr = mDirListPtr->next;
++ continue;
++ }
++
++ mDirBuf.Assign("201: ");
++
++ // The "filename" field
++ nsCString escName;
++ nsCOMPtr<nsINetUtil> nu = do_GetService(NS_NETUTIL_CONTRACTID);
++ if (nu && fname) {
++ nu->EscapeString(nsDependentCString(fname),
++ nsINetUtil::ESCAPE_URL_PATH, escName);
++
++ mDirBuf.Append(escName);
++ mDirBuf.Append(' ');
++ }
++
++ // The "content-length" field
++ // XXX truncates size from 64-bit to 32-bit
++ mDirBuf.AppendInt(PRInt32(g_file_info_get_size(info)));
++ mDirBuf.Append(' ');
++
++ // The "last-modified" field
++ //
++ // NSPR promises: PRTime is compatible with time_t
++ // we just need to convert from seconds to microseconds
++ GTimeVal gtime;
++ g_file_info_get_modification_time(info, &gtime);
++
++ PRExplodedTime tm;
++ PRTime pt = ((PRTime) gtime.tv_sec) * 1000000;
++ PR_ExplodeTime(pt, PR_GMTParameters, &tm);
++ {
++ char buf[64];
++ PR_FormatTimeUSEnglish(buf, sizeof(buf),
++ "%a,%%20%d%%20%b%%20%Y%%20%H:%M:%S%%20GMT ", &tm);
++ mDirBuf.Append(buf);
++ }
++
++ // The "file-type" field
++ switch (g_file_info_get_file_type(info))
++ {
++ case G_FILE_TYPE_REGULAR:
++ mDirBuf.Append("FILE ");
++ break;
++ case G_FILE_TYPE_DIRECTORY:
++ mDirBuf.Append("DIRECTORY ");
++ break;
++ case G_FILE_TYPE_SYMBOLIC_LINK:
++ mDirBuf.Append("SYMBOLIC-LINK ");
++ break;
++ default:
++ break;
++ }
++ mDirBuf.Append('\n');
++
++ mDirBufCursor = 0;
++ mDirListPtr = mDirListPtr->next;
++ }
++ }
++ }
++ return rv;
++}
++
++/**
++ * This class is used to implement SetContentTypeOfChannel.
++ */
++class nsGIOSetContentTypeEvent : public nsRunnable
++{
++ public:
++ nsGIOSetContentTypeEvent(nsIChannel *channel, const char *contentType)
++ : mChannel(channel), mContentType(contentType)
++ {
++ // stash channel reference in mChannel. no AddRef here! see note
++ // in SetContentTypeOfchannel.
++ }
++
++ NS_IMETHOD Run()
++ {
++ mChannel->SetContentType(mContentType);
++ return NS_OK;
++ }
++
++ private:
++ nsIChannel *mChannel;
++ nsCString mContentType;
++};
++
++nsresult
++nsGIOInputStream::SetContentTypeOfChannel(const char *contentType)
++{
++ // We need to proxy this call over to the main thread. We post an
++ // asynchronous event in this case so that we don't delay reading data, and
++ // we know that this is safe to do since the channel's reference will be
++ // released asynchronously as well. We trust the ordering of the main
++ // thread's event queue to protect us against memory corruption.
++
++ nsresult rv;
++ nsCOMPtr<nsIRunnable> ev =
++ new nsGIOSetContentTypeEvent(mChannel, contentType);
++ if (!ev)
++ {
++ rv = NS_ERROR_OUT_OF_MEMORY;
++ }
++ else
++ {
++ rv = NS_DispatchToMainThread(ev);
++ }
++ return rv;
++}
++
++NS_IMPL_THREADSAFE_ISUPPORTS1(nsGIOInputStream, nsIInputStream)
++
++/**
++ * Free all used memory and close stream.
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Close()
++{
++ if (mStream)
++ {
++ g_object_unref(mStream);
++ mStream = nsnull;
++ }
++
++ if (mHandle)
++ {
++ g_object_unref(mHandle);
++ mHandle = nsnull;
++ }
++
++ if (mDirList)
++ {
++ // Destroy the list of GIOFileInfo objects...
++ g_list_foreach(mDirList, (GFunc) g_object_unref, nsnull);
++ g_list_free(mDirList);
++ mDirList = nsnull;
++ mDirListPtr = nsnull;
++ }
++
++ if (mChannel)
++ {
++ nsresult rv = NS_OK;
++
++ nsCOMPtr<nsIThread> thread = do_GetMainThread();
++ if (thread)
++ rv = NS_ProxyRelease(thread, mChannel);
++
++ NS_ASSERTION(thread && NS_SUCCEEDED(rv), "leaking channel reference");
++ mChannel = nsnull;
++ }
++
++ mSpec.Truncate(); // free memory
++
++ // Prevent future reads from re-opening the handle.
++ if (NS_SUCCEEDED(mStatus))
++ mStatus = NS_BASE_STREAM_CLOSED;
++
++ return NS_OK;
++}
++
++/**
++ * Return number of remaining bytes available on input
++ * @param aResult remaining bytes
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Available(PRUint32 *aResult)
++{
++ if (NS_FAILED(mStatus))
++ return mStatus;
++
++ /* When remaining bytes are bigger than max PRUint32 value an aResult must
++ be set to PRUint32 maximum */
++ if (mBytesRemaining > PR_UINT32_MAX)
++ *aResult = PR_UINT32_MAX;
++ else
++ *aResult = mBytesRemaining;
++
++ return NS_OK;
++}
++
++/**
++ * Trying to read from stream. When location is not available it tries to mount it.
++ * @param aBuf buffer to put read data
++ * @param aCount length of aBuf
++ * @param aCountRead number of bytes actually read
++ */
++NS_IMETHODIMP
++nsGIOInputStream::Read(char *aBuf,
++ PRUint32 aCount,
++ PRUint32 *aCountRead)
++{
++ *aCountRead = 0;
++ // Check if file is already opened, otherwise open it
++ if (!mStream && !mDirOpen && mStatus == NS_OK) {
++ mStatus = DoOpen();
++ if (NS_FAILED(mStatus)) {
++ return mStatus;
++ }
++ }
++
++ mStatus = DoRead(aBuf, aCount, aCountRead);
++ // Check if all data has been read
++ if (mStatus == NS_BASE_STREAM_CLOSED)
++ return NS_OK;
++
++ // Check whenever any error appears while reading
++ return mStatus;
++}
++
++NS_IMETHODIMP
++nsGIOInputStream::ReadSegments(nsWriteSegmentFun aWriter,
++ void *aClosure,
++ PRUint32 aCount,
++ PRUint32 *aResult)
++{
++ // There is no way to implement this using GnomeVFS, but fortunately
++ // that doesn't matter. Because we are a blocking input stream, Necko
++ // isn't going to call our ReadSegments method.
++ NS_NOTREACHED("nsGIOInputStream::ReadSegments");
++ return NS_ERROR_NOT_IMPLEMENTED;
++}
++
++NS_IMETHODIMP
++nsGIOInputStream::IsNonBlocking(PRBool *aResult)
++{
++ *aResult = PR_FALSE;
++ return NS_OK;
++}
++
++//-----------------------------------------------------------------------------
++
++/**
++ * Called when finishing mount operation. Result of operation is set in
++ * nsGIOInputStream. This function is called in main thread as an async request
++ * typically from dbus.
++ * @param source_object GFile object which requested the mount
++ * @param res result object
++ * @param user_data pointer to nsGIOInputStream
++ */
++static void
++mount_enclosing_volume_finished (GObject *source_object,
++ GAsyncResult *res,
++ gpointer user_data)
++{
++ GError *error = NULL;
++
++ nsGIOInputStream* istream = static_cast<nsGIOInputStream*>(user_data);
++
++ g_file_mount_enclosing_volume_finish(G_FILE (source_object), res, &error);
++
++ if (error) {
++ g_warning("Mount failed: %s %d", error->message, error->code);
++ istream->SetMountResult(MOUNT_OPERATION_FAILED, error->code);
++ g_error_free(error);
++ } else {
++ istream->SetMountResult(MOUNT_OPERATION_SUCCESS, 0);
++ }
++}
++
++/**
++ * This function is called when username or password are requested from user.
++ * This function is called in main thread as async request from dbus.
++ * @param mount_op mount operation
++ * @param message message to show to user
++ * @param default_user preffered user
++ * @param default_domain domain name
++ * @param flags what type of information is required
++ * @param user_data nsIChannel
++ */
++static void
++mount_operation_ask_password (GMountOperation *mount_op,
++ const char *message,
++ const char *default_user,
++ const char *default_domain,
++ GAskPasswordFlags flags,
++ gpointer user_data)
++{
++ nsIChannel *channel = (nsIChannel *) user_data;
++ if (!channel) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // We can't handle request for domain
++ if (flags & G_ASK_PASSWORD_NEED_DOMAIN) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++
++ nsCOMPtr<nsIAuthPrompt> prompt;
++ NS_QueryNotificationCallbacks(channel, prompt);
++
++ // If no auth prompt, then give up. We could failover to using the
++ // WindowWatcher service, but that might defeat a consumer's purposeful
++ // attempt to disable authentication (for whatever reason).
++ if (!prompt) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Parse out the host and port...
++ nsCOMPtr<nsIURI> uri;
++ channel->GetURI(getter_AddRefs(uri));
++ if (!uri) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++
++ nsCAutoString scheme, hostPort;
++ uri->GetScheme(scheme);
++ uri->GetHostPort(hostPort);
++
++ // It doesn't make sense for either of these strings to be empty. What kind
++ // of funky URI is this?
++ if (scheme.IsEmpty() || hostPort.IsEmpty()) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Construct the single signon key. Altering the value of this key will
++ // cause people's remembered passwords to be forgotten. Think carefully
++ // before changing the way this key is constructed.
++ nsAutoString key, realm;
++
++ NS_ConvertUTF8toUTF16 dispHost(scheme);
++ dispHost.Append(NS_LITERAL_STRING("://"));
++ dispHost.Append(NS_ConvertUTF8toUTF16(hostPort));
++
++ key = dispHost;
++ if (*default_domain != '\0')
++ {
++ // We assume the realm string is ASCII. That might be a bogus assumption,
++ // but we have no idea what encoding GnomeVFS is using, so for now we'll
++ // limit ourselves to ISO-Latin-1. XXX What is a better solution?
++ realm.Append('"');
++ realm.Append(NS_ConvertASCIItoUTF16(default_domain));
++ realm.Append('"');
++ key.Append(' ');
++ key.Append(realm);
++ }
++ // Construct the message string...
++ //
++ // We use Necko's string bundle here. This code really should be encapsulated
++ // behind some Necko API, after all this code is based closely on the code in
++ // nsHttpChannel.cpp.
++ nsCOMPtr<nsIStringBundleService> bundleSvc =
++ do_GetService(NS_STRINGBUNDLE_CONTRACTID);
++ if (!bundleSvc) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ nsCOMPtr<nsIStringBundle> bundle;
++ bundleSvc->CreateBundle("chrome://global/locale/commonDialogs.properties",
++ getter_AddRefs(bundle));
++ if (!bundle) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ nsAutoString nsmessage;
++
++ if (flags & G_ASK_PASSWORD_NEED_PASSWORD) {
++ if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
++ if (!realm.IsEmpty()) {
++ const PRUnichar *strings[] = { realm.get(), dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterLoginForRealm").get(),
++ strings, 2, getter_Copies(nsmessage));
++ } else {
++ const PRUnichar *strings[] = { dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterUserPasswordFor").get(),
++ strings, 1, getter_Copies(nsmessage));
++ }
++ } else {
++ NS_ConvertUTF8toUTF16 userName(default_user);
++ const PRUnichar *strings[] = { userName.get(), dispHost.get() };
++ bundle->FormatStringFromName(NS_LITERAL_STRING("EnterPasswordFor").get(),
++ strings, 2, getter_Copies(nsmessage));
++ }
++ } else {
++ g_warning("Unknown mount operation request (flags: %x)", flags);
++ }
++
++ if (nsmessage.IsEmpty()) {
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ // Prompt the user...
++ nsresult rv;
++ PRBool retval = PR_FALSE;
++ PRUnichar *user = nsnull, *pass = nsnull;
++ if (default_user) {
++ // user will be freed by PromptUsernameAndPassword
++ user = ToNewUnicode(NS_ConvertUTF8toUTF16(default_user));
++ }
++ if (flags & G_ASK_PASSWORD_NEED_USERNAME) {
++ rv = prompt->PromptUsernameAndPassword(nsnull, nsmessage.get(),
++ key.get(),
++ nsIAuthPrompt::SAVE_PASSWORD_PERMANENTLY,
++ &user, &pass, &retval);
++ } else {
++ rv = prompt->PromptPassword(nsnull, nsmessage.get(),
++ key.get(),
++ nsIAuthPrompt::SAVE_PASSWORD_PERMANENTLY,
++ &pass, &retval);
++ }
++ if (NS_FAILED(rv) || !retval) { // was || user == '\0' || pass == '\0'
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_ABORTED);
++ return;
++ }
++ /* GIO should accept UTF8 */
++ g_mount_operation_set_username(mount_op, NS_ConvertUTF16toUTF8(user).get());
++ g_mount_operation_set_password(mount_op, NS_ConvertUTF16toUTF8(pass).get());
++ nsMemory::Free(user);
++ nsMemory::Free(pass);
++ g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_HANDLED);
++}
++
++//-----------------------------------------------------------------------------
++
++class nsGIOProtocolHandler : public nsIProtocolHandler
++ , public nsIObserver
++{
++ public:
++ NS_DECL_ISUPPORTS
++ NS_DECL_NSIPROTOCOLHANDLER
++ NS_DECL_NSIOBSERVER
++
++ nsresult Init();
++
++ private:
++ void InitSupportedProtocolsPref(nsIPrefBranch *prefs);
++ PRBool IsSupportedProtocol(const nsCString &spec);
++
++ nsCString mSupportedProtocols;
++};
++
++NS_IMPL_ISUPPORTS2(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
++
++nsresult
++nsGIOProtocolHandler::Init()
++{
++#ifdef PR_LOGGING
++ sGIOLog = PR_NewLogModule("gio");
++#endif
++
++ nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
++ if (prefs)
++ {
++ InitSupportedProtocolsPref(prefs);
++ prefs->AddObserver(MOZ_GIO_SUPPORTED_PROTOCOLS, this, PR_FALSE);
++ }
++
++ return NS_OK;
++}
++
++void
++nsGIOProtocolHandler::InitSupportedProtocolsPref(nsIPrefBranch *prefs)
++{
++ // Get user preferences to determine which protocol is supported.
++ // Gvfs/GIO has a set of supported protocols like obex, network, archive,
++ // computer, dav, cdda, gphoto2, trash, etc. Some of these seems to be
++ // irrelevant to process by browser. By default accept only smb and sftp
++ // protocols so far.
++ nsresult rv = prefs->GetCharPref(MOZ_GIO_SUPPORTED_PROTOCOLS,
++ getter_Copies(mSupportedProtocols));
++ if (NS_SUCCEEDED(rv)) {
++ mSupportedProtocols.StripWhitespace();
++ ToLowerCase(mSupportedProtocols);
++ }
++ else
++ mSupportedProtocols.Assign("smb:,sftp:"); // use defaults
++
++ LOG(("gio: supported protocols \"%s\"\n", mSupportedProtocols.get()));
++}
++
++PRBool
++nsGIOProtocolHandler::IsSupportedProtocol(const nsCString &aSpec)
++{
++ const char *specString = aSpec.get();
++ const char *colon = strchr(specString, ':');
++ if (!colon)
++ return PR_FALSE;
++
++ PRUint32 length = colon - specString + 1;
++
++ // <scheme> + ':'
++ nsCString scheme(specString, length);
++
++ char *found = PL_strcasestr(mSupportedProtocols.get(), scheme.get());
++ if (!found)
++ return PR_FALSE;
++
++ if (found[length] != ',' && found[length] != '\0')
++ return PR_FALSE;
++
++ return PR_TRUE;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetScheme(nsACString &aScheme)
++{
++ aScheme.Assign(MOZ_GIO_SCHEME);
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetDefaultPort(PRInt32 *aDefaultPort)
++{
++ *aDefaultPort = -1;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::GetProtocolFlags(PRUint32 *aProtocolFlags)
++{
++ // Is URI_STD true of all GnomeVFS URI types?
++ *aProtocolFlags = URI_STD | URI_DANGEROUS_TO_LOAD;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::NewURI(const nsACString &aSpec,
++ const char *aOriginCharset,
++ nsIURI *aBaseURI,
++ nsIURI **aResult)
++{
++ const nsCString flatSpec(aSpec);
++ LOG(("gio: NewURI [spec=%s]\n", flatSpec.get()));
++
++ if (!aBaseURI)
++ {
++ // XXX Is it good to support all GIO protocols?
++ if (!IsSupportedProtocol(flatSpec))
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++
++ PRInt32 colon_location = flatSpec.FindChar(':');
++ if (colon_location <= 0)
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++
++ // Verify that GIO supports this URI scheme.
++ PRBool uri_scheme_supported = PR_FALSE;
++
++ GVfs *gvfs = g_vfs_get_default();
++
++ if (!gvfs) {
++ g_warning("Cannot get GVfs object.");
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++ }
++
++ const gchar* const * uri_schemes = g_vfs_get_supported_uri_schemes(gvfs);
++
++ while (*uri_schemes != NULL) {
++ // While flatSpec ends with ':' the uri_scheme does not. Therefore do not
++ // compare last character.
++ if (StringHead(flatSpec, colon_location).Equals(*uri_schemes)) {
++ uri_scheme_supported = PR_TRUE;
++ break;
++ }
++ uri_schemes++;
++ }
++
++ if (!uri_scheme_supported) {
++ return NS_ERROR_UNKNOWN_PROTOCOL;
++ }
++ }
++
++ nsresult rv;
++ nsCOMPtr<nsIStandardURL> url =
++ do_CreateInstance(NS_STANDARDURL_CONTRACTID, &rv);
++ if (NS_FAILED(rv))
++ return rv;
++
++ rv = url->Init(nsIStandardURL::URLTYPE_STANDARD, -1, flatSpec,
++ aOriginCharset, aBaseURI);
++ if (NS_SUCCEEDED(rv))
++ rv = CallQueryInterface(url, aResult);
++ return rv;
++
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::NewChannel(nsIURI *aURI, nsIChannel **aResult)
++{
++ NS_ENSURE_ARG_POINTER(aURI);
++ nsresult rv;
++
++ nsCAutoString spec;
++ rv = aURI->GetSpec(spec);
++ if (NS_FAILED(rv))
++ return rv;
++
++ nsRefPtr<nsGIOInputStream> stream = new nsGIOInputStream(spec);
++ if (!stream)
++ {
++ rv = NS_ERROR_OUT_OF_MEMORY;
++ }
++ else
++ {
++ // start out assuming an unknown content-type. we'll set the content-type
++ // to something better once we open the URI.
++ rv = NS_NewInputStreamChannel(aResult,
++ aURI,
++ stream,
++ NS_LITERAL_CSTRING(UNKNOWN_CONTENT_TYPE));
++ if (NS_SUCCEEDED(rv))
++ stream->SetChannel(*aResult);
++ }
++ return rv;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::AllowPort(PRInt32 aPort,
++ const char *aScheme,
++ PRBool *aResult)
++{
++ // Don't override anything.
++ *aResult = PR_FALSE;
++ return NS_OK;
++}
++
++NS_IMETHODIMP
++nsGIOProtocolHandler::Observe(nsISupports *aSubject,
++ const char *aTopic,
++ const PRUnichar *aData)
++{
++ if (strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) {
++ nsCOMPtr<nsIPrefBranch> prefs = do_QueryInterface(aSubject);
++ InitSupportedProtocolsPref(prefs);
++ }
++ return NS_OK;
++}
++
++//-----------------------------------------------------------------------------
++
++#define NS_GIOPROTOCOLHANDLER_CID \
++{ /* ee706783-3af8-4d19-9e84-e2ebfe213480 */ \
++ 0xee706783, \
++ 0x3af8, \
++ 0x4d19, \
++ {0x9e, 0x84, 0xe2, 0xeb, 0xfe, 0x21, 0x34, 0x80} \
++}
++
++NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOProtocolHandler, Init)
++NS_DEFINE_NAMED_CID(NS_GIOPROTOCOLHANDLER_CID);
++
++static const mozilla::Module::CIDEntry kVFSCIDs[] = {
++ { &kNS_GIOPROTOCOLHANDLER_CID, false, NULL, nsGIOProtocolHandlerConstructor },
++ { NULL }
++};
++
++static const mozilla::Module::ContractIDEntry kVFSContracts[] = {
++ { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MOZ_GIO_SCHEME, &kNS_GIOPROTOCOLHANDLER_CID },
++ { NULL }
++};
++
++static const mozilla::Module kVFSModule = {
++ mozilla::Module::kVersion,
++ kVFSCIDs,
++ kVFSContracts
++};
++
++NSMODULE_DEFN(nsGIOModule) = &kVFSModule;
+diff -r 49a1b2aa43c5 netwerk/base/src/nsIOService.cpp
+--- a/netwerk/base/src/nsIOService.cpp Tue Dec 21 12:42:59 2010 +0100
++++ b/netwerk/base/src/nsIOService.cpp Tue Jan 11 11:17:52 2011 +0100
+@@ -454,6 +454,27 @@
+ }
+
+ #ifdef MOZ_X11
++ // check to see whether GVFS can handle this URI scheme. if it can
++ // create a nsIURI for the "scheme:", then we assume it has support for
++ // the requested protocol. otherwise, we failover to using the default
++ // protocol handler.
++
++ rv = CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"moz-gio",
++ result);
++ if (NS_SUCCEEDED(rv)) {
++ nsCAutoString spec(scheme);
++ spec.Append(':');
++
++ nsIURI *uri;
++ rv = (*result)->NewURI(spec, nsnull, nsnull, &uri);
++ if (NS_SUCCEEDED(rv)) {
++ NS_RELEASE(uri);
++ return rv;
++ }
++
++ NS_RELEASE(*result);
++ }
++
+ // check to see whether GnomeVFS can handle this URI scheme. if it can
+ // create a nsIURI for the "scheme:", then we assume it has support for
+ // the requested protocol. otherwise, we failover to using the default
diff --git a/staging/xulrunner/xulrunner-omnijar.patch b/staging/xulrunner/xulrunner-omnijar.patch
new file mode 100644
index 000000000..66ec5206c
--- /dev/null
+++ b/staging/xulrunner/xulrunner-omnijar.patch
@@ -0,0 +1,1737 @@
+# HG changeset patch
+# Parent a7dea879b4b445a23186f438900562155bb39e99
+Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/
+
+diff --git a/layout/style/jar.mn b/layout/style/jar.mn
+--- a/layout/style/jar.mn
++++ b/layout/style/jar.mn
+@@ -1,8 +1,10 @@
+ toolkit.jar:
+ * res/ua.css (ua.css)
+ res/html.css (html.css)
+ res/quirk.css (quirk.css)
+ res/viewsource.css (viewsource.css)
+ * res/forms.css (forms.css)
+ res/arrow.gif (arrow.gif)
+ res/arrowd.gif (arrowd.gif)
++
++% resource gre-resources %res/
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -75,17 +75,16 @@ static nsResProtocolHandler *gResHandler
+ //
+ // this enables PR_LOG_ALWAYS level information and places all output in
+ // the file log.txt
+ //
+ static PRLogModuleInfo *gResLog;
+ #endif
+
+ #define kGRE NS_LITERAL_CSTRING("gre")
+-#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources")
+
+ //----------------------------------------------------------------------------
+ // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution
+ //----------------------------------------------------------------------------
+
+ nsresult
+ nsResURL::EnsureFile()
+ {
+@@ -197,28 +196,16 @@ nsResProtocolHandler::Init()
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+ // make resource://gre/ point to the GRE directory
+ //
+ rv = AddSpecialDir(NS_GRE_DIR, kGRE);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+- // make resource://gre-resources/ point to gre toolkit[.jar]/res
+- nsCOMPtr<nsIURI> greURI;
+- nsCOMPtr<nsIURI> greResURI;
+- GetSubstitution(kGRE, getter_AddRefs(greURI));
+-#ifdef MOZ_CHROME_FILE_FORMAT_JAR
+- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/");
+-#else
+- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/");
+-#endif
+- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI,
+- getter_AddRefs(greResURI));
+- SetSubstitution(kGRE_RESOURCES, greResURI);
+ //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir...
+ // but once I finish multiple chrome registration I'm not sure that it is needed
+
+ // XXX dveditz: resource://pchrome/ defeats profile directory salting
+ // if web content can load it. Tread carefully.
+
+ return rv;
+ }
+@@ -242,22 +229,16 @@ nsResProtocolHandler::Init(nsIFile *aOmn
+ // these entries should be kept in sync with the normal Init function
+
+ // resource:/// points to jar:omni.jar!/
+ SetSubstitution(EmptyCString(), uri);
+
+ // resource://gre/ points to jar:omni.jar!/
+ SetSubstitution(kGRE, uri);
+
+- urlStr += "chrome/toolkit/res/";
+- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/
+- SetSubstitution(kGRE_RESOURCES, uri);
+ return NS_OK;
+ }
+ #endif
+
+ #ifdef MOZ_IPC
+ static PLDHashOperator
+ EnumerateSubstitution(const nsACString& aKey,
+ nsIURI* aURI,
+# HG changeset patch
+# Parent 3038cccba1a071d6b418e15442d0f2d9f3dcb11d
+Bug 620931 part 2 - When building --with-libxul-sdk, use the right preferences directory
+
+diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
+--- a/browser/locales/Makefile.in
++++ b/browser/locales/Makefile.in
+@@ -183,17 +183,17 @@ install:: $(addsuffix .xml,$(SEARCH_PLUG
+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
+
+
+ libs-%:
+ $(NSINSTALL) -D $(DIST)/install
+ @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
+ @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+ @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
++ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1
+ @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+
+
+ repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
+ repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
+ @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
+ $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
+ $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
+diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk
+--- a/toolkit/mozapps/installer/packager.mk
++++ b/toolkit/mozapps/installer/packager.mk
+@@ -307,17 +307,17 @@ OMNIJAR_FILES = \
+ res \
+ defaults \
+ greprefs.js \
+ jsloader \
+ $(NULL)
+
+ NON_OMNIJAR_FILES += \
+ chrome/icons/\* \
+- defaults/pref/channel-prefs.js \
++ $(PREF_DIR)/channel-prefs.js \
+ res/cursors/\* \
+ res/MainMenu.nib/\* \
+ $(NULL)
+
+ PACK_OMNIJAR = \
+ rm -f omni.jar components/binary.manifest && \
+ grep -h '^binary-component' components/*.manifest > binary.manifest ; \
+ sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \
+# HG changeset patch
+# Parent cd8df8030f7ad7530692bd7c4391a8009df56a02
+Bug 620931 part 3 - Allow GRE and XUL application to use omni.jar independently
+
+We now store two independent locations for an omni.jar, allowing GRE/XRE and
+XUL application to each have their own omni.jar. And since xulrunner setups
+are very independent from the XUL applications, we implement support for both
+omni.jar and non omni.jar cases in the same runtime, with the side effect of
+allowing to switch from one to the other manually without rebuilding the
+binaries.
+
+We let the mozilla::Omnijar API handle both cases, so that callers don't need
+too much work to support them.
+
+We also make the preferences service load the same set of preferences in all
+the various cases (unified vs. separate, omni.jar vs. no omni.jar).
+
+The child process launcher for IPC is modified to pass the base directories
+needed for the mozilla::Omnijar API initialization in the child process.
+
+Finally, the startupcache file name canonicalization is modified to separate
+APP and GRE resources.
+
+diff --git a/ipc/glue/GeckoChildProcessHost.cpp b/ipc/glue/GeckoChildProcessHost.cpp
+--- a/ipc/glue/GeckoChildProcessHost.cpp
++++ b/ipc/glue/GeckoChildProcessHost.cpp
+@@ -440,26 +440,29 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ // other end of the socketpair() from us
+
+ std::vector<std::string> childArgv;
+
+ childArgv.push_back(exePath.value());
+
+ childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end());
+
+-#ifdef MOZ_OMNIJAR
+ // Make sure the child process can find the omnijar
+ // See XRE_InitCommandLine in nsAppRunner.cpp
+- nsCAutoString omnijarPath;
+- if (mozilla::OmnijarPath()) {
+- mozilla::OmnijarPath()->GetNativePath(omnijarPath);
+- childArgv.push_back("-omnijar");
+- childArgv.push_back(omnijarPath.get());
++ nsCAutoString path;
++ nsCOMPtr<nsIFile> file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE);
++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
++ childArgv.push_back("-grebase");
++ childArgv.push_back(path.get());
+ }
+-#endif
++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP);
++ if (file && NS_SUCCEEDED(file->GetNativePath(path))) {
++ childArgv.push_back("-appbase");
++ childArgv.push_back(path.get());
++ }
+
+ childArgv.push_back(pidstring);
+
+ #if defined(MOZ_CRASHREPORTER)
+ # if defined(OS_LINUX)
+ int childCrashFd, childCrashRemapFd;
+ if (!CrashReporter::CreateNotificationPipeForChild(
+ &childCrashFd, &childCrashRemapFd))
+@@ -552,26 +555,29 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ for (std::vector<std::string>::iterator it = aExtraOpts.begin();
+ it != aExtraOpts.end();
+ ++it) {
+ cmdLine.AppendLooseValue(UTF8ToWide(*it));
+ }
+
+ cmdLine.AppendLooseValue(std::wstring(mGroupId.get()));
+
+-#ifdef MOZ_OMNIJAR
+ // Make sure the child process can find the omnijar
+ // See XRE_InitCommandLine in nsAppRunner.cpp
+- nsAutoString omnijarPath;
+- if (mozilla::OmnijarPath()) {
+- mozilla::OmnijarPath()->GetPath(omnijarPath);
+- cmdLine.AppendLooseValue(UTF8ToWide("-omnijar"));
+- cmdLine.AppendLooseValue(omnijarPath.get());
++ nsAutoString path;
++ nsCOMPtr<nsIFile> file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE);
++ if (file && NS_SUCCEEDED(file->GetPath(path))) {
++ cmdLine.AppendLooseValue(UTF8ToWide("-grebase"));
++ cmdLine.AppendLooseValue(path.get());
+ }
+-#endif
++ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP);
++ if (file && NS_SUCCEEDED(file->GetPath(path))) {
++ cmdLine.AppendLooseValue(UTF8ToWide("-appbase"));
++ cmdLine.AppendLooseValue(path.get());
++ }
+
+ cmdLine.AppendLooseValue(UTF8ToWide(pidstring));
+
+ #if defined(MOZ_CRASHREPORTER)
+ cmdLine.AppendLooseValue(
+ UTF8ToWide(CrashReporter::GetChildNotificationPipe()));
+ #endif
+
+diff --git a/js/src/xpconnect/loader/mozJSComponentLoader.cpp b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+--- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp
++++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+@@ -81,16 +81,17 @@
+ #include "nsIConsoleService.h"
+ #include "nsIStorageStream.h"
+ #include "nsIStringStream.h"
+ #include "prmem.h"
+ #if defined(XP_WIN)
+ #include "nsILocalFileWin.h"
+ #endif
+ #include "xpcprivate.h"
++#include "nsIResProtocolHandler.h"
+
+ #ifdef MOZ_ENABLE_LIBXUL
+ #include "mozilla/scache/StartupCache.h"
+ #include "mozilla/scache/StartupCacheUtils.h"
+ #endif
+ #include "mozilla/Omnijar.h"
+
+ #include "jsdbgapi.h"
+@@ -621,34 +622,21 @@ mozJSComponentLoader::LoadModule(nsILoca
+
+ const mozilla::Module*
+ mozJSComponentLoader::LoadModuleFromJAR(nsILocalFile *aJarFile,
+ const nsACString &aComponentPath)
+ {
+ #if !defined(XPCONNECT_STANDALONE)
+ nsresult rv;
+
+- nsCAutoString fullSpec;
+-
+-#ifdef MOZ_OMNIJAR
+- PRBool equal;
+- rv = aJarFile->Equals(mozilla::OmnijarPath(), &equal);
+- if (NS_SUCCEEDED(rv) && equal) {
+- fullSpec = "resource://gre/";
+- } else {
+-#endif
+- nsCAutoString fileSpec;
+- NS_GetURLSpecFromActualFile(aJarFile, fileSpec);
+- fullSpec = "jar:";
+- fullSpec += fileSpec;
+- fullSpec += "!/";
+-#ifdef MOZ_OMNIJAR
+- }
+-#endif
+-
++ nsCAutoString fullSpec, fileSpec;
++ NS_GetURLSpecFromActualFile(aJarFile, fileSpec);
++ fullSpec = "jar:";
++ fullSpec += fileSpec;
++ fullSpec += "!/";
+ fullSpec += aComponentPath;
+
+ nsCOMPtr<nsIURI> uri;
+ rv = NS_NewURI(getter_AddRefs(uri), fullSpec);
+ if (NS_FAILED(rv))
+ return NULL;
+
+ nsAutoString hashstring;
+@@ -833,57 +821,138 @@ class JSScriptHolder
+ JSScriptHolder(JSContext *cx, JSScript *script)
+ : mCx(cx), mScript(script) {}
+ ~JSScriptHolder() { ::JS_DestroyScript(mCx, mScript); }
+ private:
+ JSContext *mCx;
+ JSScript *mScript;
+ };
+
++static const char baseName[2][5] = { "gre/", "app/" };
++
++static inline PRBool
++canonicalizeBase(nsCAutoString &spec, nsACString &out, mozilla::Omnijar::Type aType)
++{
++ nsCAutoString base;
++ nsresult rv = mozilla::Omnijar::GetURIString(aType, base);
++
++ if (NS_FAILED(rv) || !base.Length())
++ return PR_FALSE;
++
++ if (base.Compare(spec.get(), PR_FALSE, base.Length()))
++ return PR_FALSE;
++
++ out.Append("/resource/");
++ out.Append(baseName[aType]);
++ out.Append(Substring(spec, base.Length()));
++ return PR_TRUE;
++}
+ /**
+ * PathifyURI transforms mozilla .js uris into useful zip paths
+ * to make it makes it easier to manipulate startup cache entries
+ * using standard zip tools.
+ * Transformations applied:
+- * * jsloader/<scheme> prefix is used to group mozJSComponentLoader cache entries in
++ * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in
+ * a top-level zip directory.
+- * * In MOZ_OMNIJAR case resource:/// and resource://gre/ URIs refer to the same path
+- * so treat both of them as resource://gre/
++ * * resource:// URIs are resolved to their corresponding file/jar URI to
++ * canonicalize resources URIs other than gre and app.
++ * * Paths under GRE or APP directory have their base path replaced with
++ * resource/gre or resource/app to avoid depending on install location.
++ * * jar:file:///path/to/file.jar!/sub/path urls are replaced with
++ * /path/to/file.jar/sub/path
+ * * .bin suffix is added to the end of the path to indicate that jsloader/ entries
+ * are binary representations of JS source.
+ * For example:
+- * resource://gre/modules/XPCOMUtils.jsm becomes
+- * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin
++ * resource://gre/modules/XPCOMUtils.jsm or
++ * file://$GRE_DIR/modules/XPCOMUtils.jsm or
++ * jar:file://$GRE_DIR/omni.jar!/modules/XPCOMUtils.jsm become
++ * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin
++ * file://$PROFILE_DIR/extensions/{uuid}/components/component.js becomes
++ * jsloader/$PROFILE_DIR/extensions/%7Buuid%7D/components/component.js.bin
++ * jar:file://$PROFILE_DIR/extensions/some.xpi!/components/component.js becomes
++ * jsloader/$PROFILE_DIR/extensions/some.xpi/components/component.js.bin
+ */
+ static nsresult
+ PathifyURI(nsIURI *in, nsACString &out)
+ {
+- out = "jsloader/";
+- nsCAutoString scheme;
+- nsresult rv = in->GetScheme(scheme);
+- NS_ENSURE_SUCCESS(rv, rv);
+- out.Append(scheme);
+- nsCAutoString host;
+- // OK for GetHost to fail since it's not implemented sometimes
+- in->GetHost(host);
+-#ifdef MOZ_OMNIJAR
+- if (scheme.Equals("resource") && host.Length() == 0){
+- host = "gre";
+- }
+-#endif
+- if (host.Length()) {
+- out.Append("/");
+- out.Append(host);
+- }
+- nsCAutoString path;
+- rv = in->GetPath(path);
+- NS_ENSURE_SUCCESS(rv, rv);
+- out.Append(path);
+- out.Append(".bin");
+- return NS_OK;
++ PRBool equals;
++ nsresult rv;
++ nsCOMPtr<nsIURI> uri = in;
++ nsCAutoString spec;
++
++ out = "jsloader";
++
++ // Resolve resource:// URIs. At the end of this if/else block, we
++ // have both spec and uri variables identifying the same URI.
++ if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) {
++ nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIProtocolHandler> ph;
++ rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIResProtocolHandler> irph(do_QueryInterface(ph, &rv));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = irph->ResolveURI(in, spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri));
++ NS_ENSURE_SUCCESS(rv, rv);
++ } else {
++ rv = in->GetSpec(spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++ }
++
++ if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) &&
++ !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) {
++ if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) {
++ nsCOMPtr<nsIFileURL> baseFileURL;
++ baseFileURL = do_QueryInterface(uri, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCAutoString path;
++ rv = baseFileURL->GetPath(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ out.Append(path);
++ } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) {
++ nsCOMPtr<nsIJARURI> jarURI = do_QueryInterface(uri, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIURI> jarFileURI;
++ rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCOMPtr<nsIFileURL> jarFileURL;
++ jarFileURL = do_QueryInterface(jarFileURI, &rv);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ nsCAutoString path;
++ rv = jarFileURL->GetPath(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++ out.Append(path);
++
++ rv = jarURI->GetJAREntry(path);
++ NS_ENSURE_SUCCESS(rv, rv);
++ out.Append("/");
++ out.Append(path);
++ } else { // Very unlikely
++ nsCAutoString spec;
++ rv = uri->GetSpec(spec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ out.Append("/");
++ out.Append(spec);
++ }
++ }
++
++ out.Append(".bin");
++ return NS_OK;
+ }
+
+ /* static */
+ #ifdef MOZ_ENABLE_LIBXUL
+ nsresult
+ mozJSComponentLoader::ReadScript(StartupCache* cache, nsIURI *uri,
+ JSContext *cx, JSScript **script)
+ {
+diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp
+--- a/modules/libjar/nsJAR.cpp
++++ b/modules/libjar/nsJAR.cpp
+@@ -171,26 +171,23 @@ nsJAR::Open(nsIFile* zipFile)
+ if (mLock) return NS_ERROR_FAILURE; // Already open!
+
+ mZipFile = zipFile;
+ mOuterZipEntry.Truncate();
+
+ mLock = PR_NewLock();
+ NS_ENSURE_TRUE(mLock, NS_ERROR_OUT_OF_MEMORY);
+
+-#ifdef MOZ_OMNIJAR
+ // The omnijar is special, it is opened early on and closed late
+ // this avoids reopening it
+- PRBool equals;
+- nsresult rv = zipFile->Equals(mozilla::OmnijarPath(), &equals);
+- if (NS_SUCCEEDED(rv) && equals) {
+- mZip = mozilla::OmnijarReader();
++ nsZipArchive *zip = mozilla::Omnijar::GetReader(zipFile);
++ if (zip) {
++ mZip = zip;
+ return NS_OK;
+ }
+-#endif
+ return mZip->OpenArchive(zipFile);
+ }
+
+ NS_IMETHODIMP
+ nsJAR::OpenInner(nsIZipReader *aZipReader, const char *aZipEntry)
+ {
+ NS_ENSURE_ARG_POINTER(aZipReader);
+ NS_ENSURE_ARG_POINTER(aZipEntry);
+@@ -234,23 +231,22 @@ nsJAR::Close()
+ mLock = nsnull;
+ }
+
+ mParsedManifest = PR_FALSE;
+ mManifestData.Reset();
+ mGlobalStatus = JAR_MANIFEST_NOT_PARSED;
+ mTotalItemsInManifest = 0;
+
+-#ifdef MOZ_OMNIJAR
+- if (mZip == mozilla::OmnijarReader()) {
++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) ||
++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) {
+ mZip.forget();
+ mZip = new nsZipArchive();
+ return NS_OK;
+ }
+-#endif
+ return mZip->CloseArchive();
+ }
+
+ NS_IMETHODIMP
+ nsJAR::Test(const char *aEntryName)
+ {
+ return mZip->Test(aEntryName);
+ }
+@@ -391,22 +387,21 @@ nsJAR::GetInputStreamWithSpec(const nsAC
+ NS_IMETHODIMP
+ nsJAR::GetCertificatePrincipal(const char* aFilename, nsIPrincipal** aPrincipal)
+ {
+ //-- Parameter check
+ if (!aPrincipal)
+ return NS_ERROR_NULL_POINTER;
+ *aPrincipal = nsnull;
+
+-#ifdef MOZ_OMNIJAR
+ // Don't check signatures in the omnijar - this is only
+ // interesting for extensions/XPIs.
+- if (mZip == mozilla::OmnijarReader())
++ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) ||
++ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)))
+ return NS_OK;
+-#endif
+
+ //-- Parse the manifest
+ nsresult rv = ParseManifest();
+ if (NS_FAILED(rv)) return rv;
+ if (mGlobalStatus == JAR_NO_MANIFEST)
+ return NS_OK;
+
+ PRInt16 requestedStatus;
+diff --git a/modules/libpref/src/nsPrefService.cpp b/modules/libpref/src/nsPrefService.cpp
+--- a/modules/libpref/src/nsPrefService.cpp
++++ b/modules/libpref/src/nsPrefService.cpp
+@@ -67,20 +67,18 @@
+
+ #include "prefapi.h"
+ #include "prefread.h"
+ #include "prefapi_private_data.h"
+ #include "PrefTuple.h"
+
+ #include "nsITimelineService.h"
+
+-#ifdef MOZ_OMNIJAR
+ #include "mozilla/Omnijar.h"
+ #include "nsZipArchive.h"
+-#endif
+
+ // Definitions
+ #define INITIAL_PREF_FILES 10
+ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
+
+ // Prototypes
+ static nsresult openPrefFile(nsIFile* aFile);
+ static nsresult pref_InitInitialObjects(void);
+@@ -793,124 +791,144 @@ static nsresult pref_LoadPrefsInDirList(
+ pref_LoadPrefsInDir(dir, nsnull, 0);
+ }
+ }
+ }
+ }
+ return NS_OK;
+ }
+
+-//----------------------------------------------------------------------------------------
+-// Initialize default preference JavaScript buffers from
+-// appropriate TEXT resources
+-//----------------------------------------------------------------------------------------
+-static nsresult pref_InitDefaults()
+-{
+- nsCOMPtr<nsIFile> greprefsFile;
+- nsresult rv;
+-
+- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- rv = openPrefFile(greprefsFile);
+- if (NS_FAILED(rv)) {
+- NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
+- }
+-
+- return NS_OK;
+-}
+-
+-#ifdef MOZ_OMNIJAR
+ static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
+ {
+ nsZipItemPtr<char> manifest(jarReader, name, true);
+ NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
+
+ PrefParseState ps;
+ PREF_InitParseState(&ps, PREF_ReaderCallback, NULL);
+ nsresult rv = PREF_ParseBuf(&ps, manifest, manifest.Length());
+ PREF_FinalizeParseState(&ps);
+
+ return rv;
+ }
+
+-static nsresult pref_InitAppDefaultsFromOmnijar()
+-{
+- nsresult rv;
+-
+- nsZipArchive* jarReader = mozilla::OmnijarReader();
+- if (!jarReader)
+- return pref_InitDefaults();
+-
+- rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsZipFind *findPtr;
+- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr);
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsAutoPtr<nsZipFind> find(findPtr);
+-
+- nsTArray<nsCString> prefEntries;
+- const char *entryName;
+- PRUint16 entryNameLen;
+- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
+- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
+- }
+-
+- prefEntries.Sort();
+- for (PRUint32 i = prefEntries.Length(); i--; ) {
+- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get());
+- if (NS_FAILED(rv))
+- NS_WARNING("Error parsing preferences.");
+- }
+-
+- return NS_OK;
+-}
+-#endif
+-
++//----------------------------------------------------------------------------------------
++// Initialize default preference JavaScript buffers from
++// appropriate TEXT resources
++//----------------------------------------------------------------------------------------
+ static nsresult pref_InitInitialObjects()
+ {
+ nsresult rv;
+
+- // first we parse the GRE default prefs. This also works if we're not using a GRE,
+-#ifdef MOZ_OMNIJAR
+- rv = pref_InitAppDefaultsFromOmnijar();
+-#else
+- rv = pref_InitDefaults();
+-#endif
+- NS_ENSURE_SUCCESS(rv, rv);
++ // In omni.jar case, we load the following prefs:
++ // - jar:$gre/omni.jar!/greprefs.js
++ // - jar:$gre/omni.jar!/defaults/pref/*.js
++ // In non omni.jar case, we load:
++ // - $gre/greprefs.js
++ //
++ // When $app == $gre, we additionally load, in all cases:
++ // - $gre/defaults/pref/*.js
++ // This is kept for bug 591866 (channel-prefs.js should not be in omni.jar).
++ // We load all files instead of channel-prefs.js only to have the same
++ // behaviour as $app != $gre.
++ //
++ // When $app != $gre, we additionally load, in omni.jar case:
++ // - jar:$app/omni.jar!/defaults/preferences/*.js
++ // - $app/defaults/preferences/*.js
++ // and in non omni.jar case:
++ // - $app/defaults/preferences/*.js
+
+- nsCOMPtr<nsIFile> defaultPrefDir;
+- // now parse the "application" default preferences
+- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
+- NS_ENSURE_SUCCESS(rv, rv);
++ nsZipFind *findPtr;
++ nsAutoPtr<nsZipFind> find;
++ nsTArray<nsCString> prefEntries;
++ const char *entryName;
++ PRUint16 entryNameLen;
+
+- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
+- static const char* specialFiles[] = {
++ nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE);
++ if (jarReader) {
++ // Load jar:$gre/omni.jar!/greprefs.js
++ rv = pref_ReadPrefFromJar(jarReader, "greprefs.js");
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ // Load jar:$gre/omni.jar!/defaults/pref/*.js
++ rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ find = findPtr;
++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
++ }
++
++ prefEntries.Sort();
++ for (PRUint32 i = prefEntries.Length(); i--; ) {
++ rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get());
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing preferences.");
++ }
++ } else {
++ // Load $gre/greprefs.js
++ nsCOMPtr<nsIFile> greprefsFile;
++ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = openPrefFile(greprefsFile);
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
++ }
++
++ if (!mozilla::Omnijar::HasOmnijar(mozilla::Omnijar::APP)) {
++ // Load $gre/defaults/pref/*.js
++ nsCOMPtr<nsIFile> defaultPrefDir;
++
++ rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir));
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
++ static const char* specialFiles[] = {
+ #if defined(XP_MAC) || defined(XP_MACOSX)
+ "macprefs.js"
+ #elif defined(XP_WIN)
+ "winpref.js"
+ #elif defined(XP_UNIX)
+ "unix.js"
+-#if defined(_AIX)
++#if defined(VMS)
++ , "openvms.js"
++#elif defined(_AIX)
+ , "aix.js"
+ #endif
+ #elif defined(XP_OS2)
+ "os2pref.js"
++#elif defined(XP_BEOS)
++ "beos.js"
+ #endif
+- };
++ };
+
+- rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
+- if (NS_FAILED(rv)) {
+- NS_WARNING("Error parsing application default preferences.");
++ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing application default preferences.");
++ }
++
++ // Load jar:$app/omni.jar!/defaults/preferences/*.js
++ nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
++ if (appJarReader) {
++ rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
++ NS_ENSURE_SUCCESS(rv, rv);
++ find = findPtr;
++ prefEntries.Clear();
++ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
++ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen));
++ }
++ prefEntries.Sort();
++ for (PRUint32 i = prefEntries.Length(); i--; ) {
++ rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get());
++ if (NS_FAILED(rv))
++ NS_WARNING("Error parsing preferences.");
++ }
+ }
+
+ rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID,
+ nsnull, NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID);
+
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -152,97 +152,62 @@ nsResProtocolHandler::nsResProtocolHandl
+ }
+
+ nsResProtocolHandler::~nsResProtocolHandler()
+ {
+ gResHandler = nsnull;
+ }
+
+ nsresult
+-nsResProtocolHandler::AddSpecialDir(const char* aSpecialDir, const nsACString& aSubstitution)
+-{
+- nsCOMPtr<nsIFile> file;
+- nsresult rv = NS_GetSpecialDirectory(aSpecialDir, getter_AddRefs(file));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- nsCOMPtr<nsIURI> uri;
+- rv = mIOService->NewFileURI(file, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- return SetSubstitution(aSubstitution, uri);
+-}
+-
+-nsresult
+ nsResProtocolHandler::Init()
+ {
+ if (!mSubstitutions.Init(32))
+ return NS_ERROR_UNEXPECTED;
+
+ nsresult rv;
+
+ mIOService = do_GetIOService(&rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+-#ifdef MOZ_OMNIJAR
+- nsCOMPtr<nsIFile> omniJar(mozilla::OmnijarPath());
+- if (omniJar)
+- return Init(omniJar);
+-#endif
+-
+- // these entries should be kept in sync with the omnijar Init function
++ nsCAutoString appURI, greURI;
++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+- // make resource:/// point to the application directory
++ // make resource:/// point to the application directory or omnijar
+ //
+- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString());
++ nsCOMPtr<nsIURI> uri;
++ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ rv = SetSubstitution(EmptyCString(), uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
+ // make resource://gre/ point to the GRE directory
+ //
+- rv = AddSpecialDir(NS_GRE_DIR, kGRE);
++ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0.
++ rv = NS_NewURI(getter_AddRefs(uri), greURI);
++ NS_ENSURE_SUCCESS(rv, rv);
++ }
++
++ rv = SetSubstitution(kGRE, uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir...
+ // but once I finish multiple chrome registration I'm not sure that it is needed
+
+ // XXX dveditz: resource://pchrome/ defeats profile directory salting
+ // if web content can load it. Tread carefully.
+
+ return rv;
+ }
+
+-#ifdef MOZ_OMNIJAR
+-nsresult
+-nsResProtocolHandler::Init(nsIFile *aOmniJar)
+-{
+- nsresult rv;
+- nsCOMPtr<nsIURI> uri;
+- nsCAutoString omniJarSpec;
+- NS_GetURLSpecFromActualFile(aOmniJar, omniJarSpec, mIOService);
+-
+- nsCAutoString urlStr("jar:");
+- urlStr += omniJarSpec;
+- urlStr += "!/";
+-
+- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri));
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- // these entries should be kept in sync with the normal Init function
+-
+- // resource:/// points to jar:omni.jar!/
+- SetSubstitution(EmptyCString(), uri);
+-
+- // resource://gre/ points to jar:omni.jar!/
+- SetSubstitution(kGRE, uri);
+-
+- return NS_OK;
+-}
+-#endif
+-
+ #ifdef MOZ_IPC
+ static PLDHashOperator
+ EnumerateSubstitution(const nsACString& aKey,
+ nsIURI* aURI,
+ void* aArg)
+ {
+ nsTArray<ResourceMapping>* resources =
+ static_cast<nsTArray<ResourceMapping>*>(aArg);
+diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp
+--- a/startupcache/StartupCache.cpp
++++ b/startupcache/StartupCache.cpp
+@@ -237,27 +237,36 @@ StartupCache::GetBuffer(const char* id,
+ nsZipItemPtr<char> zipItem(mArchive, id, true);
+ if (zipItem) {
+ *outbuf = zipItem.Forget();
+ *length = zipItem.Length();
+ return NS_OK;
+ }
+ }
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarReader()) {
++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)) {
+ // no need to checksum omnijarred entries
+- nsZipItemPtr<char> zipItem(mozilla::OmnijarReader(), id);
++ nsZipItemPtr<char> zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::APP), id);
+ if (zipItem) {
+ *outbuf = zipItem.Forget();
+ *length = zipItem.Length();
+ return NS_OK;
+ }
+ }
+-#endif
++
++ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) {
++ // no need to checksum omnijarred entries
++ nsZipItemPtr<char> zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE), id);
++ if (zipItem) {
++ *outbuf = zipItem.Forget();
++ *length = zipItem.Length();
++ return NS_OK;
++ }
++ }
++
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+
+ // Makes a copy of the buffer, client retains ownership of inbuf.
+ nsresult
+ StartupCache::PutBuffer(const char* id, const char* inbuf, PRUint32 len)
+ {
+ WaitOnWriteThread();
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
+@@ -3897,35 +3897,45 @@ XRE_InitCommandLine(int aArgc, char* aAr
+ CommandLine::Init(aArgc, canonArgs);
+
+ for (int i = 0; i < aArgc; ++i)
+ free(canonArgs[i]);
+ delete[] canonArgs;
+ #endif
+ #endif
+
+-#ifdef MOZ_OMNIJAR
+- const char *omnijarPath = nsnull;
+- ArgResult ar = CheckArg("omnijar", PR_FALSE, &omnijarPath);
++ const char *path = nsnull;
++ ArgResult ar = CheckArg("grebase", PR_FALSE, &path);
+ if (ar == ARG_BAD) {
+- PR_fprintf(PR_STDERR, "Error: argument -omnijar requires an omnijar path\n");
++ PR_fprintf(PR_STDERR, "Error: argument -grebase requires a path argument\n");
+ return NS_ERROR_FAILURE;
+ }
+
+- if (!omnijarPath)
++ if (!path)
+ return rv;
+
+- nsCOMPtr<nsILocalFile> omnijar;
+- rv = NS_NewNativeLocalFile(nsDependentCString(omnijarPath), PR_TRUE,
+- getter_AddRefs(omnijar));
+- if (NS_SUCCEEDED(rv))
+- mozilla::SetOmnijar(omnijar);
+-#endif
+-
+- return rv;
++ nsCOMPtr<nsILocalFile> greBase;
++ rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase));
++ if (NS_FAILED(rv))
++ return rv;
++
++ ar = CheckArg("appbase", PR_FALSE, &path);
++ if (ar == ARG_BAD) {
++ PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n");
++ return NS_ERROR_FAILURE;
++ }
++
++ nsCOMPtr<nsILocalFile> appBase;
++ if (path) {
++ rv = XRE_GetFileFromPath(path, getter_AddRefs(appBase));
++ if (NS_FAILED(rv))
++ return rv;
++ }
++
++ return mozilla::Omnijar::SetBase(greBase, appBase);
+ }
+
+ nsresult
+ XRE_DeinitCommandLine()
+ {
+ nsresult rv = NS_OK;
+
+ #if defined(MOZ_IPC)
+diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
+--- a/toolkit/xre/nsEmbedFunctions.cpp
++++ b/toolkit/xre/nsEmbedFunctions.cpp
+@@ -512,19 +512,17 @@ XRE_InitChildProcess(int aArgc,
+ }
+
+ // Run the UI event loop on the main thread.
+ uiMessageLoop.MessageLoop::Run();
+
+ // Allow ProcessChild to clean up after itself before going out of
+ // scope and being deleted
+ process->CleanUp();
+-#ifdef MOZ_OMNIJAR
+- mozilla::SetOmnijar(nsnull);
+-#endif
++ mozilla::Omnijar::SetBase(nsnull, nsnull);
+ }
+ }
+
+ NS_LogTerm();
+ return XRE_DeinitCommandLine();
+ }
+
+ MessageLoop*
+diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in
+--- a/xpcom/build/Makefile.in
++++ b/xpcom/build/Makefile.in
+@@ -64,28 +64,25 @@ CSRCS = \
+ $(NULL)
+
+ CPPSRCS = \
+ $(XPCOM_GLUE_SRC_LCPPSRCS) \
+ $(XPCOM_GLUENS_SRC_LCPPSRCS) \
+ nsXPComInit.cpp \
+ nsXPCOMStrings.cpp \
+ Services.cpp \
++ Omnijar.cpp \
+ $(NULL)
+
+ ifndef MOZ_ENABLE_LIBXUL
+ ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
+ CPPSRCS += dlldeps.cpp
+ endif
+ endif
+
+-ifdef MOZ_OMNIJAR
+-CPPSRCS += Omnijar.cpp
+-endif
+-
+ SHARED_LIBRARY_LIBS = \
+ $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \
+ ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \
+ ../io/$(LIB_PREFIX)xpcomio_s.$(LIB_SUFFIX) \
+ ../components/$(LIB_PREFIX)xpcomcomponents_s.$(LIB_SUFFIX) \
+ ../threads/$(LIB_PREFIX)xpcomthreads_s.$(LIB_SUFFIX) \
+ ../proxy/src/$(LIB_PREFIX)xpcomproxy_s.$(LIB_SUFFIX) \
+ ../base/$(LIB_PREFIX)xpcombase_s.$(LIB_SUFFIX) \
+diff --git a/xpcom/build/Omnijar.cpp b/xpcom/build/Omnijar.cpp
+--- a/xpcom/build/Omnijar.cpp
++++ b/xpcom/build/Omnijar.cpp
+@@ -16,16 +16,17 @@
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Michael Wu <mwu@mozilla.com>
++ * Mike Hommey <mh@glandium.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+@@ -33,69 +34,175 @@
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ #include "Omnijar.h"
+
+-#include "nsILocalFile.h"
+-#include "nsXULAppAPI.h"
++#include "nsIFile.h"
+ #include "nsZipArchive.h"
++#include "nsNetUtil.h"
+
+-static nsILocalFile* sOmnijarPath = nsnull;
+-static nsZipArchive* sOmnijarReader = nsnull;
++namespace mozilla {
+
+-static void
+-SetupReader()
++nsIFile *Omnijar::sPath[2] = { nsnull, nsnull };
++PRBool Omnijar::sIsOmnijar[2] = { PR_FALSE, PR_FALSE };
++
++#ifdef MOZ_ENABLE_LIBXUL
++nsZipArchive *Omnijar::sReader[2] = { nsnull, nsnull };
++#endif
++
++static already_AddRefed<nsIFile>
++ComputePath(nsIFile *aPath, PRBool &aIsOmnijar)
+ {
+- if (!sOmnijarPath) {
+- return;
++ PRBool isDir;
++ aIsOmnijar = PR_FALSE;
++ if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir)
++ return nsnull;
++
++ nsCOMPtr<nsIFile> path;
++#ifdef MOZ_ENABLE_LIBXUL
++ // Search for omni.jar in the given directory
++ if (!isDir || NS_FAILED(aPath->Clone(getter_AddRefs(path))))
++ return nsnull;
++
++ if (NS_FAILED(path->AppendNative(NS_LITERAL_CSTRING("omni.jar"))))
++ return nsnull;
++
++ if (NS_FAILED(path->Exists(&aIsOmnijar)))
++ return nsnull;
++#endif
++
++ if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path))))
++ return nsnull;
++
++ return path.forget();
++}
++
++nsresult
++Omnijar::SetBase(nsIFile *aGrePath, nsIFile *aAppPath)
++{
++ NS_ABORT_IF_FALSE(aGrePath || !aAppPath, "Omnijar::SetBase(NULL, something) call forbidden");
++
++#ifdef MOZ_ENABLE_LIBXUL
++ if (sReader[GRE]) {
++ sReader[GRE]->CloseArchive();
++ delete sReader[GRE];
++ }
++ if (sReader[APP]) {
++ sReader[APP]->CloseArchive();
++ delete sReader[APP];
++ }
++ sReader[APP] = sReader[GRE] = nsnull;
++#endif
++
++ nsresult rv;
++ PRBool equals;
++ if (aAppPath) {
++ rv = aAppPath->Equals(aGrePath, &equals);
++ NS_ENSURE_SUCCESS(rv, rv);
++ } else {
++ equals = PR_TRUE;
+ }
+
+- nsZipArchive* zipReader = new nsZipArchive();
+- if (!zipReader) {
+- NS_IF_RELEASE(sOmnijarPath);
+- return;
++ nsCOMPtr<nsIFile> grePath = ComputePath(aGrePath, sIsOmnijar[GRE]);
++ nsCOMPtr<nsIFile> appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]);
++
++ NS_IF_RELEASE(sPath[GRE]);
++ sPath[GRE] = grePath;
++ NS_IF_ADDREF(sPath[GRE]);
++
++ NS_IF_RELEASE(sPath[APP]);
++ sPath[APP] = appPath;
++ NS_IF_ADDREF(sPath[APP]);
++
++ return NS_OK;
++}
++
++already_AddRefed<nsIFile>
++Omnijar::GetBase(Type aType)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ if (!sIsOmnijar[aType]) {
++ NS_IF_ADDREF(sPath[aType]);
++ return sPath[aType];
+ }
+
+- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) {
++ nsCOMPtr<nsIFile> file, path;
++ if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file))))
++ return nsnull;
++
++ if (NS_FAILED(file->GetParent(getter_AddRefs(path))))
++ return nsnull;
++ return path.forget();
++}
++
++#ifdef MOZ_ENABLE_LIBXUL
++nsZipArchive *
++Omnijar::GetReader(Type aType)
++{
++ if (!sIsOmnijar[aType])
++ return nsnull;
++
++ if (sReader[aType])
++ return sReader[aType];
++
++ nsZipArchive* zipReader = new nsZipArchive();
++ if (!zipReader)
++ return nsnull;
++
++ if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) {
+ delete zipReader;
+- NS_IF_RELEASE(sOmnijarPath);
+- return;
++ return nsnull;
+ }
+
+- sOmnijarReader = zipReader;
++ return (sReader[aType] = zipReader);
+ }
+
+-nsILocalFile*
+-mozilla::OmnijarPath()
++nsZipArchive *
++Omnijar::GetReader(nsIFile *aPath)
+ {
+- if (!sOmnijarReader)
+- SetupReader();
++ PRBool equals;
++ nsresult rv;
+
+- return sOmnijarPath;
++ if (sIsOmnijar[GRE]) {
++ rv = sPath[GRE]->Equals(aPath, &equals);
++ if (NS_SUCCEEDED(rv) && equals)
++ return GetReader(GRE);
++ }
++ if (sIsOmnijar[APP]) {
++ rv = sPath[APP]->Equals(aPath, &equals);
++ if (NS_SUCCEEDED(rv) && equals)
++ return GetReader(APP);
++ }
++ return nsnull;
++}
++#endif
++
++nsresult
++Omnijar::GetURIString(Type aType, nsCString &result)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ result = "";
++
++ if ((aType == APP) && (!sPath[APP]))
++ return NS_OK;
++
++ nsCAutoString omniJarSpec;
++ nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ if (sIsOmnijar[aType]) {
++ result = "jar:";
++ result += omniJarSpec;
++ result += "!";
++ } else {
++ result = omniJarSpec;
++ }
++ result += "/";
++ return NS_OK;
+ }
+
+-nsZipArchive*
+-mozilla::OmnijarReader()
+-{
+- if (!sOmnijarReader)
+- SetupReader();
+-
+- return sOmnijarReader;
+-}
+-
+-void
+-mozilla::SetOmnijar(nsILocalFile* aPath)
+-{
+- NS_IF_RELEASE(sOmnijarPath);
+- if (sOmnijarReader) {
+- sOmnijarReader->CloseArchive();
+- delete sOmnijarReader;
+- sOmnijarReader = nsnull;
+- }
+-
+- sOmnijarPath = aPath;
+- NS_IF_ADDREF(sOmnijarPath);
+-}
+-
++} /* namespace mozilla */
+diff --git a/xpcom/build/Omnijar.h b/xpcom/build/Omnijar.h
+--- a/xpcom/build/Omnijar.h
++++ b/xpcom/build/Omnijar.h
+@@ -16,16 +16,17 @@
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Michael Wu <mwu@mozilla.com>
++ * Mike Hommey <mh@glandium.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+@@ -34,29 +35,137 @@
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ #ifndef mozilla_Omnijar_h
+ #define mozilla_Omnijar_h
+
+-class nsILocalFile;
++#include "nscore.h"
++#include "nsTArray.h"
++#include "nsCOMPtr.h"
++#include "nsString.h"
++
++class nsIFile;
+ class nsZipArchive;
+-
+-#ifdef MOZ_OMNIJAR
++class nsIURI;
+
+ namespace mozilla {
+
++#ifdef MOZ_ENABLE_LIBXUL
++#define OMNIJAR_EXPORT
++#else
++#define OMNIJAR_EXPORT NS_EXPORT
++#endif
++
++class OMNIJAR_EXPORT Omnijar {
++private:
+ /**
+- * This returns the path to the omnijar.
+- * If the omnijar isn't available, this function will return null.
+- * Callers should fallback to flat packaging if null.
++ * Store an nsIFile for either a base directory when there is no omni.jar,
++ * or omni.jar itself. We can store two paths here, one for GRE
++ * (corresponding to resource://gre/) and one for APP
++ * (corresponding to resource:/// and resource://app/), but only
++ * store one when both point to the same location (unified).
+ */
+-nsILocalFile *OmnijarPath();
+-nsZipArchive *OmnijarReader();
+-void SetOmnijar(nsILocalFile* aPath);
++static nsIFile *sPath[2];
++/**
++ * Store whether the corresponding sPath is an omni.jar or a directory
++ */
++static PRBool sIsOmnijar[2];
++
++#ifdef MOZ_ENABLE_LIBXUL
++/**
++ * Cached nsZipArchives for the corresponding sPath
++ */
++static nsZipArchive *sReader[2];
++#endif
++
++public:
++enum Type {
++ GRE = 0,
++ APP = 1
++};
++
++/**
++ * Returns whether SetBase has been called at least once with
++ * a valid nsIFile
++ */
++static PRBool
++IsInitialized()
++{
++ // GRE path is always set after initialization.
++ return sPath[0] != nsnull;
++}
++
++/**
++ * Sets the base directories for GRE and APP. APP base directory
++ * may be nsnull, in case the APP and GRE directories are the same.
++ */
++static nsresult SetBase(nsIFile *aGrePath, nsIFile *aAppPath);
++
++/**
++ * Returns an nsIFile pointing to the omni.jar file for GRE or APP.
++ * Returns nsnull when there is no corresponding omni.jar.
++ * Also returns nsnull for APP in the unified case.
++ */
++static already_AddRefed<nsIFile>
++GetPath(Type aType)
++{
++ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized");
++
++ if (sIsOmnijar[aType]) {
++ NS_IF_ADDREF(sPath[aType]);
++ return sPath[aType];
++ }
++ return nsnull;
++}
++
++/**
++ * Returns whether GRE or APP use an omni.jar. Returns PR_False when
++ * using an omni.jar in the unified case.
++ */
++static PRBool
++HasOmnijar(Type aType)
++{
++ return sIsOmnijar[aType];
++}
++
++/**
++ * Returns the base directory for GRE or APP. In the unified case,
++ * returns nsnull for APP.
++ */
++static already_AddRefed<nsIFile> GetBase(Type aType);
++
++/**
++ * Returns a nsZipArchive pointer for the omni.jar file for GRE or
++ * APP. Returns nsnull in the same cases GetPath() would.
++ */
++#ifdef MOZ_ENABLE_LIBXUL
++static nsZipArchive *GetReader(Type aType);
++#else
++static nsZipArchive *GetReader(Type aType) { return nsnull; }
++#endif
++
++/**
++ * Returns a nsZipArchive pointer for the given path IAOI the given
++ * path is the omni.jar for either GRE or APP.
++ */
++#ifdef MOZ_ENABLE_LIBXUL
++static nsZipArchive *GetReader(nsIFile *aPath);
++#else
++static nsZipArchive *GetReader(nsIFile *aPath) { return nsnull; }
++#endif
++
++/**
++ * Returns the URI string corresponding to the omni.jar or directory
++ * for GRE or APP. i.e. jar:/path/to/omni.jar!/ for omni.jar and
++ * /path/to/base/dir/ otherwise. Returns an empty string for APP in
++ * the unified case.
++ * The returned URI is guaranteed to end with a slash.
++ */
++static nsresult GetURIString(Type aType, nsCString &result);
++
++}; /* class Omnijar */
+
+ } /* namespace mozilla */
+
+-#endif /* MOZ_OMNIJAR */
+-
+ #endif /* mozilla_Omnijar_h */
+diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp
+--- a/xpcom/build/nsXPComInit.cpp
++++ b/xpcom/build/nsXPComInit.cpp
+@@ -462,35 +462,35 @@ NS_InitXPCOM2(nsIServiceManager* *result
+ nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib);
+ }
+
+ if (appFileLocationProvider) {
+ rv = nsDirectoryService::gService->RegisterProvider(appFileLocationProvider);
+ if (NS_FAILED(rv)) return rv;
+ }
+
+-#ifdef MOZ_OMNIJAR
+ NS_TIME_FUNCTION_MARK("Next: Omnijar init");
+
+- if (!mozilla::OmnijarPath()) {
+- nsCOMPtr<nsILocalFile> omnijar;
++ if (!mozilla::Omnijar::IsInitialized()) {
++ nsCOMPtr<nsILocalFile> greDir, appDir;
+ nsCOMPtr<nsIFile> file;
+
+- rv = NS_ERROR_FAILURE;
+ nsDirectoryService::gService->Get(NS_GRE_DIR,
+ NS_GET_IID(nsIFile),
+ getter_AddRefs(file));
+- if (file)
+- rv = file->Append(NS_LITERAL_STRING("omni.jar"));
+- if (NS_SUCCEEDED(rv))
+- omnijar = do_QueryInterface(file);
+- if (NS_SUCCEEDED(rv))
+- mozilla::SetOmnijar(omnijar);
++ greDir = do_QueryInterface(file);
++
++ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR,
++ NS_GET_IID(nsIFile),
++ getter_AddRefs(file));
++ appDir = do_QueryInterface(file);
++
++ rv = mozilla::Omnijar::SetBase(greDir, appDir);
++ NS_ENSURE_SUCCESS(rv, rv);
+ }
+-#endif
+
+ #ifdef MOZ_IPC
+ if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) {
+ NS_TIME_FUNCTION_MARK("Next: IPC command line init");
+
+ #ifdef OS_WIN
+ CommandLine::Init(0, nsnull);
+ #else
+@@ -769,18 +769,16 @@ ShutdownXPCOM(nsIServiceManager* servMgr
+ sCommandLineWasInitialized = false;
+ }
+ if (sExitManager) {
+ delete sExitManager;
+ sExitManager = nsnull;
+ }
+ #endif
+
+-#ifdef MOZ_OMNIJAR
+- mozilla::SetOmnijar(nsnull);
+-#endif
++ mozilla::Omnijar::SetBase(nsnull, nsnull);
+
+ NS_LogTerm();
+
+ return NS_OK;
+ }
+
+ } // namespace mozilla
+diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp
+--- a/xpcom/components/nsComponentManager.cpp
++++ b/xpcom/components/nsComponentManager.cpp
+@@ -175,18 +175,16 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA
+ #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) \
+ NS_TIME_FUNCTION_MIN_FMT(5, "%s (line %d) (contractid: %s)", MOZ_FUNCTION_NAME, \
+ __LINE__, (cid))
+ #else
+ #define COMPMGR_TIME_FUNCTION_CID(cid) do {} while (0)
+ #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0)
+ #endif
+
+-#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///")
+-
+ nsresult
+ nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const
+ {
+ nsresult rv;
+ nsXPIDLCString value;
+ nsCOMPtr<nsICategoryManager> catman;
+ nsComponentManagerImpl *compMgr = nsComponentManagerImpl::gComponentManager;
+ if (!compMgr) {
+@@ -390,47 +388,44 @@ nsresult nsComponentManagerImpl::Init()
+
+ nsCategoryManager::GetSingleton()->SuppressNotifications(true);
+
+ RegisterModule(&kXPCOMModule, NULL);
+
+ for (PRUint32 i = 0; i < sStaticModules->Length(); ++i)
+ RegisterModule((*sStaticModules)[i], NULL);
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarPath()) {
+- nsCOMPtr<nsIZipReader> omnijarReader = new nsJAR();
+- rv = omnijarReader->Open(mozilla::OmnijarPath());
+- if (NS_SUCCEEDED(rv))
+- RegisterJarManifest(omnijarReader, "chrome.manifest", false);
++ nsCOMPtr<nsIFile> appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP);
++ if (appOmnijar) {
++ cl = sModuleLocations->InsertElementAt(1); // Insert after greDir
++ cl->type = NS_COMPONENT_LOCATION;
++ cl->location = do_QueryInterface(appOmnijar);
++ cl->jar = true;
+ }
+-#endif
++ nsCOMPtr<nsIFile> greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE);
++ if (greOmnijar) {
++ cl = sModuleLocations->InsertElementAt(0);
++ cl->type = NS_COMPONENT_LOCATION;
++ cl->location = do_QueryInterface(greOmnijar);
++ cl->jar = true;
++ }
+
+ for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) {
+ ComponentLocation& l = sModuleLocations->ElementAt(i);
+ if (!l.jar) {
+ RegisterManifestFile(l.type, l.location, false);
+ continue;
+ }
+
+ nsCOMPtr<nsIZipReader> reader = do_CreateInstance(kZipReaderCID, &rv);
+ rv = reader->Open(l.location);
+ if (NS_SUCCEEDED(rv))
+ RegisterJarManifest(reader, "chrome.manifest", false);
+ }
+
+-#ifdef MOZ_OMNIJAR
+- if (mozilla::OmnijarPath()) {
+- cl = sModuleLocations->InsertElementAt(0);
+- cl->type = NS_COMPONENT_LOCATION;
+- cl->location = mozilla::OmnijarPath();
+- cl->jar = true;
+- }
+-#endif
+-
+ nsCategoryManager::GetSingleton()->SuppressNotifications(false);
+
+ mStatus = NORMAL;
+
+ return NS_OK;
+ }
+
+ void
+# HG changeset patch
+# Parent ff1b810f78226d7f4010909d3cde05a57fdcf20c
+Bug 620931 part 4 - Fix resource://app/ to always point to the same as resource:///
+
+diff --git a/netwerk/protocol/res/nsResProtocolHandler.cpp b/netwerk/protocol/res/nsResProtocolHandler.cpp
+--- a/netwerk/protocol/res/nsResProtocolHandler.cpp
++++ b/netwerk/protocol/res/nsResProtocolHandler.cpp
+@@ -74,16 +74,17 @@ static nsResProtocolHandler *gResHandler
+ // set NSPR_LOG_FILE=log.txt
+ //
+ // this enables PR_LOG_ALWAYS level information and places all output in
+ // the file log.txt
+ //
+ static PRLogModuleInfo *gResLog;
+ #endif
+
++#define kAPP NS_LITERAL_CSTRING("app")
+ #define kGRE NS_LITERAL_CSTRING("gre")
+
+ //----------------------------------------------------------------------------
+ // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution
+ //----------------------------------------------------------------------------
+
+ nsresult
+ nsResURL::EnsureFile()
+@@ -179,16 +180,22 @@ nsResProtocolHandler::Init()
+ nsCOMPtr<nsIURI> uri;
+ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ rv = SetSubstitution(EmptyCString(), uri);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ //
++ // make resource://app/ point to the application directory or omnijar
++ //
++ rv = SetSubstitution(kAPP, uri);
++ NS_ENSURE_SUCCESS(rv, rv);
++
++ //
+ // make resource://gre/ point to the GRE directory
+ //
+ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0.
+ rv = NS_NewURI(getter_AddRefs(uri), greURI);
+ NS_ENSURE_SUCCESS(rv, rv);
+ }
+
+ rv = SetSubstitution(kGRE, uri);
+diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
+--- a/toolkit/xre/nsXREDirProvider.cpp
++++ b/toolkit/xre/nsXREDirProvider.cpp
+@@ -300,19 +300,16 @@ nsXREDirProvider::GetFile(const char* aP
+ }
+ }
+ else if (!strcmp(aProperty, XRE_EXECUTABLE_FILE) && gArgv[0]) {
+ nsCOMPtr<nsILocalFile> lf;
+ rv = XRE_GetBinaryPath(gArgv[0], getter_AddRefs(lf));
+ if (NS_SUCCEEDED(rv))
+ file = lf;
+ }
+- else if (!strcmp(aProperty, "resource:app")) {
+- rv = GetAppDir()->Clone(getter_AddRefs(file));
+- }
+
+ else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) {
+ return mProfileDir->Clone(aFile);
+ }
+ else if (!strcmp(aProperty, NS_APP_PROFILE_LOCAL_DIR_STARTUP)) {
+ if (mProfileLocalDir)
+ return mProfileLocalDir->Clone(aFile);
+
+# HG changeset patch
+# Parent 7d2228db71a299afca60babff632a967d2d6c456
+Bug 620931 part 5 - Enable omni.jar by default on xulrunner
+
+diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh
+--- a/xulrunner/confvars.sh
++++ b/xulrunner/confvars.sh
+@@ -36,15 +36,16 @@
+ #
+ # ***** END LICENSE BLOCK *****
+
+ MOZ_APP_NAME=xulrunner
+ MOZ_APP_DISPLAYNAME=XULRunner
+ MOZ_UPDATER=1
+ MOZ_XULRUNNER=1
+ MOZ_ENABLE_LIBXUL=1
++MOZ_CHROME_FILE_FORMAT=omni
+ MOZ_STATIC_BUILD_UNSUPPORTED=1
+ MOZ_APP_VERSION=$MOZILLA_VERSION
+ if test "$MOZ_STORAGE"; then
+ MOZ_PLACES=1
+ fi
+ MOZ_EXTENSIONS_DEFAULT=" gnomevfs"
+ MOZ_URL_CLASSIFIER=1
diff --git a/staging/xulrunner/xulrunner-version.patch b/staging/xulrunner/xulrunner-version.patch
new file mode 100644
index 000000000..8e81b23ea
--- /dev/null
+++ b/staging/xulrunner/xulrunner-version.patch
@@ -0,0 +1,12 @@
+diff -Nur mozilla-2.0.orig/xulrunner/installer/Makefile.in mozilla-2.0/xulrunner/installer/Makefile.in
+--- mozilla-2.0.orig/xulrunner/installer/Makefile.in 2011-03-03 14:12:04.000000000 -0800
++++ mozilla-2.0/xulrunner/installer/Makefile.in 2011-03-13 01:58:19.663360705 -0800
+@@ -44,6 +44,8 @@
+
+ include $(DEPTH)/config/autoconf.mk
+
++MOZ_APP_VERSION="2.0"
++
+ NO_PKG_FILES = \
+ xulrunner-config \
+ regchrome* \
diff --git a/testing/coreutils/PKGBUILD b/testing/coreutils/PKGBUILD
new file mode 100644
index 000000000..8fdbe0149
--- /dev/null
+++ b/testing/coreutils/PKGBUILD
@@ -0,0 +1,69 @@
+# $Id: PKGBUILD 126199 2011-06-02 14:37:57Z bisson $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=coreutils
+pkgver=8.12
+pkgrel=2
+pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/coreutils"
+groups=('base')
+depends=('glibc' 'shadow' 'pam' 'acl' 'gmp' 'libcap')
+replaces=('mktemp')
+backup=('etc/pam.d/su')
+install=${pkgname}.install
+options=('!emptydirs')
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
+ coreutils-uname.patch
+ coreutils-pam.patch
+ su.pam)
+md5sums=('0f7d43c2d2e24314b43a6c6267e25b90'
+ 'c4fcca138b6abf6d443d48a6f0cd8833'
+ 'aad79a2aa6d566c375d7bdd1b0767278'
+ 'fa85e5cce5d723275b14365ba71a8aad')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # added su wheel group pam patch (from fedora git)
+ patch -Np1 -i ${srcdir}/coreutils-pam.patch
+
+ # linux specific uname improvement (from gentoo portage)
+ patch -Np1 -i ${srcdir}/coreutils-uname.patch
+
+ autoreconf -v
+ ./configure --prefix=/usr \
+ --enable-install-program=su,hostname \
+ --enable-no-install-program=groups,kill,uptime \
+ --enable-pam
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make RUN_EXPENSIVE_TESTS=yes check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ cd ${pkgdir}/usr/bin
+ install -dm755 ${pkgdir}/{bin,usr/sbin}
+
+ # binaries required by FHS
+ _fhs="cat chgrp chmod chown cp date dd df echo false hostname \
+ ln ls mkdir mknod mv pwd rm rmdir stty su sync true uname"
+ mv ${_fhs} ${pkgdir}/bin
+
+ # binaries required by various Arch scripts
+ _bin="cut dir dircolors du install mkfifo readlink shred \
+ sleep touch tr vdir"
+ mv ${_bin} ${pkgdir}/bin
+ ln -sf /bin/sleep ${pkgdir}/usr/bin/sleep
+
+ mv chroot ${pkgdir}/usr/sbin
+ install -Dm644 ${srcdir}/su.pam ${pkgdir}/etc/pam.d/su
+}
diff --git a/testing/coreutils/coreutils-pam.patch b/testing/coreutils/coreutils-pam.patch
new file mode 100644
index 000000000..e61908f3f
--- /dev/null
+++ b/testing/coreutils/coreutils-pam.patch
@@ -0,0 +1,428 @@
+diff -urNp coreutils-8.4-orig/configure.ac coreutils-8.4/configure.ac
+--- coreutils-8.4-orig/configure.ac 2010-01-11 18:20:42.000000000 +0100
++++ coreutils-8.4/configure.ac 2010-02-12 10:17:46.000000000 +0100
+@@ -126,6 +126,13 @@ if test "$gl_gcc_warnings" = yes; then
+ AC_SUBST([GNULIB_WARN_CFLAGS])
+ fi
+
++dnl Give the chance to enable PAM
++AC_ARG_ENABLE(pam, dnl
++[ --enable-pam Enable use of the PAM libraries],
++[AC_DEFINE(USE_PAM, 1, [Define if you want to use PAM])
++LIB_PAM="-ldl -lpam -lpam_misc"
++AC_SUBST(LIB_PAM)])
++
+ AC_FUNC_FORK
+
+ optional_bin_progs=
+diff -urNp coreutils-8.4-orig/doc/coreutils.texi coreutils-8.4/doc/coreutils.texi
+--- coreutils-8.4-orig/doc/coreutils.texi 2010-01-03 18:06:20.000000000 +0100
++++ coreutils-8.4/doc/coreutils.texi 2010-02-12 10:17:46.000000000 +0100
+@@ -15081,8 +15081,11 @@ to certain shells, etc.).
+ @findex syslog
+ @command{su} can optionally be compiled to use @code{syslog} to report
+ failed, and optionally successful, @command{su} attempts. (If the system
+-supports @code{syslog}.) However, GNU @command{su} does not check if the
+-user is a member of the @code{wheel} group; see below.
++supports @code{syslog}.)
++
++This version of @command{su} has support for using PAM for
++authentication. You can edit @file{/etc/pam.d/su} to customize its
++behaviour.
+
+ The program accepts the following options. Also see @ref{Common options}.
+
+@@ -15124,6 +15127,8 @@ environment variables except @env{TERM},
+ @env{PATH} to a compiled-in default value. Change to @var{user}'s home
+ directory. Prepend @samp{-} to the shell's name, intended to make it
+ read its login startup file(s).
++Additionaly @env{DISPLAY} and @env{XAUTHORITY} environment variables
++are preserved as well for PAM functionality.
+
+ @item -m
+ @itemx -p
+@@ -15163,33 +15168,6 @@ Exit status:
+ the exit status of the subshell otherwise
+ @end display
+
+-@cindex wheel group, not supported
+-@cindex group wheel, not supported
+-@cindex fascism
+-@subsection Why GNU @command{su} does not support the @samp{wheel} group
+-
+-(This section is by Richard Stallman.)
+-
+-@cindex Twenex
+-@cindex MIT AI lab
+-Sometimes a few of the users try to hold total power over all the
+-rest. For example, in 1984, a few users at the MIT AI lab decided to
+-seize power by changing the operator password on the Twenex system and
+-keeping it secret from everyone else. (I was able to thwart this coup
+-and give power back to the users by patching the kernel, but I
+-wouldn't know how to do that in Unix.)
+-
+-However, occasionally the rulers do tell someone. Under the usual
+-@command{su} mechanism, once someone learns the root password who
+-sympathizes with the ordinary users, he or she can tell the rest. The
+-``wheel group'' feature would make this impossible, and thus cement the
+-power of the rulers.
+-
+-I'm on the side of the masses, not that of the rulers. If you are
+-used to supporting the bosses and sysadmins in whatever they do, you
+-might find this idea strange at first.
+-
+-
+ @node timeout invocation
+ @section @command{timeout}: Run a command with a time limit
+
+diff -urNp coreutils-8.4-orig/src/Makefile.am coreutils-8.4/src/Makefile.am
+--- coreutils-8.4-orig/src/Makefile.am 2010-01-03 18:06:20.000000000 +0100
++++ coreutils-8.4/src/Makefile.am 2010-02-12 10:17:46.000000000 +0100
+@@ -361,7 +361,7 @@ factor_LDADD += $(LIB_GMP)
+ uptime_LDADD += $(GETLOADAVG_LIBS)
+
+ # for crypt
+-su_LDADD += $(LIB_CRYPT)
++su_LDADD += $(LIB_CRYPT) @LIB_PAM@
+
+ # for various ACL functions
+ copy_LDADD += $(LIB_ACL)
+diff -urNp coreutils-8.4-orig/src/su.c coreutils-8.4/src/su.c
+--- coreutils-8.4-orig/src/su.c 2010-02-12 10:15:15.000000000 +0100
++++ coreutils-8.4/src/su.c 2010-02-12 10:24:29.000000000 +0100
+@@ -37,6 +37,16 @@
+ restricts who can su to UID 0 accounts. RMS considers that to
+ be fascist.
+
++#ifdef USE_PAM
++
++ Actually, with PAM, su has nothing to do with whether or not a
++ wheel group is enforced by su. RMS tries to restrict your access
++ to a su which implements the wheel group, but PAM considers that
++ to be fascist, and gives the user/sysadmin the opportunity to
++ enforce a wheel group by proper editing of /etc/pam.conf
++
++#endif
++
+ Compile-time options:
+ -DSYSLOG_SUCCESS Log successful su's (by default, to root) with syslog.
+ -DSYSLOG_FAILURE Log failed su's (by default, to root) with syslog.
+@@ -53,6 +63,15 @@
+ #include <pwd.h>
+ #include <grp.h>
+
++#ifdef USE_PAM
++# include <signal.h>
++# include <sys/wait.h>
++# include <sys/fsuid.h>
++# include <unistd.h>
++# include <security/pam_appl.h>
++# include <security/pam_misc.h>
++#endif /* USE_PAM */
++
+ #include "system.h"
+ #include "getpass.h"
+
+@@ -120,10 +139,17 @@
+ /* The user to become if none is specified. */
+ #define DEFAULT_USER "root"
+
++#ifndef USE_PAM
+ char *crypt (char const *key, char const *salt);
++#endif
+
+-static void run_shell (char const *, char const *, char **, size_t)
++static void run_shell (char const *, char const *, char **, size_t,
++ const struct passwd *)
++#ifdef USE_PAM
++ ;
++#else
+ ATTRIBUTE_NORETURN;
++#endif
+
+ /* If true, pass the `-f' option to the subshell. */
+ static bool fast_startup;
+@@ -209,7 +235,26 @@ log_su (struct passwd const *pw, bool su
+ }
+ #endif
+
++#ifdef USE_PAM
++static pam_handle_t *pamh = NULL;
++static int retval;
++static struct pam_conv conv = {
++ misc_conv,
++ NULL
++};
++
++#define PAM_BAIL_P if (retval) { \
++ pam_end(pamh, PAM_SUCCESS); \
++ return 0; \
++}
++#define PAM_BAIL_P_VOID if (retval) { \
++ pam_end(pamh, PAM_SUCCESS); \
++return; \
++}
++#endif
++
+ /* Ask the user for a password.
++ If PAM is in use, let PAM ask for the password if necessary.
+ Return true if the user gives the correct password for entry PW,
+ false if not. Return true without asking for a password if run by UID 0
+ or if PW has an empty password. */
+@@ -217,6 +262,44 @@ log_su (struct passwd const *pw, bool su
+ static bool
+ correct_password (const struct passwd *pw)
+ {
++#ifdef USE_PAM
++ struct passwd *caller;
++ char *tty_name, *ttyn;
++ retval = pam_start(PROGRAM_NAME, pw->pw_name, &conv, &pamh);
++ PAM_BAIL_P;
++
++ if (getuid() != 0 && !isatty(0)) {
++ fprintf(stderr, "standard in must be a tty\n");
++ exit(1);
++ }
++
++ caller = getpwuid(getuid());
++ if(caller != NULL && caller->pw_name != NULL) {
++ retval = pam_set_item(pamh, PAM_RUSER, caller->pw_name);
++ PAM_BAIL_P;
++ }
++
++ ttyn = ttyname(0);
++ if (ttyn) {
++ if (strncmp(ttyn, "/dev/", 5) == 0)
++ tty_name = ttyn+5;
++ else
++ tty_name = ttyn;
++ retval = pam_set_item(pamh, PAM_TTY, tty_name);
++ PAM_BAIL_P;
++ }
++ retval = pam_authenticate(pamh, 0);
++ PAM_BAIL_P;
++ retval = pam_acct_mgmt(pamh, 0);
++ if (retval == PAM_NEW_AUTHTOK_REQD) {
++ /* password has expired. Offer option to change it. */
++ retval = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
++ PAM_BAIL_P;
++ }
++ PAM_BAIL_P;
++ /* must be authenticated if this point was reached */
++ return 1;
++#else /* !USE_PAM */
+ char *unencrypted, *encrypted, *correct;
+ #if HAVE_GETSPNAM && HAVE_STRUCT_SPWD_SP_PWDP
+ /* Shadow passwd stuff for SVR3 and maybe other systems. */
+@@ -241,6 +324,7 @@ correct_password (const struct passwd *p
+ encrypted = crypt (unencrypted, correct);
+ memset (unencrypted, 0, strlen (unencrypted));
+ return STREQ (encrypted, correct);
++#endif /* !USE_PAM */
+ }
+
+ /* Update `environ' for the new shell based on PW, with SHELL being
+@@ -254,12 +338,18 @@ modify_environment (const struct passwd
+ /* Leave TERM unchanged. Set HOME, SHELL, USER, LOGNAME, PATH.
+ Unset all other environment variables. */
+ char const *term = getenv ("TERM");
++ char const *display = getenv ("DISPLAY");
++ char const *xauthority = getenv ("XAUTHORITY");
+ if (term)
+ term = xstrdup (term);
+ environ = xmalloc ((6 + !!term) * sizeof (char *));
+ environ[0] = NULL;
+ if (term)
+ xsetenv ("TERM", term);
++ if (display)
++ xsetenv ("DISPLAY", display);
++ if (xauthority)
++ xsetenv ("XAUTHORITY", xauthority);
+ xsetenv ("HOME", pw->pw_dir);
+ xsetenv ("SHELL", shell);
+ xsetenv ("USER", pw->pw_name);
+@@ -292,8 +382,13 @@ change_identity (const struct passwd *pw
+ {
+ #ifdef HAVE_INITGROUPS
+ errno = 0;
+- if (initgroups (pw->pw_name, pw->pw_gid) == -1)
++ if (initgroups (pw->pw_name, pw->pw_gid) == -1) {
++#ifdef USE_PAM
++ pam_close_session(pamh, 0);
++ pam_end(pamh, PAM_ABORT);
++#endif
+ error (EXIT_CANCELED, errno, _("cannot set groups"));
++ }
+ endgrent ();
+ #endif
+ if (setgid (pw->pw_gid))
+@@ -302,6 +397,31 @@ change_identity (const struct passwd *pw
+ error (EXIT_CANCELED, errno, _("cannot set user id"));
+ }
+
++#ifdef USE_PAM
++static int caught=0;
++/* Signal handler for parent process later */
++static void su_catch_sig(int sig)
++{
++ ++caught;
++}
++
++int
++pam_copyenv (pam_handle_t *pamh)
++{
++ char **env;
++
++ env = pam_getenvlist(pamh);
++ if(env) {
++ while(*env) {
++ if (putenv (*env))
++ xalloc_die ();
++ env++;
++ }
++ }
++ return(0);
++}
++#endif
++
+ /* Run SHELL, or DEFAULT_SHELL if SHELL is empty.
+ If COMMAND is nonzero, pass it to the shell with the -c option.
+ Pass ADDITIONAL_ARGS to the shell as more arguments; there
+@@ -309,17 +429,49 @@ change_identity (const struct passwd *pw
+
+ static void
+ run_shell (char const *shell, char const *command, char **additional_args,
+- size_t n_additional_args)
++ size_t n_additional_args, const struct passwd *pw)
+ {
+ size_t n_args = 1 + fast_startup + 2 * !!command + n_additional_args + 1;
+ char const **args = xnmalloc (n_args, sizeof *args);
+ size_t argno = 1;
++#ifdef USE_PAM
++ int child;
++ sigset_t ourset;
++ int status;
++
++ retval = pam_open_session(pamh,0);
++ if (retval != PAM_SUCCESS) {
++ fprintf (stderr, "could not open session\n");
++ exit (1);
++ }
++
++/* do this at the last possible moment, because environment variables may
++ be passed even in the session phase
++*/
++ if(pam_copyenv(pamh) != PAM_SUCCESS)
++ fprintf (stderr, "error copying PAM environment\n");
++
++ /* Credentials should be set in the parent */
++ if (pam_setcred(pamh, PAM_ESTABLISH_CRED) != PAM_SUCCESS) {
++ pam_close_session(pamh, 0);
++ fprintf(stderr, "could not set PAM credentials\n");
++ exit(1);
++ }
++
++ child = fork();
++ if (child == 0) { /* child shell */
++ change_identity (pw);
++ pam_end(pamh, 0);
++#endif
+
+ if (simulate_login)
+ {
+ char *arg0;
+ char *shell_basename;
+
++ if(chdir(pw->pw_dir))
++ error(0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
++
+ shell_basename = last_component (shell);
+ arg0 = xmalloc (strlen (shell_basename) + 2);
+ arg0[0] = '-';
+@@ -344,6 +496,67 @@ run_shell (char const *shell, char const
+ error (0, errno, "%s", shell);
+ exit (exit_status);
+ }
++#ifdef USE_PAM
++ } else if (child == -1) {
++ fprintf(stderr, "can not fork user shell: %s", strerror(errno));
++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
++ pam_close_session(pamh, 0);
++ pam_end(pamh, PAM_ABORT);
++ exit(1);
++ }
++ /* parent only */
++ sigfillset(&ourset);
++ if (sigprocmask(SIG_BLOCK, &ourset, NULL)) {
++ fprintf(stderr, "%s: signal malfunction\n", PROGRAM_NAME);
++ caught = 1;
++ }
++ if (!caught) {
++ struct sigaction action;
++ action.sa_handler = su_catch_sig;
++ sigemptyset(&action.sa_mask);
++ action.sa_flags = 0;
++ sigemptyset(&ourset);
++ if (sigaddset(&ourset, SIGTERM)
++ || sigaddset(&ourset, SIGALRM)
++ || sigaction(SIGTERM, &action, NULL)
++ || sigprocmask(SIG_UNBLOCK, &ourset, NULL)) {
++ fprintf(stderr, "%s: signal masking malfunction\n", PROGRAM_NAME);
++ caught = 1;
++ }
++ }
++ if (!caught) {
++ do {
++ int pid;
++
++ pid = waitpid(-1, &status, WUNTRACED);
++
++ if (((pid_t)-1 != pid) && (0 != WIFSTOPPED (status))) {
++ kill(getpid(), WSTOPSIG(status));
++ /* once we get here, we must have resumed */
++ kill(pid, SIGCONT);
++ }
++ } while (0 != WIFSTOPPED(status));
++ }
++
++ if (caught) {
++ fprintf(stderr, "\nSession terminated, killing shell...");
++ kill (child, SIGTERM);
++ }
++ /* Not checking retval on this because we need to call close session */
++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
++ retval = pam_close_session(pamh, 0);
++ PAM_BAIL_P_VOID;
++ retval = pam_end(pamh, PAM_SUCCESS);
++ PAM_BAIL_P_VOID;
++ if (caught) {
++ sleep(2);
++ kill(child, SIGKILL);
++ fprintf(stderr, " ...killed.\n");
++ exit(-1);
++ }
++ exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status)
++ : WTERMSIG (status) + 128);
++#endif /* USE_PAM */
+ }
+
+ /* Return true if SHELL is a restricted shell (one not returned by
+@@ -511,9 +724,9 @@ main (int argc, char **argv)
+ shell = xstrdup (shell ? shell : pw->pw_shell);
+ modify_environment (pw, shell);
+
++#ifndef USE_PAM
+ change_identity (pw);
+- if (simulate_login && chdir (pw->pw_dir) != 0)
+- error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
++#endif
+
+ /* error() flushes stderr, but does not check for write failure.
+ Normally, we would catch this via our atexit() hook of
+@@ -523,5 +736,5 @@ main (int argc, char **argv)
+ if (ferror (stderr))
+ exit (EXIT_CANCELED);
+
+- run_shell (shell, command, argv + optind, MAX (0, argc - optind));
++ run_shell (shell, command, argv + optind, MAX (0, argc - optind), pw);
+ }
diff --git a/testing/coreutils/coreutils-uname.patch b/testing/coreutils/coreutils-uname.patch
new file mode 100644
index 000000000..b458abeba
--- /dev/null
+++ b/testing/coreutils/coreutils-uname.patch
@@ -0,0 +1,173 @@
+On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
+
+Prob not suitable for upstream seeing as how it's 100% linux-specific
+http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
+
+Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but
+heavily reworked to suck less.
+
+To add support for additional platforms, check out the show_cpuinfo()
+func in the linux/arch/<ARCH>/ source tree of the kernel.
+
+--- coreutils/src/uname.c
++++ coreutils/src/uname.c
+@@ -50,6 +50,11 @@
+ # include <mach-o/arch.h>
+ #endif
+
++#if defined(__linux__)
++# define USE_PROCINFO
++# define UNAME_HARDWARE_PLATFORM
++#endif
++
+ #include "system.h"
+ #include "error.h"
+ #include "quote.h"
+@@ -138,6 +143,117 @@
+ exit (status);
+ }
+
++#if defined(USE_PROCINFO)
++
++# if defined(__s390__) || defined(__s390x__)
++# define CPUINFO_FILE "/proc/sysinfo"
++# define CPUINFO_FORMAT "%64[^\t :]%*[ :]%256[^\n]%c"
++# else
++# define CPUINFO_FILE "/proc/cpuinfo"
++# define CPUINFO_FORMAT "%64[^\t:]\t:%256[^\n]%c"
++# endif
++
++# define PROCINFO_PROCESSOR 0
++# define PROCINFO_HARDWARE_PLATFORM 1
++
++static void __eat_cpuinfo_space(char *buf)
++{
++ /* first eat trailing space */
++ char *tmp = buf + strlen(buf) - 1;
++ while (tmp > buf && isspace(*tmp))
++ *tmp-- = '\0';
++ /* then eat leading space */
++ tmp = buf;
++ while (*tmp && isspace(*tmp))
++ tmp++;
++ if (tmp != buf)
++ memmove(buf, tmp, strlen(tmp)+1);
++ /* finally collapse whitespace */
++ tmp = buf;
++ while (tmp[0] && tmp[1]) {
++ if (isspace(tmp[0]) && isspace(tmp[1])) {
++ memmove(tmp, tmp+1, strlen(tmp));
++ continue;
++ }
++ ++tmp;
++ }
++}
++
++static int __linux_procinfo(int x, char *fstr, size_t s)
++{
++ FILE *fp;
++
++ char *procinfo_keys[] = {
++ /* --processor --hardware-platform */
++ #if defined(__alpha__)
++ "cpu model", "system type"
++ #elif defined(__arm__)
++ "Processor", "Hardware"
++ #elif defined(__avr32__)
++ "processor", "cpu family"
++ #elif defined(__bfin__)
++ "CPU", "BOARD Name"
++ #elif defined(__cris__)
++ "cpu", "cpu model"
++ #elif defined(__frv__)
++ "CPU-Core", "System"
++ #elif defined(__i386__) || defined(__x86_64__)
++ "model name", "vendor_id"
++ #elif defined(__ia64__)
++ "family", "vendor"
++ #elif defined(__hppa__)
++ "cpu", "model"
++ #elif defined(__m68k__)
++ "CPU", "MMU"
++ #elif defined(__mips__)
++ "cpu model", "system type"
++ #elif defined(__powerpc__) || defined(__powerpc64__)
++ "cpu", "machine"
++ #elif defined(__s390__) || defined(__s390x__)
++ "Type", "Manufacturer"
++ #elif defined(__sh__)
++ "cpu type", "machine"
++ #elif defined(sparc) || defined(__sparc__)
++ "type", "cpu"
++ #elif defined(__vax__)
++ "cpu type", "cpu"
++ #else
++ "unknown", "unknown"
++ #endif
++ };
++
++ if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
++ char key[65], value[257], eol, *ret = NULL;
++
++ while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
++ __eat_cpuinfo_space(key);
++ if (!strcmp(key, procinfo_keys[x])) {
++ __eat_cpuinfo_space(value);
++ ret = value;
++ break;
++ }
++ if (eol != '\n') {
++ /* we need two fscanf's here in case the previous
++ * length limit caused us to read right up to the
++ * newline ... doing "%*[^\n]\n" wont eat the newline
++ */
++ fscanf(fp, "%*[^\n]");
++ fscanf(fp, "\n");
++ }
++ }
++ fclose(fp);
++
++ if (ret) {
++ strncpy(fstr, ret, s);
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
++#endif
++
+ /* Print ELEMENT, preceded by a space if something has already been
+ printed. */
+
+@@ -250,10 +344,14 @@ main (int argc, char **argv)
+ if (toprint & PRINT_PROCESSOR)
+ {
+ char const *element = unknown;
+-#if HAVE_SYSINFO && defined SI_ARCHITECTURE
++#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
+ {
+ static char processor[257];
++#if defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++#else
+ if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++#endif
+ element = processor;
+ }
+ #endif
+@@ -306,9 +404,13 @@ main (int argc, char **argv)
+ if (element == unknown)
+ {
+ static char hardware_platform[257];
++#if defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
++#else
+ size_t s = sizeof hardware_platform;
+ static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
+ if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
++#endif
+ element = hardware_platform;
+ }
+ #endif
diff --git a/testing/coreutils/coreutils.install b/testing/coreutils/coreutils.install
new file mode 100644
index 000000000..8caae6686
--- /dev/null
+++ b/testing/coreutils/coreutils.install
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(coreutils.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/testing/coreutils/su.pam b/testing/coreutils/su.pam
new file mode 100644
index 000000000..cf15f40f1
--- /dev/null
+++ b/testing/coreutils/su.pam
@@ -0,0 +1,9 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+# Uncomment the following line to implicitly trust users in the "wheel" group.
+#auth sufficient pam_wheel.so trust use_uid
+# Uncomment the following line to require a user to be in the "wheel" group.
+#auth required pam_wheel.so use_uid
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/testing/dvdrip/PKGBUILD b/testing/dvdrip/PKGBUILD
index 17838b169..119a2a1d9 100644
--- a/testing/dvdrip/PKGBUILD
+++ b/testing/dvdrip/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 125147 2011-05-25 19:02:09Z foutrelis $
+# $Id: PKGBUILD 126069 2011-06-01 10:23:05Z foutrelis $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Fredrik Hammar <Horney_C86@Hotmail.com>
pkgname=dvdrip
pkgver=0.98.11
-pkgrel=7
+pkgrel=8
pkgdesc="A Gtk frontend for transcode writen in Perl"
arch=('i686' 'x86_64')
license=('custom')
diff --git a/testing/dvdrip/dvdrip.install b/testing/dvdrip/dvdrip.install
index 4cd6160c4..e111ef946 100644
--- a/testing/dvdrip/dvdrip.install
+++ b/testing/dvdrip/dvdrip.install
@@ -1,19 +1,11 @@
-# this is the scrollkeeper handling sample file
-
post_install() {
- echo "update desktop mime database..."
update-desktop-database -q
}
post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- /bin/true
+ post_install
}
post_remove() {
- echo "update desktop mime database..."
- update-desktop-database -q
+ post_install
}
diff --git a/testing/git/PKGBUILD b/testing/git/PKGBUILD
index 0a96745dd..713c5dd11 100644
--- a/testing/git/PKGBUILD
+++ b/testing/git/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 125150 2011-05-25 19:02:49Z foutrelis $
+# $Id: PKGBUILD 126224 2011-06-02 19:12:58Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>
pkgname=git
-pkgver=1.7.5.2
-pkgrel=2
+pkgver=1.7.5.4
+pkgrel=1
pkgdesc="the fast distributed version control system"
arch=(i686 x86_64)
url="http://git-scm.com/"
@@ -75,11 +75,11 @@ package() {
install -D -m644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/conf.d/git-daemon.conf
}
-md5sums=('f79ab8fe79b35346b499f131cbf381a4'
- '43fc5538f137231f5c96e7da5eb6c934'
+md5sums=('4985b774db84d3bbcc2b8d90952552a3'
+ '7a74ef1c64395a07301359a8707c828a'
'8e2648910fd5dd4f1c41d3c7fa9e9156'
'2e42bf97779a1c6411d89043334c9e78')
-sha256sums=('65dbb9789a1ff8aa7e4f7e156b9ce36ef101810608ed55a297156348d70f9349'
- '8521210a77809d189a3fe72e2bd13df50ecf8ec58e7098ec1655dfdb4086b6ca'
+sha256sums=('fed9a6c7d07b063cfba9e3eb40fbd0d8120785225289fcf2fb56bee18dffd5ee'
+ '87d612195426fedfe4ee5274d9903e8f85aa16c410b4a3ba41610c23ed9211d7'
'2e0a50bdaf8f387a499895e1c204bff78244eaa72b78187c8a84ef40c0b82598'
'e8bfe29d8393d2b87517c4dd56ea834b213aa00bf3d7fcde4ead3457cadbbc68')
diff --git a/testing/imagemagick/PKGBUILD b/testing/imagemagick/PKGBUILD
index 39f9e8830..29f188e18 100644
--- a/testing/imagemagick/PKGBUILD
+++ b/testing/imagemagick/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 124573 2011-05-23 01:23:35Z eric $
+# $Id: PKGBUILD 126048 2011-06-01 05:22:12Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgbase=imagemagick
pkgname=('imagemagick' 'imagemagick-doc')
-pkgver=6.6.9.10
+pkgver=6.7.0.2
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.imagemagick.org/"
@@ -13,9 +13,9 @@ depends=('libtool' 'lcms' 'libxt' 'gcc-libs' 'bzip2' 'xz' 'freetype2' 'fontconfi
makedepends=('ghostscript' 'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper' 'libpng')
source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \
perlmagick.rpath.patch)
-md5sums=('cf8940e964be608ddae152b90a576282'
+md5sums=('23a53b96b8e75c3ffd8cbbbfc1041b2f'
'ff9974decbfe9846f8e347239d87e4eb')
-sha1sums=('18d141e904853c68a43f53862bc67e3c8b66d664'
+sha1sums=('ff8e666d58a27af1ce3ab2c5408d10c233a4d809'
'23405f80904b1de94ebd7bd6fe2a332471b8c283')
build() {
diff --git a/testing/iproute2/PKGBUILD b/testing/iproute2/PKGBUILD
new file mode 100644
index 000000000..f9479bd84
--- /dev/null
+++ b/testing/iproute2/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 126335 2011-06-04 22:38:16Z tomegun $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+
+pkgname=iproute2
+pkgver=2.6.38
+pkgrel=3
+pkgdesc="IP Routing Utilities"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.linux-foundation.org/en/Net:Iproute2"
+depends=('perl')
+makedepends=('linux-atm')
+optdepends=('linux-atm: ATM support')
+provides=('iproute')
+conflicts=('iproute')
+replaces=('iproute')
+options=('!makeflags')
+backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \
+ 'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables')
+source=(http://devresources.linux-foundation.org/dev/iproute2/download/iproute2-${pkgver}.tar.bz2
+ 'iproute2-fhs.patch')
+sha1sums=('e9f6d457a06866a2a20a6cba6b3a039b2ec3e14a'
+ '2416b11252364d7a6c742eabb4a6924a75637a46')
+
+build() {
+ cd $srcdir/iproute2-${pkgver}
+
+ # set correct fhs structure
+ patch -Np1 -i ${srcdir}/iproute2-fhs.patch
+
+ ./configure
+
+ make
+}
+
+package() {
+ cd $srcdir/iproute2-${pkgver}
+
+ make DESTDIR=$pkgdir install
+
+ # allow loopback to be started before /usr is mounted, this may not be supported in the future
+ mkdir -p ${pkgdir}/sbin
+ mv ${pkgdir}/usr/sbin/ip ${pkgdir}/sbin/ip
+ ln -s /sbin/ip ${pkgdir}/usr/sbin/ip
+
+ # libnetlink isn't installed, install it FS#19385
+ install -Dm644 include/libnetlink.h ${pkgdir}/usr/include/libnetlink.h
+ install -Dm644 lib/libnetlink.a ${pkgdir}/usr/lib/libnetlink.a
+}
diff --git a/testing/man-db/1361_1360.diff b/testing/man-db/1361_1360.diff
new file mode 100644
index 000000000..c93856980
--- /dev/null
+++ b/testing/man-db/1361_1360.diff
@@ -0,0 +1,25 @@
+=== modified file 'src/straycats.c'
+--- src/straycats.c 2011-01-10 20:08:22 +0000
++++ src/straycats.c 2011-06-04 06:34:51 +0000
+@@ -177,6 +177,7 @@
+ char *lang, *page_encoding;
+ char *mandir_base;
+ pipecmd *col_cmd;
++ char *col_locale;
+ char *fullpath;
+
+ /* we have a straycat. Need to filter it and get
+@@ -226,6 +227,12 @@
+ col_cmd = pipecmd_new_argstr
+ (get_def_user ("col", COL));
+ pipecmd_arg (col_cmd, "-bx");
++ col_locale = find_charset_locale ("UTF-8");
++ if (col_locale) {
++ pipecmd_setenv (col_cmd, "LC_CTYPE",
++ col_locale);
++ free (col_locale);
++ }
+ pipeline_command (decomp, col_cmd);
+
+ fullpath = canonicalize_file_name (catdir);
+
diff --git a/testing/man-db/PKGBUILD b/testing/man-db/PKGBUILD
new file mode 100644
index 000000000..25675079f
--- /dev/null
+++ b/testing/man-db/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 126294 2011-06-04 09:41:54Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
+
+pkgname=man-db
+pkgver=2.6.0.2
+pkgrel=2
+pkgdesc="A utility for reading man pages"
+arch=('i686' 'x86_64')
+url="http://www.nongnu.org/man-db/"
+license=('GPL' 'LGPL')
+groups=('base')
+depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline')
+optdepends=('less' 'gzip')
+backup=('etc/man_db.conf'
+ 'etc/cron.daily/man-db')
+conflicts=('man')
+provides=('man')
+replaces=('man')
+install=${pkgname}.install
+source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.gz
+ 1361_1360.diff
+ #http://launchpad.net/man-db/main/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz
+ convert-mans man-db.cron.daily)
+options=('!libtool')
+md5sums=('2b41c96efec032d2b74ccbf2e401f93e'
+ '08b76b1f924c5493a280b79fc0aebde4'
+ '2b7662a7d5b33fe91f9f3e034361a2f6'
+ 'd30c39ae47560304471b5461719e0f03')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # https://bugs.archlinux.org/task/18722
+ patch -Np0 -i $srcdir/1361_1360.diff
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --with-db=gdbm --disable-setuid --enable-mandirs=GNU \
+ --with-sections="1 n l 8 3 0 2 5 4 9 6 7"
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # part of groff pkg
+ rm -f ${pkgdir}/usr/bin/zsoelim
+
+ # script from LFS to convert manpages, see
+ # http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
+ install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
+
+ #install whatis cron script
+ install -D -m744 ${srcdir}/man-db.cron.daily ${pkgdir}/etc/cron.daily/man-db
+}
+
diff --git a/testing/man-db/convert-mans b/testing/man-db/convert-mans
new file mode 100644
index 000000000..58a0224b0
--- /dev/null
+++ b/testing/man-db/convert-mans
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+FROM="$1"
+TO="$2"
+shift ; shift
+while [ $# -gt 0 ]
+do
+ FILE="$1"
+ shift
+ iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
+ mv .tmp.iconv "$FILE"
+done
diff --git a/testing/man-db/man-db.cron.daily b/testing/man-db/man-db.cron.daily
new file mode 100755
index 000000000..53e66e1e9
--- /dev/null
+++ b/testing/man-db/man-db.cron.daily
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
+NICE=19
+
+# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
+IONICE_CLASS=2
+
+# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
+IONICE_PRIORITY=7
+
+UPDATEMANDB="/usr/bin/mandb --quiet"
+
+# Update the "whatis" database
+#/usr/sbin/makewhatis -u -w
+
+# taken from Debian
+# man-db cron daily
+set -e
+
+if ! [ -d /var/cache/man ]; then
+ # Recover from deletion, per FHS.
+ mkdir -p /var/cache/man
+ chmod 755 /var/cache/man
+fi
+
+# regenerate man database
+
+if [ -x /usr/bin/nice ]; then
+ UPDATEMANDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEMANDB}"
+fi
+
+if [ -x /usr/bin/ionice ]; then
+ UPDATEMANDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEMANDB}"
+fi
+
+${UPDATEMANDB}
+
+exit 0
diff --git a/testing/man-db/man-db.install b/testing/man-db/man-db.install
new file mode 100644
index 000000000..f6f0f27a6
--- /dev/null
+++ b/testing/man-db/man-db.install
@@ -0,0 +1,22 @@
+post_install() {
+ echo "it's recommended to create an initial"
+ echo "database running as root:"
+ echo "\"/usr/bin/mandb --quiet\""
+}
+
+post_upgrade() {
+ if [ "`vercmp $2 2.5.3-2`" -lt 0 ]; then
+ echo "systemuser \"man\" is no more required"
+ echo "run \"userdel man\". please also"
+ echo "chown root:root /var/cache/man"
+ fi
+ # force database rebuild to get rid off badly imported pages
+ if [ "`vercmp $2 2.6.0.2`" -lt 0 ]; then
+ echo "(re)building database..."
+ mandb -c --quiet
+ fi
+}
+
+post_remove() {
+ rm -rf /var/cache/man
+}
diff --git a/testing/module-init-tools/PKGBUILD b/testing/module-init-tools/PKGBUILD
new file mode 100644
index 000000000..4ecfab9c9
--- /dev/null
+++ b/testing/module-init-tools/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 126053 2011-06-01 05:32:56Z andyrtr $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=module-init-tools
+pkgver=3.13
+pkgrel=1
+pkgdesc="utilities needed by Linux systems for managing loadable kernel modules"
+arch=('i686' 'x86_64')
+url="http://kerneltools.org"
+license=('GPL')
+depends=('glibc')
+backup=('etc/modprobe.d/modprobe.conf')
+source=(http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-$pkgver.tar.bz2
+ modprobe.conf)
+md5sums=('dc575e7df00d9f745bf23b32f927b7a6'
+ '316f1bda4c21af02b30252eb014a0a55')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # do not regenerate man pages
+ touch *.{5,8}
+
+ ./configure --prefix=/usr --exec-prefix=/ --enable-zlib
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make DESTDIR=$pkgdir install
+
+ # Install our custom (read: empty) modprobe.conf
+ install -Dm644 $srcdir/modprobe.conf $pkgdir/etc/modprobe.d/modprobe.conf
+
+ # fix man page (FS#17559)
+ sed -i "s#mod#man5/mod#" $pkgdir/usr/share/man/man5/modprobe.d.5
+}
diff --git a/testing/module-init-tools/modprobe.conf b/testing/module-init-tools/modprobe.conf
new file mode 100644
index 000000000..83865a3af
--- /dev/null
+++ b/testing/module-init-tools/modprobe.conf
@@ -0,0 +1,3 @@
+#
+# /etc/modprobe.d/modprobe.conf (for v2.6 kernels)
+#
diff --git a/testing/net-tools/PKGBUILD b/testing/net-tools/PKGBUILD
new file mode 100644
index 000000000..d9b2380bc
--- /dev/null
+++ b/testing/net-tools/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 126212 2011-06-02 16:50:35Z bisson $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=net-tools
+pkgver=1.60
+pkgrel=16
+pkgdesc="Configuration tools for Linux networking"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://www.tazenda.demon.co.uk/phil/net-tools"
+depends=('glibc')
+source=(http://www.tazenda.demon.co.uk/phil/$pkgname/$pkgname-$pkgver.tar.bz2
+ net-tools.patch gcc340.patch net-tools-1.60-2.6-compilefix.patch
+ net-tools-1.60-miiioctl.patch
+ net-tools-1.60-nameif.patch
+ net-tools-1.60-nameif_strncpy.patch)
+options=(!makeflags)
+md5sums=('888774accab40217dde927e21979c165'
+ '7ef8d0c6818faa0fdeea94970a20e3fb'
+ 'b52d899cba9956bb0055150506f41ac1'
+ '51de6eabe2d6d6dc860f72c41cee636b'
+ 'c16109863bc63f3dad4ef35305a340bb'
+ '29a32617382fab1735acba4d920f1fcd'
+ 'e66466b9304dac85eb42b32f1ec3b284')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np1 -i ../net-tools.patch
+ patch -Np1 -i ../net-tools-1.60-2.6-compilefix.patch
+ patch -Np1 -i ../net-tools-1.60-miiioctl.patch
+ patch -Np1 -i ../gcc340.patch
+ patch -Np1 -i ${srcdir}/net-tools-1.60-nameif.patch
+ patch -Np1 -i ${srcdir}/net-tools-1.60-nameif_strncpy.patch
+ yes "" | make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make BASEDIR=$pkgdir update
+
+ # the following is provided by yp-tools and coreutils
+ rm "${pkgdir}"/bin/{{,dns,nis,yp}domainname,hostname}
+ rm "${pkgdir}"/usr/share/man/man1/{{,dns,nis,yp}domainname,hostname}.1
+}
diff --git a/testing/net-tools/gcc340.patch b/testing/net-tools/gcc340.patch
new file mode 100644
index 000000000..8089bf217
--- /dev/null
+++ b/testing/net-tools/gcc340.patch
@@ -0,0 +1,46 @@
+diff -Naur net-tools-1.60-orig/hostname.c net-tools-1.60/hostname.c
+--- net-tools-1.60-orig/hostname.c 2001-04-08 10:04:23.000000000 -0700
++++ net-tools-1.60/hostname.c 2004-05-07 17:22:14.000000000 -0700
+@@ -78,6 +78,7 @@
+ fprintf(stderr, _("%s: name too long\n"), program_name);
+ break;
+ default:
++ ;
+ }
+ exit(1);
+ }
+@@ -98,6 +99,7 @@
+ fprintf(stderr, _("%s: name too long\n"), program_name);
+ break;
+ default:
++ ;
+ }
+ exit(1);
+ };
+@@ -117,6 +119,7 @@
+ fprintf(stderr, _("%s: name too long\n"), program_name);
+ break;
+ default:
++ ;
+ }
+ exit(1);
+ };
+@@ -174,6 +177,7 @@
+ printf("%s\n", hp->h_name);
+ break;
+ default:
++ ;
+ }
+ }
+
+diff -Naur net-tools-1.60-orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c
+--- net-tools-1.60-orig/lib/inet_sr.c 2000-02-20 13:46:45.000000000 -0800
++++ net-tools-1.60/lib/inet_sr.c 2004-05-07 17:20:14.000000000 -0700
+@@ -105,6 +105,7 @@
+ case 2:
+ isnet = 0; break;
+ default:
++ ;
+ }
+
+ /* Fill in the other fields. */
diff --git a/testing/net-tools/net-tools-1.60-2.6-compilefix.patch b/testing/net-tools/net-tools-1.60-2.6-compilefix.patch
new file mode 100644
index 000000000..92ce90128
--- /dev/null
+++ b/testing/net-tools/net-tools-1.60-2.6-compilefix.patch
@@ -0,0 +1,23 @@
+diff -ruN net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
+--- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200
++++ net-tools-1.60/lib/x25_sr.c 2003-10-18 20:33:31.927574928 +0200
+@@ -22,6 +22,7 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/x25.h>
++#include <linux/version.h>
+ #include <ctype.h>
+ #include <errno.h>
+ #include <netdb.h>
+@@ -77,7 +78,11 @@
+ rt.sigdigits=sigdigits;
+
+ /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
++#else
++ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
++#endif
+
+ while (*args) {
+ if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
diff --git a/testing/net-tools/net-tools-1.60-miiioctl.patch b/testing/net-tools/net-tools-1.60-miiioctl.patch
new file mode 100644
index 000000000..4859273ed
--- /dev/null
+++ b/testing/net-tools/net-tools-1.60-miiioctl.patch
@@ -0,0 +1,17 @@
+--- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001
++++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001
+@@ -11,11 +11,9 @@
+
+ /* network interface ioctl's for MII commands */
+ #ifndef SIOCGMIIPHY
+-#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */
+-#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */
+-#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */
+-#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */
+-#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */
++#define SIOCGMIIPHY 0x8947 /* Read from current PHY */
++#define SIOCGMIIREG 0x8948 /* Read any PHY register */
++#define SIOCSMIIREG 0x8949 /* Write any PHY register */
+ #endif
+
+ #include <linux/types.h>
diff --git a/testing/net-tools/net-tools-1.60-nameif.patch b/testing/net-tools/net-tools-1.60-nameif.patch
new file mode 100644
index 000000000..54def00c2
--- /dev/null
+++ b/testing/net-tools/net-tools-1.60-nameif.patch
@@ -0,0 +1,58 @@
+--- net-tools-1.60/nameif.c.nameif 2000-10-18 19:26:29.000000000 +0200
++++ net-tools-1.60/nameif.c 2003-03-19 11:02:01.000000000 +0100
+@@ -117,7 +117,8 @@
+ }
+
+ struct change {
+- struct change *next,**pprev;
++ struct change *next;
++ int found;
+ char ifname[IFNAMSIZ+1];
+ unsigned char mac[6];
+ };
+@@ -139,10 +140,7 @@
+ ch->ifname, pos);
+ if (parsemac(p,ch->mac) < 0)
+ complain(_("cannot parse MAC `%s' at %s"), p, pos);
+- if (clist)
+- clist->pprev = &ch->next;
+ ch->next = clist;
+- ch->pprev = &clist;
+ clist = ch;
+ return 0;
+ }
+@@ -200,7 +198,7 @@
+
+ void usage(void)
+ {
+- fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}"));
++ fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n"));
+ exit(1);
+ }
+
+@@ -277,21 +275,21 @@
+ ch = lookupmac(mac);
+ if (!ch)
+ continue;
+-
+- *ch->pprev = ch->next;
++
++ ch->found = 1;
+ if (strcmp(p, ch->ifname)) {
+ if (setname(p, ch->ifname) < 0)
+ complain(_("cannot change name of %s to %s: %s"),
+ p, ch->ifname, strerror(errno));
+ }
+- free(ch);
+ }
+ fclose(ifh);
+
+ while (clist) {
+ struct change *ch = clist;
+ clist = clist->next;
+- warning(_("interface '%s' not found"), ch->ifname);
++ if (!ch->found)
++ warning(_("interface '%s' not found"), ch->ifname);
+ free(ch);
+ }
+
diff --git a/testing/net-tools/net-tools-1.60-nameif_strncpy.patch b/testing/net-tools/net-tools-1.60-nameif_strncpy.patch
new file mode 100644
index 000000000..7568e21a2
--- /dev/null
+++ b/testing/net-tools/net-tools-1.60-nameif_strncpy.patch
@@ -0,0 +1,13 @@
+--- net-tools-1.60/nameif.c.ncpy 2006-10-03 14:24:21.000000000 +0200
++++ net-tools-1.60/nameif.c 2006-10-03 14:22:43.000000000 +0200
+@@ -100,8 +100,8 @@
+ struct ifreq ifr;
+ opensock();
+ memset(&ifr,0,sizeof(struct ifreq));
+- strcpy(ifr.ifr_name, oldname);
+- strcpy(ifr.ifr_newname, newname);
++ strncpy(ifr.ifr_name, oldname, IF_NAMESIZE);
++ strncpy(ifr.ifr_newname, newname, IF_NAMESIZE);
+ return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
+ }
+
diff --git a/testing/net-tools/net-tools.patch b/testing/net-tools/net-tools.patch
new file mode 100644
index 000000000..87e062eb2
--- /dev/null
+++ b/testing/net-tools/net-tools.patch
@@ -0,0 +1,52 @@
+diff -Naur net-tools-1.60-orig/config.in net-tools-1.60/config.in
+--- net-tools-1.60-orig/config.in 2000-05-21 07:32:12.000000000 -0700
++++ net-tools-1.60/config.in 2004-05-31 12:36:00.000000000 -0700
+@@ -49,7 +49,7 @@
+ *
+ bool 'UNIX protocol family' HAVE_AFUNIX y
+ bool 'INET (TCP/IP) protocol family' HAVE_AFINET y
+-bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 n
++bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 y
+ bool 'Novell IPX/SPX protocol family' HAVE_AFIPX y
+ bool 'Appletalk DDP protocol family' HAVE_AFATALK y
+ bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 y
+@@ -86,6 +86,6 @@
+ *
+ * Other Features.
+ *
+-bool 'IP Masquerading support' HAVE_FW_MASQUERADE n
+-bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS n
+-bool 'Build mii-tool' HAVE_MII n
++bool 'IP Masquerading support' HAVE_FW_MASQUERADE y
++bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y
++bool 'Build mii-tool' HAVE_MII y
+diff -Naur net-tools-1.60-orig/mii-tool.c net-tools-1.60/mii-tool.c
+--- net-tools-1.60-orig/mii-tool.c 2000-05-21 07:31:17.000000000 -0700
++++ net-tools-1.60/mii-tool.c 2004-05-31 12:35:21.000000000 -0700
+@@ -379,16 +379,16 @@
+ /*--------------------------------------------------------------------*/
+
+ const char *usage =
+-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
+- -V, --version display version information
+- -v, --verbose more verbose output
+- -R, --reset reset MII to poweron state
+- -r, --restart restart autonegotiation
+- -w, --watch monitor for link status changes
+- -l, --log with -w, write events to syslog
+- -A, --advertise=media,... advertise only specified media
+- -F, --force=media force specified media technology
+-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
++"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\
++ -V, --version display version information\n\
++ -v, --verbose more verbose output\n\
++ -R, --reset reset MII to poweron state\n\
++ -r, --restart restart autonegotiation\n\
++ -w, --watch monitor for link status changes\n\
++ -l, --log with -w, write events to syslog\n\
++ -A, --advertise=media,... advertise only specified media\n\
++ -F, --force=media force specified media technology\n\
++media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\
+ (to advertise both HD and FD) 100baseTx, 10baseT\n";
+
+ int main(int argc, char **argv)
diff --git a/testing/pidgin/PKGBUILD b/testing/pidgin/PKGBUILD
new file mode 100644
index 000000000..3ed646b74
--- /dev/null
+++ b/testing/pidgin/PKGBUILD
@@ -0,0 +1,114 @@
+# $Id: PKGBUILD 124935 2011-05-25 09:46:33Z foutrelis $
+# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Lucien Immink <l.immink@student.fnt.hvu.nl>
+
+pkgname=('pidgin' 'libpurple' 'finch')
+pkgver=2.7.11
+pkgrel=6
+arch=('i686' 'x86_64')
+url="http://pidgin.im/"
+license=('GPL')
+makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
+ 'python2' 'hicolor-icon-theme' 'silc-toolkit' 'gstreamer0.10'
+ 'farsight2' 'avahi' 'tk' 'ca-certificates' 'intltool'
+ 'networkmanager')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ nm09-pidgin.patch
+ nm09-more.patch)
+md5sums=('07c2a2535b4d7436b5ec7685fe063fec'
+ '744a21b4dbaf949dba7cd3b75b12b4fe'
+ 'a673659d86c7a65aa710f7c8c7feda82')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Update for NetworkManager 0.9 connection states
+ # (http://developer.pidgin.im/ticket/13505)
+ # (http://developer.pidgin.im/ticket/13859)
+ patch -Np1 -i "$srcdir/nm09-pidgin.patch"
+ patch -Np1 -i "$srcdir/nm09-more.patch"
+
+ # Use Python 2
+ sed -i 's/env python$/\02/' */plugins/*.py \
+ libpurple/purple-{remote,notifications-example,url-handler}
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-schemas-install \
+ --disable-meanwhile \
+ --disable-gnutls \
+ --enable-cyrus-sasl \
+ --disable-doxygen \
+ --enable-nm \
+ --with-python=/usr/bin/python2 \
+ --with-system-ssl-certs=/etc/ssl/certs
+ make
+}
+
+package_pidgin(){
+ pkgdesc="Multi-protocol instant messaging client"
+ depends=("libpurple=$pkgver-$pkgrel" 'startup-notification' 'gtkspell'
+ 'libxss' 'libsm' 'gstreamer0.10' 'hicolor-icon-theme')
+ optdepends=('aspell: for spelling correction'
+ 'ca-certificates: SSL CA certificates'
+ 'gstreamer0.10-good-plugins: video and voice support'
+ 'tk: Tcl/Tk scripting support')
+ install=pidgin.install
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C pidgin DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
+
+ rm "$pkgdir/usr/share/man/man1/finch.1"
+}
+
+package_libpurple(){
+ pkgdesc="IM library extracted from Pidgin"
+ depends=('farsight2' 'libsasl' 'dbus-glib' 'silc-toolkit' 'nss'
+ 'cyrus-sasl-plugins')
+ optdepends=('avahi: Bonjour protocol support'
+ 'dbus-python: for purple-remote and purple-url-handler')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ for _dir in libpurple share/sounds share/ca-certs m4macros po; do
+ make -C "$_dir" DESTDIR="$pkgdir" install
+ done
+}
+
+package_finch(){
+ pkgdesc="A ncurses-based messaging client"
+ depends=("libpurple=$pkgver-$pkgrel" 'python2' 'gstreamer0.10')
+ optdepends=('avahi: Bonjour protocol support'
+ 'ca-certificates: SSL CA certificates'
+ 'tk: Tcl/Tk scripting support')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C finch DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ rm "$pkgdir"/usr/share/man/man1/pidgin.1
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/pidgin/nm09-more.patch b/testing/pidgin/nm09-more.patch
new file mode 100644
index 000000000..8c708df9a
--- /dev/null
+++ b/testing/pidgin/nm09-more.patch
@@ -0,0 +1,49 @@
+diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
+--- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
++++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
+@@ -833,8 +833,20 @@ purple_network_is_available(void)
+ purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
+ }
+
+- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
+- return TRUE;
++ switch (nm_state)
++ {
++ case NM_STATE_UNKNOWN:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
++ case NM_STATE_CONNECTED:
++#endif
++ return TRUE;
++ default:
++ break;
++ }
+
+ return FALSE;
+
+@@ -1170,9 +1182,14 @@ purple_network_init(void)
+ NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE);
++ /* NM 0.6 signal */
+ dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
++ /* NM 0.7 and later signal */
++ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
++ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
++ G_CALLBACK(nm_state_change_cb), NULL, NULL);
+
+ dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
+ DBUS_SERVICE_DBUS,
+@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
+ #ifdef HAVE_NETWORKMANAGER
+ if (nm_proxy) {
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
++ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
+ g_object_unref(G_OBJECT(nm_proxy));
+ }
+ if (dbus_proxy) {
diff --git a/testing/pidgin/nm09-pidgin.patch b/testing/pidgin/nm09-pidgin.patch
new file mode 100644
index 000000000..1c2471d1f
--- /dev/null
+++ b/testing/pidgin/nm09-pidgin.patch
@@ -0,0 +1,38 @@
+diff -up pidgin-2.7.10/libpurple/network.c.foo pidgin-2.7.10/libpurple/network.c
+--- pidgin-2.7.10/libpurple/network.c.foo 2011-03-10 02:21:43.920933267 -0600
++++ pidgin-2.7.10/libpurple/network.c 2011-03-10 02:23:11.466838793 -0600
+@@ -71,6 +71,10 @@
+ #include <dbus/dbus-glib.h>
+ #include <NetworkManager.h>
+
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ static DBusGConnection *nm_conn = NULL;
+ static DBusGProxy *nm_proxy = NULL;
+ static DBusGProxy *dbus_proxy = NULL;
+@@ -863,7 +867,13 @@ nm_update_state(NMState state)
+
+ switch(state)
+ {
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
+ case NM_STATE_CONNECTED:
++#endif
+ /* Call res_init in case DNS servers have changed */
+ res_init();
+ /* update STUN IP in case we it changed (theoretically we could
+@@ -880,6 +890,9 @@ nm_update_state(NMState state)
+ case NM_STATE_ASLEEP:
+ case NM_STATE_CONNECTING:
+ case NM_STATE_DISCONNECTED:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_DISCONNECTING:
++#endif
+ if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
+ break;
+ if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
diff --git a/testing/pidgin/pidgin.install b/testing/pidgin/pidgin.install
new file mode 100644
index 000000000..1a05f573e
--- /dev/null
+++ b/testing/pidgin/pidgin.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/testing/subversion/PKGBUILD b/testing/subversion/PKGBUILD
new file mode 100644
index 000000000..40784dcb7
--- /dev/null
+++ b/testing/subversion/PKGBUILD
@@ -0,0 +1,98 @@
+# $Id: PKGBUILD 126240 2011-06-02 20:16:49Z stephane $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+
+pkgname=subversion
+pkgver=1.6.17
+pkgrel=3
+pkgdesc="Replacement for CVS, another versioning system (SVN)"
+arch=('i686' 'x86_64')
+license=('apache' 'bsd')
+depends=('neon' 'apr-util')
+makedepends=('krb5' 'apache' 'python2' 'perl' 'swig' 'ruby' 'java-runtime'
+ 'autoconf' 'sqlite3' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs')
+source=(http://subversion.tigris.org/downloads/$pkgname-$pkgver.tar.bz2
+ svnserve svn svnserve.conf svnmerge.py
+ subversion.rpath.fix.patch
+ subversion.suppress.deprecation.warnings.patch)
+
+backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
+url="http://subversion.apache.org/"
+provides=('svn')
+options=('!makeflags' '!libtool')
+optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export PYTHON=/usr/bin/python2
+
+ # apply patches
+ patch -Np0 -i ../subversion.rpath.fix.patch
+ patch -Np1 -i ../subversion.suppress.deprecation.warnings.patch
+
+ # configure
+ autoreconf
+ ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \
+ --with-zlib=/usr --with-neon=/usr --with-apxs \
+ --with-sqlite=/usr --with-berkeley-db=:/usr/include/:/usr/lib:db-5.1 \
+ --enable-javahl --with-gnome-keyring --with-kwallet
+
+ # build
+ (make external-all && make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all )
+}
+
+#check() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# export LANG=C LC_ALL=C
+# make check check-swig-pl check-swig-py CLEANUP=yes
+#}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # install
+ export LD_LIBRARY_PATH=${pkgdir}/usr/lib:$LD_LIBRARY_PATH
+ make DESTDIR=${pkgdir} install
+
+ make DESTDIR=${pkgdir} swig-py
+ make install-swig-py DESTDIR=${pkgdir}
+
+ install -d ${pkgdir}/usr/lib/python2.7
+ mv ${pkgdir}/usr/lib/svn-python/ ${pkgdir}/usr/lib/python2.7/site-packages
+
+ install -d ${pkgdir}/usr/share/subversion
+ install -d -m 755 tools/hook-scripts ${pkgdir}/usr/share/subversion/
+ rm -f ${pkgdir}/usr/share/subversion/hook-scripts/*.in
+
+ make DESTDIR=${pkgdir} swig-pl
+ make install-swig-pl DESTDIR=${pkgdir} INSTALLDIRS=vendor
+ rm -f ${pkgdir}/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
+ rm -rf ${pkgdir}/usr/lib/perl5/core_perl
+
+ make DESTDIR=${pkgdir} swig-rb
+ make install-swig-rb DESTDIR=${pkgdir}
+
+ make DESTDIR=${pkgdir} javahl
+ make DESTDIR=${pkgdir} install-javahl
+
+ install -d ${pkgdir}/etc/{rc.d,xinetd.d,conf.d}
+
+ install -m 755 ${srcdir}/svnserve ${pkgdir}/etc/rc.d
+ install -m 644 ${srcdir}/svn ${pkgdir}/etc/xinetd.d
+ install -m 644 ${srcdir}/svnserve.conf ${pkgdir}/etc/conf.d/svnserve
+ install -m 755 ${srcdir}/svnmerge.py ${pkgdir}/usr/bin/svnmerge
+ install -D -m 644 ${srcdir}/subversion-$pkgver/COPYING \
+ ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+
+ # bash completion
+ install -Dm 644 ${srcdir}/${pkgname}-${pkgver}/tools/client-side/bash_completion \
+ ${pkgdir}/etc/bash_completion.d/subversion
+}
+md5sums=('81e5dc5beee4b3fc025ac70c0b6caa14'
+ 'a2b029e8385007ffb99b437b30521c90'
+ 'a0db6dd43af33952739b6ec089852630'
+ 'c459e299192552f61578f3438abf0664'
+ 'a6371baeda7e224504629ecdda2749b4'
+ '6b4340ba9d8845cd8497e013ae01be3f'
+ '1166f3b7413d7e7450299b3525680bbe')
diff --git a/testing/subversion/subversion.rpath.fix.patch b/testing/subversion/subversion.rpath.fix.patch
new file mode 100644
index 000000000..ba6ee9e4e
--- /dev/null
+++ b/testing/subversion/subversion.rpath.fix.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig 2009-02-16 14:10:48.000000000 -0200
++++ Makefile.in 2009-06-04 00:56:29.000000000 -0300
+@@ -678,6 +678,7 @@
+
+ $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
+ cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
++ cd $(SWIG_PL_DIR)/native; sed -i 's|LD_RUN_PATH|DIE_RPATH_DIE|g' Makefile{,.{client,delta,fs,ra,repos,wc}}
+
+ swig-pl_DEPS = autogen-swig-pl libsvn_swig_perl \
+ $(SWIG_PL_DIR)/native/Makefile
diff --git a/testing/subversion/subversion.suppress.deprecation.warnings.patch b/testing/subversion/subversion.suppress.deprecation.warnings.patch
new file mode 100644
index 000000000..94ce89b18
--- /dev/null
+++ b/testing/subversion/subversion.suppress.deprecation.warnings.patch
@@ -0,0 +1,22 @@
+diff -urN subversion-1.6.9/subversion/bindings/swig/python/svn/core.py subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py
+--- subversion-1.6.9/subversion/bindings/swig/python/svn/core.py 2009-02-13 11:22:26.000000000 -0500
++++ subversion-1.6.9-fixed/subversion/bindings/swig/python/svn/core.py 2010-02-08 07:46:29.000000000 -0500
+@@ -19,6 +19,7 @@
+ from libsvn.core import *
+ import libsvn.core as _libsvncore
+ import atexit as _atexit
++import warnings
+
+ class SubversionException(Exception):
+ def __init__(self, message=None, apr_err=None, child=None,
+@@ -44,7 +45,9 @@
+ Exception.__init__(self, *args)
+
+ self.apr_err = apr_err
+- self.message = message
++ with warnings.catch_warnings():
++ warnings.simplefilter("ignore", DeprecationWarning)
++ self.message = message
+ self.child = child
+ self.file = file
+ self.line = line
diff --git a/testing/subversion/svn b/testing/subversion/svn
new file mode 100644
index 000000000..8988aaf63
--- /dev/null
+++ b/testing/subversion/svn
@@ -0,0 +1,11 @@
+service svn
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/bin/svnserve
+ server_args = -i
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/testing/subversion/svnmerge.py b/testing/subversion/svnmerge.py
new file mode 100644
index 000000000..d8931648f
--- /dev/null
+++ b/testing/subversion/svnmerge.py
@@ -0,0 +1,2370 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
+# Copyright (c) 2005, Giovanni Bajo
+# Copyright (c) 2004-2005, Awarix, Inc.
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# Author: Archie Cobbs <archie at awarix dot com>
+# Rewritten in Python by: Giovanni Bajo <rasky at develer dot com>
+#
+# Acknowledgments:
+# John Belmonte <john at neggie dot net> - metadata and usability
+# improvements
+# Blair Zajac <blair at orcaware dot com> - random improvements
+# Raman Gupta <rocketraman at fastmail dot fm> - bidirectional and transitive
+# merging support
+# Dustin J. Mitchell <dustin at zmanda dot com> - support for multiple
+# location identifier formats
+#
+# $HeadURL$
+# $LastChangedDate$
+# $LastChangedBy$
+# $LastChangedRevision$
+#
+# Requisites:
+# svnmerge.py has been tested with all SVN major versions since 1.1 (both
+# client and server). It is unknown if it works with previous versions.
+#
+# Differences from svnmerge.sh:
+# - More portable: tested as working in FreeBSD and OS/2.
+# - Add double-verbose mode, which shows every svn command executed (-v -v).
+# - "svnmerge avail" now only shows commits in source, not also commits in
+# other parts of the repository.
+# - Add "svnmerge block" to flag some revisions as blocked, so that
+# they will not show up anymore in the available list. Added also
+# the complementary "svnmerge unblock".
+# - "svnmerge avail" has grown two new options:
+# -B to display a list of the blocked revisions
+# -A to display both the blocked and the available revisions.
+# - Improved generated commit message to make it machine parsable even when
+# merging commits which are themselves merges.
+# - Add --force option to skip working copy check
+# - Add --record-only option to "svnmerge merge" to avoid performing
+# an actual merge, yet record that a merge happened.
+# - Can use a variety of location-identifier formats
+#
+# TODO:
+# - Add "svnmerge avail -R": show logs in reverse order
+#
+# Information for Hackers:
+#
+# Identifiers for branches:
+# A branch is identified in three ways within this source:
+# - as a working copy (variable name usually includes 'dir')
+# - as a fully qualified URL
+# - as a path identifier (an opaque string indicating a particular path
+# in a particular repository; variable name includes 'pathid')
+# A "target" is generally user-specified, and may be a working copy or
+# a URL.
+
+import sys, os, getopt, re, types, tempfile, time, locale
+from bisect import bisect
+from xml.dom import pulldom
+
+NAME = "svnmerge"
+if not hasattr(sys, "version_info") or sys.version_info < (2, 0):
+ error("requires Python 2.0 or newer")
+
+# Set up the separator used to separate individual log messages from
+# each revision merged into the target location. Also, create a
+# regular expression that will find this same separator in already
+# committed log messages, so that the separator used for this run of
+# svnmerge.py will have one more LOG_SEPARATOR appended to the longest
+# separator found in all the commits.
+LOG_SEPARATOR = 8 * '.'
+LOG_SEPARATOR_RE = re.compile('^((%s)+)' % re.escape(LOG_SEPARATOR),
+ re.MULTILINE)
+
+# Each line of the embedded log messages will be prefixed by LOG_LINE_PREFIX.
+LOG_LINE_PREFIX = 2 * ' '
+
+# Set python to the default locale as per environment settings, same as svn
+# TODO we should really parse config and if log-encoding is specified, set
+# the locale to match that encoding
+locale.setlocale(locale.LC_ALL, '')
+
+# We want the svn output (such as svn info) to be non-localized
+# Using LC_MESSAGES should not affect localized output of svn log, for example
+if os.environ.has_key("LC_ALL"):
+ del os.environ["LC_ALL"]
+os.environ["LC_MESSAGES"] = "C"
+
+###############################################################################
+# Support for older Python versions
+###############################################################################
+
+# True/False constants are Python 2.2+
+try:
+ True, False
+except NameError:
+ True, False = 1, 0
+
+def lstrip(s, ch):
+ """Replacement for str.lstrip (support for arbitrary chars to strip was
+ added in Python 2.2.2)."""
+ i = 0
+ try:
+ while s[i] == ch:
+ i = i+1
+ return s[i:]
+ except IndexError:
+ return ""
+
+def rstrip(s, ch):
+ """Replacement for str.rstrip (support for arbitrary chars to strip was
+ added in Python 2.2.2)."""
+ try:
+ if s[-1] != ch:
+ return s
+ i = -2
+ while s[i] == ch:
+ i = i-1
+ return s[:i+1]
+ except IndexError:
+ return ""
+
+def strip(s, ch):
+ """Replacement for str.strip (support for arbitrary chars to strip was
+ added in Python 2.2.2)."""
+ return lstrip(rstrip(s, ch), ch)
+
+def rsplit(s, sep, maxsplits=0):
+ """Like str.rsplit, which is Python 2.4+ only."""
+ L = s.split(sep)
+ if not 0 < maxsplits <= len(L):
+ return L
+ return [sep.join(L[0:-maxsplits])] + L[-maxsplits:]
+
+###############################################################################
+
+def kwextract(s):
+ """Extract info from a svn keyword string."""
+ try:
+ return strip(s, "$").strip().split(": ")[1]
+ except IndexError:
+ return "<unknown>"
+
+__revision__ = kwextract('$Rev$')
+__date__ = kwextract('$Date$')
+
+# Additional options, not (yet?) mapped to command line flags
+default_opts = {
+ "svn": "svn",
+ "prop": NAME + "-integrated",
+ "block-prop": NAME + "-blocked",
+ "commit-verbose": True,
+ "verbose": 0,
+}
+logs = {}
+
+def console_width():
+ """Get the width of the console screen (if any)."""
+ try:
+ return int(os.environ["COLUMNS"])
+ except (KeyError, ValueError):
+ pass
+
+ try:
+ # Call the Windows API (requires ctypes library)
+ from ctypes import windll, create_string_buffer
+ h = windll.kernel32.GetStdHandle(-11)
+ csbi = create_string_buffer(22)
+ res = windll.kernel32.GetConsoleScreenBufferInfo(h, csbi)
+ if res:
+ import struct
+ (bufx, bufy,
+ curx, cury, wattr,
+ left, top, right, bottom,
+ maxx, maxy) = struct.unpack("hhhhHhhhhhh", csbi.raw)
+ return right - left + 1
+ except ImportError:
+ pass
+
+ # Parse the output of stty -a
+ if os.isatty(1):
+ out = os.popen("stty -a").read()
+ m = re.search(r"columns (\d+);", out)
+ if m:
+ return int(m.group(1))
+
+ # sensible default
+ return 80
+
+def error(s):
+ """Subroutine to output an error and bail."""
+ print >> sys.stderr, "%s: %s" % (NAME, s)
+ sys.exit(1)
+
+def report(s):
+ """Subroutine to output progress message, unless in quiet mode."""
+ if opts["verbose"]:
+ print "%s: %s" % (NAME, s)
+
+def prefix_lines(prefix, lines):
+ """Given a string representing one or more lines of text, insert the
+ specified prefix at the beginning of each line, and return the result.
+ The input must be terminated by a newline."""
+ assert lines[-1] == "\n"
+ return prefix + lines[:-1].replace("\n", "\n"+prefix) + "\n"
+
+def recode_stdout_to_file(s):
+ if locale.getdefaultlocale()[1] is None or not hasattr(sys.stdout, "encoding") \
+ or sys.stdout.encoding is None:
+ return s
+ u = s.decode(sys.stdout.encoding)
+ return u.encode(locale.getdefaultlocale()[1])
+
+class LaunchError(Exception):
+ """Signal a failure in execution of an external command. Parameters are the
+ exit code of the process, the original command line, and the output of the
+ command."""
+
+try:
+ """Launch a sub-process. Return its output (both stdout and stderr),
+ optionally split by lines (if split_lines is True). Raise a LaunchError
+ exception if the exit code of the process is non-zero (failure).
+
+ This function has two implementations, one based on subprocess (preferred),
+ and one based on popen (for compatibility).
+ """
+ import subprocess
+ import shlex
+
+ def launch(cmd, split_lines=True):
+ # Requiring python 2.4 or higher, on some platforms we get
+ # much faster performance from the subprocess module (where python
+ # doesn't try to close an exhorbitant number of file descriptors)
+ stdout = ""
+ stderr = ""
+ try:
+ if os.name == 'nt':
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, \
+ close_fds=False, stderr=subprocess.PIPE)
+ else:
+ # Use shlex to break up the parameters intelligently,
+ # respecting quotes. shlex can't handle unicode.
+ args = shlex.split(cmd.encode('ascii'))
+ p = subprocess.Popen(args, stdout=subprocess.PIPE, \
+ close_fds=False, stderr=subprocess.PIPE)
+ stdoutAndErr = p.communicate()
+ stdout = stdoutAndErr[0]
+ stderr = stdoutAndErr[1]
+ except OSError, inst:
+ # Using 1 as failure code; should get actual number somehow? For
+ # examples see svnmerge_test.py's TestCase_launch.test_failure and
+ # TestCase_launch.test_failurecode.
+ raise LaunchError(1, cmd, stdout + " " + stderr + ": " + str(inst))
+
+ if p.returncode == 0:
+ if split_lines:
+ # Setting keepends=True for compatibility with previous logic
+ # (where file.readlines() preserves newlines)
+ return stdout.splitlines(True)
+ else:
+ return stdout
+ else:
+ raise LaunchError(p.returncode, cmd, stdout + stderr)
+except ImportError:
+ # support versions of python before 2.4 (slower on some systems)
+ def launch(cmd, split_lines=True):
+ if os.name not in ['nt', 'os2']:
+ import popen2
+ p = popen2.Popen4(cmd)
+ p.tochild.close()
+ if split_lines:
+ out = p.fromchild.readlines()
+ else:
+ out = p.fromchild.read()
+ ret = p.wait()
+ if ret == 0:
+ ret = None
+ else:
+ ret >>= 8
+ else:
+ i,k = os.popen4(cmd)
+ i.close()
+ if split_lines:
+ out = k.readlines()
+ else:
+ out = k.read()
+ ret = k.close()
+
+ if ret is None:
+ return out
+ raise LaunchError(ret, cmd, out)
+
+def launchsvn(s, show=False, pretend=False, **kwargs):
+ """Launch SVN and grab its output."""
+ username = password = configdir = ""
+ if opts.get("username", None):
+ username = "--username=" + opts["username"]
+ if opts.get("password", None):
+ password = "--password=" + opts["password"]
+ if opts.get("config-dir", None):
+ configdir = "--config-dir=" + opts["config-dir"]
+ cmd = ' '.join(filter(None, [opts["svn"], "--non-interactive",
+ username, password, configdir, s]))
+ if show or opts["verbose"] >= 2:
+ print cmd
+ if pretend:
+ return None
+ return launch(cmd, **kwargs)
+
+def svn_command(s):
+ """Do (or pretend to do) an SVN command."""
+ out = launchsvn(s, show=opts["show-changes"] or opts["dry-run"],
+ pretend=opts["dry-run"],
+ split_lines=False)
+ if not opts["dry-run"]:
+ print out
+
+def check_dir_clean(dir):
+ """Check the current status of dir for local mods."""
+ if opts["force"]:
+ report('skipping status check because of --force')
+ return
+ report('checking status of "%s"' % dir)
+
+ # Checking with -q does not show unversioned files or external
+ # directories. Though it displays a debug message for external
+ # directories, after a blank line. So, practically, the first line
+ # matters: if it's non-empty there is a modification.
+ out = launchsvn("status -q %s" % dir)
+ if out and out[0].strip():
+ error('"%s" has local modifications; it must be clean' % dir)
+
+class PathIdentifier:
+ """Abstraction for a path identifier, so that we can start talking
+ about it before we know the form that it takes in the properties (its
+ external_form). Objects are referenced in the class variable 'locobjs',
+ keyed by all known forms."""
+
+ # a map of UUID (or None) to repository root URL.
+ repo_hints = {}
+
+ # a map from any known string form to the corresponding PathIdentifier
+ locobjs = {}
+
+ def __init__(self, repo_relative_path, uuid=None, url=None, external_form=None):
+ self.repo_relative_path = repo_relative_path
+ self.uuid = uuid
+ self.url = url
+ self.external_form = external_form
+
+ def __repr__(self):
+ return "<PathIdentifier " + ', '.join('%s=%r' % i for i in self.__dict__.items()) + '>'
+
+ def __str__(self):
+ """Return a printable string representation"""
+ if self.external_form:
+ return self.external_form
+ if self.url:
+ return self.format('url')
+ if self.uuid:
+ return self.format('uuid')
+ return self.format('path')
+
+ def from_pathid(pathid_str):
+ """convert pathid_str to a PathIdentifier"""
+ if not PathIdentifier.locobjs.has_key(pathid_str):
+ if is_url(pathid_str):
+ # we can determine every form; PathIdentifier.hint knows how to do that
+ PathIdentifier.hint(pathid_str)
+ elif pathid_str[:7] == 'uuid://':
+ mo = re.match('uuid://([^/]*)(.*)', pathid_str)
+ if not mo:
+ error("Invalid path identifier '%s'" % pathid_str)
+ uuid, repo_relative_path = mo.groups()
+ pathid = PathIdentifier(repo_relative_path, uuid=uuid)
+ # we can cache this by uuid:// pathid and by repo-relative path
+ PathIdentifier.locobjs[pathid_str] = PathIdentifier.locobjs[repo_relative_path] = pathid
+ elif pathid_str and pathid_str[0] == '/':
+ # strip any trailing slashes
+ pathid_str = pathid_str.rstrip('/')
+ pathid = PathIdentifier(repo_relative_path=pathid_str)
+ # we can only cache this by repo-relative path
+ PathIdentifier.locobjs[pathid_str] = pathid
+ else:
+ error("Invalid path identifier '%s'" % pathid_str)
+ return PathIdentifier.locobjs[pathid_str]
+ from_pathid = staticmethod(from_pathid)
+
+ def from_target(target):
+ """Convert a target (either a working copy path or an URL) into a
+ path identifier."""
+ # prime the cache first if we don't know about this target yet
+ if not PathIdentifier.locobjs.has_key(target):
+ PathIdentifier.hint(target)
+
+ try:
+ return PathIdentifier.locobjs[target]
+ except KeyError:
+ error("Could not recognize path identifier '%s'" % target)
+ from_target = staticmethod(from_target)
+
+ def hint(target):
+ """Cache some information about target, as it may be referenced by
+ repo-relative path in subversion properties; the cache can help to
+ expand such a relative path to a full path identifier."""
+ if PathIdentifier.locobjs.has_key(target): return
+ if not is_url(target) and not is_wc(target): return
+
+ url = target_to_url(target)
+
+ root = get_repo_root(url)
+ assert root[-1] != "/"
+ assert url[:len(root)] == root, "url=%r, root=%r" % (url, root)
+ repo_relative_path = url[len(root):]
+
+ try:
+ uuid = get_svninfo(target)['Repository UUID']
+ uuid_pathid = 'uuid://%s%s' % (uuid, repo_relative_path)
+ except KeyError:
+ uuid = None
+ uuid_pathid = None
+
+ locobj = PathIdentifier.locobjs.get(url) or \
+ (uuid_pathid and PathIdentifier.locobjs.get(uuid_pathid))
+ if not locobj:
+ locobj = PathIdentifier(repo_relative_path, uuid=uuid, url=url)
+
+ PathIdentifier.repo_hints[uuid] = root # (uuid may be None)
+
+ PathIdentifier.locobjs[target] = locobj
+ PathIdentifier.locobjs[url] = locobj
+ if uuid_pathid:
+ PathIdentifier.locobjs[uuid_pathid] = locobj
+ if not PathIdentifier.locobjs.has_key(repo_relative_path):
+ PathIdentifier.locobjs[repo_relative_path] = locobj
+ hint = staticmethod(hint)
+
+ def format(self, fmt):
+ if fmt == 'path':
+ return self.repo_relative_path
+ elif fmt == 'uuid':
+ return "uuid://%s%s" % (self.uuid, self.repo_relative_path)
+ elif fmt == 'url':
+ return self.url
+ else:
+ error("Unkonwn path type '%s'" % fmt)
+
+ def match_substring(self, str):
+ """Test whether str is a substring of any representation of this
+ PathIdentifier."""
+ if self.repo_relative_path.find(str) >= 0:
+ return True
+
+ if self.uuid:
+ if ("uuid://%s%s" % (self.uuid, self.repo_relative_path)).find(str) >= 0:
+ return True
+
+ if self.url:
+ if (self.url + self.repo_relative_path).find(str) >= 0:
+ return True
+
+ return False
+
+ def get_url(self):
+ """Convert a pathid into a URL. If this is not possible, error out."""
+ if self.url:
+ return self.url
+ # if we have a uuid and happen to know the URL for it, use that
+ elif self.uuid and PathIdentifier.repo_hints.has_key(self.uuid):
+ self.url = PathIdentifier.repo_hints[self.uuid] + self.repo_relative_path
+ PathIdentifier.locobjs[self.url] = self
+ return self.url
+ # if we've only seen one rep, use that (a guess, but an educated one)
+ elif not self.uuid and len(PathIdentifier.repo_hints) == 1:
+ uuid, root = PathIdentifier.repo_hints.items()[0]
+ if uuid:
+ self.uuid = uuid
+ PathIdentifier.locobjs['uuid://%s%s' % (uuid, self.repo_relative_path)] = self
+ self.url = root + self.repo_relative_path
+ PathIdentifier.locobjs[self.url] = self
+ report("Guessing that '%s' refers to '%s'" % (self, self.url))
+ return self.url
+ else:
+ error("Cannot determine URL for '%s'; " % self +
+ "Explicit source argument (-S/--source) required.\n")
+
+class RevisionLog:
+ """
+ A log of the revisions which affected a given URL between two
+ revisions.
+ """
+
+ def __init__(self, url, begin, end, find_propchanges=False):
+ """
+ Create a new RevisionLog object, which stores, in self.revs, a list
+ of the revisions which affected the specified URL between begin and
+ end. If find_propchanges is True, self.propchange_revs will contain a
+ list of the revisions which changed properties directly on the
+ specified URL. URL must be the URL for a directory in the repository.
+ """
+ self.url = url
+
+ # Setup the log options (--quiet, so we don't show log messages)
+ log_opts = '--xml --quiet -r%s:%s "%s"' % (begin, end, url)
+ if find_propchanges:
+ # The --verbose flag lets us grab merge tracking information
+ # by looking at propchanges
+ log_opts = "--verbose " + log_opts
+
+ # Read the log to look for revision numbers and merge-tracking info
+ self.revs = []
+ self.propchange_revs = []
+ repos_pathid = PathIdentifier.from_target(url)
+ for chg in SvnLogParser(launchsvn("log %s" % log_opts,
+ split_lines=False)):
+ self.revs.append(chg.revision())
+ for p in chg.paths():
+ if p.action() == 'M' and p.pathid() == repos_pathid.repo_relative_path:
+ self.propchange_revs.append(chg.revision())
+
+ # Save the range of the log
+ self.begin = int(begin)
+ if end == "HEAD":
+ # If end is not provided, we do not know which is the latest
+ # revision in the repository. So we set 'end' to the latest
+ # known revision.
+ self.end = self.revs[-1]
+ else:
+ self.end = int(end)
+
+ self._merges = None
+ self._blocks = None
+
+ def merge_metadata(self):
+ """
+ Return a VersionedProperty object, with a cached view of the merge
+ metadata in the range of this log.
+ """
+
+ # Load merge metadata if necessary
+ if not self._merges:
+ self._merges = VersionedProperty(self.url, opts["prop"])
+ self._merges.load(self)
+
+ return self._merges
+
+ def block_metadata(self):
+ if not self._blocks:
+ self._blocks = VersionedProperty(self.url, opts["block-prop"])
+ self._blocks.load(self)
+
+ return self._blocks
+
+
+class VersionedProperty:
+ """
+ A read-only, cached view of a versioned property.
+
+ self.revs contains a list of the revisions in which the property changes.
+ self.values stores the new values at each corresponding revision. If the
+ value of the property is unknown, it is set to None.
+
+ Initially, we set self.revs to [0] and self.values to [None]. This
+ indicates that, as of revision zero, we know nothing about the value of
+ the property.
+
+ Later, if you run self.load(log), we cache the value of this property over
+ the entire range of the log by noting each revision in which the property
+ was changed. At the end of the range of the log, we invalidate our cache
+ by adding the value "None" to our cache for any revisions which fall out
+ of the range of our log.
+
+ Once self.revs and self.values are filled, we can find the value of the
+ property at any arbitrary revision using a binary search on self.revs.
+ Once we find the last revision during which the property was changed,
+ we can lookup the associated value in self.values. (If the associated
+ value is None, the associated value was not cached and we have to do
+ a full propget.)
+
+ An example: We know that the 'svnmerge' property was added in r10, and
+ changed in r21. We gathered log info up until r40.
+
+ revs = [0, 10, 21, 40]
+ values = [None, "val1", "val2", None]
+
+ What these values say:
+ - From r0 to r9, we know nothing about the property.
+ - In r10, the property was set to "val1". This property stayed the same
+ until r21, when it was changed to "val2".
+ - We don't know what happened after r40.
+ """
+
+ def __init__(self, url, name):
+ """View the history of a versioned property at URL with name"""
+ self.url = url
+ self.name = name
+
+ # We know nothing about the value of the property. Setup revs
+ # and values to indicate as such.
+ self.revs = [0]
+ self.values = [None]
+
+ # We don't have any revisions cached
+ self._initial_value = None
+ self._changed_revs = []
+ self._changed_values = []
+
+ def load(self, log):
+ """
+ Load the history of property changes from the specified
+ RevisionLog object.
+ """
+
+ # Get the property value before the range of the log
+ if log.begin > 1:
+ self.revs.append(log.begin-1)
+ try:
+ self._initial_value = self.raw_get(log.begin-1)
+ except LaunchError:
+ # The specified URL might not exist before the
+ # range of the log. If so, we can safely assume
+ # that the property was empty at that time.
+ self._initial_value = { }
+ self.values.append(self._initial_value)
+ else:
+ self._initial_value = { }
+ self.values[0] = self._initial_value
+
+ # Cache the property values in the log range
+ old_value = self._initial_value
+ for rev in log.propchange_revs:
+ new_value = self.raw_get(rev)
+ if new_value != old_value:
+ self._changed_revs.append(rev)
+ self._changed_values.append(new_value)
+ self.revs.append(rev)
+ self.values.append(new_value)
+ old_value = new_value
+
+ # Indicate that we know nothing about the value of the property
+ # after the range of the log.
+ if log.revs:
+ self.revs.append(log.end+1)
+ self.values.append(None)
+
+ def raw_get(self, rev=None):
+ """
+ Get the property at revision REV. If rev is not specified, get
+ the property at revision HEAD.
+ """
+ return get_revlist_prop(self.url, self.name, rev)
+
+ def get(self, rev=None):
+ """
+ Get the property at revision REV. If rev is not specified, get
+ the property at revision HEAD.
+ """
+
+ if rev is not None:
+
+ # Find the index using a binary search
+ i = bisect(self.revs, rev) - 1
+
+ # Return the value of the property, if it was cached
+ if self.values[i] is not None:
+ return self.values[i]
+
+ # Get the current value of the property
+ return self.raw_get(rev)
+
+ def changed_revs(self, key=None):
+ """
+ Get a list of the revisions in which the specified dictionary
+ key was changed in this property. If key is not specified,
+ return a list of revisions in which any key was changed.
+ """
+ if key is None:
+ return self._changed_revs
+ else:
+ changed_revs = []
+ old_val = self._initial_value
+ for rev, val in zip(self._changed_revs, self._changed_values):
+ if val.get(key) != old_val.get(key):
+ changed_revs.append(rev)
+ old_val = val
+ return changed_revs
+
+ def initialized_revs(self):
+ """
+ Get a list of the revisions in which keys were added or
+ removed in this property.
+ """
+ initialized_revs = []
+ old_len = len(self._initial_value)
+ for rev, val in zip(self._changed_revs, self._changed_values):
+ if len(val) != old_len:
+ initialized_revs.append(rev)
+ old_len = len(val)
+ return initialized_revs
+
+class RevisionSet:
+ """
+ A set of revisions, held in dictionary form for easy manipulation. If we
+ were to rewrite this script for Python 2.3+, we would subclass this from
+ set (or UserSet). As this class does not include branch
+ information, it's assumed that one instance will be used per
+ branch.
+ """
+ def __init__(self, parm):
+ """Constructs a RevisionSet from a string in property form, or from
+ a dictionary whose keys are the revisions. Raises ValueError if the
+ input string is invalid."""
+
+ self._revs = {}
+
+ revision_range_split_re = re.compile('[-:]')
+
+ if isinstance(parm, types.DictType):
+ self._revs = parm.copy()
+ elif isinstance(parm, types.ListType):
+ for R in parm:
+ self._revs[int(R)] = 1
+ else:
+ parm = parm.strip()
+ if parm:
+ for R in parm.split(","):
+ rev_or_revs = re.split(revision_range_split_re, R)
+ if len(rev_or_revs) == 1:
+ self._revs[int(rev_or_revs[0])] = 1
+ elif len(rev_or_revs) == 2:
+ for rev in range(int(rev_or_revs[0]),
+ int(rev_or_revs[1])+1):
+ self._revs[rev] = 1
+ else:
+ raise ValueError, 'Ill formatted revision range: ' + R
+
+ def sorted(self):
+ revnums = self._revs.keys()
+ revnums.sort()
+ return revnums
+
+ def normalized(self):
+ """Returns a normalized version of the revision set, which is an
+ ordered list of couples (start,end), with the minimum number of
+ intervals."""
+ revnums = self.sorted()
+ revnums.reverse()
+ ret = []
+ while revnums:
+ s = e = revnums.pop()
+ while revnums and revnums[-1] in (e, e+1):
+ e = revnums.pop()
+ ret.append((s, e))
+ return ret
+
+ def __str__(self):
+ """Convert the revision set to a string, using its normalized form."""
+ L = []
+ for s,e in self.normalized():
+ if s == e:
+ L.append(str(s))
+ else:
+ L.append(str(s) + "-" + str(e))
+ return ",".join(L)
+
+ def __contains__(self, rev):
+ return self._revs.has_key(rev)
+
+ def __sub__(self, rs):
+ """Compute subtraction as in sets."""
+ revs = {}
+ for r in self._revs.keys():
+ if r not in rs:
+ revs[r] = 1
+ return RevisionSet(revs)
+
+ def __and__(self, rs):
+ """Compute intersections as in sets."""
+ revs = {}
+ for r in self._revs.keys():
+ if r in rs:
+ revs[r] = 1
+ return RevisionSet(revs)
+
+ def __nonzero__(self):
+ return len(self._revs) != 0
+
+ def __len__(self):
+ """Return the number of revisions in the set."""
+ return len(self._revs)
+
+ def __iter__(self):
+ return iter(self.sorted())
+
+ def __or__(self, rs):
+ """Compute set union."""
+ revs = self._revs.copy()
+ revs.update(rs._revs)
+ return RevisionSet(revs)
+
+def merge_props_to_revision_set(merge_props, pathid):
+ """A converter which returns a RevisionSet instance containing the
+ revisions from PATH as known to BRANCH_PROPS. BRANCH_PROPS is a
+ dictionary of pathid -> revision set branch integration information
+ (as returned by get_merge_props())."""
+ if not merge_props.has_key(pathid):
+ error('no integration info available for path "%s"' % pathid)
+ return RevisionSet(merge_props[pathid])
+
+def dict_from_revlist_prop(propvalue):
+ """Given a property value as a string containing per-source revision
+ lists, return a dictionary whose key is a source path identifier
+ and whose value is the revisions for that source."""
+ prop = {}
+
+ # Multiple sources are separated by any whitespace.
+ for L in propvalue.split():
+ # We use rsplit to play safe and allow colons in pathids.
+ pathid_str, revs = rsplit(L.strip(), ":", 1)
+
+ pathid = PathIdentifier.from_pathid(pathid_str)
+
+ # cache the "external" form we saw
+ pathid.external_form = pathid_str
+
+ prop[pathid] = revs
+ return prop
+
+def get_revlist_prop(url_or_dir, propname, rev=None):
+ """Given a repository URL or working copy path and a property
+ name, extract the values of the property which store per-source
+ revision lists and return a dictionary whose key is a source path
+ identifier, and whose value is the revisions for that source."""
+
+ # Note that propget does not return an error if the property does
+ # not exist, it simply does not output anything. So we do not need
+ # to check for LaunchError here.
+ args = '--strict "%s" "%s"' % (propname, url_or_dir)
+ if rev:
+ args = '-r %s %s' % (rev, args)
+ out = launchsvn('propget %s' % args, split_lines=False)
+
+ return dict_from_revlist_prop(out)
+
+def get_merge_props(dir):
+ """Extract the merged revisions."""
+ return get_revlist_prop(dir, opts["prop"])
+
+def get_block_props(dir):
+ """Extract the blocked revisions."""
+ return get_revlist_prop(dir, opts["block-prop"])
+
+def get_blocked_revs(dir, source_pathid):
+ p = get_block_props(dir)
+ if p.has_key(source_pathid):
+ return RevisionSet(p[source_pathid])
+ return RevisionSet("")
+
+def format_merge_props(props, sep=" "):
+ """Formats the hash PROPS as a string suitable for use as a
+ Subversion property value."""
+ assert sep in ["\t", "\n", " "] # must be a whitespace
+ props = props.items()
+ props.sort()
+ L = []
+ for h, r in props:
+ L.append("%s:%s" % (h, r))
+ return sep.join(L)
+
+def _run_propset(dir, prop, value):
+ """Set the property 'prop' of directory 'dir' to value 'value'. We go
+ through a temporary file to not run into command line length limits."""
+ try:
+ fd, fname = tempfile.mkstemp()
+ f = os.fdopen(fd, "wb")
+ except AttributeError:
+ # Fallback for Python <= 2.3 which does not have mkstemp (mktemp
+ # suffers from race conditions. Not that we care...)
+ fname = tempfile.mktemp()
+ f = open(fname, "wb")
+
+ try:
+ f.write(value)
+ f.close()
+ report("property data written to temp file: %s" % value)
+ svn_command('propset "%s" -F "%s" "%s"' % (prop, fname, dir))
+ finally:
+ os.remove(fname)
+
+def set_props(dir, name, props):
+ props = format_merge_props(props)
+ if props:
+ _run_propset(dir, name, props)
+ else:
+ # Check if NAME exists on DIR before trying to delete it.
+ # As of 1.6 propdel no longer supports deleting a
+ # non-existent property.
+ out = launchsvn('propget "%s" "%s"' % (name, dir))
+ if out:
+ svn_command('propdel "%s" "%s"' % (name, dir))
+
+def set_merge_props(dir, props):
+ set_props(dir, opts["prop"], props)
+
+def set_block_props(dir, props):
+ set_props(dir, opts["block-prop"], props)
+
+def set_blocked_revs(dir, source_pathid, revs):
+ props = get_block_props(dir)
+ if revs:
+ props[source_pathid] = str(revs)
+ elif props.has_key(source_pathid):
+ del props[source_pathid]
+ set_block_props(dir, props)
+
+def is_url(url):
+ """Check if url looks like a valid url."""
+ return re.search(r"^[a-zA-Z][-+\.\w]*://[^\s]+$", url) is not None and url[:4] != 'uuid'
+
+def check_url(url):
+ """Similar to is_url, but actually invoke get_svninfo to find out"""
+ return get_svninfo(url) != {}
+
+def is_pathid(pathid):
+ return isinstance(pathid, PathIdentifier)
+
+def is_wc(dir):
+ """Check if a directory is a working copy."""
+ return os.path.isdir(os.path.join(dir, ".svn")) or \
+ os.path.isdir(os.path.join(dir, "_svn"))
+
+_cache_svninfo = {}
+def get_svninfo(target):
+ """Extract the subversion information for a target (through 'svn info').
+ This function uses an internal cache to let clients query information
+ many times."""
+ if _cache_svninfo.has_key(target):
+ return _cache_svninfo[target]
+ info = {}
+ for L in launchsvn('info "%s"' % target):
+ L = L.strip()
+ if not L:
+ continue
+ key, value = L.split(": ", 1)
+ info[key] = value.strip()
+ _cache_svninfo[target] = info
+ return info
+
+def target_to_url(target):
+ """Convert working copy path or repos URL to a repos URL."""
+ if is_wc(target):
+ info = get_svninfo(target)
+ return info["URL"]
+ return target
+
+_cache_reporoot = {}
+def get_repo_root(target):
+ """Compute the root repos URL given a working-copy path, or a URL."""
+ # Try using "svn info WCDIR". This works only on SVN clients >= 1.3
+ if not is_url(target):
+ try:
+ info = get_svninfo(target)
+ root = info["Repository Root"]
+ _cache_reporoot[root] = None
+ return root
+ except KeyError:
+ pass
+ url = target_to_url(target)
+ assert url[-1] != '/'
+ else:
+ url = target
+
+ # Go through the cache of the repository roots. This avoids extra
+ # server round-trips if we are asking the root of different URLs
+ # in the same repository (the cache in get_svninfo() cannot detect
+ # that of course and would issue a remote command).
+ assert is_url(url)
+ for r in _cache_reporoot:
+ if url.startswith(r):
+ return r
+
+ # Try using "svn info URL". This works only on SVN clients >= 1.2
+ try:
+ info = get_svninfo(url)
+ # info may be {}, in which case we'll see KeyError here
+ root = info["Repository Root"]
+ _cache_reporoot[root] = None
+ return root
+ except (KeyError, LaunchError):
+ pass
+
+ # Constrained to older svn clients, we are stuck with this ugly
+ # trial-and-error implementation. It could be made faster with a
+ # binary search.
+ while url:
+ temp = os.path.dirname(url)
+ try:
+ launchsvn('proplist "%s"' % temp)
+ except LaunchError:
+ _cache_reporoot[url] = None
+ return rstrip(url, "/")
+ url = temp
+
+ error("svn repos root of %s not found" % target)
+
+class SvnLogParser:
+ """
+ Parse the "svn log", going through the XML output and using pulldom (which
+ would even allow streaming the command output).
+ """
+ def __init__(self, xml):
+ self._events = pulldom.parseString(xml)
+ def __getitem__(self, idx):
+ for event, node in self._events:
+ if event == pulldom.START_ELEMENT and node.tagName == "logentry":
+ self._events.expandNode(node)
+ return self.SvnLogRevision(node)
+ raise IndexError, "Could not find 'logentry' tag in xml"
+
+ class SvnLogRevision:
+ def __init__(self, xmlnode):
+ self.n = xmlnode
+ def revision(self):
+ return int(self.n.getAttribute("revision"))
+ def author(self):
+ return self.n.getElementsByTagName("author")[0].firstChild.data
+ def paths(self):
+ return [self.SvnLogPath(n)
+ for n in self.n.getElementsByTagName("path")]
+
+ class SvnLogPath:
+ def __init__(self, xmlnode):
+ self.n = xmlnode
+ def action(self):
+ return self.n.getAttribute("action")
+ def pathid(self):
+ return self.n.firstChild.data
+ def copyfrom_rev(self):
+ try: return self.n.getAttribute("copyfrom-rev")
+ except KeyError: return None
+ def copyfrom_pathid(self):
+ try: return self.n.getAttribute("copyfrom-path")
+ except KeyError: return None
+
+def get_copyfrom(target):
+ """Get copyfrom info for a given target (it represents the
+ repository-relative path from where it was branched). NOTE:
+ repos root has no copyfrom info. In this case None is returned.
+
+ Returns the:
+ - source file or directory from which the copy was made
+ - revision from which that source was copied
+ - revision in which the copy was committed
+ """
+ repos_path = PathIdentifier.from_target(target).repo_relative_path
+ for chg in SvnLogParser(launchsvn('log -v --xml --stop-on-copy "%s"'
+ % target, split_lines=False)):
+ for p in chg.paths():
+ if p.action() == 'A' and p.pathid() == repos_path:
+ # These values will be None if the corresponding elements are
+ # not found in the log.
+ return p.copyfrom_pathid(), p.copyfrom_rev(), chg.revision()
+ return None,None,None
+
+def get_latest_rev(url):
+ """Get the latest revision of the repository of which URL is part."""
+ try:
+ info = get_svninfo(url)
+ if not info.has_key("Revision"):
+ error("Not a valid URL: %s" % url)
+ return info["Revision"]
+ except LaunchError:
+ # Alternative method for latest revision checking (for svn < 1.2)
+ report('checking latest revision of "%s"' % url)
+ L = launchsvn('proplist --revprop -r HEAD "%s"' % opts["source-url"])[0]
+ rev = re.search("revision (\d+)", L).group(1)
+ report('latest revision of "%s" is %s' % (url, rev))
+ return rev
+
+def get_created_rev(url):
+ """Lookup the revision at which the path identified by the
+ provided URL was first created."""
+ oldest_rev = -1
+ report('determining oldest revision for URL "%s"' % url)
+ ### TODO: Refactor this to use a modified RevisionLog class.
+ lines = None
+ cmd = "log -r1:HEAD --stop-on-copy -q " + url
+ try:
+ lines = launchsvn(cmd + " --limit=1")
+ except LaunchError:
+ # Assume that --limit isn't supported by the installed 'svn'.
+ lines = launchsvn(cmd)
+ if lines and len(lines) > 1:
+ i = lines[1].find(" ")
+ if i != -1:
+ oldest_rev = int(lines[1][1:i])
+ if oldest_rev == -1:
+ error('unable to determine oldest revision for URL "%s"' % url)
+ return oldest_rev
+
+def get_commit_log(url, revnum):
+ """Return the log message for a specific integer revision
+ number."""
+ out = launchsvn("log --incremental -r%d %s" % (revnum, url))
+ return recode_stdout_to_file("".join(out[1:]))
+
+def construct_merged_log_message(url, revnums):
+ """Return a commit log message containing all the commit messages
+ in the specified revisions at the given URL. The separator used
+ in this log message is determined by searching for the longest
+ svnmerge separator existing in the commit log messages and
+ extending it by one more separator. This results in a new commit
+ log message that is clearer in describing merges that contain
+ other merges. Trailing newlines are removed from the embedded
+ log messages."""
+ messages = ['']
+ longest_sep = ''
+ for r in revnums.sorted():
+ message = get_commit_log(url, r)
+ if message:
+ message = re.sub(r'(\r\n|\r|\n)', "\n", message)
+ message = rstrip(message, "\n") + "\n"
+ messages.append(prefix_lines(LOG_LINE_PREFIX, message))
+ for match in LOG_SEPARATOR_RE.findall(message):
+ sep = match[1]
+ if len(sep) > len(longest_sep):
+ longest_sep = sep
+
+ longest_sep += LOG_SEPARATOR + "\n"
+ messages.append('')
+ return longest_sep.join(messages)
+
+def get_default_source(branch_target, branch_props):
+ """Return the default source for branch_target (given its branch_props).
+ Error out if there is ambiguity."""
+ if not branch_props:
+ error("no integration info available")
+
+ props = branch_props.copy()
+ pathid = PathIdentifier.from_target(branch_target)
+
+ # To make bidirectional merges easier, find the target's
+ # repository local path so it can be removed from the list of
+ # possible integration sources.
+ if props.has_key(pathid):
+ del props[pathid]
+
+ if len(props) > 1:
+ err_msg = "multiple sources found. "
+ err_msg += "Explicit source argument (-S/--source) required.\n"
+ err_msg += "The merge sources available are:"
+ for prop in props:
+ err_msg += "\n " + str(prop)
+ error(err_msg)
+
+ return props.keys()[0]
+
+def should_find_reflected(branch_dir):
+ should_find_reflected = opts["bidirectional"]
+
+ # If the source has integration info for the target, set find_reflected
+ # even if --bidirectional wasn't specified
+ if not should_find_reflected:
+ source_props = get_merge_props(opts["source-url"])
+ should_find_reflected = source_props.has_key(PathIdentifier.from_target(branch_dir))
+
+ return should_find_reflected
+
+def analyze_revs(target_pathid, url, begin=1, end=None,
+ find_reflected=False):
+ """For the source of the merges in the source URL being merged into
+ target_pathid, analyze the revisions in the interval begin-end (which
+ defaults to 1-HEAD), to find out which revisions are changes in
+ the url, which are changes elsewhere (so-called 'phantom'
+ revisions), optionally which are reflected changes (to avoid
+ conflicts that can occur when doing bidirectional merging between
+ branches), and which revisions initialize merge tracking against other
+ branches. Return a tuple of four RevisionSet's:
+ (real_revs, phantom_revs, reflected_revs, initialized_revs).
+
+ NOTE: To maximize speed, if "end" is not provided, the function is
+ not able to find phantom revisions following the last real
+ revision in the URL.
+ """
+
+ begin = str(begin)
+ if end is None:
+ end = "HEAD"
+ else:
+ end = str(end)
+ if long(begin) > long(end):
+ return RevisionSet(""), RevisionSet(""), \
+ RevisionSet(""), RevisionSet("")
+
+ logs[url] = RevisionLog(url, begin, end, find_reflected)
+ revs = RevisionSet(logs[url].revs)
+
+ if end == "HEAD":
+ # If end is not provided, we do not know which is the latest revision
+ # in the repository. So return the phantom revision set only up to
+ # the latest known revision.
+ end = str(list(revs)[-1])
+
+ phantom_revs = RevisionSet("%s-%s" % (begin, end)) - revs
+
+ if find_reflected:
+ reflected_revs = logs[url].merge_metadata().changed_revs(target_pathid)
+ reflected_revs += logs[url].block_metadata().changed_revs(target_pathid)
+ else:
+ reflected_revs = []
+
+ initialized_revs = RevisionSet(logs[url].merge_metadata().initialized_revs())
+ reflected_revs = RevisionSet(reflected_revs)
+
+ return revs, phantom_revs, reflected_revs, initialized_revs
+
+def analyze_source_revs(branch_target, source_url, **kwargs):
+ """For the given branch and source, extract the real and phantom
+ source revisions."""
+ branch_url = target_to_url(branch_target)
+ branch_pathid = PathIdentifier.from_target(branch_target)
+
+ # Extract the latest repository revision from the URL of the branch
+ # directory (which is already cached at this point).
+ end_rev = get_latest_rev(source_url)
+
+ # Calculate the base of analysis. If there is a "1-XX" interval in the
+ # merged_revs, we do not need to check those.
+ base = 1
+ r = opts["merged-revs"].normalized()
+ if r and r[0][0] == 1:
+ base = r[0][1] + 1
+
+ # See if the user filtered the revision set. If so, we are not
+ # interested in something outside that range.
+ if opts["revision"]:
+ revs = RevisionSet(opts["revision"]).sorted()
+ if base < revs[0]:
+ base = revs[0]
+ if end_rev > revs[-1]:
+ end_rev = revs[-1]
+
+ return analyze_revs(branch_pathid, source_url, base, end_rev, **kwargs)
+
+def minimal_merge_intervals(revs, phantom_revs):
+ """Produce the smallest number of intervals suitable for merging. revs
+ is the RevisionSet which we want to merge, and phantom_revs are phantom
+ revisions which can be used to concatenate intervals, thus minimizing the
+ number of operations."""
+ revnums = revs.normalized()
+ ret = []
+
+ cur = revnums.pop()
+ while revnums:
+ next = revnums.pop()
+ assert next[1] < cur[0] # otherwise it is not ordered
+ assert cur[0] - next[1] > 1 # otherwise it is not normalized
+ for i in range(next[1]+1, cur[0]):
+ if i not in phantom_revs:
+ ret.append(cur)
+ cur = next
+ break
+ else:
+ cur = (next[0], cur[1])
+
+ ret.append(cur)
+ ret.reverse()
+ return ret
+
+def display_revisions(revs, display_style, revisions_msg, source_url):
+ """Show REVS as dictated by DISPLAY_STYLE, either numerically, in
+ log format, or as diffs. When displaying revisions numerically,
+ prefix output with REVISIONS_MSG when in verbose mode. Otherwise,
+ request logs or diffs using SOURCE_URL."""
+ if display_style == "revisions":
+ if revs:
+ report(revisions_msg)
+ print revs
+ elif display_style == "logs":
+ for start,end in revs.normalized():
+ svn_command('log --incremental -v -r %d:%d %s' % \
+ (start, end, source_url))
+ elif display_style in ("diffs", "summarize"):
+ if display_style == 'summarize':
+ summarize = '--summarize '
+ else:
+ summarize = ''
+
+ for start, end in revs.normalized():
+ print
+ if start == end:
+ print "%s: changes in revision %d follow" % (NAME, start)
+ else:
+ print "%s: changes in revisions %d-%d follow" % (NAME,
+ start, end)
+ print
+
+ # Note: the starting revision number to 'svn diff' is
+ # NOT inclusive so we have to subtract one from ${START}.
+ svn_command("diff -r %d:%d %s %s" % (start - 1, end, summarize,
+ source_url))
+ else:
+ assert False, "unhandled display style: %s" % display_style
+
+def action_init(target_dir, target_props):
+ """Initialize for merges."""
+ # Check that directory is ready for being modified
+ check_dir_clean(target_dir)
+
+ target_pathid = PathIdentifier.from_target(target_dir)
+ source_pathid = opts['source-pathid']
+ if source_pathid == target_pathid:
+ error("cannot init integration source path '%s'\nIts path identifier does not "
+ "differ from the path identifier of the current directory, '%s'."
+ % (source_pathid, target_pathid))
+
+ source_url = opts['source-url']
+
+ # If the user hasn't specified the revisions to use, see if the
+ # "source" is a copy from the current tree and if so, we can use
+ # the version data obtained from it.
+ revision_range = opts["revision"]
+ if not revision_range:
+ # If source was originally copied from target, and we are merging
+ # changes from source to target (the copy target is the merge source,
+ # and the copy source is the merge target), then we want to mark as
+ # integrated up to the rev in which the copy was committed which
+ # created the merge source:
+ cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(source_url)
+
+ cf_pathid = None
+ if cf_source:
+ cf_url = get_repo_root(source_url) + cf_source
+ if is_url(cf_url) and check_url(cf_url):
+ cf_pathid = PathIdentifier.from_target(cf_url)
+
+ if target_pathid == cf_pathid:
+ report('the source "%s" was copied from "%s" in rev %s and committed in rev %s' %
+ (source_url, target_dir, cf_rev, copy_committed_in_rev))
+ revision_range = "1-" + str(copy_committed_in_rev)
+
+ if not revision_range:
+ # If the reverse is true: copy source is the merge source, and
+ # the copy target is the merge target, then we want to mark as
+ # integrated up to the specific rev of the merge target from
+ # which the merge source was copied. (Longer discussion at:
+ # http://subversion.tigris.org/issues/show_bug.cgi?id=2810 )
+ cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(target_dir)
+
+ cf_pathid = None
+ if cf_source:
+ cf_url = get_repo_root(target_dir) + cf_source
+ if is_url(cf_url) and check_url(cf_url):
+ cf_pathid = PathIdentifier.from_target(cf_url)
+
+ source_pathid = PathIdentifier.from_target(source_url)
+ if source_pathid == cf_pathid:
+ report('the target "%s" was copied the source "%s" in rev %s and committed in rev %s' %
+ (target_dir, source_url, cf_rev, copy_committed_in_rev))
+ revision_range = "1-" + cf_rev
+
+ # When neither the merge source nor target is a copy of the other, and
+ # the user did not specify a revision range, then choose a default which is
+ # the current revision; saying, in effect, "everything has been merged, so
+ # mark as integrated up to the latest rev on source url).
+ if not revision_range:
+ revision_range = "1-" + get_latest_rev(source_url)
+
+ revs = RevisionSet(revision_range)
+
+ report('marking "%s" as already containing revisions "%s" of "%s"' %
+ (target_dir, revs, source_url))
+
+ revs = str(revs)
+ # If the local svnmerge-integrated property already has an entry
+ # for the source-pathid, simply error out.
+ if not opts["force"] and target_props.has_key(source_pathid):
+ error('Repository-relative path %s has already been initialized at %s\n'
+ 'Use --force to re-initialize' % (source_pathid, target_dir))
+ # set the pathid's external_form based on the user's options
+ source_pathid.external_form = source_pathid.format(opts['location-type'])
+
+ revs = str(revs)
+ target_props[source_pathid] = revs
+
+ # Set property
+ set_merge_props(target_dir, target_props)
+
+ # Write out commit message if desired
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ print >>f, 'Initialized merge tracking via "%s" with revisions "%s" from ' \
+ % (NAME, revs)
+ print >>f, '%s' % source_url
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+def action_avail(branch_dir, branch_props):
+ """Show commits available for merges."""
+ source_revs, phantom_revs, reflected_revs, initialized_revs = \
+ analyze_source_revs(branch_dir, opts["source-url"],
+ find_reflected=
+ should_find_reflected(branch_dir))
+ report('skipping phantom revisions: %s' % phantom_revs)
+ if reflected_revs:
+ report('skipping reflected revisions: %s' % reflected_revs)
+ report('skipping initialized revisions: %s' % initialized_revs)
+
+ blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
+ avail_revs = source_revs - opts["merged-revs"] - blocked_revs - \
+ reflected_revs - initialized_revs
+
+ # Compose the set of revisions to show
+ revs = RevisionSet("")
+ report_msg = "revisions available to be merged are:"
+ if "avail" in opts["avail-showwhat"]:
+ revs |= avail_revs
+ if "blocked" in opts["avail-showwhat"]:
+ revs |= blocked_revs
+ report_msg = "revisions blocked are:"
+
+ # Limit to revisions specified by -r (if any)
+ if opts["revision"]:
+ revs = revs & RevisionSet(opts["revision"])
+
+ display_revisions(revs, opts["avail-display"],
+ report_msg,
+ opts["source-url"])
+
+def action_integrated(branch_dir, branch_props):
+ """Show change sets already merged. This set of revisions is
+ calculated from taking svnmerge-integrated property from the
+ branch, and subtracting any revision older than the branch
+ creation revision."""
+ # Extract the integration info for the branch_dir
+ branch_props = get_merge_props(branch_dir)
+ revs = merge_props_to_revision_set(branch_props, opts["source-pathid"])
+
+ # Lookup the oldest revision on the branch path.
+ oldest_src_rev = get_created_rev(opts["source-url"])
+
+ # Subtract any revisions which pre-date the branch.
+ report("subtracting revisions which pre-date the source URL (%d)" %
+ oldest_src_rev)
+ revs = revs - RevisionSet(range(1, oldest_src_rev))
+
+ # Limit to revisions specified by -r (if any)
+ if opts["revision"]:
+ revs = revs & RevisionSet(opts["revision"])
+
+ display_revisions(revs, opts["integrated-display"],
+ "revisions already integrated are:", opts["source-url"])
+
+def action_merge(branch_dir, branch_props):
+ """Record merge meta data, and do the actual merge (if not
+ requested otherwise via --record-only)."""
+ # Check branch directory is ready for being modified
+ check_dir_clean(branch_dir)
+
+ source_revs, phantom_revs, reflected_revs, initialized_revs = \
+ analyze_source_revs(branch_dir, opts["source-url"],
+ find_reflected=
+ should_find_reflected(branch_dir))
+
+ if opts["revision"]:
+ revs = RevisionSet(opts["revision"])
+ else:
+ revs = source_revs
+
+ blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
+ merged_revs = opts["merged-revs"]
+
+ # Show what we're doing
+ if opts["verbose"]: # just to avoid useless calculations
+ if merged_revs & revs:
+ report('"%s" already contains revisions %s' % (branch_dir,
+ merged_revs & revs))
+ if phantom_revs:
+ report('memorizing phantom revision(s): %s' % phantom_revs)
+ if reflected_revs:
+ report('memorizing reflected revision(s): %s' % reflected_revs)
+ if blocked_revs & revs:
+ report('skipping blocked revisions(s): %s' % (blocked_revs & revs))
+ if initialized_revs:
+ report('skipping initialized revision(s): %s' % initialized_revs)
+
+ # Compute final merge set.
+ revs = revs - merged_revs - blocked_revs - reflected_revs - \
+ phantom_revs - initialized_revs
+ if not revs:
+ report('no revisions to merge, exiting')
+ return
+
+ # When manually marking revisions as merged, we only update the
+ # integration meta data, and don't perform an actual merge.
+ record_only = opts["record-only"]
+
+ if record_only:
+ report('recording merge of revision(s) %s from "%s"' %
+ (revs, opts["source-url"]))
+ else:
+ report('merging in revision(s) %s from "%s"' %
+ (revs, opts["source-url"]))
+
+ # Do the merge(s). Note: the starting revision number to 'svn merge'
+ # is NOT inclusive so we have to subtract one from start.
+ # We try to keep the number of merge operations as low as possible,
+ # because it is faster and reduces the number of conflicts.
+ old_block_props = get_block_props(branch_dir)
+ merge_metadata = logs[opts["source-url"]].merge_metadata()
+ block_metadata = logs[opts["source-url"]].block_metadata()
+ for start,end in minimal_merge_intervals(revs, phantom_revs):
+ if not record_only:
+ # Preset merge/blocked properties to the source value at
+ # the start rev to avoid spurious property conflicts
+ set_merge_props(branch_dir, merge_metadata.get(start - 1))
+ set_block_props(branch_dir, block_metadata.get(start - 1))
+ # Do the merge
+ svn_command("merge --force -r %d:%d %s %s" % \
+ (start - 1, end, opts["source-url"], branch_dir))
+ # TODO: to support graph merging, add logic to merge the property
+ # meta-data manually
+
+ # Update the set of merged revisions.
+ merged_revs = merged_revs | revs | reflected_revs | phantom_revs | initialized_revs
+ branch_props[opts["source-pathid"]] = str(merged_revs)
+ set_merge_props(branch_dir, branch_props)
+ # Reset the blocked revs
+ set_block_props(branch_dir, old_block_props)
+
+ # Write out commit message if desired
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ if record_only:
+ print >>f, 'Recorded merge of revisions %s via %s from ' % \
+ (revs, NAME)
+ else:
+ print >>f, 'Merged revisions %s via %s from ' % \
+ (revs, NAME)
+ print >>f, '%s' % opts["source-url"]
+ if opts["commit-verbose"]:
+ print >>f
+ print >>f, construct_merged_log_message(opts["source-url"], revs),
+
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+def action_block(branch_dir, branch_props):
+ """Block revisions."""
+ # Check branch directory is ready for being modified
+ check_dir_clean(branch_dir)
+
+ source_revs, phantom_revs, reflected_revs, initialized_revs = \
+ analyze_source_revs(branch_dir, opts["source-url"])
+ revs_to_block = source_revs - opts["merged-revs"]
+
+ # Limit to revisions specified by -r (if any)
+ if opts["revision"]:
+ revs_to_block = RevisionSet(opts["revision"]) & revs_to_block
+
+ if not revs_to_block:
+ error('no available revisions to block')
+
+ # Change blocked information
+ blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
+ blocked_revs = blocked_revs | revs_to_block
+ set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs)
+
+ # Write out commit message if desired
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ print >>f, 'Blocked revisions %s via %s' % (revs_to_block, NAME)
+ if opts["commit-verbose"]:
+ print >>f
+ print >>f, construct_merged_log_message(opts["source-url"],
+ revs_to_block),
+
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+def action_unblock(branch_dir, branch_props):
+ """Unblock revisions."""
+ # Check branch directory is ready for being modified
+ check_dir_clean(branch_dir)
+
+ blocked_revs = get_blocked_revs(branch_dir, opts["source-pathid"])
+ revs_to_unblock = blocked_revs
+
+ # Limit to revisions specified by -r (if any)
+ if opts["revision"]:
+ revs_to_unblock = revs_to_unblock & RevisionSet(opts["revision"])
+
+ if not revs_to_unblock:
+ error('no available revisions to unblock')
+
+ # Change blocked information
+ blocked_revs = blocked_revs - revs_to_unblock
+ set_blocked_revs(branch_dir, opts["source-pathid"], blocked_revs)
+
+ # Write out commit message if desired
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ print >>f, 'Unblocked revisions %s via %s' % (revs_to_unblock, NAME)
+ if opts["commit-verbose"]:
+ print >>f
+ print >>f, construct_merged_log_message(opts["source-url"],
+ revs_to_unblock),
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+def action_rollback(branch_dir, branch_props):
+ """Rollback previously integrated revisions."""
+
+ # Make sure the revision arguments are present
+ if not opts["revision"]:
+ error("The '-r' option is mandatory for rollback")
+
+ # Check branch directory is ready for being modified
+ check_dir_clean(branch_dir)
+
+ # Extract the integration info for the branch_dir
+ branch_props = get_merge_props(branch_dir)
+ # Get the list of all revisions already merged into this source-pathid.
+ merged_revs = merge_props_to_revision_set(branch_props,
+ opts["source-pathid"])
+
+ # At which revision was the src created?
+ oldest_src_rev = get_created_rev(opts["source-url"])
+ src_pre_exist_range = RevisionSet("1-%d" % oldest_src_rev)
+
+ # Limit to revisions specified by -r (if any)
+ revs = merged_revs & RevisionSet(opts["revision"])
+
+ # make sure there's some revision to rollback
+ if not revs:
+ report("Nothing to rollback in revision range r%s" % opts["revision"])
+ return
+
+ # If even one specified revision lies outside the lifetime of the
+ # merge source, error out.
+ if revs & src_pre_exist_range:
+ err_str = "Specified revision range falls out of the rollback range.\n"
+ err_str += "%s was created at r%d" % (opts["source-pathid"],
+ oldest_src_rev)
+ error(err_str)
+
+ record_only = opts["record-only"]
+
+ if record_only:
+ report('recording rollback of revision(s) %s from "%s"' %
+ (revs, opts["source-url"]))
+ else:
+ report('rollback of revision(s) %s from "%s"' %
+ (revs, opts["source-url"]))
+
+ # Do the reverse merge(s). Note: the starting revision number
+ # to 'svn merge' is NOT inclusive so we have to subtract one from start.
+ # We try to keep the number of merge operations as low as possible,
+ # because it is faster and reduces the number of conflicts.
+ rollback_intervals = minimal_merge_intervals(revs, [])
+ # rollback in the reverse order of merge
+ rollback_intervals.reverse()
+ for start, end in rollback_intervals:
+ if not record_only:
+ # Do the merge
+ svn_command("merge --force -r %d:%d %s %s" % \
+ (end, start - 1, opts["source-url"], branch_dir))
+
+ # Write out commit message if desired
+ # calculate the phantom revs first
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ if record_only:
+ print >>f, 'Recorded rollback of revisions %s via %s from ' % \
+ (revs , NAME)
+ else:
+ print >>f, 'Rolled back revisions %s via %s from ' % \
+ (revs , NAME)
+ print >>f, '%s' % opts["source-url"]
+
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+ # Update the set of merged revisions.
+ merged_revs = merged_revs - revs
+ branch_props[opts["source-pathid"]] = str(merged_revs)
+ set_merge_props(branch_dir, branch_props)
+
+def action_uninit(branch_dir, branch_props):
+ """Uninit SOURCE URL."""
+ # Check branch directory is ready for being modified
+ check_dir_clean(branch_dir)
+
+ # If the source-pathid does not have an entry in the svnmerge-integrated
+ # property, simply error out.
+ if not branch_props.has_key(opts["source-pathid"]):
+ error('Repository-relative path "%s" does not contain merge '
+ 'tracking information for "%s"' \
+ % (opts["source-pathid"], branch_dir))
+
+ del branch_props[opts["source-pathid"]]
+
+ # Set merge property with the selected source deleted
+ set_merge_props(branch_dir, branch_props)
+
+ # Set blocked revisions for the selected source to None
+ set_blocked_revs(branch_dir, opts["source-pathid"], None)
+
+ # Write out commit message if desired
+ if opts["commit-file"]:
+ f = open(opts["commit-file"], "w")
+ print >>f, 'Removed merge tracking for "%s" for ' % NAME
+ print >>f, '%s' % opts["source-url"]
+ f.close()
+ report('wrote commit message to "%s"' % opts["commit-file"])
+
+###############################################################################
+# Command line parsing -- options and commands management
+###############################################################################
+
+class OptBase:
+ def __init__(self, *args, **kwargs):
+ self.help = kwargs["help"]
+ del kwargs["help"]
+ self.lflags = []
+ self.sflags = []
+ for a in args:
+ if a.startswith("--"): self.lflags.append(a)
+ elif a.startswith("-"): self.sflags.append(a)
+ else:
+ raise TypeError, "invalid flag name: %s" % a
+ if kwargs.has_key("dest"):
+ self.dest = kwargs["dest"]
+ del kwargs["dest"]
+ else:
+ if not self.lflags:
+ raise TypeError, "cannot deduce dest name without long options"
+ self.dest = self.lflags[0][2:]
+ if kwargs:
+ raise TypeError, "invalid keyword arguments: %r" % kwargs.keys()
+ def repr_flags(self):
+ f = self.sflags + self.lflags
+ r = f[0]
+ for fl in f[1:]:
+ r += " [%s]" % fl
+ return r
+
+class Option(OptBase):
+ def __init__(self, *args, **kwargs):
+ self.default = kwargs.setdefault("default", 0)
+ del kwargs["default"]
+ self.value = kwargs.setdefault("value", None)
+ del kwargs["value"]
+ OptBase.__init__(self, *args, **kwargs)
+ def apply(self, state, value):
+ assert value == ""
+ if self.value is not None:
+ state[self.dest] = self.value
+ else:
+ state[self.dest] += 1
+
+class OptionArg(OptBase):
+ def __init__(self, *args, **kwargs):
+ self.default = kwargs["default"]
+ del kwargs["default"]
+ self.metavar = kwargs.setdefault("metavar", None)
+ del kwargs["metavar"]
+ OptBase.__init__(self, *args, **kwargs)
+
+ if self.metavar is None:
+ if self.dest is not None:
+ self.metavar = self.dest.upper()
+ else:
+ self.metavar = "arg"
+ if self.default:
+ self.help += " (default: %s)" % self.default
+ def apply(self, state, value):
+ assert value is not None
+ state[self.dest] = value
+ def repr_flags(self):
+ r = OptBase.repr_flags(self)
+ return r + " " + self.metavar
+
+class CommandOpts:
+ class Cmd:
+ def __init__(self, *args):
+ self.name, self.func, self.usage, self.help, self.opts = args
+ def short_help(self):
+ return self.help.split(".")[0]
+ def __str__(self):
+ return self.name
+ def __call__(self, *args, **kwargs):
+ return self.func(*args, **kwargs)
+
+ def __init__(self, global_opts, common_opts, command_table, version=None):
+ self.progname = NAME
+ self.version = version.replace("%prog", self.progname)
+ self.cwidth = console_width() - 2
+ self.ctable = command_table.copy()
+ self.gopts = global_opts[:]
+ self.copts = common_opts[:]
+ self._add_builtins()
+ for k in self.ctable.keys():
+ cmd = self.Cmd(k, *self.ctable[k])
+ opts = []
+ for o in cmd.opts:
+ if isinstance(o, types.StringType) or \
+ isinstance(o, types.UnicodeType):
+ o = self._find_common(o)
+ opts.append(o)
+ cmd.opts = opts
+ self.ctable[k] = cmd
+
+ def _add_builtins(self):
+ self.gopts.append(
+ Option("-h", "--help", help="show help for this command and exit"))
+ if self.version is not None:
+ self.gopts.append(
+ Option("-V", "--version", help="show version info and exit"))
+ self.ctable["help"] = (self._cmd_help,
+ "help [COMMAND]",
+ "Display help for a specific command. If COMMAND is omitted, "
+ "display brief command description.",
+ [])
+
+ def _cmd_help(self, cmd=None, *args):
+ if args:
+ self.error("wrong number of arguments", "help")
+ if cmd is not None:
+ cmd = self._command(cmd)
+ self.print_command_help(cmd)
+ else:
+ self.print_command_list()
+
+ def _paragraph(self, text, width=78):
+ chunks = re.split("\s+", text.strip())
+ chunks.reverse()
+ lines = []
+ while chunks:
+ L = chunks.pop()
+ while chunks and len(L) + len(chunks[-1]) + 1 <= width:
+ L += " " + chunks.pop()
+ lines.append(L)
+ return lines
+
+ def _paragraphs(self, text, *args, **kwargs):
+ pars = text.split("\n\n")
+ lines = self._paragraph(pars[0], *args, **kwargs)
+ for p in pars[1:]:
+ lines.append("")
+ lines.extend(self._paragraph(p, *args, **kwargs))
+ return lines
+
+ def _print_wrapped(self, text, indent=0):
+ text = self._paragraphs(text, self.cwidth - indent)
+ print text.pop(0)
+ for t in text:
+ print " " * indent + t
+
+ def _find_common(self, fl):
+ for o in self.copts:
+ if fl in o.lflags+o.sflags:
+ return o
+ assert False, fl
+
+ def _compute_flags(self, opts, check_conflicts=True):
+ back = {}
+ sfl = ""
+ lfl = []
+ for o in opts:
+ sapp = lapp = ""
+ if isinstance(o, OptionArg):
+ sapp, lapp = ":", "="
+ for s in o.sflags:
+ if check_conflicts and back.has_key(s):
+ raise RuntimeError, "option conflict: %s" % s
+ back[s] = o
+ sfl += s[1:] + sapp
+ for l in o.lflags:
+ if check_conflicts and back.has_key(l):
+ raise RuntimeError, "option conflict: %s" % l
+ back[l] = o
+ lfl.append(l[2:] + lapp)
+ return sfl, lfl, back
+
+ def _extract_command(self, args):
+ """
+ Try to extract the command name from the argument list. This is
+ non-trivial because we want to allow command-specific options even
+ before the command itself.
+ """
+ opts = self.gopts[:]
+ for cmd in self.ctable.values():
+ opts.extend(cmd.opts)
+ sfl, lfl, _ = self._compute_flags(opts, check_conflicts=False)
+
+ lopts,largs = getopt.getopt(args, sfl, lfl)
+ if not largs:
+ return None
+ return self._command(largs[0])
+
+ def _fancy_getopt(self, args, opts, state=None):
+ if state is None:
+ state= {}
+ for o in opts:
+ if not state.has_key(o.dest):
+ state[o.dest] = o.default
+
+ sfl, lfl, back = self._compute_flags(opts)
+ try:
+ lopts,args = getopt.gnu_getopt(args, sfl, lfl)
+ except AttributeError:
+ # Before Python 2.3, there was no gnu_getopt support.
+ # So we can't parse intermixed positional arguments
+ # and options.
+ lopts,args = getopt.getopt(args, sfl, lfl)
+
+ for o,v in lopts:
+ back[o].apply(state, v)
+ return state, args
+
+ def _command(self, cmd):
+ if not self.ctable.has_key(cmd):
+ self.error("unknown command: '%s'" % cmd)
+ return self.ctable[cmd]
+
+ def parse(self, args):
+ if not args:
+ self.print_small_help()
+ sys.exit(0)
+
+ cmd = None
+ try:
+ cmd = self._extract_command(args)
+ opts = self.gopts[:]
+ if cmd:
+ opts.extend(cmd.opts)
+ args.remove(cmd.name)
+ state, args = self._fancy_getopt(args, opts)
+ except getopt.GetoptError, e:
+ self.error(e, cmd)
+
+ # Handle builtins
+ if self.version is not None and state["version"]:
+ self.print_version()
+ sys.exit(0)
+ if state["help"]: # special case for --help
+ if cmd:
+ self.print_command_help(cmd)
+ sys.exit(0)
+ cmd = self.ctable["help"]
+ else:
+ if cmd is None:
+ self.error("command argument required")
+ if str(cmd) == "help":
+ cmd(*args)
+ sys.exit(0)
+ return cmd, args, state
+
+ def error(self, s, cmd=None):
+ print >>sys.stderr, "%s: %s" % (self.progname, s)
+ if cmd is not None:
+ self.print_command_help(cmd)
+ else:
+ self.print_small_help()
+ sys.exit(1)
+ def print_small_help(self):
+ print "Type '%s help' for usage" % self.progname
+ def print_usage_line(self):
+ print "usage: %s <subcommand> [options...] [args...]\n" % self.progname
+ def print_command_list(self):
+ print "Available commands (use '%s help COMMAND' for more details):\n" \
+ % self.progname
+ cmds = self.ctable.keys()
+ cmds.sort()
+ indent = max(map(len, cmds))
+ for c in cmds:
+ h = self.ctable[c].short_help()
+ print " %-*s " % (indent, c),
+ self._print_wrapped(h, indent+6)
+ def print_command_help(self, cmd):
+ cmd = self.ctable[str(cmd)]
+ print 'usage: %s %s\n' % (self.progname, cmd.usage)
+ self._print_wrapped(cmd.help)
+ def print_opts(opts, self=self):
+ if not opts: return
+ flags = [o.repr_flags() for o in opts]
+ indent = max(map(len, flags))
+ for f,o in zip(flags, opts):
+ print " %-*s :" % (indent, f),
+ self._print_wrapped(o.help, indent+5)
+ print '\nCommand options:'
+ print_opts(cmd.opts)
+ print '\nGlobal options:'
+ print_opts(self.gopts)
+
+ def print_version(self):
+ print self.version
+
+###############################################################################
+# Options and Commands description
+###############################################################################
+
+global_opts = [
+ Option("-F", "--force",
+ help="force operation even if the working copy is not clean, or "
+ "there are pending updates"),
+ Option("-n", "--dry-run",
+ help="don't actually change anything, just pretend; "
+ "implies --show-changes"),
+ Option("-s", "--show-changes",
+ help="show subversion commands that make changes"),
+ Option("-v", "--verbose",
+ help="verbose mode: output more information about progress"),
+ OptionArg("-u", "--username",
+ default=None,
+ help="invoke subversion commands with the supplied username"),
+ OptionArg("-p", "--password",
+ default=None,
+ help="invoke subversion commands with the supplied password"),
+ OptionArg("-c", "--config-dir", metavar="DIR",
+ default=None,
+ help="cause subversion commands to consult runtime config directory DIR"),
+]
+
+common_opts = [
+ Option("-b", "--bidirectional",
+ value=True,
+ default=False,
+ help="remove reflected and initialized revisions from merge candidates. "
+ "Not required but may be specified to speed things up slightly"),
+ OptionArg("-f", "--commit-file", metavar="FILE",
+ default="svnmerge-commit-message.txt",
+ help="set the name of the file where the suggested log message "
+ "is written to"),
+ Option("-M", "--record-only",
+ value=True,
+ default=False,
+ help="do not perform an actual merge of the changes, yet record "
+ "that a merge happened"),
+ OptionArg("-r", "--revision",
+ metavar="REVLIST",
+ default="",
+ help="specify a revision list, consisting of revision numbers "
+ 'and ranges separated by commas, e.g., "534,537-539,540"'),
+ OptionArg("-S", "--source", "--head",
+ default=None,
+ help="specify a merge source for this branch. It can be either "
+ "a working directory path, a full URL, or an unambiguous "
+ "substring of one of the locations for which merge tracking was "
+ "already initialized. Needed only to disambiguate in case of "
+ "multiple merge sources"),
+]
+
+command_table = {
+ "init": (action_init,
+ "init [OPTION...] [SOURCE]",
+ """Initialize merge tracking from SOURCE on the current working
+ directory.
+
+ If SOURCE is specified, all the revisions in SOURCE are marked as already
+ merged; if this is not correct, you can use --revision to specify the
+ exact list of already-merged revisions.
+
+ If SOURCE is omitted, then it is computed from the "svn cp" history of the
+ current working directory (searching back for the branch point); in this
+ case, %s assumes that no revision has been integrated yet since
+ the branch point (unless you teach it with --revision).""" % NAME,
+ [
+ "-f", "-r", # import common opts
+ OptionArg("-L", "--location-type",
+ dest="location-type",
+ default="path",
+ help="Use this type of location identifier in the new " +
+ "Subversion properties; 'uuid', 'url', or 'path' " +
+ "(default)"),
+ ]),
+
+ "avail": (action_avail,
+ "avail [OPTION...] [PATH]",
+ """Show unmerged revisions available for PATH as a revision list.
+ If --revision is given, the revisions shown will be limited to those
+ also specified in the option.
+
+ When svnmerge is used to bidirectionally merge changes between a
+ branch and its source, it is necessary to not merge the same changes
+ forth and back: e.g., if you committed a merge of a certain
+ revision of the branch into the source, you do not want that commit
+ to appear as available to merged into the branch (as the code
+ originated in the branch itself!). svnmerge will automatically
+ exclude these so-called "reflected" revisions.""",
+ [
+ Option("-A", "--all",
+ dest="avail-showwhat",
+ value=["blocked", "avail"],
+ default=["avail"],
+ help="show both available and blocked revisions (aka ignore "
+ "blocked revisions)"),
+ "-b",
+ Option("-B", "--blocked",
+ dest="avail-showwhat",
+ value=["blocked"],
+ help="show the blocked revision list (see '%s block')" % NAME),
+ Option("-d", "--diff",
+ dest="avail-display",
+ value="diffs",
+ default="revisions",
+ help="show corresponding diff instead of revision list"),
+ Option("--summarize",
+ dest="avail-display",
+ value="summarize",
+ help="show summarized diff instead of revision list"),
+ Option("-l", "--log",
+ dest="avail-display",
+ value="logs",
+ help="show corresponding log history instead of revision list"),
+ "-r",
+ "-S",
+ ]),
+
+ "integrated": (action_integrated,
+ "integrated [OPTION...] [PATH]",
+ """Show merged revisions available for PATH as a revision list.
+ If --revision is given, the revisions shown will be limited to
+ those also specified in the option.""",
+ [
+ Option("-d", "--diff",
+ dest="integrated-display",
+ value="diffs",
+ default="revisions",
+ help="show corresponding diff instead of revision list"),
+ Option("-l", "--log",
+ dest="integrated-display",
+ value="logs",
+ help="show corresponding log history instead of revision list"),
+ "-r",
+ "-S",
+ ]),
+
+ "rollback": (action_rollback,
+ "rollback [OPTION...] [PATH]",
+ """Rollback previously merged in revisions from PATH. The
+ --revision option is mandatory, and specifies which revisions
+ will be rolled back. Only the previously integrated merges
+ will be rolled back.
+
+ When manually rolling back changes, --record-only can be used to
+ instruct %s that a manual rollback of a certain revision
+ already happened, so that it can record it and offer that
+ revision for merge henceforth.""" % (NAME),
+ [
+ "-f", "-r", "-S", "-M", # import common opts
+ ]),
+
+ "merge": (action_merge,
+ "merge [OPTION...] [PATH]",
+ """Merge in revisions into PATH from its source. If --revision is omitted,
+ all the available revisions will be merged. In any case, already merged-in
+ revisions will NOT be merged again.
+
+ When svnmerge is used to bidirectionally merge changes between a
+ branch and its source, it is necessary to not merge the same changes
+ forth and back: e.g., if you committed a merge of a certain
+ revision of the branch into the source, you do not want that commit
+ to appear as available to merged into the branch (as the code
+ originated in the branch itself!). svnmerge will automatically
+ exclude these so-called "reflected" revisions.
+
+ When manually merging changes across branches, --record-only can
+ be used to instruct %s that a manual merge of a certain revision
+ already happened, so that it can record it and not offer that
+ revision for merge anymore. Conversely, when there are revisions
+ which should not be merged, use '%s block'.""" % (NAME, NAME),
+ [
+ "-b", "-f", "-r", "-S", "-M", # import common opts
+ ]),
+
+ "block": (action_block,
+ "block [OPTION...] [PATH]",
+ """Block revisions within PATH so that they disappear from the available
+ list. This is useful to hide revisions which will not be integrated.
+ If --revision is omitted, it defaults to all the available revisions.
+
+ Do not use this option to hide revisions that were manually merged
+ into the branch. Instead, use '%s merge --record-only', which
+ records that a merge happened (as opposed to a merge which should
+ not happen).""" % NAME,
+ [
+ "-f", "-r", "-S", # import common opts
+ ]),
+
+ "unblock": (action_unblock,
+ "unblock [OPTION...] [PATH]",
+ """Revert the effect of '%s block'. If --revision is omitted, all the
+ blocked revisions are unblocked""" % NAME,
+ [
+ "-f", "-r", "-S", # import common opts
+ ]),
+
+ "uninit": (action_uninit,
+ "uninit [OPTION...] [PATH]",
+ """Remove merge tracking information from PATH. It cleans any kind of merge
+ tracking information (including the list of blocked revisions). If there
+ are multiple sources, use --source to indicate which source you want to
+ forget about.""",
+ [
+ "-f", "-S", # import common opts
+ ]),
+}
+
+
+def main(args):
+ global opts
+
+ # Initialize default options
+ opts = default_opts.copy()
+ logs.clear()
+
+ optsparser = CommandOpts(global_opts, common_opts, command_table,
+ version="%%prog r%s\n modified: %s\n\n"
+ "Copyright (C) 2004,2005 Awarix Inc.\n"
+ "Copyright (C) 2005, Giovanni Bajo"
+ % (__revision__, __date__))
+
+ cmd, args, state = optsparser.parse(args)
+ opts.update(state)
+
+ source = opts.get("source", None)
+ branch_dir = "."
+
+ if str(cmd) == "init":
+ if len(args) == 1:
+ source = args[0]
+ elif len(args) > 1:
+ optsparser.error("wrong number of parameters", cmd)
+ elif str(cmd) in command_table.keys():
+ if len(args) == 1:
+ branch_dir = args[0]
+ elif len(args) > 1:
+ optsparser.error("wrong number of parameters", cmd)
+ else:
+ assert False, "command not handled: %s" % cmd
+
+ # Validate branch_dir
+ if not is_wc(branch_dir):
+ if str(cmd) == "avail":
+ info = None
+ # it should be noted here that svn info does not error exit
+ # if an invalid target is specified to it (as is
+ # intuitive). so the try, except code is not absolutely
+ # necessary. but, I retain it to indicate the intuitive
+ # handling.
+ try:
+ info = get_svninfo(branch_dir)
+ except LaunchError:
+ pass
+ # test that we definitely targeted a subversion directory,
+ # mirroring the purpose of the earlier is_wc() call
+ if info is None or not info.has_key("Node Kind") or info["Node Kind"] != "directory":
+ error('"%s" is neither a valid URL, nor a working directory' % branch_dir)
+ else:
+ error('"%s" is not a subversion working directory' % branch_dir)
+
+ # give out some hints as to potential pathids
+ PathIdentifier.hint(branch_dir)
+ if source: PathIdentifier.hint(source)
+
+ # Extract the integration info for the branch_dir
+ branch_props = get_merge_props(branch_dir)
+
+ # Calculate source_url and source_path
+ report("calculate source path for the branch")
+ if not source:
+ if str(cmd) == "init":
+ cf_source, cf_rev, copy_committed_in_rev = get_copyfrom(branch_dir)
+ if not cf_source:
+ error('no copyfrom info available. '
+ 'Explicit source argument (-S/--source) required.')
+ opts["source-url"] = get_repo_root(branch_dir) + cf_source
+ opts["source-pathid"] = PathIdentifier.from_target(opts["source-url"])
+
+ if not opts["revision"]:
+ opts["revision"] = "1-" + cf_rev
+ else:
+ opts["source-pathid"] = get_default_source(branch_dir, branch_props)
+ opts["source-url"] = opts["source-pathid"].get_url()
+
+ assert is_pathid(opts["source-pathid"])
+ assert is_url(opts["source-url"])
+ else:
+ # The source was given as a command line argument and is stored in
+ # SOURCE. Ensure that the specified source does not end in a /,
+ # otherwise it's easy to have the same source path listed more
+ # than once in the integrated version properties, with and without
+ # trailing /'s.
+ source = rstrip(source, "/")
+ if not is_wc(source) and not is_url(source):
+ # Check if it is a substring of a pathid recorded
+ # within the branch properties.
+ found = []
+ for pathid in branch_props.keys():
+ if pathid.match_substring(source):
+ found.append(pathid)
+ if len(found) == 1:
+ # (assumes pathid is a repository-relative-path)
+ source_pathid = found[0]
+ source = source_pathid.get_url()
+ else:
+ error('"%s" is neither a valid URL, nor an unambiguous '
+ 'substring of a repository path, nor a working directory'
+ % source)
+ else:
+ source_pathid = PathIdentifier.from_target(source)
+
+ source_pathid = PathIdentifier.from_target(source)
+ if str(cmd) == "init" and \
+ source_pathid == PathIdentifier.from_target("."):
+ error("cannot init integration source path '%s'\n"
+ "Its repository-relative path must differ from the "
+ "repository-relative path of the current directory."
+ % source_pathid)
+ opts["source-pathid"] = source_pathid
+ opts["source-url"] = target_to_url(source)
+
+ # Sanity check source_url
+ assert is_url(opts["source-url"])
+ # SVN does not support non-normalized URL (and we should not
+ # have created them)
+ assert opts["source-url"].find("/..") < 0
+
+ report('source is "%s"' % opts["source-url"])
+
+ # Get previously merged revisions (except when command is init)
+ if str(cmd) != "init":
+ opts["merged-revs"] = merge_props_to_revision_set(branch_props,
+ opts["source-pathid"])
+
+ # Perform the action
+ cmd(branch_dir, branch_props)
+
+
+if __name__ == "__main__":
+ try:
+ main(sys.argv[1:])
+ except LaunchError, (ret, cmd, out):
+ err_msg = "command execution failed (exit code: %d)\n" % ret
+ err_msg += cmd + "\n"
+ err_msg += "".join(out)
+ error(err_msg)
+ except KeyboardInterrupt:
+ # Avoid traceback on CTRL+C
+ print "aborted by user"
+ sys.exit(1)
diff --git a/testing/subversion/svnserve b/testing/subversion/svnserve
new file mode 100755
index 000000000..670fee742
--- /dev/null
+++ b/testing/subversion/svnserve
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/svnserve
+
+PID=`pidof -o %PPID /usr/bin/svnserve`
+case "$1" in
+ start)
+ stat_busy "Starting svnserve"
+ if [ -z "$PID" ]; then
+ if [ -n "$SVNSERVE_USER" ]; then
+ su -s '/bin/sh' $SVNSERVE_USER -c "/usr/bin/svnserve -d $SVNSERVE_ARGS" &
+ else
+ /usr/bin/svnserve -d $SVNSERVE_ARGS &
+ fi
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon svnserve
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping svnserve"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon svnserve
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/subversion/svnserve.conf b/testing/subversion/svnserve.conf
new file mode 100644
index 000000000..37fb7ea10
--- /dev/null
+++ b/testing/subversion/svnserve.conf
@@ -0,0 +1,7 @@
+#
+# Parameters to be passed to svnserve
+#
+#SVNSERVE_ARGS="-r /path/to/some/repos"
+SVNSERVE_ARGS=""
+
+#SVNSERVE_USER="svn"
diff --git a/testing/udev/81-arch.rules b/testing/udev/81-arch.rules
new file mode 100644
index 000000000..cd4e3e9b4
--- /dev/null
+++ b/testing/udev/81-arch.rules
@@ -0,0 +1,83 @@
+# Udev rules for Archlinux by Tobias Powalowski <tpowa@archlinux.org>
+# do not edit this file, it will be overwritten on update
+#
+# There are a number of modifiers that are allowed to be used in some
+# of the different fields. They provide the following subsitutions:
+#
+# %n the "kernel number" of the device.
+# For example, 'sda3' has a "kernel number" of '3'
+# %k the kernel name for the device.
+# %M the kernel major number for the device
+# %m the kernel minor number for the device
+# %b the bus id for the device
+# %c the string returned by the PROGRAM
+# %s{filename} the content of a sysfs attribute.
+# %% the '%' char itself.
+#
+# There are a number of modifiers that are allowed to be used in some of the
+# fields. See the udev man page for a full description of them.
+# global stuff
+#
+
+# permission for sg devices
+KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0660"
+
+# permissions for IDE CD devices
+SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", GROUP="optical"
+
+# permissions for SCSI CD devices
+SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", SYMLINK+="scd%n", GROUP="optical"
+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", GROUP="optical"
+
+# permissions for removable devices like cardreaders or sticks
+KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="0", GROUP="storage"
+
+# permissions for firewire external drives
+KERNEL=="sd*", ATTRS{scsi_level}=="5", GROUP="storage"
+
+# permissions for usb to scsi external adapters
+KERNEL=="sd*", ATTRS{scsi_level}=="3", ATTRS{type}=="7", GROUP="storage"
+
+# permissions for ide storage like pcmcia card readers
+ACTION!="add", GOTO="pcmcia_end"
+SUBSYSTEM!="block", GOTO="pcmcia_end"
+KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
+KERNEL=="hd*", IMPORT{parent}=="ID_*"
+KERNEL=="hd*", ENV{ID_TYPE}=="generic", GROUP="storage"
+LABEL="pcmcia_end"
+
+# permissions for SCSI scanners
+SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="6", GROUP="scanner"
+
+# mem
+KERNEL=="ram0", SYMLINK+="ramdisk"
+KERNEL=="ram1", SYMLINK+="ram"
+
+# video4linux
+
+KERNEL=="vbi0", SYMLINK+="vbi"
+KERNEL=="radio0", SYMLINK+="radio"
+KERNEL=="radio[0-9]*", GROUP="video"
+KERNEL=="video0", SYMLINK+="video"
+KERNEL=="vtx0", SYMLINK+="vtx"
+
+# video devices
+### xorg resets those permissions, adjust your xorg.conf!
+KERNEL=="3dfx*", GROUP="video"
+KERNEL=="fb[0-9]*", GROUP="video"
+
+# misc
+KERNEL=="sgi_fetchop", MODE="0666"
+KERNEL=="sonypi", MODE="0666"
+
+# USB devices
+KERNEL=="legousbtower*", MODE="0666"
+
+# kbd devices
+KERNEL=="kbd", MODE="0664"
+
+# miscellaneous
+KERNEL=="rtc|rtc0", GROUP="audio", MODE="0664"
+#######################################
+# Permissions and Symlinks - end
+#######################################
diff --git a/testing/udev/PKGBUILD b/testing/udev/PKGBUILD
new file mode 100644
index 000000000..b80fd7707
--- /dev/null
+++ b/testing/udev/PKGBUILD
@@ -0,0 +1,101 @@
+# $Id: PKGBUILD 126202 2011-06-02 14:49:12Z tomegun $
+# Maintainer: Aaron Griffin <aaron@archlinux.org>
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+# Maintainer: Tom Gundersen <teg@jklm.no>
+
+pkgbase="udev"
+pkgname=('udev' 'udev-compat')
+pkgver=171
+pkgrel=2
+arch=(i686 x86_64)
+url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
+license=('GPL')
+groups=('base')
+# older initscripts versions required start_udev
+options=(!makeflags !libtool)
+makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
+source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
+ 81-arch.rules
+ static-audio-nodes-group.patch
+ static-nodes-permissions.patch)
+
+build() {
+ cd $srcdir/$pkgbase-$pkgver
+ # fix https://bugs.archlinux.org/task/24362 (will be in udev-172)
+ patch -Np1 -i ../static-audio-nodes-group.patch
+ patch -Np1 -i ../static-nodes-permissions.patch
+ ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\
+ --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\
+ --disable-rule-generator
+ make
+}
+
+package_udev() {
+ pkgdesc="The userspace dev tools (udev)"
+ depends=('glibc' 'coreutils' 'util-linux' 'libusb-compat' 'glib2'
+ 'module-init-tools>=3.11' 'pciutils')
+ install=udev.install
+ backup=(etc/udev/udev.conf
+ etc/modprobe.d/framebuffer_blacklist.conf)
+ conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07')
+ replaces=('devfsd')
+
+ cd $srcdir/$pkgbase-$pkgver
+ make DESTDIR=${pkgdir} install
+ # Install our rule for permissions and symlinks
+ install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
+
+ # create framebuffer blacklist
+ mkdir -p $pkgdir/etc/modprobe.d/
+ for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do
+ echo "blacklist $mod"
+ done | sort -u > $pkgdir/etc/modprobe.d/framebuffer_blacklist.conf
+
+ # create static devices in /lib/udev/devices/
+ mkdir ${pkgdir}/lib/udev/devices/pts
+ mkdir ${pkgdir}/lib/udev/devices/shm
+
+ mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3
+ mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11
+
+ ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd
+ ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin
+ ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout
+ ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr
+ ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core
+
+ # these static devices are created for convenience, to autoload the modules if necessary
+ # /dev/loop0
+ mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0
+ chgrp disk ${pkgdir}/lib/udev/devices/loop0
+ # /dev/net/tun
+ mkdir ${pkgdir}/lib/udev/devices/net
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200
+ # /dev/fuse
+ mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229
+ # /dev/ppp
+ mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0
+
+ # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
+ for i in $pkgdir/lib/udev/rules.d/*.rules; do
+ sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
+ s#GROUP="tape"#GROUP="storage"#g;
+ s#GROUP="cdrom"#GROUP="optical"#g' $i
+ done
+}
+
+package_udev-compat() {
+ pkgdesc="The userspace dev tools (udev) - additional rules for older kernels"
+ depends=('udev')
+ groups=('')
+ cd $srcdir/$pkgbase-$pkgver
+ install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
+}
+md5sums=('bdf4617284be2ecac11767437417e209'
+ '6ee44e3feb8e0f037947e7d4ca273f12'
+ '4f625aea95a5597afd8cdf189421f193'
+ 'f9e50b8dfcd2215f5423ff9bc04ecf68')
diff --git a/testing/udev/static-audio-nodes-group.patch b/testing/udev/static-audio-nodes-group.patch
new file mode 100644
index 000000000..b1fc4f935
--- /dev/null
+++ b/testing/udev/static-audio-nodes-group.patch
@@ -0,0 +1,27 @@
+From 3e227830ad6494700e18ae03297e8fb833ff26bf Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers@vrfy.org>
+Date: Fri, 27 May 2011 02:50:29 +0200
+Subject: [PATCH] rules: apply 'audio' group of the static snd/{seq,timer}
+ nodes
+
+---
+ rules/rules.d/50-udev-default.rules | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
+index cd745ef..cacb533 100644
+--- a/rules/rules.d/50-udev-default.rules
++++ b/rules/rules.d/50-udev-default.rules
+@@ -38,7 +38,8 @@ SUBSYSTEM=="graphics", GROUP="video"
+ SUBSYSTEM=="drm", GROUP="video"
+
+ # sound
+-SUBSYSTEM=="sound", GROUP="audio"
++SUBSYSTEM=="sound", GROUP="audio", \
++ OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer"
+
+ # DVB (video)
+ SUBSYSTEM=="dvb", GROUP="video"
+--
+1.7.5.3
+
diff --git a/testing/udev/static-nodes-permissions.patch b/testing/udev/static-nodes-permissions.patch
new file mode 100644
index 000000000..51e6ad6bc
--- /dev/null
+++ b/testing/udev/static-nodes-permissions.patch
@@ -0,0 +1,57 @@
+From c112873b5bc9ebbae39c32f502bc6211f33546cc Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers@vrfy.org>
+Date: Mon, 30 May 2011 02:12:02 +0200
+Subject: [PATCH 1/2] rules: static_node - use 0660 if group is given to get
+ the cigar
+
+>> On Tue, May 24, 2011 at 15:33, Tom Gundersen <teg@jklm.no> wrote:
+>
+> Close, but no cigar. Looks like the static nodes are not assigned
+> permissions 0660 even if a gid is set (the nodes have perms 0600).
+>
+> Cheers,
+>
+> Tom
+---
+ udev/udev-rules.c | 10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/udev/udev-rules.c b/udev/udev-rules.c
+index 48395e7..56a258d 100644
+--- a/udev/udev-rules.c
++++ b/udev/udev-rules.c
+@@ -2709,8 +2709,9 @@ void udev_rules_apply_static_dev_perms(struct udev_rules *rules)
+ case TK_A_STATIC_NODE: {
+ char filename[UTIL_PATH_SIZE];
+ struct stat stats;
++
+ /* we assure, that the permissions tokens are sorted before the static token */
+- if (mode == 0 && uid == 0 && gid == 0)
++ if (uid == 0 && gid == 0)
+ goto next;
+ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(rules->udev), "/",
+ &rules->buf[cur->key.value_off], NULL);
+@@ -2718,14 +2719,19 @@ void udev_rules_apply_static_dev_perms(struct udev_rules *rules)
+ goto next;
+ if (!S_ISBLK(stats.st_mode) && !S_ISCHR(stats.st_mode))
+ goto next;
+- if (mode != 0 && mode != (stats.st_mode & 0777)) {
++
++ if (mode == 0 && gid > 0)
++ mode = 0660;
++ if (mode != (stats.st_mode & 0777)) {
+ chmod(filename, mode);
+ info(rules->udev, "chmod '%s' %#o\n", filename, mode);
+ }
++
+ if ((uid != 0 && uid != stats.st_uid) || (gid != 0 && gid != stats.st_gid)) {
+ chown(filename, uid, gid);
+ info(rules->udev, "chown '%s' %u %u\n", filename, uid, gid);
+ }
++
+ utimensat(AT_FDCWD, filename, NULL, 0);
+ break;
+ }
+--
+1.7.5.2
+
diff --git a/testing/udev/udev.install b/testing/udev/udev.install
new file mode 100644
index 000000000..5c02dd15b
--- /dev/null
+++ b/testing/udev/udev.install
@@ -0,0 +1,65 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+post_upgrade() {
+ if [ "$(vercmp $2 100)" -lt 0 ]; then
+ echo "ATTENTION UDEV:"
+ echo "----------"
+ echo "udev >=098 rules syntax has changed, please update your own rules."
+ echo "udev >=099 Added persistent network and CD/DVD Symlink generator rules."
+ echo "Please read the instructions carefully before reboot."
+ echo "They are located in /etc/udev/readme-udev-arch.txt"
+ echo "----------"
+ fi
+ if [ "$(vercmp $2 169)" -lt 0 ]; then
+ echo "ATTENTION UDEV:"
+ echo "---------------"
+ echo "Kernel 2.6.32 or newer is now required."
+ echo "OSS emulation modules are not loaded by default, add to rc.conf if needed."
+ echo "Arch specific cd symlinks are now no longer created."
+ echo "cd and net persistent rules will no longer be autogenerated,"
+ echo "see <https://wiki.archlinux.org/index.php/Udev> for details."
+ echo "Errors are now logged (possibly to the console) by default."
+ echo "---------------"
+ fi
+ if [ "$(vercmp $2 172)" -lt 0 ]; then
+ echo "ATTENTION UDEV:"
+ echo "---------------"
+ echo "Arch's custom blacklisting logic has been removed. MOD_AUTOLOAD and"
+ echo "blacklisting in MODULES no longer works."
+ echo "See 'man modprobe.conf' for a replacement to blacklisting."
+ echo "To disable a module mod1 on the kernel command line, use"
+ echo "mod1.disable=1"
+ echo "or"
+ echo "modprobe.blacklist=mod1"
+ echo " --"
+ echo "The following modules are no longer unconditionally loaded:"
+ echo " pcspkr irtty-sir analog lp ppdev ide-generic"
+ echo "Add them to MODULES in rc.conf if you need them."
+ echo "---------------"
+ fi
+}
+
+post_install() {
+ # If a ramfs is mounted, we still need to make sure that /dev/{console,null,zero} exist
+ # The Archlinux installer bind-mounts /dev to /mnt/dev, thus making the real /dev invisible
+ ROOTDIR=""
+ [ "$(stat -c %D /)" != "$(stat -c %D /dev)" ] && ROOTDIR=$(mktemp -d /tmp/udevinstall.XXXXXX)
+ [ -n "${ROOTDIR}" ] && mount --bind / ${ROOTDIR}
+ if [ ! -c ${ROOTDIR}/dev/console ]; then
+ rm -f ${ROOTDIR}/dev/console
+ mknod -m600 ${ROOTDIR}/dev/console c 5 1
+ fi
+ if [ ! -c ${ROOTDIR}/dev/null ]; then
+ rm -f ${ROOTDIR}/dev/null
+ mknod -m644 ${ROOTDIR}/dev/null c 1 3
+ fi
+ if [ ! -c ${ROOTDIR}/dev/zero ]; then
+ rm -f ${ROOTDIR}/dev/zero
+ mknod -m644 ${ROOTDIR}/dev/zero c 1 5
+ fi
+ if [ -n "${ROOTDIR}" ]; then
+ umount ${ROOTDIR}
+ rmdir ${ROOTDIR}
+ fi
+}
diff --git a/testing/yp-tools/PKGBUILD b/testing/yp-tools/PKGBUILD
new file mode 100644
index 000000000..8cf4b6960
--- /dev/null
+++ b/testing/yp-tools/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 126193 2011-06-02 14:34:36Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=yp-tools
+pkgver=2.12
+pkgrel=2
+pkgdesc='Linux NIS Tools'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/yp-tools/'
+license=('GPL2')
+depends=('ypbind-mt')
+source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/$pkgname-$pkgver.tar.gz")
+sha1sums=('10b0ef5d4c5723e0716d7a1431a900c0ba6ef703')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/testing/ypbind-mt/PKGBUILD b/testing/ypbind-mt/PKGBUILD
new file mode 100644
index 000000000..45cf58258
--- /dev/null
+++ b/testing/ypbind-mt/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 126308 2011-06-04 12:37:21Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=ypbind-mt
+pkgver=1.33
+pkgrel=2
+pkgdesc='Linux NIS daemon'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/ypbind-mt/'
+license=('GPL2')
+depends=('rpcbind' 'openslp')
+optdepends=('yp-tools: to set a domain name')
+backup=('etc/yp.conf' 'etc/conf.d/ypbind' 'etc/conf.d/nisdomainname')
+source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/$pkgname-$pkgver.tar.gz"
+ 'nisdomainname.conf'
+ 'ypbind.conf'
+ 'ypbind')
+sha1sums=('49f578d15aa5d4f4130a2e96cd9c0e519263fc88'
+ 'eb00aecc0679e25a36b007e797f4468b40cb3e8e'
+ '07dee386d001fb9e9e6b76dda8af5b2092e5a4a2'
+ '112fc2aedfe3f761325b69647b7938bc1be5bfcd')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --disable-dbus-nm
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -D -m644 etc/yp.conf "$pkgdir"/etc/yp.conf
+ install -D -m755 ../ypbind "$pkgdir"/etc/rc.d/ypbind
+ install -D -m644 ../ypbind.conf "$pkgdir"/etc/conf.d/ypbind
+ install -D -m644 ../nisdomainname.conf "$pkgdir"/etc/conf.d/nisdomainname
+ install -d -m755 "$pkgdir"/var/yp/binding
+}
diff --git a/testing/ypbind-mt/nisdomainname.conf b/testing/ypbind-mt/nisdomainname.conf
new file mode 100644
index 000000000..bbbbf8fc7
--- /dev/null
+++ b/testing/ypbind-mt/nisdomainname.conf
@@ -0,0 +1,4 @@
+#
+# NIS domain to be set in /etc/rc.d/ypbind
+#
+NISDOMAINNAME=""
diff --git a/testing/ypbind-mt/ypbind b/testing/ypbind-mt/ypbind
new file mode 100755
index 000000000..6a5ef11e3
--- /dev/null
+++ b/testing/ypbind-mt/ypbind
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/ypbind
+. /etc/conf.d/nisdomainname
+
+name=ypbind
+PID=$(pidof -o %PPID /usr/sbin/ypbind)
+
+case "$1" in
+start)
+ stat_busy "Starting $name daemon"
+ [[ -n $NISDOMAINNAME ]] && /usr/bin/domainname "$NISDOMAINNAME" &>/dev/null
+ [[ -z "$PID" ]] && /usr/sbin/ypbind $YPBIND_ARGS &>/dev/null \
+ && { add_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+stop)
+ stat_busy "Stopping $name daemon"
+ [[ -n "$PID" ]] && kill $PID &>/dev/null \
+ && { rm_daemon $name; stat_done; } \
+ || { stat_fail; exit 1; }
+ ;;
+restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
diff --git a/testing/ypbind-mt/ypbind.conf b/testing/ypbind-mt/ypbind.conf
new file mode 100644
index 000000000..fd0ebd491
--- /dev/null
+++ b/testing/ypbind-mt/ypbind.conf
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to ypbind
+#
+YPBIND_ARGS=""