summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-07-17 16:14:15 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-07-17 16:14:15 -0300
commit70877cfb7e290449b9f9c660e25345f462576c4c (patch)
tree0f63651432b8448262549265a5420fff1ab665e8 /testing
parent509bf50c73444930b6f57c42678ec22e7de82c88 (diff)
parent412d061bfbf23d1e908eed3f8405b1af46fb1ba8 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/electricsheep/PKGBUILD community-testing/gnash/PKGBUILD community-testing/performous/PKGBUILD community/drbd/PKGBUILD community/oss/PKGBUILD community/pinot/PKGBUILD core/glibc/PKGBUILD core/kmod/PKGBUILD core/pkg-config/PKGBUILD core/systemd/PKGBUILD extra/bitlbee/PKGBUILD extra/mesa/PKGBUILD extra/nettle/PKGBUILD extra/xfce4-netload-plugin/PKGBUILD kde-unstable/kdepim/PKGBUILD multilib/lib32-glibc/PKGBUILD multilib/lib32-mesa/PKGBUILD multilib/lib32-mpg123/PKGBUILD multilib/lib32-nettle/PKGBUILD multilib/lib32-nouveau-dri/PKGBUILD multilib/lib32-pcre/PKGBUILD multilib/lib32-readline/PKGBUILD multilib/zsnes/PKGBUILD multilib/zsnes/zsnes.patch testing/cryptsetup/PKGBUILD testing/ekiga/PKGBUILD testing/iputils/PKGBUILD testing/poppler/PKGBUILD testing/util-linux/PKGBUILD testing/util-linux/util-linux.install
Diffstat (limited to 'testing')
-rw-r--r--testing/akonadi/PKGBUILD32
-rw-r--r--testing/akonadi/akonadi.install11
-rw-r--r--testing/avogadro/PKGBUILD45
-rw-r--r--testing/avogadro/avogadro.install11
-rw-r--r--testing/avogadro/fix-boost.patch33
-rw-r--r--testing/avogadro/fix-opengl-headers.patch53
-rw-r--r--testing/avogadro/replace-qt4_automoc-with-qt4_wrap_cpp.patch778
-rw-r--r--testing/boost/PKGBUILD113
-rw-r--r--testing/coreutils/0001-ls-color-each-symlink-to-relative-name-in-properly.patch135
-rw-r--r--testing/coreutils/PKGBUILD66
-rw-r--r--testing/coreutils/coreutils-pam.patch428
-rw-r--r--testing/coreutils/coreutils.install21
-rw-r--r--testing/coreutils/su.pam9
-rw-r--r--testing/grep/PKGBUILD34
-rw-r--r--testing/grep/grep-2.11-exclude-dir-crash.patch44
-rw-r--r--testing/grep/grep.install21
-rw-r--r--testing/hugin/PKGBUILD39
-rw-r--r--testing/hugin/gcc47.patch11
-rw-r--r--testing/hugin/hugin.install15
-rw-r--r--testing/iputils/iputils-20101006-ping-integer-overflow.patch11
-rw-r--r--testing/kbd/PKGBUILD38
-rw-r--r--testing/kbd/fix-es.po.patch11
-rw-r--r--testing/kdeedu-kig/PKGBUILD34
-rw-r--r--testing/kdeedu-kig/kdeedu-kig.install12
-rw-r--r--testing/kdeedu-rocs/PKGBUILD31
-rw-r--r--testing/libpst/PKGBUILD40
-rw-r--r--testing/libtorrent-rasterbar/PKGBUILD31
-rw-r--r--testing/licq/PKGBUILD40
-rw-r--r--testing/lyx/PKGBUILD50
-rw-r--r--testing/lyx/lyx.desktop14
-rw-r--r--testing/lyx/lyx.install14
-rw-r--r--testing/lyx/lyxrc.dist14
-rw-r--r--testing/mkvtoolnix/PKGBUILD84
-rw-r--r--testing/mkvtoolnix/mkvtoolnix.install14
-rw-r--r--testing/source-highlight/PKGBUILD32
-rw-r--r--testing/source-highlight/source-highlight.install18
-rw-r--r--testing/wpa_actiond/PKGBUILD25
37 files changed, 2412 insertions, 0 deletions
diff --git a/testing/akonadi/PKGBUILD b/testing/akonadi/PKGBUILD
new file mode 100644
index 000000000..f8c8439f1
--- /dev/null
+++ b/testing/akonadi/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 163542 2012-07-15 13:16:21Z ibiru $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=akonadi
+pkgver=1.7.2
+pkgrel=2
+pkgdesc="PIM layer, which provides an asynchronous API to access all kind of PIM data"
+arch=('i686' 'x86_64')
+url='http://pim.kde.org/akonadi'
+license=('LGPL')
+depends=('shared-mime-info' 'boost-libs' 'mysql' 'soprano')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost')
+install="${pkgname}.install"
+source=("http://download.kde.org/stable/${pkgname}/src/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('c73bb835057a3ee07d37a4f7daaf7ecf')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_QSQLITE_IN_QT_PREFIX=TRUE
+ make
+}
+
+package() {
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/akonadi/akonadi.install b/testing/akonadi/akonadi.install
new file mode 100644
index 000000000..7c8a8bd2b
--- /dev/null
+++ b/testing/akonadi/akonadi.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/testing/avogadro/PKGBUILD b/testing/avogadro/PKGBUILD
new file mode 100644
index 000000000..9156d511d
--- /dev/null
+++ b/testing/avogadro/PKGBUILD
@@ -0,0 +1,45 @@
+# $Id: PKGBUILD 163543 2012-07-15 13:16:32Z ibiru $
+# Maintainer:
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
+
+pkgname=avogadro
+pkgver=1.0.3
+pkgrel=6
+pkgdesc="An advanced molecular editor based on Qt"
+arch=('i686' 'x86_64')
+url="http://avogadro.openmolecules.net/wiki/Main_Page"
+license=('GPL2')
+depends=('eigen2' 'openbabel' 'python2-pyqt' 'boost-libs' 'glew' 'python2-numpy')
+makedepends=('cmake' 'boost')
+install=avogadro.install
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'replace-qt4_automoc-with-qt4_wrap_cpp.patch'
+ 'fix-boost.patch'
+ 'fix-opengl-headers.patch')
+md5sums=('92c2702c1980f70fb6d87a1a58147911'
+ 'aec516daab066c15326a9681f8f15abc'
+ '46282e4709429447e44a0a54d51ad2ec'
+ 'f420bfd22e3d5d8fcddc625cf5e711f6')
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ patch -p1 -i "${srcdir}"/replace-qt4_automoc-with-qt4_wrap_cpp.patch
+ patch -p1 -i "${srcdir}"/fix-boost.patch
+ patch -p1 -i "${srcdir}"/fix-opengl-headers.patch
+
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DQT_MKSPECS_RELATIVE=share/qt/mkspecs
+ make
+}
+
+package() {
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/avogadro/avogadro.install b/testing/avogadro/avogadro.install
new file mode 100644
index 000000000..2eaa60550
--- /dev/null
+++ b/testing/avogadro/avogadro.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/testing/avogadro/fix-boost.patch b/testing/avogadro/fix-boost.patch
new file mode 100644
index 000000000..8fb53ef12
--- /dev/null
+++ b/testing/avogadro/fix-boost.patch
@@ -0,0 +1,33 @@
+--- avogadro-1.0.3/libavogadro/src/CMakeLists.txt~ 2011-11-29 18:33:01.777291627 +0000
++++ avogadro-1.0.3/libavogadro/src/CMakeLists.txt 2011-11-29 18:33:23.480814612 +0000
+@@ -149,7 +149,7 @@
+ endforeach(P_ITEM ${PYTHON_SRCS})
+ endif(NOT ENABLE_PYTHON OR NOT ALL_PYTHON_FOUND)
+
+-QT4_WRAP_CPP(libavogadro_MOC_SRCS ${libavogadro_MOC_HDRS})
++QT4_WRAP_CPP(libavogadro_MOC_SRCS ${libavogadro_MOC_HDRS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ # you have to add link_directories before you add the target
+ if(ENABLE_PYTHON AND ALL_PYTHON_FOUND)
+--- avogadro-1.0.3/libavogadro/src/python/CMakeLists.txt~ 2011-11-29 18:37:15.449506548 +0000
++++ avogadro-1.0.3/libavogadro/src/python/CMakeLists.txt 2011-11-29 18:37:52.729831744 +0000
+@@ -11,7 +11,7 @@
+ # use all cpp files in this directory
+ FILE(GLOB wrapper_SRCS "*.cpp")
+
+-QT4_WRAP_CPP(MOC_SRCS moleculelist.h)
++QT4_WRAP_CPP(MOC_SRCS moleculelist.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ ADD_LIBRARY(python-module MODULE ${wrapper_SRCS} ${MOC_SRCS})
+ SET_TARGET_PROPERTIES(python-module PROPERTIES OUTPUT_NAME Avogadro)
+--- avogadro-1.0.3/libavogadro/CMakeLists.txt~ 2011-11-29 19:41:34.066938217 +0000
++++ avogadro-1.0.3/libavogadro/CMakeLists.txt 2011-11-29 19:42:53.084320315 +0000
+@@ -18,7 +18,7 @@
+ # Assume all MOC stuff is in the headers, replace .cpp and use qt4_wrap_cpp
+ # We should probably scan the header to verify the Q_OBJECT macro is used
+ string(REPLACE ".cpp" ".h" hdr_list "${src_list}")
+- qt4_wrap_cpp(moc_files ${hdr_list})
++ qt4_wrap_cpp(moc_files ${hdr_list} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+ # Now sort out the ui and qrc files, process them as appropriate
+ set(ui_plugin_files)
+ set(qrc_plugin_files)
diff --git a/testing/avogadro/fix-opengl-headers.patch b/testing/avogadro/fix-opengl-headers.patch
new file mode 100644
index 000000000..e6e8bc3b5
--- /dev/null
+++ b/testing/avogadro/fix-opengl-headers.patch
@@ -0,0 +1,53 @@
+--- avogadro-1.0.3/libavogadro/src/camera.cpp~ 2012-02-27 18:35:52.109999585 +0000
++++ avogadro-1.0.3/libavogadro/src/camera.cpp 2012-02-27 18:36:27.103053453 +0000
+@@ -25,6 +25,8 @@
+ #include "camera.h"
+ #include "glwidget.h"
+ #include <avogadro/molecule.h>
++#include <Eigen/LU>
++#include <GL/glu.h>
+
+ using namespace Eigen;
+
+--- avogadro-1.0.3/libavogadro/src/glpainter_p.cpp~ 2012-02-27 18:37:28.535894209 +0000
++++ avogadro-1.0.3/libavogadro/src/glpainter_p.cpp 2012-02-27 18:37:46.912413557 +0000
+@@ -42,6 +42,7 @@
+ #include <QColor>
+ #include <QVarLengthArray>
+ #include <Eigen/Geometry>
++#include <GL/glu.h>
+
+ namespace Avogadro
+ {
+--- avogadro-1.0.3/libavogadro/src/glwidget.cpp~ 2012-02-27 18:37:55.099014598 +0000
++++ avogadro-1.0.3/libavogadro/src/glwidget.cpp 2012-02-27 18:38:30.805395066 +0000
+@@ -70,6 +70,8 @@
+
+ #include <openbabel/mol.h>
+
++#include <GL/glu.h>
++
+ using namespace OpenBabel;
+ using namespace Eigen;
+
+--- avogadro-1.0.3/libavogadro/src/extensions/povpainter.cpp~ 2012-02-27 18:36:53.646173944 +0000
++++ avogadro-1.0.3/libavogadro/src/extensions/povpainter.cpp 2012-02-27 18:37:10.739370227 +0000
+@@ -36,6 +36,7 @@
+ #include <QFile>
+ #include <QDebug>
+ #include <Eigen/Geometry>
++#include <GL/glu.h>
+
+ namespace Avogadro
+ {
+--- avogadro-1.0.3/libavogadro/src/tools/selectrotatetool.cpp~ 2012-02-27 18:38:47.491928000 +0000
++++ avogadro-1.0.3/libavogadro/src/tools/selectrotatetool.cpp 2012-02-27 18:39:05.735115136 +0000
+@@ -44,6 +44,8 @@
+ #include <QComboBox>
+ #include <QDebug>
+
++#include <GL/glu.h>
++
+ using namespace std;
+ using namespace OpenBabel;
+ using namespace Eigen;
diff --git a/testing/avogadro/replace-qt4_automoc-with-qt4_wrap_cpp.patch b/testing/avogadro/replace-qt4_automoc-with-qt4_wrap_cpp.patch
new file mode 100644
index 000000000..11f58a505
--- /dev/null
+++ b/testing/avogadro/replace-qt4_automoc-with-qt4_wrap_cpp.patch
@@ -0,0 +1,778 @@
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/CMakeLists.txt avogadro-1.0.3-edit/libavogadro/src/CMakeLists.txt
+--- avogadro-1.0.3/libavogadro/src/CMakeLists.txt 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/CMakeLists.txt 2011-11-29 18:49:58.520790652 +0100
+@@ -75,6 +75,42 @@
+ zmatrix.h
+ )
+
++SET(libavogadro_MOC_HDRS
++ animation.h
++ atom.h
++ bond.h
++ color.h
++ colorbutton.h
++ colors/elementcolor.h
++ cube.h
++ elementdetail_p.h
++ elementtranslator.h
++ engine.h
++ engines/bsdyengine.h
++ extension.h
++ fragment.h
++ glwidget.h
++ mesh.h
++ molecule.h
++ moleculefile.h
++ moleculefile_p.h
++ periodictablescene_p.h
++ periodictableview.h
++ plotwidget.h
++ plugin.h
++ pluginmanager.h
++ primitive.h
++ protein.h
++ pythonengine_p.h
++ pythonerror.h
++ pythonextension_p.h
++ pythontool_p.h
++ residue.h
++ tool.h
++ toolgroup.h
++ zmatrix.h
++)
++
+ set(libavogadro_SRCS ${libavogadro_SRCS} ${libavogadro_UIS})
+ # Also add in the qtiocompressor class
+ #set(libavogadro_SRCS ${libavogadro_SRCS} ../qtiocompressor/qtiocompressor.cpp)
+@@ -113,7 +148,7 @@
+ endforeach(P_ITEM ${PYTHON_SRCS})
+ endif(NOT ENABLE_PYTHON OR NOT ALL_PYTHON_FOUND)
+
+-qt4_automoc(${libavogadro_SRCS})
++QT4_WRAP_CPP(libavogadro_MOC_SRCS ${libavogadro_MOC_HDRS})
+
+ # you have to add link_directories before you add the target
+ if(ENABLE_PYTHON AND ALL_PYTHON_FOUND)
+@@ -149,7 +184,7 @@
+ COMMAND ${CMAKE_COMMAND} -E ${header_cmd} "${from}" "${to}")
+ endforeach(headerFile ${libavogadro_HDRS})
+
+-add_library(avogadro SHARED ${libavogadro_SRCS} ${libavogadro_QM} ${pythontool_RC_SRCS})
++add_library(avogadro SHARED ${libavogadro_SRCS} ${libavogadro_MOC_SRCS} ${libavogadro_QM} ${pythontool_RC_SRCS})
+ set_target_properties(avogadro
+ PROPERTIES VERSION ${Avogadro_VERSION_FULL} SOVERSION 1 )
+ target_link_libraries(avogadro ${AVO_LINK_LIBRARIES})
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/animation.cpp avogadro-1.0.3-edit/libavogadro/src/animation.cpp
+--- avogadro-1.0.3/libavogadro/src/animation.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/animation.cpp 2011-11-29 18:48:47.967839537 +0100
+@@ -224,5 +224,3 @@
+ }
+
+ } // end namespace Avogadro
+-
+-#include "animation.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/atom.cpp avogadro-1.0.3-edit/libavogadro/src/atom.cpp
+--- avogadro-1.0.3/libavogadro/src/atom.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/atom.cpp 2011-11-29 18:48:39.561218412 +0100
+@@ -293,5 +293,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "atom.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/bond.cpp avogadro-1.0.3-edit/libavogadro/src/bond.cpp
+--- avogadro-1.0.3/libavogadro/src/bond.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/bond.cpp 2011-11-29 18:49:00.067773985 +0100
+@@ -166,5 +166,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "bond.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/color.cpp avogadro-1.0.3-edit/libavogadro/src/color.cpp
+--- avogadro-1.0.3/libavogadro/src/color.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/color.cpp 2011-11-29 18:49:05.207746140 +0100
+@@ -152,5 +152,3 @@
+ return "Generic Color";
+ }
+ }
+-
+-#include "color.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/colorbutton.cpp avogadro-1.0.3-edit/libavogadro/src/colorbutton.cpp
+--- avogadro-1.0.3/libavogadro/src/colorbutton.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/colorbutton.cpp 2011-11-29 18:49:11.987709410 +0100
+@@ -94,5 +94,3 @@
+ }
+
+ } // end namespace
+-
+-#include "colorbutton.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/colors/elementcolor.cpp avogadro-1.0.3-edit/libavogadro/src/colors/elementcolor.cpp
+--- avogadro-1.0.3/libavogadro/src/colors/elementcolor.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/colors/elementcolor.cpp 2011-11-29 18:50:11.077389292 +0100
+@@ -63,7 +63,5 @@
+
+ }
+
+-#include "elementcolor.moc"
+ //this is a static color plugin...
+ //Q_EXPORT_PLUGIN2(elementcolor, Avogadro::ElementColorFactory)
+-
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/cube.cpp avogadro-1.0.3-edit/libavogadro/src/cube.cpp
+--- avogadro-1.0.3/libavogadro/src/cube.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/cube.cpp 2011-11-29 18:50:26.357306516 +0100
+@@ -322,5 +322,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "cube.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/elementdetail_p.cpp avogadro-1.0.3-edit/libavogadro/src/elementdetail_p.cpp
+--- avogadro-1.0.3/libavogadro/src/elementdetail_p.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/elementdetail_p.cpp 2011-11-29 18:50:37.680578505 +0100
+@@ -132,5 +132,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "elementdetail_p.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/elementtranslator.cpp avogadro-1.0.3-edit/libavogadro/src/elementtranslator.cpp
+--- avogadro-1.0.3/libavogadro/src/elementtranslator.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/elementtranslator.cpp 2011-11-29 18:50:48.160521729 +0100
+@@ -401,5 +401,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "elementtranslator.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/engine.cpp avogadro-1.0.3-edit/libavogadro/src/engine.cpp
+--- avogadro-1.0.3/libavogadro/src/engine.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/engine.cpp 2011-11-29 18:50:54.397154610 +0100
+@@ -377,5 +377,3 @@
+ return m_molecule->bonds();
+ }
+ }
+-
+-#include "engine.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/engines/bsdyengine.cpp avogadro-1.0.3-edit/libavogadro/src/engines/bsdyengine.cpp
+--- avogadro-1.0.3/libavogadro/src/engines/bsdyengine.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/engines/bsdyengine.cpp 2011-11-29 18:51:18.733689435 +0100
+@@ -442,7 +442,5 @@
+ }
+
+ }
+-
+-#include "bsdyengine.moc"
+ // This is a static engine...
+ // Q_EXPORT_PLUGIN2( bsdyengine, Avogadro::BSDYEngineFactory )
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/extension.cpp avogadro-1.0.3-edit/libavogadro/src/extension.cpp
+--- avogadro-1.0.3/libavogadro/src/extension.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/extension.cpp 2011-11-29 18:51:56.360152261 +0100
+@@ -80,5 +80,3 @@
+ }
+
+ }
+-
+-#include "extension.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/fragment.cpp avogadro-1.0.3-edit/libavogadro/src/fragment.cpp
+--- avogadro-1.0.3/libavogadro/src/fragment.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/fragment.cpp 2011-11-29 18:52:01.906788880 +0100
+@@ -82,5 +82,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "fragment.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/glwidget.cpp avogadro-1.0.3-edit/libavogadro/src/glwidget.cpp
+--- avogadro-1.0.3/libavogadro/src/glwidget.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/glwidget.cpp 2011-11-29 18:52:14.346721486 +0100
+@@ -1966,5 +1966,3 @@
+ d->updateCache = true;
+ }
+ }
+-
+-#include "glwidget.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/mesh.cpp avogadro-1.0.3-edit/libavogadro/src/mesh.cpp
+--- avogadro-1.0.3/libavogadro/src/mesh.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/mesh.cpp 2011-11-29 18:52:23.033341093 +0100
+@@ -231,5 +231,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "mesh.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/molecule.cpp avogadro-1.0.3-edit/libavogadro/src/molecule.cpp
+--- avogadro-1.0.3/libavogadro/src/molecule.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/molecule.cpp 2011-11-29 18:52:33.573283993 +0100
+@@ -1575,5 +1575,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "molecule.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/moleculefile.cpp avogadro-1.0.3-edit/libavogadro/src/moleculefile.cpp
+--- avogadro-1.0.3/libavogadro/src/moleculefile.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/moleculefile.cpp 2011-11-29 18:56:26.728687548 +0100
+@@ -22,23 +22,14 @@
+ 02110-1301, USA.
+ **********************************************************************/
+
+-#include "moleculefile.h"
++#include "moleculefile_p.h"
+
+ #include <avogadro/molecule.h>
+
+-#include <QFile>
+ #include <QFileInfo>
+-#include <QStringList>
+-#include <QThread>
+ #include <QDebug>
+ #include <QPointer>
+
+-#include <openbabel/mol.h>
+-#include <openbabel/obconversion.h>
+-
+-// Included in obconversion.h
+-//#include <iostream>
+-
+ namespace Avogadro {
+
+ using OpenBabel::OBConversion;
+@@ -578,164 +569,6 @@
+ return false;
+ }
+
+- class ReadFileThread : public QThread
+- {
+- // Q_OBJECT
+-
+- public:
+- ReadFileThread(MoleculeFile *moleculeFile) : m_moleculeFile(moleculeFile)
+- {
+- }
+-
+- void addConformer(const OpenBabel::OBMol &conformer)
+- {
+- unsigned int numAtoms = conformer.NumAtoms();
+- std::vector<Eigen::Vector3d> *coords = new std::vector<Eigen::Vector3d>(numAtoms);
+- for (unsigned int i = 0; i < numAtoms; ++i)
+- coords->push_back(Eigen::Vector3d(conformer.GetAtom(i+1)->GetVector().AsArray()));
+- m_moleculeFile->m_conformers.push_back(coords);
+- }
+-
+- void detectConformers(unsigned int c, const OpenBabel::OBMol &first, const OpenBabel::OBMol &current)
+- {
+- if (!c) {
+- // this is the first molecule read
+- m_moleculeFile->setConformerFile(true);
+- addConformer(current);
+- return;
+- }
+-
+- if (!m_moleculeFile->isConformerFile())
+- return;
+-
+- // as long as we are not sure if this really is a
+- // conformer/trajectory file, add the conformers
+- addConformer(current);
+-
+- // performance: check only certain molecule 1-10,20,50
+- switch (c) {
+- case 1:
+- case 2:
+- case 3:
+- case 4:
+- case 5:
+- case 6:
+- case 7:
+- case 8:
+- case 9:
+- case 10:
+- case 20:
+- case 50:
+- break;
+- default:
+- return;
+- }
+-
+- if (first.NumAtoms() != current.NumAtoms()) {
+- m_moleculeFile->setConformerFile(false);
+- m_moleculeFile->m_conformers.clear();
+- return;
+- }
+-
+- for (unsigned int i = 0; i < first.NumAtoms(); ++i) {
+- OpenBabel::OBAtom *firstAtom = first.GetAtom(i+1);
+- OpenBabel::OBAtom *currentAtom = current.GetAtom(i+1);
+- if (firstAtom->GetAtomicNum() != currentAtom->GetAtomicNum()) {
+- m_moleculeFile->setConformerFile(false);
+- m_moleculeFile->m_conformers.clear();
+- return;
+- }
+- }
+- }
+-
+- void run()
+- {
+- // Check that the file can be read from disk
+- if (!MoleculeFile::canOpen(m_moleculeFile->m_fileName, QFile::ReadOnly | QFile::Text)) {
+- // Cannot read the file
+- m_moleculeFile->m_error.append(QObject::tr("File %1 cannot be opened for reading.")
+- .arg(m_moleculeFile->m_fileName));
+- return;
+- }
+-
+- // Construct the OpenBabel objects, set the file type
+- OpenBabel::OBConversion conv;
+- OpenBabel::OBFormat *inFormat;
+- if (!m_moleculeFile->m_fileType.isEmpty() && !conv.SetInFormat(m_moleculeFile->m_fileType.toAscii().data())) {
+- // Input format not supported
+- m_moleculeFile->m_error.append(
+- QObject::tr("File type '%1' is not supported for reading.").arg(m_moleculeFile->m_fileType));
+- return;
+- } else {
+- inFormat = conv.FormatFromExt(m_moleculeFile->m_fileName.toAscii().data());
+- if (!inFormat || !conv.SetInFormat(inFormat)) {
+- // Input format not supported
+- m_moleculeFile->m_error.append(QObject::tr("File type for file '%1' is not supported for reading.")
+- .arg(m_moleculeFile->m_fileName));
+- return;
+- }
+- }
+-
+- // set any options
+- if (!m_moleculeFile->m_fileOptions.isEmpty()) {
+- foreach(const QString &option,
+- m_moleculeFile->m_fileOptions.split('\n', QString::SkipEmptyParts)) {
+- conv.AddOption(option.toAscii().data(), OBConversion::INOPTIONS);
+- }
+- }
+-
+- // Now attempt to read the molecule in
+- ifstream ifs;
+- ifs.open(m_moleculeFile->m_fileName.toLocal8Bit()); // This handles utf8 file names etc
+- if (!ifs) // Should not happen, already checked file could be opened
+- return;
+-
+- // read all molecules
+- OpenBabel::OBMol firstOBMol, currentOBMol;
+- unsigned int c = 0;
+- conv.SetInStream(&ifs);
+- m_moleculeFile->streamposRef().push_back(ifs.tellg());
+- while (ifs.good() && conv.Read(&currentOBMol)) {
+- if (!c)
+- firstOBMol = currentOBMol;
+-
+- if (c > 20 && !m_moleculeFile->isConformerFile())
+- m_moleculeFile->setFirstReady(true);
+-
+- // detect conformer/trajectory files
+- detectConformers(c, firstOBMol, currentOBMol);
+- // store information about molecule
+- m_moleculeFile->streamposRef().push_back(ifs.tellg());
+- m_moleculeFile->titlesRef().append(currentOBMol.GetTitle());
+- // increment count
+- ++c;
+- }
+- m_moleculeFile->streamposRef().pop_back();
+-
+- // signle molecule files are not conformer files
+- if (c == 1) {
+- m_moleculeFile->setConformerFile(false);
+- m_moleculeFile->m_conformers.clear();
+- }
+-
+- // check for empty titles
+- for (int i = 0; i < m_moleculeFile->titlesRef().size(); ++i) {
+- if (!m_moleculeFile->titlesRef()[i].isEmpty())
+- continue;
+-
+- QString title;
+- if (m_moleculeFile->isConformerFile())
+- title = tr("Conformer %1").arg(i+1);
+- else
+- title = tr("Molecule %1").arg(i+1);
+-
+- m_moleculeFile->titlesRef()[i] = title;
+- }
+- }
+-
+- MoleculeFile *m_moleculeFile;
+- }; // end ReadFileThread class
+-
+ MoleculeFile* MoleculeFile::readFile(const QString &fileName,
+ const QString &fileType, const QString &fileOptions, bool wait)
+ {
+@@ -794,6 +627,3 @@
+ }
+
+ } // end namespace Avogadro
+-
+-#include "moleculefile.moc"
+-
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/moleculefile_p.h avogadro-1.0.3-edit/libavogadro/src/moleculefile_p.h
+--- avogadro-1.0.3/libavogadro/src/moleculefile_p.h 1970-01-01 01:00:00.000000000 +0100
++++ avogadro-1.0.3-edit/libavogadro/src/moleculefile_p.h 2011-11-29 18:57:43.108273764 +0100
+@@ -0,0 +1,202 @@
++/**********************************************************************
++ MoleculeFile - Class representing molecule file.
++
++ Copyright (C) 2009 Marcus Hanwell, Tim Vandermeersch
++
++ This file is part of the Avogadro molecular editor project.
++ For more information, see <http://avogadro.openmolecules.net/>
++
++ Avogadro 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.
++
++ Avogadro 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.
++ **********************************************************************/
++
++#ifndef MOLECULEFILE_P_H
++#define MOLECULEFILE_P_H
++
++#include "moleculefile.h"
++
++#include <openbabel/mol.h>
++#include <openbabel/obconversion.h>
++
++#include <QFile>
++#include <QStringList>
++#include <QThread>
++
++namespace Avogadro {
++
++ using OpenBabel::OBConversion;
++ using std::ifstream;
++
++class ReadFileThread : public QThread
++{
++ Q_OBJECT
++
++ public:
++ ReadFileThread(MoleculeFile *moleculeFile) : m_moleculeFile(moleculeFile)
++ {
++ }
++
++ void addConformer(const OpenBabel::OBMol &conformer)
++ {
++ unsigned int numAtoms = conformer.NumAtoms();
++ std::vector<Eigen::Vector3d> *coords = new std::vector<Eigen::Vector3d>(numAtoms);
++ for (unsigned int i = 0; i < numAtoms; ++i)
++ coords->push_back(Eigen::Vector3d(conformer.GetAtom(i+1)->GetVector().AsArray()));
++ m_moleculeFile->m_conformers.push_back(coords);
++ }
++
++ void detectConformers(unsigned int c, const OpenBabel::OBMol &first, const OpenBabel::OBMol &current)
++ {
++ if (!c) {
++ // this is the first molecule read
++ m_moleculeFile->setConformerFile(true);
++ addConformer(current);
++ return;
++ }
++
++ if (!m_moleculeFile->isConformerFile())
++ return;
++
++ // as long as we are not sure if this really is a
++ // conformer/trajectory file, add the conformers
++ addConformer(current);
++
++ // performance: check only certain molecule 1-10,20,50
++ switch (c) {
++ case 1:
++ case 2:
++ case 3:
++ case 4:
++ case 5:
++ case 6:
++ case 7:
++ case 8:
++ case 9:
++ case 10:
++ case 20:
++ case 50:
++ break;
++ default:
++ return;
++ }
++
++ if (first.NumAtoms() != current.NumAtoms()) {
++ m_moleculeFile->setConformerFile(false);
++ m_moleculeFile->m_conformers.clear();
++ return;
++ }
++
++ for (unsigned int i = 0; i < first.NumAtoms(); ++i) {
++ OpenBabel::OBAtom *firstAtom = first.GetAtom(i+1);
++ OpenBabel::OBAtom *currentAtom = current.GetAtom(i+1);
++ if (firstAtom->GetAtomicNum() != currentAtom->GetAtomicNum()) {
++ m_moleculeFile->setConformerFile(false);
++ m_moleculeFile->m_conformers.clear();
++ return;
++ }
++ }
++ }
++
++ void run()
++ {
++ // Check that the file can be read from disk
++ if (!MoleculeFile::canOpen(m_moleculeFile->m_fileName, QFile::ReadOnly | QFile::Text)) {
++ // Cannot read the file
++ m_moleculeFile->m_error.append(QObject::tr("File %1 cannot be opened for reading.")
++ .arg(m_moleculeFile->m_fileName));
++ return;
++ }
++
++ // Construct the OpenBabel objects, set the file type
++ OpenBabel::OBConversion conv;
++ OpenBabel::OBFormat *inFormat;
++ if (!m_moleculeFile->m_fileType.isEmpty() && !conv.SetInFormat(m_moleculeFile->m_fileType.toAscii().data())) {
++ // Input format not supported
++ m_moleculeFile->m_error.append(
++ QObject::tr("File type '%1' is not supported for reading.").arg(m_moleculeFile->m_fileType));
++ return;
++ } else {
++ inFormat = conv.FormatFromExt(m_moleculeFile->m_fileName.toAscii().data());
++ if (!inFormat || !conv.SetInFormat(inFormat)) {
++ // Input format not supported
++ m_moleculeFile->m_error.append(QObject::tr("File type for file '%1' is not supported for reading.")
++ .arg(m_moleculeFile->m_fileName));
++ return;
++ }
++ }
++
++ // set any options
++ if (!m_moleculeFile->m_fileOptions.isEmpty()) {
++ foreach(const QString &option,
++ m_moleculeFile->m_fileOptions.split('\n', QString::SkipEmptyParts)) {
++ conv.AddOption(option.toAscii().data(), OBConversion::INOPTIONS);
++ }
++ }
++
++ // Now attempt to read the molecule in
++ ifstream ifs;
++ ifs.open(m_moleculeFile->m_fileName.toLocal8Bit()); // This handles utf8 file names etc
++ if (!ifs) // Should not happen, already checked file could be opened
++ return;
++
++ // read all molecules
++ OpenBabel::OBMol firstOBMol, currentOBMol;
++ unsigned int c = 0;
++ conv.SetInStream(&ifs);
++ m_moleculeFile->streamposRef().push_back(ifs.tellg());
++ while (ifs.good() && conv.Read(&currentOBMol)) {
++ if (!c)
++ firstOBMol = currentOBMol;
++
++ if (c > 20 && !m_moleculeFile->isConformerFile())
++ m_moleculeFile->setFirstReady(true);
++
++ // detect conformer/trajectory files
++ detectConformers(c, firstOBMol, currentOBMol);
++ // store information about molecule
++ m_moleculeFile->streamposRef().push_back(ifs.tellg());
++ m_moleculeFile->titlesRef().append(currentOBMol.GetTitle());
++ // increment count
++ ++c;
++ }
++ m_moleculeFile->streamposRef().pop_back();
++
++ // signle molecule files are not conformer files
++ if (c == 1) {
++ m_moleculeFile->setConformerFile(false);
++ m_moleculeFile->m_conformers.clear();
++ }
++
++ // check for empty titles
++ for (int i = 0; i < m_moleculeFile->titlesRef().size(); ++i) {
++ if (!m_moleculeFile->titlesRef()[i].isEmpty())
++ continue;
++
++ QString title;
++ if (m_moleculeFile->isConformerFile())
++ title = tr("Conformer %1").arg(i+1);
++ else
++ title = tr("Molecule %1").arg(i+1);
++
++ m_moleculeFile->titlesRef()[i] = title;
++ }
++ }
++
++ MoleculeFile *m_moleculeFile;
++};
++
++} // end namespace Avogadro
++
++#endif // MOLECULEFILE_P_H
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/periodictablescene_p.cpp avogadro-1.0.3-edit/libavogadro/src/periodictablescene_p.cpp
+--- avogadro-1.0.3/libavogadro/src/periodictablescene_p.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/periodictablescene_p.cpp 2011-11-29 18:52:50.259860261 +0100
+@@ -213,5 +213,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "periodictablescene_p.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/periodictableview.cpp avogadro-1.0.3-edit/libavogadro/src/periodictableview.cpp
+--- avogadro-1.0.3/libavogadro/src/periodictableview.cpp 2011-11-29 19:30:25.130970122 +0000
++++ avogadro-1.0.3-edit/libavogadro/src/periodictableview.cpp 2011-11-29 18:52:50.259860261 +0100
+@@ -69,4 +69,3 @@
+
+ } // End namespace Avogadro
+
+-#include "periodictableview.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/plotwidget.cpp avogadro-1.0.3-edit/libavogadro/src/plotwidget.cpp
+--- avogadro-1.0.3/libavogadro/src/plotwidget.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/plotwidget.cpp 2011-11-29 18:53:09.389756626 +0100
+@@ -27,7 +27,6 @@
+ **********************************************************************/
+
+ #include "plotwidget.h"
+-#include "plotwidget.moc"
+
+ #include <math.h>
+ #include <QDebug>
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/plugin.cpp avogadro-1.0.3-edit/libavogadro/src/plugin.cpp
+--- avogadro-1.0.3/libavogadro/src/plugin.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/plugin.cpp 2011-11-29 18:53:16.016387394 +0100
+@@ -65,5 +65,3 @@
+ }
+
+ } // end namespace Avogadro
+-
+-#include "plugin.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/pluginmanager.cpp avogadro-1.0.3-edit/libavogadro/src/pluginmanager.cpp
+--- avogadro-1.0.3/libavogadro/src/pluginmanager.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/pluginmanager.cpp 2011-11-29 18:53:23.569679807 +0100
+@@ -784,5 +784,3 @@
+ }
+
+ }
+-
+-#include "pluginmanager.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/primitive.cpp avogadro-1.0.3-edit/libavogadro/src/primitive.cpp
+--- avogadro-1.0.3/libavogadro/src/primitive.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/primitive.cpp 2011-11-29 18:53:29.139649631 +0100
+@@ -77,5 +77,3 @@
+ }
+
+ }
+-
+-#include "primitive.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/protein.cpp avogadro-1.0.3-edit/libavogadro/src/protein.cpp
+--- avogadro-1.0.3/libavogadro/src/protein.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/protein.cpp 2011-11-29 18:53:37.952935219 +0100
+@@ -978,5 +978,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+-#include "protein.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/python/CMakeLists.txt avogadro-1.0.3-edit/libavogadro/src/python/CMakeLists.txt
+--- avogadro-1.0.3/libavogadro/src/python/CMakeLists.txt 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/python/CMakeLists.txt 2011-11-29 18:58:02.354836165 +0100
+@@ -11,9 +11,9 @@
+ # use all cpp files in this directory
+ FILE(GLOB wrapper_SRCS "*.cpp")
+
+-qt4_automoc(moleculelist.cpp)
++QT4_WRAP_CPP(MOC_SRCS moleculelist.h)
+
+-ADD_LIBRARY(python-module MODULE ${wrapper_SRCS})
++ADD_LIBRARY(python-module MODULE ${wrapper_SRCS} ${MOC_SRCS})
+ SET_TARGET_PROPERTIES(python-module PROPERTIES OUTPUT_NAME Avogadro)
+ SET_TARGET_PROPERTIES(python-module PROPERTIES PREFIX "")
+ if (WIN32)
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/python/moleculelist.cpp avogadro-1.0.3-edit/libavogadro/src/python/moleculelist.cpp
+--- avogadro-1.0.3/libavogadro/src/python/moleculelist.cpp 2011-11-29 19:26:07.562214311 +0100
++++ avogadro-1.0.3-edit/libavogadro/src/python/moleculelist.cpp 2011-11-29 19:26:14.538843182 +0100
+@@ -70,4 +70,3 @@
+
+ }
+
+-#include "moleculelist.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/pythonengine_p.cpp avogadro-1.0.3-edit/libavogadro/src/pythonengine_p.cpp
+--- avogadro-1.0.3/libavogadro/src/pythonengine_p.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/pythonengine_p.cpp 2011-11-29 18:53:45.492894371 +0100
+@@ -289,5 +289,3 @@
+
+
+ }
+-
+-#include "pythonengine_p.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/pythonerror.cpp avogadro-1.0.3-edit/libavogadro/src/pythonerror.cpp
+--- avogadro-1.0.3/libavogadro/src/pythonerror.cpp 2011-11-29 19:24:26.949426045 +0100
++++ avogadro-1.0.3-edit/libavogadro/src/pythonerror.cpp 2011-11-29 19:24:41.176015640 +0100
+@@ -112,4 +112,3 @@
+
+ } // namespace
+
+-#include "pythonerror.moc"
+
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/pythonextension_p.cpp avogadro-1.0.3-edit/libavogadro/src/pythonextension_p.cpp
+--- avogadro-1.0.3/libavogadro/src/pythonextension_p.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/pythonextension_p.cpp 2011-11-29 18:53:54.082847836 +0100
+@@ -340,5 +340,3 @@
+ }
+
+ }
+-
+-#include "pythonextension_p.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/pythontool_p.cpp avogadro-1.0.3-edit/libavogadro/src/pythontool_p.cpp
+--- avogadro-1.0.3/libavogadro/src/pythontool_p.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/pythontool_p.cpp 2011-11-29 18:54:02.269470152 +0100
+@@ -344,5 +344,3 @@
+ }
+
+ }
+-
+-#include "pythontool_p.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/residue.cpp avogadro-1.0.3-edit/libavogadro/src/residue.cpp
+--- avogadro-1.0.3/libavogadro/src/residue.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/residue.cpp 2011-11-29 18:54:14.316071557 +0100
+@@ -160,6 +160,3 @@
+ }
+
+ } // End namespace Avogadro
+-
+- #include "residue.moc"
+-
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/tool.cpp avogadro-1.0.3-edit/libavogadro/src/tool.cpp
+--- avogadro-1.0.3/libavogadro/src/tool.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/tool.cpp 2011-11-29 18:55:05.515794184 +0100
+@@ -117,5 +117,3 @@
+ }
+
+ } // end namespace Avogadro
+-
+-#include "tool.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/toolgroup.cpp avogadro-1.0.3-edit/libavogadro/src/toolgroup.cpp
+--- avogadro-1.0.3/libavogadro/src/toolgroup.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/toolgroup.cpp 2011-11-29 18:55:11.699094018 +0100
+@@ -206,5 +206,3 @@
+ }
+
+ } // end namespace Avogadro
+-
+-#include "toolgroup.moc"
+diff -U 3 -H -d -r -N -- avogadro-1.0.3/libavogadro/src/zmatrix.cpp avogadro-1.0.3-edit/libavogadro/src/zmatrix.cpp
+--- avogadro-1.0.3/libavogadro/src/zmatrix.cpp 2011-04-25 07:22:18.000000000 +0200
++++ avogadro-1.0.3-edit/libavogadro/src/zmatrix.cpp 2011-11-29 18:55:17.209064168 +0100
+@@ -149,5 +149,3 @@
+
+
+ } // End namespace Avogadro
+-
+-#include "zmatrix.moc"
diff --git a/testing/boost/PKGBUILD b/testing/boost/PKGBUILD
new file mode 100644
index 000000000..7176a6a3c
--- /dev/null
+++ b/testing/boost/PKGBUILD
@@ -0,0 +1,113 @@
+# $Id: PKGBUILD 163544 2012-07-15 13:16:35Z 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.50.0
+_boostver=${pkgver//./_}
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://www.boost.org/"
+makedepends=('icu' 'python' 'python2' 'bzip2' 'zlib' 'openmpi')
+source=(http://downloads.sourceforge.net/${pkgbase}/${pkgbase}_${_boostver}.tar.gz)
+license=('custom')
+md5sums=('dbc07ab0254df3dda6300fd737b3f264')
+
+_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
+
+ cd "${srcdir}"/${pkgbase}_${_boostver}
+
+ # build bjam
+ cd "${srcdir}/${pkgbase}_${_boostver}/tools/build/v2/engine"
+ ./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 tools
+ cd "${srcdir}/${pkgbase}_${_boostver}/tools/"
+ "${_stagedir}"/usr/bin/bjam --toolset=gcc
+
+ # copy the tools
+ cd "${srcdir}/${pkgbase}_${_boostver}/dist/bin"
+ for i in *;do
+ install -m755 "${i}" "${_stagedir}/usr/bin/${i}"
+ done
+
+ #boostbook needed by quickbook
+ cd "${srcdir}/${pkgbase}_${_boostver}/dist/"
+ cp -r share "${_stagedir}"
+
+ # build libs
+ cd "${srcdir}/${pkgbase}_${_boostver}"
+
+ # 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
+
+ "${_stagedir}"/usr/bin/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
+}
+
+package_boost() {
+ pkgdesc="Free peer-reviewed portable C++ source libraries - Development"
+ depends=("boost-libs=${pkgver}")
+ optdepends=('python: for python bindings'
+ 'python2: for python2 bindings'
+ 'boost-build: to use boost jam for building your project.')
+
+ install -d "${pkgdir}"/usr/{include,lib,share}
+ # 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/
+
+ #boostbook
+ cp -r "${_stagedir}"/share/* "${pkgdir}"/usr/share
+
+ # 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/testing/coreutils/0001-ls-color-each-symlink-to-relative-name-in-properly.patch b/testing/coreutils/0001-ls-color-each-symlink-to-relative-name-in-properly.patch
new file mode 100644
index 000000000..087b87cdb
--- /dev/null
+++ b/testing/coreutils/0001-ls-color-each-symlink-to-relative-name-in-properly.patch
@@ -0,0 +1,135 @@
+From 6124a3842dfa8484b52e067a8ab8105c3875a4f7 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Thu, 10 May 2012 19:43:00 +0200
+Subject: [PATCH] ls: color each symlink-to-relative-name in / properly
+
+In order for ls --color to color each symlink, it must form the name
+of each referent and then stat it to see if the link is dangling, to
+a directory, to a file, etc. When the symlink is to a relative name,
+ls must concatenate the starting directory name and that relative name.
+When, in addition, the starting directory was "/" or "/some-name",
+the result was ill-formed, and the subsequent stat would usually fail,
+making the caller color it as a dangling symlink.
+* src/ls.c (make_link_name): Don't botch the case in which
+dir_name(NAME) == "/" and LINKNAME is relative.
+* tests/ls/root-rel-symlink-color: New file. Test for the above.
+* tests/Makefile.am (TESTS): Add it.
+* NEWS (Bug fixes): Mention it.
+Reported by Mike Frysinger in http://bugs.gnu.org/11453
+Bug introduced by commit v8.16-23-gbcb9078.
+---
+ NEWS | 5 ++++
+ src/ls.c | 9 +++++++-
+ tests/Makefile.am | 1 +
+ tests/ls/root-rel-symlink-color | 51 +++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 65 insertions(+), 1 deletion(-)
+ create mode 100755 tests/ls/root-rel-symlink-color
+
+diff --git a/NEWS b/NEWS
+index 6c620b3..f9e9c70 100644
+--- a/NEWS
++++ b/NEWS
+@@ -2,6 +2,11 @@ GNU coreutils NEWS -*- outline -*-
+
+ * Noteworthy changes in release ?.? (????-??-??) [?]
+
++** Bug fixes
++
++ ls --color would mis-color relative-named symlinks in /
++ [bug introduced in coreutils-8.17]
++
+
+ * Noteworthy changes in release 8.17 (2012-05-10) [stable]
+
+diff --git a/src/ls.c b/src/ls.c
+index 397e4ea..9494ae9 100644
+--- a/src/ls.c
++++ b/src/ls.c
+@@ -3213,7 +3213,14 @@ make_link_name (char const *name, char const *linkname)
+ return xstrdup (linkname);
+
+ char *p = xmalloc (prefix_len + 1 + strlen (linkname) + 1);
+- stpcpy (stpncpy (p, name, prefix_len + 1), linkname);
++
++ /* PREFIX_LEN usually specifies a string not ending in slash.
++ In that case, extend it by one, since the next byte *is* a slash.
++ Otherwise, the prefix is "/", so leave the length unchanged. */
++ if ( ! ISSLASH (name[prefix_len - 1]))
++ ++prefix_len;
++
++ stpcpy (stpncpy (p, name, prefix_len), linkname);
+ return p;
+ }
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index a4370a6..0bafc5f 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -449,6 +449,7 @@ TESTS = \
+ ls/proc-selinux-segfault \
+ ls/readdir-mountpoint-inode \
+ ls/recursive \
++ ls/root-rel-symlink-color \
+ ls/rt-1 \
+ ls/slink-acl \
+ ls/stat-dtype \
+diff --git a/tests/ls/root-rel-symlink-color b/tests/ls/root-rel-symlink-color
+new file mode 100755
+index 0000000..d795432
+--- /dev/null
++++ b/tests/ls/root-rel-symlink-color
+@@ -0,0 +1,51 @@
++#!/bin/sh
++# Exercise the 8.17 ls bug with coloring relative-named symlinks in "/".
++
++# Copyright (C) 2012 Free Software Foundation, Inc.
++
++# 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 3 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, see <http://www.gnu.org/licenses/>.
++
++. "${srcdir=.}/init.sh"; path_prepend_ ../src
++print_ver_ ls
++
++symlink_to_rel=
++for i in /*; do
++ # Skip non-symlinks:
++ env test -h "$i" || continue
++
++ # Skip dangling symlinks:
++ env test -e "$i" || continue
++
++ # Skip any symlink-to-absolute-name:
++ case $(readlink "$i") in /*) continue ;; esac
++
++ symlink_to_rel=$i
++ break
++done
++
++test -z "$symlink_to_rel" \
++ && skip_ no relative symlink in /
++
++e='\33'
++color_code='01;36'
++c_pre="$e[0m$e[${color_code}m"
++c_post="$e[0m"
++printf "$c_pre$symlink_to_rel$c_post\n" > exp || framework_failure_
++
++env TERM=xterm LS_COLORS="ln=$color_code:or=1;31;42" \
++ ls -d --color=always "$symlink_to_rel" > out || fail=1
++
++compare exp out || fail=1
++
++Exit $fail
+--
+1.7.11.2
+
diff --git a/testing/coreutils/PKGBUILD b/testing/coreutils/PKGBUILD
new file mode 100644
index 000000000..eb27e218c
--- /dev/null
+++ b/testing/coreutils/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 163567 2012-07-16 02:32:53Z dreisner $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=coreutils
+pkgver=8.17
+pkgrel=3
+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' '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{,.sig}
+ coreutils-pam.patch
+ 0001-ls-color-each-symlink-to-relative-name-in-properly.patch
+ su.pam)
+md5sums=('bbda656ce8ca2c6903948f9faa204ba3'
+ 'ebecd29b095aa21b0b2f833f1ec20d70'
+ 'aad79a2aa6d566c375d7bdd1b0767278'
+ 'd7c691898a695a6284a927e6a9426fe4'
+ 'fa85e5cce5d723275b14365ba71a8aad')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # added su wheel group pam patch (from fedora git)
+ patch -Np1 -i ${srcdir}/coreutils-pam.patch
+
+ # fix coloring for symlinks in /
+ # upstream commit 6124a3842dfa8484b52e067a8ab8105c3875a4f7
+ patch -Np1 -i $srcdir/0001-ls-color-each-symlink-to-relative-name-in-properly.patch
+
+ autoreconf -v
+ ./configure --prefix=/usr --libexecdir=/usr/lib/coreutils \
+ --enable-install-program=su \
+ --enable-no-install-program=groups,hostname,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'
+ 'ln' 'ls' 'mkdir' 'mknod' 'mv' 'pwd' 'rm' 'rmdir' 'stty' 'su' 'sync'
+ 'true' 'uname')
+ mv ${_fhs[@]} ${pkgdir}/bin
+
+ 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.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/grep/PKGBUILD b/testing/grep/PKGBUILD
new file mode 100644
index 000000000..0b6547630
--- /dev/null
+++ b/testing/grep/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 163569 2012-07-16 02:50:23Z dreisner $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=grep
+pkgver=2.13
+pkgrel=2
+pkgdesc="A string search utility"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/grep/grep.html"
+groups=('base')
+depends=('glibc' 'pcre' 'sh')
+makedepends=('texinfo')
+install=${pkgname}.install
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+md5sums=('5894d484e6c02249f9702d0d8a472115'
+ '99acaa4d45ab931be2ecba49a1766df7')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --without-included-regex
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/testing/grep/grep-2.11-exclude-dir-crash.patch b/testing/grep/grep-2.11-exclude-dir-crash.patch
new file mode 100644
index 000000000..6b1731768
--- /dev/null
+++ b/testing/grep/grep-2.11-exclude-dir-crash.patch
@@ -0,0 +1,44 @@
+From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Mon, 12 Mar 2012 09:28:01 +0100
+Subject: [PATCH] grep: fix segfault with -r --exclude-dir and no file operand
+
+* src/main.c (grepdir): Don't invoke excluded_file_name on NULL.
+* NEWS (Bug fixes): Mention it.
+---
+ NEWS | 5 +++++
+ src/main.c | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index d0a63d5..d4d70f5 100644
+--- a/NEWS
++++ b/NEWS
+@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*-
+
+ * Noteworthy changes in release ?.? (????-??-??) [?]
+
++** Bug fixes
++
++ grep no longer segfaults with -r --exclude-dir and no file operand.
++ I.e., ":|grep -r --exclude-dir=D PAT" would segfault.
++
+
+ * Noteworthy changes in release 2.11 (2012-03-02) [stable]
+
+diff --git a/src/main.c b/src/main.c
+index 2f6c761..f4f1235 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1361,7 +1361,7 @@ grepdir (char const *dir, struct stats const *stats)
+ struct stats const *ancestor;
+ char *name_space;
+ int status = 1;
+- if (excluded_directory_patterns
++ if (dir && excluded_directory_patterns
+ && excluded_file_name (excluded_directory_patterns, dir))
+ return 1;
+
+--
+1.7.9.3
+
diff --git a/testing/grep/grep.install b/testing/grep/grep.install
new file mode 100644
index 000000000..7cd31301f
--- /dev/null
+++ b/testing/grep/grep.install
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(grep.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ 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
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/testing/hugin/PKGBUILD b/testing/hugin/PKGBUILD
new file mode 100644
index 000000000..4968503cc
--- /dev/null
+++ b/testing/hugin/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 163546 2012-07-15 13:16:50Z ibiru $
+# Maintainer: Tobias Kieslich <tobias@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Dominik Ryba <domryba@post.pl>
+
+pkgname=hugin
+pkgver=2011.4.0
+pkgrel=3
+pkgdesc="A frontend to the panorama-tools"
+arch=('i686' 'x86_64')
+url="http://hugin.sourceforge.net/"
+license=('GPL')
+depends=('wxgtk' 'boost-libs' 'enblend-enfuse' 'exiv2' 'autopano-sift-c'
+ 'lapack' 'desktop-file-utils' 'make' 'perl-image-exiftool')
+makedepends=('zip' 'cmake' 'boost' 'tclap')
+install=hugin.install
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ gcc47.patch)
+sha1sums=('21ec7331d5e196aca2a8771d3c9101dd181ad93b'
+ 'aa0fc9425bd7a4b5e270412f4ca72258fac77298')
+
+build() {
+ cd "${srcdir}"
+ patch -Np0 -i gcc47.patch
+ mkdir build
+ cd build
+ export CXXFLAGS+=" -fpermissive"
+ cmake "${srcdir}/${pkgname}-${pkgver}" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_EXE_LINKER_FLAGS="-lpthread" \
+ -DENABLE_LAPACK=yes
+ make
+}
+
+package(){
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/hugin/gcc47.patch b/testing/hugin/gcc47.patch
new file mode 100644
index 000000000..3814b871c
--- /dev/null
+++ b/testing/hugin/gcc47.patch
@@ -0,0 +1,11 @@
+diff -Nur hugin-2011.4.0.orig/src/celeste/Utilities.cpp hugin-2011.4.0/src/celeste/Utilities.cpp
+--- hugin-2011.4.0.orig/src/celeste/Utilities.cpp 2012-07-08 15:18:16.864454043 +0000
++++ hugin-2011.4.0/src/celeste/Utilities.cpp 2012-07-08 15:18:20.341089422 +0000
+@@ -27,6 +27,7 @@
+
+ #include <math.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include "Utilities.h"
+
+ using namespace std;
diff --git a/testing/hugin/hugin.install b/testing/hugin/hugin.install
new file mode 100644
index 000000000..362749233
--- /dev/null
+++ b/testing/hugin/hugin.install
@@ -0,0 +1,15 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
diff --git a/testing/iputils/iputils-20101006-ping-integer-overflow.patch b/testing/iputils/iputils-20101006-ping-integer-overflow.patch
new file mode 100644
index 000000000..720e5e888
--- /dev/null
+++ b/testing/iputils/iputils-20101006-ping-integer-overflow.patch
@@ -0,0 +1,11 @@
+--- iputils-s20101006/ping_common.c 2010-10-06 13:59:20.000000000 +0200
++++ iputils-s20101006-patched/ping_common.c 2012-03-09 16:42:46.878151032 +0100
+@@ -590,7 +590,7 @@
+
+ /* If we are here, recvmsg() is unable to wait for
+ * required timeout. */
+- if (1000*next <= 1000000/(int)HZ) {
++ if (((uint64_t)1000*next) <= (uint64_t)1000000/(int)HZ) {
+ /* Very short timeout... So, if we wait for
+ * something, we sleep for MININTERVAL.
+ * Otherwise, spin! */
diff --git a/testing/kbd/PKGBUILD b/testing/kbd/PKGBUILD
new file mode 100644
index 000000000..783c6145c
--- /dev/null
+++ b/testing/kbd/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 163565 2012-07-16 01:58:51Z dreisner $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=kbd
+pkgver=1.15.3
+pkgrel=3
+pkgdesc="Keytable files and keyboard utilities"
+arch=('i686' 'x86_64')
+url="ftp://ftp.altlinux.org/pub/people/legion/kbd/"
+license=('GPL')
+depends=('glibc')
+source=(ftp://ftp.altlinux.org/pub/people/legion/kbd/${pkgname}-${pkgver}.tar.gz
+ fix-es.po.patch)
+md5sums=('8143e179a0f3c25646ce5085e8777200'
+ '4ded3edb50fb7a3277bae6a870cee812')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i ../fix-es.po.patch
+ # rename keymap files with the same names
+ # this is needed because when only name of keymap is specified
+ # loadkeys loads the first keymap it can find, which is bad (see FS#13837)
+ # this should be removed when upstream adopts the change
+ mv data/keymaps/i386/qwertz/cz{,-qwertz}.map
+ mv data/keymaps/i386/olpc/es{,-olpc}.map
+ mv data/keymaps/i386/olpc/pt{,-olpc}.map
+ mv data/keymaps/i386/dvorak/no{,-dvorak}.map
+ mv data/keymaps/i386/fgGIod/trf{,-fgGIod}.map
+ mv data/keymaps/i386/colemak/{en-latin9,colemak}.map
+
+ ./configure --prefix=/usr --datadir=/usr/share/kbd --mandir=/usr/share/man
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make KEYCODES_PROGS=yes RESIZECONS_PROGS=yes DESTDIR=${pkgdir} install
+}
diff --git a/testing/kbd/fix-es.po.patch b/testing/kbd/fix-es.po.patch
new file mode 100644
index 000000000..578f0a7b7
--- /dev/null
+++ b/testing/kbd/fix-es.po.patch
@@ -0,0 +1,11 @@
+--- kbd-1.15.3/po/es.old 2011-05-14 23:12:49.000000000 +0200
++++ kbd-1.15.3/po/es.po 2011-05-15 21:07:02.120669404 +0200
+@@ -1363,7 +1363,7 @@
+ #: src/setfont.c:682
+ #, c-format
+ msgid "Saved %d-char %dx%d font file on %s\n"
+-msgstr "Se ha guardado el fichero de tipos %2$dx%3$d de %1$d caracteres en %s\n"
++msgstr "Se ha guardado el fichero de tipos %dx%d de %d caracteres en %s\n"
+
+ #: src/setkeycodes.c:21
+ #, c-format
diff --git a/testing/kdeedu-kig/PKGBUILD b/testing/kdeedu-kig/PKGBUILD
new file mode 100644
index 000000000..18c8ee9e4
--- /dev/null
+++ b/testing/kdeedu-kig/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 163547 2012-07-15 13:16:55Z ibiru $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kig
+pkgver=4.8.4
+pkgrel=2
+pkgdesc="Interactive Geometry"
+url="http://kde.org/applications/education/kig/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/stable/${pkgver}/src/kig-${pkgver}.tar.xz")
+sha1sums=('dcbde5fbb34e0c569a2ef95a328cf69a924cd38e')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kig-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+
+ # Use the python2 executable
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${pkgdir}"/usr/bin/pykig.py
+}
diff --git a/testing/kdeedu-kig/kdeedu-kig.install b/testing/kdeedu-kig/kdeedu-kig.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/testing/kdeedu-kig/kdeedu-kig.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/testing/kdeedu-rocs/PKGBUILD b/testing/kdeedu-rocs/PKGBUILD
new file mode 100644
index 000000000..1a833d930
--- /dev/null
+++ b/testing/kdeedu-rocs/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 163548 2012-07-15 13:16:58Z ibiru $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-rocs
+pkgver=4.8.4
+pkgrel=2
+pkgdesc="Rocs Graph Theory"
+url="http://kde.org/applications/education/rocs/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4' 'boost')
+source=("http://download.kde.org/stable/${pkgver}/src/rocs-${pkgver}.tar.xz")
+sha1sums=('991e5aa15e59cc432a9c9f140fe90bd47f8f8e15')
+options=('!makeflags')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../rocs-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/libpst/PKGBUILD b/testing/libpst/PKGBUILD
new file mode 100644
index 000000000..484181df0
--- /dev/null
+++ b/testing/libpst/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 163549 2012-07-15 13:17:02Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=libpst
+pkgname=('libpst' 'libpst-docs')
+pkgver=0.6.54
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://www.five-ten-sg.com/libpst/"
+license=('GPL')
+makedepends=('python2' 'boost')
+source=(http://www.five-ten-sg.com/libpst/packages/${pkgbase}-${pkgver}.tar.gz)
+sha1sums=('a4713b87e330556acb0786b4efa975a3c739cd84')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --disable-static --enable-libpst-shared --disable-dii PYTHON_VERSION=2
+ make
+}
+
+package_libpst() {
+ pkgdesc="Outlook .pst file converter"
+ depends=('gcc-libs')
+ optdepends=('boost-libs: for libpst python interface')
+ options=('!libtool' '!docs')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
+
+package_libpst-docs() {
+ pkgdesc="Documentation for Outlook .pst file converter"
+ options=('!libtool')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR="${pkgdir}" install-htmlDATA
+ cd "${srcdir}/${pkgbase}-${pkgver}/html"
+ make DESTDIR="${pkgdir}" install-htmldevelDATA
+}
diff --git a/testing/libtorrent-rasterbar/PKGBUILD b/testing/libtorrent-rasterbar/PKGBUILD
new file mode 100644
index 000000000..1144770d1
--- /dev/null
+++ b/testing/libtorrent-rasterbar/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 163550 2012-07-15 13:17:05Z ibiru $
+# Maintainer : Ionut Biru <ibiru@archlinux.org>
+# Contributor: Hugo Doria <hugo@archlinux.org>
+
+pkgname=libtorrent-rasterbar
+pkgver=0.16.1
+pkgrel=1
+epoch=1
+pkgdesc="A C++ library that aims to be a good alternative to all the other bittorrent implementations around"
+url="http://www.rasterbar.com/products/libtorrent/"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('boost-libs' 'geoip' 'python2')
+makedepends=('boost')
+options=('!libtool' '!emptydirs')
+source=(http://libtorrent.googlecode.com/files/$pkgname-$pkgver.tar.gz)
+sha1sums=('798944301ee6ef8e0d8de3d944c59d184ef1a4d3')
+
+build() {
+ cd $pkgname-$pkgver
+ PYTHON2=/usr/bin/python2 ./configure --prefix=/usr \
+ --enable-python-binding \
+ --with-libgeoip=system
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -D COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/testing/licq/PKGBUILD b/testing/licq/PKGBUILD
new file mode 100644
index 000000000..702dbfbcc
--- /dev/null
+++ b/testing/licq/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 163551 2012-07-15 13:17:08Z ibiru $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+
+pkgname=licq
+pkgver=1.6.0
+pkgrel=5
+pkgdesc="Advanced graphical ICQ clone and more for Unix"
+arch=('i686' 'x86_64')
+url="http://www.licq.org"
+license=('GPL')
+depends=('boost-libs' 'gpgme' 'libxss' 'qt')
+makedepends=('cmake' 'boost')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/licq/licq-${pkgver}.tar.bz2)
+md5sums=('383153697e281a0b1b4ff008936731b8')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # licq
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+
+ # qt4-gui
+ cd ../plugins/qt4-gui
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULE_PATH="${srcdir}/${pkgname}-${pkgver}/cmake" ..
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+
+ cd ../plugins/qt4-gui/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/lyx/PKGBUILD b/testing/lyx/PKGBUILD
new file mode 100644
index 000000000..d0f9cfa5d
--- /dev/null
+++ b/testing/lyx/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 163552 2012-07-15 13:17:17Z ibiru $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Jason Chu <jason@archlinux.org>
+
+pkgname=lyx
+pkgver=2.0.3
+pkgrel=4
+pkgdesc="An advanced WYSIWYM document processor & LaTeX front-end"
+arch=('i686' 'x86_64')
+url="http://www.lyx.org"
+depends=('qt' 'texlive-core' 'python2' 'imagemagick' 'enchant' 'boost-libs' 'libmythes')
+makedepends=('boost')
+optdepends=('rcs: built-in version control system'
+ 'texlive-latexextra: float wrap support')
+license=('GPL')
+source=(ftp://ftp.lip6.fr/pub/lyx/stable/2.0.x/$pkgname-$pkgver.tar.xz
+ lyx.desktop lyxrc.dist)
+backup=('etc/lyx/lyxrc.dist')
+install=lyx.install
+options=('emptydirs')
+sha1sums=('109dae0ef22a7d8944964b32ee380ad170b0665f'
+ 'e2b8f6d6cdeec41e1d5795167f5557e4a6ea28ad'
+ '56416642cc3da2a13b87b84e6b87c1a239f3d09a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ find . -type f -exec sed -i 's|#!.*python|#!/usr/bin/env python2|' {} +
+ sed -i 's|"python|"python2|' lib/configure.py src/support/os.cpp
+ export CXXFLAGS="$CXXFLAGS -fpermissive"
+ ./configure --prefix=/usr \
+ --with-frontend=qt4 --without-included-boost \
+ --without-included-mythes
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ # install desktop entry
+ install -Dm644 "${srcdir}/lyx.desktop" \
+ "${pkgdir}/usr/share/applications/lyx.desktop"
+ install -Dm644 "lib/images/lyx.png" \
+ "${pkgdir}/usr/share/pixmaps/lyx.png"
+
+ # install default config file
+ install -Dm644 "${srcdir}/lyxrc.dist" "${pkgdir}/etc/lyx/lyxrc.dist"
+ ln -sf /etc/lyx/lyxrc.dist "${pkgdir}/usr/share/lyx/lyxrc.dist"
+}
diff --git a/testing/lyx/lyx.desktop b/testing/lyx/lyx.desktop
new file mode 100644
index 000000000..649b30c98
--- /dev/null
+++ b/testing/lyx/lyx.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=LyX Document Processor
+GenericName=Document Processor
+Comment=High level LaTeX frontend
+Exec=lyx %F
+TryExec=lyx
+Icon=lyx
+StartupNotify=false
+StartupWMClass=Lyx
+Terminal=false
+Categories=Office;WordProcessor;Qt;
+MimeType=text/x-lyx;application/x-lyx;
diff --git a/testing/lyx/lyx.install b/testing/lyx/lyx.install
new file mode 100644
index 000000000..c15c17b3a
--- /dev/null
+++ b/testing/lyx/lyx.install
@@ -0,0 +1,14 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove () {
+ post_install
+}
+
+
+
diff --git a/testing/lyx/lyxrc.dist b/testing/lyx/lyxrc.dist
new file mode 100644
index 000000000..dd18694f9
--- /dev/null
+++ b/testing/lyx/lyxrc.dist
@@ -0,0 +1,14 @@
+### This file is part of
+### ========================================================
+### LyX, The Document Processor
+###
+### Copyright 1995 Matthias Ettrich
+### Copyright 1995-2011 The LyX Team.
+###
+### ========================================================
+
+# The file lyxrc.dist gives initial global options for all LyX users.
+# Almost all settings here can be overridden through the preferences in LyX.
+
+\thesaurusdir_path "/usr/share/mythes"
+\hunspelldir_path "/usr/share/myspell"
diff --git a/testing/mkvtoolnix/PKGBUILD b/testing/mkvtoolnix/PKGBUILD
new file mode 100644
index 000000000..d8ac0b1f7
--- /dev/null
+++ b/testing/mkvtoolnix/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 163553 2012-07-15 13:17:22Z ibiru $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: xduugu <xduugu@gmx.com>
+
+pkgbase=mkvtoolnix
+pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gtk')
+pkgver=5.7.0
+pkgrel=2
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
+makedepends=('libmatroska' 'flac' 'libvorbis' 'file' 'wxgtk'
+ 'boost-libs' 'lzo2' 'xdg-utils' 'boost' 'ruby')
+source=("http://www.bunkus.org/videotools/${pkgbase}/sources/${pkgbase}-${pkgver}.tar.bz2")
+md5sums=('99ea44be570412dadafe4ccaee0cfe6e')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # Disable automagic curl dep used for online update checking
+ sed -i -e '/curl/d' configure.in
+ export CURL_CFLAGS="" CURL_LIBS=""
+
+ export CFLAGS="${CFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
+ export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
+
+ autoreconf
+
+ ./configure --prefix=/usr \
+ --with-boost-libdir=/usr/lib \
+ --disable-gui
+ rake
+
+ mv src/mkvinfo{,-cli}
+
+ ./configure --prefix=/usr \
+ --with-boost-libdir=/usr/lib
+ rake
+}
+
+package_mkvtoolnix-cli() {
+ pkgdesc="Set of tools to create, edit and inspect Matroska files - CLI version"
+ depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo2')
+ provides=('mkvtoolnix')
+ conflicts=('mkvtoolnix')
+ replaces=('mkvtoolnix')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ rake DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/usr/bin/mkvinfo
+ install -Dm755 src/mkvinfo-cli "${pkgdir}"/usr/bin/mkvinfo
+
+ rm -rf "${pkgdir}"/usr/bin/mmg
+ rm -rf "${pkgdir}"/usr/share/man/ja/man1/mmg.1
+ rm -rf "${pkgdir}"/usr/share/man/man1/mmg.1
+ rm -rf "${pkgdir}"/usr/share/man/nl/man1/mmg.1
+ rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mmg.1
+ rm -rf "${pkgdir}"/usr/share/man/uk/man1/mmg.1
+ rm -rf "${pkgdir}"/usr/share/applications
+ rm -rf "${pkgdir}"/usr/share/icons
+ rm -rf "${pkgdir}"/usr/share/mime
+}
+
+package_mkvtoolnix-gtk() {
+ pkgdesc="Set of tools to create, edit and inspect Matroska files - wxGTK GUI"
+ depends=("mkvtoolnix-cli=${pkgver}" 'wxgtk' 'xdg-utils')
+ install=mkvtoolnix.install
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ rake DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/usr/bin/mkv*
+ install -Dm755 src/mkvinfo "${pkgdir}"/usr/bin/mkvinfo-gtk
+ sed -ri 's/^(Exec=mkvinfo)/\1-gtk/' "${pkgdir}"/usr/share/applications/mkvinfo.desktop
+
+ rm -rf "${pkgdir}"/usr/share/doc
+ rm -rf "${pkgdir}"/usr/share/locale
+ rm -rf "${pkgdir}"/usr/share/man/ja/man1/mkv*
+ rm -rf "${pkgdir}"/usr/share/man/man1/mkv*
+ rm -rf "${pkgdir}"/usr/share/man/nl/man1/mkv*
+ rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mkv*
+ rm -rf "${pkgdir}"/usr/share/man/uk/man1/mkv*
+}
diff --git a/testing/mkvtoolnix/mkvtoolnix.install b/testing/mkvtoolnix/mkvtoolnix.install
new file mode 100644
index 000000000..74d9eb2ef
--- /dev/null
+++ b/testing/mkvtoolnix/mkvtoolnix.install
@@ -0,0 +1,14 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ if [ -f usr/bin/update-mime-database ]; then
+ update-mime-database usr/share/mime &> /dev/null
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ post_install
+}
diff --git a/testing/source-highlight/PKGBUILD b/testing/source-highlight/PKGBUILD
new file mode 100644
index 000000000..d462c7fa0
--- /dev/null
+++ b/testing/source-highlight/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 163554 2012-07-15 13:17:27Z ibiru $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=source-highlight
+pkgver=3.1.7
+pkgrel=2
+pkgdesc="Convert source code to syntax highlighted document"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/src-highlite/"
+license=('GPL')
+depends=('bash' 'boost-libs')
+makedepends=('ctags' 'boost')
+options=('!libtool')
+install=$pkgname.install
+source=("ftp://ftp.gnu.org/gnu/src-highlite/${pkgname}-${pkgver}.tar.gz")
+md5sums=('0ff81588d3536b4c4e571122ba940595')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-bash-completion=${pkgdir}/usr/share/bash-completion/completions
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make prefix="${pkgdir}/usr" install
+}
diff --git a/testing/source-highlight/source-highlight.install b/testing/source-highlight/source-highlight.install
new file mode 100644
index 000000000..4fd1b3005
--- /dev/null
+++ b/testing/source-highlight/source-highlight.install
@@ -0,0 +1,18 @@
+info_dir=usr/share/info
+info_files=(source-highlight.info source-highlight-lib.info)
+
+post_install() {
+ for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
diff --git a/testing/wpa_actiond/PKGBUILD b/testing/wpa_actiond/PKGBUILD
new file mode 100644
index 000000000..3e3642442
--- /dev/null
+++ b/testing/wpa_actiond/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 163526 2012-07-14 13:40:29Z thomas $
+# Maintainer: Thomas Bächler <thomas@archlinux.org>
+pkgname=wpa_actiond
+pkgver=1.3
+pkgrel=1
+pkgdesc="Daemon that connects to wpa_supplicant and handles connect and disconnect events"
+arch=('i686' 'x86_64')
+url="http://projects.archlinux.org/wpa_actiond.git/"
+license=('GPL')
+depends=('glibc' 'wpa_supplicant')
+source=(ftp://ftp.archlinux.org/other/wpa_actiond/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('4523b76980198666ac93f3a3772a10554ef608e6a18ab9eb1346303ee3a6f4b1')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m755 wpa_actiond "${pkgdir}/usr/sbin/wpa_actiond"
+}
+# vim:set ts=2 sw=2 et: