summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2011-12-10 10:15:38 +0000
committerFabian Affolter <fabian@affolter-engineering.ch>2011-12-10 10:15:38 +0000
commitca512d5d5d8df5cbacfb9e0b1cdc1f45ae89149b (patch)
tree38834d5f27c903ae902e897550053b499c26151d /testing
parent51f554c054599d345525bd9d816eb3009fb80cc4 (diff)
parent4fb67906a83bf64c28da07340367614cc32d0245 (diff)
downloadaports-ca512d5d5d8df5cbacfb9e0b1cdc1f45ae89149b.tar.bz2
aports-ca512d5d5d8df5cbacfb9e0b1cdc1f45ae89149b.tar.xz
Merge branch 'master' of git://git.alpinelinux.org/aports
Diffstat (limited to 'testing')
-rw-r--r--testing/aalib/APKBUILD35
-rw-r--r--testing/acf-fetch-crl/APKBUILD22
-rw-r--r--testing/agg/APKBUILD43
-rw-r--r--testing/agg/agg-2.4-depends.patch48
-rw-r--r--testing/agg/agg-2.5-pkgconfig.patch10
-rw-r--r--testing/akonadi/APKBUILD42
-rw-r--r--testing/akonadi/disable-backtrace.patch11
-rw-r--r--testing/apache-mod-auth-kerb/APKBUILD45
-rw-r--r--testing/apache-mod-auth-kerb/mod-auth-kerb.conf26
-rw-r--r--testing/apache-mod-auth-kerb/mod_auth_kerb.patch11
-rw-r--r--testing/apache-mod-backtrace/APKBUILD32
-rw-r--r--testing/apache-mod-backtrace/Makefile.in35
-rw-r--r--testing/apache-mod-backtrace/configure.in46
-rw-r--r--testing/apache2-mod-perl/APKBUILD58
-rw-r--r--testing/apache2-mod-perl/apache2-mod-perl.apache2.conf11
-rw-r--r--testing/apache2-mod-perl/apache2-mod-perl.post-install10
-rw-r--r--testing/apache2-mod-wsgi/APKBUILD51
-rw-r--r--testing/apache2-mod-wsgi/apache2-mod-wsgi.apache2.conf1
-rw-r--r--testing/apache2-mod-wsgi/apache2-mod-wsgi.post-install10
-rw-r--r--testing/apts/APKBUILD37
-rw-r--r--testing/arping/APKBUILD38
-rw-r--r--testing/array-info/APKBUILD27
-rw-r--r--testing/array-info/array-info-makefile.patch20
-rw-r--r--testing/asterisk/100-uclibc-daemon.patch44
-rw-r--r--testing/asterisk/101-caps-uclibc.patch17
-rw-r--r--testing/asterisk/102-gsm-pic.patch54
-rw-r--r--testing/asterisk/400-bug-227.patch15
-rw-r--r--testing/asterisk/APKBUILD176
-rw-r--r--testing/asterisk/ASTERISK-18976.patch142
-rw-r--r--testing/asterisk/ASTERISK-18977.patch63
-rw-r--r--testing/asterisk/ASTERISK-18994.patch28
-rw-r--r--testing/asterisk/ASTERISK-18995.patch358
-rw-r--r--testing/asterisk/asterisk.confd91
-rw-r--r--testing/asterisk/asterisk.initd251
-rw-r--r--testing/asterisk/asterisk.logrotate17
-rw-r--r--testing/asterisk/asterisk.post-install11
-rw-r--r--testing/asterisk/asterisk.pre-install12
-rw-r--r--testing/asterisk/asterisk.pre-upgrade12
-rw-r--r--testing/asunder/APKBUILD40
-rw-r--r--testing/attica/APKBUILD40
-rw-r--r--testing/audacity/APKBUILD48
-rw-r--r--testing/automoc4/APKBUILD40
-rw-r--r--testing/awesome/0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch587
-rw-r--r--testing/awesome/APKBUILD45
-rw-r--r--testing/bash-completion/APKBUILD40
-rw-r--r--testing/bcfg2/APK.py58
-rw-r--r--testing/bcfg2/APKBUILD41
-rw-r--r--testing/bcfg2/bcfg2-server.initd23
-rw-r--r--testing/blists/APKBUILD38
-rw-r--r--testing/boost-coroutine/APKBUILD38
-rw-r--r--testing/boost-coroutine/boost-coroutine-pth.patch19
-rw-r--r--testing/btrfs-progs/APKBUILD34
-rw-r--r--testing/burp/APKBUILD47
-rw-r--r--testing/calibre/APKBUILD58
-rw-r--r--testing/calibre/calibre.confd6
-rw-r--r--testing/calibre/calibre.initd17
-rw-r--r--testing/cdparanoia/APKBUILD60
-rw-r--r--testing/celt/APKBUILD44
-rw-r--r--testing/cherokee/APKBUILD46
-rw-r--r--testing/cherokee/cherokee.confd10
-rwxr-xr-xtesting/cherokee/cherokee.initd41
-rw-r--r--testing/chmlib/APKBUILD29
-rw-r--r--testing/chromium/APKBUILD183
-rw-r--r--testing/chromium/chromium-breakpad.patch11
-rw-r--r--testing/chromium/chromium-c99math.patch11
-rw-r--r--testing/chromium/chromium-dlfcn.patch10
-rw-r--r--testing/chromium/chromium-futimens.patch22
-rw-r--r--testing/chromium/chromium-malloc.patch19
-rw-r--r--testing/chromium/chromium-no-mit-screensaver.patch91
-rw-r--r--testing/chromium/chromium-stdstring.patch15
-rw-r--r--testing/chromium/chromium-uclibc-resolv.patch88
-rw-r--r--testing/chromium/chromium-webrtc.patch10
-rw-r--r--testing/chromium/chromium-yasm.patch10
-rw-r--r--testing/cifs-utils/APKBUILD41
-rw-r--r--testing/clapf/APKBUILD70
-rw-r--r--testing/clapf/clapf.confd4
-rw-r--r--testing/clapf/clapf.initd23
-rw-r--r--testing/clapf/clapf.pre-install3
-rw-r--r--testing/cluster-glue/1.0.7-fix_configure.patch13
-rw-r--r--testing/cluster-glue/APKBUILD65
-rw-r--r--testing/cluster-glue/cluster-glue.post-install7
-rw-r--r--testing/cluster-glue/cluster-glue.pre-install11
-rw-r--r--testing/cluster-glue/ha_logd.initd46
-rw-r--r--testing/clutter/APKBUILD41
-rw-r--r--testing/compiz/APKBUILD55
-rw-r--r--testing/corosync/APKBUILD64
-rw-r--r--testing/corosync/corosync.initd23
-rw-r--r--testing/crosstool-ng/APKBUILD36
-rw-r--r--testing/csync2/01-csync2-sqlite3.patch518
-rw-r--r--testing/csync2/02-csync2-1.34-gnutls_pkgconfig.patch24
-rw-r--r--testing/csync2/APKBUILD45
-rw-r--r--testing/cvechecker/APKBUILD31
-rw-r--r--testing/d-feet/APKBUILD37
-rw-r--r--testing/daemontools/0.76-errno.patch11
-rw-r--r--testing/daemontools/0.76-warnings.patch74
-rw-r--r--testing/daemontools/APKBUILD49
-rw-r--r--testing/daemontools/svscan.initd33
-rw-r--r--testing/dbmail/APKBUILD94
-rw-r--r--testing/dbmail/dbmail-httpd.initd39
-rw-r--r--testing/dbmail/dbmail-imapd.initd39
-rw-r--r--testing/dbmail/dbmail-lmtpd.initd40
-rw-r--r--testing/dbmail/dbmail-pop3d.initd39
-rw-r--r--testing/dbmail/dbmail-timsieved.initd38
-rw-r--r--testing/dbmail/dbmail.conf408
-rw-r--r--testing/dbmail/dbmail.pre-install5
-rw-r--r--testing/dbmail/post-rc3.patch635
-rw-r--r--testing/dc3dd/APKBUILD46
-rw-r--r--testing/ddrescue/APKBUILD42
-rw-r--r--testing/deadbeef/APKBUILD44
-rw-r--r--testing/deadbeef/deadbeef-junklib.patch10
-rw-r--r--testing/dnsenum/APKBUILD28
-rw-r--r--testing/drbd/APKBUILD59
-rw-r--r--testing/drbd/drbd.initd158
-rw-r--r--testing/drizzle/APKBUILD67
-rw-r--r--testing/drizzle/drizzle.initd29
-rw-r--r--testing/drizzle/drizzle.post-install2
-rw-r--r--testing/dspam/APKBUILD77
-rw-r--r--testing/dspam/dspam.initd46
-rw-r--r--testing/dspam/dspam.logrotate6
-rw-r--r--testing/dspam/dspam.pre-install6
-rw-r--r--testing/e_dbus/APKBUILD45
-rw-r--r--testing/ecasound/APKBUILD46
-rw-r--r--testing/ecore/APKBUILD45
-rw-r--r--testing/edje/APKBUILD41
-rw-r--r--testing/eet/APKBUILD41
-rw-r--r--testing/eeze/APKBUILD45
-rw-r--r--testing/efreet/APKBUILD45
-rw-r--r--testing/eina/APKBUILD42
-rw-r--r--testing/elementary-gtk-theme/APKBUILD41
-rw-r--r--testing/elementary-icon-theme/APKBUILD42
-rw-r--r--testing/emacs/APKBUILD45
-rw-r--r--testing/embryo/APKBUILD45
-rw-r--r--testing/empty/APKBUILD32
-rw-r--r--testing/erlang/APKBUILD70
-rw-r--r--testing/erlang/otp-0004-Do-not-install-C-sources.patch168
-rw-r--r--testing/etherdump/APKBUILD28
-rw-r--r--testing/etracer/APKBUILD42
-rw-r--r--testing/etracer/etracer-finite.patch11
-rw-r--r--testing/etracer/etracer-png.patch38
-rw-r--r--testing/evas/APKBUILD43
-rw-r--r--testing/evilwm/APKBUILD39
-rw-r--r--testing/evolution-data-server/APKBUILD46
-rw-r--r--testing/evolution/APKBUILD49
-rw-r--r--testing/evolution/evolution.post-install18
-rw-r--r--testing/evolution/evolution.post-upgrade18
-rw-r--r--testing/evolution/evolution.pre-deinstall18
-rw-r--r--testing/exim/APKBUILD83
-rw-r--r--testing/exim/aliases35
-rw-r--r--testing/exim/exim.Makefile1227
-rw-r--r--testing/exim/exim.confd2
-rw-r--r--testing/exim/exim.initd30
-rw-r--r--testing/exim/exim.logrotate13
-rw-r--r--testing/expect/APKBUILD33
-rw-r--r--testing/fabric/APKBUILD29
-rw-r--r--testing/faenza-icon-theme/APKBUILD41
-rw-r--r--testing/fatback/APKBUILD32
-rw-r--r--testing/fetch-crl/APKBUILD36
-rw-r--r--testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch41
-rw-r--r--testing/flawfinder/APKBUILD40
-rw-r--r--testing/foomatic-db-engine/APKBUILD42
-rw-r--r--testing/foomatic-filters/APKBUILD42
-rw-r--r--testing/fossil/APKBUILD27
-rw-r--r--testing/fotoxx/APKBUILD40
-rw-r--r--testing/fotoxx/no-execinfo.patch34
-rw-r--r--testing/freealut/APKBUILD45
-rw-r--r--testing/freeciv/APKBUILD56
-rw-r--r--testing/freeswitch-sounds-es-mx-maria-44100/APKBUILD27
-rw-r--r--testing/freeswitch-sounds-fr-fr-sibylle-8000/APKBUILD28
-rw-r--r--testing/freeswitch-sounds-music-8000/APKBUILD28
-rw-r--r--testing/freetype-infinality/APKBUILD56
-rw-r--r--testing/freetype-infinality/freetype-2.2.1-enable-valid.patch20
-rw-r--r--testing/freetype-infinality/freetype-add-subpixel-hinting-infinality-20101114-1.patch2776
-rw-r--r--testing/freetype-infinality/freetype-enable-subpixel-hinting-infinality-20100909-1.patch29
-rw-r--r--testing/freetype-infinality/freetype-entire-infinality-patchset-20101114-1.patch1602
-rw-r--r--testing/freetype-infinality/freetype2-infinality-protect_null_pointer-goddesse.patch71
-rw-r--r--testing/freetype-infinality/infinality-settings230
-rw-r--r--testing/ftgl/APKBUILD41
-rw-r--r--testing/geany-plugins/APKBUILD97
-rw-r--r--testing/giggle/APKBUILD44
-rw-r--r--testing/gitolite/APKBUILD47
-rw-r--r--testing/gitolite/configuration.patch27
-rw-r--r--testing/gjs/APKBUILD41
-rw-r--r--testing/gmime/APKBUILD41
-rw-r--r--testing/gnash/APKBUILD69
-rw-r--r--testing/gnash/gnash-ffmpeg.patch24
-rw-r--r--testing/gnump3d/APKBUILD30
-rw-r--r--testing/gnump3d/gnump3d.confd6
-rw-r--r--testing/gnump3d/gnump3d.initd37
-rw-r--r--testing/gource/APKBUILD29
-rw-r--r--testing/gpgme/APKBUILD45
-rw-r--r--testing/graphviz/0001-clone-nameclash.patch87
-rw-r--r--testing/graphviz/APKBUILD101
-rw-r--r--testing/gssdp/APKBUILD48
-rw-r--r--testing/gssdp/gssdp-fixdso.patch11
-rw-r--r--testing/gtk-equinox-engine/APKBUILD47
-rw-r--r--testing/gtk-murrine-engine/APKBUILD40
-rw-r--r--testing/gtk-qt-engine/APKBUILD42
-rw-r--r--testing/gtk-qt-engine/stdlib.patch10
-rw-r--r--testing/gtkhtml/APKBUILD45
-rw-r--r--testing/gtkimageview/APKBUILD41
-rw-r--r--testing/gupnp/APKBUILD46
-rw-r--r--testing/guvcview/APKBUILD44
-rw-r--r--testing/hardinfo/APKBUILD44
-rw-r--r--testing/hardinfo/fixsensors.patch13
-rw-r--r--testing/hardinfo/hardinfo-alpine.patch10
-rw-r--r--testing/hardinfo/uclibc.patch22
-rw-r--r--testing/haveged/APKBUILD51
-rw-r--r--testing/haveged/haveged.confd5
-rw-r--r--testing/haveged/haveged.initd18
-rw-r--r--testing/hdparm/APKBUILD39
-rw-r--r--testing/hessling-editor/APKBUILD41
-rw-r--r--testing/hexcurse/APKBUILD46
-rw-r--r--testing/hexcurse/hexcurse-alloca.patch14
-rw-r--r--testing/hping3/APKBUILD49
-rw-r--r--testing/hping3/hping3-bytesex.patch23
-rw-r--r--testing/html2ps/APKBUILD32
-rw-r--r--testing/html2ps/html2ps-conf.patch11
-rw-r--r--testing/httpry/APKBUILD29
-rw-r--r--testing/hydrogen/APKBUILD53
-rw-r--r--testing/hydrogen/hydrogen-docdir.patch11
-rw-r--r--testing/ices/APKBUILD33
-rw-r--r--testing/ices2/APKBUILD34
-rw-r--r--testing/ifupdown/APKBUILD42
-rw-r--r--testing/ifupdown/ifupdown-alpine-ifstate.patch13
-rw-r--r--testing/ifupdown/ifupdown-busybox-compat.patch38
-rw-r--r--testing/ifupdown/ifupdown.post-deinstall3
-rw-r--r--testing/ifupdown/ifupdown.post-upgrade3
-rw-r--r--testing/imagination/APKBUILD45
-rw-r--r--testing/imake/APKBUILD40
-rw-r--r--testing/imapproxy/APKBUILD42
-rw-r--r--testing/inotify-tools/APKBUILD39
-rw-r--r--testing/iotop/APKBUILD38
-rw-r--r--testing/ipgrab/APKBUILD34
-rw-r--r--testing/iproute2/0001-xfrm-mark.patch401
-rw-r--r--testing/iproute2/2.patch363
-rw-r--r--testing/iproute2/APKBUILD38
-rw-r--r--testing/iproute2/iproute2.post-deinstall4
-rw-r--r--testing/iproute2/iproute2.post-install6
-rw-r--r--testing/irrlicht/APKBUILD77
-rw-r--r--testing/ivtv-utils/APKBUILD32
-rw-r--r--testing/jbig2dec/APKBUILD45
-rw-r--r--testing/jsoncpp/APKBUILD45
-rw-r--r--testing/kbd/APKBUILD97
-rw-r--r--testing/kbd/kbd-1.15-resizecon-x86_64.patch11
-rw-r--r--testing/kbd/kbd-1.15.3-loadkeys-d.patch20
-rw-r--r--testing/kde4-base/APKBUILD20
-rw-r--r--testing/kdeadmin/APKBUILD40
-rw-r--r--testing/kdeartwork/APKBUILD41
-rw-r--r--testing/kdebase-runtime/APKBUILD41
-rw-r--r--testing/kdebase-workspace/APKBUILD42
-rw-r--r--testing/kdebase/APKBUILD40
-rw-r--r--testing/kdegraphics/APKBUILD40
-rw-r--r--testing/kdelibs/APKBUILD52
-rw-r--r--testing/kdelibs/kdelibs-madvise.patch22
-rw-r--r--testing/kdelibs/kdelibs-skipname.patch60
-rw-r--r--testing/kdemultimedia/APKBUILD40
-rw-r--r--testing/kdenetwork/APKBUILD40
-rw-r--r--testing/kdepimlibs/APKBUILD41
-rw-r--r--testing/kdesdk/APKBUILD42
-rw-r--r--testing/kdesdk/not-glibc.patch12
-rw-r--r--testing/keepalived/APKBUILD62
-rw-r--r--testing/keepalived/keepalived-1.1.20-ipvs_haeader_check.patch68
-rw-r--r--testing/keepalived/keepalived.confd7
-rwxr-xr-xtesting/keepalived/keepalived.initd25
-rw-r--r--testing/kismet/APKBUILD35
-rw-r--r--testing/kismet/kismet.post-install3
-rw-r--r--testing/kismet/kismet.pre-install2
-rw-r--r--testing/libamz/APKBUILD39
-rw-r--r--testing/libburn/APKBUILD33
-rw-r--r--testing/libc6/APKBUILD117
-rw-r--r--testing/libc6/nscd.initd18
-rw-r--r--testing/libdbusmenu-qt/APKBUILD40
-rw-r--r--testing/libdlna/APKBUILD35
-rw-r--r--testing/libdlna/Makefile.patched64
-rw-r--r--testing/libewf/APKBUILD43
-rw-r--r--testing/libfetch/APKBUILD30
-rw-r--r--testing/libfetch/Makefile93
-rw-r--r--testing/libgdata/APKBUILD43
-rw-r--r--testing/libiodbc/APKBUILD45
-rw-r--r--testing/libisofs/APKBUILD30
-rw-r--r--testing/libmnl/APKBUILD28
-rw-r--r--testing/libmp3splt/APKBUILD44
-rw-r--r--testing/libnetfilter_log/APKBUILD30
-rw-r--r--testing/liboping/APKBUILD37
-rw-r--r--testing/libplist/APKBUILD48
-rw-r--r--testing/libprojectm/APKBUILD43
-rw-r--r--testing/libprojectm/projectm-isnan.patch20
-rw-r--r--testing/libquvi-scripts/APKBUILD41
-rw-r--r--testing/libquvi/APKBUILD41
-rw-r--r--testing/libsieve/APKBUILD45
-rw-r--r--testing/libsyncml/APKBUILD33
-rw-r--r--testing/libuniso/APKBUILD47
-rw-r--r--testing/libupnp/APKBUILD29
-rw-r--r--testing/liburiparser/APKBUILD39
-rw-r--r--testing/libwbxml/APKBUILD34
-rw-r--r--testing/libwmf/APKBUILD37
-rw-r--r--testing/libwmf/libpng14.patch12
-rw-r--r--testing/libxdg-basedir/APKBUILD41
-rw-r--r--testing/libyaml/APKBUILD46
-rw-r--r--testing/libzdb/APKBUILD45
-rw-r--r--testing/lightdm/APKBUILD60
-rw-r--r--testing/lightdm/disallow-guest.patch22
-rw-r--r--testing/lightdm/lightdm-x11-configure.patch122
-rwxr-xr-xtesting/lightdm/lightdm.initd11
-rw-r--r--testing/lightdm/lightdm.pre-install6
-rw-r--r--testing/linux-pam/APKBUILD77
-rw-r--r--testing/linux-pam/base-account.pamd3
-rw-r--r--testing/linux-pam/base-auth.pamd5
-rw-r--r--testing/linux-pam/base-password.pamd3
-rw-r--r--testing/linux-pam/base-session-noninteractive.pamd4
-rw-r--r--testing/linux-pam/base-session.pamd4
-rw-r--r--testing/linux-pam/linux-pam-innetgr.patch54
-rw-r--r--testing/linux-pam/other.pamd6
-rw-r--r--testing/lua-augeas/APKBUILD30
-rw-r--r--testing/lua-crypto/APKBUILD26
-rw-r--r--testing/lua-ev/APKBUILD42
-rw-r--r--testing/lua-file_slurp/APKBUILD27
-rw-r--r--testing/lua-ldoc/APKBUILD41
-rw-r--r--testing/lua-lgi/APKBUILD40
-rw-r--r--testing/lua-llthreads/APKBUILD41
-rw-r--r--testing/lua-yaml/APKBUILD39
-rw-r--r--testing/luajit/APKBUILD32
-rw-r--r--testing/lwm/APKBUILD42
-rw-r--r--testing/lwm/no_xmkmf_makefile.patch11
-rw-r--r--testing/mac-robber/APKBUILD28
-rw-r--r--testing/madwimax/APKBUILD35
-rw-r--r--testing/maildrop/APKBUILD48
-rw-r--r--testing/mediaproxy/APKBUILD49
-rw-r--r--testing/mediaproxy/config.ini19
-rw-r--r--testing/mediaproxy/mediaproxy-dispatcher.initd22
-rw-r--r--testing/mediaproxy/mediaproxy-relay.initd22
-rw-r--r--testing/meiga/APKBUILD36
-rw-r--r--testing/memtest86+/APKBUILD29
-rw-r--r--testing/mhash/APKBUILD43
-rw-r--r--testing/minidlna/APKBUILD48
-rw-r--r--testing/minidlna/minidlna.confd10
-rw-r--r--testing/minidlna/minidlna.initd48
-rw-r--r--testing/moinmoin/APKBUILD28
-rw-r--r--testing/moodbar/APKBUILD37
-rw-r--r--testing/most/APKBUILD39
-rw-r--r--testing/mp3info/APKBUILD32
-rw-r--r--testing/mp3info/escape_chars.patch138
-rw-r--r--testing/mp3splt-gtk/APKBUILD42
-rw-r--r--testing/mp3splt/APKBUILD42
-rw-r--r--testing/mplayer2/APKBUILD52
-rw-r--r--testing/mplayer2/c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch216
-rw-r--r--testing/mplayer2/mplayer-gcc-4.6-audio-fix.patch22
-rw-r--r--testing/mtr/APKBUILD48
-rw-r--r--testing/mtr/mtr-res_mkquery.patch374
-rw-r--r--testing/multisort/APKBUILD39
-rw-r--r--testing/multisort/multisort-syslog-support.patch286
-rw-r--r--testing/multitail/APKBUILD26
-rw-r--r--testing/mupdf/APKBUILD40
-rw-r--r--testing/mupdf/destdir.patch19
-rw-r--r--testing/mutagen/APKBUILD33
-rw-r--r--testing/mutter/APKBUILD47
-rw-r--r--testing/mutter/mutter-gtk2.patch82
-rw-r--r--testing/mutter/mutter.post-install7
-rw-r--r--testing/mutter/mutter.post-upgrade7
-rw-r--r--testing/mutter/mutter.pre-deinstall7
-rw-r--r--testing/mytop/APKBUILD35
-rw-r--r--testing/nbtscan/APKBUILD43
-rw-r--r--testing/nbtscan/nbtscan-1.5.1-makefile.patch20
-rw-r--r--testing/ncdu/APKBUILD33
-rw-r--r--testing/ncmpcpp/APKBUILD31
-rw-r--r--testing/ncrack/APKBUILD46
-rw-r--r--testing/nebula/APKBUILD51
-rw-r--r--testing/netdiscover/APKBUILD33
-rw-r--r--testing/netsniff-ng/APKBUILD41
-rw-r--r--testing/netsniff-ng/netsniff-ng-unkown.patch14
-rw-r--r--testing/network-manager-applet/APKBUILD44
-rw-r--r--testing/networkmanager/APKBUILD59
-rw-r--r--testing/networkmanager/networkmanager.initd23
-rw-r--r--testing/nodejs/APKBUILD48
-rw-r--r--testing/nodejs/nodejs-multiplicity.patch10
-rw-r--r--testing/nodejs/nodejs-uclibc.patch20
-rw-r--r--testing/ntfsprogs/APKBUILD39
-rw-r--r--testing/nuttcp/APKBUILD40
-rw-r--r--testing/obexftp/APKBUILD57
-rw-r--r--testing/obexftp/obexftp-0.23-gentoo.patch24
-rw-r--r--testing/obmenu/APKBUILD19
-rw-r--r--testing/openjpeg/APKBUILD40
-rw-r--r--testing/openlldp/APKBUILD43
-rw-r--r--testing/openlldp/openlldp.confd2
-rwxr-xr-xtesting/openlldp/openlldp.initd24
-rw-r--r--testing/opensips-cp/APKBUILD26
-rw-r--r--testing/opensips/APKBUILD39
-rw-r--r--testing/opensips/opensips.initd26
-rw-r--r--testing/opensips/opensips.post-install5
-rw-r--r--testing/opensips/opensips.pre-install5
-rw-r--r--testing/openswan-grsec/APKBUILD63
-rw-r--r--testing/openswan/APKBUILD49
-rw-r--r--testing/openswan/ipsec.initd25
-rw-r--r--testing/openswan/setup.patch12
-rw-r--r--testing/openvcp/APKBUILD49
-rw-r--r--testing/openvcp/openvcp.initd20
-rw-r--r--testing/openvcp/system-libiptc.patch27
-rw-r--r--testing/openxcap/APKBUILD34
-rw-r--r--testing/openxcap/config.ini118
-rw-r--r--testing/openxcap/openxcap.initd31
-rwxr-xr-xtesting/openxcap/openxcap.post-install5
-rwxr-xr-xtesting/openxcap/openxcap.pre-install5
-rw-r--r--testing/oxygen-gtk/APKBUILD42
-rw-r--r--testing/oxygen-gtk/isnan.patch20
-rw-r--r--testing/oxygen-icons/APKBUILD41
-rw-r--r--testing/pacemaker/APKBUILD57
-rw-r--r--testing/pacemaker/pacemaker.initd39
-rw-r--r--testing/packagekit/APKBUILD49
-rw-r--r--testing/par2cmdline/APKBUILD53
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-autoconf.patch22
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-cosmetic.patch106
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-gcc4.patch62
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-hardlinks.patch15
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-letype.patch219
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-offset.patch16
-rw-r--r--testing/par2cmdline/par2cmdline-0.4-wildcard-fix.patch23
-rw-r--r--testing/partclone/APKBUILD68
-rw-r--r--testing/partclone/memtrace.patch14
-rw-r--r--testing/partimage/APKBUILD43
-rw-r--r--testing/partimage/partimage-0.6.8-gcc44.patch24
-rw-r--r--testing/pastebinc/APKBUILD41
-rw-r--r--testing/pcapy/APKBUILD28
-rw-r--r--testing/pdns-gui/0010-replace-bash-with-sh.patch81
-rw-r--r--testing/pdns-gui/0020-update-for-mysql55.patch67
-rw-r--r--testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch12
-rw-r--r--testing/pdns-gui/0040-alpine-default-htaccess-fix.patch11
-rw-r--r--testing/pdns-gui/APKBUILD63
-rw-r--r--testing/pdns-gui/pdns-gui.apache2.conf7
-rw-r--r--testing/pdns-gui/pdns-gui.post-install12
-rw-r--r--testing/pdns-gui/pdns-gui.post-upgrade8
-rw-r--r--testing/pdns/0010-disable-execinfo.patch25
-rw-r--r--testing/pdns/APKBUILD112
-rw-r--r--testing/pdns/pdns.conf337
-rw-r--r--testing/pdns/pdns.initd64
-rw-r--r--testing/pdns/pdns.post-deinstall4
-rw-r--r--testing/pdns/pdns.pre-install4
-rw-r--r--testing/perl-async-mergepoint/APKBUILD38
-rw-r--r--testing/perl-bit-vector/APKBUILD31
-rw-r--r--testing/perl-class-gomor/APKBUILD31
-rw-r--r--testing/perl-cps/APKBUILD38
-rw-r--r--testing/perl-crypt-openssl-bignum/APKBUILD37
-rw-r--r--testing/perl-data-hexdump/APKBUILD37
-rw-r--r--testing/perl-dbd-odbc/APKBUILD33
-rw-r--r--testing/perl-extutils-depends/APKBUILD37
-rw-r--r--testing/perl-extutils-pkgconfig/APKBUILD37
-rw-r--r--testing/perl-glib/APKBUILD37
-rw-r--r--testing/perl-heap/APKBUILD37
-rw-r--r--testing/perl-io-async-loop-glib/APKBUILD39
-rw-r--r--testing/perl-io-async-ssl/APKBUILD38
-rw-r--r--testing/perl-io-async/APKBUILD38
-rw-r--r--testing/perl-local-lib/APKBUILD37
-rw-r--r--testing/perl-lwp-protocol-https/APKBUILD37
-rw-r--r--testing/perl-math-random-mt-auto/APKBUILD37
-rw-r--r--testing/perl-modern-perl/APKBUILD38
-rw-r--r--testing/perl-mozilla-ca/APKBUILD37
-rw-r--r--testing/perl-net-async-http/APKBUILD38
-rw-r--r--testing/perl-net-ipv4addr/APKBUILD31
-rw-r--r--testing/perl-net-netmask/APKBUILD32
-rw-r--r--testing/perl-object-insideout/APKBUILD37
-rw-r--r--testing/perl-radiusperl/APKBUILD38
-rw-r--r--testing/perl-statistics-descriptive/APKBUILD38
-rw-r--r--testing/perl-sub-uplevel/APKBUILD31
-rw-r--r--testing/perl-sys-syslog/APKBUILD37
-rw-r--r--testing/perl-test-fatal/APKBUILD37
-rw-r--r--testing/perl-test-identity/APKBUILD38
-rw-r--r--testing/perl-test-refcount/APKBUILD38
-rw-r--r--testing/perl-test-simple/APKBUILD31
-rw-r--r--testing/perl-test-warn/APKBUILD37
-rw-r--r--testing/perl-tree-dag_node/APKBUILD37
-rw-r--r--testing/perl-try-tiny/APKBUILD37
-rw-r--r--testing/perl-uri-find-simple/APKBUILD37
-rw-r--r--testing/perl-uri-find/APKBUILD38
-rw-r--r--testing/perl-xml-writer/APKBUILD32
-rw-r--r--testing/perl-xml-xpath/APKBUILD37
-rw-r--r--testing/phonon-backend-gstreamer/APKBUILD41
-rw-r--r--testing/phonon/APKBUILD40
-rw-r--r--testing/phppgadmin/APKBUILD68
-rw-r--r--testing/phppgadmin/phppgadmin.apache2.conf7
-rw-r--r--testing/phppgadmin/phppgadmin.post-install16
-rw-r--r--testing/pkgconf/APKBUILD48
-rw-r--r--testing/pnp4nagios/APKBUILD76
-rw-r--r--testing/pnp4nagios/npcd21
-rw-r--r--testing/pnp4nagios/npcd.cfg195
-rw-r--r--testing/podofo/APKBUILD33
-rw-r--r--testing/polkit-gnome/APKBUILD38
-rw-r--r--testing/polkit-qt/APKBUILD40
-rw-r--r--testing/poppler-qt4/APKBUILD58
-rw-r--r--testing/portaudio/APKBUILD41
-rw-r--r--testing/postfixadmin/APKBUILD44
-rw-r--r--testing/postler/APKBUILD42
-rw-r--r--testing/postler/inet_ntoa.patch10
-rw-r--r--testing/poweradmin/0010-fix-installer-config.patch31
-rw-r--r--testing/poweradmin/0020-fix-for-mysql55.patch20
-rw-r--r--testing/poweradmin/APKBUILD81
-rw-r--r--testing/poweradmin/poweradmin.apache2.conf7
-rw-r--r--testing/poweradmin/poweradmin.post-install30
-rw-r--r--testing/powertop/APKBUILD40
-rw-r--r--testing/powertop/intl.patch11
-rw-r--r--testing/pptpclient/APKBUILD32
-rw-r--r--testing/pptpclient/pptpclient-uclibc.patch21
-rw-r--r--testing/pptpd/APKBUILD48
-rw-r--r--testing/pptpd/options.pptp11
-rw-r--r--testing/pptpd/pptpd.conf88
-rw-r--r--testing/pptpd/pptpd.confd5
-rw-r--r--testing/pptpd/pptpd.initd20
-rw-r--r--testing/pptpd/pptpd.patch69
-rw-r--r--testing/pptpd/rcpptpd67
-rw-r--r--testing/proftpd/APKBUILD60
-rw-r--r--testing/proftpd/mempcpy.patch13
-rw-r--r--testing/proftpd/proftpd.confd7
-rw-r--r--testing/proftpd/proftpd.initd28
-rw-r--r--testing/prosody/APKBUILD44
-rw-r--r--testing/prosody/prosody.cfg.lua.patch32
-rw-r--r--testing/prosody/prosody.initd44
-rw-r--r--testing/prosody/prosody.post-install6
-rw-r--r--testing/prosody/prosody.pre-install9
-rw-r--r--testing/protobuf/APKBUILD53
-rw-r--r--testing/psmisc/APKBUILD36
-rw-r--r--testing/pure-ftpd/APKBUILD53
-rw-r--r--testing/pure-ftpd/pure-ftpd.confd93
-rw-r--r--testing/pure-ftpd/pure-ftpd.initd71
-rw-r--r--testing/py-application/APKBUILD22
-rw-r--r--testing/py-asn1/APKBUILD38
-rw-r--r--testing/py-beautifulsoup/APKBUILD22
-rw-r--r--testing/py-bluez/APKBUILD37
-rw-r--r--testing/py-buildutils/APKBUILD24
-rw-r--r--testing/py-cherrypy/APKBUILD26
-rw-r--r--testing/py-cjson/APKBUILD25
-rw-r--r--testing/py-crypto/APKBUILD28
-rw-r--r--testing/py-curl/APKBUILD38
-rw-r--r--testing/py-dateutil/APKBUILD23
-rw-r--r--testing/py-distutils-extra/APKBUILD36
-rw-r--r--testing/py-django/APKBUILD29
-rw-r--r--testing/py-dnspython/APKBUILD22
-rw-r--r--testing/py-eventlet/APKBUILD25
-rw-r--r--testing/py-gevent/APKBUILD25
-rw-r--r--testing/py-gnome/APKBUILD85
-rw-r--r--testing/py-greenlet/APKBUILD25
-rw-r--r--testing/py-jabberbot/APKBUILD25
-rw-r--r--testing/py-libacl/APKBUILD29
-rw-r--r--testing/py-logilab-astng/APKBUILD30
-rw-r--r--testing/py-logilab-common/APKBUILD45
-rw-r--r--testing/py-lxml/APKBUILD21
-rw-r--r--testing/py-m2crypto/APKBUILD28
-rw-r--r--testing/py-mechanize/APKBUILD23
-rw-r--r--testing/py-mysqldb/APKBUILD19
-rw-r--r--testing/py-newt_syrup/APKBUILD38
-rw-r--r--testing/py-paramiko/APKBUILD41
-rw-r--r--testing/py-pycountry/APKBUILD31
-rw-r--r--testing/py-qt/APKBUILD32
-rw-r--r--testing/py-serial/APKBUILD52
-rw-r--r--testing/py-sip/APKBUILD30
-rw-r--r--testing/py-tftpy/APKBUILD28
-rw-r--r--testing/py-twisted-web2/APKBUILD21
-rw-r--r--testing/py-twisted/APKBUILD23
-rw-r--r--testing/py-urlgrabber/APKBUILD38
-rw-r--r--testing/py-xattr/APKBUILD29
-rw-r--r--testing/py-xmpppy/APKBUILD27
-rw-r--r--testing/py-yaml/APKBUILD29
-rw-r--r--testing/py-zope-interface/APKBUILD24
-rw-r--r--testing/pylint/APKBUILD34
-rw-r--r--testing/python3/APKBUILD54
-rw-r--r--testing/qca/APKBUILD40
-rw-r--r--testing/qimageblitz/APKBUILD40
-rw-r--r--testing/qpage/APKBUILD47
-rw-r--r--testing/qpage/config.input83
-rw-r--r--testing/qpage/qpage.initd25
-rw-r--r--testing/qpage/qpage.patch231
-rw-r--r--testing/qpage/qpage.post-install6
-rw-r--r--testing/qpage/qpage.pre-install3
-rw-r--r--testing/quvi/APKBUILD44
-rw-r--r--testing/radvd/APKBUILD56
-rw-r--r--testing/radvd/radvd-1.1-gnu-source.patch11
-rw-r--r--testing/radvd/radvd.confd11
-rw-r--r--testing/radvd/radvd.initd67
-rw-r--r--testing/raptor/APKBUILD47
-rw-r--r--testing/raptor/raptor-curl.patch12
-rw-r--r--testing/rasqal/APKBUILD45
-rw-r--r--testing/rats/APKBUILD51
-rw-r--r--testing/redland/APKBUILD45
-rw-r--r--testing/regina-rexx/APKBUILD46
-rw-r--r--testing/regina-rexx/regina-rexx.initd28
-rw-r--r--testing/resource-agents/APKBUILD48
-rw-r--r--testing/rpmlint/APKBUILD28
-rw-r--r--testing/rrdbot/APKBUILD47
-rw-r--r--testing/rrdbot/rrdbot.post-install4
-rw-r--r--testing/rrdbot/rrdbot.pre-install7
-rw-r--r--testing/rrdbot/rrdbotd.confd7
-rw-r--r--testing/rrdbot/rrdbotd.initd28
-rw-r--r--testing/rrdcollect/APKBUILD32
-rw-r--r--testing/rsyslog/APKBUILD86
-rw-r--r--testing/rsyslog/rsyslog.conf87
-rw-r--r--testing/rsyslog/rsyslog.confd17
-rw-r--r--testing/rsyslog/rsyslog.initd38
-rw-r--r--testing/rsyslog/rsyslog.logrotate9
-rw-r--r--testing/rtapd/APKBUILD42
-rw-r--r--testing/rtapd/Makefile.patch13
-rw-r--r--testing/rtapd/rtapd.confd1
-rw-r--r--testing/rtapd/rtapd.initd20
-rw-r--r--testing/rtnppd/APKBUILD41
-rw-r--r--testing/rtnppd/Makefile.patch13
-rw-r--r--testing/rtnppd/rtnppd.confd1
-rw-r--r--testing/rtnppd/rtnppd.initd21
-rw-r--r--testing/ruby-daemon-controller/APKBUILD30
-rw-r--r--testing/ruby-fastthread/APKBUILD30
-rw-r--r--testing/ruby-file-tail/APKBUILD30
-rw-r--r--testing/ruby-spruz/APKBUILD30
-rw-r--r--testing/rxvt-unicode/APKBUILD42
-rw-r--r--testing/sarg/APKBUILD55
-rw-r--r--testing/sc101-nbd/APKBUILD39
-rw-r--r--testing/scanssh/APKBUILD33
-rw-r--r--testing/scons/APKBUILD22
-rw-r--r--testing/scrub/APKBUILD45
-rw-r--r--testing/sdparm/APKBUILD45
-rw-r--r--testing/series60-remote/APKBUILD39
-rw-r--r--testing/setserial/APKBUILD41
-rw-r--r--testing/setserial/setserial.patch28
-rw-r--r--testing/shadow/APKBUILD58
-rw-r--r--testing/shadow/login.pamd6
-rw-r--r--testing/shadow/shadow.post-deinstall4
-rw-r--r--testing/shadow/shadow.post-upgrade4
-rw-r--r--testing/shared-desktop-ontologies/APKBUILD40
-rw-r--r--testing/shed/APKBUILD33
-rw-r--r--testing/shorewall/APKBUILD44
-rw-r--r--testing/shorewall/shorewall-no-install-T.patch11
-rw-r--r--testing/shorewall/shorewall.initd80
-rw-r--r--testing/sipsak/APKBUILD38
-rw-r--r--testing/sisctrl/APKBUILD43
-rw-r--r--testing/slony1/APKBUILD52
-rw-r--r--testing/slony1/slony1.confd12
-rwxr-xr-xtesting/slony1/slony1.initd37
-rw-r--r--testing/snowstorm/APKBUILD72
-rw-r--r--testing/snowstorm/indra-no-breakpad.patch179
-rw-r--r--testing/soprano/APKBUILD43
-rw-r--r--testing/soprano/redland.patch11
-rw-r--r--testing/spectools/APKBUILD41
-rw-r--r--testing/sqstat/APKBUILD35
-rw-r--r--testing/squidguard/APKBUILD47
-rw-r--r--testing/squidguard/blockedsites1
-rw-r--r--testing/squidguard/squidGuard.conf.blocksites13
-rw-r--r--testing/squidguard/squidGuard.conf.minimal7
-rw-r--r--testing/squidguard/squidguard-1.4-gentoo.patch74
-rw-r--r--testing/squidguard/squidguard-1.4-upstream-fixes.patch24
-rw-r--r--testing/squidguard/squidguard-1.4-vsnprintf.patch44
-rw-r--r--testing/squidguard/squidguard.post-install3
-rw-r--r--testing/strigi/APKBUILD40
-rw-r--r--testing/strongswan/APKBUILD74
-rw-r--r--testing/strongswan/adns.patch10
-rw-r--r--testing/strongswan/strongswan.initd31
-rw-r--r--testing/supertuxkart/APKBUILD43
-rw-r--r--testing/taglib-extras/APKBUILD40
-rw-r--r--testing/tbl/APKBUILD40
-rw-r--r--testing/tbl/tbl-install.patch19
-rw-r--r--testing/thunar-media-tags-plugin/01_port-to-thunarx-2.patch98
-rw-r--r--testing/thunar-media-tags-plugin/02_port-to-exo-1.patch175
-rw-r--r--testing/thunar-media-tags-plugin/03_fix-crash-with-ogg-video-files.patch28
-rw-r--r--testing/thunar-media-tags-plugin/04_fix-implicit-dso-linking.patch13
-rw-r--r--testing/thunar-media-tags-plugin/APKBUILD52
-rw-r--r--testing/thunderbird/0002-Use-C99-math-isfinite.patch43
-rw-r--r--testing/thunderbird/0004-xulrunner-malloc_usable_size.patch25
-rw-r--r--testing/thunderbird/APKBUILD100
-rw-r--r--testing/thunderbird/finite.patch26
-rw-r--r--testing/thunderbird/jemalloc-libs.patch11
-rw-r--r--testing/thunderbird/mozalloc_usable_size.patch11
-rw-r--r--testing/thunderbird/mozconfig40
-rw-r--r--testing/thunderbird/thunderbird.desktop13
-rw-r--r--testing/thunderbird/xpt.py.patch11
-rw-r--r--testing/tolua/APKBUILD46
-rw-r--r--testing/tolua/config37
-rw-r--r--testing/totem-pl-parser/APKBUILD45
-rw-r--r--testing/totem-pl-parser/no-libsoup-gnome.patch31
-rw-r--r--testing/totem/APKBUILD48
-rw-r--r--testing/totem/totem.post-install11
-rw-r--r--testing/totem/totem.post-upgrade11
-rw-r--r--testing/totem/totem.pre-deinstall11
-rw-r--r--testing/truecrypt/APKBUILD54
-rw-r--r--testing/truecrypt/execstack-fix.patch60
-rw-r--r--testing/truecrypt/truecrypt-arch-detection.patch15
-rw-r--r--testing/truecrypt/truecrypt.desktop9
-rw-r--r--testing/tut/APKBUILD40
-rw-r--r--testing/tvheadend/APKBUILD45
-rw-r--r--testing/tvheadend/tvheadend-git.confd2
-rw-r--r--testing/tvheadend/tvheadend-git.initd18
-rw-r--r--testing/tvheadend/tvheadend-git.post-deinstall4
-rw-r--r--testing/tvheadend/tvheadend-git.pre-install5
-rw-r--r--testing/txt2man/APKBUILD42
-rw-r--r--testing/txt2man/fixbashism.patch14
-rw-r--r--testing/txt2man/makefile.patch23
-rw-r--r--testing/ucspi-tcp/APKBUILD49
-rw-r--r--testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch64
-rw-r--r--testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch12
-rw-r--r--testing/uget/APKBUILD44
-rw-r--r--testing/unionfs-fuse/APKBUILD29
-rw-r--r--testing/upstart/APKBUILD43
-rw-r--r--testing/upstart/upstart.post-deinstall3
-rw-r--r--testing/upstart/upstart.post-upgrade3
-rw-r--r--testing/usb-modeswitch/APKBUILD60
-rw-r--r--testing/usb-modeswitch/Makefile.patch16
-rw-r--r--testing/usb-modeswitch/usb_modeswitch.setup1696
-rw-r--r--testing/usbip/APKBUILD30
-rw-r--r--testing/ushare/APKBUILD52
-rw-r--r--testing/ushare/upnp-build-fix.patch156
-rw-r--r--testing/ushare/ushare-config.patch22
-rw-r--r--testing/ushare/ushare.confd2
-rw-r--r--testing/ushare/ushare.initd20
-rw-r--r--testing/v8/APKBUILD60
-rw-r--r--testing/varnish/APKBUILD63
-rw-r--r--testing/varnish/varnishd.confd9
-rwxr-xr-xtesting/varnish/varnishd.initd34
-rw-r--r--testing/varnish/varnishd.logrotate9
-rw-r--r--testing/virt-manager/APKBUILD40
-rw-r--r--testing/vpnc/APKBUILD45
-rw-r--r--testing/vpnc/vpnc.confd4
-rw-r--r--testing/vpnc/vpnc.initd103
-rw-r--r--testing/webalizer/APKBUILD33
-rw-r--r--testing/weechat/APKBUILD43
-rw-r--r--testing/weplab/APKBUILD32
-rw-r--r--testing/wine_gecko/APKBUILD31
-rw-r--r--testing/wput/APKBUILD47
-rw-r--r--testing/wxgtk/APKBUILD72
-rw-r--r--testing/xfburn/APKBUILD32
-rw-r--r--testing/xfce4-cpugraph-plugin/APKBUILD44
-rw-r--r--testing/xl2tpd/APKBUILD47
-rw-r--r--testing/xl2tpd/options.l2tp17
-rw-r--r--testing/xl2tpd/xl2tpd.confd5
-rw-r--r--testing/xl2tpd/xl2tpd.initd20
-rw-r--r--testing/xmlrpc-c/APKBUILD56
-rw-r--r--testing/xmlrpc-c/xmlrpc-c-curl.patch36
-rw-r--r--testing/xmlrpc-epi/APKBUILD50
-rw-r--r--testing/xmlto/APKBUILD41
-rw-r--r--testing/xonotic-data/APKBUILD37
-rw-r--r--testing/xonotic/APKBUILD71
-rw-r--r--testing/xonotic/xonotic-moncontrol.patch21
-rw-r--r--testing/yaml/APKBUILD44
734 files changed, 39110 insertions, 0 deletions
diff --git a/testing/aalib/APKBUILD b/testing/aalib/APKBUILD
new file mode 100644
index 000000000..0b5872de1
--- /dev/null
+++ b/testing/aalib/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=aalib
+pkgver=1.4.0
+_pkgver=1.4
+pkgrel=0.rc4
+pkgdesc="An portable ascii art GFX library"
+url="http://aa-project.sourceforge.net/aalib/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/aa-project/$pkgname-"$_pkgver"rc4.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="d5aa8e9eae07b7441298b5c30490f6a6 aalib-1.4rc4.tar.gz"
diff --git a/testing/acf-fetch-crl/APKBUILD b/testing/acf-fetch-crl/APKBUILD
new file mode 100644
index 000000000..f6f2199fd
--- /dev/null
+++ b/testing/acf-fetch-crl/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+pkgname=acf-fetch-crl
+pkgver=0.2.0
+pkgrel=3
+pkgdesc="A web-based system administration interface for fetch-crl"
+url="http://git.alpinelinux.org/cgit/$pkgname"
+arch="noarch"
+license="GPL-2"
+depends="acf-core lua fetch-crl"
+makedepends=""
+install=
+subpackages=""
+source="http://git.alpinelinux.org/cgit/$pkgname.git/snapshot/$pkgname-$pkgver.tar.bz2"
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+}
+
+md5sums="d8789ef066ac41abd0db69a8ec470540 acf-fetch-crl-0.2.0.tar.bz2"
diff --git a/testing/agg/APKBUILD b/testing/agg/APKBUILD
new file mode 100644
index 000000000..9fb8fa2bf
--- /dev/null
+++ b/testing/agg/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+pkgname=agg
+pkgver=2.5
+pkgrel=1
+pkgdesc="A Rendering Engine for C++"
+url="http://antigrain.org/"
+license="GPL"
+depends=
+makedepends="autoconf automake libtool libx11-dev freetype-dev sdl-dev"
+install=
+arch="all"
+subpackages="$pkgname-dev"
+source="http://www.antigrain.com/$pkgname-$pkgver.tar.gz
+ agg-2.4-depends.patch
+ agg-2.5-pkgconfig.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd $_builddir
+ for i in "$srcdir"/*.patch; do
+ msg "Applying ${i}"
+ patch -Np1 -i "$i" || return 1
+ done
+ sh ./autogen.sh || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --disable-static || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="0229a488bc47be10a2fee6cf0b2febd6 agg-2.5.tar.gz
+22f8e48c137d25038181c86d5e40b110 agg-2.4-depends.patch
+43a19a7b1564c591e56c8d09a0fd8da5 agg-2.5-pkgconfig.patch"
diff --git a/testing/agg/agg-2.4-depends.patch b/testing/agg/agg-2.4-depends.patch
new file mode 100644
index 000000000..9d4f6e309
--- /dev/null
+++ b/testing/agg/agg-2.4-depends.patch
@@ -0,0 +1,48 @@
+--- agg-2.4.orig/font_freetype/Makefile.am 2005-10-18 11:45:40.000000000 +0100
++++ agg-2.4/font_freetype/Makefile.am 2006-07-10 15:11:55.000000000 +0100
+@@ -4,8 +4,9 @@
+ agginclude_HEADERS = agg_font_freetype.h
+ lib_LTLIBRARIES = libaggfontfreetype.la
+
+-libaggfontfreetype_la_LDFLAGS = -version-info @AGG_LIB_VERSION@ @FREETYPE_LIBS@
++libaggfontfreetype_la_LDFLAGS = -version-info @AGG_LIB_VERSION@
+ libaggfontfreetype_la_SOURCES = agg_font_freetype.cpp
+ libaggfontfreetype_la_CXXFLAGS = -I$(top_srcdir)/include @FREETYPE_CFLAGS@
++libaggfontfreetype_la_LIBADD = ../src/libagg.la @FREETYPE_LIBS@
+ endif
+
+--- agg-2.4.orig/src/platform/sdl/Makefile.am 2005-10-17 23:49:35.000000000 +0100
++++ agg-2.4/src/platform/sdl/Makefile.am 2006-07-10 15:11:55.000000000 +0100
+@@ -5,6 +5,6 @@
+ libaggplatformsdl_la_LDFLAGS = -version-info @AGG_LIB_VERSION@
+ libaggplatformsdl_la_SOURCES = agg_platform_support.cpp
+ libaggplatformsdl_la_CXXFLAGS = -I$(top_srcdir)/include @SDL_CFLAGS@
+-libaggplatformsdl_la_LIBADD = @SDL_LIBS@
++libaggplatformsdl_la_LIBADD = ../../libagg.la @SDL_LIBS@
+ endif
+
+--- agg-2.5.orig/configure.in 2006-10-09 05:06:36.000000000 +0100
++++ agg-2.5/configure.in 2007-01-07 14:07:39.000000000 +0000
+@@ -122,7 +122,8 @@
+ fi
+ AM_CONDITIONAL(ENABLE_X11,[test x$no_x = x -a xno != x$enable_platform -a x$win32_host != xyes])
+ AC_SUBST(x_includes)
+-AC_SUBST(x_libraries)
++test -n "$x_libraries" && X_LDFLAGS="-L$x_libraries"
++AC_SUBST(X_LDFLAGS)
+ dnl ###############################################
+
+ dnl Settung up library version
+--- agg-2.5.orig/src/platform/X11/Makefile.am 2006-12-11 00:59:45.000000000 +0000
++++ agg-2.5/src/platform/X11/Makefile.am 2007-01-07 14:07:39.000000000 +0000
+@@ -1,8 +1,8 @@
+ if ENABLE_X11
+ lib_LTLIBRARIES = libaggplatformX11.la
+
+-libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@ -L@x_libraries@
++libaggplatformX11_la_LDFLAGS = -version-info @AGG_LIB_VERSION@ @X_LDFLAGS@
+ libaggplatformX11_la_SOURCES = agg_platform_support.cpp
+ libaggplatformX11_la_CXXFLAGS = -I$(top_srcdir)/include -I@x_includes@
+-libaggplatformX11_la_LIBADD = -lX11
++libaggplatformX11_la_LIBADD = ../../libagg.la -lX11
+ endif
diff --git a/testing/agg/agg-2.5-pkgconfig.patch b/testing/agg/agg-2.5-pkgconfig.patch
new file mode 100644
index 000000000..a303bfb90
--- /dev/null
+++ b/testing/agg/agg-2.5-pkgconfig.patch
@@ -0,0 +1,10 @@
+--- agg-2.5/libagg.pc.in.orig 2007-01-07 13:58:28.000000000 +0000
++++ agg-2.5/libagg.pc.in 2007-01-07 14:02:40.000000000 +0000
+@@ -6,5 +6,6 @@
+ Name: libagg
+ Description: Anti Grain Geometry - A High Quality Rendering Engine for C++
+ Version: @VERSION@
+-Libs: -L${libdir} -Wl,-rpath,${exec_prefix}/lib -lagg
++Requires.private: freetype2
++Libs: -L${libdir} -lagg
+ Cflags: -I${includedir}
diff --git a/testing/akonadi/APKBUILD b/testing/akonadi/APKBUILD
new file mode 100644
index 000000000..be616a1fd
--- /dev/null
+++ b/testing/akonadi/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=akonadi
+pkgver=1.5.3
+pkgrel=0
+pkgdesc="kde PIM storage service server"
+url="http://pim.kde.org/akonadi"
+arch="all"
+license="LGPL"
+depends="shared-desktop-ontologies"
+depends_dev="kdebase-dev boost-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.akonadi-project.org/akonadi-$pkgver.tar.bz2
+ disable-backtrace.patch"
+
+_builddir="$srcdir"/akonadi-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ad342acca61c2af27be4cce61b2d925a akonadi-1.5.3.tar.bz2
+41dbdc24acdc79ba8e0b171c2a11abb1 disable-backtrace.patch"
diff --git a/testing/akonadi/disable-backtrace.patch b/testing/akonadi/disable-backtrace.patch
new file mode 100644
index 000000000..291a5a93d
--- /dev/null
+++ b/testing/akonadi/disable-backtrace.patch
@@ -0,0 +1,11 @@
+--- akonadi-1.5.3.orig/shared/akcrash.cpp
++++ akonadi-1.5.3/shared/akcrash.cpp
+@@ -44,7 +44,7 @@
+ QString s;
+
+ /* FIXME: is there an equivalent for darwin, *BSD, or windows? */
+-#ifdef HAVE_EXECINFO_H
++#if 0
+ void* trace[256];
+ int n = backtrace(trace, 256);
+ if (!n)
diff --git a/testing/apache-mod-auth-kerb/APKBUILD b/testing/apache-mod-auth-kerb/APKBUILD
new file mode 100644
index 000000000..3740f7a86
--- /dev/null
+++ b/testing/apache-mod-auth-kerb/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=apache-mod-auth-kerb
+_pkgname=mod_auth_kerb
+pkgver=5.4
+pkgrel=1
+pkgdesc="A Kerberos authentication module for the Apache Http Server"
+url="http://samba.org/ftp/unpacked/lorikeet/mod_auth_ntlm_winbind/"
+arch="all"
+license="custom"
+depends="apache2 heimdal"
+makedepends="apache2-dev heimdal-dev samba-dev bash"
+source="http://downloads.sourceforge.net/project/modauthkerb/$_pkgname/$_pkgname-$pkgver/$_pkgname-$pkgver.tar.gz
+ mod_auth_kerb.patch
+ mod-auth-kerb.conf
+ "
+prepare() {
+ cd $srcdir/$_pkgname-$pkgver
+ for i in "$srcdir"/*.patch; do
+ [ -f "$i" ] || continue
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+ sed -i -e 's:^ret.*:ret=`eval "$4" $5 $cppflags $ldflags src/mod_auth_kerb.c $3`:' apxs.sh
+}
+
+build() {
+ cd $srcdir/$_pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --with-krb5=/usr
+ make -j6 || return 1
+}
+
+package() {
+ cd $srcdir/$_pkgname-$pkgver
+# make DESTDIR="$pkgdir" install || return 1
+ mkdir -p "$pkgdir"/etc/apache2/conf.d
+ mkdir -p "$pkgdir"/usr/lib/apache2
+ install -D -m755 ./src/.libs/*.so "$pkgdir"/usr/lib/apache2
+ install -D -m644 ../../mod-auth-kerb.conf "$pkgdir"/etc/apache2/conf.d/mod-auth-kerb.conf
+}
+
+md5sums="642b81763ad3ca81dba359cb952da5e3 mod_auth_kerb-5.4.tar.gz
+3ef3cd9c723f34a2ee7ab350b7c653c9 mod_auth_kerb.patch
+7f9a0976ff101226fae4fd9b811b21a4 mod-auth-kerb.conf"
diff --git a/testing/apache-mod-auth-kerb/mod-auth-kerb.conf b/testing/apache-mod-auth-kerb/mod-auth-kerb.conf
new file mode 100644
index 000000000..24310d6cf
--- /dev/null
+++ b/testing/apache-mod-auth-kerb/mod-auth-kerb.conf
@@ -0,0 +1,26 @@
+#
+# The mod_auth_kerb module implements Kerberos authentication over
+# HTTP, following the "Negotiate" protocol.
+#
+
+LoadModule auth_kerb_module modules/mod_auth_kerb.so
+
+#
+# Sample configuration: Kerberos authentication must only be
+# used over SSL to prevent replay attacks. The keytab file
+# configured must be readable only by the "apache" user, and
+# must contain service keys for "HTTP/www.example.com", where
+# "www.example.com" is the FQDN of this server.
+#
+
+#<Location /private>
+# SSLRequireSSL
+# AuthType Kerberos
+# AuthName "Kerberos Login"
+# KrbMethodNegotiate On
+# KrbMethodK5Passwd Off
+# KrbAuthRealms EXAMPLE.COM
+# Krb5KeyTab /etc/httpd/conf/keytab
+# require valid-user
+#</Location>
+
diff --git a/testing/apache-mod-auth-kerb/mod_auth_kerb.patch b/testing/apache-mod-auth-kerb/mod_auth_kerb.patch
new file mode 100644
index 000000000..aa0c0a435
--- /dev/null
+++ b/testing/apache-mod-auth-kerb/mod_auth_kerb.patch
@@ -0,0 +1,11 @@
+--- mod_auth_kerb-5.4/src/mod_auth_kerb.c 2010-10-04 16:21:22.169285716 +0200
++++ mod_auth_kerb-5.4.new/src/mod_auth_kerb.c 2010-10-04 16:20:41.584250095 +0200
+@@ -89,6 +89,7 @@
+ #include <krb5.h>
+ #ifdef HEIMDAL
+ # include <gssapi.h>
++# include <gssapi/gssapi_krb5.h>
+ #else
+ # include <gssapi/gssapi.h>
+ # include <gssapi/gssapi_generic.h>
+
diff --git a/testing/apache-mod-backtrace/APKBUILD b/testing/apache-mod-backtrace/APKBUILD
new file mode 100644
index 000000000..cc3198062
--- /dev/null
+++ b/testing/apache-mod-backtrace/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=apache-mod-backtrace
+pkgver=0
+pkgrel=1
+pkgdesc="A module which uses system functions to format a backtrace to show what code did the dirty deed."
+url="http://people.apache.org/~trawick/exception_hook.html"
+arch="all"
+license="Apache2.0"
+depends="apache2"
+makedepends="apache2-dev apr-dev autoconf"
+install=
+subpackages=
+source="http://people.apache.org/~trawick/mod_backtrace.c
+ configure.in
+ Makefile.in"
+
+build() {
+ cd "$srcdir"
+ autoconf
+ ./configure
+ make DESTDIR="$pkgdir" || return 1
+}
+
+package() {
+ cd "$srcdir"
+ install -D -m755 "$srcdir"/.libs/mod_backtrace.so "$pkgdir"/usr/lib/apache2/mod_backtrace.so
+}
+
+md5sums="cd5361da31b3c1401e29ccb6e5220f6b mod_backtrace.c
+623409fd18dea63d6da509f2818491ef configure.in
+e796e84b98ad73f2420ad8ef6fc5c01b Makefile.in"
diff --git a/testing/apache-mod-backtrace/Makefile.in b/testing/apache-mod-backtrace/Makefile.in
new file mode 100644
index 000000000..1f05b116f
--- /dev/null
+++ b/testing/apache-mod-backtrace/Makefile.in
@@ -0,0 +1,35 @@
+#
+# Makefile for mod_backtrace
+#
+# Based off of Makefile for mod_auth_ntlm_winbind by
+# Matt Smith <mcs@darkregion.net>, 2011/01/04
+#
+
+# Programs
+
+APXS = @APXS@
+APXS_FLAGS = @APXS_FLAGS@
+SODIR = @SODIR@
+APXSLIBDIR=$(DESTDIR)/$(shell $(APXS) -q LIBEXECDIR)
+
+# Build the dso
+MOD_BACKTRACE_SRC = mod_backtrace.c
+
+$(SODIR)mod_backtrace.so: $(MOD_BACKTRACE_SRC)
+ $(APXS) $(APXS_FLAGS) -Wc,-Wall -c -lubacktrace $(MOD_BACKTRACE_SRC)
+
+install: $(SODIR)mod_backtrace.so
+ $(APXS) $(APXS_FLAGS) -S LIBEXECDIR=$(APXSLIBDIR) -n backtrace -i $(SODIR)mod_backtrace.so
+
+# Clean targets
+clean:
+ @rm -f *~ $(MOD_BACKTRACE_SRC:.c=.{la,lo,o,slo})
+ @rm -rf $(SODIR)
+
+realclean: clean
+ @rm -f config.log
+
+distclean: realclean
+ @rm -f config.h Makefile \
+ config.status config.cache
+ @rm -rf autom4te.cache
diff --git a/testing/apache-mod-backtrace/configure.in b/testing/apache-mod-backtrace/configure.in
new file mode 100644
index 000000000..60de6023c
--- /dev/null
+++ b/testing/apache-mod-backtrace/configure.in
@@ -0,0 +1,46 @@
+# Process this file with autoconf to produce a configure script.
+
+AC_INIT(mod_backtrace.c)
+
+# Basic stuff
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_STDC_HEADERS
+
+# We use axps to compile source files, which may be in /usr/sbin
+AC_ARG_WITH(apxs,
+[ --with-apxs=PATH Specify path to apxs],
+[ APXS="$withval" ],
+[ AC_PATH_PROGS([APXS], [apxs2 apxs],, [$PATH:/usr/sbin]) ])
+
+AC_ARG_WITH(apache,
+[ --with-apache=PATH Specify path to apache executable],
+[ HTTPD="$withval" ],
+[ AC_PATH_PROG([HTTPD], [httpd], [/usr/sbin/httpd], [$PATH:/usr/sbin]) ])
+
+APACHE_VER=`${HTTPD} -v | grep version`
+if echo "$APACHE_VER" | grep -q "/2\."
+then
+ APXS_FLAGS=-DAPACHE2
+ SODIR=.libs/
+ echo "Building for Apache 2."
+else
+ echo "Building for Apache 1."
+fi
+
+# Check for some headers
+
+AC_CHECK_HEADERS(stdlib.h unistd.h sys/socket.h sys/time.h grp.h)
+AC_CHECK_HEADERS(nss_common.h nss.h)
+
+# Determine size of basic types
+
+AC_CHECK_SIZEOF(int,cross)
+AC_CHECK_SIZEOF(long,cross)
+AC_CHECK_SIZEOF(short,cross)
+
+# Create Makefile
+AC_SUBST(APXS_FLAGS)
+AC_SUBST(SODIR)
+AC_OUTPUT(Makefile)
diff --git a/testing/apache2-mod-perl/APKBUILD b/testing/apache2-mod-perl/APKBUILD
new file mode 100644
index 000000000..40d3a5438
--- /dev/null
+++ b/testing/apache2-mod-perl/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=apache2-mod-perl
+_realname=mod_perl
+pkgver=2.0.5
+pkgrel=1
+pkgdesc="Perl Module for Apache2"
+url="http://perl.apache.org/"
+arch="all"
+license="APACHE"
+depends="apache2 perl"
+depends_dev=
+makedepends="$depends_dev apache2-dev perl-dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc $pkgname-dev"
+source="http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/${_realname}-${pkgver}.tar.gz
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/${_realname}-${pkgver}
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
+ MP_APXS=/usr/sbin/apxs || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/perl-module.conf || return 1
+}
+
+doc() {
+ arch="noarch"
+
+ # man pages
+ mkdir -p "$subpkgdir"/usr/share/man || return 1
+ mv "$pkgdir"/usr/share/man/man* "$subpkgdir"/usr/share/man/ \
+ || return 1
+
+ # doc files
+ _docs="BRANCHING Changes INSTALL LICENSE MANIFEST NOTICE README \
+ README-SVN RELEASE STATUS SVN-MOVE"
+ for _doc in $_docs; do
+ install -Dm644 "$_builddir"/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+ cp -ra "$_builddir"/docs/ "$subpkgdir"/usr/share/doc/$pkgname/ \
+ || return 1
+}
+
+md5sums="03d01d135a122bd8cebd0cd5b185d674 mod_perl-2.0.5.tar.gz
+86b84bb56b49a95772a7f773fc019043 apache2-mod-perl.apache2.conf"
diff --git a/testing/apache2-mod-perl/apache2-mod-perl.apache2.conf b/testing/apache2-mod-perl/apache2-mod-perl.apache2.conf
new file mode 100644
index 000000000..c1a75c76f
--- /dev/null
+++ b/testing/apache2-mod-perl/apache2-mod-perl.apache2.conf
@@ -0,0 +1,11 @@
+LoadModule perl_module modules/mod_perl.so
+
+# For mod_perl 1.0 compatibility, uncomment:
+#PerlModule Apache2::compat
+
+<Location /cgi-bin>
+ AddHandler perl-script .pl
+ PerlResponseHandler ModPerl::Registry
+ PerlOptions +ParseHeaders
+ Options +ExecCGI
+</Location>
diff --git a/testing/apache2-mod-perl/apache2-mod-perl.post-install b/testing/apache2-mod-perl/apache2-mod-perl.post-install
new file mode 100644
index 000000000..8cfc5a86e
--- /dev/null
+++ b/testing/apache2-mod-perl/apache2-mod-perl.post-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* To finish installing apache2-mod-perl:" >&2
+echo "* 1) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/perl-module.conf" >&2
+echo "* 2) Restart apache2 when done." >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/apache2-mod-wsgi/APKBUILD b/testing/apache2-mod-wsgi/APKBUILD
new file mode 100644
index 000000000..14b4a644f
--- /dev/null
+++ b/testing/apache2-mod-wsgi/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=apache2-mod-wsgi
+_realname=mod_wsgi
+pkgver=3.3
+pkgrel=2
+pkgdesc="Python WSGI Module for Apache2"
+url="http://code.google.com/p/modwsgi/"
+arch="all"
+license="APACHE"
+depends="apache2 python"
+depends_dev=
+makedepends="$depends_dev apache2-dev python-dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://modwsgi.googlecode.com/files/$_realname-$pkgver.tar.gz
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+ cd "$_builddir"
+ CFLAGS="" CXXFLAGS="" CPPFLAGS="" \
+ ./configure --prefix=/usr \
+ --with-apxs=/usr/sbin/apxs \
+ --with-python=/usr/bin/python || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/wsgi-module.conf || return 1
+}
+
+doc() {
+ arch="noarch"
+
+ # doc files
+ _docs="LICENCE README"
+ for _doc in $_docs; do
+ install -Dm644 "$_builddir"/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+}
+
+md5sums="6172bb2bbabcd0c25867c2bc06f99dbb mod_wsgi-3.3.tar.gz
+e1795e051e7aae1f865fde0d3b86a507 apache2-mod-wsgi.apache2.conf"
diff --git a/testing/apache2-mod-wsgi/apache2-mod-wsgi.apache2.conf b/testing/apache2-mod-wsgi/apache2-mod-wsgi.apache2.conf
new file mode 100644
index 000000000..19f356756
--- /dev/null
+++ b/testing/apache2-mod-wsgi/apache2-mod-wsgi.apache2.conf
@@ -0,0 +1 @@
+LoadModule wsgi_module modules/mod_wsgi.so
diff --git a/testing/apache2-mod-wsgi/apache2-mod-wsgi.post-install b/testing/apache2-mod-wsgi/apache2-mod-wsgi.post-install
new file mode 100644
index 000000000..327b0156b
--- /dev/null
+++ b/testing/apache2-mod-wsgi/apache2-mod-wsgi.post-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* To finish installing apache2-mod-wsgi:" >&2
+echo "* 1) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/wsgi-module.conf" >&2
+echo "* 2) Restart apache2 when done." >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/apts/APKBUILD b/testing/apts/APKBUILD
new file mode 100644
index 000000000..22b08afa8
--- /dev/null
+++ b/testing/apts/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Jeff Bilyk <jbilyk@gmail.com>
+pkgname=apts
+pkgver=0.3
+pkgrel=2
+pkgdesc="APTS - Alpine Package Testing Suite"
+depends=
+makedepends=
+source="http://git.alpinelinux.org/cgit/jbilyk/$pkgname.git/snapshot/$pkgname-$pkgver.tar.bz2
+ "
+url="http://git.alpinelinux.org/cgit/jbilyk/apts.git/"
+arch="noarch"
+license=GPL-2
+
+build() {
+ echo "Nothing to build, moving on to package"
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir -p "$pkgdir"/etc/apts
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/usr/share/$pkgname/tests
+ mkdir -p "$pkgdir"/usr/share/docs/$pkgname
+
+ install -m755 -D $pkgname "$pkgdir"/usr/bin/$pkgname
+ install -m644 -D apts.conf "$pkgdir"/etc/$pkgname/${pkgname}.conf
+ install -m644 -D README "$pkgdir"/usr/share/docs/$pkgname/README
+ install -m644 -D missing-tests "$pkgdir"/usr/share/docs/$pkgname/missing-tests
+ install -m644 -D torvalds-says-linux.mp3 "$pkgdir"/usr/share/$pkgname/torvalds-says-linux.mp3
+ install -m644 -D test.rar "$pkgdir"/usr/share/$pkgname/test.rar
+ for i in `ls tests`; do
+ install -m644 -D tests/$i "$pkgdir"/usr/share/$pkgname/tests/$i
+ done
+}
+
+md5sums="7fc6abc1ef9f006bbca19b4c85ecb47f apts-0.3.tar.bz2"
diff --git a/testing/arping/APKBUILD b/testing/arping/APKBUILD
new file mode 100644
index 000000000..4d3b79e7f
--- /dev/null
+++ b/testing/arping/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=arping
+pkgver=2.09
+pkgrel=0
+pkgdesc="ARP ping utility"
+url="http://www.habets.pp.se/synscan/programs.php?prog=arping"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="libnet-dev libpcap-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.habets.pp.se/synscan/files/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+ make || return 1
+
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="6f6a91c8700fcc7454b4e89480e417e3 arping-2.09.tar.gz"
diff --git a/testing/array-info/APKBUILD b/testing/array-info/APKBUILD
new file mode 100644
index 000000000..77719a9c3
--- /dev/null
+++ b/testing/array-info/APKBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=array-info
+pkgver=0.16
+pkgrel=0
+pkgdesc="retrieve informations and status from RAID controllers"
+url="http://array-info.sourceforge.net/"
+license="GPL"
+arch="all"
+depends=
+makedepends="docbook-xsl gzip"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$pkgver.tar.gz"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ local _xsl=$(echo /usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl)
+ make prefix=/usr DOCBOOK2XMAN="xsltproc --nonet $_xsl" \
+ #build_lib build_plugins abuild-info array-info.1.gz \
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make prefix=/usr DESTDIR="$pkgdir" install
+}
+
+md5sums="802e9be5e40a5a945956a123fc81f65f array-info_0.16.tar.gz"
diff --git a/testing/array-info/array-info-makefile.patch b/testing/array-info/array-info-makefile.patch
new file mode 100644
index 000000000..db7c18e45
--- /dev/null
+++ b/testing/array-info/array-info-makefile.patch
@@ -0,0 +1,20 @@
+--- Makefile.orig Tue Dec 29 13:46:28 2009
++++ Makefile Tue Dec 29 13:47:38 2009
+@@ -1,5 +1,5 @@
+ DESTDIR =
+-prefix = /usr/local
++prefix = /usr
+ sbindir = $(prefix)/sbin
+ pkglibdir = $(prefix)/lib/array-info
+ mandir = $(prefix)/share/man
+@@ -8,8 +8,8 @@
+
+ INCLUDES = -I./include -I./linuxheaders
+
+-CFLAGS = -g2 -Wall $(INCLUDES) -DARRAY_PLUGIN_PATH=\"$(ARRAY_PLUGIN_PATH)\"
+-LDFLAGS = -L./lib -larray-info -ldl
++CFLAGS += -Wall $(INCLUDES) -DARRAY_PLUGIN_PATH=\"$(ARRAY_PLUGIN_PATH)\"
++LDFLAGS += -L./lib -larray-info -ldl
+ OBJS = array_plugin.o array_utils.o main.o
+
+ ARRAY_PLUGIN_PATH=$(pkglibdir)/plugins
diff --git a/testing/asterisk/100-uclibc-daemon.patch b/testing/asterisk/100-uclibc-daemon.patch
new file mode 100644
index 000000000..4956791d4
--- /dev/null
+++ b/testing/asterisk/100-uclibc-daemon.patch
@@ -0,0 +1,44 @@
+diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/asterisk.c
+--- asterisk-1.6.1-beta4.org/main/asterisk.c 2008-12-12 23:05:58.000000000 +0100
++++ asterisk-1.6.1-beta4/main/asterisk.c 2008-12-23 15:28:21.000000000 +0100
+@@ -3295,9 +3295,40 @@
+ #if HAVE_WORKING_FORK
+ if (ast_opt_always_fork || !ast_opt_no_fork) {
+ #ifndef HAVE_SBIN_LAUNCHD
++#ifndef __UCLIBC__
+ if (daemon(1, 0) < 0) {
+ ast_log(LOG_ERROR, "daemon() failed: %s\n", strerror(errno));
+ }
++#else
++ /*
++ * workaround for uClibc-0.9.29 mipsel bug:
++ * recursive mutexes do not work if uClibc daemon() function has been called,
++ * if parent thread locks a mutex
++ * the child thread cannot acquire a lock with the same name
++ * (same code works if daemon() is not called)
++ * but duplication of uClibc daemon.c code in here does work.
++ */
++ int fd;
++ switch (fork()) {
++ case -1:
++ exit(1);
++ case 0:
++ break;
++ default:
++ _exit(0);
++ }
++ if (setsid() == -1)
++ exit(1);
++ if (fork())
++ _exit(0);
++ if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
++ dup2(fd, STDIN_FILENO);
++ dup2(fd, STDOUT_FILENO);
++ dup2(fd, STDERR_FILENO);
++ if (fd > 2)
++ close(fd);
++ }
++#endif
+ ast_mainpid = getpid();
+ /* Blindly re-write pid file since we are forking */
+ unlink(ast_config_AST_PID);
diff --git a/testing/asterisk/101-caps-uclibc.patch b/testing/asterisk/101-caps-uclibc.patch
new file mode 100644
index 000000000..bb32d1ece
--- /dev/null
+++ b/testing/asterisk/101-caps-uclibc.patch
@@ -0,0 +1,17 @@
+--- asterisk-1.6.0.18/configure.ac.orig Mon Oct 26 23:13:28 2009
++++ asterisk-1.6.0.18/configure.ac Fri Nov 27 21:42:36 2009
+@@ -627,9 +627,11 @@
+
+ AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
+
+-if test "x${OSARCH}" = "xlinux-gnu" ; then
+- AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
+-fi
++case "${OSARCH}" in
++ linux*)
++ AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
++ ;;
++esac
+
+ AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
+
diff --git a/testing/asterisk/102-gsm-pic.patch b/testing/asterisk/102-gsm-pic.patch
new file mode 100644
index 000000000..71370ec0b
--- /dev/null
+++ b/testing/asterisk/102-gsm-pic.patch
@@ -0,0 +1,54 @@
+--- a/codecs/gsm/Makefile.org 2008-03-29 11:33:09.000000000 +0100
++++ b/codecs/gsm/Makefile 2008-03-29 11:44:40.000000000 +0100
+@@ -37,23 +37,6 @@
+ ######### ppro's, etc, as well as the AMD K6 and K7. The compile will
+ ######### probably require gcc.
+
+-ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
+-ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm armv5b armeb ppc powerpc ppc64 ia64 s390 bfin mipsel mips))
+-ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
+-OPTIMIZE+=-march=$(PROC)
+-endif
+-endif
+-endif
+-
+-#The problem with sparc is the best stuff is in newer versions of gcc (post 3.0) only.
+-#This works for even old (2.96) versions of gcc and provides a small boost either way.
+-#A ultrasparc cpu is really v9 but the stock debian stable 3.0 gcc doesn't support it.
+-#So we go lowest common available by gcc and go a step down, still a step up from
+-#the default as we now have a better instruction set to work with. - Belgarath
+-ifeq ($(PROC),ultrasparc)
+-OPTIMIZE+=-mcpu=v8 -mtune=$(PROC) -O3
+-endif
+-
+ PG =
+ #PG = -g -pg
+ ######### Profiling flags. If you don't know what that means, leave it blank.
+@@ -208,12 +191,10 @@
+ # XXX Keep a space after each findstring argument
+ # XXX should merge with GSM_OBJECTS
+ ifeq ($(OSARCH),linux-gnu)
+-ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
+-ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 s390 bfin mipsel mips ))
++ifneq ($(K6OPT),)
+ GSM_SOURCES+= $(SRC)/k6opt.s
+ endif
+ endif
+-endif
+
+ TOAST_SOURCES = $(SRC)/toast.c \
+ $(SRC)/toast_lin.c \
+@@ -260,12 +241,10 @@
+ $(SRC)/table.o
+
+ ifeq ($(OSARCH),linux-gnu)
+-ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
+-ifeq (,$(findstring $(PROC) , arm armv5b armeb powerpc ia64 bfin mipsel mips ))
++ifneq ($(K6OPT),)
+ GSM_OBJECTS+= $(SRC)/k6opt.o
+ endif
+ endif
+-endif
+
+ TOAST_OBJECTS = $(SRC)/toast.o \
+ $(SRC)/toast_lin.o \
diff --git a/testing/asterisk/400-bug-227.patch b/testing/asterisk/400-bug-227.patch
new file mode 100644
index 000000000..f8187379e
--- /dev/null
+++ b/testing/asterisk/400-bug-227.patch
@@ -0,0 +1,15 @@
+Index: channels/chan_sip.c
+===================================================================
+--- a/channels/chan_sip.c (revision 212243)
++++ b/channels/chan_sip.c (working copy)
+@@ -3675,8 +3675,8 @@
+ char method_str[31];
+ ast_debug(3, "Re-scheduled destruction of SIP call %s\n", p->callid ? p->callid : "<unknown>");
+ append_history(p, "ReliableXmit", "timeout");
+- if (sscanf(p->lastmsg, "Tx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %30s", method_str) == 1) {
+- if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str)) {
++ if (sscanf(p->lastmsg, "Tx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Init: %30s", method_str) == 1) {
++ if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str) || method_match(SIP_INVITE, method_str)) {
+ pvt_set_needdestroy(p, "autodestruct");
+ }
+ }
diff --git a/testing/asterisk/APKBUILD b/testing/asterisk/APKBUILD
new file mode 100644
index 000000000..4a258fb40
--- /dev/null
+++ b/testing/asterisk/APKBUILD
@@ -0,0 +1,176 @@
+# Contributor: Timo Teras <timo.teras@iki.fi>
+# Maintainer: Timo Teras <timo.teras@iki.fi>
+pkgname=asterisk
+pkgver=10.0.0_rc3
+pkgrel=0
+pkgdesc="Asterisk: A Module Open Source PBX System"
+url="http://www.asterisk.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev
+ postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev tar
+ freetds-dev openssl-dev lua-dev alsa-lib-dev spandsp-dev tiff-dev
+ libresample sqlite-dev wget speex-dev libogg-dev"
+install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-install"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc
+ $pkgname-tds $pkgname-fax $pkgname-sample-config:sample $pkgname-sqlite
+ $pkgname-sounds-moh:sound_moh $pkgname-sounds-en:sound_en"
+source="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${pkgver/_/-}.tar.gz
+ 100-uclibc-daemon.patch
+ 101-caps-uclibc.patch
+ 400-bug-227.patch
+ ASTERISK-18976.patch
+ ASTERISK-18977.patch
+ ASTERISK-18994.patch
+ ASTERISK-18995.patch
+ asterisk.initd
+ asterisk.confd
+ asterisk.logrotate"
+
+_builddir="$srcdir/$pkgname-${pkgver/_/-}"
+
+prepare() {
+ cd "$_builddir"
+ for i in ../[1-9A]*.patch; do
+ msg "Apply $i"
+ patch -p1 < $i || return 1
+ done
+
+ sed -i -e 's:lua5.1/::' pbx/pbx_lua.c
+ sed -i -e 's/PBX_ICONV=1/PBX_ICONV=0/g' configure.ac
+
+ ./bootstrap.sh
+}
+
+build() {
+ cd "$_builddir"
+ SHA1SUM="$PWD"/build_tools/sha1sum-sh ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-xmldoc --with-gsm=internal \
+ --without-iconv --with-popt --with-z --with-newt \
+ --with-odbc --with-postgres --with-tds \
+ --with-dahdi --with-pri --with-tonezone \
+ --with-resample \
+ --with-sqlite3 \
+ --with-speex \
+ --with-asound \
+ --without-x11 \
+ --with-spandsp \
+ || return 1
+
+ # and figure out which modules to build
+ rm menuselect.makeopts
+ make menuselect.makeopts
+ make ASTLDFLAGS="$LDFLAGS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install
+
+ install -d "$pkgdir"/var/run/asterisk
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.logrotate \
+ "$pkgdir"/etc/logrotate.d/$pkgname
+}
+
+_move_dir() {
+ for DIR in "$@"; do
+ local dest=`dirname "$subpkgdir/$DIR"`
+ echo mkdir -p $dest
+ mkdir -p "$dest"
+ echo mv "$pkgdir"/$DIR $dest
+ mv "$pkgdir"/"$DIR" "$dest"
+ done
+}
+
+_find_and_move() {
+ local pattern="$1"
+ cd "$pkgdir" || return 1
+ find -name "$pattern" -type f | while read f; do
+ local dest="$subpkgdir/${f%/*}"
+ mkdir -p "$dest"
+ mv "$f" "$dest"
+ done
+}
+
+doc() {
+ default_doc
+}
+
+dev() {
+ default_dev
+ depends="asterisk"
+}
+
+pgsql() {
+ depends=
+ install=
+ _find_and_move '*_pgsql*'
+}
+
+sqlite() {
+ depends=
+ install=
+ _find_and_move '*_sqlite*'
+}
+
+odbc() {
+ depends=
+ install=
+ _find_and_move '*odbc*'
+}
+
+tds() {
+ depends=
+ install=
+ _find_and_move '*_tds*'
+}
+
+fax() {
+ depends=
+ install=
+ _find_and_move '*_fax*'
+}
+
+sample() {
+ arch="noarch"
+ pkgdesc="Sample configuration files for asterisk"
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/var/lib/asterisk/phoneprov
+ make -j1 samples DESTDIR="$subpkgdir"
+}
+
+sound_moh() {
+ arch="noarch"
+ pkgdesc="Default on-hold music files for asterisk"
+ depends=
+ install=
+ _move_dir var/lib/asterisk/moh
+}
+
+sound_en() {
+ arch="noarch"
+ pkgdesc="English sound files for asterisk"
+ depends=
+ install=
+ _move_dir var/lib/asterisk/sounds/en
+}
+
+md5sums="c0cfc71a26d56487ffa570fd3169919c asterisk-10.0.0-rc3.tar.gz
+b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch
+6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch
+79e9634b5054bceb3b8dc246654bb243 400-bug-227.patch
+da5a3c500192dee4275aae5235d25f97 ASTERISK-18976.patch
+1ddadef41aa7120e168738b6f3ed8917 ASTERISK-18977.patch
+0af5e797f0a99d0f81f95e3710baf5b6 ASTERISK-18994.patch
+bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch
+0ce3219e05f55af884a7dc6b99c2b276 asterisk.initd
+ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
+3e65172275684373e1a25c8a11224411 asterisk.logrotate"
diff --git a/testing/asterisk/ASTERISK-18976.patch b/testing/asterisk/ASTERISK-18976.patch
new file mode 100644
index 000000000..36c613ff4
--- /dev/null
+++ b/testing/asterisk/ASTERISK-18976.patch
@@ -0,0 +1,142 @@
+--- a/pbx/pbx_lua.c.orig 2011-12-08 08:28:31.000000000 +0200
++++ b/pbx/pbx_lua.c 2011-12-08 08:54:22.000000000 +0200
+@@ -94,7 +94,6 @@
+ static void lua_create_application_metatable(lua_State *L);
+ static void lua_create_autoservice_functions(lua_State *L);
+ static void lua_create_hangup_function(lua_State *L);
+-static void lua_detect_goto(lua_State *L);
+ static void lua_concat_args(lua_State *L, int start, int nargs);
+
+ static void lua_state_destroy(void *data);
+@@ -213,19 +212,10 @@
+ chan = lua_touserdata(L, -1);
+ lua_pop(L, 1);
+
++ context = ast_strdupa(chan->context);
++ exten = ast_strdupa(chan->exten);
++ priority = chan->priority;
+
+- lua_getfield(L, LUA_REGISTRYINDEX, "context");
+- context = ast_strdupa(lua_tostring(L, -1));
+- lua_pop(L, 1);
+-
+- lua_getfield(L, LUA_REGISTRYINDEX, "exten");
+- exten = ast_strdupa(lua_tostring(L, -1));
+- lua_pop(L, 1);
+-
+- lua_getfield(L, LUA_REGISTRYINDEX, "priority");
+- priority = lua_tointeger(L, -1);
+- lua_pop(L, 1);
+-
+ lua_concat_args(L, 2, nargs);
+ data = lua_tostring(L, -1);
+
+@@ -256,75 +246,51 @@
+ return lua_error(L);
+ }
+
+- lua_detect_goto(L);
+-
+- return 0;
+-}
+-
+-/*!
+- * \brief Detect if a Goto or other dialplan jump has been executed and return
+- * control to the pbx engine.
+- */
+-static void lua_detect_goto(lua_State *L)
+-{
+- struct ast_channel *chan;
+-
+- lua_getfield(L, LUA_REGISTRYINDEX, "channel");
+- chan = lua_touserdata(L, -1);
+- lua_pop(L, 1);
+-
+- /* check context */
+- lua_getfield(L, LUA_REGISTRYINDEX, "context");
+- lua_pushstring(L, chan->context);
+- if (!lua_equal(L, -1, -2)) {
++ if (strcmp(context, chan->context)) {
++ lua_pushstring(L, context);
++ lua_pushstring(L, chan->context);
+ lua_pushliteral(L, "context");
+- goto e_goto_detected;
+- }
+- lua_pop(L, 2);
+-
+- /* check exten */
+- lua_getfield(L, LUA_REGISTRYINDEX, "exten");
+- lua_pushstring(L, chan->exten);
+- if (!lua_equal(L, -1, -2)) {
++ } else if (strcmp(exten, chan->exten)) {
++ lua_pushstring(L, exten);
++ lua_pushstring(L, chan->exten);
+ lua_pushliteral(L, "exten");
+- goto e_goto_detected;
+- }
+- lua_pop(L, 2);
+-
+- /* check priority */
+- lua_getfield(L, LUA_REGISTRYINDEX, "priority");
+- lua_pushinteger(L, chan->priority);
+- if (!lua_equal(L, -1, -2)) {
++ } else if (priority != chan->priority) {
++ lua_pushinteger(L, priority);
++ lua_pushinteger(L, chan->priority);
+ lua_pushliteral(L, "priority");
+- goto e_goto_detected;
++ } else {
++ /* no goto - restore the original position back
++ * to lua state, in case this was a recursive dialplan
++ * call (a dialplan application re-entering dialplan) */
++ lua_update_registry(L, context, exten, priority);
++ return 0;
+ }
+- lua_pop(L, 2);
+- return;
+-
+-e_goto_detected:
+- /* format our debug message */
+- lua_insert(L, -3);
+
+- lua_pushliteral(L, " changed from ");
++ /* goto detected - construct error message */
+ lua_insert(L, -3);
+-
+- lua_pushliteral(L, " to ");
+- lua_insert(L, -2);
+-
+- lua_concat(L, 5);
+-
+- ast_debug(2, "Goto detected: %s\n", lua_tostring(L, -1));
+- lua_pop(L, 1);
+-
+- /* let the lua engine know it needs to return control to the pbx */
+- lua_pushinteger(L, LUA_GOTO_DETECTED);
++
++ lua_pushliteral(L, " changed from ");
++ lua_insert(L, -3);
++
++ lua_pushliteral(L, " to ");
++ lua_insert(L, -2);
++
++ lua_concat(L, 5);
++
++ ast_debug(2, "Goto detected: %s\n", lua_tostring(L, -1));
++ lua_pop(L, 1);
++
++ /* let the lua engine know it needs to return control to the pbx */
++ lua_pushinteger(L, LUA_GOTO_DETECTED);
+ lua_error(L);
++
++ return 0;
+ }
+
+ /*!
+ * \brief [lua_CFunction] Used to get the value of a variable or dialplan
+ * function (for access from lua, don't call directly)
+- *
++ *
+ * The value of the variable or function is returned. This function is the
+ * 'get()' function in the following example as would be seen in
+ * extensions.lua.
diff --git a/testing/asterisk/ASTERISK-18977.patch b/testing/asterisk/ASTERISK-18977.patch
new file mode 100644
index 000000000..fffce032c
--- /dev/null
+++ b/testing/asterisk/ASTERISK-18977.patch
@@ -0,0 +1,63 @@
+--- a/res/res_musiconhold.c.orig
++++ b/res/res_musiconhold.c
+@@ -158,6 +158,7 @@
+ char name[MAX_MUSICCLASS];
+ struct ast_format origwfmt;
+ struct ast_format mohwfmt;
++ int announcement;
+ int samples;
+ int sample_queue;
+ int pos;
+@@ -173,6 +174,7 @@
+ #define MOH_SORTALPHA (1 << 4)
+
+ #define MOH_CACHERTCLASSES (1 << 5) /*!< Should we use a separate instance of MOH for each user or not */
++#define MOH_ANNOUNCEMENT (1 << 6)
+
+ /* Custom astobj2 flag */
+ #define MOH_NOTDELETED (1 << 30) /*!< Find only records that aren't deleted? */
+@@ -183,6 +185,7 @@
+ char name[MAX_MUSICCLASS];
+ char dir[256];
+ char args[256];
++ char announcement[80];
+ char mode[80];
+ char digit;
+ /*! A dynamically sized array to hold the list of filenames in "files" mode */
+@@ -278,6 +281,7 @@
+ }
+
+ state->save_pos = state->pos;
++ state->announcement = 0;
+
+ state->class = mohclass_unref(state->class, "Unreffing channel's music class upon deactivation of generator");
+ }
+@@ -293,6 +297,16 @@
+ chan->stream = NULL;
+ }
+
++ if (ast_test_flag(state->class, MOH_ANNOUNCEMENT) && state->announcement == 0) {
++ state->announcement = 1;
++ if (ast_openstream_full(chan, state->class->announcement, chan->language, 1)) {
++ ast_debug(1, "%s Opened announcement '%s'\n", chan->name, state->class->announcement);
++ return 0;
++ }
++ } else {
++ state->announcement = 0;
++ }
++
+ if (!state->class->total_files) {
+ ast_log(LOG_WARNING, "No files available for class '%s'\n", state->class->name);
+ return -1;
+@@ -1731,7 +1745,10 @@
+ ast_copy_string(class->dir, var->value, sizeof(class->dir));
+ else if (!strcasecmp(var->name, "application"))
+ ast_copy_string(class->args, var->value, sizeof(class->args));
+- else if (!strcasecmp(var->name, "digit") && (isdigit(*var->value) || strchr("*#", *var->value)))
++ else if (!strcasecmp(var->name, "announcement")) {
++ ast_copy_string(class->announcement, var->value, sizeof(class->announcement));
++ ast_set_flag(class, MOH_ANNOUNCEMENT);
++ } else if (!strcasecmp(var->name, "digit") && (isdigit(*var->value) || strchr("*#", *var->value)))
+ class->digit = *var->value;
+ else if (!strcasecmp(var->name, "random"))
+ ast_set2_flag(class, ast_true(var->value), MOH_RANDOMIZE);
diff --git a/testing/asterisk/ASTERISK-18994.patch b/testing/asterisk/ASTERISK-18994.patch
new file mode 100644
index 000000000..702e91375
--- /dev/null
+++ b/testing/asterisk/ASTERISK-18994.patch
@@ -0,0 +1,28 @@
+--- a/main/file.c.orig 2011-12-09 11:32:05.000000000 +0200
++++ b/main/file.c 2011-12-09 11:35:22.000000000 +0200
+@@ -1005,6 +1005,7 @@
+ struct ast_filestream *fs;
+ struct ast_filestream *vfs=NULL;
+ char fmt[256];
++ off_t pos;
+ int seekattempt;
+ int res;
+
+@@ -1017,12 +1018,14 @@
+ /* check to see if there is any data present (not a zero length file),
+ * done this way because there is no where for ast_openstream_full to
+ * return the file had no data. */
+- seekattempt = fseek(fs->f, -1, SEEK_END);
++ pos = ftello(fs->f);
++ seekattempt = fseeko(fs->f, -1, SEEK_END);
+ if (seekattempt && errno == EINVAL) {
+ /* Zero-length file, as opposed to a pipe */
+ return 0;
+- } else {
+- ast_seekstream(fs, 0, SEEK_SET);
++ }
++ if (seekattempt == 0) {
++ fseeko(fs->f, pos, SEEK_SET);
+ }
+
+ vfs = ast_openvstream(chan, filename, preflang);
diff --git a/testing/asterisk/ASTERISK-18995.patch b/testing/asterisk/ASTERISK-18995.patch
new file mode 100644
index 000000000..cd144847b
--- /dev/null
+++ b/testing/asterisk/ASTERISK-18995.patch
@@ -0,0 +1,358 @@
+--- /dev/null 2011-11-29 09:02:40.279581283 +0200
++++ b/formats/format_ogg_speex.c 2011-12-08 15:57:12.000000000 +0200
+@@ -0,0 +1,355 @@
++/*
++ * Asterisk -- An open source telephony toolkit.
++ *
++ * Copyright (C) 2011, Timo Teräs
++ *
++ * See http://www.asterisk.org for more information about
++ * the Asterisk project. Please do not directly contact
++ * any of the maintainers of this project for assistance;
++ * the project provides a web site, mailing lists and IRC
++ * channels for your use.
++ *
++ * This program is free software, distributed under the terms of
++ * the GNU General Public License Version 2. See the LICENSE file
++ * at the top of the source tree.
++ */
++
++/*! \file
++ *
++ * \brief OGG/Speex streams.
++ * \arg File name extension: spx
++ * \ingroup formats
++ */
++
++/*** MODULEINFO
++ <depend>speex</depend>
++ <depend>ogg</depend>
++ <support_level>extended</support_level>
++ ***/
++
++#include "asterisk.h"
++
++ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
++
++#include "asterisk/mod_format.h"
++#include "asterisk/module.h"
++
++#include <speex/speex_header.h>
++#include <ogg/ogg.h>
++
++#define BLOCK_SIZE 4096 /* buffer size for feeding OGG routines */
++#define BUF_SIZE 200
++
++struct speex_desc { /* format specific parameters */
++ /* structures for handling the Ogg container */
++ ogg_sync_state oy;
++ ogg_stream_state os;
++ ogg_page og;
++ ogg_packet op;
++
++ int format_id;
++ int serialno;
++
++ /*! \brief Indicates whether an End of Stream condition has been detected. */
++ int eos;
++};
++
++static int read_packet(struct ast_filestream *fs)
++{
++ struct speex_desc *s = (struct speex_desc *)fs->_private;
++ char *buffer;
++ int result;
++ size_t bytes;
++
++ while (1) {
++ /* Get one packet */
++ result = ogg_stream_packetout(&s->os, &s->op);
++ if (result > 0) {
++ if (s->op.bytes>=5 && !memcmp(s->op.packet, "Speex", 5))
++ s->serialno = s->os.serialno;
++ if (s->serialno == -1 || s->os.serialno != s->serialno)
++ continue;
++ return 0;
++ }
++
++ if (result < 0)
++ ast_log(LOG_WARNING,
++ "Corrupt or missing data at this page position; continuing...\n");
++
++ /* No more packets left in the current page... */
++ if (s->eos) {
++ /* No more pages left in the stream */
++ return -1;
++ }
++
++ while (!s->eos) {
++ /* See if OGG has any pages in it's internal buffers */
++ result = ogg_sync_pageout(&s->oy, &s->og);
++ if (result > 0) {
++ /* Read all streams. */
++ if (ogg_page_serialno(&s->og) != s->os.serialno)
++ ogg_stream_reset_serialno(&s->os, ogg_page_serialno(&s->og));
++ /* Yes, OGG has more pages in it's internal buffers,
++ add the page to the stream state */
++ result = ogg_stream_pagein(&s->os, &s->og);
++ if (result == 0) {
++ /* Yes, got a new,valid page */
++ if (ogg_page_eos(&s->og) &&
++ ogg_page_serialno(&s->og) == s->serialno)
++ s->eos = 1;
++ break;
++ }
++ ast_log(LOG_WARNING,
++ "Invalid page in the bitstream; continuing...\n");
++ }
++
++ if (result < 0)
++ ast_log(LOG_WARNING,
++ "Corrupt or missing data in bitstream; continuing...\n");
++
++ /* No, we need to read more data from the file descrptor */
++ /* get a buffer from OGG to read the data into */
++ buffer = ogg_sync_buffer(&s->oy, BLOCK_SIZE);
++ bytes = fread(buffer, 1, BLOCK_SIZE, fs->f);
++ ogg_sync_wrote(&s->oy, bytes);
++ if (bytes == 0)
++ s->eos = 1;
++ }
++ }
++}
++
++/*!
++ * \brief Create a new OGG/Speex filestream and set it up for reading.
++ * \param fs File that points to on disk storage of the OGG/Speex data.
++ * \param expected_rate The expected Speex format (sampling rate).
++ * \return The new filestream.
++ */
++static int ogg_speex_open(struct ast_filestream *fs, int format_id, int expected_rate)
++{
++ char *buffer;
++ size_t bytes;
++ struct speex_desc *s = (struct speex_desc *)fs->_private;
++ SpeexHeader *hdr = NULL;
++ int i, result;
++
++ s->format_id = format_id;
++ s->serialno = -1;
++ ogg_sync_init(&s->oy);
++
++ buffer = ogg_sync_buffer(&s->oy, BLOCK_SIZE);
++ bytes = fread(buffer, 1, BLOCK_SIZE, fs->f);
++ ogg_sync_wrote(&s->oy, bytes);
++
++ result = ogg_sync_pageout(&s->oy, &s->og);
++ if (result != 1) {
++ if(bytes < BLOCK_SIZE) {
++ ast_log(LOG_ERROR, "Run out of data...\n");
++ } else {
++ ast_log(LOG_ERROR, "Input does not appear to be an Ogg bitstream.\n");
++ }
++ ogg_sync_clear(&s->oy);
++ return -1;
++ }
++
++ ogg_stream_init(&s->os, ogg_page_serialno(&s->og));
++ if (ogg_stream_pagein(&s->os, &s->og) < 0) {
++ ast_log(LOG_ERROR, "Error reading first page of Ogg bitstream data.\n");
++ goto error;
++ }
++
++ if (read_packet(fs) < 0) {
++ ast_log(LOG_ERROR, "Error reading initial header packet.\n");
++ goto error;
++ }
++
++ hdr = speex_packet_to_header((char*)s->op.packet, s->op.bytes);
++ if (memcmp(hdr->speex_string, "Speex ", 8)) {
++ ast_log(LOG_ERROR, "OGG container does not contain Speex audio!\n");
++ goto error;
++ }
++ if (hdr->frames_per_packet != 1) {
++ ast_log(LOG_ERROR, "Only one frame-per-packet OGG/Speex files are currently supported!\n");
++ goto error;
++ }
++ if (hdr->nb_channels != 1) {
++ ast_log(LOG_ERROR, "Only monophonic OGG/Speex files are currently supported!\n");
++ goto error;
++ }
++ if (hdr->rate != expected_rate) {
++ ast_log(LOG_ERROR, "Unexpected sampling rate (%d != %d)!\n",
++ hdr->rate, expected_rate);
++ goto error;
++ }
++
++ /* this packet is the comment */
++ if (read_packet(fs) < 0) {
++ ast_log(LOG_ERROR, "Error reading comment packet.\n");
++ goto error;
++ }
++ for (i = 0; i < hdr->extra_headers; i++) {
++ if (read_packet(fs) < 0) {
++ ast_log(LOG_ERROR, "Error reading extra header packet %d.\n", i+1);
++ goto error;
++ }
++ }
++ free(hdr);
++
++ return 0;
++error:
++ if (hdr)
++ free(hdr);
++ ogg_stream_clear(&s->os);
++ ogg_sync_clear(&s->oy);
++ return -1;
++}
++
++/*!
++ * \brief Close a OGG/Speex filestream.
++ * \param fs A OGG/Speex filestream.
++ */
++static void ogg_speex_close(struct ast_filestream *fs)
++{
++ struct speex_desc *s = (struct speex_desc *)fs->_private;
++
++ ogg_stream_clear(&s->os);
++ ogg_sync_clear(&s->oy);
++}
++
++/*!
++ * \brief Read a frame full of audio data from the filestream.
++ * \param fs The filestream.
++ * \param whennext Number of sample times to schedule the next call.
++ * \return A pointer to a frame containing audio data or NULL ifthere is no more audio data.
++ */
++static struct ast_frame *ogg_speex_read(struct ast_filestream *fs,
++ int *whennext)
++{
++ struct speex_desc *s = (struct speex_desc *)fs->_private;
++
++ if (read_packet(fs) < 0)
++ return NULL;
++
++ fs->fr.frametype = AST_FRAME_VOICE;
++ ast_format_set(&fs->fr.subclass.format, s->format_id, 0);
++ fs->fr.mallocd = 0;
++ AST_FRAME_SET_BUFFER(&fs->fr, fs->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
++ memcpy(fs->fr.data.ptr, s->op.packet, s->op.bytes);
++ fs->fr.datalen = s->op.bytes;
++ fs->fr.samples = *whennext = ast_codec_get_samples(&fs->fr);
++
++ return &fs->fr;
++}
++
++/*!
++ * \brief Trucate an OGG/Speex filestream.
++ * \param s The filestream to truncate.
++ * \return 0 on success, -1 on failure.
++ */
++
++static int ogg_speex_trunc(struct ast_filestream *s)
++{
++ ast_log(LOG_WARNING, "Truncation is not supported on OGG/Speex streams!\n");
++ return -1;
++}
++
++/*!
++ * \brief Seek to a specific position in an OGG/Speex filestream.
++ * \param s The filestream to truncate.
++ * \param sample_offset New position for the filestream, measured in 8KHz samples.
++ * \param whence Location to measure
++ * \return 0 on success, -1 on failure.
++ */
++static int ogg_speex_seek(struct ast_filestream *s, off_t sample_offset, int whence)
++{
++ ast_log(LOG_WARNING, "Seeking is not supported on OGG/Speex streams!\n");
++ return -1;
++}
++
++static off_t ogg_speex_tell(struct ast_filestream *s)
++{
++ ast_log(LOG_WARNING, "Telling is not supported on OGG/Speex streams!\n");
++ return -1;
++}
++
++static int ogg_speex_open_nb(struct ast_filestream *fs)
++{
++ return ogg_speex_open(fs, AST_FORMAT_SPEEX, 8000);
++}
++
++static struct ast_format_def speex_f = {
++ .name = "ogg_speex",
++ .exts = "spx",
++ .open = ogg_speex_open_nb,
++ .seek = ogg_speex_seek,
++ .trunc = ogg_speex_trunc,
++ .tell = ogg_speex_tell,
++ .read = ogg_speex_read,
++ .close = ogg_speex_close,
++ .buf_size = BUF_SIZE + AST_FRIENDLY_OFFSET,
++ .desc_size = sizeof(struct speex_desc),
++};
++
++static int ogg_speex_open_wb(struct ast_filestream *fs)
++{
++ return ogg_speex_open(fs, AST_FORMAT_SPEEX16, 16000);
++}
++
++static struct ast_format_def speex16_f = {
++ .name = "ogg_speex16",
++ .exts = "spx16",
++ .open = ogg_speex_open_wb,
++ .seek = ogg_speex_seek,
++ .trunc = ogg_speex_trunc,
++ .tell = ogg_speex_tell,
++ .read = ogg_speex_read,
++ .close = ogg_speex_close,
++ .buf_size = BUF_SIZE + AST_FRIENDLY_OFFSET,
++ .desc_size = sizeof(struct speex_desc),
++};
++
++static int ogg_speex_open_uwb(struct ast_filestream *fs)
++{
++ return ogg_speex_open(fs, AST_FORMAT_SPEEX32, 32000);
++}
++
++static struct ast_format_def speex32_f = {
++ .name = "ogg_speex32",
++ .exts = "spx32",
++ .open = ogg_speex_open_uwb,
++ .seek = ogg_speex_seek,
++ .trunc = ogg_speex_trunc,
++ .tell = ogg_speex_tell,
++ .read = ogg_speex_read,
++ .close = ogg_speex_close,
++ .buf_size = BUF_SIZE + AST_FRIENDLY_OFFSET,
++ .desc_size = sizeof(struct speex_desc),
++};
++
++static int load_module(void)
++{
++ ast_format_set(&speex_f.format, AST_FORMAT_SPEEX, 0);
++ ast_format_set(&speex16_f.format, AST_FORMAT_SPEEX16, 0);
++ ast_format_set(&speex32_f.format, AST_FORMAT_SPEEX32, 0);
++
++ if (ast_format_def_register(&speex_f) ||
++ ast_format_def_register(&speex16_f) ||
++ ast_format_def_register(&speex32_f))
++ return AST_MODULE_LOAD_FAILURE;
++
++ return AST_MODULE_LOAD_SUCCESS;
++}
++
++static int unload_module(void)
++{
++ int res = 0;
++ res |= ast_format_def_unregister(speex_f.name);
++ res |= ast_format_def_unregister(speex16_f.name);
++ res |= ast_format_def_unregister(speex32_f.name);
++ return res;
++}
++
++AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "OGG/Speex audio",
++ .load = load_module,
++ .unload = unload_module,
++ .load_pri = AST_MODPRI_APP_DEPEND
++);
diff --git a/testing/asterisk/asterisk.confd b/testing/asterisk/asterisk.confd
new file mode 100644
index 000000000..fe9f138ab
--- /dev/null
+++ b/testing/asterisk/asterisk.confd
@@ -0,0 +1,91 @@
+#
+# Additional options for asterisk
+#
+# see "asterisk -h" for a list of options
+#
+ASTERISK_OPTS=""
+
+#
+# User and group to run asterisk as
+#
+# Value: double-colon separated list of user and group, or empty to run as root:
+#
+#
+# "asterisk:asterisk" to run as user "asterisk" and group "asterisk"
+# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of
+# ":asterisk" to run as user "root" and group "asterisk"
+# "" to run as user "root" and group "root"
+#
+ASTERISK_USER="asterisk"
+
+#
+# Nicelevel
+#
+# Set the priority of the asterisk process
+#
+# Value: (highest) -20..19 (lowest)
+#
+#ASTERISK_NICE="19"
+
+#
+# Wrapper script
+#
+# Value: yes or no/empty
+#
+ASTERISK_WRAPPER="no"
+
+############# Wrapper script settings #############
+
+#
+# Send crash notifications emails to this address
+# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp))
+#
+# Value: Email address or empty to disable
+#
+#ASTERISK_NOTIFY_EMAIL="root"
+
+#
+# Send asterisk's output to this terminal
+#
+# Value: Full path to device node or a number
+#
+#ASTERISK_TTY="/dev/tty9"
+
+#
+# Start an asterisk console on the terminal specified by ASTERISK_TTY
+#
+# Warning! Use only for debugging, this is a potential security issue!
+#
+# Value: yes or no/empty
+#
+ASTERISK_CONSOLE="no"
+
+#
+# Maximum size of core files.
+#
+# Value: Size in bytes, unlimited for no limit or empty to disable.
+#
+#ASTERISK_CORE_SIZE="unlimited"
+
+#
+# ASTERISK_CORE_DIR
+#
+# Value: Directory (will be created if non-existant), default is /tmp
+#
+ASTERISK_CORE_DIR="/var/lib/asterisk/coredump"
+
+#
+# Max number of filedescriptors
+#
+# Value: Number of descriptors
+#
+#ASTERISK_MAX_FD="1024"
+
+#
+# Kill these tasks after asterisk crashed (ASTERISK_WRAPPER=yes only!)
+#
+# Warning! This will kill _ALL_ tasks with the specified names!
+#
+# Value: Space separated list of names in double quotes (e.g. "mpg123 mad")
+#
+#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad"
diff --git a/testing/asterisk/asterisk.initd b/testing/asterisk/asterisk.initd
new file mode 100644
index 000000000..284898ae2
--- /dev/null
+++ b/testing/asterisk/asterisk.initd
@@ -0,0 +1,251 @@
+#!/sbin/runscript
+
+opts="${opts} forcestop reload"
+
+depend() {
+ need net
+ after firewall
+ use nscd dns zaptel mysql postgresql slapd capi
+}
+
+is_running() {
+ if [ -z "$(pidof asterisk)" ]; then
+ return 1
+ else
+ PID="$(cat /var/run/asterisk/asterisk.pid 2>/dev/null)"
+ for x in $(pidof asterisk); do
+ if [ "${x}" = "${PID}" ]; then
+ return 0
+ fi
+ done
+ fi
+
+ return 1
+}
+
+asterisk_run_loop() {
+ local OPTS ARGS MSG NICE=""
+ local result=0 signal=0
+
+ # default options
+ OPTS="-f" # don't fork / detach breaks wrapper script...
+
+ # filter (redundant) arguments
+ ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
+
+ # mangle yes/no options
+ ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
+
+ if [ -n "${ASTERISK_CORE_SIZE}" ] &&
+ [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
+ ulimit -c ${ASTERISK_CORE_SIZE}
+
+ if [ -n "${ASTERISK_CORE_DIR}" ] && \
+ [ ! -d "${ASTERISK_CORE_DIR}" ]
+ then
+ mkdir -m750 -p "${ASTERISK_CORE_DIR}"
+
+ if [ -n "${ASTERISK_USER}" ]; then
+ chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
+ fi
+ fi
+ ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
+
+ cd "${ASTERISK_CORE_DIR}"
+ echo " Core dump size : ${ASTERISK_CORE_SIZE}"
+ echo " Core dump location : ${ASTERISK_CORE_DIR}"
+ fi
+
+ if [ -n "${ASTERISK_MAX_FD}" ]; then
+ ulimit -n ${ASTERISK_MAX_FD}
+ echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
+ fi
+
+ if [ -n "${ASTERISK_NICE}" ]; then
+ echo " Nice level : ${ASTERISK_NICE}"
+ NICE="nice -n ${ASTERISK_NICE} --"
+ fi
+
+ if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
+ if [ -x /usr/sbin/sendmail ]; then
+ echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
+ else
+ echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
+ unset ASTERISK_NOTIFY_EMAIL
+ fi
+ fi
+
+ if [ -n "${ASTERISK_TTY}" ]; then
+ for x in ${ASTERISK_TTY} \
+ /dev/tty${ASTERISK_TTY} \
+ /dev/vc/${ASTERISK_TTY}
+ do
+ if [ -c "${x}" ]; then
+ TTY="${x}"
+ fi
+ done
+ [ -n "${TTY}" ] && \
+ echo " Messages are sent to : ${TTY}"
+ fi
+
+ if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
+ echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
+ OPTS="${OPTS} -c"
+ fi
+
+ OPTS="${OPTS} ${ARGS}"
+
+ while :; do
+
+ if [ -n "${TTY}" ]; then
+ /usr/bin/stty -F ${TTY} sane
+ ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
+ result=$?
+ else
+ ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
+ result=$?
+ fi
+
+ if [ $result -eq 0 ]; then
+ echo "Asterisk terminated normally"
+ break
+ else
+ if [ $result -gt 128 ]; then
+ signal=$((result - 128))
+ MSG="Asterisk terminated with Signal: $signal"
+
+ CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
+
+ local CORE_DUMPED=0
+ if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
+ mv "${ASTERISK_CORE_DIR}/core" \
+ "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ CORE_DUMPED=1
+
+ elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
+ mv "${ASTERISK_CORE_DIR}/core.${PID}" \
+ "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ CORE_DUMPED=1
+
+ fi
+
+ [ $CORE_DUMPED -eq 1 ] && \
+ MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ else
+ MSG="Asterisk terminated with return code: $result"
+ fi
+
+ # kill left-over tasks
+ for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
+ kill -9 $(pidof ${X});
+ done
+ fi
+
+ [ -n "${TTY}" ] \
+ && echo "${MSG}" >${TTY} \
+ || echo "${MSG}"
+
+
+ if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
+ [ -x /usr/sbin/sendmail ]; then
+ echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
+ /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
+ fi
+ sleep 5
+ echo "Restarting Asterisk..."
+ done
+ return 0
+}
+
+start() {
+ local OPTS USER GROUP PID
+ local tmp x
+
+ if [ -n "${ASTERISK_NICE}" ]; then
+ if [ ${ASTERISK_NICE} -ge -20 ] && \
+ [ ${ASTERISK_NICE} -le 19 ]; then
+ OPTS="--nicelevel ${ASTERISK_NICE}"
+ else
+ eerror "Nice value must be between -20 and 19"
+ return 1
+ fi
+ fi
+
+ if [ -n "${ASTERISK_USER}" ]; then
+ USER=$(echo $ASTERISK_USER | sed 's/:.*//')
+ GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
+ if [ -n "${USER}" ]; then
+ ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
+ fi
+ if [ -n "${GROUP}" ]; then
+ ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
+ GROUP=":${GROUP}" # make it look nice...
+ fi
+ ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
+ else
+ ebegin "Starting asterisk PBX (as root)"
+ fi
+
+ if [ "$(echo ${ASTERISK_WRAPPER} | tr '[:upper:]' '[:lower:]')" != "yes" ]; then
+ start-stop-daemon --start --exec /usr/sbin/asterisk \
+ ${OPTS} -- ${ASTERISK_OPTS}
+ result=$?
+ else
+ asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
+ result=$?
+ fi
+
+ if [ $result -eq 0 ]; then
+ # 2 seconds should be enough for asterisk to start
+ sleep 2
+ is_running
+ result=$?
+ fi
+
+ eend $result
+}
+
+forcestop() {
+ ebegin "Stopping asterisk PBX"
+ start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
+ eend $?
+}
+
+stop() {
+ if ! is_running; then
+ eerror "Asterisk is not running!"
+ return 0
+ fi
+
+ ebegin "Stopping asterisk PBX now"
+ /usr/sbin/asterisk -r -x "core stop now" &>/dev/null
+ # Now we have to wait until asterisk has _really_ stopped.
+ sleep 1
+ if is_running; then
+ einfon "Waiting for asterisk to shutdown ."
+ local cnt=0
+ while is_running; do
+ cnt=`expr $cnt + 1`
+ if [ $cnt -gt 60 ] ; then
+ # Waited 120 seconds now. Fail.
+ echo
+ eend 1 "Failed."
+ return
+ fi
+ sleep 2
+ echo -n "."
+ done
+ echo
+ fi
+ eend 0
+}
+
+reload() {
+ if is_running; then
+ ebegin "Forcing asterisk to reload configuration"
+ /usr/sbin/asterisk -r -x "modules reload" &>/dev/null
+ eend $?
+ else
+ eerror "Asterisk is not running!"
+ fi
+}
diff --git a/testing/asterisk/asterisk.logrotate b/testing/asterisk/asterisk.logrotate
new file mode 100644
index 000000000..30836c5c1
--- /dev/null
+++ b/testing/asterisk/asterisk.logrotate
@@ -0,0 +1,17 @@
+/var/log/asterisk/messages /var/log/asterisk/*log {
+ missingok
+ rotate 5
+ weekly
+ create 0640 asterisk asterisk
+ postrotate
+ /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
+ endscript
+}
+
+/var/log/asterisk/cdr-csv/*csv {
+ missingok
+ rotate 5
+ monthly
+ create 0640 asterisk asterisk
+}
+
diff --git a/testing/asterisk/asterisk.post-install b/testing/asterisk/asterisk.post-install
new file mode 100644
index 000000000..fd51c7fa5
--- /dev/null
+++ b/testing/asterisk/asterisk.post-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+chown -R asterisk:asterisk /var/*/asterisk
+chown -R asterisk:asterisk /etc/asterisk
+chmod -R u=rwX,g=rX,o= /etc/asterisk
+
+# set IP ToS
+# iptables -A OUTPUT -t mangle -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28
+#iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28
+# more info: http://www.voip-info.org/wiki-Asterisk+non-root
+
diff --git a/testing/asterisk/asterisk.pre-install b/testing/asterisk/asterisk.pre-install
new file mode 100644
index 000000000..09985d7cd
--- /dev/null
+++ b/testing/asterisk/asterisk.pre-install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+user=asterisk
+home=/var/lib/asterisk
+adduser -h $home -s /bin/false -D $user 2>/dev/null
+mkdir -p $home
+chown $user:$user $home
+
+addgroup dialout 2>/dev/null
+addgroup $user dialout 2>/dev/null
+exit 0
+
diff --git a/testing/asterisk/asterisk.pre-upgrade b/testing/asterisk/asterisk.pre-upgrade
new file mode 100644
index 000000000..09985d7cd
--- /dev/null
+++ b/testing/asterisk/asterisk.pre-upgrade
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+user=asterisk
+home=/var/lib/asterisk
+adduser -h $home -s /bin/false -D $user 2>/dev/null
+mkdir -p $home
+chown $user:$user $home
+
+addgroup dialout 2>/dev/null
+addgroup $user dialout 2>/dev/null
+exit 0
+
diff --git a/testing/asunder/APKBUILD b/testing/asunder/APKBUILD
new file mode 100644
index 000000000..5f715dac2
--- /dev/null
+++ b/testing/asunder/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=asunder
+pkgver=2.1
+pkgrel=0
+pkgdesc="A graphical Audio CD ripper and encoder"
+url="http://littlesvr.ca/asunder"
+arch="all"
+license="GPLv2"
+depends="cdparanoia"
+makedepends="libcddb-dev gtk+-dev"
+install=""
+subpackages="$pkgname-lang"
+source="http://littlesvr.ca/asunder/releases/asunder-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/asunder-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="05419a29fd31321f0823c3f90ee1b911 asunder-2.1.tar.bz2"
diff --git a/testing/attica/APKBUILD b/testing/attica/APKBUILD
new file mode 100644
index 000000000..460b511ad
--- /dev/null
+++ b/testing/attica/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=attica
+pkgver=0.2.0
+pkgrel=0
+pkgdesc="freedesktop OCS binding for Qt"
+url="http://www.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="ftp://ftp.kde.org/pub/kde/stable/attica/attica-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/attica-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="df3dcea0229cfa31539bdd427976e15b attica-0.2.0.tar.bz2"
diff --git a/testing/audacity/APKBUILD b/testing/audacity/APKBUILD
new file mode 100644
index 000000000..7b9615349
--- /dev/null
+++ b/testing/audacity/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=audacity
+pkgver=1.3.13
+pkgrel=0
+pkgdesc="Multitrack audio editor"
+url="http://audacity.sourceforge.net"
+arch="all"
+license="GPLv2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev wxgtk-dev alsa-lib-dev libsndfile-dev flac-dev
+ libogg-dev libvorbis-dev libsamplerate-dev expat-dev libmad-dev
+ libid3tag-dev taglib-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-lang"
+source="http://downloads.sf.net/sourceforge/audacity/audacity-minsrc-$pkgver-beta.tar.bz2"
+
+_builddir="$srcdir"/audacity-src-$pkgver-beta
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --with-libsndfile=system \
+ --with-libsamplerate=system \
+ --without-libresample \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="57be7fadb8c8dd17b8462c7ac1561d03 audacity-minsrc-1.3.13-beta.tar.bz2"
diff --git a/testing/automoc4/APKBUILD b/testing/automoc4/APKBUILD
new file mode 100644
index 000000000..f43c4c7e4
--- /dev/null
+++ b/testing/automoc4/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=automoc4
+pkgver=0.9.88
+pkgrel=0
+pkgdesc="Automatic moc for Qt4"
+url="http://www.kde.org/"
+arch="all"
+license="BSD"
+depends=
+depends_dev="qt-dev"
+makedepends="$depends_dev cmake"
+install=""
+subpackages=""
+source="http://kde.mirrors.tds.net/pub/kde/stable/automoc4/$pkgver/automoc4-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/automoc4-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="91bf517cb940109180ecd07bc90c69ec automoc4-0.9.88.tar.bz2"
diff --git a/testing/awesome/0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch b/testing/awesome/0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
new file mode 100644
index 000000000..0c1f4836c
--- /dev/null
+++ b/testing/awesome/0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
@@ -0,0 +1,587 @@
+From 33e140552786f20a34c15852e88aaa27f3bed029 Mon Sep 17 00:00:00 2001
+From: Arnaud Fontaine <arnau@debian.org>
+Date: Wed, 27 Apr 2011 15:44:35 +0900
+Subject: [PATCH] Update the code following release of xcb-util 0.3.8.
+
+xcb-util is now split into several repositories since 0.3.8. This
+release also cleaned up the API a lot, thus update the code
+accordingly.
+
+Signed-off-by: Arnaud Fontaine <arnau@debian.org>
+---
+ awesome.c | 2 +-
+ awesomeConfig.cmake | 7 ++---
+ client.c | 56 +++++++++++++++++++++---------------------
+ client.h | 6 ++--
+ common/xutil.c | 1 -
+ event.c | 10 +++---
+ ewmh.c | 4 +-
+ property.c | 68 +++++++++++++++++++++++++-------------------------
+ selection.c | 14 +++++-----
+ systray.c | 2 +-
+ window.c | 4 +-
+ 11 files changed, 86 insertions(+), 88 deletions(-)
+
+diff --git a/awesome.c b/awesome.c
+index f89080c..1258b4c 100644
+--- a/awesome.c
++++ b/awesome.c
+@@ -154,7 +154,7 @@ scan(void)
+
+ if(!attr_r || attr_r->override_redirect
+ || attr_r->map_state == XCB_MAP_STATE_UNMAPPED
+- || state == XCB_WM_STATE_WITHDRAWN)
++ || state == XCB_ICCCM_WM_STATE_WITHDRAWN)
+ {
+ geom_wins[i] = NULL;
+ p_delete(&attr_r);
+diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake
+index 68b5ee3..5672afc 100644
+--- a/awesomeConfig.cmake
++++ b/awesomeConfig.cmake
+@@ -127,7 +127,7 @@ execute_process(
+
+ # Use pkgconfig to get most of the libraries
+ pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED
+- xcb>=1.4)
++ xcb>=1.6)
+
+ pkg_check_modules(AWESOME_REQUIRED REQUIRED
+ glib-2.0
+@@ -139,10 +139,9 @@ pkg_check_modules(AWESOME_REQUIRED REQUIRED
+ xcb-xtest
+ xcb-xinerama
+ xcb-shape
+- xcb-aux>=0.3.0
+- xcb-atom>=0.3.0
++ xcb-util>=0.3.8
+ xcb-keysyms>=0.3.4
+- xcb-icccm>=0.3.6
++ xcb-icccm>=0.3.8
+ xcb-image>=0.3.0
+ cairo-xcb
+ libstartup-notification-1.0>=0.10
+diff --git a/client.c b/client.c
+index 049e3d5..baae69f 100644
+--- a/client.c
++++ b/client.c
+@@ -52,7 +52,7 @@ luaA_client_gc(lua_State *L)
+ client_t *c = luaA_checkudata(L, 1, &client_class);
+ button_array_wipe(&c->buttons);
+ key_array_wipe(&c->keys);
+- xcb_get_wm_protocols_reply_wipe(&c->protocols);
++ xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
+ p_delete(&c->machine);
+ p_delete(&c->class);
+ p_delete(&c->instance);
+@@ -94,21 +94,21 @@ client_set_urgent(lua_State *L, int cidx, bool urgent)
+ if(c->urgent != urgent)
+ {
+ xcb_get_property_cookie_t hints =
+- xcb_get_wm_hints_unchecked(globalconf.connection, c->window);
++ xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window);
+
+ c->urgent = urgent;
+ ewmh_client_update_hints(c);
+
+ /* update ICCCM hints */
+- xcb_wm_hints_t wmh;
+- xcb_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
++ xcb_icccm_wm_hints_t wmh;
++ xcb_icccm_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
+
+ if(urgent)
+- wmh.flags |= XCB_WM_HINT_X_URGENCY;
++ wmh.flags |= XCB_ICCCM_WM_HINT_X_URGENCY;
+ else
+- wmh.flags &= ~XCB_WM_HINT_X_URGENCY;
++ wmh.flags &= ~XCB_ICCCM_WM_HINT_X_URGENCY;
+
+- xcb_set_wm_hints(globalconf.connection, c->window, &wmh);
++ xcb_icccm_set_wm_hints(globalconf.connection, c->window, &wmh);
+
+ hook_property(c, "urgent");
+ luaA_object_emit_signal(L, cidx, "property::urgent", 0);
+@@ -721,7 +721,7 @@ HANDLE_GEOM(height)
+ *
+ * At this stage it's just safer to keep it in normal state and avoid confusion.
+ */
+- window_state_set(c->window, XCB_WM_STATE_NORMAL);
++ window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
+
+ if(!startup)
+ {
+@@ -767,14 +767,14 @@ client_geometry_hints(client_t *c, area_t geometry)
+ int32_t real_basew = 0, real_baseh = 0;
+
+ /* base size is substituted with min size if not specified */
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
+ {
+ basew = c->size_hints.base_width;
+ baseh = c->size_hints.base_height;
+ real_basew = basew;
+ real_baseh = baseh;
+ }
+- else if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
++ else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
+ {
+ basew = c->size_hints.min_width;
+ baseh = c->size_hints.min_height;
+@@ -783,12 +783,12 @@ client_geometry_hints(client_t *c, area_t geometry)
+ basew = baseh = 0;
+
+ /* min size is substituted with base size if not specified */
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
+ {
+ minw = c->size_hints.min_width;
+ minh = c->size_hints.min_height;
+ }
+- else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
++ else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
+ {
+ minw = c->size_hints.base_width;
+ minh = c->size_hints.base_height;
+@@ -796,7 +796,7 @@ client_geometry_hints(client_t *c, area_t geometry)
+ else
+ minw = minh = 0;
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT
+ && c->size_hints.min_aspect_den > 0
+ && c->size_hints.max_aspect_den > 0
+ && geometry.height - real_baseh > 0
+@@ -838,7 +838,7 @@ client_geometry_hints(client_t *c, area_t geometry)
+ if(minh)
+ geometry.height = MAX(geometry.height, minh);
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
+ {
+ if(c->size_hints.max_width)
+ geometry.width = MIN(geometry.width, c->size_hints.max_width);
+@@ -846,7 +846,7 @@ client_geometry_hints(client_t *c, area_t geometry)
+ geometry.height = MIN(geometry.height, c->size_hints.max_height);
+ }
+
+- if(c->size_hints.flags & (XCB_SIZE_HINT_P_RESIZE_INC | XCB_SIZE_HINT_BASE_SIZE)
++ if(c->size_hints.flags & (XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_BASE_SIZE)
+ && c->size_hints.width_inc && c->size_hints.height_inc)
+ {
+ uint16_t t1 = geometry.width, t2 = geometry.height;
+@@ -969,9 +969,9 @@ client_set_minimized(lua_State *L, int cidx, bool s)
+ c->minimized = s;
+ banning_need_update((c)->screen);
+ if(s)
+- window_state_set(c->window, XCB_WM_STATE_ICONIC);
++ window_state_set(c->window, XCB_ICCCM_WM_STATE_ICONIC);
+ else
+- window_state_set(c->window, XCB_WM_STATE_NORMAL);
++ window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
+ ewmh_client_update_hints(c);
+ if(strut_has_value(&c->strut))
+ screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0);
+@@ -1333,7 +1333,7 @@ client_unmanage(client_t *c)
+
+ /* Do this last to avoid races with clients. According to ICCCM, clients
+ * arent allowed to re-use the window until after this. */
+- window_state_set(c->window, XCB_WM_STATE_WITHDRAWN);
++ window_state_set(c->window, XCB_ICCCM_WM_STATE_WITHDRAWN);
+
+ /* set client as invalid */
+ c->invalid = true;
+@@ -2052,9 +2052,9 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+
+ lua_createtable(L, 0, 1);
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_US_POSITION)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION)
+ u_or_p = "user_position";
+- else if(c->size_hints.flags & XCB_SIZE_HINT_P_POSITION)
++ else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION)
+ u_or_p = "program_position";
+
+ if(u_or_p)
+@@ -2068,9 +2068,9 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ u_or_p = NULL;
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_US_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_SIZE)
+ u_or_p = "user_size";
+- else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
++ else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
+ u_or_p = "program_size";
+
+ if(u_or_p)
+@@ -2083,7 +2083,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, u_or_p);
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
+ {
+ lua_pushnumber(L, c->size_hints.min_width);
+ lua_setfield(L, -2, "min_width");
+@@ -2091,7 +2091,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, "min_height");
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
+ {
+ lua_pushnumber(L, c->size_hints.max_width);
+ lua_setfield(L, -2, "max_width");
+@@ -2099,7 +2099,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, "max_height");
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)
+ {
+ lua_pushnumber(L, c->size_hints.width_inc);
+ lua_setfield(L, -2, "width_inc");
+@@ -2107,7 +2107,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, "height_inc");
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT)
+ {
+ lua_pushnumber(L, c->size_hints.min_aspect_num);
+ lua_setfield(L, -2, "min_aspect_num");
+@@ -2119,7 +2119,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, "max_aspect_den");
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_BASE_SIZE)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE)
+ {
+ lua_pushnumber(L, c->size_hints.base_width);
+ lua_setfield(L, -2, "base_width");
+@@ -2127,7 +2127,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
+ lua_setfield(L, -2, "base_height");
+ }
+
+- if(c->size_hints.flags & XCB_SIZE_HINT_P_WIN_GRAVITY)
++ if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY)
+ {
+ switch(c->size_hints.win_gravity)
+ {
+diff --git a/client.h b/client.h
+index d4ef52f..9674fac 100644
+--- a/client.h
++++ b/client.h
+@@ -123,7 +123,7 @@ struct client_t
+ /** Window holding command needed to start it (session management related) */
+ xcb_window_t leader_window;
+ /** Client's WM_PROTOCOLS property */
+- xcb_get_wm_protocols_reply_t protocols;
++ xcb_icccm_get_wm_protocols_reply_t protocols;
+ /** Client logical screen */
+ screen_t *screen;
+ /** Client physical screen */
+@@ -248,8 +248,8 @@ client_raise(client_t *c)
+ static inline bool
+ client_isfixed(client_t *c)
+ {
+- return (c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE
+- && c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE
++ return (c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE
++ && c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE
+ && c->size_hints.max_width == c->size_hints.min_width
+ && c->size_hints.max_height == c->size_hints.min_height
+ && c->size_hints.max_width
+diff --git a/common/xutil.c b/common/xutil.c
+index 3d80e8d..c5a2127 100644
+--- a/common/xutil.c
++++ b/common/xutil.c
+@@ -25,7 +25,6 @@
+ #include "common/util.h"
+
+ #include <xcb/xcb.h>
+-#include <xcb/xcb_atom.h>
+ #include <xcb/xcb_icccm.h>
+
+ #include "common/xutil.h"
+diff --git a/event.c b/event.c
+index 8527ec5..a35918b 100644
+--- a/event.c
++++ b/event.c
+@@ -721,7 +721,7 @@ event_handle_clientmessage(xcb_client_message_event_t *ev)
+ client_t *c;
+ if((c = client_getbywin(ev->window))
+ && ev->format == 32
+- && ev->data.data32[0] == XCB_WM_STATE_ICONIC)
++ && ev->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC)
+ {
+ luaA_object_push(globalconf.L, c);
+ client_set_minimized(globalconf.L, -1, true);
+@@ -795,13 +795,13 @@ static void
+ xerror(xcb_generic_error_t *e)
+ {
+ /* ignore this */
+- if(e->error_code == XCB_EVENT_ERROR_BAD_WINDOW
+- || (e->error_code == XCB_EVENT_ERROR_BAD_MATCH
++ if(e->error_code == XCB_WINDOW
++ || (e->error_code == XCB_MATCH
+ && e->major_code == XCB_SET_INPUT_FOCUS)
+- || (e->error_code == XCB_EVENT_ERROR_BAD_VALUE
++ || (e->error_code == XCB_VALUE
+ && e->major_code == XCB_KILL_CLIENT)
+ || (e->major_code == XCB_CONFIGURE_WINDOW
+- && e->error_code == XCB_EVENT_ERROR_BAD_MATCH))
++ && e->error_code == XCB_MATCH))
+ return;
+
+ warn("X error: request=%s, error=%s",
+diff --git a/ewmh.c b/ewmh.c
+index 0aa5de7..ba4776c 100644
+--- a/ewmh.c
++++ b/ewmh.c
+@@ -226,7 +226,7 @@ ewmh_update_net_active_window(int phys_screen)
+
+ xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
+ xutil_screen_get(globalconf.connection, phys_screen)->root,
+- _NET_ACTIVE_WINDOW, WINDOW, 32, 1, &win);
++ _NET_ACTIVE_WINDOW, XCB_ATOM_WINDOW, 32, 1, &win);
+ }
+
+ static void
+@@ -425,7 +425,7 @@ ewmh_client_update_hints(client_t *c)
+ state[i++] = _NET_WM_STATE_DEMANDS_ATTENTION;
+
+ xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
+- c->window, _NET_WM_STATE, ATOM, 32, i, state);
++ c->window, _NET_WM_STATE, XCB_ATOM_ATOM, 32, i, state);
+ }
+
+ /** Update the client active desktop.
+diff --git a/property.c b/property.c
+index d5090c6..d2223ef 100644
+--- a/property.c
++++ b/property.c
+@@ -105,14 +105,14 @@ property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply)
+
+ if(reply)
+ {
+- if(!xcb_get_wm_transient_for_from_reply(&trans, reply))
++ if(!xcb_icccm_get_wm_transient_for_from_reply(&trans, reply))
+ return;
+ }
+ else
+ {
+- if(!xcb_get_wm_transient_for_reply(globalconf.connection,
+- xcb_get_wm_transient_for_unchecked(globalconf.connection,
+- c->window),
++ if(!xcb_icccm_get_wm_transient_for_reply(globalconf.connection,
++ xcb_icccm_get_wm_transient_for_unchecked(globalconf.connection,
++ c->window),
+ &trans, NULL))
+ return;
+ }
+@@ -160,15 +160,15 @@ property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply)
+ {
+ if(reply)
+ {
+- if(!xcb_get_wm_size_hints_from_reply(&c->size_hints, reply))
++ if(!xcb_icccm_get_wm_size_hints_from_reply(&c->size_hints, reply))
+ return;
+ }
+ else
+ {
+- if(!xcb_get_wm_normal_hints_reply(globalconf.connection,
+- xcb_get_wm_normal_hints_unchecked(globalconf.connection,
+- c->window),
+- &c->size_hints, NULL))
++ if(!xcb_icccm_get_wm_normal_hints_reply(globalconf.connection,
++ xcb_icccm_get_wm_normal_hints_unchecked(globalconf.connection,
++ c->window),
++ &c->size_hints, NULL))
+ return;
+ }
+ }
+@@ -180,31 +180,31 @@ property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply)
+ void
+ property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply)
+ {
+- xcb_wm_hints_t wmh;
++ xcb_icccm_wm_hints_t wmh;
+
+ if(reply)
+ {
+- if(!xcb_get_wm_hints_from_reply(&wmh, reply))
++ if(!xcb_icccm_get_wm_hints_from_reply(&wmh, reply))
+ return;
+ }
+ else
+ {
+- if(!xcb_get_wm_hints_reply(globalconf.connection,
+- xcb_get_wm_hints_unchecked(globalconf.connection, c->window),
+- &wmh, NULL))
++ if(!xcb_icccm_get_wm_hints_reply(globalconf.connection,
++ xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window),
++ &wmh, NULL))
+ return;
+ }
+
+ luaA_object_push(globalconf.L, c);
+- client_set_urgent(globalconf.L, -1, xcb_wm_hints_get_urgency(&wmh));
+- if(wmh.flags & XCB_WM_HINT_STATE &&
+- wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
++ client_set_urgent(globalconf.L, -1, xcb_icccm_wm_hints_get_urgency(&wmh));
++ if(wmh.flags & XCB_ICCCM_WM_HINT_STATE &&
++ wmh.initial_state == XCB_ICCCM_WM_STATE_WITHDRAWN)
+ client_set_border_width(globalconf.L, -1, 0);
+
+- if(wmh.flags & XCB_WM_HINT_INPUT)
++ if(wmh.flags & XCB_ICCCM_WM_HINT_INPUT)
+ c->nofocus = !wmh.input;
+
+- if(wmh.flags & XCB_WM_HINT_WINDOW_GROUP)
++ if(wmh.flags & XCB_ICCCM_WM_HINT_WINDOW_GROUP)
+ client_set_group_window(globalconf.L, -1, wmh.window_group);
+
+ lua_pop(globalconf.L, 1);
+@@ -217,18 +217,18 @@ property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply)
+ void
+ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
+ {
+- xcb_get_wm_class_reply_t hint;
++ xcb_icccm_get_wm_class_reply_t hint;
+
+ if(reply)
+ {
+- if(!xcb_get_wm_class_from_reply(&hint, reply))
++ if(!xcb_icccm_get_wm_class_from_reply(&hint, reply))
+ return;
+ }
+ else
+ {
+- if(!xcb_get_wm_class_reply(globalconf.connection,
+- xcb_get_wm_class_unchecked(globalconf.connection, c->window),
+- &hint, NULL))
++ if(!xcb_icccm_get_wm_class_reply(globalconf.connection,
++ xcb_icccm_get_wm_class_unchecked(globalconf.connection, c->window),
++ &hint, NULL))
+ return;
+ }
+
+@@ -238,7 +238,7 @@ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
+
+ /* only delete reply if we get it ourselves */
+ if(!reply)
+- xcb_get_wm_class_reply_wipe(&hint);
++ xcb_icccm_get_wm_class_reply_wipe(&hint);
+ }
+
+ static int
+@@ -308,30 +308,30 @@ property_update_net_wm_pid(client_t *c,
+ void
+ property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply)
+ {
+- xcb_get_wm_protocols_reply_t protocols;
++ xcb_icccm_get_wm_protocols_reply_t protocols;
+ xcb_get_property_reply_t *reply_copy;
+
+ if(reply)
+ {
+ reply_copy = p_dup(reply, 1);
+
+- if(!xcb_get_wm_protocols_from_reply(reply_copy, &protocols))
+- {
++ if(!xcb_icccm_get_wm_protocols_from_reply(reply_copy, &protocols))
++ {
+ p_delete(&reply_copy);
+ return;
+- }
++ }
+ }
+ else
+ {
+ /* If this fails for any reason, we still got the old value */
+- if(!xcb_get_wm_protocols_reply(globalconf.connection,
+- xcb_get_wm_protocols_unchecked(globalconf.connection,
+- c->window, WM_PROTOCOLS),
+- &protocols, NULL))
++ if(!xcb_icccm_get_wm_protocols_reply(globalconf.connection,
++ xcb_icccm_get_wm_protocols_unchecked(globalconf.connection,
++ c->window, WM_PROTOCOLS),
++ &protocols, NULL))
+ return;
+ }
+
+- xcb_get_wm_protocols_reply_wipe(&c->protocols);
++ xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
+ memcpy(&c->protocols, &protocols, sizeof(protocols));
+ }
+
+diff --git a/selection.c b/selection.c
+index 527ec40..44b57c5 100644
+--- a/selection.c
++++ b/selection.c
+@@ -86,18 +86,18 @@ luaA_selection_get(lua_State *L)
+ if(event_notify->selection == XCB_ATOM_PRIMARY
+ && event_notify->property != XCB_NONE)
+ {
+- xcb_get_text_property_reply_t prop;
++ xcb_icccm_get_text_property_reply_t prop;
+ xcb_get_property_cookie_t cookie =
+- xcb_get_text_property(globalconf.connection,
+- event_notify->requestor,
+- event_notify->property);
++ xcb_icccm_get_text_property(globalconf.connection,
++ event_notify->requestor,
++ event_notify->property);
+
+- if(xcb_get_text_property_reply(globalconf.connection,
+- cookie, &prop, NULL))
++ if(xcb_icccm_get_text_property_reply(globalconf.connection,
++ cookie, &prop, NULL))
+ {
+ lua_pushlstring(L, prop.name, prop.name_len);
+
+- xcb_get_text_property_reply_wipe(&prop);
++ xcb_icccm_get_text_property_reply_wipe(&prop);
+
+ xcb_delete_property(globalconf.connection,
+ event_notify->requestor,
+diff --git a/systray.c b/systray.c
+index 6ea3dd5..92b7d39 100644
+--- a/systray.c
++++ b/systray.c
+@@ -197,7 +197,7 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i
+
+ xcb_change_window_attributes(globalconf.connection, embed_win, XCB_CW_EVENT_MASK,
+ select_input_val);
+- window_state_set(embed_win, XCB_WM_STATE_WITHDRAWN);
++ window_state_set(embed_win, XCB_ICCCM_WM_STATE_WITHDRAWN);
+
+ /* we grab the window, but also make sure it's automatically reparented back
+ * to the root window if we should die.
+diff --git a/window.c b/window.c
+index b86fa38..6a1909f 100644
+--- a/window.c
++++ b/window.c
+@@ -60,7 +60,7 @@ uint32_t
+ window_state_get_reply(xcb_get_property_cookie_t cookie)
+ {
+ /* If no property is set, we just assume a sane default. */
+- uint32_t result = XCB_WM_STATE_NORMAL;
++ uint32_t result = XCB_ICCCM_WM_STATE_NORMAL;
+ xcb_get_property_reply_t *prop_r;
+
+ if((prop_r = xcb_get_property_reply(globalconf.connection, cookie, NULL)))
+@@ -187,7 +187,7 @@ window_opacity_set(xcb_window_t win, double opacity)
+ {
+ uint32_t real_opacity = opacity * 0xffffffff;
+ xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win,
+- _NET_WM_WINDOW_OPACITY, CARDINAL, 32, 1L, &real_opacity);
++ _NET_WM_WINDOW_OPACITY, XCB_ATOM_CARDINAL, 32, 1L, &real_opacity);
+ }
+ else
+ xcb_delete_property(globalconf.connection, win, _NET_WM_WINDOW_OPACITY);
+--
+1.7.4.4
+
diff --git a/testing/awesome/APKBUILD b/testing/awesome/APKBUILD
new file mode 100644
index 000000000..7a1bb05ab
--- /dev/null
+++ b/testing/awesome/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=awesome
+pkgver=3.4.10
+pkgrel=0
+pkgdesc="lua-configurable window manager framework"
+url="http://awesome.naquadah.org/"
+arch="all"
+license="GPL"
+depends="imagemagick"
+makedepends="lua-dev libxcb-dev pango-dev cairo-dev cmake gperf glib-dev
+ imlib2-dev libxdg-basedir-dev libev-dev startup-notification-dev
+ xcb-util-keysyms-dev xcb-util-image-dev xcb-util-dev xcb-util-wm-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://awesome.naquadah.org/download/${pkgname}-${pkgver}.tar.bz2
+ 0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
+ "
+
+_srcdir="${srcdir}/${pkgname}-${pkgver}"
+_builddir="${srcdir}/build"
+prepare() {
+ local i
+ cd "$_srcdir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ mkdir "$_builddir"
+ cd "$_builddir"
+ cmake -DPREFIX=/usr -DSYSCONFDIR=/etc "$_srcdir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="245087f8065867eff37a2133287d5c03 awesome-3.4.10.tar.bz2
+354637fd9dafa0500fef3f01a0e73d8a 0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch"
diff --git a/testing/bash-completion/APKBUILD b/testing/bash-completion/APKBUILD
new file mode 100644
index 000000000..f5eaf4253
--- /dev/null
+++ b/testing/bash-completion/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer:
+pkgname=bash-completion
+pkgver=1.3
+pkgrel=0
+pkgdesc="Command-line tab-completion for bash"
+url="http://bash-completion.alioth.debian.org/"
+arch="noarch"
+license="GPL"
+depends="bash"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+source="http://bash-completion.alioth.debian.org/files/bash-completion-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="a1262659b4bbf44dc9e59d034de505ec bash-completion-1.3.tar.bz2"
diff --git a/testing/bcfg2/APK.py b/testing/bcfg2/APK.py
new file mode 100644
index 000000000..9b28d5207
--- /dev/null
+++ b/testing/bcfg2/APK.py
@@ -0,0 +1,58 @@
+"""This provides Bcfg2 support for alpinelinux APK packages."""
+__revision__ = '$Revision$'
+
+import Bcfg2.Client.Tools
+
+class APK(Bcfg2.Client.Tools.PkgTool):
+ """apk package support."""
+ name = 'APK'
+ __execs__ = ["/sbin/apk"]
+ __handles__ = [('Package', 'apk')]
+ __req__ = {'Package': ['name', 'version']}
+ pkgtype = 'apk'
+ pkgtool = ("/sbin/apk add %s", ("%s", ["name"]))
+
+ def __init__(self, logger, setup, config):
+ Bcfg2.Client.Tools.PkgTool.__init__(self, logger, setup, config)
+ self.installed = {}
+ self.RefreshPackages()
+
+ def RefreshPackages(self):
+ """Refresh memory hashes of packages."""
+ names = self.cmd.run("/sbin/apk info")[1]
+ nameversions = self.cmd.run("/sbin/apk info -v")[1]
+ for pkg in zip(names, nameversions):
+ pkgname = pkg[0]
+ version = pkg[1][len(pkgname)+1:]
+ self.logger.debug(" pkgname: %s\n version: %s" % (pkgname, version))
+ self.installed[pkgname] = version
+
+ def VerifyPackage(self, entry, modlist):
+ """Verify Package status for entry."""
+ if not 'version' in entry.attrib:
+ self.logger.info("Cannot verify unversioned package %s" %
+ (entry.attrib['name']))
+ return False
+
+ if entry.attrib['name'] in self.installed:
+ if entry.attrib['version'] == 'auto' or self.installed[entry.attrib['name']] == entry.attrib['version']:
+ #if not self.setup['quick'] and \
+ # entry.get('verify', 'true') == 'true':
+ #FIXME: We should be able to check this once
+ # http://trac.macports.org/ticket/15709 is implemented
+ return True
+ else:
+ self.loggger.info( " pkg %s at version %s, not %s" % (entry.attrib['name'],self.installed[entry.attrib['name']],entry.attrib['version']) )
+ entry.set('current_version', self.installed[entry.get('name')])
+ return False
+ entry.set('current_exists', 'false')
+ return False
+
+ def RemovePackages(self, packages):
+ """Remove extra packages."""
+ names = [pkg.get('name') for pkg in packages]
+ self.logger.info("Removing packages: %s" % " ".join(names))
+ self.cmd.run("/sbin/apk del %s" % \
+ " ".join(names))
+ self.RefreshPackages()
+ self.extra = self.FindExtraPackages()
diff --git a/testing/bcfg2/APKBUILD b/testing/bcfg2/APKBUILD
new file mode 100644
index 000000000..503d3308d
--- /dev/null
+++ b/testing/bcfg2/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Cameron Banta <cbanta@gmail.com>
+# Maintainer: Cameron Banta <cbanta@gmail.com>
+pkgname=bcfg2
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="configuration management tool"
+url="http://trac.mcs.anl.gov/projects/bcfg2"
+arch="all"
+license="Custom"
+depends="python"
+makedepends="python-dev"
+install=
+subpackages="$pkgname-doc $pkgname-server"
+source="ftp://ftp.mcs.anl.gov/pub/bcfg/$pkgname-$pkgver.tar.gz
+ bcfg2-server.initd
+ APK.py"
+
+#no build needed - pure python
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ cp "$srcdir"/APK.py src/lib/Client/Tools/
+ python setup.py bdist_dumb --keep-temp --bdist-dir "$pkgdir"
+
+ install -m644 -D COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
+}
+
+server() {
+ depends="python bcfg2 py-lxml openssl"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/bcfg2-* "$subpkgdir"/usr/bin/
+ mkdir -p "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/bcfg2 "$subpkgdir"/usr/share/
+ install -m755 -D bcfg2-server.initd "$subpkgdir"/etc/init.d/$subpkgname
+}
+
+
+md5sums="f8889d629245ecf67994469ed78fbfeb bcfg2-1.1.1.tar.gz
+9a13baa6f40267ff9dbec574967c5068 bcfg2-server.initd
+2acc7c5a8a031a3cb25ab3955d8d1fde APK.py"
diff --git a/testing/bcfg2/bcfg2-server.initd b/testing/bcfg2/bcfg2-server.initd
new file mode 100644
index 000000000..5168f7582
--- /dev/null
+++ b/testing/bcfg2/bcfg2-server.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+#
+# bcfgd - bcfg configuration daemon
+#
+#
+
+depend () {
+ need net
+}
+
+start () {
+ ebegin "Starting bcfg2-server"
+ start-stop-daemon --start --quiet --pidfile /var/run/bcfg2-server.pid \
+ --startas /usr/bin/bcfg2-server -- -D /var/run/bcfg2-server.pid
+ eend $? "Failed to start bcfg2-server"
+}
+
+stop () {
+ ebegin "Stopping bcfg2-server"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bcfg2-server.pid \
+ --signal INT
+ eend $? "Failed to stop bcfg2-server"
+}
diff --git a/testing/blists/APKBUILD b/testing/blists/APKBUILD
new file mode 100644
index 000000000..e900f263c
--- /dev/null
+++ b/testing/blists/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=blists
+pkgver=1.0
+pkgrel=0
+pkgdesc="Web interface to mailing list archives"
+url="http://www.openwall.com/blists/"
+arch="all"
+license="BSD"
+depends=
+makedepends=
+install=
+subpackages=
+source="http://www.openwall.com/blists/blists-$pkgver.tar.gz"
+
+_builddir="$srcdir"/blists-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -D bit "$pkgdir"/usr/bin/bit
+ install -D bindex "$pkgdir"/usr/bin/bindex
+}
+
+md5sums="bd84e3793ec05d3910631e7b55e32630 blists-1.0.tar.gz"
diff --git a/testing/boost-coroutine/APKBUILD b/testing/boost-coroutine/APKBUILD
new file mode 100644
index 000000000..9803a3309
--- /dev/null
+++ b/testing/boost-coroutine/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=boost-coroutine
+pkgver=0.0.1
+pkgrel=2
+pkgdesc="coroutine library for boost"
+url="http://www.crystalclearsoftware.com/soc/coroutine/"
+arch="noarch"
+license="custom:boost"
+depends=
+depends_dev="boost-dev pth-dev"
+install=""
+source="saveas-http://www.boostpro.com/vault/index.php?action=downloadfile&filename=boost-coroutine-2009-12-01.tar.gz&directory=Concurrent%20Programming/boost-coroutine-2009-12-01.tar.gz
+ boost-coroutine-pth.patch"
+
+_builddir="${srcdir}/boost-coroutine"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/include
+ cp -r "$_builddir"/boost "$pkgdir"/usr/include/boost
+}
+
+md5sums="9837f5f2024dfc4da68bf62e0aab529a boost-coroutine-2009-12-01.tar.gz
+53d3c4752668f0332dc31bd2341db609 boost-coroutine-pth.patch"
diff --git a/testing/boost-coroutine/boost-coroutine-pth.patch b/testing/boost-coroutine/boost-coroutine-pth.patch
new file mode 100644
index 000000000..3a6af66af
--- /dev/null
+++ b/testing/boost-coroutine/boost-coroutine-pth.patch
@@ -0,0 +1,19 @@
+--- boost-coroutine.orig/boost/coroutine/detail/context_posix.hpp
++++ boost-coroutine/boost/coroutine/detail/context_posix.hpp
+@@ -46,13 +46,10 @@
+ #include <boost/config.hpp>
+ #include <boost/assert.hpp>
+
+-#if defined(_XOPEN_UNIX) && defined(_XOPEN_VERSION) && _XOPEN_VERSION >= 500
++#if 1
++#if 1
+
+-// OS X 10.4 -- despite passing the test above -- doesn't support
+-// swapcontext() et al. Use GNU Pth workalike functions.
+-#if defined(__APPLE__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050)
+-
+-#include "pth/pth.h"
++#include <pth.h>
+ #include <cerrno>
+
+ namespace boost { namespace coroutines { namespace detail {
diff --git a/testing/btrfs-progs/APKBUILD b/testing/btrfs-progs/APKBUILD
new file mode 100644
index 000000000..b33e3d5bf
--- /dev/null
+++ b/testing/btrfs-progs/APKBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=btrfs-progs
+pkgver=0.19
+pkgrel=1
+pkgdesc="Tools for the btrfs"
+url="https://btrfs.wiki.kernel.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="util-linux-dev bash"
+install=
+subpackages="$pkgname-doc"
+source="http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/btrfs-progs-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ make CFLAGS="$CFLAGS" prefix=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make prefix=/usr mandir=/usr/share/man DESTDIR="$pkgdir" install
+
+ # remove the 2 lines below (and this) if there is no init.d script
+ # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="5854728d080cc76f21a83bdc99b6ddaa btrfs-progs-0.19.tar.bz2"
diff --git a/testing/burp/APKBUILD b/testing/burp/APKBUILD
new file mode 100644
index 000000000..e53320b19
--- /dev/null
+++ b/testing/burp/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=burp
+pkgver=1.1.30
+pkgrel=0
+pkgdesc="Backup and resore program"
+url="http://burp.grke.net/"
+arch="all"
+license="AGPLv3"
+depends=
+depends_dev="librsync-dev zlib-dev openssl-dev"
+makedepends="$depends_dev gettext-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/burp/burp-$pkgver/burp-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/burp-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+# cd autoconf
+# aclocal -I burp-macros && autoconf || return 1
+# cp configure ../
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make NO_ECHO= || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="b3cdc0d310d2c9e2656d36f311be4c66 burp-1.1.30.tar.bz2"
diff --git a/testing/calibre/APKBUILD b/testing/calibre/APKBUILD
new file mode 100644
index 000000000..a34fe7694
--- /dev/null
+++ b/testing/calibre/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=calibre
+pkgver=0.8.7
+pkgrel=5
+pkgdesc="Ebook management application"
+url="http://calibre-ebook.com/"
+arch="all"
+license="GPL3"
+depends=
+depends_dev="python-dev imagemagick-dev py-qt py-sip py-imaging libusb-dev
+ poppler-dev poppler-qt4-dev py-dbus py-pycountry py-lxml icu-dev
+ desktop-file-utils py-sqlite sqlite-dev chmlib-dev podofo-dev
+ py-sip-dev py-dateutil py-cherrypy py-beautifulsoup py-mechanize
+ py-dnspython shared-mime-info unrar xdg-utils"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ calibre.confd
+ calibre.initd"
+_builddir="$srcdir"/$pkgname
+build() {
+ cd "$_builddir"
+ 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")
+ python setup.py build
+ python setup.py resources
+ python setup.py translations
+}
+package() {
+ cd "$_builddir"
+ # 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
+ # Create a dir for ebook repository
+ mkdir -p "${pkgdir}/var/lib/calibre"
+ # 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"
+ python setup.py install --root="${pkgdir}" --prefix=/usr \
+ --no-postinstall \
+ --staging-bindir="${pkgdir}/usr/bin" \
+ --staging-libdir="${pkgdir}/usr/lib" \
+ --staging-sharedir="${pkgdir}/usr/share"
+ install -m755 -D ../$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m644 -D ../$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+md5sums="d7132ec75f5e742e04e196fc8e2c0884 calibre-0.8.7.tar.gz
+a53086675b33859da1d18cc21daa090b calibre.confd
+96a7744a8b5d63ed8fbe3c4919b0e40f calibre.initd"
diff --git a/testing/calibre/calibre.confd b/testing/calibre/calibre.confd
new file mode 100644
index 000000000..c20e67699
--- /dev/null
+++ b/testing/calibre/calibre.confd
@@ -0,0 +1,6 @@
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+CONTENT=/var/lib/calibre
+PORT=8080
+MAX_COVER=600x800
+DAEMON_ARGS="--auto-reload --with-library=$CONTENT --pidfile=$PIDFILE --port=$PORT --max-cover=$MAX_COVER --daemonize"
diff --git a/testing/calibre/calibre.initd b/testing/calibre/calibre.initd
new file mode 100644
index 000000000..25117ed37
--- /dev/null
+++ b/testing/calibre/calibre.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+start() {
+ ebegin "Starting Calibre Server"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Calibre Server"
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
+ eend $?
+}
diff --git a/testing/cdparanoia/APKBUILD b/testing/cdparanoia/APKBUILD
new file mode 100644
index 000000000..89814d253
--- /dev/null
+++ b/testing/cdparanoia/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=cdparanoia
+pkgver=10.2
+pkgrel=3
+pkgdesc="An audio CD extraction application"
+url="http://www.xiph.org/paranoia"
+arch="all"
+license="GPL"
+depends=
+makedepends="libtool autoconf automake"
+install=
+subpackages="$pkgname-dev"
+source="http://downloads.xiph.org/releases/cdparanoia/$pkgname-III-$pkgver.src.tgz"
+
+prepare() {
+ cd "$srcdir/$pkgname-III-$pkgver"
+
+ mv configure.guess config.guess
+ mv configure.sub config.sub
+ sed -i -e '/configure.\(guess\|sub\)/d' configure.in || return 1
+ aclocal && autoconf || return 1
+ libtoolize || return 1
+}
+
+build() {
+ cd "$srcdir/$pkgname-III-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make -j1 || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-III-$pkgver"
+ install -m755 -D cdparanoia "$pkgdir"/usr/bin/cdparanoia
+ install -m755 -D interface/libcdda_interface.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_interface.so.0."$pkgver"
+ install -m755 -D paranoia/libcdda_paranoia.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_paranoia.so.0."$pkgver"
+
+ ln -s libcdda_interface.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_interface.so.0
+ ln -s libcdda_interface.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_interface.so
+ ln -s libcdda_paranoia.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_paranoia.so.0
+ ln -s libcdda_paranoia.so.0."$pkgver" \
+ "$pkgdir"/usr/lib/libcdda_paranoia.so
+
+ install -m644 -D interface/cdda_interface.h \
+ "$pkgdir"/usr/include/cdda_interface.h
+ install -m644 -D paranoia/cdda_paranoia.h \
+ "$pkgdir"-dev/usr/include/cdda_paranoia.h
+}
+
+
+md5sums="b304bbe8ab63373924a744eac9ebc652 cdparanoia-III-10.2.src.tgz"
diff --git a/testing/celt/APKBUILD b/testing/celt/APKBUILD
new file mode 100644
index 000000000..1f0dbc8bd
--- /dev/null
+++ b/testing/celt/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=celt
+pkgver=0.11.1
+pkgrel=0
+pkgdesc="An audio codec for use in low-delay speech and audio communication"
+url="http://www.celt-codec.org/"
+arch="all"
+license="BSD"
+depends=""
+makedepends="libogg-dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.us.xiph.org/releases/celt/celt-$pkgver.tar.gz"
+
+_builddir="$srcdir"/celt-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="94fe4acd241da8702c295bcd13a555e6 celt-0.11.1.tar.gz"
diff --git a/testing/cherokee/APKBUILD b/testing/cherokee/APKBUILD
new file mode 100644
index 000000000..53e585b49
--- /dev/null
+++ b/testing/cherokee/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=cherokee
+pkgver=1.2.98
+pkgrel=3
+pkgdesc="A very fast, flexible and easy to configure Web Server"
+url="http://www.cherokee-project.com/"
+arch="all"
+license="GPL2"
+depends="pcre rrdtool python"
+depends_dev="openssl-dev gettext-dev ffmpeg-dev geoip-dev"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
+source="http://www.cherokee-project.com/download/${pkgver%.*}/${pkgver}/${pkgname}-${pkgver}.tar.gz
+ cherokee.initd
+ cherokee.confd
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --with-wwwroot=/var/www \
+ --enable-os-string="Alpine Linux"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la "$pkgdir"/usr/lib/cherokee/*.la || return 1
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="21b01e7d45c0e82ecc0c4257a9c27feb cherokee-1.2.98.tar.gz
+8cc44726585fa04a2772a0c3faa6a72d cherokee.initd
+bd6a840f72c630ce1eaabe058097584f cherokee.confd"
diff --git a/testing/cherokee/cherokee.confd b/testing/cherokee/cherokee.confd
new file mode 100644
index 000000000..8f719df39
--- /dev/null
+++ b/testing/cherokee/cherokee.confd
@@ -0,0 +1,10 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon $OPTS here.
+#
+
+OPTS="-d"
+DAEMON_USER="root"
+DAEMON_GROUP="root"
+
diff --git a/testing/cherokee/cherokee.initd b/testing/cherokee/cherokee.initd
new file mode 100755
index 000000000..5e88e069c
--- /dev/null
+++ b/testing/cherokee/cherokee.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+
+# Cherokee init.d file for alpine linux.
+
+NAME=cherokee
+DAEMON=/usr/sbin/$NAME
+DAEMON_USER=${DAEMON_USER:-root}
+DAEMON_GROUP=${DAEMON_GROUP:-root}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${NAME}.pid \
+ --user ${DAEMON_USER}:${DAEMON_GROUP} \
+ --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON} \
+ --pidfile /var/run/${NAME}.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${NAME}"
+ if ! service_started "${NAME}" ; then
+ eend 1 "${NAME} is not started"
+ return 1
+ fi
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${DAEMON} --pidfile /var/run/${NAME}.pid
+ eend $?
+}
+
diff --git a/testing/chmlib/APKBUILD b/testing/chmlib/APKBUILD
new file mode 100644
index 000000000..f96ed771a
--- /dev/null
+++ b/testing/chmlib/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=chmlib
+pkgver=0.40
+pkgrel=1
+pkgdesc="Library for dealing with Microsoft ITSS/CHM format files"
+url="http://morte.jedrea.com/~jedwin/projects/chmlib/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://morte.jedrea.com/~jedwin/projects/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="7ea49ed8c335215c1edc6fae83e6b912 chmlib-0.40.tar.bz2"
diff --git a/testing/chromium/APKBUILD b/testing/chromium/APKBUILD
new file mode 100644
index 000000000..1372d9e1d
--- /dev/null
+++ b/testing/chromium/APKBUILD
@@ -0,0 +1,183 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Unmaintained <unmaintained@alpinelinux.org>
+pkgname=chromium
+pkgver=17.0.942.0
+pkgrel=0
+pkgdesc="chromium web browser"
+url="http://www.chromium.org/"
+arch="x86 x86_64 arm"
+license="BSD"
+depends="xdg-utils"
+depends_dev="alsa-lib-dev libevent-dev libpng-dev jpeg-dev cairo-dev cups-dev mesa-dev
+ dbus-glib-dev gtk+-dev libxml2-dev freetype-dev
+ libxslt-dev libxtst-dev icu-dev flac-dev speex-dev
+ hunspell-dev libxinerama-dev ffmpeg-dev nss-dev
+ libwebp-dev v8-dev bzip2-dev libevent-dev libvpx-dev
+ sqlite-dev libelf-dev libgcrypt-dev gnutls-dev"
+makedepends="$depends_dev xdg-utils yasm gperf bison flex perl python"
+install=""
+subpackages="$pkgname-doc"
+source="http://gsdview.appspot.com/chromium-browser-official/chromium-$pkgver.tar.bz2
+ chromium-c99math.patch
+ chromium-futimens.patch
+ chromium-dlfcn.patch
+ chromium-yasm.patch
+ chromium-no-mit-screensaver.patch
+ chromium-uclibc-resolv.patch
+ chromium-breakpad.patch
+ chromium-webrtc.patch
+ chromium-malloc.patch"
+
+_builddir="$srcdir"/chromium-$pkgver
+
+CHROMIUM_HOME="/usr/lib/${pkgname}"
+CHROMIUM_IMAGE="${_builddir}/out/Release"
+
+# ugly hack to deal with google shipping weird tarballs
+unpack() {
+ default_unpack || return 0
+}
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ msg "Stripping Google cruft..."
+ find third_party -type f \! -iname '*.gyp*' \
+ \! -path 'third_party/WebKit/*' \
+ \! -path 'third_party/angle/*' \
+ \! -path 'third_party/cacheinvalidation/*' \
+ \! -path 'third_party/cld/*' \
+ \! -path 'third_party/expat/*' \
+ \! -path 'third_party/ffmpeg/*' \
+ \! -path 'third_party/flac/flac.h' \
+ \! -path 'third_party/gpsd/*' \
+ \! -path 'third_party/harfbuzz/*' \
+ \! -path 'third_party/hunspell/*' \
+ \! -path 'third_party/iccjpeg/*' \
+ \! -path 'third_party/jsoncpp/*' \
+ \! -path 'third_party/launchpad_translations/*' \
+ \! -path 'third_party/leveldb/*' \
+ \! -path 'third_party/leveldatabase/*' \
+ \! -path 'third_party/libjingle/*' \
+ \! -path 'third_party/libphonenumber/*' \
+ \! -path 'third_party/libvpx/*' \
+ \! -path 'third_party/lss/*' \
+ \! -path 'third_party/mesa/*' \
+ \! -path 'third_party/modp_b64/*' \
+ \! -path 'third_party/mongoose/*' \
+ \! -path 'third_party/npapi/*' \
+ \! -path 'third_party/openmax/*' \
+ \! -path 'third_party/ots/*' \
+ \! -path 'third_party/protobuf/*' \
+ \! -path 'third_party/scons-2.0.1/*' \
+ \! -path 'third_party/sfntly/*' \
+ \! -path 'third_party/skia/*' \
+ \! -path 'third_party/smhasher/*' \
+ \! -path 'third_party/speex/speex.h' \
+ \! -path 'third_party/sqlite/*' \
+ \! -path 'third_party/tcmalloc/*' \
+ \! -path 'third_party/tlslite/*' \
+ \! -path 'third_party/undoview/*' \
+ \! -path 'third_party/v8-i18n/*' \
+ \! -path 'third_party/webdriver/*' \
+ \! -path 'third_party/webgl_conformance/*' \
+ \! -path 'third_party/webrtc/*' \
+ \! -path 'third_party/zlib/contrib/minizip/*' \
+ -delete || return 1
+
+ msg "Hacking source tree to use system V8 headers..."
+ find v8 -type f \! -iname '*.gyp*' -delete || return 1
+ rmdir v8/include || return 1
+ ln -s /usr/include v8/include || return 1
+}
+
+build() {
+ cd "$_builddir"
+
+ chromium_arch=ia32
+ test ${CARCH} = x86_64 && chromium_arch=x64
+
+ # enabling SSE2 causes psABI breakage.
+ msg "chromium architecture is ${chromium_arch}"
+ GYP_DEFINES="\
+ werror= \
+ disable_sse2=1 \
+ no_strict_aliasing=1 \
+ linux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox \
+ linux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome \
+ linux_use_tcmalloc=0 \
+ release_extra_cflags='${CFLAGS}' \
+ proprietary_codecs=1 \
+ use_system_libjpeg=1 \
+ use_system_libxslt=1 \
+ use_system_libxml=1 \
+ use_system_bzip2=1 \
+ use_system_zlib=1 \
+ use_system_libpng=1 \
+ use_system_yasm=1 \
+ use_system_flac=1 \
+ use_system_libevent=1 \
+ use_system_icu=1 \
+ use_system_v8=1 \
+ use_system_libwebp=1 \
+ use_system_ffmpeg=1 \
+ use_system_vpx=1 \
+ use_system_ssl=0 \
+ use_system_sqlite=0 \
+ use_system_speex=1 \
+ use_system_xdg_utils=1 \
+ use_cups=1 \
+ use_gconf=0 \
+ use_gnome_keyring=0 \
+ use_kerberos=0 \
+ linux_link_kerberos=0 \
+ disable_nacl=1 \
+ remoting=0 \
+ target_arch=${chromium_arch}"
+ export GYP_DEFINES
+
+ msg "setting up makefiles"
+ python build/gyp_chromium -f make --depth=. build/all.gyp
+
+ msg "building chrome and chrome_sandbox targets"
+ make V=1 BUILDTYPE=Release -j$JOBS chrome chrome_sandbox chromedriver || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/${CHROMIUM_HOME}
+
+ install -m755 -c "${CHROMIUM_IMAGE}/chrome" "${pkgdir}/${CHROMIUM_HOME}/chrome"
+ install -m755 -c "${CHROMIUM_IMAGE}/chromedriver" "${pkgdir}/${CHROMIUM_HOME}/chromedriver"
+ install -m755 -c "${CHROMIUM_IMAGE}/chrome_sandbox" "${pkgdir}/${CHROMIUM_HOME}/chrome_sandbox"
+ install -m644 -c "${CHROMIUM_IMAGE}/chrome.pak" "${pkgdir}/${CHROMIUM_HOME}/chrome.pak"
+ install -m644 -c "${CHROMIUM_IMAGE}/resources.pak" "${pkgdir}/${CHROMIUM_HOME}/resources.pak"
+
+ mkdir -p "$pkgdir"/usr/share/man/man1
+ install -m644 -c "${CHROMIUM_IMAGE}/chrome.1" "${pkgdir}/usr/share/man/man1/chrome.1"
+ ln -sf "chrome.1" "${pkgdir}/usr/share/man/man1/chrome-browser.1"
+
+ install -d "${pkgdir}"/usr/bin
+ ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome"
+ ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome-browser"
+ ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium"
+ ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium-browser"
+}
+
+md5sums="5660529559b1845217b679a883160873 chromium-17.0.942.0.tar.bz2
+320d611dba59a881a4f178df743c4912 chromium-c99math.patch
+1328245f1f21cf3abf54223ed06a70f4 chromium-futimens.patch
+768d2ca4daa2db611fd4aeb561701f4e chromium-dlfcn.patch
+76cb0975e631d54fb57bd298041cec05 chromium-yasm.patch
+327850010ae407477083b91a4e04af51 chromium-no-mit-screensaver.patch
+441bcd9fc987e290c610e2f1bbfb75f8 chromium-uclibc-resolv.patch
+f6531589ce894fcd9b6f4917e83cd3aa chromium-breakpad.patch
+6257d567f83ad591360c3de4f9073725 chromium-webrtc.patch
+42f0beecf6a9e4e65c88b5acb77d8a51 chromium-malloc.patch"
diff --git a/testing/chromium/chromium-breakpad.patch b/testing/chromium/chromium-breakpad.patch
new file mode 100644
index 000000000..deb3af8cf
--- /dev/null
+++ b/testing/chromium/chromium-breakpad.patch
@@ -0,0 +1,11 @@
+--- chromium-17.0.942.0.orig/breakpad/src/client/linux/handler/exception_handler.cc
++++ chromium-17.0.942.0/breakpad/src/client/linux/handler/exception_handler.cc
+@@ -474,7 +474,7 @@
+ }
+
+ bool ExceptionHandler::WriteMinidump() {
+-#if !defined(__ARM_EABI__)
++#if !defined(__ARM_EABI__) && !defined(__UCLIBC__)
+ // Allow ourselves to be dumped.
+ sys_prctl(PR_SET_DUMPABLE, 1);
+
diff --git a/testing/chromium/chromium-c99math.patch b/testing/chromium/chromium-c99math.patch
new file mode 100644
index 000000000..37ed224c6
--- /dev/null
+++ b/testing/chromium/chromium-c99math.patch
@@ -0,0 +1,11 @@
+--- chromium-13.0.754.0.orig/base/float_util.h
++++ chromium-13.0.754.0/base/float_util.h
+@@ -19,7 +19,7 @@
+
+ inline bool IsFinite(const double& number) {
+ #if defined(OS_POSIX)
+- return finite(number) != 0;
++ return isfinite(number) != 0;
+ #elif defined(OS_WIN)
+ return _finite(number) != 0;
+ #endif
diff --git a/testing/chromium/chromium-dlfcn.patch b/testing/chromium/chromium-dlfcn.patch
new file mode 100644
index 000000000..9397b1523
--- /dev/null
+++ b/testing/chromium/chromium-dlfcn.patch
@@ -0,0 +1,10 @@
+--- chromium-13.0.754.0.orig/net/socket/nss_ssl_util.cc
++++ chromium-13.0.754.0/net/socket/nss_ssl_util.cc
+@@ -8,6 +8,7 @@
+ #include <secerr.h>
+ #include <ssl.h>
+ #include <sslerr.h>
++#include <dlfcn.h>
+
+ #include <string>
+
diff --git a/testing/chromium/chromium-futimens.patch b/testing/chromium/chromium-futimens.patch
new file mode 100644
index 000000000..0662bcad1
--- /dev/null
+++ b/testing/chromium/chromium-futimens.patch
@@ -0,0 +1,22 @@
+--- chromium-13.0.754.0.orig/base/platform_file_posix.cc
++++ chromium-13.0.754.0/base/platform_file_posix.cc
+@@ -167,10 +167,15 @@
+ if (file < 0)
+ return false;
+
+- timeval times[2];
+- times[0] = last_access_time.ToTimeVal();
+- times[1] = last_modified_time.ToTimeVal();
+- return !futimes(file, times);
++ timespec times[2];
++
++ times[0].tv_sec = last_access_time.ToTimeT();
++ times[0].tv_nsec = 0;
++
++ times[1].tv_sec = last_modified_time.ToTimeT();
++ times[1].tv_nsec = 0;
++
++ return !futimens(file, times);
+ }
+
+ bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) {
diff --git a/testing/chromium/chromium-malloc.patch b/testing/chromium/chromium-malloc.patch
new file mode 100644
index 000000000..2fe5bfda8
--- /dev/null
+++ b/testing/chromium/chromium-malloc.patch
@@ -0,0 +1,19 @@
+--- chromium-17.0.942.0.orig/base/process_util_linux.cc
++++ chromium-17.0.942.0/base/process_util_linux.cc
+@@ -640,7 +640,7 @@
+
+ extern "C" {
+ #if !defined(USE_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \
+- !defined(OS_ANDROID)
++ !defined(OS_ANDROID) && !defined(__UCLIBC__)
+
+ extern "C" {
+ void* __libc_malloc(size_t size);
+@@ -700,6 +700,7 @@
+ OnNoMemorySize(size); \
+ return ret; \
+ }
++
+
+ DIE_ON_OOM_1(malloc)
+ DIE_ON_OOM_1(valloc)
diff --git a/testing/chromium/chromium-no-mit-screensaver.patch b/testing/chromium/chromium-no-mit-screensaver.patch
new file mode 100644
index 000000000..25ca29ac9
--- /dev/null
+++ b/testing/chromium/chromium-no-mit-screensaver.patch
@@ -0,0 +1,91 @@
+--- chromium-17.0.942.0.orig/chrome/browser/idle_query_linux.cc
++++ chromium-17.0.942.0/chrome/browser/idle_query_linux.cc
+@@ -4,30 +4,12 @@
+
+ #include "chrome/browser/idle_query_linux.h"
+
+-#include <X11/extensions/scrnsaver.h>
+-#include "ui/base/x/x11_util.h"
+-
+ namespace browser {
+
+ class IdleData {
+ public:
+- IdleData() {
+- int event_base;
+- int error_base;
+- if (XScreenSaverQueryExtension(ui::GetXDisplay(), &event_base,
+- &error_base)) {
+- mit_info = XScreenSaverAllocInfo();
+- } else {
+- mit_info = NULL;
+- }
+- }
+-
+- ~IdleData() {
+- if (mit_info)
+- XFree(mit_info);
+- }
+-
+- XScreenSaverInfo *mit_info;
++ IdleData() {}
++ ~IdleData() {}
+ };
+
+ IdleQueryLinux::IdleQueryLinux() : idle_data_(new IdleData()) {}
+@@ -35,16 +17,7 @@
+ IdleQueryLinux::~IdleQueryLinux() {}
+
+ int IdleQueryLinux::IdleTime() {
+- if (!idle_data_->mit_info)
+- return 0;
+-
+- if (XScreenSaverQueryInfo(ui::GetXDisplay(),
+- RootWindow(ui::GetXDisplay(), 0),
+- idle_data_->mit_info)) {
+- return (idle_data_->mit_info->idle) / 1000;
+- } else {
+- return 0;
+- }
++ return 0;
+ }
+
+ } // namespace browser
+--- chromium-17.0.942.0.orig/chrome/chrome.gyp
++++ chromium-17.0.942.0/chrome/chrome.gyp
+@@ -530,11 +530,6 @@
+ 'dependencies': [
+ '../build/linux/system.gyp:gtk',
+ ],
+- 'link_settings': {
+- 'libraries': [
+- '-lXss',
+- ],
+- },
+ }],
+ ['OS=="linux" and chromeos==1', {
+ 'include_dirs': [
+--- chromium-17.0.942.0.orig/chrome/chrome_common.gypi
++++ chromium-17.0.942.0/chrome/chrome_common.gypi
+@@ -257,7 +257,6 @@
+ 'libraries': [
+ '-lX11',
+ '-lXrender',
+- '-lXss',
+ '-lXext',
+ ],
+ },
+--- chromium-17.0.942.0.orig/chrome/chrome_browser.gypi
++++ chromium-17.0.942.0/chrome/chrome_browser.gypi
+@@ -4260,11 +4260,6 @@
+ ],
+ }],
+ ['os_posix == 1 and OS != "mac"', {
+- 'link_settings': {
+- 'libraries': [
+- '-lXss',
+- ],
+- },
+ 'conditions': [
+ ['linux_breakpad==1', {
+ 'sources': [
diff --git a/testing/chromium/chromium-stdstring.patch b/testing/chromium/chromium-stdstring.patch
new file mode 100644
index 000000000..4085c7b77
--- /dev/null
+++ b/testing/chromium/chromium-stdstring.patch
@@ -0,0 +1,15 @@
+--- chromium-13.0.754.0.orig/chrome/browser/debugger/devtools_remote_listen_socket.cc
++++ chromium-13.0.754.0/chrome/browser/debugger/devtools_remote_listen_socket.cc
+@@ -157,11 +157,7 @@
+ static const std::string kHandshakeString = "ChromeDevToolsHandshake";
+ switch (state_) {
+ case HANDSHAKE:
+- if (protocol_field_.compare(kHandshakeString)) {
+- state_ = INVALID;
+- } else {
+- Send(kHandshakeString, true);
+- }
++ Send(kHandshakeString, true);
+ break;
+ case HEADERS: {
+ if (!protocol_field_.empty()) { // not end-of-headers
diff --git a/testing/chromium/chromium-uclibc-resolv.patch b/testing/chromium/chromium-uclibc-resolv.patch
new file mode 100644
index 000000000..decc14bc9
--- /dev/null
+++ b/testing/chromium/chromium-uclibc-resolv.patch
@@ -0,0 +1,88 @@
+--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc
++++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc
+@@ -187,7 +187,7 @@
+ }
+
+ bool r = true;
+-#if defined(OS_MACOSX) || defined(OS_OPENBSD)
++#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD))
+ if ((_res.options & RES_INIT) == 0) {
+ #if defined(OS_OPENBSD)
+ if (res_init() != 0)
+--- chromium-17.0.942.0.orig/net/base/host_resolver_proc.cc
++++ chromium-17.0.942.0/net/base/host_resolver_proc.cc
+@@ -184,7 +184,7 @@
+ hints.ai_socktype = SOCK_STREAM;
+
+ #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
+- !defined(OS_ANDROID)
++ !defined(OS_ANDROID) && !defined(__UCLIBC__)
+ DnsReloaderMaybeReload();
+ #endif
+ int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
+--- chromium-17.0.942.0.orig/net/base/dns_reloader.cc
++++ chromium-17.0.942.0/net/base/dns_reloader.cc
+@@ -4,7 +4,7 @@
+
+ #include "net/base/dns_reloader.h"
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
++#if 0
+
+ #include <resolv.h>
+
+--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc
++++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc
+@@ -187,9 +187,9 @@
+ }
+
+ bool r = true;
+-#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD))
++#if defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(__UCLIBC__)
+ if ((_res.options & RES_INIT) == 0) {
+-#if defined(OS_OPENBSD)
++#if defined(OS_OPENBSD) || defined(__UCLIBC__)
+ if (res_init() != 0)
+ #else
+ if (res_ninit(&_res) != 0)
+--- chromium-17.0.942.0.orig/net/dns/dns_config_service_posix.cc
++++ chromium-17.0.942.0/net/dns/dns_config_service_posix.cc
+@@ -30,7 +30,7 @@
+ success_(false) {}
+
+ void DoWork() OVERRIDE {
+-#if defined(OS_OPENBSD)
++#if defined(OS_OPENBSD) || defined(__UCLIBC__)
+ if ((res_init() == 0) && (_res.options & RES_INIT)) {
+ success_ = ConvertResToConfig(_res, &dns_config_);
+ #else
+@@ -45,7 +45,7 @@
+ }
+ #if defined(OS_MACOSX)
+ res_ndestroy(&res);
+-#elif !defined(OS_OPENBSD)
++#elif !defined(OS_OPENBSD) && !defined(__UCLIBC__)
+ res_nclose(&res);
+ #endif
+ }
+@@ -132,7 +132,9 @@
+ #if defined(RES_ROTATE)
+ dns_config->rotate = res.options & RES_ROTATE;
+ #endif
++#if defined(RES_USE_EDNS0)
+ dns_config->edns0 = res.options & RES_USE_EDNS0;
++#endif
+
+ return true;
+ }
+--- chromium-17.0.942.0.orig/net/base/host_resolver_impl.cc
++++ chromium-17.0.942.0/net/base/host_resolver_impl.cc
+@@ -1081,7 +1081,7 @@
+ additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY;
+ #endif
+ NetworkChangeNotifier::AddIPAddressObserver(this);
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(__UCLIBC__)
+ EnsureDnsReloaderInit();
+ NetworkChangeNotifier::AddDNSObserver(this);
+ #endif
diff --git a/testing/chromium/chromium-webrtc.patch b/testing/chromium/chromium-webrtc.patch
new file mode 100644
index 000000000..66bbcbd1d
--- /dev/null
+++ b/testing/chromium/chromium-webrtc.patch
@@ -0,0 +1,10 @@
+--- chromium-17.0.942.0.orig/third_party/webrtc/system_wrappers/source/cpu_info.cc
++++ chromium-17.0.942.0/third_party/webrtc/system_wrappers/source/cpu_info.cc
+@@ -20,6 +20,7 @@
+ #elif defined(WEBRTC_ANDROID)
+ // Not implemented yet, might be possible to use Linux implementation
+ #else // defined(WEBRTC_LINUX)
++#include <unistd.h>
+ #include <sys/sysinfo.h>
+ #endif
+
diff --git a/testing/chromium/chromium-yasm.patch b/testing/chromium/chromium-yasm.patch
new file mode 100644
index 000000000..a48fda414
--- /dev/null
+++ b/testing/chromium/chromium-yasm.patch
@@ -0,0 +1,10 @@
+--- chromium-13.0.754.0.orig/third_party/yasm/yasm.gyp
++++ chromium-13.0.754.0/third_party/yasm/yasm.gyp
+@@ -59,6 +59,7 @@
+ 'targets': [
+ {
+ 'target_name': 'yasm',
++ 'ldflags': ['-lintl'],
+ 'type': 'executable',
+ 'toolsets': ['host'],
+ 'dependencies': [
diff --git a/testing/cifs-utils/APKBUILD b/testing/cifs-utils/APKBUILD
new file mode 100644
index 000000000..80b1bb1ef
--- /dev/null
+++ b/testing/cifs-utils/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=cifs-utils
+pkgver=4.9
+pkgrel=0
+pkgdesc="CIFS filesystem user-space tools"
+url="http://wiki.samba.org/index.php/LinuxCIFS_utils"
+arch="all"
+license="GPL"
+depends="libcap-dev keyutils-dev"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/$pkgname-$pkgver.tar.bz2"
+_builddir=$srcdir/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ rm -r $pkgdir/usr/bin
+ # set mount.cifs uid, to enable none root mounting form fstab
+ chmod +s $pkgdir/sbin/mount.cifs
+}
+
+md5sums="908d904e6b9e58f09f530de151a88ef8 cifs-utils-4.9.tar.bz2"
diff --git a/testing/clapf/APKBUILD b/testing/clapf/APKBUILD
new file mode 100644
index 000000000..9de6de05e
--- /dev/null
+++ b/testing/clapf/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=clapf
+pkgver=0.4.6_rc3
+_realver=0.4.6-rc3
+pkgrel=3
+pkgdesc="clapf is an open source email content filter application"
+url="http://clapf.acts.hu"
+arch="x86_64"
+license="as-is"
+depends="clamav-db"
+depends_dev="gsl-dev mysql-dev clamav-dev zlib-dev"
+makedepends="$depends_dev"
+install="$pkgname.pre-install"
+pkgusers="clapf"
+subpackages="$pkgname-dev"
+source="http://clapf.acts.hu/clapf-$_realver.tar.gz
+ $pkgname.confd
+ $pkgname.initd"
+
+_builddir="$srcdir/$pkgname-$_realver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-libclamav \
+ --with-tokendb=mysql \
+ --with-userdb=mysql \
+ --enable-lmtp \
+ --with-store=fs \
+ --enable-blackhole \
+ --enable-rbl \
+ --enable-policy \
+ --enable-whitelist \
+ --enable-blackhole \
+ --with-clapf-user=clapf \
+ --enable-language-detection \
+ --enable-memcached \
+ --enable-spamsum
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ install -Dm755 "$srcdir/$pkgname".initd \
+ "$pkgdir/etc/init.d/$pkgname" || return 1
+ install -Dm644 "$srcdir/$pkgname".confd \
+ "$pkgdir/etc/cond.d/$pkgname" || return 1
+ install -do $pkgname "$pkgdir"/var/run/clapf || return 1
+}
+
+md5sums="7850eb8b75988f3944f2b69b9e3b0c4d clapf-0.4.6-rc3.tar.gz
+385318b45b2bccdd76fd312576380735 clapf.confd
+263283c96608d696cd5e9eb9de921b16 clapf.initd"
diff --git a/testing/clapf/clapf.confd b/testing/clapf/clapf.confd
new file mode 100644
index 000000000..f31009d75
--- /dev/null
+++ b/testing/clapf/clapf.confd
@@ -0,0 +1,4 @@
+#
+# Config file for /etc/init.d/clapf
+#
+TMPDIR="/var/lib/clapf"
diff --git a/testing/clapf/clapf.initd b/testing/clapf/clapf.initd
new file mode 100644
index 000000000..eaf2aa49e
--- /dev/null
+++ b/testing/clapf/clapf.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+depend() {
+ need net
+ use logger
+ before mta
+}
+
+start() {
+ ebegin "Starting clapf"
+ start-stop-daemon --start --quiet --user clapf --background \
+ --exec /usr/sbin/clapf --make-pidfile --pid /var/run/clapf/clapf.pid -- -c /etc/clapf.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping clapf"
+ start-stop-daemon --stop --quiet --pidfile /var/run/clapf/clapf.pid
+ eend $?
+}
diff --git a/testing/clapf/clapf.pre-install b/testing/clapf/clapf.pre-install
new file mode 100644
index 000000000..01997df89
--- /dev/null
+++ b/testing/clapf/clapf.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+adduser -H -s /bin/false -D clamav 2>/dev/null
+exit 0
diff --git a/testing/cluster-glue/1.0.7-fix_configure.patch b/testing/cluster-glue/1.0.7-fix_configure.patch
new file mode 100644
index 000000000..fff85b003
--- /dev/null
+++ b/testing/cluster-glue/1.0.7-fix_configure.patch
@@ -0,0 +1,13 @@
+Fix enable/disable of libnet
+
+--- a/configure.ac 2010-12-06 18:17:03.000000000 +0100
++++ b/configure.ac 2011-01-11 13:22:16.271977100 +0100
+@@ -928,7 +928,7 @@
+
+ AC_ARG_ENABLE([libnet],
+ [ --enable-libnet Use libnet for ARP based funcationality, [default=try]],
+- [enable_libnet=$withval], [enable_libnet=try])
++ [], [enable_libnet=try])
+
+ libnet=""
+ libnet_version="none"
diff --git a/testing/cluster-glue/APKBUILD b/testing/cluster-glue/APKBUILD
new file mode 100644
index 000000000..06134391f
--- /dev/null
+++ b/testing/cluster-glue/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=cluster-glue
+pkgver=1.0.8
+pkgrel=0
+pkgdesc="A set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack."
+url="http://linux-ha.org/wiki/Cluster_Glue"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="net-snmp-dev libxml2-dev glib-dev bzip2-dev curl-dev e2fsprogs-dev"
+makedepends="$depends_dev libtool autoconf automake libltdl libuuid"
+install=""
+pkggroups="haclient"
+pkgusers="hacluster"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="http://hg.linux-ha.org/glue/archive/glue-$pkgver.tar.bz2
+ 1.0.7-fix_configure.patch
+ $pkgname.post-install
+ $pkgname.pre-install"
+
+_builddir="$srcdir"/Reusable-Cluster-Components-glue--glue-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --localstatedir=/var \
+ --enable-fatal-warnings=no \
+ --with-daemon-group="$pkggroups" \
+ --with-daemon-user="$pkgusers"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+ find "$pkgdir"/usr/lib -name *.la -delete || return 1
+ rm -rf "$pkgdir"/etc/init.d
+ # initd file needs fixing
+ #install -m755 -D "$srcdir"/ha_logd.initd \
+ # "$pkgdir"/etc/init.d/ha_logd || return 1
+}
+
+libs() {
+ pkgdesc="A collection of libraries that are useful for writing cluster managers such as Pacemaker."
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lib*.so.* \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="6cbeaed8b108cfac9ae693e8ab333283 glue-1.0.8.tar.bz2
+49cf61a00828bfc4590b308baabe429d 1.0.7-fix_configure.patch
+d63b0532d08e602d714e8cabaa628158 cluster-glue.post-install
+fb252beedb92eab87b07c3547f18a4c3 cluster-glue.pre-install"
diff --git a/testing/cluster-glue/cluster-glue.post-install b/testing/cluster-glue/cluster-glue.post-install
new file mode 100644
index 000000000..da7c4fe93
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+chown -R hacluster:haclient /var/lib/heartbeat/cores
+chown -R hacluster:haclient /var/lib/heartbeat/lrm
+
+exit 0
+
diff --git a/testing/cluster-glue/cluster-glue.pre-install b/testing/cluster-glue/cluster-glue.pre-install
new file mode 100644
index 000000000..4e7f2f5ba
--- /dev/null
+++ b/testing/cluster-glue/cluster-glue.pre-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+addgroup haclient 2>/dev/null
+adduser hacluster \
+ -h /var/lib/heartbeat/cores/hacluster \
+ -G haclient \
+ -s /sbin/nologin \
+ 2>/dev/null
+
+exit 0
+
diff --git a/testing/cluster-glue/ha_logd.initd b/testing/cluster-glue/ha_logd.initd
new file mode 100644
index 000000000..13a5bf321
--- /dev/null
+++ b/testing/cluster-glue/ha_logd.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+
+PIDFILE=/var/run/heartbeat-logd.pid
+
+depend() {
+ need net
+}
+
+BINARY="/usr/%libdir%/heartbeat/ha_logd"
+USER="hacluster"
+GROUP="haclient"
+CONFIG="/etc/logd.cf"
+LOGFILE="/var/log/ha_logger.log"
+
+start() {
+ ebegin "Starting heartbeat non-blocking log service"
+
+ COMMAND_ARGS="-d"
+ [[ -f "${CONFIG}" ]] && COMMAND_ARGS+=" -c ${CONFIG}"
+
+ if [ -n "${RC_UNAME}" ]; then
+ PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
+ else
+ PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1 &"
+ fi
+ eval ${CHRT} start-stop-daemon \
+ --quiet --start --chdir "${RUNTIMEDIR}" \
+ --pidfile "${PIDFILE}" \
+ --make-pidfile \
+ --exec ${BINARY} ${COMMAND_ARGS} --user "${USER}:${GROUP}" \
+ ${PARAMS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping heartbeat non-blocking log service"
+ start-stop-daemon --stop --retry 3 --quiet --exec "${BINARY}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}
diff --git a/testing/clutter/APKBUILD b/testing/clutter/APKBUILD
new file mode 100644
index 000000000..1add15655
--- /dev/null
+++ b/testing/clutter/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=clutter
+pkgver=1.6.16
+pkgrel=1
+pkgdesc="library for creating fast, visually-appealing interfaces"
+url="http://www.clutter-project.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="gdk-pixbuf-dev json-glib-dev atk-dev pango-dev mesa-dev libxcomposite-dev cairo-dev"
+makedepends="$depends_dev gobject-introspection-dev intltool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="9c7e9c5356d7e3405b756ce6a91c15f3 clutter-1.6.16.tar.bz2"
diff --git a/testing/compiz/APKBUILD b/testing/compiz/APKBUILD
new file mode 100644
index 000000000..37333da6a
--- /dev/null
+++ b/testing/compiz/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=compiz
+pkgver=0.8.8
+pkgrel=1
+pkgdesc="opengl window and composition manager"
+url="http://www.compiz.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="mesa-dev
+ libx11-dev
+ libxslt-dev
+ libsm-dev
+ libxcomposite-dev
+ libxrender-dev
+ libxrandr-dev
+ libxinerama-dev
+ libwnck-dev
+ glib-dev
+ gconf-dev
+ startup-notification-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://releases.compiz.org/$pkgver/compiz-$pkgver.tar.gz"
+
+_builddir="$srcdir"/compiz-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="d7e96f839b7cb0901470d5da04be4db2 compiz-0.8.8.tar.gz"
diff --git a/testing/corosync/APKBUILD b/testing/corosync/APKBUILD
new file mode 100644
index 000000000..6b3ed8274
--- /dev/null
+++ b/testing/corosync/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=corosync
+pkgver=1.4.2
+pkgrel=0
+pkgdesc="The Corosync Cluster Engine and Application Programming Interfaces"
+url="http://www.corosync.org/"
+arch="all"
+license="BSD2"
+depends=""
+depends_dev="nss-dev net-snmp-dev"
+makedepends="$depends_dev automake autoconf"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="ftp://ftp:downloads@corosync.org/downloads/corosync-$pkgver/corosync-$pkgver.tar.gz
+ $pkgname.initd"
+
+_builddir="$srcdir"/corosync-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-snmp \
+ --enable-nss \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+}
+
+libs() {
+ pkgdesc="The Corosync Cluster Engine Libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ cd "$pkgdir"/usr/lib
+ mv libcfg.so.* libcpg.so.* libconfdb.so.* libevs.so.* \
+ libtotem_pg.so.* liblogsys.so.* libcoroipcc.so.* \
+ libcoroipcs.so.* libquorum.so.* libvotequorum.so.* \
+ libpload.so.* libsam.so.* \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="061ee5522097fee69475b38a66bf1d6a corosync-1.4.2.tar.gz
+4d18555dfdd036b7a48eb5bdfd0ff053 corosync.initd"
diff --git a/testing/corosync/corosync.initd b/testing/corosync/corosync.initd
new file mode 100644
index 000000000..6c134bd93
--- /dev/null
+++ b/testing/corosync/corosync.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/corosync/files/corosync.initd,v 1.2 2010/11/17 07:07:03 xarthisius Exp $
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting Corosync Cluster Engine"
+ start-stop-daemon --start -q --exec /usr/sbin/corosync \
+ --pidfile /var/run/corosync.pid --make-pidfile --background \
+ -- -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Corosync Cluster Engine"
+ start-stop-daemon --stop -q --pidfile /var/run/corosync.pid
+ eend $?
+}
diff --git a/testing/crosstool-ng/APKBUILD b/testing/crosstool-ng/APKBUILD
new file mode 100644
index 000000000..f1fd382bb
--- /dev/null
+++ b/testing/crosstool-ng/APKBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=crosstool-ng
+pkgver=1.11.3
+pkgrel=0
+pkgdesc="tool for building toolchains"
+url="http://ymorin.is-a-geek.org/projects/crosstool"
+license="GPL"
+arch="noarch"
+depends="bash gawk bison flex automake autoconf libtool cvs sed texinfo"
+makedepends="ncurses-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://ymorin.is-a-geek.org/download/crosstool-ng/crosstool-ng-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="3830cbdcc7e1a60c93caeaf98f718187 crosstool-ng-1.11.3.tar.bz2"
diff --git a/testing/csync2/01-csync2-sqlite3.patch b/testing/csync2/01-csync2-sqlite3.patch
new file mode 100644
index 000000000..364dcca79
--- /dev/null
+++ b/testing/csync2/01-csync2-sqlite3.patch
@@ -0,0 +1,518 @@
+diff -ruN csync2-1.34.vanilla/action.c csync2-1.34/action.c
+--- csync2-1.34.vanilla/action.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/action.c 2008-06-12 15:36:47.000000000 +0200
+@@ -69,7 +69,7 @@
+ "SELECT filename from action WHERE command = '%s' "
+ "and logfile = '%s'", command, logfile)
+ {
+- textlist_add(&tl, SQL_V[0], 0);
++ textlist_add(&tl, SQL_V(0), 0);
+ } SQL_END;
+
+ mark = strstr(command_clr, "%%");
+@@ -130,7 +130,7 @@
+ SQL_BEGIN("Checking for sceduled commands",
+ "SELECT command, logfile FROM action GROUP BY command, logfile")
+ {
+- textlist_add2(&tl, SQL_V[0], SQL_V[1], 0);
++ textlist_add2(&tl, SQL_V(0), SQL_V(1), 0);
+ } SQL_END;
+
+ for (t = tl; t != 0; t = t->next)
+diff -ruN csync2-1.34.vanilla/check.c csync2-1.34/check.c
+--- csync2-1.34.vanilla/check.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/check.c 2008-06-12 15:36:47.000000000 +0200
+@@ -159,7 +159,7 @@
+ "SELECT filename from file where "
+ "filename = '%s' %s ORDER BY filename", url_encode(file), where_rec)
+ {
+- const char *filename = url_decode(SQL_V[0]);
++ const char *filename = url_decode(SQL_V(0));
+ if ( lstat_strict(prefixsubst(filename), &st) != 0 || csync_check_pure(filename) )
+ textlist_add(&tl, filename, 0);
+ } SQL_END;
+@@ -213,8 +213,9 @@
+
+ if ( check_type>0 && lstat_strict(prefixsubst(file), &st) != 0 ) {
+ if ( ignnoent ) return 0;
++ perror("blup");
+ csync_fatal("This should not happen: "
+- "Can't stat %s.\n", file);
++ "Can't stat %s %s %d %d %d.\n", prefixsubst(file), file,stat(file,&st),lstat_strict(file,&st),errno);
+ }
+
+ switch ( check_type )
+@@ -231,7 +232,7 @@
+ "filename = '%s'", url_encode(file))
+ {
+ if ( !csync_cmpchecktxt(checktxt,
+- url_decode(SQL_V[0])) ) {
++ url_decode(SQL_V(0))) ) {
+ csync_debug(2, "File has changed: %s\n", file);
+ this_is_dirty = 1;
+ }
+diff -ruN csync2-1.34.vanilla/config.h.in csync2-1.34/config.h.in
+--- csync2-1.34.vanilla/config.h.in 2007-07-24 23:04:24.000000000 +0200
++++ csync2-1.34/config.h.in 2008-06-12 15:36:47.000000000 +0200
+@@ -6,8 +6,8 @@
+ /* Define to 1 if you have the `rsync' library (-lrsync). */
+ #undef HAVE_LIBRSYNC
+
+-/* Define to 1 if you have the `sqlite' library (-lsqlite). */
+-#undef HAVE_LIBSQLITE
++/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
++#undef HAVE_LIBSQLITE3
+
+ /* Name of package */
+ #undef PACKAGE
+diff -ruN csync2-1.34.vanilla/configure csync2-1.34/configure
+--- csync2-1.34.vanilla/configure 2007-07-24 23:04:25.000000000 +0200
++++ csync2-1.34/configure 2008-06-12 15:36:47.000000000 +0200
+@@ -3671,13 +3671,13 @@
+
+ else
+
+-{ echo "$as_me:$LINENO: checking for sqlite_exec in -lsqlite" >&5
+-echo $ECHO_N "checking for sqlite_exec in -lsqlite... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_sqlite_sqlite_exec+set}" = set; then
++{ echo "$as_me:$LINENO: checking for sqlite3_exec in -lsqlite3" >&5
++echo $ECHO_N "checking for sqlite3_exec in -lsqlite3... $ECHO_C" >&6; }
++if test "${ac_cv_lib_sqlite3_sqlite3_exec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsqlite $LIBS"
++LIBS="-lsqlite3 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -3691,11 +3691,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char sqlite_exec ();
++char sqlite3_exec ();
+ int
+ main ()
+ {
+-return sqlite_exec ();
++return sqlite3_exec ();
+ ;
+ return 0;
+ }
+@@ -3718,30 +3718,30 @@
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+- ac_cv_lib_sqlite_sqlite_exec=yes
++ ac_cv_lib_sqlite3_sqlite3_exec=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+- ac_cv_lib_sqlite_sqlite_exec=no
++ ac_cv_lib_sqlite3_sqlite3_exec=no
+ fi
+
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_exec" >&5
+-echo "${ECHO_T}$ac_cv_lib_sqlite_sqlite_exec" >&6; }
+-if test $ac_cv_lib_sqlite_sqlite_exec = yes; then
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_exec" >&5
++echo "${ECHO_T}$ac_cv_lib_sqlite3_sqlite3_exec" >&6; }
++if test $ac_cv_lib_sqlite3_sqlite3_exec = yes; then
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBSQLITE 1
++#define HAVE_LIBSQLITE3 1
+ _ACEOF
+
+- LIBS="-lsqlite $LIBS"
++ LIBS="-lsqlite3 $LIBS"
+
+ else
+- { { echo "$as_me:$LINENO: error: libsqlite is required" >&5
+-echo "$as_me: error: libsqlite is required" >&2;}
++ { { echo "$as_me:$LINENO: error: libsqlite3 is required" >&5
++echo "$as_me: error: libsqlite3 is required" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+diff -ruN csync2-1.34.vanilla/configure.ac csync2-1.34/configure.ac
+--- csync2-1.34.vanilla/configure.ac 2007-07-24 23:04:19.000000000 +0200
++++ csync2-1.34/configure.ac 2008-06-12 15:36:47.000000000 +0200
+@@ -47,7 +47,7 @@
+ AS_HELP_STRING([--with-libsqlite-source=source-tar-file],
+ [build this libsqlite and link statically against it (hack! hack!)]),
+ AC_SUBST([libsqlite_source_file], $withval),
+- AC_CHECK_LIB([sqlite], [sqlite_exec], , [AC_MSG_ERROR(libsqlite is required)])
++ AC_CHECK_LIB([sqlite3], [sqlite3_exec], , [AC_MSG_ERROR(libsqlite3 is required)])
+ )
+ AM_CONDITIONAL([PRIVATE_LIBSQLITE], [test -n "$libsqlite_source_file"])
+
+diff -ruN csync2-1.34.vanilla/conn.c csync2-1.34/conn.c
+--- csync2-1.34.vanilla/conn.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/conn.c 2008-06-12 15:36:47.000000000 +0200
+@@ -181,7 +181,7 @@
+ "SELECT certdata FROM x509_cert WHERE peername = '%s'",
+ url_encode(peername))
+ {
+- if (!strcmp(SQL_V[0], certdata))
++ if (!strcmp(SQL_V(0), certdata))
+ cert_is_ok = 1;
+ else
+ cert_is_ok = 0;
+diff -ruN csync2-1.34.vanilla/csync2.c csync2-1.34/csync2.c
+--- csync2-1.34.vanilla/csync2.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/csync2.c 2008-06-12 15:36:47.000000000 +0200
+@@ -582,8 +582,8 @@
+ SQL_BEGIN("Check all hints",
+ "SELECT filename, recursive FROM hint")
+ {
+- textlist_add(&tl, url_decode(SQL_V[0]),
+- atoi(SQL_V[1]));
++ textlist_add(&tl, url_decode(SQL_V(0)),
++ atoi(SQL_V(1)));
+ } SQL_END;
+
+ for (t = tl; t != 0; t = t->next) {
+@@ -659,7 +659,7 @@
+ "SELECT filename FROM file WHERE filename = '%s' %s",
+ url_encode(realname), where_rec)
+ {
+- char *filename = strdup(url_encode(SQL_V[0]));
++ char *filename = strdup(url_encode(SQL_V(0)));
+ csync_mark(filename, 0, 0);
+ free(filename);
+ } SQL_END;
+@@ -695,7 +695,7 @@
+ SQL_BEGIN("DB Dump - Hint",
+ "SELECT recursive, filename FROM hint ORDER BY filename")
+ {
+- printf("%s\t%s\n", SQL_V[0], url_decode(SQL_V[1]));
++ printf("%s\t%s\n", SQL_V(0), url_decode(SQL_V(1)));
+ retval = -1;
+ } SQL_END;
+ break;
+@@ -705,8 +705,8 @@
+ SQL_BEGIN("DB Dump - File",
+ "SELECT checktxt, filename FROM file ORDER BY filename")
+ {
+- if (csync_find_next(0, url_decode(SQL_V[1]))) {
+- printf("%s\t%s\n", url_decode(SQL_V[0]), url_decode(SQL_V[1]));
++ if (csync_find_next(0, url_decode(SQL_V(1)))) {
++ printf("%s\t%s\n", url_decode(SQL_V(0)), url_decode(SQL_V(1)));
+ retval = -1;
+ }
+ } SQL_END;
+@@ -717,8 +717,8 @@
+ SQL_BEGIN("DB Dump - File",
+ "SELECT checktxt, filename FROM file ORDER BY filename")
+ {
+- if ( csync_match_file_host(url_decode(SQL_V[1]), argv[optind], argv[optind+1], 0) ) {
+- printf("%s\t%s\n", url_decode(SQL_V[0]), url_decode(SQL_V[1]));
++ if ( csync_match_file_host(url_decode(SQL_V(1)), argv[optind], argv[optind+1], 0) ) {
++ printf("%s\t%s\n", url_decode(SQL_V(0)), url_decode(SQL_V(1)));
+ retval = -1;
+ }
+ } SQL_END;
+@@ -769,9 +769,9 @@
+ SQL_BEGIN("DB Dump - Dirty",
+ "SELECT force, myname, peername, filename FROM dirty ORDER BY filename")
+ {
+- if (csync_find_next(0, url_decode(SQL_V[3]))) {
+- printf("%s\t%s\t%s\t%s\n", atoi(SQL_V[0]) ? "force" : "chary",
+- url_decode(SQL_V[1]), url_decode(SQL_V[2]), url_decode(SQL_V[3]));
++ if (csync_find_next(0, url_decode(SQL_V(3)))) {
++ printf("%s\t%s\t%s\t%s\n", atoi(SQL_V(0)) ? "force" : "chary",
++ url_decode(SQL_V(1)), url_decode(SQL_V(2)), url_decode(SQL_V(3)));
+ retval = -1;
+ }
+ } SQL_END;
+diff -ruN csync2-1.34.vanilla/csync2.h csync2-1.34/csync2.h
+--- csync2-1.34.vanilla/csync2.h 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/csync2.h 2008-06-12 15:36:47.000000000 +0200
+@@ -22,6 +22,7 @@
+ #define CSYNC2_H 1
+
+ #define _GNU_SOURCE
++#define _FILE_OFFSET_BITS 64
+
+ #include "config.h"
+ #include <stdio.h>
+@@ -91,19 +92,24 @@
+ extern int csync_db_next(void *vmx, const char *err,
+ int *pN, const char ***pazValue, const char ***pazColName);
+ extern void csync_db_fin(void *vmx, const char *err);
++extern void * csync_db_colblob(void *stmtx,int col);
++
+
+ #define SQL(e, s, ...) csync_db_sql(e, s, ##__VA_ARGS__)
+
++#define SQL_V(col) \
++ (csync_db_colblob(SQL_VM,col))
++
+ #define SQL_BEGIN(e, s, ...) \
+ { \
+ char *SQL_ERR = e; \
+ void *SQL_VM = csync_db_begin(SQL_ERR, s, ##__VA_ARGS__); \
+ int SQL_COUNT = 0; \
+ while (1) { \
+- const char **SQL_V, **SQL_N; \
++ const char **notSQL_V, **notSQL_N; \
+ int SQL_C; \
+ if ( !csync_db_next(SQL_VM, SQL_ERR, \
+- &SQL_C, &SQL_V, &SQL_N) ) break; \
++ &SQL_C, &notSQL_V, &notSQL_N) ) break; \
+ SQL_COUNT++;
+
+ #define SQL_FIN }{
+diff -ruN csync2-1.34.vanilla/daemon.c csync2-1.34/daemon.c
+--- csync2-1.34.vanilla/daemon.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/daemon.c 2008-06-12 15:36:47.000000000 +0200
+@@ -443,8 +443,8 @@
+ strcmp(tag[2], "-") ? url_encode(tag[2]) : "",
+ strcmp(tag[2], "-") ? "'" : "")
+ {
+- if ( csync_match_file_host(url_decode(SQL_V[1]), tag[1], peer, (const char **)&tag[3]) )
+- conn_printf("%s\t%s\n", SQL_V[0], SQL_V[1]);
++ if ( csync_match_file_host(url_decode(SQL_V(1)), tag[1], peer, (const char **)&tag[3]) )
++ conn_printf("%s\t%s\n", SQL_V(0), SQL_V(1));
+ } SQL_END;
+ break;
+
+diff -ruN csync2-1.34.vanilla/db.c csync2-1.34/db.c
+--- csync2-1.34.vanilla/db.c 2007-07-24 23:04:18.000000000 +0200
++++ csync2-1.34/db.c 2008-06-12 15:36:47.000000000 +0200
+@@ -19,7 +19,7 @@
+ */
+
+ #include "csync2.h"
+-#include <sqlite.h>
++#include <sqlite3.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+@@ -33,7 +33,7 @@
+ int db_blocking_mode = 1;
+ int db_sync_mode = 1;
+
+-static sqlite *db = 0;
++static sqlite3 *db = 0;
+
+ static int get_dblock_timeout()
+ {
+@@ -128,44 +128,46 @@
+
+ void csync_db_open(const char *file)
+ {
+- db = sqlite_open(file, 0, 0);
+- if ( db == 0 )
+- csync_fatal("Can't open database: %s\n", file);
++ int r;
++ //db = sqlite_open(file, 0, 0);
++ r=sqlite3_open(file, &db);
++ if ( db == 0 || r)
++ csync_fatal("Can't open database: %s, result %d\n", file,r);
+
+ /* ignore errors on table creation */
+ in_sql_query++;
+- sqlite_exec(db,
++ sqlite3_exec(db,
+ "CREATE TABLE file ("
+ " filename, checktxt,"
+ " UNIQUE ( filename ) ON CONFLICT REPLACE"
+ ")",
+ 0, 0, 0);
+- sqlite_exec(db,
++ sqlite3_exec(db,
+ "CREATE TABLE dirty ("
+ " filename, force, myname, peername,"
+ " UNIQUE ( filename, peername ) ON CONFLICT IGNORE"
+ ")",
+ 0, 0, 0);
+- sqlite_exec(db,
++ sqlite3_exec(db,
+ "CREATE TABLE hint ("
+ " filename, recursive,"
+ " UNIQUE ( filename, recursive ) ON CONFLICT IGNORE"
+ ")",
+ 0, 0, 0);
+- sqlite_exec(db,
++ sqlite3_exec(db,
+ "CREATE TABLE action ("
+ " filename, command, logfile,"
+ " UNIQUE ( filename, command ) ON CONFLICT IGNORE"
+ ")",
+ 0, 0, 0);
+- sqlite_exec(db,
++ sqlite3_exec(db,
+ "CREATE TABLE x509_cert ("
+ " peername, certdata,"
+ " UNIQUE ( peername ) ON CONFLICT IGNORE"
+ ")",
+ 0, 0, 0);
+ if (!db_sync_mode)
+- sqlite_exec(db, "PRAGMA synchronous = OFF", 0, 0, 0);
++ sqlite3_exec(db, "PRAGMA synchronous = OFF", 0, 0, 0);
+ in_sql_query--;
+ }
+
+@@ -178,7 +180,7 @@
+ SQL("COMMIT TRANSACTION", "COMMIT TRANSACTION");
+ tqueries_counter = -10;
+ }
+- sqlite_close(db);
++ sqlite3_close(db);
+ begin_commit_recursion--;
+ db = 0;
+ }
+@@ -199,7 +201,7 @@
+ csync_debug(2, "SQL: %s\n", sql);
+
+ while (1) {
+- rc = sqlite_exec(db, sql, 0, 0, 0);
++ rc = sqlite3_exec(db, sql, 0, 0, 0);
+ if ( rc != SQLITE_BUSY ) break;
+ if (busyc++ > get_dblock_timeout()) { db = 0; csync_fatal(DEADLOCK_MESSAGE); }
+ csync_debug(2, "Database is busy, sleeping a sec.\n");
+@@ -216,7 +218,8 @@
+
+ void* csync_db_begin(const char *err, const char *fmt, ...)
+ {
+- sqlite_vm *vm;
++ //sqlite_vm *vm;
++ sqlite3_stmt *stmt;
+ char *sql;
+ va_list ap;
+ int rc, busyc = 0;
+@@ -231,7 +234,7 @@
+ csync_debug(2, "SQL: %s\n", sql);
+
+ while (1) {
+- rc = sqlite_compile(db, sql, 0, &vm, 0);
++ rc = sqlite3_prepare(db, sql, 0, &stmt, 0);
+ if ( rc != SQLITE_BUSY ) break;
+ if (busyc++ > get_dblock_timeout()) { db = 0; csync_fatal(DEADLOCK_MESSAGE); }
+ csync_debug(2, "Database is busy, sleeping a sec.\n");
+@@ -242,19 +245,21 @@
+ csync_fatal("Database Error: %s [%d]: %s\n", err, rc, sql);
+ free(sql);
+
+- return vm;
++ return stmt;
+ }
+
+-int csync_db_next(void *vmx, const char *err,
++int csync_db_next(void *stmtx, const char *err,
+ int *pN, const char ***pazValue, const char ***pazColName)
+ {
+- sqlite_vm *vm = vmx;
++ //sqlite_vm *vm = vmx;
++ sqlite3_stmt *stmt = stmtx;
+ int rc, busyc = 0;
+
+ csync_debug(4, "Trying to fetch a row from the database.\n");
+
+ while (1) {
+- rc = sqlite_step(vm, pN, pazValue, pazColName);
++ //rc = sqlite_step(vm, pN, pazValue, pazColName);
++ rc = sqlite3_step(stmt);
+ if ( rc != SQLITE_BUSY ) break;
+ if (busyc++ > get_dblock_timeout()) { db = 0; csync_fatal(DEADLOCK_MESSAGE); }
+ csync_debug(2, "Database is busy, sleeping a sec.\n");
+@@ -267,16 +272,21 @@
+
+ return rc == SQLITE_ROW;
+ }
++void * csync_db_colblob(void *stmtx,int col) {
++ sqlite3_stmt *stmt = stmtx;
++ return sqlite3_column_blob(stmt,col);
++}
+
+-void csync_db_fin(void *vmx, const char *err)
++void csync_db_fin(void *stmtx, const char *err)
+ {
+- sqlite_vm *vm = vmx;
++ //sqlite_vm *vm = vmx;
++ sqlite3_stmt *stmt=stmtx;
+ int rc, busyc = 0;
+
+ csync_debug(2, "SQL Query finished.\n");
+
+ while (1) {
+- rc = sqlite_finalize(vm, 0);
++ rc = sqlite3_finalize(stmt);
+ if ( rc != SQLITE_BUSY ) break;
+ if (busyc++ > get_dblock_timeout()) { db = 0; csync_fatal(DEADLOCK_MESSAGE); }
+ csync_debug(2, "Database is busy, sleeping a sec.\n");
+--- src/csync2-1.34/update.c
++++ new/update.c
+@@ -545,12 +545,12 @@
+ "SELECT filename, myname, force FROM dirty WHERE peername = '%s' "
+ "ORDER by filename ASC", url_encode(peername))
+ {
+- const char *filename = url_decode(SQL_V[0]);
++ const char *filename = url_decode(SQL_V(0));
+ int i, use_this = patnum == 0;
+ for (i=0; i<patnum && !use_this; i++)
+ if ( compare_files(filename, patlist[i], recursive) ) use_this = 1;
+ if (use_this)
+- textlist_add2(&tl, filename, url_decode(SQL_V[1]), atoi(SQL_V[2]));
++ textlist_add2(&tl, filename, url_decode(SQL_V(1)), atoi(SQL_V(2)));
+ } SQL_END;
+
+ /* just return if there are no files to update */
+@@ -626,7 +626,7 @@
+ SQL_BEGIN("Get hosts from dirty table",
+ "SELECT peername FROM dirty GROUP BY peername ORDER BY random()")
+ {
+- textlist_add(&tl, url_decode(SQL_V[0]), 0);
++ textlist_add(&tl, url_decode(SQL_V(0)), 0);
+ } SQL_END;
+
+ for (t = tl; t != 0; t = t->next) {
+@@ -798,7 +798,7 @@
+ filename ? url_encode(filename) : "",
+ filename ? "'" : "")
+ {
+- char *l_file = strdup(url_decode(SQL_V[1])), *l_checktxt = strdup(url_decode(SQL_V[0]));
++ char *l_file = strdup(url_decode(SQL_V(1))), *l_checktxt = strdup(url_decode(SQL_V(0)));
+ if ( csync_match_file_host(l_file, myname, peername, 0) ) {
+ if ( remote_eof ) {
+ got_remote_eof:
+@@ -936,17 +936,17 @@
+ const struct csync_group *g = 0;
+ const struct csync_group_host *h;
+
+- const char *filename = url_decode(SQL_V[0]);
++ const char *filename = url_decode(SQL_V(0));
+
+ while ((g=csync_find_next(g, filename)) != 0) {
+- if (!strcmp(g->myname, SQL_V[1]))
++ if (!strcmp(g->myname, SQL_V(1)))
+ for (h = g->host; h; h = h->next) {
+- if (!strcmp(h->hostname, SQL_V[2]))
++ if (!strcmp(h->hostname, SQL_V(2)))
+ goto this_dirty_record_is_ok;
+ }
+ }
+
+- textlist_add2(&tl, SQL_V[0], SQL_V[2], 0);
++ textlist_add2(&tl, SQL_V(0), SQL_V(2), 0);
+
+ this_dirty_record_is_ok:
+ ;
+@@ -962,8 +962,8 @@
+ SQL_BEGIN("Query file DB",
+ "SELECT filename FROM file")
+ {
+- if (!csync_find_next(0, url_decode(SQL_V[0])))
+- textlist_add(&tl, SQL_V[0], 0);
++ if (!csync_find_next(0, url_decode(SQL_V(0))))
++ textlist_add(&tl, SQL_V(0), 0);
+ } SQL_END;
+ for (t = tl; t != 0; t = t->next) {
+ csync_debug(1, "Removing %s from file db.\n", t->value);
diff --git a/testing/csync2/02-csync2-1.34-gnutls_pkgconfig.patch b/testing/csync2/02-csync2-1.34-gnutls_pkgconfig.patch
new file mode 100644
index 000000000..b9e1d2726
--- /dev/null
+++ b/testing/csync2/02-csync2-1.34-gnutls_pkgconfig.patch
@@ -0,0 +1,24 @@
+--- old/configure.ac
++++ new/configure.ac
+@@ -59,16 +59,11 @@
+ if test "$enable_gnutls" != no
+ then
+
+- # Check for gnuTLS.
+- AM_PATH_LIBGNUTLS(1.0.0, , [ AC_MSG_ERROR([[gnutls not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]]) ])
+-
+- # This is a bloody hack for fedora core
+- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
+- LIBS="$LIBS $LIBGNUTLS_LIBS -ltasn1"
+-
+- # Check gnuTLS SSL compatibility lib.
+- AC_CHECK_LIB([gnutls-openssl], [SSL_new], , [AC_MSG_ERROR([[gnutls-openssl not found; install gnutls, gnutls-openssl and libtasn1 packages for your system or run configure with --disable-gnutls]])])
+-
++ PKG_CHECK_MODULES(LIBGNUTLS, gnutls, [
++ CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gnutls libssl`"
++ LIBS="$LIBS `$PKG_CONFIG --libs gnutls libssl` -DHAVE_LIBGNUTLS_OPENSSL"
++ ])
++
+ fi
+
+ AC_CONFIG_FILES([Makefile])
diff --git a/testing/csync2/APKBUILD b/testing/csync2/APKBUILD
new file mode 100644
index 000000000..425d15cc2
--- /dev/null
+++ b/testing/csync2/APKBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=csync2
+pkgver=1.34
+pkgrel=0
+pkgdesc="a cluster synchronization tool"
+url="http://oss.linbit.com/csync2/"
+arch="all"
+license="GPL-2+"
+depends=
+makedepends="librsync-dev gnutls-dev sqlite-dev autoconf automake bison flex"
+install=
+subpackages="$pkgname-doc"
+source="http://oss.linbit.com/csync2/csync2-$pkgver.tar.gz
+ 01-csync2-sqlite3.patch
+ 02-csync2-1.34-gnutls_pkgconfig.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in ../*.patch; do
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+ autoreconf --install --force
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="efc8a3548996b79cef2ad76af5e93cd8 csync2-1.34.tar.gz
+35ba1bb1aafd87741c7ef55bdfb2e212 01-csync2-sqlite3.patch
+31b2ed6a7bb424ccdbf1486223eca323 02-csync2-1.34-gnutls_pkgconfig.patch"
diff --git a/testing/cvechecker/APKBUILD b/testing/cvechecker/APKBUILD
new file mode 100644
index 000000000..36752a9a6
--- /dev/null
+++ b/testing/cvechecker/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=cvechecker
+pkgver=3.1
+pkgrel=0
+pkgdesc="A local CVE checker tool"
+url="http://cvechecker.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="libconfig-dev argp-standalone
+ mysql-dev sqlite-dev openssl-dev libcrypto1.0"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/cvechecker/files/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ export LIBS="-largp"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-sqlite3 \
+ --enable-mysql
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+md5sums="d49e7322703045d32e741ed172be5e69 cvechecker-3.1.tar.gz"
diff --git a/testing/d-feet/APKBUILD b/testing/d-feet/APKBUILD
new file mode 100644
index 000000000..cde6727e6
--- /dev/null
+++ b/testing/d-feet/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=d-feet
+pkgver=0.1.12
+pkgrel=0
+pkgdesc="A powerful D-Bus Debugger"
+url="http://live.gnome.org/DFeet/"
+arch="noarch"
+license="GPLv2+"
+depends="python py-gtk"
+makedepends="py-gtk-dev py-setuptools"
+install=""
+subpackages=""
+source="http://download.gnome.org/sources/d-feet/0.1/d-feet-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/d-feet-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="01b0296277b26330bc430742ad4e758a d-feet-0.1.12.tar.bz2"
diff --git a/testing/daemontools/0.76-errno.patch b/testing/daemontools/0.76-errno.patch
new file mode 100644
index 000000000..3af157c46
--- /dev/null
+++ b/testing/daemontools/0.76-errno.patch
@@ -0,0 +1,11 @@
+--- src/error.h 2001-07-12 11:49:49.000000000 -0500
++++ src/error.h 2003-02-26 02:14:06.000000000 -0600
+@@ -3,7 +3,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/testing/daemontools/0.76-warnings.patch b/testing/daemontools/0.76-warnings.patch
new file mode 100644
index 000000000..f558bb18b
--- /dev/null
+++ b/testing/daemontools/0.76-warnings.patch
@@ -0,0 +1,74 @@
+Fixup misc warnings
+
+Patch by RiverRat
+
+http://bugs.gentoo.org/124487
+
+--- src/chkshsgr.c
++++ src/chkshsgr.c
+@@ -1,10 +1,13 @@
+ /* Public domain. */
+
++#include <sys/types.h>
++#include <stdlib.h>
++#include <grp.h>
+ #include <unistd.h>
+
+ int main()
+ {
+- short x[4];
++ gid_t x[4];
+
+ x[0] = x[1] = 0;
+ if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1);
+--- src/matchtest.c
++++ src/matchtest.c
+@@ -1,3 +1,4 @@
++#include <unistd.h>
+ #include "match.h"
+ #include "buffer.h"
+ #include "str.h"
+--- src/multilog.c
++++ src/multilog.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- src/prot.c
++++ src/prot.c
+@@ -1,5 +1,8 @@
+ /* Public domain. */
+
++#include <sys/types.h>
++#include <unistd.h>
++#include <grp.h>
+ #include "hasshsgr.h"
+ #include "prot.h"
+
+--- src/seek_set.c
++++ src/seek_set.c
+@@ -1,6 +1,7 @@
+ /* Public domain. */
+
+ #include <sys/types.h>
++#include <unistd.h>
+ #include "seek.h"
+
+ #define SET 0 /* sigh */
+--- src/supervise.c
++++ src/supervise.c
+@@ -1,3 +1,4 @@
++#include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+--- src/pathexec_run.c
++++ src/pathexec_run.c
+@@ -1,5 +1,6 @@
+ /* Public domain. */
+
++#include <unistd.h>
+ #include "error.h"
+ #include "stralloc.h"
+ #include "str.h"
diff --git a/testing/daemontools/APKBUILD b/testing/daemontools/APKBUILD
new file mode 100644
index 000000000..6fafd9edc
--- /dev/null
+++ b/testing/daemontools/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=daemontools
+pkgver=0.76
+pkgrel=1
+pkgdesc="Collection of tools for managing UNIX services"
+url="http://cr.yp.to/daemontools.html"
+arch="all"
+license="public-domain"
+depends=
+# The makefile need GNU cat for 'cat -v'
+makedepends="coreutils"
+
+source="http://cr.yp.to/daemontools/$pkgname-$pkgver.tar.gz
+ 0.76-errno.patch
+ 0.76-warnings.patch
+ svscan.initd
+ "
+
+_builddir="$srcdir"/admin/$pkgname-$pkgver/src
+
+prepare() {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+}
+
+build() {
+ cd "$_builddir"
+ echo "${CC:-"gcc"} ${CFLAGS}" > conf-cc
+ echo "${CC:-"gcc"} ${LDFLAGS}" > conf-ld
+ touch > home
+ make PATH="/usr/bin:/bin" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/bin "$pkgdir"/service
+ for f in $(cat ../package/commands); do
+ cp $f "$pkgdir"/usr/bin/$f
+ done
+ install -Dm755 "$srcdir"/svscan.initd "$pkgdir"/etc/init.d/svscan
+}
+
+md5sums="1871af2453d6e464034968a0fbcb2bfc daemontools-0.76.tar.gz
+c75438b1c3b9d9f67691bd10cf3c8e52 0.76-errno.patch
+ad68177f50bfffb6a1cbf8c668de6a55 0.76-warnings.patch
+c6e4ace205400be062d3ba82315cbcd1 svscan.initd"
diff --git a/testing/daemontools/svscan.initd b/testing/daemontools/svscan.initd
new file mode 100644
index 000000000..bf7af28fa
--- /dev/null
+++ b/testing/daemontools/svscan.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/daemontools/files/svscan.init-0.76-r7,v 1.1 2008/12/07 06:59:37 robbat2 Exp $
+
+depend() {
+ use net
+ before ntpd ntp-client spamd apache apache2
+ after firewall
+}
+
+start() {
+ ebegin "Starting service scan"
+ setsid start-stop-daemon --start --exec /usr/bin/svscan \
+ --background --make-pidfile \
+ --pidfile /var/run/svscan.pid -- /service
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping service scan"
+ start-stop-daemon --stop --exec /usr/bin/svscan \
+ --pidfile /var/run/svscan.pid
+ eend $?
+
+ ebegin "Stopping service scan services"
+ svc -dx /service/* 2>/dev/null
+ eend $?
+
+ ebegin "Stopping service scan logging"
+ svc -dx /service/*/log 2>/dev/null
+ eend $?
+}
diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD
new file mode 100644
index 000000000..bc5c0cad1
--- /dev/null
+++ b/testing/dbmail/APKBUILD
@@ -0,0 +1,94 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=dbmail
+_realpkgver=3.0.0-rc3
+pkgver=${_realpkgver/-/_}
+pkgrel=1
+pkgdesc="Fast and scalable sql based mail services"
+url="http://dbmail.org"
+arch="all"
+license="GPL"
+pkgusers="dbmail"
+pkggroups="dbmail"
+depends=
+depends_dev="openldap-dev libsieve-dev glib-dev gmime-dev
+ mhash-dev libevent-dev libzdb-dev"
+makedepends="$depends_dev asciidoc xmlto automake autoconf"
+install=""
+subpackages="$pkgname-doc $pkgname-auth-ldap:auth_ldap"
+source="http://www.dbmail.org/download/3.0/dbmail-${_realpkgver}.tar.gz
+ $pkgname-imapd.initd
+ $pkgname-lmtpd.initd
+ $pkgname-pop3d.initd
+ $pkgname-httpd.initd
+ $pkgname-timsieved.initd
+ $pkgname.pre-install
+ post-rc3.patch
+ dbmail.conf
+ "
+
+_builddir="$srcdir/${pkgname}-${_realpkgver}"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # we need support for gmine 2.6
+ sed -i 's/gmime-2.4/gmime-2.6/g' configure
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-sieve \
+ --with-ldap \
+ --disable-static
+ make || return 1
+ # make man pages
+ cd "$_builddir/man"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/dbmail/*.la || return 1
+ mkdir -p "$pkgdir/usr/share/$pkgname"
+ mv sql/* "$pkgdir/usr/share/$pkgname/"
+ mv "$pkgname.schema" "$pkgdir/usr/share/$pkgname/"
+ for i in imapd lmtpd pop3d httpd timsieved; do
+ install -Dm755 "$srcdir/$pkgname-$i.initd" \
+ "$pkgdir/etc/init.d/dbmail-$i" || return 1
+ done
+ #install man pages
+ cd "$_builddir/man"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m644 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname.conf || return 1
+ install -dDo dbmail "$pkgdir"/var/run/dbmail || return 1
+ install -dDo dbmail "$pkgdir"/var/lib/dbmail || return 1
+}
+
+auth_ldap() {
+ pkgdesc="$pkgname ldap authentication"
+ mkdir -p "$subpkgdir"/usr/lib/dbmail
+ mv "$pkgdir"/usr/lib/dbmail/libauth_ldap* \
+ "$subpkgdir"/usr/lib/dbmail/ || return 1
+}
+
+md5sums="52c3b9aad310efc90a6a2fff0552f73e dbmail-3.0.0-rc3.tar.gz
+2f77092fade3b10123a47a5cce5b6a4a dbmail-imapd.initd
+f3a84b58ba878375ca088a0b544922cc dbmail-lmtpd.initd
+4273524211baefd9f32ea40ce9cb7dd1 dbmail-pop3d.initd
+1bf891189a6daf14254738d28f3c654f dbmail-httpd.initd
+4cd701bf1a8d292848fffe208afbe182 dbmail-timsieved.initd
+f146703e0c8c9badc92de152ac6f1e5b dbmail.pre-install
+f609d4cd01dbef95c6a1c498133a2065 post-rc3.patch
+549f2073f1c6ac902f783b493c0667d4 dbmail.conf"
diff --git a/testing/dbmail/dbmail-httpd.initd b/testing/dbmail/dbmail-httpd.initd
new file mode 100644
index 000000000..2bda360b6
--- /dev/null
+++ b/testing/dbmail/dbmail-httpd.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail/httpd.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() {
+ if [ ! -e "/etc/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "/etc/dbmail.conf"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail HTTP daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-httpd \
+ --name dbmail-httpd \
+ -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail HTTP daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/testing/dbmail/dbmail-imapd.initd b/testing/dbmail/dbmail-imapd.initd
new file mode 100644
index 000000000..cd8ed89cd
--- /dev/null
+++ b/testing/dbmail/dbmail-imapd.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail/imapd.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() {
+ if [ ! -e "/etc/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "/etc/dbmail.conf"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail IMAP daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-imapd \
+ --name dbmail-imapd \
+ -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail IMAP daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/testing/dbmail/dbmail-lmtpd.initd b/testing/dbmail/dbmail-lmtpd.initd
new file mode 100644
index 000000000..38c0f552b
--- /dev/null
+++ b/testing/dbmail/dbmail-lmtpd.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail/lmtpd.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() {
+ if [ ! -e "/etc/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "/etc/dbmail.conf"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail LMTP daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-lmtpd \
+ --name dbmail-lmtpd \
+ -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail LMTP daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/testing/dbmail/dbmail-pop3d.initd b/testing/dbmail/dbmail-pop3d.initd
new file mode 100644
index 000000000..3ceb12efe
--- /dev/null
+++ b/testing/dbmail/dbmail-pop3d.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail/pop3d.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() {
+ if [ ! -e "/etc/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "/etc/dbmail.conf"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail POP3 daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-pop3d \
+ --name dbmail-pop3d \
+ -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail POP3 daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/testing/dbmail/dbmail-timsieved.initd b/testing/dbmail/dbmail-timsieved.initd
new file mode 100644
index 000000000..4c6414c2a
--- /dev/null
+++ b/testing/dbmail/dbmail-timsieved.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+#
+
+PIDFILE="/var/run/dbmail/timsieved.pid"
+
+depend() {
+ need net
+ use mysql
+ use pgsql
+ after mta
+}
+
+checkconfig() checkconfig() {
+ if [ ! -e "/etc/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "/etc/dbmail.conf"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
+}
+
+start() {
+ checkconfig && \
+ ebegin "Starting DBMail SIEVE daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-timsieved \
+ -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DBMail SIEVE daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/testing/dbmail/dbmail.conf b/testing/dbmail/dbmail.conf
new file mode 100644
index 000000000..fdcb7ac7c
--- /dev/null
+++ b/testing/dbmail/dbmail.conf
@@ -0,0 +1,408 @@
+
+# (c) 2000-2006 IC&S, The Netherlands
+#
+# Configuration file for DBMAIL
+
+[DBMAIL]
+#
+# Database settings
+#
+
+#
+# Supported drivers are mysql, postgresql, sqlite.
+#
+driver = sqlite
+
+#
+# Supported drivers are sql, ldap.
+#
+authdriver = sql
+
+#
+# Host for database, set to localhost if database is on
+# the same host as dbmail and you want to use a local
+# socket for connecting.
+#
+host =
+
+#
+# If you want to use TCP/IP for connecting to the database,
+# and have the database running on a non-standard port.
+#
+sqlport =
+
+#
+# When using a local socket connection to the database, fill
+# in the path to the socket here (e.g. /var/run/mysql.sock).
+#
+sqlsocket =
+
+#
+# Database username.
+#
+user = dbmail
+
+#
+# Database password.
+#
+pass =
+
+#
+# Database name.
+#
+db = /var/lib/dbmail/dbmail.db
+
+#
+# Number of database connections per threaded daemon
+# This also determines the size of the worker threadpool
+#
+#max_db_connections = 10
+
+#
+# Table prefix. Defaults to "dbmail_" if not specified.
+#
+table_prefix = dbmail_
+
+#
+# encoding must match the database/table encoding.
+# i.e. latin1, utf8
+encoding = utf8
+
+#
+# messages with unknown encoding will be assumed to have
+# default_msg_encoding
+# i.e. iso8859-1, utf8
+default_msg_encoding = utf8
+
+#
+# Postmaster's email address for use in bounce messages.
+#
+#postmaster = DBMAIL-MAILER
+
+#
+# Sendmail executable for forwards, replies, notifies, vacations.
+# You may use pipes (|) in this command, for example:
+# dos2unix|/usr/sbin/sendmail works well with Qmail.
+# You may use quotes (") for executables with unusual names.
+#
+sendmail = /usr/sbin/sendmail
+
+#
+#
+# The following items can be overridden in the service-specific sections.
+#
+#
+
+#
+# Logging via stderr/log file and syslog
+#
+# Logging is broken up into 8 logging levels and each level can be indivually turned on or off.
+# The Stderr/log file logs all entries to stderr or the log file.
+# Syslog logging uses the facility mail and the logging level of the event for logging.
+# Syslog can then be configured to log data according to the levels.
+#
+# Set the log level to the sum of the values next to the levels you want to record.
+# 1 = Emergency
+# 2 = Alert
+# 4 = Critical
+# 8 = Error
+# 16 = Warning
+# 32 = Notice
+# 64 = Info
+# 128 = Debug
+# 256 = Database -> Logs at debug level
+#
+# Examples: 0 = Nothing
+# 31 = Emergency + Alert + Critical + Error + Warning
+# 511 = Everything
+#
+file_logging_levels = 7
+#
+syslog_logging_levels = 31
+
+#
+# Generate a log entry for database queries for the log level at number of seconds of query execution time.
+#
+query_time_info = 10
+query_time_notice = 20
+query_time_warning = 30
+
+#
+# Throw an exception is the query takes longer than query_timeout seconds
+query_timeout = 300
+
+#
+# Root privs are used to open a port, then privs
+# are dropped down to the user/group specified here.
+#
+effective_user = dbmail
+effective_group = dbmail
+
+#
+# The IPv4 and/or IPv6 addresses the services will bind to.
+# Use * for all local interfaces.
+# Use 127.0.0.1 for localhost only.
+# Separate multiple entries with spaces ( ) or commas (,).
+#
+bindip = 0.0.0.0 # IPv4 only - all IP's
+#bindip = :: # IPv4 and IPv6 - all IP's (linux)
+#bindip = :: # IPv6 only - all IP's (BSD)
+#bindip = 0.0.0.0,:: # IPv4 and IPv6 - all IP's (BSD)
+
+
+#
+# Idle time allowed before a connection is shut off.
+#
+timeout = 300
+
+#
+# Idle time allowed before a connection is shut off if you have not logged in yet.
+#
+login_timeout = 60
+
+#
+# If yes, resolves IP addresses to DNS names when logging.
+#
+resolve_ip = no
+
+#
+# If yes, keep statistics in the authlog table for connecting users
+#
+authlog = no
+
+#
+# logfile for stdout messages
+#
+logfile = /var/log/dbmail.log
+
+#
+# logfile for stderr messages
+#
+errorlog = /var/log/dbmail.err
+
+#
+# directory for storing PID files
+#
+pid_directory = /var/run/dbmail
+
+#
+# directory for locating libraries (normally has a sane default compiled-in)
+#
+library_directory = /usr/lib/dbmail
+
+#
+# SSL/TLS certificates
+#
+# A file containing a list of CAs in PEM format
+tls_cafile =
+
+# A file containing a PEM format certificate
+tls_cert =
+
+# A file containing a PEM format RSA or DSA key
+tls_key =
+
+# A cipher list string in the format given in ciphers(1)
+tls_ciphers =
+
+
+# hashing algorithm. You can select your favorite hash type
+# for generating unique ids for message parts.
+#
+# for valid values check mhash(3) but minus the MHASH_ prefix.
+#
+# if you ever change this value run 'dbmail-util --rehash' to
+# update the hash for all mimeparts.
+#
+# examples: MD5, SHA1, SHA256, SHA512, TIGER, WHIRLPOOL
+#
+hash_algorithm = SHA1
+
+
+
+[LMTP]
+port = 24
+#tls_port =
+
+
+[POP]
+port = 110
+#tls_port = 995
+
+# You can set an alternate banner to display when connecting to the service
+# banner = DBMAIL pop3 server ready to rock
+
+#
+# If yes, allows SMTP access from the host IP connecting by POP3.
+# This requires addition configuration of your MTA
+#
+pop_before_smtp = no
+
+[HTTP]
+port = 41380
+#
+# the httpd daemon provides full access to all users, mailboxes
+# and messages. Be very careful with this one!
+bindip = 127.0.0.1
+admin = admin:secret
+
+[IMAP]
+# You can set an alternate banner to display when connecting to the service
+# banner = imap 4r1 server (dbmail 2.3.x)
+
+#
+# Port to bind to.
+#
+port = 143
+#tls_port = 993
+
+#
+# IMAP prefers a longer timeout than other services.
+#
+timeout = 4000
+
+#
+# If yes, allows SMTP access from the host IP connecting by IMAP.
+# This requires addition configuration of your MTA
+#
+imap_before_smtp = no
+
+#
+# during IDLE, how many seconds between checking the mailbox
+# status (default: 30)
+#
+# idle_timeout = 30
+
+#
+# Provide a CAPABILITY to override the default
+#
+# capability = IMAP4 IMAP4rev1 AUTH=LOGIN ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE
+
+# Send '* STATUS "mailbox" (MESSAGES x RECENT x UNSEEN x NEXTUID x)'
+# for all subscribed mailboxes during IDLE (default: no)
+# note: EXPERIMENTAL (and most likely disabled in the code)
+#
+# idle_status = yes
+
+
+[SIEVE]
+#
+# Port to bind to.
+#
+port = 2000
+tls_port =
+
+
+[LDAP]
+port = 389
+version = 3
+hostname = ldap
+base_dn = ou=People,dc=mydomain,dc=com
+
+#
+# If your LDAP library supports ldap_initialize(), then you can use the
+# alternative LDAP server DSN like following.
+#
+# URI = ldap://127.0.0.1:389
+# URI = ldapi://%2fvar%2frun%2fopenldap%2fldapi/
+
+#
+# Leave blank for anonymous bind.
+# example: cn=admin,dc=mydomain,dc=com
+#
+bind_dn =
+
+#
+# Leave blank for anonymous bind.
+#
+bind_pw =
+scope = SubTree
+
+# AD users may want to set this to 'no' to disable
+# ldap referrals if you are seeing 'Operations errors'
+# in your logs
+#
+referrals = yes
+
+user_objectclass = top,account,dbmailUser
+forw_objectclass = top,account,dbmailForwardingAddress
+cn_string = uid
+field_passwd = userPassword
+field_uid = uid
+field_nid = uidNumber
+min_nid = 10000
+max_nid = 15000
+field_cid = gidNumber
+min_cid = 10000
+max_cid = 15000
+
+# a comma-separated list of attributes to match when searching
+# for users or forwards that match a delivery address. A match
+# on any of them is a hit.
+field_mail = mail
+
+# field that holds the mail-quota size for a user.
+field_quota = mailQuota
+
+# field that holds the forwarding address.
+field_fwdtarget = mailForwardingAddress
+
+# override the query string used to search for users
+# or forwards with a delivery address.
+# query_string = (mail=%s)
+
+[DELIVERY]
+#
+# Run Sieve scripts as messages are delivered.
+#
+SIEVE = yes
+
+#
+# Use 'user+mailbox@domain' format to deliver to a mailbox.
+#
+SUBADDRESS = yes
+
+#
+# Turn on/off the Sieve Vacation extension.
+#
+SIEVE_VACATION = yes
+
+#
+# Turn on/off the Sieve Notify extension
+#
+SIEVE_NOTIFY = yes
+
+#
+# Turn on/off additional Sieve debugging.
+#
+SIEVE_DEBUG = no
+
+
+# Use the auto_notify table to send email notifications.
+#
+AUTO_NOTIFY = no
+
+#
+# Use the auto_reply table to send away messages.
+#
+AUTO_REPLY = no
+
+#
+# Defaults to "NEW MAIL NOTIFICATION"
+#
+#AUTO_NOTIFY_SUBJECT =
+
+#
+# Defaults to POSTMASTER from the DBMAIL section.
+#
+#AUTO_NOTIFY_SENDER =
+
+
+# If you set this to 'yes' dbmail will check for duplicate
+# messages in the relevant mailbox during delivery using
+# the Message-ID header
+#
+suppress_duplicates = yes
+
+
+# end of configuration file
diff --git a/testing/dbmail/dbmail.pre-install b/testing/dbmail/dbmail.pre-install
new file mode 100644
index 000000000..1abaeb9c0
--- /dev/null
+++ b/testing/dbmail/dbmail.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -s /bin/false -D -H -h /var/lib/dbmail dbmail 2>/dev/null
+exit 0
+
diff --git a/testing/dbmail/post-rc3.patch b/testing/dbmail/post-rc3.patch
new file mode 100644
index 000000000..9d7e34be3
--- /dev/null
+++ b/testing/dbmail/post-rc3.patch
@@ -0,0 +1,635 @@
+From b73172be67b4665b04c791f914cf284e01dea33c Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Mon, 15 Aug 2011 16:11:32 +0200
+Subject: [PATCH 1/8] fix broken SEARCH TEXT (#912)'
+
+---
+ src/dbmail-mailbox.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/dbmail-mailbox.c b/src/dbmail-mailbox.c
+index 3491105..09be275 100644
+--- a/src/dbmail-mailbox.c
++++ b/src/dbmail-mailbox.c
+@@ -1183,7 +1183,7 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key_t *s)
+
+ case IST_DATA_TEXT:
+
+- g_string_printf(q,"SELECT DISTINCT m.message_idnr"
++ g_string_printf(q,"SELECT DISTINCT m.message_idnr "
+ "FROM %smimeparts k "
+ "LEFT JOIN %spartlists l ON k.id=l.part_id "
+ "LEFT JOIN %sphysmessage p ON l.physmessage_id=p.id "
+--
+1.7.7.1
+
+From cd5cc297ab1c05103c45f6ee903298eca5357a19 Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Sat, 20 Aug 2011 14:00:35 +0200
+Subject: [PATCH 2/8] fix dbmail.h generation (#916)
+
+---
+ acinclude.m4 | 2 +-
+ configure | 2 +-
+ src/dbmail.h.in | 4 +---
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 2d2960d..fbf702a 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -300,7 +300,7 @@ AC_DEFUN([DM_CHECK_ZDB], [dnl
+ ])
+
+ AC_DEFUN([DM_SET_SQLITECREATE], [dnl
+- SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\" \\\\/' sql/sqlite/create_tables.sqlite`
++ SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\"/' -e '$!s/$/ \\\\/' sql/sqlite/create_tables.sqlite`
+ ])
+
+ AC_DEFUN([DM_CHECK_MATH], [dnl
+diff --git a/configure b/configure
+index 6be85f6..e9d6e84 100755
+--- a/configure
++++ b/configure
+@@ -6697,7 +6697,7 @@ if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
+ fi
+
+
+- SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\" \\\\/' sql/sqlite/create_tables.sqlite`
++ SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\"/' -e '$!s/$/ \\\\/' sql/sqlite/create_tables.sqlite`
+
+
+
+diff --git a/src/dbmail.h.in b/src/dbmail.h.in
+index 956246a..15acc31 100644
+--- a/src/dbmail.h.in
++++ b/src/dbmail.h.in
+@@ -183,9 +183,7 @@
+ ""
+
+ /* include sql/sqlite/create_tables.sqlite for autocreation */
+-#define DM_SQLITECREATE \
+-@SQLITECREATE@
+-""
++#define DM_SQLITECREATE @SQLITECREATE@
+
+ /** default directory and extension for pidfiles */
+ #define DEFAULT_PID_DIR "@DM_STATEDIR@"
+--
+1.7.7.1
+
+From 0e640aa861ceebebff59877440d084fa2dcd9efd Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Thu, 22 Sep 2011 16:39:53 +0200
+Subject: [PATCH 3/8] fix IDLE regression (#927)
+
+---
+ src/imapcommands.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/imapcommands.c b/src/imapcommands.c
+index 7bfe3c1..8159214 100644
+--- a/src/imapcommands.c
++++ b/src/imapcommands.c
+@@ -1113,6 +1113,7 @@ int _ic_idle(ImapSession *self)
+ int idle_timeout = IDLE_TIMEOUT;
+ field_t val;
+
++ ci_cork(self->ci);
+ GETCONFIGVALUE("idle_timeout", "IMAP", val);
+ if ( strlen(val) && (idle_timeout = atoi(val)) <= 0 ) {
+ TRACE(TRACE_ERR, "[%p] illegal value for idle_timeout [%s]", self, val);
+@@ -1125,6 +1126,7 @@ int _ic_idle(ImapSession *self)
+ dbmail_imap_session_buff_printf(self, "+ idling\r\n");
+ dbmail_imap_session_mailbox_status(self,TRUE);
+ dbmail_imap_session_buff_flush(self);
++ ci_uncork(self->ci);
+
+ return 0;
+ }
+--
+1.7.7.1
+
+From a82434e61e10f7e3e6b5feefb12c341ad96229ea Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Fri, 21 Oct 2011 15:57:31 +0200
+Subject: [PATCH 4/8] handle hangups better during read (#932)
+
+---
+ src/imap4.c | 9 ++++++---
+ 1 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/imap4.c b/src/imap4.c
+index 5fbf849..1d6869a 100644
+--- a/src/imap4.c
++++ b/src/imap4.c
+@@ -143,20 +143,23 @@ void imap_cb_read(void *arg)
+ {
+ ImapSession *session = (ImapSession *) arg;
+
+- TRACE(TRACE_DEBUG,"reading...");
+-
+ ci_read_cb(session->ci);
+
+ size_t have = session->ci->read_buffer->len;
++ size_t need = session->ci->rbuff_size;
++
++ int enough = (need>0?(have == 0):(have > 0));
++
+ int state = session->ci->client_state;
+
++ TRACE(TRACE_DEBUG,"reading %d: %ld/%ld", enough, have, need);
+ if (state & CLIENT_ERR) {
+ ci_cork(session->ci);
+ dbmail_imap_session_set_state(session,CLIENTSTATE_ERROR);
+ return;
+ }
+ if (state & CLIENT_EOF) {
+- if (have)
++ if (enough)
+ imap_handle_input(session);
+ else
+ imap_session_bailout(session);
+--
+1.7.7.1
+
+From f9f332c7b917c6b0683b0d43a0f614d675181855 Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Sat, 22 Oct 2011 13:53:12 +0200
+Subject: [PATCH 5/8] gracefully degrade after decoding error (#930)
+
+---
+ src/dbmail-message.c | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/dbmail-message.c b/src/dbmail-message.c
+index e62cfb4..cf8fc23 100644
+--- a/src/dbmail-message.c
++++ b/src/dbmail-message.c
+@@ -1457,12 +1457,11 @@ static int _header_value_get_id(const char *value, const char *sortfield, const
+ CATCH(SQLException)
+ LOG_SQLERROR;
+ db_rollback_transaction(c);
++ *id = 0;
+ FINALLY
+ db_con_close(c);
+ END_TRY;
+
+- assert(*id);
+-
+ g_free(hash);
+
+ return TRUE;
+@@ -1596,7 +1595,10 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
+ g_free(value);
+
+ /* Insert relation between physmessage, header name and header value */
+- _header_insert(self->physid, headername_id, headervalue_id);
++ if (headervalue_id)
++ _header_insert(self->physid, headername_id, headervalue_id);
++ else
++ TRACE(TRACE_INFO, "error inserting headervalue. skipping.");
+
+ headervalue_id=0;
+
+--
+1.7.7.1
+
+From 11bcc6294807be46ded604b23cad2648fcbf7c5b Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Sat, 22 Oct 2011 18:08:59 +0200
+Subject: [PATCH 6/8] reset timeout after idle is done (#932)
+
+---
+ src/imap4.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/src/imap4.c b/src/imap4.c
+index 1d6869a..69a7a7e 100644
+--- a/src/imap4.c
++++ b/src/imap4.c
+@@ -468,6 +468,7 @@ void dbmail_imap_session_reset(ImapSession *session)
+ session->parser_state = FALSE;
+ dbmail_imap_session_args_free(session, FALSE);
+
++ session->ci->timeout->tv_sec = server_conf->timeout;
+ ci_uncork(session->ci);
+
+ return;
+--
+1.7.7.1
+
+From 8dc7ab5ec45a4321af191fecd7da1f50d76d3ce1 Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Mon, 24 Oct 2011 16:23:59 +0200
+Subject: [PATCH 7/8] call database schema version check on all connections
+
+---
+ src/dm_db.c | 17 ++++++++++++-----
+ src/main.c | 5 -----
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/src/dm_db.c b/src/dm_db.c
+index 22cfe95..ec516e8 100644
+--- a/src/dm_db.c
++++ b/src/dm_db.c
+@@ -216,7 +216,7 @@ int db_connect(void)
+ db_connected = 3;
+ db_con_close(c);
+
+- return 0;
++ return db_check_version();
+ }
+
+ /* But sometimes this gets called after help text or an
+@@ -803,19 +803,26 @@ static void check_table_exists(C c, const char *table, const char *errormessage)
+ int db_check_version(void)
+ {
+ C c = db_con_get();
++ volatile int ok = 0;
+ TRY
+ check_table_exists(c, "physmessage", "pre-2.0 database incompatible. You need to run the conversion script");
+ check_table_exists(c, "headervalue", "2.0 database incompatible. You need to add the header tables.");
+- check_table_exists(c, "envelope", "2.1 database incompatible. You need to add the envelopes table and run dbmail-util -by");
+- check_table_exists(c, "mimeparts", "2.3 database incompatible.");
+- check_table_exists(c, "header", "2.3.5 database incompatible - single instance header storage missing.");
++ check_table_exists(c, "envelope", "2.1+ database incompatible. You need to add the envelopes table and run dbmail-util -by");
++ check_table_exists(c, "mimeparts", "3.x database incompatible.");
++ check_table_exists(c, "header", "3.x database incompatible - single instance header storage missing.");
++ ok = 1;
+ CATCH(SQLException)
+ LOG_SQLERROR;
+ FINALLY
+ db_con_close(c);
+ END_TRY;
+
+- return DM_SUCCESS;
++ if (ok)
++ TRACE(TRACE_DEBUG,"Tables OK");
++ else
++ TRACE(TRACE_WARNING,"Schema version incompatible. Bailing out");
++
++ return ok?DM_SUCCESS:DM_EQUERY;
+ }
+
+ /* test existence of usermap table */
+diff --git a/src/main.c b/src/main.c
+index f9c8328..4065997 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -240,11 +240,6 @@ int main(int argc, char *argv[])
+ goto freeall;
+ }
+
+- if (db_check_version() != 0) {
+- exitcode = EX_TEMPFAIL;
+- goto freeall;
+- }
+-
+ /* read the whole message */
+ memset(buf, 0, sizeof(buf));
+ while ( (n = read(fileno(stdin), (void *)buf, READ_SIZE-1)) > 0) {
+--
+1.7.7.1
+
+From 105cfefa0a1cc7366b66c6759e05e46ae5a6e53c Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Sat, 29 Oct 2011 15:57:09 +0200
+Subject: [PATCH 8/8] gmime-2.6 compatibility (#935)
+
+---
+ src/dbmail-message.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/dbmail-message.c b/src/dbmail-message.c
+index cf8fc23..8a1a66c 100644
+--- a/src/dbmail-message.c
++++ b/src/dbmail-message.c
+@@ -561,7 +561,7 @@ gboolean store_mime_object(GMimeObject *parent, GMimeObject *object, DbmailMessa
+ // part of the rfc822 headers
+ skiphead = TRUE;
+
+- g_mime_header_list_set_raw (GMIME_MESSAGE(object)->mime_part->headers, NULL);
++ g_mime_header_list_set_stream (GMIME_MESSAGE(object)->mime_part->headers, NULL);
+ mime_part = g_mime_message_get_mime_part((GMimeMessage *)object);
+ } else
+ mime_part = object;
+@@ -1744,8 +1744,7 @@ DbmailMessage * dbmail_message_construct(DbmailMessage *self,
+ TRACE(TRACE_DEBUG, "from: [%s] to: [%s] subject: [%s] body: [%s]", from, to, subject, body);
+ g_mime_message_set_sender(message, from);
+ g_mime_message_set_subject(message, subject);
+- g_mime_object_set_header(GMIME_OBJECT(message), "To", to);
+- g_mime_message_add_recipient(message, GMIME_RECIPIENT_TYPE_TO, "", to);
++ g_mime_message_add_recipient(message, GMIME_RECIPIENT_TYPE_TO, NULL, to);
+
+ // construct mime-part
+ mime_part = g_mime_part_new();
+--
+1.7.7.1
+
+From e95bcfa3f470de0f385a88266bf07065e65695a2 Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Wed, 02 Nov 2011 04:30:45 +0000
+Subject: re-indent php code
+
+---
+diff --git a/contrib/dbmailclient.php b/contrib/dbmailclient.php
+index ffe5cd0..0693c0a 100644
+--- a/contrib/dbmailclient.php
++++ b/contrib/dbmailclient.php
+@@ -190,137 +190,137 @@ class DBMailMessage extends DBMailMailbox
+
+ class Curl
+ {
+- public $cookie_file;
+- public $headers = array();
+- public $options = array();
+- public $referer = '';
+- public $user_agent = '';
++ public $cookie_file;
++ public $headers = array();
++ public $options = array();
++ public $referer = '';
++ public $user_agent = '';
+
+- protected $error = '';
+- protected $handle;
++ protected $error = '';
++ protected $handle;
+
+
+- public function __construct()
+- {
++ public function __construct()
++ {
+ $this->cookie_file = realpath('.').'/curl_cookie.txt';
+- $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ?
+- $_SERVER['HTTP_USER_AGENT'] :
+- 'Curl/PHP ' . PHP_VERSION . ' (http://github.com/shuber/curl/)';
+- }
+-
+- public function delete($url, $vars = array())
+- {
+- return $this->request('DELETE', $url, $vars);
+- }
+-
+- public function error()
+- {
+- return $this->error;
+- }
+-
+- public function get($url, $vars = array())
+- {
+- if (!empty($vars)) {
+- $url .= (stripos($url, '?') !== false) ? '&' : '?';
+- $url .= http_build_query($vars, '', '&');
+- }
+- return $this->request('GET', $url);
+- }
+-
+- public function post($url, $vars = array())
+- {
+- return $this->request('POST', $url, $vars);
+- }
+-
+- public function put($url, $vars = array())
+- {
+- return $this->request('PUT', $url, $vars);
+- }
+-
+- protected function request($method, $url, $vars = array())
+- {
+- $this->handle = curl_init();
+-
+- # Set some default CURL options
+- curl_setopt($this->handle, CURLOPT_COOKIEFILE, $this->cookie_file);
+- curl_setopt($this->handle, CURLOPT_COOKIEJAR, $this->cookie_file);
+- curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, true);
+- curl_setopt($this->handle, CURLOPT_HEADER, true);
+- curl_setopt($this->handle, CURLOPT_POSTFIELDS, (is_array($vars) ? http_build_query($vars, '', '&') : $vars));
+- curl_setopt($this->handle, CURLOPT_REFERER, $this->referer);
+- curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, true);
+- curl_setopt($this->handle, CURLOPT_URL, $url);
+- curl_setopt($this->handle, CURLOPT_USERAGENT, $this->user_agent);
+-
+- # Format custom headers for this request and set CURL option
+- $headers = array();
+- foreach ($this->headers as $key => $value) {
+- $headers[] = $key.': '.$value;
+- }
+- curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
+-
+- # Determine the request method and set the correct CURL option
+- switch ($method) {
+- case 'GET':
+- curl_setopt($this->handle, CURLOPT_HTTPGET, true);
+- break;
+- case 'POST':
+- curl_setopt($this->handle, CURLOPT_POST, true);
+- break;
+- default:
+- curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $method);
+- }
+-
+- # Set any custom CURL options
+- foreach ($this->options as $option => $value) {
+- curl_setopt($this->handle, constant('CURLOPT_'.str_replace('CURLOPT_', '', strtoupper($option))), $value);
+- }
+-
+- $response = curl_exec($this->handle);
+- if ($response) {
+- $response = new CurlResponse($response);
+- } else {
+- $this->error = curl_errno($this->handle).' - '.curl_error($this->handle);
+- }
+- curl_close($this->handle);
+- return $response;
+- }
++ $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ?
++ $_SERVER['HTTP_USER_AGENT'] :
++ 'Curl/PHP ' . PHP_VERSION . ' (http://github.com/shuber/curl/)';
++ }
++
++ public function delete($url, $vars = array())
++ {
++ return $this->request('DELETE', $url, $vars);
++ }
++
++ public function error()
++ {
++ return $this->error;
++ }
++
++ public function get($url, $vars = array())
++ {
++ if (!empty($vars)) {
++ $url .= (stripos($url, '?') !== false) ? '&' : '?';
++ $url .= http_build_query($vars, '', '&');
++ }
++ return $this->request('GET', $url);
++ }
++
++ public function post($url, $vars = array())
++ {
++ return $this->request('POST', $url, $vars);
++ }
++
++ public function put($url, $vars = array())
++ {
++ return $this->request('PUT', $url, $vars);
++ }
++
++ protected function request($method, $url, $vars = array())
++ {
++ $this->handle = curl_init();
++
++ # Set some default CURL options
++ curl_setopt($this->handle, CURLOPT_COOKIEFILE, $this->cookie_file);
++ curl_setopt($this->handle, CURLOPT_COOKIEJAR, $this->cookie_file);
++ curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, true);
++ curl_setopt($this->handle, CURLOPT_HEADER, true);
++ curl_setopt($this->handle, CURLOPT_POSTFIELDS, (is_array($vars) ? http_build_query($vars, '', '&') : $vars));
++ curl_setopt($this->handle, CURLOPT_REFERER, $this->referer);
++ curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, true);
++ curl_setopt($this->handle, CURLOPT_URL, $url);
++ curl_setopt($this->handle, CURLOPT_USERAGENT, $this->user_agent);
++
++ # Format custom headers for this request and set CURL option
++ $headers = array();
++ foreach ($this->headers as $key => $value) {
++ $headers[] = $key.': '.$value;
++ }
++ curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
++
++ # Determine the request method and set the correct CURL option
++ switch ($method) {
++ case 'GET':
++ curl_setopt($this->handle, CURLOPT_HTTPGET, true);
++ break;
++ case 'POST':
++ curl_setopt($this->handle, CURLOPT_POST, true);
++ break;
++ default:
++ curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $method);
++ }
++
++ # Set any custom CURL options
++ foreach ($this->options as $option => $value) {
++ curl_setopt($this->handle, constant('CURLOPT_'.str_replace('CURLOPT_', '', strtoupper($option))), $value);
++ }
++
++ $response = curl_exec($this->handle);
++ if ($response) {
++ $response = new CurlResponse($response);
++ } else {
++ $this->error = curl_errno($this->handle).' - '.curl_error($this->handle);
++ }
++ curl_close($this->handle);
++ return $response;
++ }
+
+ }
+
+ class CurlResponse
+ {
+- public $body = '';
+- public $headers = array();
+-
+- public function __construct($response)
+- {
+- # Extract headers from response
+- $pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
+- preg_match_all($pattern, $response, $matches);
+- $headers = split("\r\n", str_replace("\r\n\r\n", '', array_pop($matches[0])));
+-
+- # Extract the version and status from the first header
+- $version_and_status = array_shift($headers);
+- preg_match('#HTTP/(\d\.\d)\s(\d\d\d)\s(.*)#', $version_and_status, $matches);
+- $this->headers['Http-Version'] = $matches[1];
+- $this->headers['Status-Code'] = $matches[2];
+- $this->headers['Status'] = $matches[2].' '.$matches[3];
+-
+- # Convert headers into an associative array
+- foreach ($headers as $header) {
+- preg_match('#(.*?)\:\s(.*)#', $header, $matches);
+- $this->headers[$matches[1]] = $matches[2];
+- }
+-
+- # Remove the headers from the response body
+- $this->body = preg_replace($pattern, '', $response);
+- }
+-
+- public function __toString()
+- {
+- return $this->body;
+- }
++ public $body = '';
++ public $headers = array();
++
++ public function __construct($response)
++ {
++ # Extract headers from response
++ $pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
++ preg_match_all($pattern, $response, $matches);
++ $headers = split("\r\n", str_replace("\r\n\r\n", '', array_pop($matches[0])));
++
++ # Extract the version and status from the first header
++ $version_and_status = array_shift($headers);
++ preg_match('#HTTP/(\d\.\d)\s(\d\d\d)\s(.*)#', $version_and_status, $matches);
++ $this->headers['Http-Version'] = $matches[1];
++ $this->headers['Status-Code'] = $matches[2];
++ $this->headers['Status'] = $matches[2].' '.$matches[3];
++
++ # Convert headers into an associative array
++ foreach ($headers as $header) {
++ preg_match('#(.*?)\:\s(.*)#', $header, $matches);
++ $this->headers[$matches[1]] = $matches[2];
++ }
++
++ # Remove the headers from the response body
++ $this->body = preg_replace($pattern, '', $response);
++ }
++
++ public function __toString()
++ {
++ return $this->body;
++ }
+ }
+
+
+--
+cgit v0.8.3.4
+From 288b73a79fe20bae7737fb622aefff761bb34c3f Mon Sep 17 00:00:00 2001
+From: Paul J Stevens <paul@nfg.nl>
+Date: Wed, 02 Nov 2011 04:31:12 +0000
+Subject: parse From_ time as localtime
+
+---
+diff --git a/src/dbmail-mailbox.c b/src/dbmail-mailbox.c
+index 09be275..5e493ab 100644
+--- a/src/dbmail-mailbox.c
++++ b/src/dbmail-mailbox.c
+@@ -100,7 +100,7 @@ static gchar * _message_get_envelope_date(const DbmailMessage *self)
+
+ res = g_new0(char, TIMESTRING_SIZE+1);
+ memset(&gmt,'\0', sizeof(struct tm));
+- gmtime_r(&self->internal_date, &gmt);
++ localtime_r(&self->internal_date, &gmt);
+
+ strftime(res, TIMESTRING_SIZE, "%a %b %d %H:%M:%S %Y", &gmt);
+ return res;
+diff --git a/src/dbmail-message.c b/src/dbmail-message.c
+index 8a1a66c..1b4d826 100644
+--- a/src/dbmail-message.c
++++ b/src/dbmail-message.c
+@@ -837,7 +837,7 @@ gchar * dbmail_message_get_internal_date(const DbmailMessage *self, int thisyear
+
+ res = g_new0(char, TIMESTRING_SIZE+1);
+ memset(&gmt,'\0', sizeof(struct tm));
+- gmtime_r(&self->internal_date, &gmt);
++ localtime_r(&self->internal_date, &gmt);
+
+ /* override if the date is not sane */
+ if (thisyear && gmt.tm_year + 1900 > thisyear + 1) {
+--
+cgit v0.8.3.4
diff --git a/testing/dc3dd/APKBUILD b/testing/dc3dd/APKBUILD
new file mode 100644
index 000000000..7a31ce432
--- /dev/null
+++ b/testing/dc3dd/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=dc3dd
+pkgver=7.0.0
+pkgrel=0
+pkgdesc="Patched version of GNU dd for use in computer forensics"
+url="http://dc3dd.sourceforge.net/"
+arch="all"
+license="GPL2+ and GPL3+"
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/dc3dd/dc3dd-$pkgver.tar.gz"
+_builddir="$srcdir"/dc3dd-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ rm po/*.gmo
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="37e00481273b4c4ae2ebb430e5fb80af dc3dd-7.0.0.tar.gz"
diff --git a/testing/ddrescue/APKBUILD b/testing/ddrescue/APKBUILD
new file mode 100644
index 000000000..bc85d650e
--- /dev/null
+++ b/testing/ddrescue/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=ddrescue
+pkgver=1.12
+pkgrel=0
+pkgdesc="Data recovery tool for block devices with errors"
+url="http://www.gnu.org/s/ddrescue/ddrescue.html"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-doc"
+source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ # remove the 2 lines below (and this) if there is no init.d script
+ # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="b3d8a9a9098b87939fba05a45848bd8d ddrescue-1.12.tar.gz"
diff --git a/testing/deadbeef/APKBUILD b/testing/deadbeef/APKBUILD
new file mode 100644
index 000000000..e14167f16
--- /dev/null
+++ b/testing/deadbeef/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=deadbeef
+pkgver=0.5.0_rc1
+pkgrel=0
+pkgdesc="fairly capable playlist-oriented audio player"
+url="http://deadbeef.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="gtk+-dev libmad-dev alsa-lib-dev ffmpeg-dev libsamplerate-dev gettext-dev libiconv-dev"
+makedepends="$depends_dev intltool"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-0.5.0-rc1.tar.bz2
+ deadbeef-junklib.patch"
+
+_builddir="${srcdir}/${pkgname}-0.5.0-rc1"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ LIBS="-lintl" ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-sid \
+ --disable-ffap || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ec8100402338d075ff39e714e99e5543 deadbeef-0.5.0-rc1.tar.bz2
+8bf4eb1c52f251da7c7a78b2bb021359 deadbeef-junklib.patch"
diff --git a/testing/deadbeef/deadbeef-junklib.patch b/testing/deadbeef/deadbeef-junklib.patch
new file mode 100644
index 000000000..63a29ca93
--- /dev/null
+++ b/testing/deadbeef/deadbeef-junklib.patch
@@ -0,0 +1,10 @@
+--- deadbeef-0.5.0-rc1.orig/junklib.c
++++ deadbeef-0.5.0-rc1/junklib.c
+@@ -23,7 +23,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #if HAVE_ICONV
+- #define LIBICONV_PLUG
+ #include <iconv.h>
+ #elif HAVE_ICU
+ #warning icu
diff --git a/testing/dnsenum/APKBUILD b/testing/dnsenum/APKBUILD
new file mode 100644
index 000000000..1d9f1b04d
--- /dev/null
+++ b/testing/dnsenum/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=dnsenum
+pkgver=1.2.2
+pkgrel=0
+pkgdesc="A tool to enumerate DNS info about domains"
+url="http://code.google.com/p/dnsenum/"
+arch="noarch"
+license="GPL2+"
+depends="perl-net-ip perl-net-dns perl-net-netmask perl-xml-writer"
+depends_dev=""
+makedepends=""
+install=""
+subpackages=""
+source="http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm755 "$pkgname".pl "$pkgdir"/usr/bin/$pkgname || return 1
+}
+
+md5sums="d8806daddff880dcadf90af79720e7fe dnsenum-1.2.2.tar.gz"
diff --git a/testing/drbd/APKBUILD b/testing/drbd/APKBUILD
new file mode 100644
index 000000000..37fdff819
--- /dev/null
+++ b/testing/drbd/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=drbd
+pkgver=8.3.10
+pkgbase=8.3
+pkgrel=0
+pkgdesc="Network-based RAID 1"
+url="http://www.drbd.org"
+arch="all"
+license="GPL"
+depends="bash"
+depends_dev="bash bison flex"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-doc $pkgname-pacemaker"
+source="http://oss.linbit.com/$pkgname/$pkgbase/$pkgname-$pkgver.tar.gz
+ $pkgname.initd"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ sed -i "s/mv --force/mv -f/" drbd/Makefile || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --with-pacemaker \
+ --without-udev \
+ --without-heartbeat \
+ --without-rgmanager \
+ --without-xen \
+ --without-bashcompletion
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir/$pkgname.initd" \
+ "$pkgdir/etc/init.d/$pkgname" || return 1
+}
+
+pacemaker() {
+ arch="noarch"
+ depends="drbd"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/ocf "$subpkgdir"/usr/lib
+}
+
+md5sums="7d80edc2da10de5bfffe0ca9e9996fed drbd-8.3.10.tar.gz
+f2e0173a6056ce4b9c2e3847b59899ba drbd.initd"
diff --git a/testing/drbd/drbd.initd b/testing/drbd/drbd.initd
new file mode 100644
index 000000000..5da2dda32
--- /dev/null
+++ b/testing/drbd/drbd.initd
@@ -0,0 +1,158 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/files/drbd-8.0.rc,v 1.6 2010/08/02 04:42:36 xarthisius Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use logger
+ need net
+ before heartbeat
+ after sshd
+}
+
+DEFAULTFILE="/etc/conf.d/drbd"
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="/sbin/modprobe"
+RMMOD="/sbin/rmmod"
+UDEV_TIMEOUT=10
+ADD_MOD_PARAM=""
+
+if [ -f $DEFAULTFILE ]; then
+ . $DEFAULTFILE
+fi
+
+# Just in case drbdadm want to display any errors in the configuration
+# file, or we need to ask the user about registering this installation
+# at http://usage.drbd.org, we call drbdadm here without any IO
+# redirection.
+$DRBDADM sh-nop
+
+function assure_module_is_loaded() {
+ [ -e "$PROC_DRBD" ] && return
+ ebegin "Loading drbd module"
+ ret=0
+
+ $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || ret=20
+ eend $ret
+ return $ret
+}
+
+function adjust_with_progress() {
+ IFS_O=$IFS
+ NEWLINE='
+'
+ IFS=$NEWLINE
+ local D=0
+ local S=0
+ local N=0
+
+ einfon "Setting drbd parameters "
+ COMMANDS=`$DRBDADM -d adjust all` || {
+ eend 20 "Error executing drbdadm"
+ return 20
+ }
+ echo -n "[ "
+
+ for CMD in $COMMANDS; do
+ if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
+ elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
+ elif echo $CMD | grep -q net; then echo -n "n$N "; N=$(( N+1 ));
+ else echo echo -n ".. ";
+ fi
+ IFS=$IFS_O
+ $CMD || {
+ echo
+ eend 20 "cmd $CMD failed!"
+ return 20
+ }
+ IFS=$NEWLINE
+ done
+ echo "]"
+ eend 0
+
+ IFS=$IFS_O
+}
+
+start() {
+ einfo "Starting DRBD resources:"
+ eindent
+ assure_module_is_loaded || return $?
+ adjust_with_progress || return $?
+
+ # make sure udev has time to create the device files
+ ebegin "Waiting for udev device creation ..."
+ for RESOURCE in `$DRBDADM sh-resources`; do
+ for DEVICE in `$DRBDADM sh-dev $RESOURCE`; do
+ UDEV_TIMEOUT_LOCAL=$UDEV_TIMEOUT
+ while [ ! -e $DEVICE ] && [ $UDEV_TIMEOUT_LOCAL -gt 0 ] ; do
+ sleep 1
+ UDEV_TIMEOUT_LOCAL=$(( $UDEV_TIMEOUT_LOCAL-1 ))
+ done
+ done
+ done
+ eend 0
+
+ einfon "Waiting for connection "
+ $DRBDADM wait-con-int
+ ret=$?
+ echo
+
+ sleep 5
+
+ einfon "Become primary if configured "
+ $DRBDADM sh-b-pri all
+ echo
+
+ eend $ret
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping all DRBD resources"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -e ${PROC_DRBD} ]; then
+ ${DRBDADM} down all
+ sleep 3
+ if grep -q '^drbd' /proc/modules ; then
+ ${RMMOD} drbd
+ fi
+ fi
+ ret=$?
+ eend $ret
+ return $ret
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!"
+ eend 1
+ return 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+
+ if [ -e $PROC_DRBD ]; then
+ ret=0
+ ebegin "drbd driver loaded OK; device status:"
+ eend $ret
+ cat $PROC_DRBD
+ else
+ ebegin "drbd not loaded"
+ ret=3
+ eend $ret
+ fi
+ return $ret
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ ret=$?
+ eend $ret
+ return $ret
+}
diff --git a/testing/drizzle/APKBUILD b/testing/drizzle/APKBUILD
new file mode 100644
index 000000000..974f8e113
--- /dev/null
+++ b/testing/drizzle/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=drizzle
+pkgver=2011.03.13
+pkgrel=2
+pkgdesc="A MySQL-derived RDBMS for cloud usage and webapps"
+url="http://launchpad.net/drizzle"
+arch="all"
+license="GPL"
+depends=
+depends_dev="gperf protobuf-dev pcre-dev boost-dev intltool protobuf-dev
+readline-dev python gettext-dev util-linux-dev curl-dev sqlite-dev"
+makedepends="$depends_dev"
+install="drizzle.post-install"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-client $pkgname-libs $pkgname-plugins"
+source="
+ http://launchpad.net/drizzle/elliott/2011-03-14/+download/drizzle7-$pkgver.tar.gz
+ drizzle.initd
+ "
+
+_builddir="$srcdir"/drizzle7-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-nls \
+ --without-slave-plugin \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+client() {
+ mkdir -p "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr
+}
+
+libs() {
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lib*.so* "$subpkgdir"/usr/lib
+}
+
+plugins() {
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/drizzle7 "$subpkgdir"/usr/lib
+}
+
+md5sums="e152edfec45779c0bd34ece707aa022d drizzle7-2011.03.13.tar.gz
+03b05074b95a241c4d07dfd8661baf9f drizzle.initd"
diff --git a/testing/drizzle/drizzle.initd b/testing/drizzle/drizzle.initd
new file mode 100644
index 000000000..7428c360e
--- /dev/null
+++ b/testing/drizzle/drizzle.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=drizzle
+daemon=/usr/sbin/$name
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${name}.pid \
+ --user drizzle:drizzle \
+ --exec ${daemon}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/$name.pid \
+ --exec ${daemon}
+ eend $?
+}
+
diff --git a/testing/drizzle/drizzle.post-install b/testing/drizzle/drizzle.post-install
new file mode 100644
index 000000000..effba7b27
--- /dev/null
+++ b/testing/drizzle/drizzle.post-install
@@ -0,0 +1,2 @@
+addgroup -S drizzle
+adduser -SDHG drizzle drizzle
diff --git a/testing/dspam/APKBUILD b/testing/dspam/APKBUILD
new file mode 100644
index 000000000..abd183558
--- /dev/null
+++ b/testing/dspam/APKBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=dspam
+pkgver=3.9.1_rc1
+_ver=3.9.1-RC1
+pkgrel=0
+pkgdesc="A statistical-algorithmic hybrid anti-spam filter"
+url="http://dspam.nuclearelephant.com/"
+pkgusers="dspam"
+pkggroups="dspam"
+arch="all"
+license="GPL-2"
+depends=
+install="$pkgname.pre-install"
+makedepends="postgresql-dev sqlite-dev mysql-dev autoconf automake libtool"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-mysql
+ $pkgname-sqlite"
+
+install= #dspam.install
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_ver.tar.gz
+ dspam.logrotate
+ dspam.initd"
+
+
+prepare() {
+ cd "$srcdir"/$pkgname-$_ver
+ for i in "$srcdir"/*.patch; do
+ [ -f "$i" ] || continue
+ msg "Applying $i"
+ patch -p1 -i "$i" || return 1
+ done
+ aclocal -I m4 && libtoolize && autoconf && automake
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$_ver
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/dspam \
+ --with-dspam-home=/var/lib/dspam \
+ --enable-virtual-users \
+ --enable-preferences-extension \
+ --enable-daemon \
+ --with-storage-driver="hash_drv,sqlite3_drv,pgsql_drv,mysql_drv" \
+ --with-mysql-includes=/usr/include/mysql \
+ --with-mysql-libraries=/usr/lib/mysql \
+ || return 1
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$_ver
+ make install DESTDIR="$pkgdir"
+ install -Dm755 "$srcdir"/dspam.initd "$pkgdir"/etc/init.d/dspam
+ install -Dm644 "$srcdir"/dspam.logrotate "$pkgdir"/etc/logrotate.d/dspam
+
+}
+
+pgsql() {
+ pkgdesc="dspam postgresql driver"
+ install -d "$subpkgdir"/usr/lib/dspam
+ mv "$pkgdir"/usr/lib/dspam/*pgsql* "$subpkgdir"/usr/lib/dspam/
+}
+
+mysql() {
+ pkgdesc="dspam mysql driver"
+ install -d "$subpkgdir"/usr/lib/dspam
+ mv "$pkgdir"/usr/lib/dspam/*mysql* "$subpkgdir"/usr/lib/dspam/
+}
+
+sqlite() {
+ pkgdesc="dspam sqlite driver"
+ install -d "$subpkgdir"/usr/lib/dspam
+ mv "$pkgdir"/usr/lib/dspam/*sqlite* "$subpkgdir"/usr/lib/dspam/
+}
+
+md5sums="326677b30af2711a8fa4b52facb52f37 dspam-3.9.1-RC1.tar.gz
+a798e9a6e2d5c30724f84d004bb96339 dspam.logrotate
+7d1fb0820f4a23f593f22186ef77d02a dspam.initd"
diff --git a/testing/dspam/dspam.initd b/testing/dspam/dspam.initd
new file mode 100644
index 000000000..d91fefeb8
--- /dev/null
+++ b/testing/dspam/dspam.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/files/dspam.rc,v 1.1 2005/03/21 00:10:30 st_lim Exp $
+
+conf=/etc/dspam/dspam.conf
+
+depend() {
+ use logger
+ need net
+ before mta
+ after pg_autovacuum postgresql mysql
+}
+
+checkconfig() {
+ if [ ! -f "$conf" ]
+ then
+ eerror "You need a DSPAM configuration in $conf"
+ return 1
+ fi
+ if (! grep -q "^ServerPID" $conf); then
+ eerror "ServerPID missing in DSPAM configuration $conf"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting DSPAM"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/bin/dspam -- --daemon
+ eend ${?}
+}
+
+stop() {
+ checkconfig || return 1
+
+ local DSPAM_PID="$(grep "^ServerPID" $conf)"
+ DSPAM_PID="${DSPAM_PID/ServerPID/}"
+
+ ebegin "Stopping DSPAM"
+ start-stop-daemon --stop --quiet --pidfile ${DSPAM_PID}
+ eend ${?}
+}
+
diff --git a/testing/dspam/dspam.logrotate b/testing/dspam/dspam.logrotate
new file mode 100644
index 000000000..1fb3e04cc
--- /dev/null
+++ b/testing/dspam/dspam.logrotate
@@ -0,0 +1,6 @@
+/var/log/dspam/sql.errors /var/log/dspam/dspam.log /var/log/dspam/dspam.debug /var/log/dspam/dspam.messages {
+ weekly
+ compress
+ missingok
+ copytruncate
+}
diff --git a/testing/dspam/dspam.pre-install b/testing/dspam/dspam.pre-install
new file mode 100644
index 000000000..9a6cc6f1e
--- /dev/null
+++ b/testing/dspam/dspam.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+adduser -h /var/lib/dspam -s /bin/false -D dspam 2>/dev/null
+chown dspam:dspam /var/lib/dspam
+exit 0
+
diff --git a/testing/e_dbus/APKBUILD b/testing/e_dbus/APKBUILD
new file mode 100644
index 000000000..7548950a2
--- /dev/null
+++ b/testing/e_dbus/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=e_dbus
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enlightenment's (Ecore) integration to DBus"
+url="http://trac.enlightenment.org/e/wiki/E_Dbus"
+arch="all"
+license="BSD"
+depends=
+depends_dev="dbus-dev eina-dev ecore-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/e_dbus-$pkgver.tar.gz"
+
+_builddir="$srcdir"/e_dbus-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="4a3031a41e7e33f843cf104bf84cd4ee e_dbus-1.0.0.tar.gz"
diff --git a/testing/ecasound/APKBUILD b/testing/ecasound/APKBUILD
new file mode 100644
index 000000000..487a7867d
--- /dev/null
+++ b/testing/ecasound/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ecasound
+pkgver=2.8.1
+pkgrel=1
+pkgdesc="Textmode multitrack audio processing"
+url="http://eca.cx/ecasound/index.php"
+arch="all"
+license="GPL"
+depends=
+depends_dev="alsa-lib-dev readline-dev ncurses-dev mpg123-dev lame-dev
+ flac-dev libsndfile-dev libsamplerate-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://ecasound.seul.org/download/ecasound-$pkgver.tar.gz"
+
+_builddir="$srcdir"/ecasound-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="d9ded0074a8eeb59dd507c248220d010 ecasound-2.8.1.tar.gz"
diff --git a/testing/ecore/APKBUILD b/testing/ecore/APKBUILD
new file mode 100644
index 000000000..cc5d113bf
--- /dev/null
+++ b/testing/ecore/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ecore
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enlightenment's core event abstraction layer and OS abstraction layer"
+url="http://trac.enlightenment.org/e/wiki/Ecore"
+arch="all"
+license="BSD"
+depends=
+depends_dev="eina-dev eet-dev evas-dev glib-dev c-ares-dev curl-dev openssl-dev
+ libxcursor-dev libxinerama-dev libxrandr-dev libxrender-dev
+ libxcomposite-dev libxfixes-dev libxdamage-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/ecore-$pkgver.tar.gz"
+
+_builddir="$srcdir"/ecore-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-cares \
+ --disable-gnutls \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="56fa814282f48c346b398e16de81145f ecore-1.0.0.tar.gz"
diff --git a/testing/edje/APKBUILD b/testing/edje/APKBUILD
new file mode 100644
index 000000000..cb1793280
--- /dev/null
+++ b/testing/edje/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=edje
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enlightenment's graphical layout and animation library"
+url="http://trac.enlightenment.org/e/wiki/Edje"
+arch="all"
+license="BSD"
+depends=
+depends_dev="lua-dev eina-dev eet-dev embryo-dev ecore-dev evas-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/edje-$pkgver.tar.gz"
+
+_builddir="$srcdir"/edje-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="14c33c2b9d1bd36d8507d55597c77991 edje-1.0.0.tar.gz"
diff --git a/testing/eet/APKBUILD b/testing/eet/APKBUILD
new file mode 100644
index 000000000..bbfa2a516
--- /dev/null
+++ b/testing/eet/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=eet
+pkgver=1.4.0
+pkgrel=0
+pkgdesc="Enlightenment's file chunk reading/writing library"
+url="http://trac.enlightenment.org/e/wiki/Eet"
+arch="all"
+license="BSD"
+depends=
+depends_dev="eina-dev openssl-dev zlib-dev jpeg-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/eet-$pkgver.tar.gz"
+
+_builddir="$srcdir"/eet-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="5b0f3034d2dcc2ad13049a4ab6100ca6 eet-1.4.0.tar.gz"
diff --git a/testing/eeze/APKBUILD b/testing/eeze/APKBUILD
new file mode 100644
index 000000000..3eb881f7b
--- /dev/null
+++ b/testing/eeze/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=eeze
+pkgver=1.0.1
+pkgrel=2
+pkgdesc="Enlightenment's device library"
+url="http://trac.enlightenment.org/e/wiki/Eeze"
+arch="all"
+license="BSD"
+depends=
+depends_dev="eina-dev ecore-dev udev-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/eeze-$pkgver.tar.gz"
+
+_builddir="$srcdir"/eeze-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="e36b5e8ed444c8d13d27fd82d5f71659 eeze-1.0.1.tar.gz"
diff --git a/testing/efreet/APKBUILD b/testing/efreet/APKBUILD
new file mode 100644
index 000000000..2eb73f43f
--- /dev/null
+++ b/testing/efreet/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=efreet
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enlightenment's library for handling of freedesktop.org specs"
+url="http://trac.enlightenment.org/e/wiki/Efreet"
+arch="all"
+license="BSD"
+depends=
+depends_dev="eina-dev ecore-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/efreet-$pkgver.tar.gz"
+
+_builddir="$srcdir"/efreet-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="ce7dd05138335312c7eb9ac8e5e62467 efreet-1.0.0.tar.gz"
diff --git a/testing/eina/APKBUILD b/testing/eina/APKBUILD
new file mode 100644
index 000000000..cf6b73fbb
--- /dev/null
+++ b/testing/eina/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=eina
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="Enlightenment's data types library (List, hash, etc) in C"
+url="http://trac.enlightenment.org/e/wiki/Eina"
+arch="all"
+license="LGPLv2.1"
+depends=
+makedepends=
+install=
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/eina-$pkgver.tar.gz"
+
+_builddir="$srcdir"/eina-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-amalgamation \
+ --enable-pthread \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="207b64a6549642392c4a0760df78df59 eina-1.0.0.tar.gz"
diff --git a/testing/elementary-gtk-theme/APKBUILD b/testing/elementary-gtk-theme/APKBUILD
new file mode 100644
index 000000000..6d5a0430e
--- /dev/null
+++ b/testing/elementary-gtk-theme/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=elementary-gtk-theme
+pkgver=2.1
+pkgrel=1
+pkgdesc="gtk theme designed to go with elementary icons"
+url="http://launchpad.net/egtk"
+arch="noarch"
+license="GPL"
+depends="elementary-icon-theme gtk-murrine-engine"
+makedepends="wget"
+install=""
+subpackages=
+source="http://67.202.104.180/~nenolod/egtk.tar.gz"
+
+_builddir="${srcdir}/egtk"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "${pkgdir}"/usr/share/themes/elementary
+ cp -R gtk-2.0 "${pkgdir}"/usr/share/themes/elementary
+ ln -sf /usr/share/themes/elementary/gtk-2.0 \
+ "${pkgdir}"/usr/share/themes/elementary/gtk-3.0
+ cp -R metacity-1 "${pkgdir}"/usr/share/themes/elementary
+ cp -R xfwm4 "${pkgdir}"/usr/share/themes/elementary
+}
+
+md5sums="9886680fe5f0c7910a560aba95f0cad8 egtk.tar.gz"
diff --git a/testing/elementary-icon-theme/APKBUILD b/testing/elementary-icon-theme/APKBUILD
new file mode 100644
index 000000000..010c4e2dc
--- /dev/null
+++ b/testing/elementary-icon-theme/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=elementary-icon-theme
+pkgver=2.5
+pkgrel=0
+pkgdesc="supplementary icon set for gnome and xfce"
+url="http://www.elementaryos.org/"
+arch="noarch"
+license="GPL"
+depends=
+makedepends=""
+install=""
+subpackages=
+source="http://67.202.104.180/~nenolod/elementary_icons_by_danrabbit-d12yjq7.zip"
+
+_builddir="${srcdir}/icons"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ msg "Unpacking tarballs..."
+ tar zxf "$_builddir"/elementary.tar.gz
+ tar zxf "$_builddir"/elementary-mono-dark.tar.gz
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "${pkgdir}"/usr/share/icons
+ cp -R elementary "${pkgdir}"/usr/share/icons/elementary
+ cp -R elementary-mono-dark "${pkgdir}"/usr/share/icons/elementary-mono-dark
+}
+
+md5sums="67b0fda7c6033a43196e60d45ae84bbd elementary_icons_by_danrabbit-d12yjq7.zip"
diff --git a/testing/emacs/APKBUILD b/testing/emacs/APKBUILD
new file mode 100644
index 000000000..cdc3afc75
--- /dev/null
+++ b/testing/emacs/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=emacs
+pkgver=23.3a
+pkgrel=0
+pkgdesc="GNU Emacs text editor"
+url="http://www.gnu.org/software/emacs/"
+arch="x86"
+license="GPLv3+"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.gnu.org/gnu/emacs/emacs-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/emacs-23.3
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --with-x=no \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="f2cf8dc6f28f8ae59bc695b4ddda339c emacs-23.3a.tar.bz2"
diff --git a/testing/embryo/APKBUILD b/testing/embryo/APKBUILD
new file mode 100644
index 000000000..d83b84311
--- /dev/null
+++ b/testing/embryo/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=embryo
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Enlightenment's virtual machine engine and bytecode compiler"
+url="http://trac.enlightenment.org/e/wiki/Embryo"
+arch="all"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/embryo-$pkgver.tar.gz"
+
+_builddir="$srcdir"/embryo-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="2d6269c931656d5714197e508b144f18 embryo-1.0.0.tar.gz"
diff --git a/testing/empty/APKBUILD b/testing/empty/APKBUILD
new file mode 100644
index 000000000..8c5532236
--- /dev/null
+++ b/testing/empty/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=empty
+pkgver=0.6.18b
+pkgrel=0
+pkgdesc="run applications under pseudo-terminal (PTY) sessions"
+url="http://empty.sourceforge.net/"
+arch="all"
+license="BSD"
+depends=
+makedepends=
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/empty/empty-$pkgver.tgz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -D empty "$pkgdir"/usr/bin/empty
+ install -D empty.1 "$pkgdir"/usr/share/man/man1/empty.1
+}
+
+md5sums="2cf5e1b8ff58c41b63738bdc7c24fbc2 empty-0.6.18b.tgz"
diff --git a/testing/erlang/APKBUILD b/testing/erlang/APKBUILD
new file mode 100644
index 000000000..02a338d0a
--- /dev/null
+++ b/testing/erlang/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+
+# TODO: create subpackages
+# Check how fedora does it:
+# http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=blob;f=erlang.spec
+
+pkgname=erlang
+pkgver=14.2.02
+# note: versioning scheme is weird. the .2. -> B
+# needs to be updated manually
+_ver=${pkgver%%.*}B${pkgver##*.}
+pkgrel=1
+pkgdesc="General-purpose programming language and runtime environment"
+url="http://www.erlang.org/"
+license="ERPL"
+arch="all"
+depends=
+makedepends="perl-dev zlib-dev ncurses-dev openssl-dev"
+install=
+subpackages="$pkgname-dev"
+
+# patch found: http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=tree
+source="http://www.erlang.org/download/otp_src_R$_ver.tar.gz
+ otp-0004-Do-not-install-C-sources.patch"
+
+_builddir="$srcdir"/otp_src_R$_ver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # remove shipped zlib sources
+ rm -f erts/emulator/zlib/*.[ch]
+
+ # Fix 664 file mode
+ chmod 644 lib/kernel/examples/uds_dist/c_src/Makefile
+ chmod 644 lib/kernel/examples/uds_dist/src/Makefile
+ chmod 644 lib/ssl/examples/certs/Makefile
+ chmod 644 lib/ssl/examples/src/Makefile
+
+ # Remove old txt files
+ rm -f lib/ssl/examples/certs/etc/otpCA/index.txt.old
+ rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-threads \
+ --enable-shared-zlib \
+ --enable-ssl=dynamic-ssl-lib \
+ || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+md5sums="229fb8f193b09ac04a57a9d7794349b7 otp_src_R14B02.tar.gz
+e7e4b43883e5fc860bf18701850512b1 otp-0004-Do-not-install-C-sources.patch"
diff --git a/testing/erlang/otp-0004-Do-not-install-C-sources.patch b/testing/erlang/otp-0004-Do-not-install-C-sources.patch
new file mode 100644
index 000000000..d4f380c0f
--- /dev/null
+++ b/testing/erlang/otp-0004-Do-not-install-C-sources.patch
@@ -0,0 +1,168 @@
+From: Peter Lemenkov <lemenkov@gmail.com>
+Date: Fri, 18 Jun 2010 23:41:33 +0400
+Subject: [PATCH] Do not install C sources
+
+Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
+---
+ lib/asn1/c_src/Makefile | 2 --
+ lib/crypto/c_src/Makefile.in | 3 ---
+ lib/erl_interface/src/Makefile.in | 18 ------------------
+ lib/ic/c_src/Makefile.in | 2 --
+ lib/megaco/src/flex/Makefile.in | 2 +-
+ lib/odbc/c_src/Makefile.in | 3 ---
+ lib/os_mon/c_src/Makefile.in | 1 -
+ lib/ssl/c_src/Makefile.in | 9 ---------
+ lib/tools/c_src/Makefile.in | 2 --
+ 9 files changed, 1 insertions(+), 41 deletions(-)
+
+diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
+index 9e9cb18..1d73d3c 100644
+--- a/lib/asn1/c_src/Makefile
++++ b/lib/asn1/c_src/Makefile
+@@ -125,8 +125,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
+ $(INSTALL_PROGRAM) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
+- $(INSTALL_DIR) $(RELSYSDIR)/c_src
+- $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src
+
+ release_docs_spec:
+
+diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
+index 48f931d..4a7a183 100644
+--- a/lib/crypto/c_src/Makefile.in
++++ b/lib/crypto/c_src/Makefile.in
+@@ -136,10 +136,7 @@ docs:
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) $(RELSYSDIR)/priv/obj
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
+- $(INSTALL_DATA) $(NIF_MAKEFILE) $(RELSYSDIR)/priv/obj
+- $(INSTALL_PROGRAM) $(OBJS) $(RELSYSDIR)/priv/obj
+ $(INSTALL_PROGRAM) $(NIF_LIB) $(RELSYSDIR)/priv/lib
+
+ release_docs_spec:
+diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
+index 8ff142a..d785902 100644
+--- a/lib/erl_interface/src/Makefile.in
++++ b/lib/erl_interface/src/Makefile.in
+@@ -876,29 +876,11 @@ release: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/include
+ $(INSTALL_DIR) $(RELSYSDIR)/lib
+ $(INSTALL_DIR) $(RELSYSDIR)/bin
+- $(INSTALL_DIR) $(RELSYSDIR)/src/auxdir
+- $(INSTALL_DIR) $(RELSYSDIR)/src/connect
+- $(INSTALL_DIR) $(RELSYSDIR)/src/decode
+- $(INSTALL_DIR) $(RELSYSDIR)/src/encode
+- $(INSTALL_DIR) $(RELSYSDIR)/src/epmd
+- $(INSTALL_DIR) $(RELSYSDIR)/src/legacy
+- $(INSTALL_DIR) $(RELSYSDIR)/src/misc
+- $(INSTALL_DIR) $(RELSYSDIR)/src/prog
+- $(INSTALL_DIR) $(RELSYSDIR)/src/registry
+ $(INSTALL_DATA) $(HEADERS) $(RELSYSDIR)/include
+ $(INSTALL_DATA) $(OBJ_TARGETS) $(RELSYSDIR)/lib
+ ifneq ($(EXE_TARGETS),)
+ $(INSTALL_PROGRAM) $(EXE_TARGETS) $(RELSYSDIR)/bin
+ endif
+- $(INSTALL_DATA) $(EXTRA) $(RELSYSDIR)/src
+- $(INSTALL_DATA) connect/*.[ch] $(RELSYSDIR)/src/connect
+- $(INSTALL_DATA) decode/*.[ch] $(RELSYSDIR)/src/decode
+- $(INSTALL_DATA) encode/*.[ch] $(RELSYSDIR)/src/encode
+- $(INSTALL_DATA) epmd/*.[ch] $(RELSYSDIR)/src/epmd
+- $(INSTALL_DATA) misc/*.[ch] $(RELSYSDIR)/src/misc
+- $(INSTALL_DATA) registry/*.[ch] $(RELSYSDIR)/src/registry
+- $(INSTALL_DATA) legacy/*.[ch] $(RELSYSDIR)/src/legacy
+- $(INSTALL_DATA) prog/*.[ch] $(RELSYSDIR)/src/prog
+
+ release_docs:
+
+diff --git a/lib/ic/c_src/Makefile.in b/lib/ic/c_src/Makefile.in
+index 6eef782..091895b 100644
+--- a/lib/ic/c_src/Makefile.in
++++ b/lib/ic/c_src/Makefile.in
+@@ -144,10 +144,8 @@ $(OBJDIR)/%.o: %.c
+ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+- $(INSTALL_DIR) $(RELSYSDIR)/c_src
+ $(INSTALL_DIR) $(RELSYSDIR)/include
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
+- $(INSTALL_DATA) ic.c ic_tmo.c $(RELSYSDIR)/c_src
+ $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) $(RELSYSDIR)/include
+ $(INSTALL_DATA) $(LIBRARY) $(RELSYSDIR)/priv/lib
+
+diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
+index 5af651d..2ccf2a9 100644
+--- a/lib/megaco/src/flex/Makefile.in
++++ b/lib/megaco/src/flex/Makefile.in
+@@ -279,7 +279,7 @@ release_spec: opt
+ $(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(RELSYSDIR)/src/flex
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
+ ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
+- $(INSTALL_DATA) $(FLEX_FILES) $(C_TARGETS) $(RELSYSDIR)/src/flex
++ $(INSTALL_DATA) $(FLEX_FILES) $(RELSYSDIR)/src/flex
+ $(INSTALL_PROGRAM) $(SOLIBS) $(RELSYSDIR)/priv/lib
+ endif
+
+diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
+index ed3eeb1..c01d9bf 100644
+--- a/lib/odbc/c_src/Makefile.in
++++ b/lib/odbc/c_src/Makefile.in
+@@ -131,11 +131,8 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+
+ release_spec: opt
+ ifdef EXE_TARGET
+- $(INSTALL_DIR) $(RELSYSDIR)/c_src
+- $(INSTALL_DATA) $(C_FILES) $(H_FILES) $(RELSYSDIR)/c_src
+ $(INSTALL_DIR) $(RELSYSDIR)/priv
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/bin
+- $(INSTALL_DIR) $(RELSYSDIR)/priv/obj
+ $(INSTALL_PROGRAM) $(EXE_TARGET) $(RELSYSDIR)/priv/bin
+ endif
+
+diff --git a/lib/os_mon/c_src/Makefile.in b/lib/os_mon/c_src/Makefile.in
+index 1a371eb..62eac66 100644
+--- a/lib/os_mon/c_src/Makefile.in
++++ b/lib/os_mon/c_src/Makefile.in
+@@ -136,7 +136,6 @@ release_spec:
+ else
+ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/src
+- $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/src
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/bin
+ $(INSTALL_PROGRAM) $(TARGET_FILES) $(RELSYSDIR)/priv/bin
+ endif
+diff --git a/lib/ssl/c_src/Makefile.in b/lib/ssl/c_src/Makefile.in
+index 5e6c74e..bf4843b 100644
+--- a/lib/ssl/c_src/Makefile.in
++++ b/lib/ssl/c_src/Makefile.in
+@@ -199,15 +199,6 @@ include $(ERL_TOP)/make/otp_release_targets.mk
+ release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv/bin
+ $(INSTALL_PROGRAM) $(PORT_PROGRAM) $(RELSYSDIR)/priv/bin
+-ifneq ($(SSL_MAKEFILE),)
+- $(INSTALL_DIR) $(RELSYSDIR)/priv/obj
+- $(INSTALL_DATA) $(OBJS) $(RELSYSDIR)/priv/obj
+- sed -e "s;%BINDIR%;../bin;" \
+- -e "s;%SSL_LIBDIR%;$(SSL_LIBDIR);" \
+- -e "s;%OBJS;$(OBJS);" \
+- -e "s;%LIBS%;$(LIBS);" ./Makefile.dist \
+- > $(RELSYSDIR)/priv/obj/Makefile
+-endif
+
+ release_docs_spec:
+
+diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
+index 65a7f5f..144c1ba 100644
+--- a/lib/tools/c_src/Makefile.in
++++ b/lib/tools/c_src/Makefile.in
+@@ -190,8 +190,6 @@ include ../vsn.mk
+ RELSYSDIR = $(RELEASE_PATH)/lib/tools-$(TOOLS_VSN)
+
+ release_spec: all
+- $(INSTALL_DIR) $(RELSYSDIR)/c_src
+- $(INSTALL_DATA) $(EMEM_SRCS) $(EMEM_HEADERS) $(RELSYSDIR)/c_src
+ ifneq ($(PROGS),)
+ $(INSTALL_DIR) $(RELSYSDIR)/bin
+ $(INSTALL_PROGRAM) $(PROGS) $(RELSYSDIR)/bin
diff --git a/testing/etherdump/APKBUILD b/testing/etherdump/APKBUILD
new file mode 100644
index 000000000..246ea83ed
--- /dev/null
+++ b/testing/etherdump/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=etherdump
+pkgver=2.10
+pkgrel=0
+pkgdesc="An extremely small packet sniffer"
+url="http://freshmeat.net/projects/etherdump/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages=""
+source="http://sourceforge.net/projects/psydev/files/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm755 "$pkgname" "$pkgdir"/usr/bin/$pkgname || return 1
+}
+
+md5sums="b207b74a9e1fa945dcd0b55725384c8b etherdump-2.10.tar.gz"
diff --git a/testing/etracer/APKBUILD b/testing/etracer/APKBUILD
new file mode 100644
index 000000000..d1a208209
--- /dev/null
+++ b/testing/etracer/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=etracer
+pkgver=0.4
+pkgrel=1
+pkgdesc="racing game where you race tux down a mountain"
+url="http://extremetuxracer.com/"
+arch="all"
+license="GPL"
+depends=
+makedepends="sdl-dev mesa-dev sdl_mixer-dev tcl-dev freetype-dev libpng-dev"
+install=""
+source="http://downloads.sourceforge.net/extremetuxracer/extremetuxracer-${pkgver}.tar.gz
+ etracer-finite.patch
+ etracer-png.patch"
+
+_builddir="${srcdir}/extremetuxracer-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="6830eb4e1ca7c5a541f286ded3853f9f extremetuxracer-0.4.tar.gz
+c915c433dee3d3ef8d4884560b55210b etracer-finite.patch
+c476c21cc82dcf67337d982f2ec3d64b etracer-png.patch"
diff --git a/testing/etracer/etracer-finite.patch b/testing/etracer/etracer-finite.patch
new file mode 100644
index 000000000..ecfca4f26
--- /dev/null
+++ b/testing/etracer/etracer-finite.patch
@@ -0,0 +1,11 @@
+--- extremetuxracer-0.4.orig/src/etracer.h
++++ extremetuxracer-0.4/src/etracer.h
+@@ -142,7 +142,7 @@
+ #elif defined( HAVE__ISNAN )
+ # define FINITE(x) (!_isnan(x))
+ #else
+-# error "You don't have finite(), _finite(), isnan(), or _isnan() on your system!"
++# define FINITE(x) (isfinite(x))
+ #endif
+
+
diff --git a/testing/etracer/etracer-png.patch b/testing/etracer/etracer-png.patch
new file mode 100644
index 000000000..4a3469cd1
--- /dev/null
+++ b/testing/etracer/etracer-png.patch
@@ -0,0 +1,38 @@
+--- extremetuxracer-0.4.orig/src/ppgltk/images/png_reader.cpp
++++ extremetuxracer-0.4/src/ppgltk/images/png_reader.cpp
+@@ -77,7 +77,7 @@
+
+
+ png_get_IHDR(png_ptr, info_ptr, &width, &height,
+- &bit_depth, &color_type, &interlace_type,int_p_NULL, int_p_NULL);
++ &bit_depth, &color_type, &interlace_type, (int *) NULL, (int *) NULL);
+
+ if(bit_depth == 16)
+ png_set_strip_16(png_ptr);
+@@ -88,7 +88,7 @@
+ png_set_expand(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height,
+- &bit_depth, &color_type, &interlace_type,int_p_NULL, int_p_NULL);
++ &bit_depth, &color_type, &interlace_type, (int *) NULL, (int *) NULL);
+ }
+
+ if( color_type == PNG_COLOR_TYPE_GRAY ||
+@@ -96,7 +96,7 @@
+ png_set_gray_to_rgb(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+ png_get_IHDR(png_ptr, info_ptr, &width, &height,
+- &bit_depth, &color_type, &interlace_type,int_p_NULL, int_p_NULL);
++ &bit_depth, &color_type, &interlace_type, (int *) NULL, (int *) NULL);
+ }
+
+ this->width=width;
+@@ -114,7 +114,7 @@
+ }
+
+ png_read_end(png_ptr, info_ptr);
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ fclose(fp);
+ }
+
diff --git a/testing/evas/APKBUILD b/testing/evas/APKBUILD
new file mode 100644
index 000000000..3f0d575a3
--- /dev/null
+++ b/testing/evas/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=evas
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="hardware-accelerated retained canvas API"
+url="http://trac.enlightenment.org/e/wiki/Evas"
+arch="all"
+license="BSD"
+depends=
+depends_dev="freetype-dev fontconfig-dev fribidi-dev sdl-dev libx11-dev
+ libxcb-dev libxrender-dev eet-dev giflib-dev jpeg-dev libpng-dev
+ tiff-dev librsvg-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://download.enlightenment.org/releases/evas-$pkgver.tar.gz"
+
+_builddir="$srcdir"/evas-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="528debc5e5c75dbc8c5aa7ce5560cdd5 evas-1.0.1.tar.gz"
diff --git a/testing/evilwm/APKBUILD b/testing/evilwm/APKBUILD
new file mode 100644
index 000000000..b11c61d8c
--- /dev/null
+++ b/testing/evilwm/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=evilwm
+pkgver=1.1.0_pre8
+_myver="${pkgver//_/}"
+pkgrel=0
+pkgdesc="A minimalist window manager for the X Window System"
+url="http://www.6809.org.uk/evilwm/"
+arch="all"
+license="custom"
+depends=
+depends_dev=
+makedepends="libx11-dev libxext-dev libxrandr-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.6809.org.uk/evilwm/evilwm-$_myver.tar.gz"
+
+_builddir="$srcdir"/evilwm-$_myver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="efb842dba48970ad58c1dad38050b26e evilwm-1.1.0pre8.tar.gz"
diff --git a/testing/evolution-data-server/APKBUILD b/testing/evolution-data-server/APKBUILD
new file mode 100644
index 000000000..e7fffe324
--- /dev/null
+++ b/testing/evolution-data-server/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=evolution-data-server
+pkgver=2.32.2
+pkgrel=6
+pkgdesc="data server for evolution"
+url="http://projects.gnome.org/evolution"
+arch="all"
+license="GPL"
+depends=
+depends_dev="gtk+-dev glib-dev libsoup-dev libxml2-dev gconf-dev libgdata-dev db-dev libgweather-dev libgnome-keyring-dev libical-dev nspr-dev nss-dev sqlite-dev"
+makedepends="$depends_dev gperf flex bison"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ # to build against gtk+-2.24
+ # http://bugs.gentoo.org/show_bug.cgi?id=352400
+ sed -i -e "s:-DGTK_DISABLE_DEPRECATED::" configure
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" -name '*.la' -delete
+}
+
+md5sums="19d230667c0dfb1c06b8fe951fd552ff evolution-data-server-2.32.2.tar.bz2"
diff --git a/testing/evolution/APKBUILD b/testing/evolution/APKBUILD
new file mode 100644
index 000000000..3e5302eba
--- /dev/null
+++ b/testing/evolution/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=evolution
+pkgver=2.32.1
+pkgrel=4
+pkgdesc="evolution mail client"
+url="http://projects.gnome.org/evolution"
+arch="all"
+license="GPL"
+depends="gnome-icon-theme"
+depends_dev="gtk+-dev glib-dev libsoup-dev libxml2-dev gconf-dev libgdata-dev db-dev libgweather-dev libgnome-keyring-dev libical-dev nspr-dev nss-dev sqlite-dev evolution-data-server-dev
+ gnome-desktop-dev libunique-dev gtkhtml-dev gstreamer-dev gst-plugins-base-dev gtkimageview-dev openldap-dev"
+makedepends="$depends_dev gperf flex bison"
+install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ # to build against gtk+-2.24
+ # http://bugs.gentoo.org/show_bug.cgi?id=352400
+ sed -i -e "s:-DGTK_DISABLE_DEPRECATED::" configure
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-nm \
+ --disable-pst-import \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir"/usr/lib -name '*.la' -delete || return 1
+}
+
+md5sums="47c1d45366aaa69e79a320f351ef065d evolution-2.32.1.tar.bz2"
diff --git a/testing/evolution/evolution.post-install b/testing/evolution/evolution.post-install
new file mode 100644
index 000000000..9a51eff31
--- /dev/null
+++ b/testing/evolution/evolution.post-install
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+for i in \
+ apps-evolution-attachment-reminder.schemas \
+ apps-evolution-mail-notification.schemas \
+ apps-evolution-mail-prompts-checkdefault.schemas \
+ apps-evolution-template-placeholders.schemas \
+ apps_evolution_addressbook.schemas \
+ apps_evolution_calendar.schemas \
+ apps_evolution_email_custom_header.schemas \
+ apps_evolution_shell.schemas \
+ bogo-junk-plugin.schemas \
+ evolution-mail.schemas \
+; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/evolution/evolution.post-upgrade b/testing/evolution/evolution.post-upgrade
new file mode 100644
index 000000000..9a51eff31
--- /dev/null
+++ b/testing/evolution/evolution.post-upgrade
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+for i in \
+ apps-evolution-attachment-reminder.schemas \
+ apps-evolution-mail-notification.schemas \
+ apps-evolution-mail-prompts-checkdefault.schemas \
+ apps-evolution-template-placeholders.schemas \
+ apps_evolution_addressbook.schemas \
+ apps_evolution_calendar.schemas \
+ apps_evolution_email_custom_header.schemas \
+ apps_evolution_shell.schemas \
+ bogo-junk-plugin.schemas \
+ evolution-mail.schemas \
+; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/evolution/evolution.pre-deinstall b/testing/evolution/evolution.pre-deinstall
new file mode 100644
index 000000000..9216ac8c2
--- /dev/null
+++ b/testing/evolution/evolution.pre-deinstall
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+for i in \
+ apps-evolution-attachment-reminder.schemas \
+ apps-evolution-mail-notification.schemas \
+ apps-evolution-mail-prompts-checkdefault.schemas \
+ apps-evolution-template-placeholders.schemas \
+ apps_evolution_addressbook.schemas \
+ apps_evolution_calendar.schemas \
+ apps_evolution_email_custom_header.schemas \
+ apps_evolution_shell.schemas \
+ bogo-junk-plugin.schemas \
+ evolution-mail.schemas \
+; do
+ echo "Uninstalling GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/exim/APKBUILD b/testing/exim/APKBUILD
new file mode 100644
index 000000000..6a5879abc
--- /dev/null
+++ b/testing/exim/APKBUILD
@@ -0,0 +1,83 @@
+# Contributor: Jesse Young <jlyo@jlyo.org>
+# Maintainer: Jesse Young <jlyo@jlyo.org>
+pkgname=exim
+pkgver=4.77
+pkgrel=1
+pkgdesc="A Message Transfer Agent"
+url="http://www.exim.org/"
+arch="all"
+license="GPL"
+depends="openssl"
+depends_dev="db-dev pcre-dev openssl-dev"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-doc"
+source="ftp://mirrors.24-7-solutions.net/pub/exim/ftp/exim/exim4/exim-$pkgver.tar.bz2
+ exim.Makefile
+ exim.confd
+ exim.initd
+ exim.logrotate
+ aliases"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ cp "$srcdir/$pkgname.Makefile" Local/Makefile
+ sed -e 's/^LIBS = -lnsl/LIBS =/g' \
+ -e 's/^HAVE_ICONV=yes/#HAVE_ICONV=yes/' \
+ -i OS/Makefile-Linux
+}
+
+build() {
+ cd "$_builddir"
+ # do not build parallel
+ export MAKEFLAGS=-j1
+ make makefile
+ make || {
+ cd build-Linux-*
+ sh ../scripts/Configure-config.h "make"
+ } && make || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ install -D -m644 ../${pkgname}.logrotate ${pkgdir}/etc/logrotate.d/${pkgname}
+ install -D -m644 doc/exim.8 ${pkgdir}/usr/share/man/man8/exim.8
+ mkdir -p ${pkgdir}/var/spool/exim/db ${pkgdir}/etc/mail \
+ ${pkgdir}/var/log/exim ${pkgdir}/usr/lib \
+ ${pkgdir}/var/log/exim ${pkgdir}/usr/sbin
+ chmod 770 ${pkgdir}/var/spool/exim ${pkgdir}/var/spool/exim/db ${pkgdir}/var/log/exim
+ cd build-Linux-*
+ for i in exicyclog exim_checkaccess exim_dumpdb exim_lock\
+ exim_tidydb exipick exiqsumm exigrep exim_dbmbuild exim\
+ exim_fixdb eximstats exinext exiqgrep exiwhat; do
+ install -m 0755 "$i" "$pkgdir/usr/sbin"
+ done
+
+ cd "$srcdir/exim-$pkgver/src"
+ sed -e "s|/etc/aliases|/etc/mail/aliases|g" \
+ -e "s|SYSTEM_ALIASES_FILE|/etc/mail/aliases|g" configure.default \
+ >"$pkgdir/etc/mail/exim.conf"
+
+ cp "$srcdir/aliases" "$pkgdir/etc/mail"
+ cd "$pkgdir/usr/sbin"
+ for i in mailq rmail rsmtp runq sendmail; do
+ ln -s exim "$i"
+ done
+ # fhs compliancy
+ ln -s ../sbin/exim ../lib/sendmail
+
+ # remove the 2 lines below (and this) if there is no init.d script
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="5d746275f2cc85845567f9d5eb84a57a exim-4.77.tar.bz2
+7dfc9ed9307db655c8aec33b9618608d exim.Makefile
+f442b68d435598831bab8536ade071b8 exim.confd
+2f6d768039d74caf433345cace4bc540 exim.initd
+281ad020d1df8c6ed0f4ecb53c0fce63 exim.logrotate
+eaec7a2a5f49b768fa168415ef0105fb aliases"
diff --git a/testing/exim/aliases b/testing/exim/aliases
new file mode 100644
index 000000000..3f76693d0
--- /dev/null
+++ b/testing/exim/aliases
@@ -0,0 +1,35 @@
+#
+# /etc/mail/aliases
+#
+# NOTE: Make sure you run 'newaliases' after modifying this file
+#
+
+# Basic system aliases -- these MUST be present.
+MAILER-DAEMON: postmaster
+postmaster: root
+hostmaster: root
+webmaster: hostmaster
+ftpmaster: hostmaster
+admin: hostmaster
+administrator: hostmaster
+
+# General redirections for pseudo accounts.
+bin: root
+daemon: root
+games: root
+ingres: root
+nobody: root
+system: root
+toor: root
+uucp: root
+
+# Well-known aliases.
+manager: root
+dumper: root
+operator: root
+
+# trap decode to catch security attacks
+decode: root
+
+# Person who should get root's mail
+#root:
diff --git a/testing/exim/exim.Makefile b/testing/exim/exim.Makefile
new file mode 100644
index 000000000..a7ec877f9
--- /dev/null
+++ b/testing/exim/exim.Makefile
@@ -0,0 +1,1227 @@
+# $Cambridge: exim/src/src/EDITME,v 1.27 2010/06/12 15:21:25 jetmore Exp $
+
+##################################################
+# The Exim mail transport agent #
+##################################################
+
+# This is the template for Exim's main build-time configuration file. It
+# contains settings that are independent of any operating system. These are
+# things that are mostly sysadmin choices. The items below are divided into
+# those you must specify, those you probably want to specify, those you might
+# often want to specify, and those that you almost never need to mention.
+
+# Edit this file and save the result to a file called Local/Makefile within the
+# Exim distribution directory before running the "make" command.
+
+# Things that depend on the operating system have default settings in
+# OS/Makefile-Default, but these are overridden for some OS by files called
+# called OS/Makefile-<osname>. You can further override these by creating files
+# called Local/Makefile-<osname>, where "<osname>" stands for the name of your
+# operating system - look at the names in the OS directory to see which names
+# are recognized.
+
+# However, if you are building Exim for a single OS only, you don't need to
+# worry about setting up Local/Makefile-<osname>. Any build-time configuration
+# settings you require can in fact be placed in the one file called
+# Local/Makefile. It is only if you are building for several OS from the same
+# source files that you need to worry about splitting off your own OS-dependent
+# settings into separate files. (There's more explanation about how this all
+# works in the toplevel README file, under "Modifying the building process", as
+# well as in the Exim specification.)
+
+# One OS-specific thing that may need to be changed is the command for running
+# the C compiler; the overall default is gcc, but some OS Makefiles specify cc.
+# You can override anything that is set by putting CC=whatever in your
+# Local/Makefile.
+
+# NOTE: You should never need to edit any of the distributed Makefiles; all
+# overriding can be done in your Local/Makefile(s). This will make it easier
+# for you when the next release comes along.
+
+# The location of the X11 libraries is something else that is quite variable
+# even between different versions of the same operating system (and indeed
+# there are different versions of X11 as well, of course). The four settings
+# concerned here are X11, XINCLUDE, XLFLAGS (linking flags) and X11_LD_LIB
+# (dynamic run-time library). You need not worry about X11 unless you want to
+# compile the Exim monitor utility. Exim itself does not use X11.
+
+# Another area of variability between systems is the type and location of the
+# DBM library package. Exim has support for ndbm, gdbm, tdb, and Berkeley DB.
+# By default the code assumes ndbm; this often works with gdbm or DB, provided
+# they are correctly installed, via their compatibility interfaces. However,
+# Exim can also be configured to use the native calls for Berkeley DB (obsolete
+# versions 1.85, 2.x, 3.x, or the current 4.x version) and also for gdbm.
+
+# For some operating systems, a default DBM library (other than ndbm) is
+# selected by a setting in the OS-specific Makefile. Most modern OS now have
+# a DBM library installed as standard, and in many cases this will be selected
+# for you by the OS-specific configuration. If Exim compiles without any
+# problems, you probably do not have to worry about the DBM library. If you
+# do want or need to change it, you should first read the discussion in the
+# file doc/dbm.discuss.txt, which also contains instructions for testing Exim's
+# interface to the DBM library.
+
+# In Local/Makefiles blank lines and lines starting with # are ignored. It is
+# also permitted to use the # character to add a comment to a setting, for
+# example
+#
+# EXIM_GID=42 # the "mail" group
+#
+# However, with some versions of "make" this works only if there is no white
+# space between the end of the setting and the #, so perhaps it is best
+# avoided. A consequence of this facility is that it is not possible to have
+# the # character present in any setting, but I can't think of any cases where
+# this would be wanted.
+###############################################################################
+
+
+
+###############################################################################
+# THESE ARE THINGS YOU MUST SPECIFY #
+###############################################################################
+
+# Exim will not build unless you specify BIN_DIRECTORY, CONFIGURE_FILE, and
+# EXIM_USER. You also need EXIM_GROUP if EXIM_USER specifies a uid by number.
+
+# If you don't specify SPOOL_DIRECTORY, Exim won't fail to build. However, it
+# really is a very good idea to specify it here rather than at run time. This
+# is particularly true if you let the logs go to their default location in the
+# spool directory, because it means that the location of the logs is known
+# before Exim has read the run time configuration file.
+
+#------------------------------------------------------------------------------
+# BIN_DIRECTORY defines where the exim binary will be installed by "make
+# install". The path is also used internally by Exim when it needs to re-invoke
+# itself, either to send an error message, or to recover root privilege. Exim's
+# utility binaries and scripts are also installed in this directory. There is
+# no "standard" place for the binary directory. Some people like to keep all
+# the Exim files under one directory such as /usr/exim; others just let the
+# Exim binaries go into an existing directory such as /usr/sbin or
+# /usr/local/sbin. The installation script will try to create this directory,
+# and any superior directories, if they do not exist.
+
+BIN_DIRECTORY=/usr/sbin
+
+
+#------------------------------------------------------------------------------
+# CONFIGURE_FILE defines where Exim's run time configuration file is to be
+# found. It is the complete pathname for the file, not just a directory. The
+# location of all other run time files and directories can be changed in the
+# run time configuration file. There is a lot of variety in the choice of
+# location in different OS, and in the preferences of different sysadmins. Some
+# common locations are in /etc or /etc/mail or /usr/local/etc or
+# /usr/local/etc/mail. Another possibility is to keep all the Exim files under
+# a single directory such as /usr/exim. Whatever you choose, the installation
+# script will try to make the directory and any superior directories if they
+# don't exist. It will also install a default runtime configuration if this
+# file does not exist.
+
+CONFIGURE_FILE=/etc/mail/exim.conf
+
+# It is possible to specify a colon-separated list of files for CONFIGURE_FILE.
+# In this case, Exim will use the first of them that exists when it is run.
+# However, if a list is specified, the installation script no longer tries to
+# make superior directories or to install a default runtime configuration.
+
+
+#------------------------------------------------------------------------------
+# The Exim binary must normally be setuid root, so that it starts executing as
+# root, but (depending on the options with which it is called) it does not
+# always need to retain the root privilege. These settings define the user and
+# group that is used for Exim processes when they no longer need to be root. In
+# particular, this applies when receiving messages and when doing remote
+# deliveries. (Local deliveries run as various non-root users, typically as the
+# owner of a local mailbox.) Specifying these values as root is not supported.
+
+EXIM_USER=ref:exim
+
+# If you specify EXIM_USER as a name, this is looked up at build time, and the
+# uid number is built into the binary. However, you can specify that this
+# lookup is deferred until runtime. In this case, it is the name that is built
+# into the binary. You can do this by a setting of the form:
+
+# EXIM_USER=ref:exim
+
+# In other words, put "ref:" in front of the user name. If you set EXIM_USER
+# like this, any value specified for EXIM_GROUP is also passed "by reference".
+# Although this costs a bit of resource at runtime, it is convenient to use
+# this feature when building binaries that are to be run on multiple systems
+# where the name may refer to different uids. It also allows you to build Exim
+# on a system where there is no Exim user defined.
+
+# If the setting of EXIM_USER is numeric (e.g. EXIM_USER=42), there must
+# also be a setting of EXIM_GROUP. If, on the other hand, you use a name
+# for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless
+# you want to use a group other than the default group for the given user.
+
+# EXIM_GROUP=
+
+# Many sites define a user called "exim", with an appropriate default group,
+# and use
+#
+# EXIM_USER=exim
+#
+# while leaving EXIM_GROUP unspecified (commented out).
+
+
+#------------------------------------------------------------------------------
+# SPOOL_DIRECTORY defines the directory where all the data for messages in
+# transit is kept. It is strongly recommended that you define it here, though
+# it is possible to leave this till the run time configuration.
+
+# Exim creates the spool directory if it does not exist. The owner and group
+# will be those defined by EXIM_USER and EXIM_GROUP, and this also applies to
+# all the files and directories that are created in the spool directory.
+
+# Almost all installations choose this:
+
+SPOOL_DIRECTORY=/var/spool/exim
+
+
+
+###############################################################################
+# THESE ARE THINGS YOU PROBABLY WANT TO SPECIFY #
+###############################################################################
+
+# If you need extra header file search paths on all compiles, put the -I
+# options in INCLUDE. If you want the extra searches only for certain
+# parts of the build, see more specific xxx_INCLUDE variables below.
+
+# INCLUDE=-I/example/include
+
+# You need to specify some routers and transports if you want the Exim that you
+# are building to be capable of delivering mail. You almost certainly need at
+# least one type of lookup. You should consider whether you want to build
+# the Exim monitor or not.
+
+
+#------------------------------------------------------------------------------
+# These settings determine which individual router drivers are included in the
+# Exim binary. There are no defaults in the code; those routers that are wanted
+# must be defined here by setting the appropriate variables to the value "yes".
+# Including a router in the binary does not cause it to be used automatically.
+# It has also to be configured in the run time configuration file. By
+# commenting out those you know you don't want to use, you can make the binary
+# a bit smaller. If you are unsure, leave all of these included for now.
+
+ROUTER_ACCEPT=yes
+ROUTER_DNSLOOKUP=yes
+ROUTER_IPLITERAL=yes
+ROUTER_MANUALROUTE=yes
+ROUTER_QUERYPROGRAM=yes
+ROUTER_REDIRECT=yes
+
+# This one is very special-purpose, so is not included by default.
+
+# ROUTER_IPLOOKUP=yes
+
+
+#------------------------------------------------------------------------------
+# These settings determine which individual transport drivers are included in
+# the Exim binary. There are no defaults; those transports that are wanted must
+# be defined here by setting the appropriate variables to the value "yes".
+# Including a transport in the binary does not cause it to be used
+# automatically. It has also to be configured in the run time configuration
+# file. By commenting out those you know you don't want to use, you can make
+# the binary a bit smaller. If you are unsure, leave all of these included for
+# now.
+
+TRANSPORT_APPENDFILE=yes
+TRANSPORT_AUTOREPLY=yes
+TRANSPORT_PIPE=yes
+TRANSPORT_SMTP=yes
+
+# This one is special-purpose, and commonly not required, so it is not
+# included by default.
+
+TRANSPORT_LMTP=yes
+
+
+#------------------------------------------------------------------------------
+# The appendfile transport can write messages to local mailboxes in a number
+# of formats. The code for three specialist formats, maildir, mailstore, and
+# MBX, is included only when requested. If you do not know what this is about,
+# leave these settings commented out.
+
+SUPPORT_MAILDIR=yes
+# SUPPORT_MAILSTORE=yes
+# SUPPORT_MBX=yes
+
+
+#------------------------------------------------------------------------------
+# See below for dynamic lookup modules.
+# LOOKUP_MODULE_DIR=/usr/lib/exim/lookups/
+# If not using package management but using this anyway, then think about how
+# you perform upgrades and revert them. You should consider the benefit of
+# embedding the Exim version number into LOOKUP_MODULE_DIR, so that you can
+# maintain two concurrent sets of modules.
+
+# To build a module dynamically, you'll need to define CFLAGS_DYNAMIC for
+# your platform. Eg:
+# CFLAGS_DYNAMIC=-shared -rdynamic
+# CFLAGS_DYNAMIC=-shared -rdynamic -fPIC
+
+#------------------------------------------------------------------------------
+# These settings determine which file and database lookup methods are included
+# in the binary. See the manual chapter entitled "File and database lookups"
+# for discussion. DBM and lsearch (linear search) are included by default. If
+# you are unsure about the others, leave them commented out for now.
+# LOOKUP_DNSDB does *not* refer to general mail routing using the DNS. It is
+# for the specialist case of using the DNS as a general database facility (not
+# common).
+# If set to "2" instead of "yes" then the corresponding lookup will be
+# built as a module and must be installed into LOOKUP_MODULE_DIR. You need to
+# add -export-dynamic -rdynamic to EXTRALIBS. You may also need to add -ldl to
+# EXTRALIBS so that dlopen() is available to Exim. You need to define
+# LOOKUP_MODULE_DIR above so the exim binary actually loads dynamic lookup
+# modules.
+# Also, instead of adding all the libraries/includes to LOOKUP_INCLUDE and
+# LOOKUP_LIBS, add them to the respective LOOKUP_*_INCLUDE and LOOKUP_*_LIBS
+# (where * is the name as given here in this list). That ensures that only
+# the dynamic library and not the exim binary will be linked against the
+# library.
+# NOTE: LDAP cannot be built as a module!
+
+LOOKUP_DBM=yes
+LOOKUP_LSEARCH=yes
+LOOKUP_DNSDB=yes
+
+# LOOKUP_CDB=yes
+LOOKUP_DSEARCH=yes
+# LOOKUP_IBASE=yes
+# LOOKUP_LDAP=yes
+# LOOKUP_MYSQL=yes
+# LOOKUP_NIS=yes
+# LOOKUP_NISPLUS=yes
+# LOOKUP_ORACLE=yes
+# LOOKUP_PASSWD=yes
+# LOOKUP_PGSQL=yes
+# LOOKUP_SQLITE=yes
+# LOOKUP_WHOSON=yes
+
+# These two settings are obsolete; all three lookups are compiled when
+# LOOKUP_LSEARCH is enabled. However, we retain these for backward
+# compatibility. Setting one forces LOOKUP_LSEARCH if it is not set.
+
+# LOOKUP_WILDLSEARCH=yes
+# LOOKUP_NWILDLSEARCH=yes
+
+
+#------------------------------------------------------------------------------
+# If you have set LOOKUP_LDAP=yes, you should set LDAP_LIB_TYPE to indicate
+# which LDAP library you have. Unfortunately, though most of their functions
+# are the same, there are minor differences. Currently Exim knows about four
+# LDAP libraries: the one from the University of Michigan (also known as
+# OpenLDAP 1), OpenLDAP 2, the Netscape SDK library, and the library that comes
+# with Solaris 7 onwards. Uncomment whichever of these you are using.
+
+# LDAP_LIB_TYPE=OPENLDAP1
+# LDAP_LIB_TYPE=OPENLDAP2
+# LDAP_LIB_TYPE=NETSCAPE
+# LDAP_LIB_TYPE=SOLARIS
+
+# If you don't set any of these, Exim assumes the original University of
+# Michigan (OpenLDAP 1) library.
+
+
+#------------------------------------------------------------------------------
+# The PCRE library is required for exim. There is no longer an embedded
+# version of the PCRE library included with the source code, instead you
+# must use a system library or build your own copy of PCRE.
+# In either case you must specify the library link info here. If the
+# PCRE header files are not in the standard search path you must also
+# modify the INCLUDE path (above)
+# The default setting of PCRE_LIBS should work on the vast majority of
+# systems
+
+PCRE_LIBS=-lpcre
+
+
+#------------------------------------------------------------------------------
+# Additional libraries and include directories may be required for some
+# lookup styles (e.g. LDAP, MYSQL or PGSQL). LOOKUP_LIBS is included only on
+# the command for linking Exim itself, not on any auxiliary programs. You
+# don't need to set LOOKUP_INCLUDE if the relevant directories are already
+# specified in INCLUDE. The settings below are just examples; -lpq is for
+# PostgreSQL, -lgds is for Interbase, -lsqlite3 is for SQLite.
+
+# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
+# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3
+
+
+#------------------------------------------------------------------------------
+# Compiling the Exim monitor: If you want to compile the Exim monitor, a
+# program that requires an X11 display, then EXIM_MONITOR should be set to the
+# value "eximon.bin". Comment out this setting to disable compilation of the
+# monitor. The locations of various X11 directories for libraries and include
+# files are defaulted in the OS/Makefile-Default file, but can be overridden in
+# local OS-specific make files.
+
+
+
+
+#------------------------------------------------------------------------------
+# Compiling Exim with content scanning support: If you want to compile Exim
+# with support for message body content scanning, set WITH_CONTENT_SCAN to
+# the value "yes". This will give you malware and spam scanning in the DATA ACL,
+# and the MIME ACL. Please read the documentation to learn more about these
+# features.
+
+WITH_CONTENT_SCAN=yes
+
+# If you want to use the deprecated "demime" condition in the DATA ACL,
+# uncomment the line below. Doing so will also explicitly turn on the
+# WITH_CONTENT_SCAN option. If possible, use the MIME ACL instead of
+# the "demime" condition.
+
+WITH_OLD_DEMIME=yes
+
+# If you're using ClamAV and are backporting fixes to an old version, instead
+# of staying current (which is the more usual approach) then you may need to
+# use an older API which uses a STREAM command, now deprecated, instead of
+# zINSTREAM. If you need to set this, please let the Exim developers know, as
+# if nobody reports a need for it, we'll remove this option and clean up the
+# code. zINSTREAM was introduced with ClamAV 0.95.
+#
+# WITH_OLD_CLAMAV_STREAM=yes
+
+#------------------------------------------------------------------------------
+# By default Exim includes code to support DKIM (DomainKeys Identified
+# Mail, RFC4871) signing and verification. Verification of signatures is
+# turned on by default. See the spec for information on conditionally
+# disabling it. To disable the inclusion of the entire feature, set
+# DISABLE_DKIM to "yes"
+
+# DISABLE_DKIM=yes
+
+
+#------------------------------------------------------------------------------
+# Compiling Exim with experimental features. These are documented in
+# experimental-spec.txt. "Experimental" means that the way these features are
+# implemented may still change. Backward compatibility is not guaranteed.
+
+# Uncomment the following lines to add SPF support. You need to have libspf2
+# installed on your system (www.libspf2.org). Depending on where it is installed
+# you may have to edit the CFLAGS and LDFLAGS lines.
+
+# EXPERIMENTAL_SPF=yes
+# CFLAGS += -I/usr/local/include
+# LDFLAGS += -lspf2
+
+# Uncomment the following lines to add SRS (Sender rewriting scheme) support.
+# You need to have libsrs_alt installed on your system (srs.mirtol.com).
+# Depending on where it is installed you may have to edit the CFLAGS and
+# LDFLAGS lines.
+
+# EXPERIMENTAL_SRS=yes
+# CFLAGS += -I/usr/local/include
+# LDFLAGS += -lsrs_alt
+
+# Uncomment the following lines to add Brightmail AntiSpam support. You need
+# to have the Brightmail client SDK installed. Please check the experimental
+# documentation for implementation details. You need to edit the CFLAGS and
+# LDFLAGS lines.
+
+# EXPERIMENTAL_BRIGHTMAIL=yes
+# CFLAGS += -I/opt/brightmail/bsdk-6.0/include
+# LDFLAGS += -lxml2_single -lbmiclient_single -L/opt/brightmail/bsdk-6.0/lib
+
+
+
+###############################################################################
+# THESE ARE THINGS YOU MIGHT WANT TO SPECIFY #
+###############################################################################
+
+# The items in this section are those that are commonly changed according to
+# the sysadmin's preferences, but whose defaults are often acceptable. The
+# first five are concerned with security issues, where differing levels of
+# paranoia are appropriate in different environments. Sysadmins also vary in
+# their views on appropriate levels of defence in these areas. If you do not
+# understand these issues, go with the defaults, which are used by many sites.
+
+
+#------------------------------------------------------------------------------
+# Although Exim is normally a setuid program, owned by root, it refuses to run
+# local deliveries as root by default. There is a runtime option called
+# "never_users" which lists the users that must never be used for local
+# deliveries. There is also the setting below, which provides a list that
+# cannot be overridden at runtime. This guards against problems caused by
+# unauthorized changes to the runtime configuration. You are advised not to
+# remove "root" from this option, but you can add other users if you want. The
+# list is colon-separated. It must NOT contain any spaces.
+
+# FIXED_NEVER_USERS=root:bin:daemon
+FIXED_NEVER_USERS=root
+
+
+#------------------------------------------------------------------------------
+# By default, Exim insists that its configuration file be owned by root. You
+# can specify one additional permitted owner here.
+
+# CONFIGURE_OWNER=
+
+# If the configuration file is group-writeable, Exim insists by default that it
+# is owned by root. You can specify one additional permitted group owner here.
+
+# CONFIGURE_GROUP=
+
+# If you specify CONFIGURE_OWNER or CONFIGURE_GROUP as a name, this is looked
+# up at build time, and the uid or gid number is built into the binary.
+# However, you can specify that the lookup is deferred until runtime. In this
+# case, it is the name that is built into the binary. You can do this by a
+# setting of the form:
+
+# CONFIGURE_OWNER=ref:mail
+# CONFIGURE_GROUP=ref:sysadmin
+
+# In other words, put "ref:" in front of the user or group name. Although this
+# costs a bit of resource at runtime, it is convenient to use this feature when
+# building binaries that are to be run on multiple systems where the names may
+# refer to different uids or gids. It also allows you to build Exim on a system
+# where the relevant user or group is not defined.
+
+
+#------------------------------------------------------------------------------
+# The -C option allows Exim to be run with an alternate runtime configuration
+# file. When this is used by root, root privilege is retained by the binary
+# (for any other caller including the Exim user, it is dropped). You can
+# restrict the location of alternate configurations by defining a prefix below.
+# Any file used with -C must then start with this prefix (except that /dev/null
+# is also permitted if the caller is root, because that is used in the install
+# script). If the prefix specifies a directory that is owned by root, a
+# compromise of the Exim account does not permit arbitrary alternate
+# configurations to be used. The prefix can be more restrictive than just a
+# directory (the second example).
+
+# ALT_CONFIG_PREFIX=/some/directory/
+# ALT_CONFIG_PREFIX=/some/directory/exim.conf-
+
+
+#------------------------------------------------------------------------------
+# When a user other than root uses the -C option to override the configuration
+# file (including the Exim user when re-executing Exim to regain root
+# privileges for local message delivery), this will normally cause Exim to
+# drop root privileges. The TRUSTED_CONFIG_LIST option, specifies a file which
+# contains a list of trusted configuration filenames, one per line. If the -C
+# option is used by the Exim user or by the user specified in the
+# CONFIGURE_OWNER setting, to specify a configuration file which is listed in
+# the TRUSTED_CONFIG_LIST file, then root privileges are not dropped by Exim.
+
+# TRUSTED_CONFIG_LIST=/usr/exim/trusted_configs
+
+
+#------------------------------------------------------------------------------
+# Uncommenting this option disables the use of the -D command line option,
+# which changes the values of macros in the runtime configuration file.
+# This is another protection against somebody breaking into the Exim account.
+
+# DISABLE_D_OPTION=yes
+
+
+#------------------------------------------------------------------------------
+# By contrast, you might be maintaining a system which relies upon the ability
+# to override values with -D and assumes that these will be passed through to
+# the delivery processes. As of Exim 4.73, this is no longer the case by
+# default. Going forward, we strongly recommend that you use a shim Exim
+# configuration file owned by root stored under TRUSTED_CONFIG_LIST.
+# That shim can set macros before .include'ing your main configuration file.
+#
+# As a strictly transient measure to ease migration to 4.73, the
+# WHITELIST_D_MACROS value definies a colon-separated list of macro-names
+# which are permitted to be overridden from the command-line which will be
+# honoured by the Exim user. So these are macros that can persist to delivery
+# time.
+# Examples might be -DTLS or -DSPOOL=/some/dir. The values on the
+# command-line are filtered to only permit: [A-Za-z0-9_/.-]*
+#
+# This option is highly likely to be removed in a future release. It exists
+# only to make 4.73 as easy as possible to migrate to. If you use it, we
+# encourage you to schedule time to rework your configuration to not depend
+# upon it. Most people should not need to use this.
+#
+# By default, no macros are whitelisted for -D usage.
+
+# WHITELIST_D_MACROS=TLS:SPOOL
+
+#------------------------------------------------------------------------------
+# Exim has support for the AUTH (authentication) extension of the SMTP
+# protocol, as defined by RFC 2554. If you don't know what SMTP authentication
+# is, you probably won't want to include this code, so you should leave these
+# settings commented out. If you do want to make use of SMTP authentication,
+# you must uncomment at least one of the following, so that appropriate code is
+# included in the Exim binary. You will then need to set up the run time
+# configuration to make use of the mechanism(s) selected.
+
+AUTH_CRAM_MD5=yes
+# AUTH_CYRUS_SASL=yes
+AUTH_DOVECOT=yes
+AUTH_PLAINTEXT=yes
+AUTH_SPA=yes
+
+
+#------------------------------------------------------------------------------
+# If you specified AUTH_CYRUS_SASL above, you should ensure that you have the
+# Cyrus SASL library installed before trying to build Exim, and you probably
+# want to uncomment the following line:
+
+# AUTH_LIBS=-lsasl2
+
+
+#------------------------------------------------------------------------------
+# When Exim is decoding MIME "words" in header lines, most commonly for use
+# in the $header_xxx expansion, it converts any foreign character sets to the
+# one that is set in the headers_charset option. The default setting is
+# defined by this setting:
+
+HEADERS_CHARSET="ISO-8859-1"
+
+# If you are going to make use of $header_xxx expansions in your configuration
+# file, or if your users are going to use them in filter files, and the normal
+# character set on your host is something other than ISO-8859-1, you might
+# like to specify a different default here. This value can be overridden in
+# the runtime configuration, and it can also be overridden in individual filter
+# files.
+#
+# IMPORTANT NOTE: The iconv() function is needed for character code
+# conversions. Please see the next item...
+
+
+#------------------------------------------------------------------------------
+# Character code conversions are possible only if the iconv() function is
+# installed on your operating system. There are two places in Exim where this
+# is relevant: (a) The $header_xxx expansion (see the previous item), and (b)
+# the Sieve filter support. For those OS where iconv() is known to be installed
+# as standard, the file in OS/Makefile-xxxx contains
+#
+# HAVE_ICONV=yes
+#
+# If you are not using one of those systems, but have installed iconv(), you
+# need to uncomment that line above. In some cases, you may find that iconv()
+# and its header file are not in the default places. You might need to use
+# something like this:
+#
+# HAVE_ICONV=yes
+# CFLAGS=-O -I/usr/local/include
+# EXTRALIBS_EXIM=-L/usr/local/lib -liconv
+#
+# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM
+# as well.
+
+
+#------------------------------------------------------------------------------
+# The passwords for user accounts are normally encrypted with the crypt()
+# function. Comparisons with encrypted passwords can be done using Exim's
+# "crypteq" expansion operator. (This is commonly used as part of the
+# configuration of an authenticator for use with SMTP AUTH.) At least one
+# operating system has an extended function called crypt16(), which uses up to
+# 16 characters of a password (the normal crypt() uses only the first 8). Exim
+# supports the use of crypt16() as well as crypt() but note the warning below.
+
+# You can always indicate a crypt16-encrypted password by preceding it with
+# "{crypt16}". If you want the default handling (without any preceding
+# indicator) to use crypt16(), uncomment the following line:
+
+# DEFAULT_CRYPT=crypt16
+
+# If you do that, you can still access the basic crypt() function by preceding
+# an encrypted password with "{crypt}". For more details, see the description
+# of the "crypteq" condition in the manual chapter on string expansions.
+
+# Some operating systems do not include a crypt16() function, so Exim has one
+# of its own, which it uses unless HAVE_CRYPT16 is defined. Normally, that will
+# be set in an OS-specific Makefile for the OS that have such a function, so
+# you should not need to bother with it.
+
+# *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
+# It turns out that the above is not entirely accurate. As well as crypt16()
+# there is a function called bigcrypt() that some operating systems have. This
+# may or may not use the same algorithm, and both of them may be different to
+# Exim's built-in crypt16() that is used unless HAVE_CRYPT16 is defined.
+#
+# However, since there is now a move away from the traditional crypt()
+# functions towards using SHA1 and other algorithms, tidying up this area of
+# Exim is seen as very low priority. In practice, if you need to, you can
+# define DEFAULT_CRYPT to the name of any function that has the same interface
+# as the traditional crypt() function.
+# *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING ***
+
+
+#------------------------------------------------------------------------------
+# Exim can be built to support the SMTP STARTTLS command, which implements
+# Transport Layer Security using SSL (Secure Sockets Layer). To do this, you
+# must install the OpenSSL library package or the GnuTLS library. Exim contains
+# no cryptographic code of its own. Uncomment the following lines if you want
+# to build Exim with TLS support. If you don't know what this is all about,
+# leave these settings commented out.
+
+# This setting is required for any TLS support (either OpenSSL or GnuTLS)
+SUPPORT_TLS=yes
+
+# Uncomment this setting if you are using OpenSSL
+TLS_LIBS=-lssl -lcrypto
+
+# Uncomment these settings if you are using GnuTLS
+# USE_GNUTLS=yes
+# TLS_LIBS=-lgnutls -ltasn1 -lgcrypt
+
+# If you are running Exim as a server, note that just building it with TLS
+# support is not all you need to do. You also need to set up a suitable
+# certificate, and tell Exim about it by means of the tls_certificate
+# and tls_privatekey run time options. You also need to set tls_advertise_hosts
+# to specify the hosts to which Exim advertises TLS support. On the other hand,
+# if you are running Exim only as a client, building it with TLS support
+# is all you need to do.
+
+# Additional libraries and include files are required for both OpenSSL and
+# GnuTLS. The TLS_LIBS settings above assume that the libraries are installed
+# with all your other libraries. If they are in a special directory, you may
+# need something like
+
+# TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto
+# or
+# TLS_LIBS=-L/opt/gnu/lib -lgnutls -ltasn1 -lgcrypt
+
+# TLS_LIBS is included only on the command for linking Exim itself, not on any
+# auxiliary programs. If the include files are not in a standard place, you can
+# set TLS_INCLUDE to specify where they are, for example:
+
+# TLS_INCLUDE=-I/usr/local/openssl/include/
+# or
+# TLS_INCLUDE=-I/opt/gnu/include
+
+# You don't need to set TLS_INCLUDE if the relevant directories are already
+# specified in INCLUDE.
+
+
+#------------------------------------------------------------------------------
+# The default distribution of Exim contains only the plain text form of the
+# documentation. Other forms are available separately. If you want to install
+# the documentation in "info" format, first fetch the Texinfo documentation
+# sources from the ftp directory and unpack them, which should create files
+# with the extension "texinfo" in the doc directory. You may find that the
+# version number of the texinfo files is different to your Exim version number,
+# because the main documentation isn't updated as often as the code. For
+# example, if you have Exim version 4.43, the source tarball upacks into a
+# directory called exim-4.43, but the texinfo tarball unpacks into exim-4.40.
+# In this case, move the contents of exim-4.40/doc into exim-4.43/doc after you
+# have unpacked them. Then set INFO_DIRECTORY to the location of your info
+# directory. This varies from system to system, but is often /usr/share/info.
+# Once you have done this, "make install" will build the info files and
+# install them in the directory you have defined.
+
+# INFO_DIRECTORY=/usr/share/info
+
+
+#------------------------------------------------------------------------------
+# Exim log directory and files: Exim creates several log files inside a
+# single log directory. You can define the directory and the form of the
+# log file name here. If you do not set anything, Exim creates a directory
+# called "log" inside its spool directory (see SPOOL_DIRECTORY above) and uses
+# the filenames "mainlog", "paniclog", and "rejectlog". If you want to change
+# this, you can set LOG_FILE_PATH to a path name containing one occurrence of
+# %s. This will be replaced by one of the strings "main", "panic", or "reject"
+# to form the final file names. Some installations may want something like this:
+
+LOG_FILE_PATH=/var/log/exim/%slog
+
+# which results in files with names /var/log/exim_mainlog, etc. The directory
+# in which the log files are placed must exist; Exim does not try to create
+# it for itself. It is also your responsibility to ensure that Exim is capable
+# of writing files using this path name. The Exim user (see EXIM_USER above)
+# must be able to create and update files in the directory you have specified.
+
+# You can also configure Exim to use syslog, instead of or as well as log
+# files, by settings such as these
+
+# LOG_FILE_PATH=syslog
+# LOG_FILE_PATH=syslog:/var/log/exim_%slog
+
+# The first of these uses only syslog; the second uses syslog and also writes
+# to log files. Do not include white space in such a setting as it messes up
+# the building process.
+
+
+#------------------------------------------------------------------------------
+# When logging to syslog, the following option caters for syslog replacements
+# that are able to accept log entries longer than the 1024 characters allowed
+# by RFC 3164. It is up to you to make sure your syslog daemon can handle this.
+# Non-printable characters are usually unacceptable regardless, so log entries
+# are still split on newline characters.
+
+# SYSLOG_LONG_LINES=yes
+
+# If you are not interested in the process identifier (pid) of the Exim that is
+# making the call to syslog, then comment out the following line.
+
+SYSLOG_LOG_PID=yes
+
+
+#------------------------------------------------------------------------------
+# Cycling log files: this variable specifies the maximum number of old
+# log files that are kept by the exicyclog log-cycling script. You don't have
+# to use exicyclog. If your operating system has other ways of cycling log
+# files, you can use them instead. The exicyclog script isn't run by default;
+# you have to set up a cron job for it if you want it.
+
+EXICYCLOG_MAX=10
+
+
+#------------------------------------------------------------------------------
+# The compress command is used by the exicyclog script to compress old log
+# files. Both the name of the command and the suffix that it adds to files
+# need to be defined here. See also the EXICYCLOG_MAX configuration.
+
+COMPRESS_COMMAND=/bin/gzip
+COMPRESS_SUFFIX=gz
+
+
+#------------------------------------------------------------------------------
+# If the exigrep utility is fed compressed log files, it tries to uncompress
+# them using this command.
+
+ZCAT_COMMAND=/bin/zcat
+
+
+#------------------------------------------------------------------------------
+# Compiling in support for embedded Perl: If you want to be able to
+# use Perl code in Exim's string manipulation language and you have Perl
+# (version 5.004 or later) installed, set EXIM_PERL to perl.o. Using embedded
+# Perl costs quite a lot of resources. Only do this if you really need it.
+
+# EXIM_PERL=perl.o
+
+
+#------------------------------------------------------------------------------
+# Support for dynamically-loaded string expansion functions via ${dlfunc. If
+# you are using gcc the dynamically-loaded object must be compiled with the
+# -shared option, and you will need to add -export-dynamic to EXTRALIBS so
+# that the local_scan API is made available by the linker. You may also need
+# to add -ldl to EXTRALIBS so that dlopen() is available to Exim.
+
+# EXPAND_DLFUNC=yes
+
+
+#------------------------------------------------------------------------------
+# Exim has support for PAM (Pluggable Authentication Modules), a facility
+# which is available in the latest releases of Solaris and in some GNU/Linux
+# distributions (see http://ftp.kernel.org/pub/linux/libs/pam/). The Exim
+# support, which is intended for use in conjunction with the SMTP AUTH
+# facilities, is included only when requested by the following setting:
+
+# SUPPORT_PAM=yes
+
+# You probably need to add -lpam to EXTRALIBS, and in some releases of
+# GNU/Linux -ldl is also needed.
+
+
+#------------------------------------------------------------------------------
+# Support for authentication via Radius is also available. The Exim support,
+# which is intended for use in conjunction with the SMTP AUTH facilities,
+# is included only when requested by setting the following parameter to the
+# location of your Radius configuration file:
+
+# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf
+# RADIUS_CONFIG_FILE=/etc/radius.conf
+
+# If you have set RADIUS_CONFIG_FILE, you should also set one of these to
+# indicate which RADIUS library is used:
+
+# RADIUS_LIB_TYPE=RADIUSCLIENT
+# RADIUS_LIB_TYPE=RADIUSCLIENTNEW
+# RADIUS_LIB_TYPE=RADLIB
+
+# RADIUSCLIENT is the radiusclient library; you probably need to add
+# -lradiusclient to EXTRALIBS.
+#
+# The API for the radiusclient library was changed at release 0.4.0.
+# Unfortunately, the header file does not define a version number that clients
+# can use to support both the old and new APIs. If you are using version 0.4.0
+# or later of the radiusclient library, you should use RADIUSCLIENTNEW.
+#
+# RADLIB is the Radius library that comes with FreeBSD (the header file is
+# called radlib.h); you probably need to add -lradius to EXTRALIBS.
+#
+# If you do not set RADIUS_LIB_TYPE, Exim assumes the radiusclient library,
+# using the original API.
+
+
+#------------------------------------------------------------------------------
+# Support for authentication via the Cyrus SASL pwcheck daemon is available.
+# Note, however, that pwcheck is now deprecated in favour of saslauthd (see
+# next item). The Exim support for pwcheck, which is intented for use in
+# conjunction with the SMTP AUTH facilities, is included only when requested by
+# setting the following parameter to the location of the pwcheck daemon's
+# socket.
+#
+# There is no need to install all of SASL on your system. You just need to run
+# ./configure --with-pwcheck, cd to the pwcheck directory within the sources,
+# make and make install. You must create the socket directory (default
+# /var/pwcheck) and chown it to exim's user and group. Once you have installed
+# pwcheck, you should arrange for it to be started by root at boot time.
+
+# CYRUS_PWCHECK_SOCKET=/var/pwcheck/pwcheck
+
+
+#------------------------------------------------------------------------------
+# Support for authentication via the Cyrus SASL saslauthd daemon is available.
+# The Exim support, which is intented for use in conjunction with the SMTP AUTH
+# facilities, is included only when requested by setting the following
+# parameter to the location of the saslauthd daemon's socket.
+#
+# There is no need to install all of SASL on your system. You just need to run
+# ./configure --with-saslauthd (and any other options you need, for example, to
+# select or deselect authentication mechanisms), cd to the saslauthd directory
+# within the sources, make and make install. You must create the socket
+# directory (default /var/state/saslauthd) and chown it to exim's user and
+# group. Once you have installed saslauthd, you should arrange for it to be
+# started by root at boot time.
+
+# CYRUS_SASLAUTHD_SOCKET=/var/state/saslauthd/mux
+
+
+#------------------------------------------------------------------------------
+# TCP wrappers: If you want to use tcpwrappers from within Exim, uncomment
+# this setting. See the manual section entitled "Use of tcpwrappers" in the
+# chapter on building and installing Exim.
+#
+# USE_TCP_WRAPPERS=yes
+#
+# You may well also have to specify a local "include" file and an additional
+# library for TCP wrappers, so you probably need something like this:
+#
+# USE_TCP_WRAPPERS=yes
+# CFLAGS=-O -I/usr/local/include
+# EXTRALIBS_EXIM=-L/usr/local/lib -lwrap
+#
+# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM
+# as well.
+#
+# To use a name other than exim in the tcpwrappers config file,
+# e.g. if you're running multiple daemons with different access lists,
+# or multiple MTAs with the same access list, define
+# TCP_WRAPPERS_DAEMON_NAME accordingly
+#
+# TCP_WRAPPERS_DAEMON_NAME="exim"
+
+
+#------------------------------------------------------------------------------
+# The default action of the exim_install script (which is run by "make
+# install") is to install the Exim binary with a unique name such as
+# exim-4.43-1, and then set up a symbolic link called "exim" to reference it,
+# moving the symbolic link from any previous version. If you define NO_SYMLINK
+# (the value doesn't matter), the symbolic link is not created or moved. You
+# will then have to "turn Exim on" by setting up the link manually.
+
+# NO_SYMLINK=yes
+
+
+#------------------------------------------------------------------------------
+# Another default action of the install script is to install a default runtime
+# configuration file if one does not exist. This configuration has a router for
+# expanding system aliases. The default assumes that these aliases are kept
+# in the traditional file called /etc/aliases. If such a file does not exist,
+# the installation script creates one that contains just comments (no actual
+# aliases). The following setting can be changed to specify a different
+# location for the system alias file.
+
+SYSTEM_ALIASES_FILE=/etc/mail/aliases
+
+
+#------------------------------------------------------------------------------
+# There are some testing options (-be, -bt, -bv) that read data from the
+# standard input when no arguments are supplied. By default, the input lines
+# are read using the standard fgets() function. This does not support line
+# editing during interactive input (though the terminal's "erase" character
+# works as normal). If your operating system has the readline() function, and
+# in addition supports dynamic loading of library functions, you can cause
+# Exim to use readline() for the -be testing option (only) by uncommenting the
+# following setting. Dynamic loading is used so that the library is loaded only
+# when the -be testing option is given; by the time the loading occurs,
+# Exim has given up its root privilege and is running as the calling user. This
+# is the reason why readline() is NOT supported for -bt and -bv, because Exim
+# runs as root or as exim, respectively, for those options. When USE_READLINE
+# is "yes", as well as supporting line editing, a history of input lines in the
+# current run is maintained.
+
+# USE_READLINE=yes
+
+# You may need to add -ldl to EXTRALIBS when you set USE_READLINE=yes.
+# Note that this option adds to the size of the Exim binary, because the
+# dynamic loading library is not otherwise included.
+
+
+
+###############################################################################
+# THINGS YOU ALMOST NEVER NEED TO MENTION #
+###############################################################################
+
+# The settings in this section are available for use in special circumstances.
+# In the vast majority of installations you need not change anything below.
+
+
+#------------------------------------------------------------------------------
+# The following commands live in different places in some OS. Either the
+# ultimate default settings, or the OS-specific files should already point to
+# the right place, but they can be overridden here if necessary. These settings
+# are used when building various scripts to ensure that the correct paths are
+# used when the scripts are run. They are not used in the Makefile itself. Perl
+# is not necessary for running Exim unless you set EXIM_PERL (see above) to get
+# it embedded, but there are some utilities that are Perl scripts. If you
+# haven't got Perl, Exim will still build and run; you just won't be able to
+# use those utilities.
+
+# CHOWN_COMMAND=/usr/bin/chown
+# CHGRP_COMMAND=/usr/bin/chgrp
+# CHMOD_COMMAND=/usr/bin/chmod
+# MV_COMMAND=/bin/mv
+# RM_COMMAND=/bin/rm
+# TOUCH_COMMAND=/usr/bin/touch
+# PERL_COMMAND=/usr/bin/perl
+
+
+#------------------------------------------------------------------------------
+# The following macro can be used to change the command for building a library
+# of functions. By default the "ar" command is used, with options "cq".
+# Only in rare circumstances should you need to change this.
+
+# AR=ar cq
+
+
+#------------------------------------------------------------------------------
+# In some operating systems, the value of the TMPDIR environment variable
+# controls where temporary files are created. Exim does not make use of
+# temporary files, except when delivering to MBX mailboxes. However, if Exim
+# calls any external libraries (e.g. DBM libraries), they may use temporary
+# files, and thus be influenced by the value of TMPDIR. For this reason, when
+# Exim starts, it checks the environment for TMPDIR, and if it finds it is set,
+# it replaces the value with what is defined here. Commenting this setting
+# suppresses the check altogether.
+
+TMPDIR="/tmp"
+
+
+#------------------------------------------------------------------------------
+# The following macros can be used to change the default modes that are used
+# by the appendfile transport. In most installations the defaults are just
+# fine, and in any case, you can change particular instances of the transport
+# at run time if you want.
+
+# APPENDFILE_MODE=0600
+# APPENDFILE_DIRECTORY_MODE=0700
+# APPENDFILE_LOCKFILE_MODE=0600
+
+
+#------------------------------------------------------------------------------
+# In some installations there may be multiple machines sharing file systems,
+# where a different configuration file is required for Exim on the different
+# machines. If CONFIGURE_FILE_USE_NODE is defined, then Exim will first look
+# for a configuration file whose name is that defined by CONFIGURE_FILE,
+# with the node name obtained by uname() tacked on the end, separated by a
+# period (for example, /usr/exim/configure.host.in.some.domain). If this file
+# does not exist, then the bare configuration file name is tried.
+
+# CONFIGURE_FILE_USE_NODE=yes
+
+
+#------------------------------------------------------------------------------
+# In some esoteric configurations two different versions of Exim are run,
+# with different setuid values, and different configuration files are required
+# to handle the different cases. If CONFIGURE_FILE_USE_EUID is defined, then
+# Exim will first look for a configuration file whose name is that defined
+# by CONFIGURE_FILE, with the effective uid tacked on the end, separated by
+# a period (for eximple, /usr/exim/configure.0). If this file does not exist,
+# then the bare configuration file name is tried. In the case when both
+# CONFIGURE_FILE_USE_EUID and CONFIGURE_FILE_USE_NODE are set, four files
+# are tried: <name>.<euid>.<node>, <name>.<node>, <name>.<euid>, and <name>.
+
+# CONFIGURE_FILE_USE_EUID=yes
+
+
+#------------------------------------------------------------------------------
+# The size of the delivery buffers: These specify the sizes (in bytes) of
+# the buffers that are used when copying a message from the spool to a
+# destination. There is rarely any need to change these values.
+
+# DELIVER_IN_BUFFER_SIZE=8192
+# DELIVER_OUT_BUFFER_SIZE=8192
+
+
+#------------------------------------------------------------------------------
+# The mode of the database directory: Exim creates a directory called "db"
+# in its spool directory, to hold its databases of hints. This variable
+# determines the mode of the created directory. The default value in the
+# source is 0750.
+
+# EXIMDB_DIRECTORY_MODE=0750
+
+
+#------------------------------------------------------------------------------
+# Database file mode: The mode of files created in the "db" directory defaults
+# to 0640 in the source, and can be changed here.
+
+# EXIMDB_MODE=0640
+
+
+#------------------------------------------------------------------------------
+# Database lock file mode: The mode of zero-length files created in the "db"
+# directory to use for locking purposes defaults to 0640 in the source, and
+# can be changed here.
+
+# EXIMDB_LOCKFILE_MODE=0640
+
+
+#------------------------------------------------------------------------------
+# This parameter sets the maximum length of the header portion of a message
+# that Exim is prepared to process. The default setting is one megabyte. The
+# limit exists in order to catch rogue mailers that might connect to your SMTP
+# port, start off a header line, and then just pump junk at it for ever. The
+# message_size_limit option would also catch this, but it may not be set.
+# The value set here is the default; it can be changed at runtime.
+
+# HEADER_MAXSIZE="(1024*1024)"
+
+
+#------------------------------------------------------------------------------
+# The mode of the input directory: The input directory is where messages are
+# kept while awaiting delivery. Exim creates it if necessary, using a mode
+# which can be defined here (default 0750).
+
+# INPUT_DIRECTORY_MODE=0750
+
+
+#------------------------------------------------------------------------------
+# The mode of Exim's log directory, when it is created by Exim inside the spool
+# directory, defaults to 0750 but can be changed here.
+
+# LOG_DIRECTORY_MODE=0750
+
+
+#------------------------------------------------------------------------------
+# The log files themselves are created as required, with a mode that defaults
+# to 0640, but which can be changed here.
+
+# LOG_MODE=0640
+
+
+#------------------------------------------------------------------------------
+# The TESTDB lookup is for performing tests on the handling of lookup results,
+# and is not useful for general running. It should be included only when
+# debugging the code of Exim.
+
+# LOOKUP_TESTDB=yes
+
+
+#------------------------------------------------------------------------------
+# /bin/sh is used by default as the shell in which to run commands that are
+# defined in the makefiles. This can be changed if necessary, by uncommenting
+# this line and specifying another shell, but note that a Bourne-compatible
+# shell is expected.
+
+# MAKE_SHELL=/bin/sh
+
+
+#------------------------------------------------------------------------------
+# The maximum number of named lists of each type (address, domain, host, and
+# local part) can be increased by changing this value. It should be set to
+# a multiple of 16.
+
+MAX_NAMED_LIST=16
+
+
+#------------------------------------------------------------------------------
+# Network interfaces: Unless you set the local_interfaces option in the runtime
+# configuration file to restrict Exim to certain interfaces only, it will run
+# code to find all the interfaces there are on your host. Unfortunately,
+# the call to the OS that does this requires a buffer large enough to hold
+# data for all the interfaces - it was designed in the days when a host rarely
+# had more than three or four interfaces. Nowadays hosts can have very many
+# virtual interfaces running on the same hardware. If you have more than 250
+# virtual interfaces, you will need to uncomment this setting and increase the
+# value.
+
+# MAXINTERFACES=250
+
+
+#------------------------------------------------------------------------------
+# Per-message logs: While a message is in the process of being delivered,
+# comments on its progress are written to a message log, for the benefit of
+# human administrators. These logs are held in a directory called "msglog"
+# in the spool directory. Its mode defaults to 0750, but can be changed here.
+# The message log directory is also used for storing files that are used by
+# transports for returning data to a message's sender (see the "return_output"
+# option for transports).
+
+# MSGLOG_DIRECTORY_MODE=0750
+
+
+#------------------------------------------------------------------------------
+# There are three options which are used when compiling the Perl interface and
+# when linking with Perl. The default values for these are placed automatically
+# at the head of the Makefile by the script which builds it. However, if you
+# want to override them, you can do so here.
+
+# PERL_CC=
+# PERL_CCOPTS=
+# PERL_LIBS=
+
+
+#------------------------------------------------------------------------------
+# Identifying the daemon: When an Exim daemon starts up, it writes its pid
+# (process id) to a file so that it can easily be identified. The path of the
+# file can be specified here. Some installations may want something like this:
+
+PID_FILE_PATH=/var/run/exim.pid
+
+# If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
+# using the name "exim-daemon.pid".
+
+# If you start up a daemon without the -bd option (for example, with just
+# the -q15m option), a pid file is not written. Also, if you override the
+# configuration file with the -oX option, no pid file is written. In other
+# words, the pid file is written only for a "standard" daemon.
+
+
+#------------------------------------------------------------------------------
+# If Exim creates the spool directory, it is given this mode, defaulting in the
+# source to 0750.
+
+# SPOOL_DIRECTORY_MODE=0750
+
+
+#------------------------------------------------------------------------------
+# The mode of files on the input spool which hold the contents of messages can
+# be changed here. The default is 0640 so that information from the spool is
+# available to anyone who is a member of the Exim group.
+
+# SPOOL_MODE=0640
+
+
+#------------------------------------------------------------------------------
+# Moving frozen messages: If the following is uncommented, Exim is compiled
+# with support for automatically moving frozen messages out of the main spool
+# directory, a facility that is found useful by some large installations. A
+# run time option is required to cause the moving actually to occur. Such
+# messages become "invisible" to the normal management tools.
+
+# SUPPORT_MOVE_FROZEN_MESSAGES=yes
+
+
+#------------------------------------------------------------------------------
+# Disabling the use of fsync(): DO NOT UNCOMMENT THE FOLLOWING LINE unless you
+# really, really, really know what you are doing. And even then, think again.
+# You should never uncomment this when compiling a binary for distribution.
+# Use it only when compiling Exim for your own use.
+#
+# Uncommenting this line enables the use of a runtime option called
+# disable_fsync, which can be used to stop Exim using fsync() to ensure that
+# files are written to disc before proceeding. When this is disabled, crashes
+# and hardware problems such as power outages can cause data to be lost. This
+# feature should only be used in very exceptional circumstances. YOU HAVE BEEN
+# WARNED.
+
+# ENABLE_DISABLE_FSYNC=yes
+
+HAVE_IPV6=YES
+# LOOKUP_LIBS=-lldap
+# EXTRALIBS_EXIM=-lpam
+# End of EDITME for Exim 4.
diff --git a/testing/exim/exim.confd b/testing/exim/exim.confd
new file mode 100644
index 000000000..a3974d33b
--- /dev/null
+++ b/testing/exim/exim.confd
@@ -0,0 +1,2 @@
+# Command-line options for running exim
+EXIM_OPTS="-bd -q15m"
diff --git a/testing/exim/exim.initd b/testing/exim/exim.initd
new file mode 100644
index 000000000..fcd46d478
--- /dev/null
+++ b/testing/exim/exim.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/files/exim.rc7,v 1.2 2011/08/16 16:51:36 idl0r Exp $
+
+opts="${opts} reload"
+
+depend() {
+ need logger
+ use antivirus net
+ provide mta
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/exim --pidfile /var/run/${SVCNAME}.pid -- -C /etc/exim/${SVCNAME}.conf ${EXIM_OPTS:--bd -q15m}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid --name exim
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile /var/run/${SVCNAME}.pid --name exim
+ eend $?
+}
diff --git a/testing/exim/exim.logrotate b/testing/exim/exim.logrotate
new file mode 100644
index 000000000..7d99b559b
--- /dev/null
+++ b/testing/exim/exim.logrotate
@@ -0,0 +1,13 @@
+/var/log/exim/exim*.log {
+ daily
+ missingok
+ rotate 28
+ compress
+ delaycompress
+ notifempty
+ create 640 mail mail
+ sharedscripts
+ postrotate
+ /etc/init.d/exim reload > /dev/null
+ endscript
+}
diff --git a/testing/expect/APKBUILD b/testing/expect/APKBUILD
new file mode 100644
index 000000000..5ece40666
--- /dev/null
+++ b/testing/expect/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=expect
+pkgver=5.45
+pkgrel=0
+pkgdesc="A tool for automating interactive applications"
+url="http://www.nist.gov/el/msid/expect.cfm"
+arch="all"
+license="custom"
+depends=""
+depends_dev="tcl-dev"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/project/expect/Expect/$pkgver/$pkgname$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --with-tcl=/usr/lib \
+ --with-tclinclude=/usr/include \
+ --disable-rpath
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="44e1a4f4c877e9ddc5a542dfa7ecc92b expect5.45.tar.gz"
diff --git a/testing/fabric/APKBUILD b/testing/fabric/APKBUILD
new file mode 100644
index 000000000..5cb182fa7
--- /dev/null
+++ b/testing/fabric/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=fabric
+_pkgname=Fabric
+pkgver=1.2.2
+pkgrel=0
+pkgdesc="A simple pythonic remote deployment tool"
+url="http://www.fabfile.org"
+arch="noarch"
+license="BSD"
+depends="py-paramiko py-crypto py-setuptools"
+depends_dev=""
+makedepends="python-dev py-setuptools"
+install=""
+subpackages=""
+source="http://pypi.python.org/packages/source/F/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="f234678d3886a0b224945281395fdbda Fabric-1.2.2.tar.gz"
diff --git a/testing/faenza-icon-theme/APKBUILD b/testing/faenza-icon-theme/APKBUILD
new file mode 100644
index 000000000..c34d10124
--- /dev/null
+++ b/testing/faenza-icon-theme/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=faenza-icon-theme
+pkgver=0.8
+pkgrel=1
+pkgdesc="icons designed to go in tandem with equinox themes"
+arch="noarch"
+url="http://tiheum.deviantart.com/art/Faenza-Icons-173323228"
+license="GPL"
+depends=
+makedepends="wget"
+install=
+subpackages=
+source="https://launchpad.net/~tiheum/+archive/equinox/+files/faenza-icon-theme_$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/share/icons
+ cp -dpRf Faenza* "$pkgdir"/usr/share/icons
+
+ for i in 16 22 24 32 48; do
+ mv "$pkgdir"/usr/share/icons/Faenza/places/$i/start-here-gnome.png \
+ "$pkgdir"/usr/share/icons/Faenza/places/$i/start-here.png
+
+ mv "$pkgdir"/usr/share/icons/Faenza-Dark/places/$i/start-here-gnome.png \
+ "$pkgdir"/usr/share/icons/Faenza-Dark/places/$i/start-here.png
+ done
+
+ for i in scalable; do
+ mv "$pkgdir"/usr/share/icons/Faenza/places/$i/start-here-gnome.svg \
+ "$pkgdir"/usr/share/icons/Faenza/places/$i/start-here.svg
+
+ mv "$pkgdir"/usr/share/icons/Faenza-Dark/places/$i/start-here-gnome.svg \
+ "$pkgdir"/usr/share/icons/Faenza-Dark/places/$i/start-here.svg
+ done
+}
+
+md5sums="c4f87cf4105d2330a259296f8e73e709 faenza-icon-theme_0.8.tar.gz"
diff --git a/testing/fatback/APKBUILD b/testing/fatback/APKBUILD
new file mode 100644
index 000000000..eec7e2f78
--- /dev/null
+++ b/testing/fatback/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=fatback
+pkgver=1.3
+pkgrel=0
+pkgdesc="A tool for recovering files from FAT file systems"
+url="http://fatback.sourceforge.net/"
+arch="all"
+license="GPL2"
+depends=""
+makedepends="flex"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="4f1beb13670a7eff5b66cff84e5fd42a fatback-1.3.tar.gz"
diff --git a/testing/fetch-crl/APKBUILD b/testing/fetch-crl/APKBUILD
new file mode 100644
index 000000000..180d01c24
--- /dev/null
+++ b/testing/fetch-crl/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=fetch-crl
+pkgver=2.7.0
+pkgrel=1
+pkgdesc="Tool to keep Certificate Revocation Lists (CRLs) up-to-date"
+url="http://dist.eugridpma.info/distribution/util/fetch-crl/"
+arch="all"
+license="custom"
+subpackages="$pkgname-doc"
+source="
+ http://dist.eugridpma.info/distribution/util/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname-2.7.0-bb-wget.patch
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ sed -i -e 's:etc/sysconfig:etc/fetch-crl:g' \
+ edg-fetch-crl fetch-crl.cron fetch-crl.8
+ sed -i -e 's:bin/bash:bin/sh:' fetch-crl.cron
+ patch -p1 -i "$srcdir"/$pkgname-2.7.0-bb-wget.patch || return 1
+
+
+ _r=$pkgname-$pkgver
+ install -m755 -D edg-fetch-crl "$pkgdir"/usr/sbin/fetch-crl
+ install -m644 -D fetch-crl.sysconfig "$pkgdir"/etc/fetch-crl/fetch-crl
+
+ install -m644 -D fetch-crl.8 "$pkgdir"/usr/share/man/man8/fetch-crl.8
+ install -m644 -D README "$pkgdir"/usr/share/doc/$_r/README
+ install -m644 -D CHANGES "$pkgdir"/usr/share/doc/$_r/CHANGES
+ install -m755 -D fetch-crl.cron "$pkgdir"/usr/share/doc/$_r/fetch-crl.periodic
+}
+
+md5sums="6b0ba042ac3d155f1cd9c7b0baf3c708 fetch-crl-2.7.0.tar.gz
+613e4987db52cbd231cd4d7a46070d74 fetch-crl-2.7.0-bb-wget.patch"
diff --git a/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch b/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch
new file mode 100644
index 000000000..48fa7457e
--- /dev/null
+++ b/testing/fetch-crl/fetch-crl-2.7.0-bb-wget.patch
@@ -0,0 +1,41 @@
+--- fetch-crl-2.7.0/edg-fetch-crl.orig 2009-02-26 08:54:17 +0000
++++ fetch-crl-2.7.0/edg-fetch-crl 2009-02-26 09:20:27 +0000
+@@ -94,8 +94,8 @@
+ allWarnings=no # warnings follow verbosity
+
+ # get defaults
+-WGET_RETRIES=2
+-WGET_TIMEOUT=10
++#WGET_RETRIES=2
++#WGET_TIMEOUT=10
+ FETCH_CRL_SYSCONFIG="${FETCH_CRL_SYSCONFIG:-/etc/fetch-crl/fetch-crl}"
+
+ # specific work-around for incidental filesystem corruption
+@@ -149,7 +149,15 @@
+ fi
+
+ # add the other default arguments
+- wgetOptions="${wgetOptions} -t $WGET_RETRIES -T $WGET_TIMEOUT "
++ if [ -n "$WGET_RETRIES" ]; then
++ wgetOptions="${wgetOptions} -t $WGET_RETRIES "
++ fi
++ if [ -n "$WGET_TIMEOUT" ]; then
++ wgetOptions="${wgetOptions} -T $WGET_TIMEOUT "
++ fi
++ if [ -n "$WGET_TIMESTAMPING" ] && [ "$WGET_TIMESTAMPING" != "no" ]; then
++ wgetOptions="${wgetOptions} -N "
++ fi
+
+ # only add "-q" if the extra options do not have a -v. They are exclusive
+ expr match "${wgetAdditionalOptions}" '.*-v' >/dev/null 2>&1
+@@ -175,8 +183,8 @@
+ ${rm} -f "${cacheDirectory}/${hash}/pre"
+ ${cp} "${cacheDirectory}/${hash}/"* \
+ "${cacheDirectory}/${hash}/pre" >/dev/null 2>&1
+- PrintDebug ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}"
+- ${wget} ${wgetOptions} -N -P "${cacheDirectory}/${hash}" "${url}"
++ PrintDebug ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}"
++ ${wget} ${wgetOptions} -P "${cacheDirectory}/${hash}" "${url}"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ PrintWarning "RetrieveFileByURL: wget download error $rc for ${url}"
diff --git a/testing/flawfinder/APKBUILD b/testing/flawfinder/APKBUILD
new file mode 100644
index 000000000..bf1ed7006
--- /dev/null
+++ b/testing/flawfinder/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=flawfinder
+pkgver=1.27
+pkgrel=0
+pkgdesc="Examines C/C++ source code for security flaws"
+url="http://www.dwheeler.com/flawfinder/"
+arch=""
+license="GPL2"
+depends="python"
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.dwheeler.com/flawfinder/$pkgname-$pkgver.tar.gz
+ $pkgname-$pkgver-setup.patch"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="50fff67dd439f42b785577ed8b3a3f7d flawfinder-1.27.tar.gz
+483e93b34b3956136aa3d59865d407d8 flawfinder-1.27-setup.patch"
diff --git a/testing/foomatic-db-engine/APKBUILD b/testing/foomatic-db-engine/APKBUILD
new file mode 100644
index 000000000..1450b9163
--- /dev/null
+++ b/testing/foomatic-db-engine/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=foomatic-db-engine
+pkgver=4.0.8
+pkgrel=0
+pkgdesc="Tools for using the foomatic database of printers and printer drivers"
+url="http://www.linuxprinting.org"
+arch="all"
+license="GPLv2+"
+depends="foomatic-filters"
+depends_dev=""
+makedepends="perl-dev libxml2-dev cups-dev ghostscript-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.openprinting.org/download/foomatic/foomatic-db-engine-$pkgver.tar.gz"
+
+_builddir="$srcdir"/foomatic-db-engine-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="5283cd5125a96dc0b35d896326512b1a foomatic-db-engine-4.0.8.tar.gz"
diff --git a/testing/foomatic-filters/APKBUILD b/testing/foomatic-filters/APKBUILD
new file mode 100644
index 000000000..759237e26
--- /dev/null
+++ b/testing/foomatic-filters/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=foomatic-filters
+pkgver=4.0.9
+pkgrel=0
+pkgdesc="CUPS print filters for the foomatic package"
+url="http://www.linuxprinting.org"
+arch="all"
+license="GPLv2+"
+depends="perl"
+makedepends="dbus-dev cups-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.openprinting.org/download/foomatic/foomatic-filters-$pkgver.tar.gz"
+
+_builddir="$srcdir"/foomatic-filters-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-dependency-tracking \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="ab13aad4d96dbfca2d13653433ab8270 foomatic-filters-4.0.9.tar.gz"
diff --git a/testing/fossil/APKBUILD b/testing/fossil/APKBUILD
new file mode 100644
index 000000000..c36ac607e
--- /dev/null
+++ b/testing/fossil/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Paul Onyschuk <blink@bojary.koba.pl>
+# Maintainer:
+pkgname=fossil
+pkgver=1.18
+_pkgver=20110713230341
+pkgrel=0
+pkgdesc="Simple, high-reliability, distributed software configuration management"
+url="http://www.fossil-scm.org"
+arch="all"
+license="BSD"
+depends=
+makedepends="openssl-dev zlib-dev"
+source="$url/download/$pkgname-src-$_pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-src-$_pkgver
+
+build() {
+ cd "$_builddir"
+ make TCC="${CC:-gcc} $CFLAGS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm 755 $pkgname "$pkgdir"/usr/bin/$pkgname || return 1
+}
+
+md5sums="ed916bc0db85f30eadd0de45f6bc95ad fossil-src-20110713230341.tar.gz"
diff --git a/testing/fotoxx/APKBUILD b/testing/fotoxx/APKBUILD
new file mode 100644
index 000000000..0edb11853
--- /dev/null
+++ b/testing/fotoxx/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=fotoxx
+pkgver=11.06
+pkgrel=0
+pkgdesc="Photo editing and collection management"
+url="http://kornelix.squarespace.com/fotoxx"
+arch="all"
+license="GPL-3"
+depends="xdg-utils exiftool"
+makedepends="gtk+-dev tiff-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://kornelix.squarespace.com/storage/downloads/fotoxx-$pkgver.tar.gz
+ no-execinfo.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -e 's:/bin/bash:/bin/sh:' -i dependencies.sh
+}
+
+build() {
+ cd "$_builddir"
+ make PREFIX=/usr LDFLAGS="$LFDLAGS" CXXFLAGS="$CFLAGS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+}
+
+md5sums="e636e10f6a46f0a813e704f18eac3176 fotoxx-11.06.tar.gz
+981323960d1316051b898ba194085205 no-execinfo.patch"
diff --git a/testing/fotoxx/no-execinfo.patch b/testing/fotoxx/no-execinfo.patch
new file mode 100644
index 000000000..c0e43a9f7
--- /dev/null
+++ b/testing/fotoxx/no-execinfo.patch
@@ -0,0 +1,34 @@
+diff --git a/zfuncs.cc b/zfuncs.cc
+index 1398557..c504bbf 100644
+--- a/zfuncs.cc
++++ b/zfuncs.cc
+@@ -77,6 +77,7 @@ void zappcrash(cchar *pMess, ... ) // v
+
+ printf("zappcrash: \n %s \n",message); // output message to stdout
+
++#ifndef __UCLIBC__
+ nstack = backtrace(stacklist,nstack); // get traceback data
+ stackents = backtrace_symbols(stacklist,nstack);
+
+@@ -113,6 +114,7 @@ void zappcrash(cchar *pMess, ... ) // v
+ fclose(fid1);
+
+ err = system("xdg-open zappcrash"); // display in editor
++#endif
+ abort();
+ }
+
+diff --git a/zfuncs.h b/zfuncs.h
+index e415adb..b6f02ac 100644
+--- a/zfuncs.h
++++ b/zfuncs.h
+@@ -34,7 +34,9 @@
+ #include <pthread.h>
+ #include <errno.h>
+ #include <signal.h>
++#ifndef __UCLIBC__
+ #include <execinfo.h>
++#endif
+ #include <locale.h>
+ #include <sys/inotify.h>
+
diff --git a/testing/freealut/APKBUILD b/testing/freealut/APKBUILD
new file mode 100644
index 000000000..5e30245be
--- /dev/null
+++ b/testing/freealut/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=freealut
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="free audio library user toolkit"
+url="http://www.openal.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="openal-soft-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://connect.creativelabs.com/openal/Downloads/ALUT/freealut-$pkgver.tar.gz"
+
+_builddir="$srcdir"/freealut-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+md5sums="e089b28a0267faabdb6c079ee173664a freealut-1.1.0.tar.gz"
diff --git a/testing/freeciv/APKBUILD b/testing/freeciv/APKBUILD
new file mode 100644
index 000000000..851b44e15
--- /dev/null
+++ b/testing/freeciv/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=freeciv
+pkgver=2.2.5
+pkgrel=1
+pkgdesc="civilization 2 clone"
+url="http://freeciv.wikia.org/"
+arch="all"
+license="GPL"
+depends="$pkgname-server"
+makedepends="gtk+-dev gzip"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-server $pkgname-data"
+source="http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+server() {
+ replaces="freeciv"
+ depends="freeciv-data"
+
+ mkdir -p "$subpkgdir"/usr/bin
+
+ mv "$pkgdir"/usr/bin/civmanual "$subpkgdir"/usr/bin/civmanual
+ mv "$pkgdir"/usr/bin/freeciv-server "$subpkgdir"/usr/bin/freeciv-server
+}
+
+data() {
+ arch="noarch"
+
+ mkdir -p "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/freeciv "$subpkgdir"/usr/share/freeciv
+}
+
+md5sums="e717de02c77139593f21b930245d1709 freeciv-2.2.5.tar.bz2"
diff --git a/testing/freeswitch-sounds-es-mx-maria-44100/APKBUILD b/testing/freeswitch-sounds-es-mx-maria-44100/APKBUILD
new file mode 100644
index 000000000..7e5afb118
--- /dev/null
+++ b/testing/freeswitch-sounds-es-mx-maria-44100/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=freeswitch-sounds-es-mx-maria-44100
+pkgver="0"
+pkgrel=0
+pkgdesc="Sounds for freeswitch Spanish"
+url="http://files.freeswitch.org/"
+arch="all"
+license="unknown"
+depends=
+makedepends=
+install=
+subpackages=
+source="http://files.freeswitch.org/freeswitch-sounds-es-mx-maria-44100.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ return 0
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/sounds/
+ cp -ra "$srcdir"/ "$pkgdir"/usr/sounds
+}
+
+md5sums="a83a2e994741e4085016873d2d1c69a4 freeswitch-sounds-es-mx-maria-44100.tar.gz"
diff --git a/testing/freeswitch-sounds-fr-fr-sibylle-8000/APKBUILD b/testing/freeswitch-sounds-fr-fr-sibylle-8000/APKBUILD
new file mode 100644
index 000000000..7ff6c24ab
--- /dev/null
+++ b/testing/freeswitch-sounds-fr-fr-sibylle-8000/APKBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=freeswitch-sounds-fr-fr-sibylle-8000
+pkgver=0.1.3
+pkgrel=0
+pkgdesc="Sounds for freeswitch French"
+url="http://www.archive.org/details/FrenchAudioFilesForFreeswitch"
+arch="all"
+license="CC-3.0"
+depends=
+makedepends=
+install=
+subpackages=
+
+source="http://www.archive.org/download/FrenchAudioFilesForFreeswitch/freeswitch-sounds-fr-fr-sibylle-8000-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ return 0
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/sounds/
+ cp -ra "$srcdir"/fr "$pkgdir"/usr/sounds
+ chown -R root:root "$pkgdir"/usr/sounds
+}
+
+md5sums="b23cf14c59fcbe1a2cce1925d3546204 freeswitch-sounds-fr-fr-sibylle-8000-0.1.3.tar.gz"
diff --git a/testing/freeswitch-sounds-music-8000/APKBUILD b/testing/freeswitch-sounds-music-8000/APKBUILD
new file mode 100644
index 000000000..64a18301a
--- /dev/null
+++ b/testing/freeswitch-sounds-music-8000/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor:
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=freeswitch-sounds-music-8000
+pkgver=1.0.8
+pkgrel=0
+pkgdesc="Sounds for freeswitch Music"
+url="http://files.freeswitch.org/"
+arch="all"
+license="unknown"
+depends=
+makedepends=
+install=
+subpackages=
+source="http://files.freeswitch.org/freeswitch-sounds-music-8000-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ return 0
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/sounds/
+ cp -ra "$srcdir"/ "$pkgdir"/usr/sounds
+}
+
+md5sums="f63ef3cc3507af079ae5c7b8b8a01e42 freeswitch-sounds-music-8000-$pkgver.tar.gz"
+
diff --git a/testing/freetype-infinality/APKBUILD b/testing/freetype-infinality/APKBUILD
new file mode 100644
index 000000000..2ba23842e
--- /dev/null
+++ b/testing/freetype-infinality/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=freetype-infinality
+pkgver=2.4.4
+pkgrel=1
+pkgdesc="TrueType font rendering library with infinality patch"
+url="http://www.infinality.net"
+arch="all"
+license="GPL"
+depends=
+depends_dev="zlib-dev freetype-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+replaces="freetype"
+source="http://downloads.sourceforge.net/sourceforge/freetype/freetype-$pkgver.tar.bz2
+freetype-add-subpixel-hinting-infinality-20101114-1.patch
+freetype-enable-subpixel-hinting-infinality-20100909-1.patch
+freetype-entire-infinality-patchset-20101114-1.patch
+infinality-settings
+freetype-2.2.1-enable-valid.patch
+freetype2-infinality-protect_null_pointer-goddesse.patch"
+
+_builddir="$srcdir/freetype-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm755 "$srcdir/infinality-settings" "$pkgdir/etc/profile.d/infinality-settings.sh"
+}
+
+md5sums="b3e2b6e2f1c3e0dffa1fd2a0f848b671 freetype-2.4.4.tar.bz2
+799a2d229c2997a5bb2d5b7c9f92fdba freetype-add-subpixel-hinting-infinality-20101114-1.patch
+a88b1a66da44a90c1fdcdeaa39a2dc09 freetype-enable-subpixel-hinting-infinality-20100909-1.patch
+6725774b17820f5413cb6a3cf7547f53 freetype-entire-infinality-patchset-20101114-1.patch
+416154ff9eb8dfb27e46080f678785b8 infinality-settings
+214119610444c9b02766ccee5e220680 freetype-2.2.1-enable-valid.patch
+316d2986f9a08e7ceb51fb9d5a5cab38 freetype2-infinality-protect_null_pointer-goddesse.patch"
diff --git a/testing/freetype-infinality/freetype-2.2.1-enable-valid.patch b/testing/freetype-infinality/freetype-2.2.1-enable-valid.patch
new file mode 100644
index 000000000..c78b6b70f
--- /dev/null
+++ b/testing/freetype-infinality/freetype-2.2.1-enable-valid.patch
@@ -0,0 +1,20 @@
+--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
++++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
+@@ -110,7 +110,7 @@
+ AUX_MODULES += cache
+
+ # TrueType GX/AAT table validation. Needs ftgxval.c below.
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+@@ -124,7 +124,7 @@
+
+ # OpenType table validation. Needs ftotval.c below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+
+ # Auxiliary PostScript driver component to share common code.
+ #
diff --git a/testing/freetype-infinality/freetype-add-subpixel-hinting-infinality-20101114-1.patch b/testing/freetype-infinality/freetype-add-subpixel-hinting-infinality-20101114-1.patch
new file mode 100644
index 000000000..05e9c4414
--- /dev/null
+++ b/testing/freetype-infinality/freetype-add-subpixel-hinting-infinality-20101114-1.patch
@@ -0,0 +1,2776 @@
+Infinality Freetype Truetype Subpixel Hinting Patch
+-------------------------------------------------------------------
+Should patch cleanly to freetype-2.4.3
+
+
+Changes for 2010-11-14:
+ * Rule tweaks on various fonts. Fixed the Cyrillic y issue and e issue
+ with Trebuchet, and the ^ issue with Arial. Other issues
+ (firefox and @font-face) are still present to a degree.
+
+ * A couple new rules to deal with various issues. (work in progress)
+
+ * Additional commenting.
+
+ * Some cleanup of obsolete code.
+
+ * Added some debugging code for potential future enhancements. Please
+ ignore the mess.
+
+
+Changes for 2010-10-22:
+ * I'm refocusing on just getting the subpixel looking nice, so I've stripped
+ back the rendering modes to just 2. The standard SUBPIXEL_HINTING and
+ the ADDITIONAL_TWEAKS. The rules structure is still in place. I recommend
+ using ADDITIONAL_TWEAKS mode.
+
+ * Fixed an issue with monochrome rendering that made fonts look really bad.
+ There is still an issue with them, but they are at least tolerable to
+ look at now.
+
+ * Added some testing code for detecting inline delta functions. Not sure
+ if this is useful yet.
+
+ * Added more rules to deal with certain artifacts on various fonts, like the
+ issue with < > and ^. Created some "exception" rules for certain rules.
+
+ * Reverted back to older rounding functions. The new experimental ones I
+ was trying were causing artifacts on some fonts.
+
+ * Some code cleanup.
+
+
+Changes for 2010-10-08:
+ * Fix PDF crashes.
+
+Changes for 2010-10-04:
+ * Update to freetype-2.4.3
+
+
+Changes for 2010-10-03:
+ * There are lots of changes for this one, some big, some small, and some
+ that still are not implemented. Not sure if I can remember them all
+ but I will try! THIS IS A POINT RELEASE THAT IS NOT
+ INTENDED TO WORK 100%. Some fonts and compile options may be broken
+ and the code may be inefficient and/or not syntactiacally correct.
+ That said, I do plan on using this on my system right away.
+
+ * There are now "rendering modes" for the subpixel hinting, with the idea
+ that this will enventually be able to be controlled by fontconfig. The 4
+ modes of enhanced hinting defined so far are:
+ 1) NATIVE HINTING - this is what freetype TT interpreter does by default.
+ 2) FIXED NATIVE HINTING - A slighly tweaked version of the above that
+ does "better" native rendering when displaying on LCD, for those
+ that still seem to like incorrect, thin fonts, which were only ever
+ there due to technical limitations.
+ 3) SUBPIXEL OPTIMIZED HINTING - this is straight up subpixel hinting with
+ very few tweaks. Just enough to get it working.
+ 4) COMPATIBILITY MODE HINTING - this is the sweet spot I'm working on
+ that will hopefully supplant #3 because it will work so well with all
+ fonts. The idea here is to tweak all available fonts so that each
+ renders well.
+ All of these modes either turn on or off switches in the interpreter
+ to make the fonts render properly for each mode. Right now these are only
+ compile-time options.
+
+ * Subpixel-related code has been broken out into its own files, so as to not
+ clutter up the existing code.
+
+ * The rasterizer now pays attention to the additional bits of MS rasterizer
+ v. 37, meaning that it can now indicate to fonts that it can handle
+ subpixel rendering.
+
+ * The rounding functions have been adapted to accept a grid resolution
+ variable, which lets them work on pixel and subpixel boundaries
+ automatically. Y still needs to be implemented.
+
+ * Additional conditions have been added to the switches, to further refine
+ how they are applied to different fonts.
+
+ * What all this means qualitatively is that legacy fonts now render much
+ better. There are still some that need a bit of love, like Courier New.
+
+ - Courier New has some fixes, and some breakage (Ghost pixels above bold
+ fonts, too thin on regular font)
+ - Times New Roman has some fixes and breakage (serifs, particularly)
+ - Tahoma and Trebuchet MS have been cleaned up
+ - Arial now snaps to grid better, but that causes breakage on a few glyphs
+ - Verdana 13 is now set to grid fit, but some glyhs are broken (mwxyz)
+ - Geneva and Geneva CY no longer look like turds
+ - Lucida Sans Unicode now looks arguably better than Lucida Grande
+
+
+
+Changes for 2010-09-16:
+
+ * The changes from 2010-09-14 regarding subpixel when LIGHT hinting enabled
+ have been reverted due to problems. The old behavior is back.
+
+ * Disable grayscale when subpixel is enabled. This results in better
+ behavior of some TT instructions within some fonts, like Times New Roman.
+
+ * Some modification of the tweaks, in light of above.
+
+
+Changes for 2010-09-14:
+
+ /************************** NO LONGER IN PLACE *****************************/
+ * Subpixel hinting is now used when the LIGHT hinting method and the TT
+ hinting is called. If FULL hinting is requested it will do the usual
+ behavior of the TT hinter.
+
+ This allows for all previously existing behavior, plus the new subpixel
+ hinting behavior, all in the same compile, and it makes sense in that
+ the slight hinting of the autohinter is essentially doing the same thing
+ as this, which is not forcing X-direction hints.
+
+ Previously, even if TT was selected, but LIGHT hinting was used, the
+ autohinter would still be forced. Other than this, autohint is not affected.
+ /***************************************************************************/
+
+ * Added a couple more conditionals around things to test whether subpixel
+ hinting is enabled. There were a few missing that ended up causing some
+ goofy hinting if subpixel was not enabled, but compiled in.
+
+
+
+
+
+
+
+
+
+diff -Nur freetype-2.4.3.orig/include/freetype/config/ftoption.h freetype-2.4.3.new/include/freetype/config/ftoption.h
+--- freetype-2.4.3.orig/include/freetype/config/ftoption.h 2010-07-04 23:38:55.000000000 -0500
++++ freetype-2.4.3.new/include/freetype/config/ftoption.h 2010-10-23 21:47:20.476211579 -0500
+@@ -501,6 +501,48 @@
+
+ /*************************************************************************/
+ /* */
++ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
++ /* EXPERIMENTAL subpixel hinting support into the TrueType driver. */
++ /* This will replace the native TrueType hinting mechanism when */
++ /* anything but FT_RENDER_MODE_MONO is requested. */
++ /* */
++ /* Enabling this causes the TrueType driver to ignore instructions */
++ /* under certain conditions. This is done in accordance with the */
++ /* guide here, with some minor differences: */
++ /* */
++ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
++ /* */
++ /* By undefining this, you will only compile the code necessary to */
++ /* hint TrueType glyphs with native TT hinting. */
++ /* */
++ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
++ /* defined. */
++ /* */
++/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
++
++ /*************************************************************************/
++ /* */
++ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS if you */
++ /* want to enable additional subpixel hinting tweaks of individual fonts,*/
++ /* glyphs, styles and sizes. The idea here is that some glyphs and */
++ /* fonts still do not render in a desirable way with */
++ /* TT_CONFIG_OPTION_SUBPIXEL_HINTING. */
++ /* */
++ /* This is disabled by default, as some people may not care, or may not */
++ /* want the additional overhead involved in doing this. */
++ /* */
++ /* By undefining this, you will only compile the code necessary to */
++ /* do subpixel hinting as defined above. */
++ /* */
++ /* This option requires TT_CONFIG_OPTION_SUBPIXEL_HINTING to be */
++ /* defined. */
++ /* */
++/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++
++
++ /*************************************************************************/
++ /* */
+ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
+ /* of the TrueType bytecode interpreter is used that doesn't implement */
+ /* any of the patented opcodes and algorithms. The patents related to */
+diff -Nur freetype-2.4.3.orig/include/freetype/internal/ftobjs.h freetype-2.4.3.new/include/freetype/internal/ftobjs.h
+--- freetype-2.4.3.orig/include/freetype/internal/ftobjs.h 2010-07-18 11:07:31.000000000 -0500
++++ freetype-2.4.3.new/include/freetype/internal/ftobjs.h 2010-11-07 11:18:19.681501081 -0600
+@@ -81,6 +81,14 @@
+ #define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
+ #define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
+
++ /*
++ * These are used in ttinterp.c for subpixel hinting with an
++ * adjustable grids-per-pixel value.
++ */
++#define FT_PIX_FLOOR_GRID( x, n ) ( (x) & ~(64 / n - 1) )
++#define FT_PIX_ROUND_GRID( x, n ) FT_PIX_FLOOR_GRID( (x) + 32 / n, n)
++#define FT_PIX_CEIL_GRID( x, n ) FT_PIX_FLOOR_GRID( (x) + 63 / n, n)
++
+
+ /*
+ * Return the highest power of 2 that is <= value; this correspond to
+diff -Nur freetype-2.4.3.orig/src/truetype/rules.mk freetype-2.4.3.new/src/truetype/rules.mk
+--- freetype-2.4.3.orig/src/truetype/rules.mk 2009-03-14 08:45:26.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/rules.mk 2010-10-22 19:25:46.060977607 -0500
+@@ -30,7 +30,8 @@
+ $(TT_DIR)/ttgload.c \
+ $(TT_DIR)/ttinterp.c \
+ $(TT_DIR)/ttgxvar.c \
+- $(TT_DIR)/ttdriver.c
++ $(TT_DIR)/ttdriver.c \
++ $(TT_DIR)/ttsubpixel.c
+
+ # TrueType driver headers
+ #
+diff -Nur freetype-2.4.3.orig/src/truetype/truetype.c freetype-2.4.3.new/src/truetype/truetype.c
+--- freetype-2.4.3.orig/src/truetype/truetype.c 2009-07-03 08:28:24.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/truetype.c 2010-10-22 19:25:46.061853066 -0500
+@@ -27,6 +27,7 @@
+
+ #ifdef TT_USE_BYTECODE_INTERPRETER
+ #include "ttinterp.c"
++#include "ttsubpixel.c"
+ #endif
+
+ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+diff -Nur freetype-2.4.3.orig/src/truetype/ttgload.c freetype-2.4.3.new/src/truetype/ttgload.c
+--- freetype-2.4.3.orig/src/truetype/ttgload.c 2010-09-14 02:00:35.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/ttgload.c 2010-11-14 09:07:50.835981062 -0600
+@@ -33,7 +33,7 @@
+ #endif
+
+ #include "tterrors.h"
+-
++#include "ttsubpixel.h"
+
+ /*************************************************************************/
+ /* */
+@@ -166,6 +166,12 @@
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( loader->exec ) loader->exec->sph_tweak_flags = 0x00000;
++ /* this may not be the right place for this, but it works */
++ if ( loader->exec && loader->exec->enhanced ) sph_set_tweaks( loader, glyph_index );
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ if ( !loader->linear_def )
+ {
+ loader->linear_def = 1;
+@@ -1683,13 +1689,23 @@
+ IS_HINTED( loader->load_flags ) )
+ {
+ FT_Byte* widthp;
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Bool enhanced;
+
++ enhanced =
++ FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags )
++ != FT_RENDER_MODE_MONO );
+
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ widthp = tt_face_get_device_metrics( face,
+ size->root.metrics.x_ppem,
+ glyph_index );
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( ( !enhanced || BITMAP_WIDTHS ) && widthp )
++#else
+ if ( widthp )
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ glyph->metrics.horiAdvance = *widthp << 6;
+ }
+
+@@ -1883,8 +1899,13 @@
+ {
+ TT_ExecContext exec;
+ FT_Bool grayscale;
+-
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Bool subpixel_hinting;
++ FT_Bool grayscale_hinting;
++ /*FT_Bool compatible_widths;
++ FT_Bool symmetrical_smoothing;
++ FT_Bool bgr;*/
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ if ( !size->cvt_ready )
+ {
+ FT_Error error = tt_size_ready_bytecode( size );
+@@ -1898,20 +1919,75 @@
+ if ( !exec )
+ return TT_Err_Could_Not_Find_Context;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ subpixel_hinting =
++ FT_BOOL( (FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO)
++ && SET_SUBPIXEL );
++
++ if ( subpixel_hinting ) grayscale = grayscale_hinting = FALSE;
++ else if ( SET_GRAYSCALE )
++ {
++ grayscale = grayscale_hinting = TRUE;
++ subpixel_hinting = FALSE;
++ }
++
++ exec->enhanced = ( subpixel_hinting
++ || grayscale_hinting );
++
++ exec->rasterizer_version = SET_RASTERIZER_VERSION;
++
++ exec->compatible_widths = SET_COMPATIBLE_WIDTHS;
++ /*FT_BOOL( FT_LOAD_TARGET_MODE( load_flags )
++ != TT_LOAD_COMPATIBLE_WIDTHS );*/
++
++ exec->symmetrical_smoothing = FALSE;
++ /*FT_BOOL( FT_LOAD_TARGET_MODE( load_flags )
++ != TT_LOAD_SYMMETRICAL_SMOOTHING );*/
++
++ exec->bgr = FALSE;
++ /*FT_BOOL( FT_LOAD_TARGET_MODE( load_flags )
++ != TT_LOAD_BGR );*/
++#else
+ grayscale =
+ FT_BOOL( FT_LOAD_TARGET_MODE( load_flags ) != FT_RENDER_MODE_MONO );
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ TT_Load_Context( exec, face, size );
+
+- /* a change from mono to grayscale rendering (and vice versa) */
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++
++ /* a change from mono to subpixel rendering (and vice versa) */
+ /* requires a re-execution of the CVT program */
+- if ( grayscale != exec->grayscale )
++ if ( subpixel_hinting != exec->subpixel_hinting )
++ {
++ FT_UInt i;
++
++ exec->subpixel_hinting = subpixel_hinting;
++
++ for ( i = 0; i < size->cvt_size; i++ )
++ size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
++ tt_size_run_prep( size );
++ }
++
++ /* a change from mono to grayscale rendering (and vice versa) */
++ /* requires a re-execution of the CVT program */
++ if ( grayscale != exec->grayscale_hinting )
+ {
+ FT_UInt i;
+
++ exec->grayscale_hinting = grayscale_hinting;
+
+- FT_TRACE4(( "tt_loader_init: grayscale change,"
+- " re-executing `prep' table\n" ));
++ for ( i = 0; i < size->cvt_size; i++ )
++ size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
++ tt_size_run_prep( size );
++ }
++#else
++
++ /* a change from mono to grayscale rendering (and vice versa) */
++ /* requires a re-execution of the CVT program */
++ if ( grayscale != exec->grayscale )
++ {
++ FT_UInt i;
+
+ exec->grayscale = grayscale;
+
+@@ -1919,6 +1995,7 @@
+ size->cvt[i] = FT_MulFix( face->cvt[i], size->ttmetrics.scale );
+ tt_size_run_prep( size );
+ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ /* see whether the cvt program has disabled hinting */
+ if ( exec->GS.instruct_control & 1 )
+@@ -2050,6 +2127,7 @@
+ if ( face->postscript.isFixedPitch &&
+ ( load_flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ) == 0 )
+ glyph->linearHoriAdvance = face->horizontal.advance_Width_Max;
++
+ }
+
+ return TT_Err_Ok;
+@@ -2125,6 +2203,9 @@
+ }
+ else
+ glyph->outline.flags |= FT_OUTLINE_IGNORE_DROPOUTS;
++
++
++
+ }
+
+ #endif /* TT_USE_BYTECODE_INTERPRETER */
+diff -Nur freetype-2.4.3.orig/src/truetype/ttinterp.c freetype-2.4.3.new/src/truetype/ttinterp.c
+--- freetype-2.4.3.orig/src/truetype/ttinterp.c 2010-10-01 01:08:19.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/ttinterp.c 2010-11-14 09:25:21.736322597 -0600
+@@ -27,10 +27,12 @@
+
+ #include "tterrors.h"
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++#include "ttsubpixel.h"
++#endif
+
+ #ifdef TT_USE_BYTECODE_INTERPRETER
+
+-
+ #define TT_MULFIX FT_MulFix
+ #define TT_MULDIV FT_MulDiv
+ #define TT_MULDIV_NO_ROUND FT_MulDiv_No_Round
+@@ -150,11 +152,11 @@
+ #define NORMalize( x, y, v ) \
+ Normalize( EXEC_ARG_ x, y, v )
+
+-#define SET_SuperRound( scale, flags ) \
+- SetSuperRound( EXEC_ARG_ scale, flags )
++#define SET_SuperRound( scale, flags, res ) \
++ SetSuperRound( EXEC_ARG_ scale, flags, res )
+
+-#define ROUND_None( d, c ) \
+- Round_None( EXEC_ARG_ d, c )
++#define ROUND_None( d, c, e ) \
++ Round_None( EXEC_ARG_ d, c, e )
+
+ #define INS_Goto_CodeRange( range, ip ) \
+ Ins_Goto_CodeRange( EXEC_ARG_ range, ip )
+@@ -165,8 +167,8 @@
+ #define CUR_Func_move_orig( z, p, d ) \
+ CUR.func_move_orig( EXEC_ARG_ z, p, d )
+
+-#define CUR_Func_round( d, c ) \
+- CUR.func_round( EXEC_ARG_ d, c )
++#define CUR_Func_round( d, c, e ) \
++ CUR.func_round( EXEC_ARG_ d, c, e )
+
+ #define CUR_Func_read_cvt( index ) \
+ CUR.func_read_cvt( EXEC_ARG_ index )
+@@ -246,6 +248,12 @@
+ #define GUESS_VECTOR( V )
+ #endif
+
++
++ /*FT_Int CUR.num_delta_funcs;*/
++ /*FT_ULong inline_delta_funcs[5];*/
++ /*FT_Long CUR.infunc;*/
++
++
+ /*************************************************************************/
+ /* */
+ /* CODERANGE FUNCTIONS */
+@@ -1838,24 +1846,33 @@
+ FT_ASSERT( !CUR.face->unpatented_hinting );
+ #endif
+
+- v = CUR.GS.freeVector.x;
+-
+- if ( v != 0 )
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( !CUR.enhanced || CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_DMOVE_FREEV )
+ {
+- zone->cur[point].x += TT_MULDIV( distance,
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
++ v = CUR.GS.freeVector.x;
++
++ if ( v != 0 )
++ {
++ zone->cur[point].x += TT_MULDIV( distance,
+ v * 0x10000L,
+ CUR.F_dot_P );
+
+- zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
++ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
++ }
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ v = CUR.GS.freeVector.y;
+
+ if ( v != 0 )
+ {
+ zone->cur[point].y += TT_MULDIV( distance,
+- v * 0x10000L,
+- CUR.F_dot_P );
++ v * 0x10000L,
++ CUR.F_dot_P );
+
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
+ }
+@@ -1895,18 +1912,17 @@
+
+ if ( v != 0 )
+ zone->org[point].x += TT_MULDIV( distance,
+- v * 0x10000L,
+- CUR.F_dot_P );
++ v * 0x10000L,
++ CUR.F_dot_P );
+
+ v = CUR.GS.freeVector.y;
+
+ if ( v != 0 )
+ zone->org[point].y += TT_MULDIV( distance,
+- v * 0x10000L,
+- CUR.F_dot_P );
++ v * 0x10000L,
++ CUR.F_dot_P );
+ }
+
+-
+ /*************************************************************************/
+ /* */
+ /* Special versions of Direct_Move() */
+@@ -1923,9 +1939,16 @@
+ FT_F26Dot6 distance )
+ {
+ FT_UNUSED_EXEC;
+-
+- zone->cur[point].x += distance;
+- zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( !CUR.enhanced
++ || ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_DMOVEX_FREEV ) )
++ {
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++ zone->cur[point].x += distance;
++ zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ }
+
+
+@@ -1940,7 +1963,6 @@
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
+ }
+
+-
+ /*************************************************************************/
+ /* */
+ /* Special versions of Direct_Move_Orig() */
+@@ -1959,6 +1981,7 @@
+ FT_UNUSED_EXEC;
+
+ zone->org[point].x += distance;
++
+ }
+
+
+@@ -1969,7 +1992,7 @@
+ {
+ FT_UNUSED_EXEC;
+
+- zone->org[point].y += distance;
++ zone->org[point].y += distance;
+ }
+
+
+@@ -1997,7 +2020,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_None( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2016,6 +2040,7 @@
+ if ( val > 0 )
+ val = 0;
+ }
++
+ return val;
+ }
+
+@@ -2038,7 +2063,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2047,15 +2073,15 @@
+
+ if ( distance >= 0 )
+ {
+- val = distance + compensation + 32;
++ val = distance + compensation + 32 / resolution;
+ if ( distance && val > 0 )
+- val &= ~63;
++ val &= ~(64 / resolution - 1);
+ else
+ val = 0;
+ }
+ else
+ {
+- val = -FT_PIX_ROUND( compensation - distance );
++ val = -FT_PIX_ROUND_GRID( compensation - distance, resolution );
+ if ( val > 0 )
+ val = 0;
+ }
+@@ -2082,22 +2108,22 @@
+ /* */
+ static FT_F26Dot6
+ Round_To_Half_Grid( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+ FT_UNUSED_EXEC;
+
+-
+ if ( distance >= 0 )
+ {
+- val = FT_PIX_FLOOR( distance + compensation ) + 32;
++ val = FT_PIX_FLOOR_GRID( distance + compensation, resolution ) + 32 / resolution;
+ if ( distance && val < 0 )
+ val = 0;
+ }
+ else
+ {
+- val = -( FT_PIX_FLOOR( compensation - distance ) + 32 );
++ val = -( FT_PIX_FLOOR_GRID( compensation - distance, resolution ) + 32 / resolution );
+ if ( val > 0 )
+ val = 0;
+ }
+@@ -2124,7 +2150,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_Down_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2135,13 +2162,13 @@
+ {
+ val = distance + compensation;
+ if ( distance && val > 0 )
+- val &= ~63;
++ val &= ~(64 / resolution - 1 );
+ else
+ val = 0;
+ }
+ else
+ {
+- val = -( ( compensation - distance ) & -64 );
++ val = -( ( compensation - distance ) & -(64 / resolution) );
+ if ( val > 0 )
+ val = 0;
+ }
+@@ -2168,7 +2195,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_Up_To_Grid( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2177,15 +2205,15 @@
+
+ if ( distance >= 0 )
+ {
+- val = distance + compensation + 63;
++ val = distance + compensation + (64 / resolution - 1);
+ if ( distance && val > 0 )
+- val &= ~63;
++ val &= ~(64 / resolution - 1);
+ else
+ val = 0;
+ }
+ else
+ {
+- val = - FT_PIX_CEIL( compensation - distance );
++ val = - FT_PIX_CEIL_GRID( compensation - distance, resolution );
+ if ( val > 0 )
+ val = 0;
+ }
+@@ -2212,24 +2240,26 @@
+ /* */
+ static FT_F26Dot6
+ Round_To_Double_Grid( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+ FT_UNUSED_EXEC;
+
+
+- if ( distance >= 0 )
++ if ( distance >= 0 )
+ {
+- val = distance + compensation + 16;
++ val = distance + compensation + 16 / resolution ;
+ if ( distance && val > 0 )
+- val &= ~31;
++ val &= ~(32 / resolution - 1);
+ else
+ val = 0;
+ }
+ else
+ {
+- val = -FT_PAD_ROUND( compensation - distance, 32 );
++
++ val = -FT_PAD_ROUND( compensation - distance, 32 / resolution );
+ if ( val > 0 )
+ val = 0;
+ }
+@@ -2262,7 +2292,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_Super( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2310,7 +2341,8 @@
+ /* */
+ static FT_F26Dot6
+ Round_Super_45( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation )
++ FT_F26Dot6 compensation,
++ FT_Int resolution )
+ {
+ FT_F26Dot6 val;
+
+@@ -2401,7 +2433,8 @@
+ /* */
+ static void
+ SetSuperRound( EXEC_OP_ FT_F26Dot6 GridPeriod,
+- FT_Long selector )
++ FT_Long selector,
++ FT_Int resolution )
+ {
+ switch ( (FT_Int)( selector & 0xC0 ) )
+ {
+@@ -3061,13 +3094,13 @@
+
+
+ #define DO_SROUND \
+- SET_SuperRound( 0x4000, args[0] ); \
++ SET_SuperRound( 0x4000, args[0], 1 ); \
+ CUR.GS.round_state = TT_Round_Super; \
+ CUR.func_round = (TT_Round_Func)Round_Super;
+
+
+ #define DO_S45ROUND \
+- SET_SuperRound( 0x2D41, args[0] ); \
++ SET_SuperRound( 0x2D41, args[0], 1 ); \
+ CUR.GS.round_state = TT_Round_Super_45; \
+ CUR.func_round = (TT_Round_Func)Round_Super_45;
+
+@@ -3228,11 +3261,11 @@
+
+
+ #define DO_ODD \
+- args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 64 );
++ args[0] = ( ( CUR_Func_round( args[0], 0, 1 ) & 127 ) == 64 );
+
+
+ #define DO_EVEN \
+- args[0] = ( ( CUR_Func_round( args[0], 0 ) & 127 ) == 0 );
++ args[0] = ( ( CUR_Func_round( args[0], 0, 1 ) & 127 ) == 0 );
+
+
+ #define DO_AND \
+@@ -3281,7 +3314,31 @@
+ #define DO_CEILING \
+ args[0] = FT_PIX_CEIL( args[0] );
+
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++#define DO_RS \
++ { \
++ FT_ULong I = (FT_ULong)args[0]; \
++ \
++ \
++ if ( BOUNDSL( I, CUR.storeSize ) ) \
++ { \
++ if ( CUR.pedantic_hinting ) \
++ { \
++ ARRAY_BOUND_ERROR; \
++ } \
++ else \
++ args[0] = 0; \
++ } \
++ else \
++ /* Subpixel Hinting - Avoid Typeman Dstroke and Istroke \
++ * and Vacuform Rounds */ \
++ if ( CUR.enhanced \
++ && ( I == 24 || I == 22 || I == 8 ) \
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_DO_RS ) ) \
++ args[0] = 0; \
++ else args[0] = CUR.storage[I]; \
++ }
++#else
+ #define DO_RS \
+ { \
+ FT_ULong I = (FT_ULong)args[0]; \
+@@ -3299,6 +3356,7 @@
+ else \
+ args[0] = CUR.storage[I]; \
+ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+ #define DO_WS \
+@@ -3378,12 +3436,12 @@
+ #define DO_ROUND \
+ args[0] = CUR_Func_round( \
+ args[0], \
+- CUR.tt_metrics.compensations[CUR.opcode - 0x68] );
++ CUR.tt_metrics.compensations[CUR.opcode - 0x68], 1 );
+
+
+ #define DO_NROUND \
+ args[0] = ROUND_None( args[0], \
+- CUR.tt_metrics.compensations[CUR.opcode - 0x6C] );
++ CUR.tt_metrics.compensations[CUR.opcode - 0x6C], 1 );
+
+
+ #define DO_MAX \
+@@ -4554,7 +4612,21 @@
+ FT_ULong n;
+ TT_DefRecord* rec;
+ TT_DefRecord* limit;
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ int opcode_pattern[4][12]= {
++ /* VacuFormRound function */
++ {0x45,0x23,0x46,0x60,0x20},
++ /* inline delta function 1 */
++ {0x4B,0x53,0x23,0x4B,0x51,0x5A,0x58,0x38,0x1B,0x21,0x21,0x59},
++ /* inline delta function 2 */
++ {0x4B,0x54,0x58,0x38,0x1B,0x5A,0x21,0x21,0x59},
++ /* diagonal stroke function */
++ {0x20,0x20,0x40,0x60,0x47,0x40,0x23,0x42},
++ };
++ int opcode_patterns = 4;
++ int i;
++ int opcode_pointer[4] = {0,0,0,0} ;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ /* some font programs are broken enough to redefine functions! */
+ /* We will then parse the current table. */
+@@ -4592,6 +4664,7 @@
+ rec->opc = (FT_UInt16)n;
+ rec->start = CUR.IP + 1;
+ rec->active = TRUE;
++ rec->inline = FALSE;
+
+ if ( n > CUR.maxFunc )
+ CUR.maxFunc = (FT_UInt16)n;
+@@ -4601,20 +4674,63 @@
+
+ while ( SKIP_Code() == SUCCESS )
+ {
++ /*printf ("%d ", CUR.opcode);*/
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ for ( i = 0; i < opcode_patterns; i++ ){
++ if ( CUR.opcode == opcode_pattern[i][opcode_pointer[i]] )
++ {
++ /*printf ("function %d, opcode ptrn: %d op# %d: %d FOUND -------------\n ", n, i, opcode_pointer[i], CUR.opcode);*/
++ opcode_pointer[i] += 1;
++
++ if (i == 0 && opcode_pointer[0] == 5){
++ /*inline_delta_funcs[CUR.num_delta_funcs] = n;
++ CUR.num_delta_funcs++;*/
++ /*printf ("Vacuform Round FUNCTION %d detected \n ", n);*/
++ if (CUR.enhanced) /*rec->active = FALSE;*/
++ opcode_pointer[i] = 0;
++ }
++ if (i == 1 && opcode_pointer[1] == 12){
++ /*rec->active = FALSE;*/
++ /*CUR.inline_delta_funcs[CUR.num_delta_funcs] = n;
++ CUR.num_delta_funcs++;*/
++ rec->inline = TRUE;
++ /*printf ("inline delta FUNCTION1 %d detected \n ", n, CUR.num_delta_funcs);*/
++ opcode_pointer[i] = 0;
++ }
++ if (i == 2 && opcode_pointer[1] == 9){
++ /* CUR.inline_delta_funcs[CUR.num_delta_funcs] = n;
++ CUR.num_delta_funcs++;*/
++ rec->inline = TRUE;
++ /*printf ("inline delta2 FUNCTION2 %d detected \n ", n, CUR.num_delta_funcs);*/
++ opcode_pointer[i] = 0;
++ }
++ if (i == 4 && opcode_pointer[1] == 8){
++ /* CUR.inline_delta_funcs[CUR.num_delta_funcs] = n;
++ CUR.num_delta_funcs++;*/
++ /*rec->inline = TRUE;*/
++ /*printf ("diagonal stroke function %d detected \n ", n, CUR.num_delta_funcs);*/
++ opcode_pointer[i] = 0;
++ }
++ }
++ else {
++ opcode_pointer[i]=0;
++ }
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ switch ( CUR.opcode )
+ {
+- case 0x89: /* IDEF */
+- case 0x2C: /* FDEF */
+- CUR.error = TT_Err_Nested_DEFS;
+- return;
++ case 0x89: /* IDEF */
++ case 0x2C: /* FDEF */
++ CUR.error = TT_Err_Nested_DEFS;
++ return;
+
+- case 0x2D: /* ENDF */
+- return;
++ case 0x2D: /* ENDF */
++ return;
+ }
+ }
+ }
+
+-
+ /*************************************************************************/
+ /* */
+ /* ENDF[]: END Function definition */
+@@ -4643,6 +4759,13 @@
+
+ CUR.step_ins = FALSE;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* CUR.enhanced may be turned off prior to function calls. This
++ * ensures it is turned back on.
++ */
++ CUR.enhanced = ( CUR.subpixel_hinting || CUR.grayscale_hinting );
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
++
+ if ( pRec->Cur_Count > 0 )
+ {
+ CUR.callTop++;
+@@ -4675,8 +4798,9 @@
+ FT_ULong F;
+ TT_CallRec* pCrec;
+ TT_DefRecord* def;
+-
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Bool oldF;
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+ /* first of all, check the index */
+
+ F = args[0];
+@@ -4713,6 +4837,17 @@
+ if ( !def->active )
+ goto Fail;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* This is test code used to detect inline delta functions */
++ oldF = def->inline;
++ if (CUR.enhanced)
++ {
++ if ( def->inline ) { CUR.infunc = TRUE; }
++ }
++
++ /* if ( F == 35 || F == 34 ){ CUR.enhanced = 0; printf ("ENTERING %d ", F); }*/
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
++
+ /* check the call stack */
+ if ( CUR.callTop >= CUR.callSize )
+ {
+@@ -4733,6 +4868,12 @@
+ def->start );
+
+ CUR.step_ins = FALSE;
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ {
++ CUR.infunc = oldF; /*printf ("Leaving %d ", F);*/
++ }
++ /*if ( F == 35 || F == 34 ){ CUR.enhanced = 1; printf ("Leaving %d ", F); }*/
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+ return;
+
+ Fail:
+@@ -4752,7 +4893,9 @@
+ FT_ULong F;
+ TT_CallRec* pCrec;
+ TT_DefRecord* def;
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Bool oldF;
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+
+ /* first of all, check the index */
+ F = args[1];
+@@ -4788,7 +4931,16 @@
+ /* check that the function is active */
+ if ( !def->active )
+ goto Fail;
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ oldF=def->inline;
++ if (CUR.enhanced)
++ {
++ if ( def->inline )
++ {
++ CUR.infunc = TRUE;
++ }
++ }
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+ /* check stack */
+ if ( CUR.callTop >= CUR.callSize )
+ {
+@@ -4811,6 +4963,11 @@
+
+ CUR.step_ins = FALSE;
+ }
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ {
++ CUR.infunc = oldF;
++ }
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+ return;
+
+ Fail:
+@@ -5154,6 +5311,10 @@
+ }
+ }
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* Disable Type 2 Vacuform Rounds - e.g. Arial Narrow */
++ if ( CUR.enhanced && FT_ABS(D) == 64) D += 1;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ args[0] = D;
+ }
+
+@@ -5634,13 +5795,21 @@
+ }
+ #endif
+
+- if ( CUR.GS.freeVector.x != 0 )
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( !CUR.enhanced
++ || ( CUR.enhanced
++ && ( CUR.sph_tweak_flags & SPH_TWEAK_ALLOW_MOVEZP2_FREEV ) ))
+ {
+- CUR.zp2.cur[point].x += dx;
+- if ( touch )
+- CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++ if ( CUR.GS.freeVector.x != 0 )
++ {
++ CUR.zp2.cur[point].x += dx;
++ if ( touch )
++ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
++ }
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ }
+-
++#endif
+ if ( CUR.GS.freeVector.y != 0 )
+ {
+ CUR.zp2.cur[point].y += dy;
+@@ -5649,7 +5818,6 @@
+ }
+ }
+
+-
+ /*************************************************************************/
+ /* */
+ /* SHP[a]: SHift Point by the last point */
+@@ -5819,7 +5987,7 @@
+ {
+ FT_F26Dot6 dx, dy;
+ FT_UShort point;
+-
++ FT_Int B1, B2;
+
+ if ( CUR.top < CUR.GS.loop + 1 )
+ {
+@@ -5863,11 +6031,64 @@
+ }
+ }
+ else
+- MOVE_Zp2_Point( point, dx, dy, TRUE );
++ {
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* The conditionals here still to not do a perfect job and need work.
++ *
++ * If not using enhanced rendering, allow ZP2 move.
++ *
++ * If using enhanced rendering, allow ZP2 point move if:
++ * - The glyph is composite
++ * - The glyph is specifically set to allow SHPIX moves
++ * - The move is in the Y direction on a previously touched point
++ *
++ * It seems that what qualifies as a previously touched point varies
++ * somewhat from font to font. Some render better when either X or Y
++ * must be touched ( SPH_TWEAK_SHPIX_CLASS_A ) and some render better
++ * when both must be touched.
++ */
++
++ if ( CUR.enhanced )
++ {
++ B1 = CUR.zp2.cur[point].y;
++ if ( CUR.is_composite
++ || ( CUR.sph_tweak_flags & SPH_TWEAK_DO_SHPIX )
++ || ( /*CUR.infunc && !(CUR.sph_tweak_flags
++ & SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES) &&*/ /*CUR.infunc &&*/
++ CUR.GS.freeVector.y != 0
++ && CUR.iup_called == 0
++ && CUR.iupy_called == 0
++ && (
++ ( (CUR.sph_tweak_flags & SPH_TWEAK_SHPIX_CLASS_A )
++ && (( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_X ) != 0
++ || ( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_Y ) != 0 ))
++ || ( !(CUR.sph_tweak_flags & SPH_TWEAK_SHPIX_CLASS_A )
++ && (( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_X ) != 0
++ && ( CUR.pts.tags[point] & FT_CURVE_TAG_TOUCH_Y ) != 0 ))
++ )
++ /*|| !CUR.infunc*/ ) )
++ MOVE_Zp2_Point( point, dx, dy, TRUE );
++
++ B2 = CUR.zp2.cur[point].y;
++
++ /* Reverse moves that move the point off a pixel boundary */
++ if ((CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES)
++ && B1 % 64 == 0
++ && B2 % 64 != 0 )
++ {
++ /*printf ("Reversing ZP2 move ");*/
++ MOVE_Zp2_Point( point, -dx, -dy, TRUE );
++ }
++ }
++ else
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++ MOVE_Zp2_Point( point, dx, dy, TRUE );
++
++ }
+
+ CUR.GS.loop--;
+ }
+-
++ /*printf("SHPIX:%d ", CUR.infunc);*/
+ CUR.GS.loop = 1;
+ CUR.new_top = CUR.args;
+ }
+@@ -5884,7 +6105,17 @@
+ {
+ FT_UShort point;
+ FT_F26Dot6 distance;
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Int resolution = 1;
+
++ if ( CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0 )
++ resolution = Grids_Per_Pixel_X;
++ else if ( CUR.GS.freeVector.y != 0 )
++ resolution = Grids_Per_Pixel_Y;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ point = (FT_UShort)args[0];
+
+@@ -5908,6 +6139,15 @@
+ distance = CUR_Func_project( CUR.zp1.cur + point,
+ CUR.zp0.cur + CUR.GS.rp0 );
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* Subpixel Hinting - make MSIRP respect CVT cutin */
++ /* Fixes "k" issue with Arial */
++ if ( CUR.enhanced && CUR.GS.freeVector.x != 0
++ && FT_ABS( distance - args[1])
++ >= CUR.GS.control_value_cutin / resolution )
++ distance = args[1];
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ CUR_Func_move( &CUR.zp1, point, args[1] - distance );
+
+ CUR.GS.rp1 = CUR.GS.rp0;
+@@ -5930,7 +6170,19 @@
+ FT_UShort point;
+ FT_F26Dot6 cur_dist,
+ distance;
++ FT_Int resolution = 1;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MDAP ))
++ resolution = Grids_Per_Pixel_X;
++ else if ( CUR.GS.freeVector.y != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MDAP ))
++ resolution = Grids_Per_Pixel_Y;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ point = (FT_UShort)args[0];
+
+@@ -5946,8 +6198,8 @@
+ if ( ( CUR.opcode & 1 ) != 0 )
+ {
+ cur_dist = CUR_fast_project( &CUR.zp0.cur[point] );
+- distance = CUR_Func_round( cur_dist,
+- CUR.tt_metrics.compensations[0] ) - cur_dist;
++ distance = CUR_Func_round( cur_dist,
++ CUR.tt_metrics.compensations[0], resolution ) - cur_dist;
+ }
+ else
+ distance = 0;
+@@ -5972,7 +6224,19 @@
+ FT_UShort point;
+ FT_F26Dot6 distance,
+ org_dist;
++ FT_Int resolution = 1;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MIAP ))
++ resolution = Grids_Per_Pixel_X;
++ else if ( CUR.GS.freeVector.y != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MIAP ))
++ resolution = Grids_Per_Pixel_Y;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ cvtEntry = (FT_ULong)args[1];
+ point = (FT_UShort)args[0];
+@@ -6020,10 +6284,13 @@
+
+ if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */
+ {
+- if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
+- distance = org_dist;
+-
+- distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
++ {
++ if ( FT_ABS( distance - org_dist )
++ > CUR.GS.control_value_cutin / resolution )
++ distance = org_dist;
++ distance = CUR_Func_round( distance,
++ CUR.tt_metrics.compensations[0], resolution );
++ }
+ }
+
+ CUR_Func_move( &CUR.zp0, point, distance - org_dist );
+@@ -6044,6 +6311,24 @@
+ {
+ FT_UShort point;
+ FT_F26Dot6 org_dist, distance;
++ FT_Int minimum_distance_factor = 64;
++ FT_Int resolution = 1;
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MDRP ))
++ {
++ resolution = Grids_Per_Pixel_X;
++ minimum_distance_factor = 64 - resolution / 3;
++ }
++ else if ( CUR.GS.freeVector.y != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MDRP ))
++ resolution = Grids_Per_Pixel_Y;
++
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+
+ point = (FT_UShort)args[0];
+@@ -6107,13 +6392,15 @@
+ /* round flag */
+
+ if ( ( CUR.opcode & 4 ) != 0 )
++ {
+ distance = CUR_Func_round(
+ org_dist,
+- CUR.tt_metrics.compensations[CUR.opcode & 3] );
++ CUR.tt_metrics.compensations[CUR.opcode & 3], resolution );
++ }
+ else
+ distance = ROUND_None(
+ org_dist,
+- CUR.tt_metrics.compensations[CUR.opcode & 3] );
++ CUR.tt_metrics.compensations[CUR.opcode & 3], resolution );
+
+ /* minimum distance flag */
+
+@@ -6121,13 +6408,17 @@
+ {
+ if ( org_dist >= 0 )
+ {
+- if ( distance < CUR.GS.minimum_distance )
+- distance = CUR.GS.minimum_distance;
++ if ( distance < FT_MulDiv(minimum_distance_factor,
++ CUR.GS.minimum_distance, 64) )
++ distance = FT_MulDiv(minimum_distance_factor,
++ CUR.GS.minimum_distance, 64);
+ }
+ else
+ {
+- if ( distance > -CUR.GS.minimum_distance )
+- distance = -CUR.GS.minimum_distance;
++ if ( distance > -FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 ) )
++ distance = -FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 );
+ }
+ }
+
+@@ -6163,10 +6454,30 @@
+ cur_dist,
+ org_dist;
+
++ FT_Int minimum_distance_factor = 64;
++ FT_Int B1, B2, resolution = 1;
+
+ point = (FT_UShort)args[0];
+ cvtEntry = (FT_ULong)( args[1] + 1 );
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MIRP ))
++ {
++ resolution = Grids_Per_Pixel_X;
++ /* High value emboldens glyphs at lower ppems ( < 14 ) */
++ /* Courier looks better with 52 */
++ /* MS Cleartype Rasterizer supposedly uses 32 */
++ minimum_distance_factor = 64 - resolution / 3;
++ }
++ else if ( CUR.GS.freeVector.y != 0
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_NORMAL_ROUND_MIRP ))
++ resolution = Grids_Per_Pixel_Y;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */
+
+ if ( BOUNDS( point, CUR.zp1.n_points ) ||
+@@ -6230,36 +6541,55 @@
+ /* refer to the same zone. */
+
+ if ( CUR.GS.gep0 == CUR.GS.gep1 )
+- if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
++ if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin / resolution )
+ cvt_dist = org_dist;
+
+ distance = CUR_Func_round(
+ cvt_dist,
+- CUR.tt_metrics.compensations[CUR.opcode & 3] );
++ CUR.tt_metrics.compensations[CUR.opcode & 3], resolution );
+ }
+ else
+ distance = ROUND_None(
+ cvt_dist,
+- CUR.tt_metrics.compensations[CUR.opcode & 3] );
++ CUR.tt_metrics.compensations[CUR.opcode & 3], resolution );
+
+ /* minimum distance test */
+-
+ if ( ( CUR.opcode & 8 ) != 0 )
+ {
+ if ( org_dist >= 0 )
+ {
+- if ( distance < CUR.GS.minimum_distance )
+- distance = CUR.GS.minimum_distance;
++ if ( distance < FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 ) )
++ distance = FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 );
+ }
+ else
+ {
+- if ( distance > -CUR.GS.minimum_distance )
+- distance = -CUR.GS.minimum_distance;
++ if ( distance > -FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 ) )
++ distance = -FT_MulDiv( minimum_distance_factor,
++ CUR.GS.minimum_distance, 64 );
+ }
+ }
+
++ B1 = CUR.zp1.cur[point].y;
++
+ CUR_Func_move( &CUR.zp1, point, distance - cur_dist );
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced && CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES)
++ {
++ B2 = CUR.zp1.cur[point].y;
++
++ if ( ( CUR.GS.freeVector.x != 0 && B1 % 64 == 0 && B2 % 64 != 0 )
++ || ( CUR.GS.freeVector.y != 0 && B2 % 64 != 0 ) )
++ {
++ /* reverse the MIRP move. Ideally this could be implemented better */
++ CUR_Func_move( &CUR.zp1, point, -(distance - cur_dist) );
++ }
++ }
++#endif /*TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
++
+ CUR.GS.rp1 = CUR.GS.rp0;
+
+ if ( ( CUR.opcode & 16 ) != 0 )
+@@ -6751,6 +7081,14 @@
+ contour = 0;
+ point = 0;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced )
++ {
++ CUR.iup_called = 1;
++ if ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_IUP ) return;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ do
+ {
+ end_point = CUR.pts.contours[contour] - CUR.pts.first_point;
+@@ -6820,7 +7158,19 @@
+ FT_UShort A;
+ FT_ULong C;
+ FT_Long B;
+-
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ FT_Byte orig_round_state;
++ FT_Int resolution = 1;
++ FT_UShort B1, B2;
++
++ if (CUR.enhanced )
++ {
++ if ( CUR.GS.freeVector.x != 0 )
++ resolution = Grids_Per_Pixel_X;
++ else if ( CUR.GS.freeVector.y != 0 )
++ resolution = Grids_Per_Pixel_Y;
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ #ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ /* Delta hinting is covered by US Patent 5159668. */
+@@ -6889,8 +7239,81 @@
+ if ( B >= 0 )
+ B++;
+ B = B * 64 / ( 1L << CUR.GS.delta_shift );
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS
++ /* Undocumented hack that will round the point prior to or instead
++ * of the delta move. Fixes glitches in various fonts due to bad
++ * y-hinting routines.
++ */
++ if ( CUR.enhanced && CUR.GS.freeVector.y != 0 )
++ {
++ orig_round_state= CUR.GS.round_state;
++
++ if ( CUR.sph_tweak_flags & SPH_TWEAK_DELTAP_RDTG )
++ {
++ COMPUTE_Round( TT_Round_Down_To_Grid );
++ B = CUR_Func_round( B, CUR.tt_metrics.compensations[0], 1 );
++ }
++
++ else if ( CUR.sph_tweak_flags & SPH_TWEAK_DELTAP_RUTG )
++ {
++ COMPUTE_Round( TT_Round_Up_To_Grid );
++ B = CUR_Func_round( B, CUR.tt_metrics.compensations[0], 1 );
++ }
++
++ else if ( CUR.sph_tweak_flags & SPH_TWEAK_DELTAP_RTG )
++ {
++ COMPUTE_Round( TT_Round_To_Grid );
++ B = CUR_Func_round( B, CUR.tt_metrics.compensations[0], 1 );
++ }
++
++ COMPUTE_Round( orig_round_state );
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++
++ /* Allow delta move if:
++ * - Not using enhanced rendering
++ * - Glyph is specifically set to allow it
++ * - Glyph is composite
++ */
++ if ( !CUR.enhanced
++ || CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_DO_DELTAP
++ || CUR.is_composite )
++ CUR_Func_move( &CUR.zp0, A, B );
+
++ else if ( !( CUR.sph_tweak_flags & SPH_TWEAK_ALWAYS_SKIP_DELTAP ) )
++ {
++ /* Save the y value of the point now. Compare after move */
++ B1 = CUR.zp0.cur[A].y;
++
++ /* Allow delta move if using enhanced rendering, IUP has not
++ * been called, and point is touched on X or Y.
++ *
++ * Working code, but needs more features.
++ */
++ if ( CUR.enhanced && CUR.GS.freeVector.y != 0
++ && CUR.iup_called == 0 && CUR.iupy_called == 0
++ && ( ( CUR.pts.tags[A] & FT_CURVE_TAG_TOUCH_X ) != 0
++ || ( CUR.pts.tags[A] & FT_CURVE_TAG_TOUCH_Y ) != 0 ) )
++ /* Should resolution always be 1 for this move ??? */
++ CUR_Func_move( &CUR.zp0, A, B );
++
++ B2 = CUR.zp0.cur[A].y;
++
++ /* Reverse this move if it results in a move off a pixel
++ * boundary.
++ */
++ if ( ( CUR.sph_tweak_flags & SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES )
++ && B1 % 64 == 0
++ && B2 % 64 != 0 )
++ {
++ CUR_Func_move( &CUR.zp0, A, -B );
++ }
++
++ }
++#else
+ CUR_Func_move( &CUR.zp0, A, B );
++#endif /* *TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+ }
+ }
+ else
+@@ -7015,22 +7438,100 @@
+
+ K = 0;
+
+- /* We return MS rasterizer version 1.7 for the font scaler. */
+- if ( ( args[0] & 1 ) != 0 )
+- K = 35;
+-
+- /* Has the glyph been rotated? */
++ /********************************/
++ /* RASTERIZER VERSION */
++ /* Selector Bit: 0 */
++ /* Return Bit(s): 0-7 */
++ /* */
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( ( args[0] & 1 ) != 0
++ && CUR.enhanced
++ && !( CUR.sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 ) ){
++ K = CUR.rasterizer_version; /*printf (" SETTING AS 37 \n" );*/ }
++ else
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++ if ( ( args[0] & 1 ) != 0 ){
++ K = 35; /*printf (" SETTING AS 35 \n" );*/
++ }
++ /********************************/
++ /* GLYPH ROTATED */
++ /* Selector Bit: 1 */
++ /* Return Bit(s): 8 */
++ /* */
+ if ( ( args[0] & 2 ) != 0 && CUR.tt_metrics.rotated )
+- K |= 0x80;
++ K |= 1 << 8;
+
+- /* Has the glyph been stretched? */
++ /********************************/
++ /* GLYPH STRETCHED */
++ /* Selector Bit: 2 */
++ /* Return Bit(s): 9 */
++ /* */
+ if ( ( args[0] & 4 ) != 0 && CUR.tt_metrics.stretched )
+- K |= 1 << 8;
++ /*K |= 1 << 8; Original value appears to be incorrect?? */
++ K |= 1 << 9;
+
+- /* Are we hinting for grayscale? */
++ /********************************/
++ /* HINTING FOR GRAYSCALE */
++ /* Selector Bit: 5 */
++ /* Return Bit(s): 12 */
++ /* */
+ if ( ( args[0] & 32 ) != 0 && CUR.grayscale )
+ K |= 1 << 12;
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ if ( CUR.enhanced && !( CUR.sph_tweak_flags & SPH_TWEAK_RASTERIZER_35 ) )
++ {
++ /********************************/
++ /* HINTING FOR GRAYSCALE */
++ /* Selector Bit: 5 */
++ /* Return Bit(s): 12 */
++ /* */
++ if ( ( args[0] & 32 ) != 0 && CUR.grayscale_hinting )
++ K |= 1 << 12;
++
++ /********************************/
++ /* HINTING FOR SUBPIXEL */
++ /* Selector Bit: 6 */
++ /* Return Bit(s): 13 */
++ /* */
++ if ( ( args[0] & 64 ) != 0 && CUR.subpixel_hinting )
++ {
++ K |= 1 << 13;
++
++ /* The below are irrelevant if subpixel_hinting is not set */
++
++ /********************************/
++ /* COMPATIBLE WIDTHS ENABLED */
++ /* Selector Bit: 7 */
++ /* Return Bit(s): 14 */
++ /* */
++ /* Functionality still needs to be added */
++ if ( ( args[0] & 128 ) != 0 && CUR.compatible_widths )
++ {
++ K |= 1 << 14;
++ }
++
++ /********************************/
++ /* SYMMETRICAL SMOOTHING */
++ /* Selector Bit: 8 */
++ /* Return Bit(s): 15 */
++ /* */
++ /* Functionality still needs to be added */
++ if ( ( args[0] & 256 ) != 0 && CUR.symmetrical_smoothing )
++ K |= 1 << 15;
++
++ /********************************/
++ /* HINTING FOR BGR? */
++ /* Selector Bit: 9 */
++ /* Return Bit(s): 16 */
++ /* */
++ /* Functionality still needs to be added */
++ if ( ( args[0] & 512 ) != 0 && CUR.bgr )
++ K |= 1 << 16;
++ }
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ args[0] = K;
+ }
+
+@@ -7405,6 +7906,14 @@
+ cur = *exc;
+ #endif
+
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /* Ensure some variables are set for this run */
++ CUR.iup_called = FALSE;
++ CUR.iupy_called = FALSE;
++ CUR.infunc = FALSE;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
+ /* set CVT functions */
+ CUR.tt_metrics.ratio = 0;
+ if ( CUR.metrics.x_ppem != CUR.metrics.y_ppem )
+@@ -7683,8 +8192,16 @@
+
+
+ case 0x30: /* IUP */
++ Ins_IUP( EXEC_ARG_ args );
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ CUR.iup_called = TRUE;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++ break;
+ case 0x31: /* IUP */
+ Ins_IUP( EXEC_ARG_ args );
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ CUR.iupy_called = TRUE;
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING*/
+ break;
+
+ case 0x32: /* SHP */
+diff -Nur freetype-2.4.3.orig/src/truetype/ttinterp.h freetype-2.4.3.new/src/truetype/ttinterp.h
+--- freetype-2.4.3.orig/src/truetype/ttinterp.h 2010-08-05 16:56:05.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/ttinterp.h 2010-10-23 14:00:05.553373908 -0500
+@@ -68,7 +68,8 @@
+ /* Rounding function */
+ typedef FT_F26Dot6
+ (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6 distance,
+- FT_F26Dot6 compensation );
++ FT_F26Dot6 compensation,
++ FT_Int resolution );
+
+ /* Point displacement along the freedom vector routine */
+ typedef void
+@@ -106,6 +107,24 @@
+ } TT_CallRec, *TT_CallStack;
+
+
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /*************************************************************************/
++ /* */
++ /* This structure defines a rule used to tweak subpixel hinting for */
++ /* various fonts. "", 0, "", NULL value indicates to match any value. */
++ /* */
++
++ typedef struct SPH_TweakRule_
++ {
++ const char family[32];
++ const int ppem;
++ const char style[32];
++ const char glyph;
++ } SPH_TweakRule;
++
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
++
+ /*************************************************************************/
+ /* */
+ /* The main structure for the interpreter which collects all necessary */
+@@ -215,7 +234,32 @@
+ TT_Set_CVT_Func func_write_cvt; /* write a cvt entry (in pixels) */
+ TT_Set_CVT_Func func_move_cvt; /* incr a cvt entry (in pixels) */
+
+- FT_Bool grayscale; /* are we hinting for grayscale? */
++ FT_Bool grayscale; /* are we hinting for grayscale? */
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ TT_Round_Func func_round_sphn; /* subpixel rounding fuction */
++
++ FT_Bool grayscale_hinting; /* are we hinting for subpixel? */
++ FT_Bool subpixel_hinting; /* are we hinting for subpixel? */
++ FT_Bool enhanced; /* are we using enhanced rendering? */
++ /* ( grayscale_hinting || subpixel_hinting ) */
++ FT_Bool native_hinting; /* do native hinting when true */
++ /* the following 3 are unimplemented but here for future reference */
++
++ FT_Bool compatible_widths; /* are we using compatible widths?*/
++ FT_Bool symmetrical_smoothing; /* symmetrical_smoothing? */
++ FT_Bool bgr; /* are we using bgr, not rgb? */
++ FT_Int rasterizer_version;/* return ms rasterizer version */
++
++ FT_Bool iup_called; /* IUP[x] been called for glyph? */
++ FT_Bool iupy_called; /* IUP[y] been called for glyph? */
++ FT_Bool infunc; /* inside an inline delta func? */
++
++ FT_ULong sph_tweak_flags; /* flags to control hint tweaks */
++
++ FT_Int num_delta_funcs;
++ FT_ULong inline_delta_funcs[5];
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+
+ } TT_ExecContextRec;
+
+diff -Nur freetype-2.4.3.orig/src/truetype/ttobjs.h freetype-2.4.3.new/src/truetype/ttobjs.h
+--- freetype-2.4.3.orig/src/truetype/ttobjs.h 2009-07-03 08:28:24.000000000 -0500
++++ freetype-2.4.3.new/src/truetype/ttobjs.h 2010-10-22 19:25:46.075900111 -0500
+@@ -177,6 +177,7 @@
+ FT_Long start; /* where does it start? */
+ FT_UInt opc; /* function #, or instruction code */
+ FT_Bool active; /* is it active? */
++ FT_Bool inline; /* function that defines inline delta */
+
+ } TT_DefRecord, *TT_DefArray;
+
+diff -Nur freetype-2.4.3.orig/src/truetype/ttsubpixel.c freetype-2.4.3.new/src/truetype/ttsubpixel.c
+--- freetype-2.4.3.orig/src/truetype/ttsubpixel.c 1969-12-31 18:00:00.000000000 -0600
++++ freetype-2.4.3.new/src/truetype/ttsubpixel.c 2010-11-14 09:25:59.206993605 -0600
+@@ -0,0 +1,171 @@
++/***************************************************************************/
++/* */
++/* ttsubpixel.c */
++/* */
++/* TrueType Subpixel Hinting. */
++/* */
++/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
++/* 2010 by */
++/* David Turner, Robert Wilhelm, and Werner Lemberg. */
++/* */
++/* This file is part of the FreeType project, and may only be used, */
++/* modified, and distributed under the terms of the FreeType project */
++/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
++/* this file you indicate that you have read the license and */
++/* understand and accept it fully. */
++/* */
++/***************************************************************************/
++
++#include <ft2build.h>
++#include FT_INTERNAL_DEBUG_H
++#include FT_INTERNAL_CALC_H
++#include FT_INTERNAL_STREAM_H
++#include FT_INTERNAL_SFNT_H
++#include FT_TRUETYPE_TAGS_H
++#include FT_OUTLINE_H
++
++#include "ttsubpixel.h"
++
++
++ /*************************************************************************/
++ /* */
++ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
++ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
++ /* messages during execution. */
++ /* */
++#undef FT_COMPONENT
++#define FT_COMPONENT trace_ttgload
++
++
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS
++ static FT_Bool
++ sph_test_tweak ( TT_Face face,
++ FT_String* family,
++ int ppem,
++ FT_String* style,
++ FT_UInt glyph_index,
++ SPH_TweakRule* rule,
++ int num_rules )
++ {
++ FT_UInt i;
++
++ /* rule checks may be able to be optimized further */
++ for ( i = 0; i < num_rules; i++ )
++ {
++ if ( family && ( strcmp( rule[i].family, "" ) == 0
++ || strcmp ( rule[i].family, family ) == 0 ) )
++ if ( rule[i].ppem == 0
++ || (rule[i].ppem == ppem) )
++ if ( ( style && strcmp ( rule[i].style, "" ) == 0 )
++ || strcmp ( rule[i].style, style ) == 0 )
++ if ( rule[i].glyph == 0
++ || FT_Get_Char_Index( (FT_Face)face, rule[i].glyph )
++ == glyph_index )
++ {
++ /* printf ("%s,%d,%s,%c ", family, ppem, style, rule[i].glyph); */
++ return TRUE;
++ }
++ }
++ return FALSE;
++ }
++
++ static void
++ sph_set_tweaks( TT_Loader loader,
++ FT_UInt glyph_index )
++ {
++ TT_Face face = (TT_Face)loader->face;
++ FT_String* family = face->root.family_name;
++ int ppem = loader->size->metrics.x_ppem;
++ FT_String* style = face->root.style_name;
++
++ /* loader->exec->sph_tweak_flags = 0x0000; */
++
++ /*printf ("%s,%d,%s,%c ", family, ppem, style, glyph_index); */
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ NORMAL_ROUND_MIRP_Rules, NORMAL_ROUND_MIRP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_NORMAL_ROUND_MIRP;
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ NORMAL_ROUND_MDRP_Rules, NORMAL_ROUND_MDRP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_NORMAL_ROUND_MDRP;
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ NORMAL_ROUND_MDAP_Rules, NORMAL_ROUND_MDAP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_NORMAL_ROUND_MDAP;
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ NORMAL_ROUND_MIAP_Rules, NORMAL_ROUND_MIAP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_NORMAL_ROUND_MIAP;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ SKIP_IUP_Rules, SKIP_IUP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_SKIP_IUP;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALWAYS_SKIP_DELTAP_Rules, ALWAYS_SKIP_DELTAP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_ALWAYS_SKIP_DELTAP;
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALWAYS_DO_DELTAP_Rules, ALWAYS_DO_DELTAP_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_ALWAYS_DO_DELTAP;
++ else if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ DELTAP_RTG_Rules, DELTAP_RTG_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_DELTAP_RTG;
++ else if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ DELTAP_RUTG_Rules, DELTAP_RUTG_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_DELTAP_RUTG;
++ else if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ DELTAP_RDTG_Rules, DELTAP_RDTG_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_DELTAP_RDTG;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_DMOVEX_FREEV_Rules, ALLOW_DMOVEX_FREEV_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_ALLOW_DMOVEX_FREEV;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_DMOVE_FREEV_Rules, ALLOW_DMOVE_FREEV_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_ALLOW_DMOVE_FREEV;
++
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_DMOVEX_FREEV_Rules_Exceptions, ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE ) )
++ loader->exec->sph_tweak_flags &= ~SPH_TWEAK_ALLOW_DMOVEX_FREEV;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_DMOVE_FREEV_Rules_Exceptions, ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE ) )
++ loader->exec->sph_tweak_flags &= ~SPH_TWEAK_ALLOW_DMOVE_FREEV;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ RASTERIZER_35_Rules, RASTERIZER_35_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_RASTERIZER_35;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_MOVEZP2_FREEV_Rules, ALLOW_MOVEZP2_FREEV_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_ALLOW_MOVEZP2_FREEV;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ ALLOW_MOVEZP2_FREEV_Rules_Exceptions, ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE ) )
++ loader->exec->sph_tweak_flags &= ~SPH_TWEAK_ALLOW_MOVEZP2_FREEV;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ DO_RS_Rules, DO_RS_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_DO_RS;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ DO_SHPIX_Rules, DO_SHPIX_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_DO_SHPIX;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ SKIP_NONPIXEL_INLINE_MOVES_Rules, SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ SHPIX_CLASS_A_Rules, SHPIX_CLASS_A_RULES_SIZE ) )
++ loader->exec->sph_tweak_flags |= SPH_TWEAK_SHPIX_CLASS_A;
++
++ if ( sph_test_tweak( face, family, ppem, style, glyph_index,
++ SHPIX_CLASS_A_Rules_Exceptions, SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE ) )
++ loader->exec->sph_tweak_flags &= ~SPH_TWEAK_SHPIX_CLASS_A;
++
++ }
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+diff -Nur freetype-2.4.3.orig/src/truetype/ttsubpixel.h freetype-2.4.3.new/src/truetype/ttsubpixel.h
+--- freetype-2.4.3.orig/src/truetype/ttsubpixel.h 1969-12-31 18:00:00.000000000 -0600
++++ freetype-2.4.3.new/src/truetype/ttsubpixel.h 2010-11-14 19:16:58.095874324 -0600
+@@ -0,0 +1,819 @@
++/***************************************************************************/
++/* */
++/* ttsubpixel.h */
++/* */
++/* TrueType Subpixel Hinting. */
++/* */
++/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
++/* 2010 by */
++/* David Turner, Robert Wilhelm, and Werner Lemberg. */
++/* */
++/* This file is part of the FreeType project, and may only be used, */
++/* modified, and distributed under the terms of the FreeType project */
++/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
++/* this file you indicate that you have read the license and */
++/* understand and accept it fully. */
++/* */
++/***************************************************************************/
++
++#ifndef __TTSUBPIXEL_H__
++#define __TTSUBPIXEL_H__
++
++#include <ft2build.h>
++#include "ttobjs.h"
++
++#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
++ /*************************************************************************/
++ /* */
++ /* Tweak flags that are set for each glyph */
++ /* */
++ /* */
++#define SPH_TWEAK_NORMAL_ROUND_MIRP 0x00001
++#define SPH_TWEAK_NORMAL_ROUND_MDRP 0x00002
++#define SPH_TWEAK_DELTAP_RDTG 0x00004
++#define SPH_TWEAK_DELTAP_RTG 0x00008
++#define SPH_TWEAK_DELTAP_RUTG 0x00010
++#define SPH_TWEAK_ALLOW_DMOVEX_FREEV 0x00020
++#define SPH_TWEAK_ALLOW_DMOVE_FREEV 0x00040
++#define SPH_TWEAK_ALLOW_MOVEZP2_FREEV 0x00080
++#define SPH_TWEAK_ALWAYS_SKIP_DELTAP 0x00100
++#define SPH_TWEAK_SKIP_IUP 0x00200
++#define SPH_TWEAK_NORMAL_ROUND_MIAP 0x00400
++#define SPH_TWEAK_NORMAL_ROUND_MDAP 0x00800
++#define SPH_TWEAK_DO_RS 0x01000
++#define SPH_TWEAK_DO_SHPIX 0x02000
++#define SPH_TWEAK_ALWAYS_DO_DELTAP 0x04000
++#define SPH_TWEAK_SKIP_NONPIXEL_INLINE_MOVES 0x08000
++#define SPH_TWEAK_SHPIX_CLASS_A 0x10000
++#define SPH_TWEAK_RASTERIZER_35 0x20000
++
++
++ static FT_Bool
++ sph_test_tweak ( TT_Face face,
++ FT_String* family,
++ int ppem,
++ FT_String* style,
++ FT_UInt glyph_index,
++ SPH_TweakRule* rule,
++ int num_rules );
++ static void
++ sph_set_tweaks( TT_Loader loader,
++ FT_UInt glyph_index );
++
++
++ /*************************************************************************/
++ /* */
++ /* These are groups of rules that affect how the TT Interpreter does */
++ /* hinting. */
++ /* */
++ /* "" string or 0 int/char indicates to apply to all. */
++ /* "-" used as dummy placeholders, but any non-matching string works */
++ /* */
++ /* Remaining rules are tweaks for various fonts / glyphs */
++ /* Some of this could arguably be implemented in fontconfig, however: */
++ /* */
++ /* - Fontconfig can't set things on a glyph-by-glyph basis. */
++ /* - The tweaks that happen here are very low-level, from an average */
++ /* user's point of view and are best implemented in the hinter */
++ /* */
++ /* Ideally, some of these should be generalized across affected fonts, */
++ /* and enabled by default in the code. The rule structure is designed so */
++ /* that entirely new rules can easily be added when a new compatibility */
++ /* feature is discovered. */
++ /* */
++
++ /*************************************************************************/
++ /* */
++ /* TT_CONFIG_OPTION_SUBPIXEL_HINTING Rules */
++ /* */
++ /* Simply, this attempts to duplicate the fuctionality described here */
++ /* and nothing more: */
++ /* */
++ /* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
++ /* */
++ /* This mode is enabled when */
++ /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++ /* is undefined */
++ /* */
++
++
++#ifndef TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS
++
++#if FALSE /* THIS RULESET NOT CURRENTLY BEING USED */
++
++#define BITMAP_WIDTHS FALSE
++#define SET_SUBPIXEL FALSE
++#define SET_GRAYSCALE TRUE
++#define SET_MONOCHROME FALSE
++#define SET_COMPATIBLE_WIDTHS TRUE
++#define SET_RASTERIZER_VERSION 35
++#define Grids_Per_Pixel_X 1
++#define Grids_Per_Pixel_Y 1
++
++
++/********** MOVE RULES *************/
++
++/* Allow a Direct_Move_X along freedom vector when matched */
++#define ALLOW_DMOVEX_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules
++[ALLOW_DMOVEX_FREEV_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++/* Allow a Direct_Move along freedom vector when matched */
++#define ALLOW_DMOVE_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules
++[ALLOW_DMOVE_FREEV_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++/* Allow a ZP2 Move along freedom vector when matched */
++#define ALLOW_MOVEZP2_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules
++[ALLOW_MOVEZP2_FREEV_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++/* Don't skip RS calls */
++#define DO_RS_RULES_SIZE 1
++SPH_TweakRule DO_RS_Rules
++[DO_RS_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Force requested SHPIX operations when matched */
++#define DO_SHPIX_RULES_SIZE 1
++SPH_TweakRule DO_SHPIX_Rules
++[DO_SHPIX_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE 1
++SPH_TweakRule SKIP_NONPIXEL_INLINE_MOVES_Rules
++[SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MIRP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MIRP_Rules
++[NORMAL_ROUND_MIRP_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MIAP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MIAP_Rules
++[NORMAL_ROUND_MIAP_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MDRP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MDRP_Rules
++[NORMAL_ROUND_MDRP_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MDAP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MDAP_Rules
++[NORMAL_ROUND_MDAP_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++/* Indicates that SHPIX needs to match a touched point on x OR y */
++#define SHPIX_CLASS_A_RULES_SIZE 1
++SPH_TweakRule SHPIX_CLASS_A_Rules
++[SHPIX_CLASS_A_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Mystery rules that make SHPIX work on certain fonts/glyphs. */
++/* Indicates that SHPIX needs to match a touched point on x AND y */
++/* This is dirty and needs to be generalized and incorporated. */
++#define SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule SHPIX_CLASS_A_Rules_Exceptions
++[SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules_Exceptions
++[ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules_Exceptions
++[ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules_Exceptions
++[ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Skip IUP instructions when matched */
++#define SKIP_IUP_RULES_SIZE 1
++SPH_TweakRule SKIP_IUP_Rules
++[SKIP_IUP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Skip DELTAP instructions when matched */
++#define ALWAYS_SKIP_DELTAP_RULES_SIZE 1
++SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
++[ALWAYS_SKIP_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Always do DELTAP instructions when matched */
++#define ALWAYS_DO_DELTAP_RULES_SIZE 1
++SPH_TweakRule ALWAYS_DO_DELTAP_Rules
++[ALWAYS_DO_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RTG instruction in DELTAP when matched */
++#define DELTAP_RTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RTG_Rules
++[DELTAP_RTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RUTG instruction in DELTAP when matched */
++#define DELTAP_RUTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RUTG_Rules
++[DELTAP_RUTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RDTG instruction in DELTAP when matched */
++#define DELTAP_RDTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RDTG_Rules
++[DELTAP_RDTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Return MS rasterizer 35 when matched */
++#define RASTERIZER_35_RULES_SIZE 1
++SPH_TweakRule RASTERIZER_35_Rules
++[RASTERIZER_35_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++#endif
++
++
++#define BITMAP_WIDTHS FALSE
++#define SET_SUBPIXEL TRUE
++#define SET_GRAYSCALE FALSE
++#define SET_MONOCHROME FALSE
++#define SET_COMPATIBLE_WIDTHS FALSE
++#define SET_RASTERIZER_VERSION 37
++#define Grids_Per_Pixel_X 64
++#define Grids_Per_Pixel_Y 1
++
++
++/********** MOVE RULES *************/
++
++/* Allow a Direct_Move_X along freedom vector when matched */
++#define ALLOW_DMOVEX_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules
++[ALLOW_DMOVEX_FREEV_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Allow a Direct_Move along freedom vector when matched */
++#define ALLOW_DMOVE_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules
++[ALLOW_DMOVE_FREEV_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Allow a ZP2 Move along freedom vector when matched */
++#define ALLOW_MOVEZP2_FREEV_RULES_SIZE 1
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules
++[ALLOW_MOVEZP2_FREEV_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Don't skip RS calls */
++#define DO_RS_RULES_SIZE 1
++SPH_TweakRule DO_RS_Rules
++[DO_RS_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Force requested SHPIX operations when matched */
++#define DO_SHPIX_RULES_SIZE 1
++SPH_TweakRule DO_SHPIX_Rules
++[DO_SHPIX_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE 1
++SPH_TweakRule SKIP_NONPIXEL_INLINE_MOVES_Rules
++[SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MIRP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MIRP_Rules
++[NORMAL_ROUND_MIRP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MIAP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MIAP_Rules
++[NORMAL_ROUND_MIAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MDRP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MDRP_Rules
++[NORMAL_ROUND_MDRP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define NORMAL_ROUND_MDAP_RULES_SIZE 1
++SPH_TweakRule NORMAL_ROUND_MDAP_Rules
++[NORMAL_ROUND_MDAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Indicates that SHPIX needs to match a touched point on x OR y */
++#define SHPIX_CLASS_A_RULES_SIZE 1
++SPH_TweakRule SHPIX_CLASS_A_Rules
++[SHPIX_CLASS_A_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Mystery rules that make SHPIX work on certain fonts/glyphs. */
++/* Indicates that SHPIX needs to match a touched point on x AND y */
++/* This is dirty and needs to be generalized and incorporated. */
++#define SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule SHPIX_CLASS_A_Rules_Exceptions
++[SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules_Exceptions
++[ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules_Exceptions
++[ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++#define ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE 1
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules_Exceptions
++[ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Skip IUP instructions when matched */
++#define SKIP_IUP_RULES_SIZE 1
++SPH_TweakRule SKIP_IUP_Rules
++[SKIP_IUP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Skip DELTAP instructions when matched */
++#define ALWAYS_SKIP_DELTAP_RULES_SIZE 1
++SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules
++[ALWAYS_SKIP_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Always do DELTAP instructions when matched */
++#define ALWAYS_DO_DELTAP_RULES_SIZE 1
++SPH_TweakRule ALWAYS_DO_DELTAP_Rules
++[ALWAYS_DO_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RTG instruction in DELTAP when matched */
++#define DELTAP_RTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RTG_Rules
++[DELTAP_RTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RUTG instruction in DELTAP when matched */
++#define DELTAP_RUTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RUTG_Rules
++[DELTAP_RUTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RDTG instruction in DELTAP when matched */
++#define DELTAP_RDTG_RULES_SIZE 1
++SPH_TweakRule DELTAP_RDTG_Rules
++[DELTAP_RDTG_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++/* Return MS rasterizer 35 when matched */
++#define RASTERIZER_35_RULES_SIZE 1
++SPH_TweakRule RASTERIZER_35_Rules
++[RASTERIZER_35_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++
++ /*************************************************************************/
++ /* */
++ /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS Rules */
++ /* */
++ /* This set of rules is an attempt at enhancing the basic subpixel rules */
++ /* defined above, to fix visual problems with individual fonts and */
++ /* glyphs. */
++ /* */
++ /* This mode is enabled when */
++ /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++ /* is defined */
++ /* */
++ /* ****************** WORK IN PROGRESS ******************* */
++ /* */
++
++#else
++
++#define BITMAP_WIDTHS FALSE
++#define SET_SUBPIXEL TRUE
++#define SET_GRAYSCALE FALSE
++#define SET_MONOCHROME FALSE
++#define SET_COMPATIBLE_WIDTHS FALSE
++#define SET_RASTERIZER_VERSION 37
++#define Grids_Per_Pixel_X 64
++#define Grids_Per_Pixel_Y 1
++
++
++/* Don't avoid RS Rules (as the basic subpixel hinting does) */
++#define DO_RS_RULES_SIZE 1
++SPH_TweakRule DO_RS_Rules[DO_RS_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++};
++
++
++/******************* DELTA RULES *********************/
++
++/* Do requested SHPIX operations when matched. This requires ZP2 moves */
++/* to be enabled in order to get SHPIX moves in the X direction */
++/* Do all "Optimized for Cleartype" fonts need to be here??. */
++/* the below doesn't work because the bit is not set in MS cleartype fonts */
++/* CUR.face->header.Flags & 0x10000 */
++
++#define DO_SHPIX_RULES_SIZE 7
++SPH_TweakRule DO_SHPIX_Rules[DO_SHPIX_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Verdana", 0, "Regular", 0 },
++ { "-Verdana", 12, "Regular", 0 },
++ { "Verdana", 13, "Regular", 0 },
++ /* aligns to pixels nicely, but messes up some glyphs */
++ { "-Times New Roman", 0, "Regular", 0 },
++ { "+++Segoe UI", 0, "Regular", 0 },
++ { "-Segoe UI", 0, "Semibold", 0 },
++};
++
++/* Indicates that SHPIX needs to match a touched point on x OR y */
++#define SHPIX_CLASS_A_RULES_SIZE 1
++SPH_TweakRule SHPIX_CLASS_A_Rules[SHPIX_CLASS_A_RULES_SIZE] = {
++ { "", 0, "", 0 },
++};
++
++/* Mystery rules that make SHPIX work on certain fonts/glyphs. */
++/* Indicates that SHPIX needs to match a touched point on x AND y */
++/* This is dirty and needs to be generalized and incorporated. */
++#define SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE 2
++SPH_TweakRule SHPIX_CLASS_A_Rules_Exceptions
++[SHPIX_CLASS_A_RULES_EXCEPTIONS_SIZE] = {
++ { "---", 0, "", 0 },
++ { "Arial", 11, "Regular", 's' },
++};
++
++/* Skip moves that don't align to a pixel in various functions. */
++/* Fixes Tahoma, trebuchet oddities and some issues with $ */
++#define SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE 4
++SPH_TweakRule SKIP_NONPIXEL_INLINE_MOVES_Rules
++[SKIP_NONPIXEL_INLINE_MOVES_RULES_SIZE] = {
++ { "", 0, "Regular", 0 },
++ /* keeps the weight in the center of the N */
++ { "", 0, "Regular", 'N' },
++ { "Tahoma", 0, "Regular", 0 },
++ { "==Trebuchet MS", 0, "Regular", 0 },
++};
++
++
++/********** MOVE RULES *************/
++
++/* Allow a Direct_Move_X along X freedom vector when matched */
++#define ALLOW_DMOVEX_FREEV_RULES_SIZE 20
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules[ALLOW_DMOVEX_FREEV_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-", 0, "Regular", 0 },
++ { "-", 0, "Italic", 0 },
++ { "-", 0, "Regular", 0 },
++ { "-Verdana", 12, "Regular", 0 },
++ { "-Geneva", 0, "", 0 },
++ { "-Courier New", 0, "Regular", 0 },
++ { "-Courier New", 0, "", 0 },
++ { "-Arial", 0, "Bold", 0 },
++ { "Verdana", 13, "Regular", 0 },
++ { "-Times New Roman", 0, "Regular", 0 },
++ { "Arial", 13, "Regular", 0 },
++ { "Arial", 14, "Regular", 0 },
++ { "-Tahoma", 0, "Regular", 0 },
++ { "+++Trebuchet MS", 0, "Regular", 0 },
++ { "-Trebuchet MS", 0, "Bold", 0 },
++ { "-Segoe UI", 0, "Semibold", 0 },
++ { "-Segoe UI", 12, "Regular", 'H' },
++ { "Arial Narrow", 0, "Regular", 0 },
++ { "+++Andale Mono", 17, "Regular", 0 },
++};
++
++/* Allow a Direct_Move along X freedom vector when matched */
++#define ALLOW_DMOVE_FREEV_RULES_SIZE 21
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules
++[ALLOW_DMOVE_FREEV_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-", 0, "Regular", 0 },
++ { "-", 0, "Italic", 0 },
++ { "-Verdana", 12, "Regular", 0 },
++ { "Verdana", 13, "Regular", 0 },
++ { "-Courier New", 0, "Bold", 0 },
++ { "-Times New Roman", 0, "Regular", 0 },
++ { "Arial", 13, "Regular", 0 },
++ { "Arial", 14, "Regular", 0 },
++ { "-Arial", 0, "Bold", 0 },
++ { "-Tahoma", 0, "Regular", 0 },
++ { "+++Trebuchet MS", 0, "Regular", 0 },
++ { "-Trebuchet MS", 0, "Bold", 0 },
++ { "-Geneva", 0, "", 0 },
++ { "-------", 0, "Regular", 0 },
++ { "-Segoe UI", 0, "Semibold", 0 },
++ { "+++Segoe UI", 12, "Regular", 'H' },
++ { "-----", 0, "Regular", 0 },
++ { "Arial Narrow", 0, "Regular", 0 },
++ { "+++Andale Mono", 17, "Regular", 0 },
++ { "-Courier New", 0, "", 0 },
++};
++
++
++#define ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE 9
++SPH_TweakRule ALLOW_DMOVEX_FREEV_Rules_Exceptions
++ [ALLOW_DMOVEX_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Times New Roman", 0, "Regular", 'a' },
++ { "-Times New Roman", 0, "Regular", 'q' },
++ { "-Times New Roman", 0, "Regular", 'P' },
++ { "-Times New Roman", 0, "Regular", 'R' },
++ { "-Times New Roman", 0, "Regular", 'B' },
++ { "Arial", 0, "Regular", '4' },
++ { "Arial", 0, "Regular", 's' },
++ { "Arial", 0, "Regular", '^' },
++};
++
++#define ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE 9
++SPH_TweakRule ALLOW_DMOVE_FREEV_Rules_Exceptions
++[ALLOW_DMOVE_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Times New Roman", 0, "Regular", 'a' },
++ { "-Times New Roman", 0, "Regular", 'q' },
++ { "-Times New Roman", 0, "Regular", 'P' },
++ { "-Times New Roman", 0, "Regular", 'R' },
++ { "-Times New Roman", 0, "Regular", 'B' },
++ { "Arial", 0, "Regular", '4' },
++ { "Arial", 0, "Regular", 's' },
++ { "Arial", 0, "Regular", '^' },
++};
++
++
++/* Allow a ZP2 Move along freedom vector when matched */
++/* This is called from SHP, SHPIX, SHC, SHZ */
++#define ALLOW_MOVEZP2_FREEV_RULES_SIZE 14
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules[ALLOW_MOVEZP2_FREEV_RULES_SIZE] = {
++ { "-", 0, "Regular", 0 },
++ { "-Verdana", 12, "Regular", 0 },
++ { "Verdana", 13, "Regular", 0 },
++ { "-Times New Roman", 0, "Regular", 0 },
++ { "-Courier New", 0, "Bold", 0 },
++ { "-Tahoma", 0, "Regular", 0 },
++ { "-Courier New", 0, "", 0 },
++ { "Arial", 13, "Regular", 0 },
++ { "Arial", 14, "Regular", 0 },
++ { "-Arial", 0, "Bold", 0 },
++ { "+++Trebuchet MS", 0, "Regular", 0 },
++ { "-Trebuchet MS", 0, "Bold", 0 },
++ { "-Verdana", 13, "Regular", 0 },
++ /* this needs a bit of work though */
++ { "-Microsoft Sans Serif", 0, "Regular", 0 },
++};
++
++/* Return MS rasterizer 35 when matched */
++#define RASTERIZER_35_RULES_SIZE 1
++SPH_TweakRule RASTERIZER_35_Rules
++[RASTERIZER_35_RULES_SIZE] = {
++ { "Times New Roman", 0, "Regular", 'i' },
++};
++
++/************** DIRTY, DIRTY HACKS!!!!!!!! ***************/
++
++#define ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE 11
++SPH_TweakRule ALLOW_MOVEZP2_FREEV_Rules_Exceptions
++[ALLOW_MOVEZP2_FREEV_RULES_EXCEPTIONS_SIZE] = {
++ { "-", 0, "", 0 },
++ { "Times New Roman", 0, "Regular", 'a' },
++ { "Times New Roman", 0, "Regular", 'q' },
++ { "Verdana", 13, "Regular", 'N' },
++ { "Verdana", 13, "Regular", 'f' },
++ { "Verdana", 13, "Regular", 'v' },
++ { "-------", 13, "Regular", 'k' },
++ { "Verdana", 13, "Regular", 'w' },
++ { "Verdana", 13, "Regular", 'x' },
++ { "Verdana", 13, "Regular", 'y' },
++ { "Verdana", 13, "Regular", 'z' },
++};
++
++/*********** ROUNDING ***************/
++/* These only have an effect on fonts that are allowed to move X (above) */
++/* It appears all MS cleartype fonts may be OK using normal rounds */
++#define NORMAL_ROUND_MIRP_RULES_SIZE 16
++SPH_TweakRule NORMAL_ROUND_MIRP_Rules[NORMAL_ROUND_MIRP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Tahoma", 9, "Regular", 0 },
++ { "-Courier New", 0, "Regular", 'W' },
++ { "-Courier New", 0, "Regular", 'K' },
++ { "-Courier New", 0, "Regular", 'k' },
++ { "-Courier New", 0, "Regular", 'V' },
++ { "-Courier New", 0, "Regular", 'O' },
++ { "-Courier New", 0, "Regular", 'X' },
++ { "-Courier New", 0, "Regular", 'Y' },
++ { "-Courier New", 0, "Regular", 'A' },
++ { "-Courier New", 0, "Regular", 'v' },
++ { "-Courier New", 0, "Regular", 'z' },
++ { "-Courier New", 0, "Regular", 'x' },
++ { "-Courier New", 0, "Regular", 'y' },
++ { "Calibri", 0, "Italic", 0 },
++ { "Calibri", 0, "Bold Italic", 0 },
++};
++
++#define NORMAL_ROUND_MIAP_RULES_SIZE 16
++SPH_TweakRule NORMAL_ROUND_MIAP_Rules[NORMAL_ROUND_MIAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Tahoma", 9, "Regular", 0 },
++ { "-Courier New", 0, "Regular", 'W' },
++ { "-Courier New", 0, "Regular", 'K' },
++ { "-Courier New", 0, "Regular", 'k' },
++ { "-Courier New", 0, "Regular", 'V' },
++ { "-Courier New", 0, "Regular", 'O' },
++ { "-Courier New", 0, "Regular", 'X' },
++ { "-Courier New", 0, "Regular", 'Y' },
++ { "-Courier New", 0, "Regular", 'A' },
++ { "-Courier New", 0, "Regular", 'v' },
++ { "-Courier New", 0, "Regular", 'z' },
++ { "-Courier New", 0, "Regular", 'x' },
++ { "-Courier New", 0, "Regular", 'y' },
++ { "Calibri", 0, "Italic", 0 },
++ { "Calibri", 0, "Bold Italic", 0 },
++};
++
++#define NORMAL_ROUND_MDRP_RULES_SIZE 16
++SPH_TweakRule NORMAL_ROUND_MDRP_Rules[NORMAL_ROUND_MDRP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Tahoma", 9, "Regular", 0 },
++ { "-Courier New", 0, "Regular", 'W' },
++ { "-Courier New", 0, "Regular", 'K' },
++ { "-Courier New", 0, "Regular", 'k' },
++ { "-Courier New", 0, "Regular", 'V' },
++ { "-Courier New", 0, "Regular", 'O' },
++ { "-Courier New", 0, "Regular", 'X' },
++ { "-Courier New", 0, "Regular", 'Y' },
++ { "-Courier New", 0, "Regular", 'A' },
++ { "-Courier New", 0, "Regular", 'v' },
++ { "-Courier New", 0, "Regular", 'z' },
++ { "-Courier New", 0, "Regular", 'x' },
++ { "-Courier New", 0, "Regular", 'y' },
++ { "Calibri", 0, "Italic", 0 },
++ { "Calibri", 0, "Bold Italic", 0 },
++};
++
++#define NORMAL_ROUND_MDAP_RULES_SIZE 16
++SPH_TweakRule NORMAL_ROUND_MDAP_Rules[NORMAL_ROUND_MDAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "-Tahoma", 9, "Regular", 0 },
++ { "-Courier New", 0, "Regular", 'W' },
++ { "-Courier New", 0, "Regular", 'K' },
++ { "-Courier New", 0, "Regular", 'k' },
++ { "-Courier New", 0, "Regular", 'V' },
++ { "-Courier New", 0, "Regular", 'O' },
++ { "-Courier New", 0, "Regular", 'X' },
++ { "-Courier New", 0, "Regular", 'Y' },
++ { "-Courier New", 0, "Regular", 'A' },
++ { "-Courier New", 0, "Regular", 'v' },
++ { "-Courier New", 0, "Regular", 'z' },
++ { "-Courier New", 0, "Regular", 'x' },
++ { "-Courier New", 0, "Regular", 'y' },
++ { "Calibri", 0, "Italic", 0 },
++ { "Calibri", 0, "Bold Italic", 0 },
++};
++
++
++/* Skip IUP instructions when matched */
++#define SKIP_IUP_RULES_SIZE 6
++SPH_TweakRule SKIP_IUP_Rules[SKIP_IUP_RULES_SIZE] = {
++ { "Arial", 13, "Regular", 'a' },
++ { "-", 0, "Regular", '2' },
++ { "-", 0, "", 0 },
++ { "-", 0, "Regular", 'a' },
++ { "-", 0, "Regular", 'V' },
++ { "-", 0, "Light", 0 },
++};
++
++/* Skip DELTAP instructions when matched */
++#define ALWAYS_SKIP_DELTAP_RULES_SIZE 19
++SPH_TweakRule ALWAYS_SKIP_DELTAP_Rules[ALWAYS_SKIP_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "--Courier New", 0, "Regular", 'V' },
++ { "Verdana", 10, "Regular", 0 },
++ { "-Trebuchet MS", 0, "Regular", 'W' },
++ { "-Trebuchet MS", 0, "Regular", 'w' },
++ { "-Verdana", 0, "Italic", 'v' },
++ { "-Verdana", 0, "Italic", 'w' },
++ { "-Verdana", 0, "Italic", 'x' },
++ { "-Verdana", 0, "Italic", 'y' },
++ { "-Verdana", 0, "Italic", 'z' },
++ { "-Verdana", 0, "Regular", 'v' },
++ { "-Verdana", 10, "Regular", 'w' },
++ { "-Verdana", 0, "Regular", 'y' },
++ { "-Verdana", 0, "Regular", 'z' },
++ { "-Arial Bold", 0, "Bold", 's' },
++ { "Trebuchet MS", 14, "Regular", 'e' },
++ { "Trebuchet MS", 0, "Italic", 0 },
++ { "-Arial", 0, "Italic", 0 },
++ { "-", 0, "Italic", 0 },
++};
++
++/* Always do DELTAP instructions when matched */
++#define ALWAYS_DO_DELTAP_RULES_SIZE 3
++SPH_TweakRule ALWAYS_DO_DELTAP_Rules[ALWAYS_DO_DELTAP_RULES_SIZE] = {
++ { "-", 0, "", 0 },
++ { "DejaVu Sans", 14, "Regular", 'k' },
++ { "DejaVu Sans", 14, "Regular", 'K' },
++};
++
++/* Do an extra RTG instruction in DELTAP when matched */
++#define DELTAP_RTG_RULES_SIZE 4
++SPH_TweakRule DELTAP_RTG_Rules[DELTAP_RTG_RULES_SIZE] = {
++ { "-Arial Unicode MS", 0, "Regular", 0 },
++ { "-Microsoft Sans Serif", 0, "Regular", '0' },
++ { "--Verdana", 0, "", 0 },
++ { "-Trebuchet MS", 14, "Regular", 'e' },
++};
++
++/* Do an extra RUTG instruction in DELTAP when matched */
++#define DELTAP_RUTG_RULES_SIZE 2
++SPH_TweakRule DELTAP_RUTG_Rules[DELTAP_RUTG_RULES_SIZE] = {
++ { "-", 14, "Regular", 'e' },
++ { "-", 0, "", 0 },
++};
++
++/* Do an extra RDTG instruction in DELTAP when matched */
++#define DELTAP_RDTG_RULES_SIZE 28
++SPH_TweakRule DELTAP_RDTG_Rules[DELTAP_RDTG_RULES_SIZE] = {
++ { "Calibri", 0, "Italic", 0 },
++ { "Comic Sans MS", 0, "Regular", 0 },
++ { "Lucida Grande", 0, "Regular", 'e' },
++ { "Lucida Grande", 12, "Bold", 0 },
++ { "Microsoft Sans Serif", 0, "Regular", '7' },
++ { "Microsoft Sans Serif", 0, "Regular", 'O' },
++ { "Microsoft Sans Serif", 0, "Regular", 'Q' },
++ { "Microsoft Sans Serif", 0, "Regular", 'X' },
++ { "Microsoft Sans Serif", 0, "Regular", 'e' },
++ { "Microsoft Sans Serif", 0, "Regular", 'o' },
++ { "-", 0, "", 0 },
++ { "-", 0, "Regular", 'O' },
++ { "-", 0, "Regular", 'U' },
++ { "-", 0, "Regular", 'e' },
++ { "-", 0, "Regular", 'g' },
++ { "Tahoma", 0, "Bold", '0' },
++ { "Tahoma", 16, "Bold", 'C' },
++ { "Tahoma", 16, "Bold Italic", 'C' },
++ { "Trebuchet MS", 0, "", '0' },
++ { "-", 9, "", 'w' },
++ { "Verdana", 0, "", '0' },
++ { "Verdana", 0, "Bold Italic", '7' },
++ { "Verdana", 0, "Bold Italic", 'v' },
++ { "Verdana", 0, "Bold Italic", 'w' },
++ { "Verdana", 0, "Bold", 0 },
++ { "Verdana", 0, "Italic", 'o' },
++ { "Verdana", 0, "Regular", 'x' },
++ { "Trebuchet MS", 14, "Regular", 'e' },
++};
++
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++
++#endif /* __TTSUBPIXEL_H__ */
diff --git a/testing/freetype-infinality/freetype-enable-subpixel-hinting-infinality-20100909-1.patch b/testing/freetype-infinality/freetype-enable-subpixel-hinting-infinality-20100909-1.patch
new file mode 100644
index 000000000..08416afed
--- /dev/null
+++ b/testing/freetype-infinality/freetype-enable-subpixel-hinting-infinality-20100909-1.patch
@@ -0,0 +1,29 @@
+--- freetype-2.4.2.subpixel-patched/include/freetype/config/ftoption.h 2010-09-09 18:08:11.375855632 -0500
++++ freetype-2.4.2.subpixel-enabled/include/freetype/config/ftoption.h 2010-09-09 18:09:48.491864607 -0500
+@@ -93,7 +93,7 @@
+ /* This is done to allow FreeType clients to run unmodified, forcing */
+ /* them to display normal gray-level anti-aliased glyphs. */
+ /* */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /*************************************************************************/
+@@ -510,7 +510,7 @@
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
+
+
+ /*************************************************************************/
+@@ -527,7 +527,7 @@
+ /* This option requires TT_CONFIG_OPTION_SUBPIXEL_HINTING to be */
+ /* defined. */
+ /* */
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING_ADDITIONAL_TWEAKS
+
+
+ /*************************************************************************/
diff --git a/testing/freetype-infinality/freetype-entire-infinality-patchset-20101114-1.patch b/testing/freetype-infinality/freetype-entire-infinality-patchset-20101114-1.patch
new file mode 100644
index 000000000..aae5fadde
--- /dev/null
+++ b/testing/freetype-infinality/freetype-entire-infinality-patchset-20101114-1.patch
@@ -0,0 +1,1602 @@
+freetype-entire-infinality-patchset (excludes the TT subpixel patches)
+-------------------------------------------------------------------
+
+This patch contains all the patches I used to distribute separately.
+It made more sense to lump these all together into a single file
+now that there are runtime options. It's also easier for me to maintain. ;)
+
+I recommend that if you are using this patch that you use
+
+ /etc/fonts/local.conf
+
+that I provide at: http://www.infinality.net/files/local.conf
+You will also need: http://www.infinality.net/files/infinality-settings
+
+The second one will need to be included in your profile with something like:
+
+ . ~/path/to/the/file/infinality-settings
+
+It should be adjusted to your personal tastes as an end-user.
+
+
+DISCLAIMERS:
+
+This patch will almost certainly result in a performance hit when
+freetype is rendering the glyphs. The good news is that fontconfig
+caches the glyphs so it's only the first time they are displayed that there
+could be a performance issue.
+
+I expect that if you compile freetype with this patch along with my
+TT subpixel hinting patch, you will have a complete build that works the
+way I expect it to. However, I have not tested all compile configurations
+for errors. I intend to at some point. This patch may make your system crash,
+have memory leaks, not compile, or render fonts in a way that you don't like.
+Either way, when you use this patch, you should recognize that it
+is ALPHA / BETA quality. That said, I intend to run these patches on my
+personal system, so they had better be pretty stable!
+
+
+Changelog
+
+2010-11-14
+ - All patches can now be enabled at runtime with ENVIRONMENT_VARIABLES.
+ See the file infinality-settings (and below) for how to enable these.
+ Effects that used to work now **REQUIRE** these in order to be turned on
+ at runtime. This lets end users have full control over what they want
+ without requiring different compiles.
+
+ - Added option to auto-embolden thin/light fonts.
+
+ - Further refinement of the stem calculations for enhanced autohint.
+
+ - Adjustable FIR filter at runtime.
+
+ - Stem alignment ability to align glyph bitmaps to pixel boundaries.
+
+ - Adjustable gamma correction prior to the FIR filter for LCD rendering.
+ This can be used to make small ppem text more readable, or for whatever
+ else you want to use it for.
+
+ - A height tweak on the enhanced autohint that makes Arial, Segoe, Times
+ and others render more similarly to Windows.
+
+ - Separated out the option to maintain the original width of glyphs
+ when doing fake emboldening.
+
+
+
+##################################################################
+# The environment variables below should be copied to a file in
+# /etc/profile.d/ for system-wide effects and/or included in
+# ~/.bashrc or ~/.bash_profile for per-user effects:
+#
+# . ~/path/to/the/file/infinality-settings
+#
+# Of course, the per-user settings will override the system-wide
+# settings.
+
+
+
+##################################################################
+# INFINALITY_FT_FILTER_PARAMS
+#
+# This is a modified version of the patch here:
+# http://levelsofdetail.kendeeter.com/2008/12/dynamic_fir_filter_patch.html
+#
+# Allows you to adjust the FIR filter at runtime instead of at
+# compile time. The idea is to have values add up to one, and be
+# symmetrical around the middle value. Here are some samples
+# of various filter parameters:
+#
+# Strong Extra Smooth "0.15 0.2 0.3 0.2 0.15" (extra smooth, natural weight)
+# Extra Smooth "0.20 0.20 0.30 0.20 0.20" (extra smooth, extra weight)
+# Smooth "0.15 0.20 0.32 0.20 0.15" (smooth, natural weight)
+# Stronger Gibson "0.11 0.22 0.38 0.22 0.11" (smooth, extra weight)
+# Gibson "0.11 0.22 0.33 0.22 0.11" (smooth, natural weight)
+# Freetype Light "0.00 0.33 0.34 0.33 0.00" (sharp, natural weight)
+# Freetype Default "0.06 0.25 0.44 0.25 0.06" (sharp, extra weight) *default
+# Extra Sharp "0.00 0.35 0.35 0.35 0.00" (extra sharp, extra weight)
+#
+# Default: [Freetype's default]
+# Recommended: "0.11 0.22 0.38 0.22 0.11"
+#
+# Example 1: export INFINALITY_FT_FILTER_PARAMS="0.11 0.22 0.38 0.22 0.11"
+#
+
+export INFINALITY_FT_FILTER_PARAMS="0.11 0.22 0.38 0.22 0.11"
+
+
+
+
+##################################################################
+# INFINALITY_FT_STEM_ALIGNMENT_TYPE
+#
+# This performs analysis on each glyph and determines the best
+# subpixel orientation for the glyph. The glyph is not scaled in
+# any way, just moved left or right by a subpixel amount. This
+# results in subtley cleaner looking fonts, at the expense of
+# proper distances between glyphs. This is only active for sizes
+# 10 px or greater and does not apply to bold or italic fonts.
+#
+# Possible values:
+# full - Allows a glyph to be moved to the LEFT or RIGHT by 1 subpixel
+# Best alignment, Worst positioning
+# medium,medium1 - Only allows a glyph to be moved to the LEFT by 1 subpixel
+# Good alignment, Good positioning
+# medium2 - Only allows a glyph to be moved to the RIGHT by 1 subpixel
+# Good alignment, Good positioning
+# slight,slight1 - A stricter version of medium
+# Minor alignment, Best positioning
+# slight2 - A stricter version of medium2
+# Minor alignment, Best positioning
+# infinality - medium1 when stem < 5 subpixels, full when >= 5 subpixels
+# none - Don't do any alignment
+#
+# Default: none
+# Recommended: medium
+
+export INFINALITY_FT_STEM_ALIGNMENT_TYPE=medium
+
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT
+#
+# Cause the height of horizontal stems to snap to integer pixels
+# when using light auto-hinting. (This happens automatically
+# when using full auto-hinting)
+#
+# This produces an effect similar to the way Windows renders fonts
+# without requiring the font to contain bytecode instructions.
+#
+# Possible values:
+# true - enable stem snapping
+# false - do not enable stem snapping
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT
+#
+# Embolden particularly light or thin fonts, like DejaVu Sans Light,
+# Inconsolata, Freemono, Courier New, etc. up until stem width is
+# 1 pixel wide. This makes these fonts easier to read at lower
+# ppems. Only applies when the autohinter is being used.
+#
+# Possible values:
+# true - enable emboldening of light fonts
+# false - do not enable emboldening of light fonts
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_PSEUDO_GAMMA
+#
+# This does a weighted gamma correction at the LCD filter phase
+# prior to the LCD filter.
+#
+# The first value indicates a px value, the second indicates a
+# "gamma" value. All sizes < the px value will be corrected
+# on a weighted scale based on the second value.
+#
+# Values .1 < 1.0 will darken the glyph
+# Values > 1.0 will lighten the glyph
+#
+# Example 1: Darken glyphs that are less than 10 px. With some fonts
+# even 5 or 6px is readable!
+# export INFINALITY_FT_PSEUDO_GAMMA="10 .6"
+#
+# Example 2: Lighten all glyphs (below 100px)
+# export INFINALITY_FT_PSEUDO_GAMMA="100 1.5"
+#
+# Default: [No gamma correction]
+# Recommended: "9 .7"
+
+export INFINALITY_FT_PSEUDO_GAMMA="9 .7"
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS
+#
+# This will slightly stretch some glyphs vertically between 9px
+# and 14px (inclusive). Some people may find this more
+# aesthetically pleasing. This only applies to fonts that are
+# using autohint.
+#
+# Possible values:
+# true - enable height adjustment
+# false - do not enable height adjustment
+#
+# Default: false
+
+export INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_ENHANCED_EMBOLDEN
+#
+# When doing artificial emboldening, only embolden in the X
+# direction, skipping the Y direction. Most people will find this
+# more aesthetically pleasing than the default behavior.
+#
+# Possible values:
+# true - enable enhanced emboldening
+# false - no not enable enhanced emboldening
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_ENHANCED_EMBOLDEN=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH
+#
+# When doing artificial emboldening, don't change the glyph width.
+#
+# Possible values:
+# true - maintain width
+# false - do not maintain width
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTO_AUTOHINT
+#
+# Automatically use autohint when rendering a font that contains
+# no truetype instructions, regardless of what the calling
+# program asks for. The truetype hinter will not do a good job
+# on these.
+#
+# Possible values:
+# true - automatically use autohint
+# false - do not automatically use autohint
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTO_AUTOHINT=true
+
+
+
+
+
+
+INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT details
+---------------------------------------------
+
+This patch is intended to make freetype's autohinter round down widths of
+horizontal stems to whole pixel values. This dramatically reduces the
+graininess of the rendering at small sizes, at the expense of being true to the
+glyph.
+
+Put simply, it makes freetype's autohinter render fonts similarly
+to well-hinted TrueType fonts, even on fonts that contain no instructions.
+So, as far as I can tell, this makes it 100% patent-free.
+
+The most dramatic results are on sans-serif fonts like Lucida Grande,
+Arial, Helvetica Neue, Inconsolata, Droid Sans, Trebuchet MS, etc.
+
+
+It is recommended to use this with antialiasing on, and fonts set to
+slight hinting:
+
+ <match target="font" >
+ <edit mode="assign" name="rgba" >
+ <const>rgb</const>
+ </edit>
+ <edit mode="assign" name="hinting" >
+ <bool>true</bool>
+ </edit>
+ <edit mode="assign" name="autohint" >
+ <bool>true</bool>
+ </edit>
+ <edit mode="assign" name="antialias" >
+ <bool>true</bool>
+ </edit>
+ <edit mode="assign" name="hintstyle" >
+ <const>hintslight</const>
+ </edit>
+ <edit name="lcdfilter" mode="assign">
+ <const>lcddefault</const>
+ </edit>
+ </match>
+
+
+
+
+diff -Nur freetype-2.4.3.orig/configure freetype-2.4.3.new/configure
+--- freetype-2.4.3.orig/configure 2010-10-03 13:05:26.000000000 -0500
++++ freetype-2.4.3.new/configure 2010-11-14 18:17:36.593491866 -0600
+@@ -13,6 +13,8 @@
+ # Call the `configure' script located in `builds/unix'.
+ #
+
++export LDFLAGS="$LDFLAGS -lm"
++
+ rm -f config.mk builds/unix/unix-def.mk builds/unix/unix-cc.mk
+
+ if test "x$GNUMAKE" = x; then
+diff -Nur freetype-2.4.3.orig/include/freetype/internal/ftobjs.h freetype-2.4.3.new/include/freetype/internal/ftobjs.h
+--- freetype-2.4.3.orig/include/freetype/internal/ftobjs.h 2010-07-18 11:07:31.000000000 -0500
++++ freetype-2.4.3.new/include/freetype/internal/ftobjs.h 2010-11-07 11:18:19.681501081 -0600
+@@ -762,6 +770,10 @@
+ FT_Library library );
+
+
++ typedef void (*FT_Bitmap_LcdStemAlignFunc)( FT_Bitmap* bitmap,
++ FT_Render_Mode render_mode,
++ FT_GlyphSlot slot );
++
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+@@ -862,6 +874,7 @@
+ FT_Int lcd_extra; /* number of extra pixels */
+ FT_Byte lcd_weights[7]; /* filter weights, if any */
+ FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */
++ FT_Bitmap_LcdStemAlignFunc lcd_stem_align_func;
+ #endif
+
+ #ifdef FT_CONFIG_OPTION_PIC
+diff -Nur freetype-2.4.3.orig/src/autofit/aflatin.c freetype-2.4.3.new/src/autofit/aflatin.c
+--- freetype-2.4.3.orig/src/autofit/aflatin.c 2010-09-11 01:23:02.000000000 -0500
++++ freetype-2.4.3.new/src/autofit/aflatin.c 2010-11-14 18:55:57.678647844 -0600
+@@ -21,6 +21,7 @@
+
+ #include "aflatin.h"
+ #include "aferrors.h"
++#include "strings.h"
+
+
+ #ifdef AF_USE_WARPER
+@@ -495,6 +496,29 @@
+ AF_LatinAxis axis;
+ FT_UInt nn;
+
++ int checked_adjust_heights_env = 0;
++ FT_Bool adjust_heights = FALSE;
++
++ if ( checked_adjust_heights_env == 0 )
++ {
++ char *adjust_heights_env = getenv( "INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS" );
++ if ( adjust_heights_env != NULL )
++ {
++ if ( strcasecmp(adjust_heights_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(adjust_heights_env, "true") == 0)
++ adjust_heights = TRUE;
++ else if ( strcasecmp(adjust_heights_env, "1") == 0)
++ adjust_heights = TRUE;
++ else if ( strcasecmp(adjust_heights_env, "on") == 0)
++ adjust_heights = TRUE;
++ else if ( strcasecmp(adjust_heights_env, "yes") == 0)
++ adjust_heights = TRUE;
++ }
++ }
++ checked_adjust_heights_env = 1;
++ }
++
+
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+@@ -522,21 +546,46 @@
+ {
+ AF_LatinAxis Axis = &metrics->axis[AF_DIMENSION_VERT];
+ AF_LatinBlue blue = NULL;
+-
++ int threshold = 40;
+
+ for ( nn = 0; nn < Axis->blue_count; nn++ )
+ {
+- if ( Axis->blues[nn].flags & AF_LATIN_BLUE_ADJUSTMENT )
++ if ( Axis->blues[nn].flags & AF_LATIN_BLUE_ADJUSTMENT
++ || ( adjust_heights && Axis->blues[nn].flags & AF_LATIN_BLUE_TOP )
++ )
+ {
+ blue = &Axis->blues[nn];
+ break;
+ }
+ }
+
++ if ( adjust_heights
++ && metrics->root.scaler.face->size->metrics.x_ppem < 15
++ && metrics->root.scaler.face->size->metrics.x_ppem > 8 )
++ threshold = 52;
++
++ /* NEED TO FIND A WAY TO ADJUST CAPS AND LOWER SEPARATELY */
++ /* The below does not work */
++ /* if (Axis->blues[nn].flags & AF_LATIN_BLUE_SMALL_TOP )
++ {
++ if (metrics->root.scaler.face->size->metrics.x_ppem < 15)
++ threshold = 22;
++ else threshold = 40;
++ break;
++ }
++ if ( Axis->blues[nn].flags & AF_LATIN_BLUE_CAPITAL_TOP )
++ {
++ if (metrics->root.scaler.face->size->metrics.x_ppem < 15)
++ threshold = 40;
++ else threshold = 40;
++ break;
++ }
++ */
++
+ if ( blue )
+ {
+ FT_Pos scaled = FT_MulFix( blue->shoot.org, scaler->y_scale );
+- FT_Pos fitted = ( scaled + 40 ) & ~63;
++ FT_Pos fitted = ( scaled + threshold ) & ~63;
+
+
+ if ( scaled != fitted )
+@@ -1340,7 +1389,8 @@
+ if ( dist < 0 )
+ dist = -dist;
+
+- dist = FT_MulFix( dist, scale );
++ /* round down to pixels */
++ dist = FT_MulFix( dist, scale ) & ~63;
+ if ( dist < best_dist )
+ {
+ best_dist = dist;
+@@ -1500,9 +1550,33 @@
+ FT_Int vertical = ( dim == AF_DIMENSION_VERT );
+
+
+- if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||
+- axis->extra_light )
+- return width;
++ int checked_stem_snap_env = 0;
++ FT_Bool stem_snap_light = FALSE;
++
++ if ( checked_stem_snap_env == 0 )
++ {
++ char *stem_snap_env = getenv( "INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT" );
++ if ( stem_snap_env != NULL )
++ {
++ if ( strcasecmp(stem_snap_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(stem_snap_env, "true") == 0)
++ stem_snap_light = TRUE;
++ else if ( strcasecmp(stem_snap_env, "1") == 0)
++ stem_snap_light = TRUE;
++ else if ( strcasecmp(stem_snap_env, "on") == 0)
++ stem_snap_light = TRUE;
++ else if ( strcasecmp(stem_snap_env, "yes") == 0)
++ stem_snap_light = TRUE;
++ }
++ }
++ checked_stem_snap_env = 1;
++ }
++
++ if ( !stem_snap_light )
++ if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) ||
++ axis->extra_light )
++ return width;
+
+ if ( dist < 0 )
+ {
+@@ -1510,8 +1584,67 @@
+ sign = 1;
+ }
+
+- if ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||
+- ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )
++ if ( stem_snap_light
++ && (
++ ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) )
++ || ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) ) )
++ {
++ dist = af_latin_snap_width( axis->widths, axis->width_count, dist );
++
++ if ( metrics->root.scaler.face->size->metrics.x_ppem > 9
++ && axis->width_count > 0
++ && abs ( axis->widths[0].cur - dist ) < 32
++ && axis->widths[0].cur > 52 )
++ {
++ if ( strstr(metrics->root.scaler.face->style_name, "Regular")
++ || strstr(metrics->root.scaler.face->style_name, "Book")
++ || strstr(metrics->root.scaler.face->style_name, "Medium")
++ || strcmp(metrics->root.scaler.face->style_name, "Italic") == 0
++ || strcmp(metrics->root.scaler.face->style_name, "Oblique") == 0 )
++ {
++ /* regular weight */
++ if ( axis->widths[0].cur < 64 ) dist = 64 ;
++ else if (axis->widths[0].cur < 88) dist = 64;
++ else if (axis->widths[0].cur < 160) dist = 128;
++ else if (axis->widths[0].cur < 240) dist = 190;
++ else dist = ( dist ) & ~63;
++ }
++ else
++ {
++ /* bold gets a different threshold */
++ if ( axis->widths[0].cur < 64 ) dist = 64 ;
++ else if (axis->widths[0].cur < 108) dist = 64;
++ else if (axis->widths[0].cur < 160) dist = 128;
++ else if (axis->widths[0].cur < 222) dist = 190;
++ else if (axis->widths[0].cur < 288) dist = 254;
++ else dist = ( dist + 16 ) & ~63;
++ }
++
++ /* fix any unusually low values */
++ if (dist < ( axis->widths[0].cur & ~63 ) )
++ dist = (axis->widths[0].cur & ~63);
++
++ /* fix any unusually high values */
++ if (dist > ( ( axis->widths[0].cur + 64 ) & ~63 ) )
++ dist = ( ( axis->widths[0].cur + 64 ) & ~63 );
++
++ if (dist < 64 ) dist = 64 ;
++
++ }
++ if (dist < 52)
++ {
++ if (metrics->root.scaler.face->size->metrics.x_ppem < 9 )
++ {
++ /*dist = 64 - (64 - dist) / 2 ;*/
++ if (dist < 31) dist = 31;
++ }
++ else
++ dist = 52;
++ }
++
++ }
++ else if ( !stem_snap_light && (( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||
++ ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) ) )
+ {
+ /* smooth hinting process: very lightly quantize the stem width */
+
+@@ -1569,7 +1702,7 @@
+ dist = ( dist + 32 ) & ~63;
+ }
+ }
+- else
++ else if (!stem_snap_light)
+ {
+ /* strong hinting process: snap the stem width to integer pixels */
+ FT_Pos org_dist = dist;
+@@ -1577,6 +1710,8 @@
+
+ dist = af_latin_snap_width( axis->widths, axis->width_count, dist );
+
++ if ( stem_snap_light ) goto Done_Width;
++
+ if ( vertical )
+ {
+ /* in the case of vertical hinting, always round */
+@@ -2100,7 +2235,30 @@
+ {
+ FT_Error error;
+ int dim;
++ int e_strength = 0;
++
++ int checked_embolden_light_env = 0;
++ FT_Bool embolden_light = FALSE;
+
++ if ( checked_embolden_light_env == 0 )
++ {
++ char *embolden_light_env = getenv( "INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT" );
++ if ( embolden_light_env != NULL )
++ {
++ if ( strcasecmp(embolden_light_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(embolden_light_env, "true") == 0)
++ embolden_light = TRUE;
++ else if ( strcasecmp(embolden_light_env, "1") == 0)
++ embolden_light = TRUE;
++ else if ( strcasecmp(embolden_light_env, "on") == 0)
++ embolden_light = TRUE;
++ else if ( strcasecmp(embolden_light_env, "yes") == 0)
++ embolden_light = TRUE;
++ }
++ }
++ checked_embolden_light_env = 1;
++ }
+
+ error = af_glyph_hints_reload( hints, outline );
+ if ( error )
+@@ -2146,8 +2304,15 @@
+ }
+ #endif
+
+- if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) ||
+- ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) ) )
++ if ( ( dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL( hints ) ) )
++ {
++ af_latin_hint_edges( hints, (AF_Dimension)dim );
++ af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim );
++ af_glyph_hints_align_strong_points( hints, (AF_Dimension)dim );
++ af_glyph_hints_align_weak_points( hints, (AF_Dimension)dim );
++ }
++
++ if ( ( dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL( hints ) ) )
+ {
+ af_latin_hint_edges( hints, (AF_Dimension)dim );
+ af_glyph_hints_align_edge_points( hints, (AF_Dimension)dim );
+@@ -2157,6 +2322,34 @@
+ }
+ af_glyph_hints_save( hints, outline );
+
++ /* if the font is particularly thin, embolden it, up to 1 px */
++ if ( embolden_light
++ && metrics->axis->widths[0].cur <= 80
++ && !( dim == AF_DIMENSION_VERT )
++ && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) )
++ {
++ if ( metrics->axis->widths[0].cur
++ / metrics->root.scaler.face->size->metrics.x_ppem < 5 )
++ {
++ /* weakest at width 80, stronger at lower widths */
++ e_strength = 40 * ( 80 - metrics->axis->widths[0].cur)/80 ;
++ /* Don't do low ppems as much */
++ if ( metrics->root.scaler.face->size->metrics.x_ppem < 9 )
++ e_strength -=
++ ( 9 - metrics->root.scaler.face->size->metrics.x_ppem ) * 10;
++ }
++
++ /* Embolden small fonts on a sliding scale. Better readability. */
++ if ( e_strength > 0
++ && ( strstr(metrics->root.scaler.face->style_name, "Regular")
++ || strstr(metrics->root.scaler.face->style_name, "Book")
++ || strstr(metrics->root.scaler.face->style_name, "Light")
++ || strstr(metrics->root.scaler.face->style_name, "Medium")
++ || strcmp(metrics->root.scaler.face->style_name, "Italic") == 0
++ || strcmp(metrics->root.scaler.face->style_name, "Oblique") == 0 ) )
++ FT_Outline_Embolden(outline,e_strength);
++ }
++
+ Exit:
+ return error;
+ }
+diff -Nur freetype-2.4.3.orig/src/autofit/afloader.c freetype-2.4.3.new/src/autofit/afloader.c
+--- freetype-2.4.3.orig/src/autofit/afloader.c 2009-07-03 08:28:24.000000000 -0500
++++ freetype-2.4.3.new/src/autofit/afloader.c 2010-10-22 22:22:04.073099288 -0500
+@@ -180,8 +180,8 @@
+ AF_Edge edge2 = edge1 +
+ axis->num_edges - 1; /* rightmost edge */
+
+-
+- if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
++/* dont hint metrics - temporary until different hinting can be done */
++ if ( FALSE && axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
+ {
+ old_rsb = loader->pp2.x - edge2->opos;
+ old_lsb = edge1->opos;
+@@ -214,7 +214,8 @@
+ slot->lsb_delta = loader->pp1.x - pp1x_uh;
+ slot->rsb_delta = loader->pp2.x - pp2x_uh;
+ }
+- else
++/* dont hint metrics - temporary until different hinting can be done */
++ else if (FALSE)
+ {
+ FT_Pos pp1x = loader->pp1.x;
+ FT_Pos pp2x = loader->pp2.x;
+diff -Nur freetype-2.4.3.orig/src/base/ftlcdfil.c freetype-2.4.3.new/src/base/ftlcdfil.c
+--- freetype-2.4.3.orig/src/base/ftlcdfil.c 2010-04-01 03:18:57.000000000 -0500
++++ freetype-2.4.3.new/src/base/ftlcdfil.c 2010-11-14 18:33:58.300770778 -0600
+@@ -21,9 +21,659 @@
+ #include FT_IMAGE_H
+ #include FT_INTERNAL_OBJECTS_H
+
++#include <math.h>
++#include <string.h>
++#include <strings.h>
+
+ #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
++/*
++int sinc( int val ) {
++ if (val == 0.0)
++ return(1.0);
++ return 256.0 * (sin(3.14*(double) (val/256.0))/(3.14*(double) (val/256.0)));
++}
++
++int sigmoidal( int val ) {
++ int val2;
++ val2 = 256.0 /(1.0+exp(-(10.0*(val/256.0-.5))));
++ return window(val2);
++}
++
++int window ( int val )
++{
++ if (val < 0 ) return 0;
++ if (val > 255) return 255;
++ else return val;
++}
++*/
++int gamma2 ( int val, float value ) {
++ return 256 * (1.0 - pow((1.0 - (float)val/ 256.0) , 1.0/value));
++}
++/*
++int gamma3 ( int val, float value ) {
++ 1- (x-1)^10
++}
++*/
++/*
++int gamma ( int val ) {
++ return 256 * (1.0 - pow((1.0 - (float)val/ 256.0) , 1.5));
++}
++
++int brick (int val) {
++ if (val > 50) return val;
++ else return 0;
++}
++
++int brick2 (int val) {
++ if (val > 100) return val;
++ if (val > 50) return 100;
++ else return 0;
++}
++
++int none (int val) {
++ return val;
++}
++
++float pixmoid (int val1, int val2, int val3, int testval)
++{
++ int avg;
++ int result;
++
++ avg = (val1 + val2 + val3)/3;
++
++ if ( avg < 128 )
++ {
++ if (testval > 128) result = avg;
++ else result = testval;
++ }
++ else
++ {
++ if (testval < 128) result = avg;
++ else result = testval;
++ }
++
++ return none(result);
++}
++
++float pixmoid2 (int val1, int val2, int val3, int testval)
++{
++ int avg;
++ int result;
++
++ avg = (val1 + val2 + val3)/3;
++
++ if ( avg > 160 ) return 255;
++ else if ( avg < 100 ) return 0;
++ else return testval;
++
++ return none(result);
++
++}
++*/
++/*
++bool Resample(FT_Byte* line, int newWidth, int newHeight)
++{
++
++ unsigned char* newData = new unsigned char [newWidth * newHeight * 3];
++
++ double scaleWidth = (double)newWidth / (double)_width;
++ double scaleHeight = (double)newHeight / (double)_height;
++
++ for(int cy = 0; cy < newHeight; cy++)
++ {
++ for(int cx = 0; cx < newWidth; cx++)
++ {
++ int pixel = (cy * (newWidth *3)) + (cx*3);
++ int nearestMatch = (((int)(cy / scaleHeight)
++ * (_width *3)) + ((int)(cx / scaleWidth) *3) );
++
++ newData[pixel ] = _data[nearestMatch ];
++ newData[pixel + 1] = _data[nearestMatch + 1];
++ newData[pixel + 2] = _data[nearestMatch + 2];
++ }
++ }
++
++ delete[] _data;
++ _data = newData;
++ _width = newWidth;
++ _height = newHeight;
++
++ return true;
++}*/
++
++
++ /* Stem alignment for bitmaps; A hack with very nice results */
++ /* Ideally this could be implemented on the outline, prior to
++ * rasterization */
++ static void
++ _lcd_stem_align ( FT_Bitmap* bitmap,
++ FT_Render_Mode mode,
++ FT_GlyphSlot slot )
++ {
++ /*FT_Byte* weights = library->lcd_weights;*/
++ FT_UInt width = (FT_UInt)bitmap->width;
++ FT_UInt height = (FT_UInt)bitmap->rows;
++
++ FT_UInt h;
++
++ FT_UInt alignment_type = 0;
++ FT_UInt checked_alignment_type = 0;
++ float pseudo_gamma_value = 1;
++ float pseudo_gamma_lt = 0;
++ FT_UInt checked_pseudo_gamma_value = 0;
++
++ if ( checked_alignment_type == 0)
++ {
++ char *alignment_type_env = getenv( "INFINALITY_FT_STEM_ALIGNMENT_TYPE" );
++ if ( alignment_type_env != NULL )
++ {
++ /*sscanf ( alignment_type_env, "%d", &alignment_type );*/
++ if (strcasecmp(alignment_type_env, "full") == 0) alignment_type = 1;
++ else if (strcasecmp(alignment_type_env, "medium") == 0) alignment_type = 2;
++ else if (strcasecmp(alignment_type_env, "medium1") == 0) alignment_type = 2;
++ else if (strcasecmp(alignment_type_env, "slight") == 0) alignment_type = 3;
++ else if (strcasecmp(alignment_type_env, "slight1") == 0) alignment_type = 3;
++ else if (strcasecmp(alignment_type_env, "medium2") == 0) alignment_type = 4;
++ else if (strcasecmp(alignment_type_env, "slight2") == 0) alignment_type = 5;
++ else if (strcasecmp(alignment_type_env, "infinality") == 0) alignment_type = 6;
++ else if (strcasecmp(alignment_type_env, "infinality1") == 0) alignment_type = 6;
++ else alignment_type = 0;
++
++ if ( /*strstr(slot.metrics->root.scaler.face->style_name, "Regular")
++ || strstr(slot.metrics->root.scaler.face->style_name, "Book")
++ || strstr(slot.metrics->root.scaler.face->style_name, "Medium")
++ ||*/ strcasestr(slot->face->style_name, "Italic")
++ || strcasestr(slot->face->style_name, "Oblique") )
++ alignment_type = 0;
++ if ( strcasestr(slot->face->style_name, "Bold") )
++ alignment_type = 0;
++ }
++ checked_alignment_type = 1;
++ }
++
++ if ( checked_pseudo_gamma_value == 0 )
++ {
++ char *pseudo_gamma_value_env = getenv( "INFINALITY_FT_PSEUDO_GAMMA" );
++ if ( pseudo_gamma_value_env != NULL )
++ {
++ float f1, f2;
++
++ if ( strcasecmp(pseudo_gamma_value_env, "default" ) != 0)
++ {
++ sscanf ( pseudo_gamma_value_env, "%f %f", &f1, &f2 );
++ pseudo_gamma_lt = f1;
++ pseudo_gamma_value = f2;
++ }
++ if ( pseudo_gamma_value < .1 ) pseudo_gamma_value = 1;
++ if ( pseudo_gamma_lt < 0 ) pseudo_gamma_lt = 1;
++ }
++ checked_pseudo_gamma_value = 1;
++ }
++
++ /*printf("%s,%s ", slot->face->family_name, slot->face->style_name);*/
++ /*printf("%d ", slot->face->size->metrics.x_ppem);*/
++
++ /* set gamma value to 1 if out of range */
++ if ( slot->face->size->metrics.x_ppem >= pseudo_gamma_lt )
++ {
++ pseudo_gamma_value = 1;
++ }
++
++ /* don't do alignment for < 10 */
++ if ( slot->face->size->metrics.x_ppem < 10 )
++ {
++ alignment_type = 0;
++ }
++
++ if ( mode == FT_RENDER_MODE_LCD )
++ {
++ if (width >= 4 && alignment_type != 0 )
++ {
++ FT_Byte* line = bitmap->buffer;
++ FT_Byte* lineabove = bitmap->buffer;
++ FT_Byte* linebelow = bitmap->buffer;
++
++ FT_UInt vsums[width], vtotals[width], offsetruns[width / 2][width/2];
++ FT_UInt offsetrank[width/2], offsetchosen, stemwidths[width], stemwidthsmax;
++ FT_UInt stemwidth, vstems = 0;
++
++ FT_UInt shift = 0;
++ FT_UInt xx;
++
++ FT_ULong rtotal = 0, vweight = 0, wtotal = 0;
++ FT_UInt lreached = 0, rreached = 0, rr = 0, ll = 0, testwidth;
++ FT_UInt lwidth = 0, loffset = 0, offset = 0, htotal = 0, windowstart;
++ FT_UInt windowelement;
++
++ line = bitmap->buffer;
++ rreached = 0; lreached = width, ll = width;
++
++ lwidth = 0;
++ loffset = 0;
++
++
++ /* initialize variables - can this be done inline??? */
++ for ( testwidth = 3; testwidth < 4; testwidth += 1 )
++ {
++ for ( offset = 0; offset < 3; offset +=1 )
++ {
++ offsetruns[offset][testwidth] = 0;
++ offsetrank[offset] = 0;
++ }
++ }
++ for ( xx = 0; xx < width; xx += 1 )
++ {
++ stemwidths[xx] = 0;
++ }
++
++
++ for ( h = (FT_UInt)bitmap->rows; h > 0; h--, line += bitmap->pitch )
++ {
++
++ if (rr > rreached) rreached = rr;
++ if (ll < lreached) lreached = ll;
++
++ rr = width;
++ ll = 0;
++ rtotal = 0;
++ htotal = 0;
++
++ /*stemwidthsmax = 0;*/
++ stemwidth = 0;
++
++
++ /* Calculate various sums and stem widths of glyph */
++ for ( xx = 0; xx < width; xx += 1 )
++ {
++ if (line[xx] >= 128)
++ {
++ stemwidth += 1;
++ /*if (stemwidth > stemwidthsmax) stemwidthsmax = stemwidth;*/ /* necessary ? */
++ }
++ else
++ {
++ if (xx > 0 && line[xx - 1] >= 128) stemwidths[stemwidth] += 1;
++ stemwidth = 0;
++ }
++
++ if (h == (FT_UInt)bitmap->rows) vsums[xx] = 0;
++ if ( h == (FT_UInt)bitmap->rows ) vtotals[xx] = 0;
++
++ if (line[xx] == 0) vsums[xx] -= 255;
++ else vsums[xx] += line[xx];
++ if (vsums[xx] < 0) vsums[xx] = 0;
++
++ if (ll == 0 && line[xx] != 0) ll = (xx);
++
++ if (line[xx] != 0) rr = (xx);
++
++ if (xx < width / 2) vweight -= line[xx];
++ else vweight += line[xx];
++
++ htotal += line [xx];
++ vtotals[xx] += line[xx];
++ }
++
++ if ( h < (FT_UInt)bitmap->rows ) lineabove = line - bitmap->pitch;
++ if ( h > 1 ) linebelow = line + bitmap->pitch;
++
++
++ /* Determine the offset at which the most weight of the glyph exists */
++ /* This is currently hard-coded at 3, but the code is here to adjust */
++ for ( testwidth = 3; testwidth < 4; testwidth += 1 )
++ {
++ /* test the widths at each of these offsets */
++ for ( offset = 0; offset < 3; offset +=1 )
++ {
++ /* test window of size testwidth, starting at offset */
++ rtotal = 0;
++ for ( windowstart = offset; windowstart < width;
++ windowstart += testwidth )
++ {
++ /* calculate total for this window */
++ wtotal = 0;
++ for ( windowelement = windowstart;
++ windowelement < windowstart + testwidth; windowelement += 1 )
++ if ( windowelement < width)
++ {
++ wtotal += line[windowelement];
++
++ /* Assign extra value to this subpixel under certain conditions */
++ if ( line[windowelement] == 255 )
++ {
++ /* favor if full pixels above and below */
++ if ( h < (FT_UInt)bitmap->rows
++ && lineabove[windowelement] == 255 )
++ wtotal += 10;
++ if ( h > 1 && linebelow[windowelement] == 255 )
++ wtotal += 10;
++
++ /* favor if full pixels next to them */
++ if ( windowelement > 0 && line[windowelement-1] == 255 )
++ {
++ wtotal += 10;
++ if ( windowelement > 1 && line[windowelement-2] == 255 )
++ {
++ wtotal += 10;
++ if ( windowelement > 2 && line[windowelement-3] == 255 )
++ wtotal += 10;
++ }
++ }
++ if ( windowelement < width - 1 && line[windowelement+1] == 255 )
++ {
++ wtotal += 10;
++ if ( windowelement < width - 2 && line[windowelement+2] == 255 )
++ {
++ wtotal += 10;
++ if ( windowelement < width - 3 && line[windowelement+3] == 255 )
++ wtotal += 10;
++ }
++ }
++ }
++ }
++ /* divide window total by number of subpixel samples */
++ /* add to total for this run */
++ rtotal += (wtotal * wtotal) / testwidth;
++ }
++ /* dont count horizontal stems */
++ /*if (rtotal < ( 255 * testwidth ) * (255 * testwidth) * (width / testwidth) / (testwidth * 2) )*/
++ if ( rtotal < ( 255 * 255 * width / 2 ) )
++ offsetruns[offset][testwidth] += rtotal;
++ }
++
++ /* determine the best offset for this width and increment its counter */
++ offsetchosen = 0;
++ for ( offset = 0; offset < 2; offset +=1 )
++ {
++ if ( offsetruns[offset][testwidth] < offsetruns[offset + 1][testwidth] ){
++ offsetrank[offset + 1] += 1;
++ offsetchosen = offset;
++ }
++ }
++ if (offsetchosen == 0) offsetrank[0] += 1;
++ }
++ }
++
++ /* Use the best offset */
++ loffset = 0;
++ for ( offset = 0; offset < 2; offset +=1 )
++ {
++ if ( offsetrank[offset] < offsetrank[offset + 1] ){
++ loffset = offset + 1;
++ }
++ }
++
++ /* Use the best width */
++ lwidth = 0;
++ stemwidthsmax = 0;
++
++ for ( xx = 0; xx < width - 1; xx +=1 )
++ {
++ if ( stemwidthsmax < stemwidths[xx + 1] ){
++ lwidth = xx + 1;
++ stemwidthsmax = stemwidths[xx + 1];
++ }
++ }
++
++ /* currently unused */
++ rreached = width - rreached;
++
++ /* Set the number of vertical stem components */
++ for ( xx = 0; xx < width; xx += 1 )
++ {
++ if ( height > 0 && vsums[xx] / height > 110 )
++ vstems++;
++ }
++
++
++ /******************** CALCULATE GLYPH ALIGNMENT *********************/
++ /*printf(" %d,%d,%d,%d,%d,%d,%d\n", width, height, lreached,
++ rreached, lwidth,vstems,alignment_type );*/
++
++ shift = 0;
++
++ /* infinality1 alignment - combination of below */
++ if ( alignment_type == 6 )
++ {
++ if ( lwidth < 5 ) alignment_type = 2;
++ else alignment_type = 1;
++ }
++
++ /* strong alignment - shift glyph left or right one subpixel */
++ if ( alignment_type == 1 /*&& vstems > 0*/ )
++ {
++ if ( lwidth < 5)
++ {
++ /* lower widths should use this */
++ if (loffset % 3 == 0) shift = -1;
++ if (loffset % 3 == 1) shift = 1;
++ if (loffset % 3 == 2) shift = 0;
++ }
++ else if ( lwidth < 6 )
++ {
++ /* medium widths should use this */
++ if (loffset % 3 == 0) shift = 1;
++ if (loffset % 3 == 1) shift = 0;
++ if (loffset % 3 == 2) shift = -1;
++ }
++ else if ( lwidth < 20 )
++ {
++ /* higher widths should use this */
++ if (loffset % 3 == 0) shift = 1;
++ if (loffset % 3 == 1) shift = -1;
++ if (loffset % 3 == 2) shift = 0;
++ }
++ }
++
++ /* medium alignment - shift glyph ONLY LEFT one subpixel
++ * - a compromise to prevent spacing issues */
++ else if ( alignment_type == 2 /*&& vstems > 0*/ ){
++
++ if ( lwidth < 5 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 1 && offsetrank[0] > offsetrank[2] ) loffset = 0;
++
++ if ( loffset % 3 == 0 ) shift = -1;
++ /*if (loffset % 3 == 1 ) shift = 1;*/
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ else if (lwidth < 6 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 0 && offsetrank[2] > offsetrank[1] ) loffset = 2;
++ /*if (loffset % 3 == 0 ) shift = 1;*/
++ if ( loffset % 3 == 1 ) shift = 0;
++ if ( loffset % 3 == 2 ) shift = -1;
++ }
++ else if ( lwidth < 20 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 0 && offsetrank[1] > offsetrank[2] ) loffset = 1;
++ /*if (loffset % 3 == 0 ) shift = 1;*/
++ if ( loffset % 3 == 1 ) shift = -1;
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ }
++
++ /* medium alignment 2 - shift glyph ONLY RIGHT one subpixel
++ * - a compromise to prevent spacing issues */
++ else if ( alignment_type == 4 ){
++ if ( lwidth < 5 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 0 && offsetrank[1] > offsetrank[2] ) loffset = 1;
++
++ /*if ( loffset % 3 == 0 ) shift = -1;*/
++ if ( loffset % 3 == 1 ) shift = 1;
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ else if ( lwidth < 6 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 2 && offsetrank[0] > offsetrank[1] ) loffset = 0;
++ if ( loffset % 3 == 0 ) shift = 1;
++ if ( loffset % 3 == 1 ) shift = 0;
++ /*if ( loffset % 3 == 2 ) shift = -1;*/
++ }
++ else if ( lwidth < 20 )
++ {
++ /* medium alignment - use next highest value instead */
++ if ( loffset == 1 && offsetrank[0] > offsetrank[2] ) loffset = 0;
++ if ( loffset % 3 == 0 ) shift = 1;
++ /*if (loffset % 3 == 1 ) shift = -1;*/
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ }
++
++ /* light alignment - shift glyph ONLY LEFT one subpixel
++ * - a compromise to prevent spacing issues */
++ else if ( alignment_type == 3 ){
++ if ( lwidth < 5 )
++ {
++ if ( loffset % 3 == 0 ) shift = -1;
++ /*if ( loffset % 3 == 1 ) shift = 1;*/
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ else if ( lwidth < 6 )
++ {
++ /*if ( loffset % 3 == 0 ) shift = 1;*/
++ if ( loffset % 3 == 1 ) shift = 0;
++ if ( loffset % 3 == 2 ) shift = -1;
++ }
++ else if ( lwidth < 20 )
++ {
++ /*if ( loffset % 3 == 0 ) shift = 1;*/
++ if ( loffset % 3 == 1 ) shift = -1;
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ }
++
++ /* light alignment 2 - shift glyph ONLY RIGHT one subpixel
++ * - a compromise to prevent spacing issues */
++ else if ( alignment_type == 5 ){
++ if ( lwidth < 5 )
++ {
++ /*if ( loffset % 3 == 0 ) shift = -1;*/
++ if ( loffset % 3 == 1 ) shift = 1;
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ else if ( lwidth < 6 )
++ {
++ if ( loffset % 3 == 0 ) shift = 1;
++ if ( loffset % 3 == 1 ) shift = 0;
++ /*if ( loffset % 3 == 2 ) shift = -1;*/
++ }
++ else if ( lwidth < 20 )
++ {
++ if ( loffset % 3 == 0 ) shift = 1;
++ /*if ( loffset % 3 == 1 ) shift = -1;*/
++ if ( loffset % 3 == 2 ) shift = 0;
++ }
++ }
++
++ /******************** ALIGN GLYPHS *********************/
++ if (shift == -1)
++ {
++ line = bitmap->buffer;
++ for ( height = (FT_UInt)bitmap->rows; height > 0; height--,
++ line += bitmap->pitch )
++ {
++ FT_UInt xx;
++
++ for ( xx = 0; xx < width - 1; xx += 1 )
++ {
++ line[xx] = line[xx+1];
++ }
++ line[width - 1] = 1;
++ }
++ }
++
++ else if (shift == -2)
++ {
++ line = bitmap->buffer;
++ for ( height = (FT_UInt)bitmap->rows; height > 0; height--,
++ line += bitmap->pitch )
++ {
++ FT_UInt xx;
++
++ for ( xx = 0; xx < width - 2; xx += 1 )
++ {
++ line[xx] = line[xx+2];
++ }
++ line[width - 2] = 1;
++ line[width - 1] = 1;
++ }
++ }
++ else if (shift == 1)
++ {
++ line = bitmap->buffer;
++ for ( height = (FT_UInt)bitmap->rows; height > 0; height--,
++ line += bitmap->pitch )
++ {
++ FT_UInt xx;
++
++ for ( xx = width - 1; xx > 0; xx -= 1 )
++ {
++ line[xx] = line[xx-1];
++ }
++ line[0] = 1;
++ }
++ }
++ else if (shift == 2)
++ {
++ line = bitmap->buffer;
++ for ( height = (FT_UInt)bitmap->rows; height > 0; height--,
++ line += bitmap->pitch )
++ {
++ FT_UInt xx;
++
++ for ( xx = width; xx > 1; xx -= 1 )
++ {
++ line[xx] = line[xx-2];
++ }
++ line[0] = 1;
++ line[1] = 1;
++ }
++ }
++ }
++
++ if ( pseudo_gamma_value != 1 )
++ {
++ FT_Byte* line = bitmap->buffer;
++ float ppem = (float)slot->face->size->metrics.x_ppem;
++
++ if (ppem >= 5 )
++ for (height = (FT_UInt)bitmap->rows; height > 0; height--, line += bitmap->pitch )
++ {
++ FT_UInt xx;
++
++ for ( xx = 0; xx < width; xx += 1 )
++ {
++ /*normal*/
++ /*line[xx] = gamma2 ( line[xx], pseudo_gamma_value );*/
++
++ /* sloped */
++ /*line[xx] = gamma2 ( line[xx], pseudo_gamma_value - 5
++ * (1-pseudo_gamma_value)/(pseudo_gamma_lt -5)
++ + ((1-pseudo_gamma_value)/(pseudo_gamma_lt -5)) * ppem );*/
++
++ /* 1/3-sloped */
++ line[xx] = gamma2 ( line[xx], pseudo_gamma_value - 5
++ * ((1-pseudo_gamma_value)/(3*(pseudo_gamma_lt -5)))
++ * + ((1-pseudo_gamma_value)/(3*(pseudo_gamma_lt -5))) * ppem );
++ }
++ }
++ }
++ }
++ }
++
++
++
++
++
++
+ /* define USE_LEGACY to implement the legacy filter */
+ #define USE_LEGACY
+
+@@ -287,9 +1017,31 @@
+ { 0x00, 0x55, 0x56, 0x55, 0x00 };
+ /* the values here sum up to a value larger than 256, */
+ /* providing a cheap gamma correction */
+- static const FT_Byte default_filter[5] =
++ static FT_Byte default_filter[5] =
+ { 0x10, 0x40, 0x70, 0x40, 0x10 };
+
++ int checked_filter_params_env = 0;
++
++ if ( checked_filter_params_env == 0 )
++ {
++ char *filter_params = getenv( "INFINALITY_FT_FILTER_PARAMS" );
++ if ( filter_params != NULL )
++ {
++ float f1, f2, f3, f4, f5;
++
++ if ( strcasecmp(filter_params, "default" ) != 0)
++ {
++ sscanf ( filter_params, "%f %f %f %f %f", &f1, &f2, &f3, &f4, &f5 );
++
++ default_filter[0] = (FT_Byte) (f1 * 255.0f + 0.5f);
++ default_filter[1] = (FT_Byte) (f2 * 255.0f + 0.5f);
++ default_filter[2] = (FT_Byte) (f3 * 255.0f + 0.5f);
++ default_filter[3] = (FT_Byte) (f4 * 255.0f + 0.5f);
++ default_filter[4] = (FT_Byte) (f5 * 255.0f + 0.5f);
++ }
++ }
++ checked_filter_params_env = 1;
++ }
+
+ if ( !library )
+ return FT_Err_Invalid_Argument;
+@@ -304,17 +1056,20 @@
+ case FT_LCD_FILTER_DEFAULT:
+ #if defined( FT_FORCE_LEGACY_LCD_FILTER )
+
++ library->lcd_stem_align_func = _lcd_stem_align;
+ library->lcd_filter_func = _ft_lcd_filter_legacy;
+ library->lcd_extra = 0;
+
+ #elif defined( FT_FORCE_LIGHT_LCD_FILTER )
+
++ library->lcd_stem_align_func = _lcd_stem_align;
+ ft_memcpy( library->lcd_weights, light_filter, 5 );
+ library->lcd_filter_func = _ft_lcd_filter_fir;
+ library->lcd_extra = 2;
+
+ #else
+
++ library->lcd_stem_align_func = _lcd_stem_align;
+ ft_memcpy( library->lcd_weights, default_filter, 5 );
+ library->lcd_filter_func = _ft_lcd_filter_fir;
+ library->lcd_extra = 2;
+@@ -325,6 +1080,7 @@
+
+ case FT_LCD_FILTER_LIGHT:
+ ft_memcpy( library->lcd_weights, light_filter, 5 );
++ library->lcd_stem_align_func = _lcd_stem_align;
+ library->lcd_filter_func = _ft_lcd_filter_fir;
+ library->lcd_extra = 2;
+ break;
+@@ -332,6 +1088,7 @@
+ #ifdef USE_LEGACY
+
+ case FT_LCD_FILTER_LEGACY:
++ library->lcd_stem_align_func = _lcd_stem_align;
+ library->lcd_filter_func = _ft_lcd_filter_legacy;
+ library->lcd_extra = 0;
+ break;
+diff -Nur freetype-2.4.3.orig/src/base/ftobjs.c freetype-2.4.3.new/src/base/ftobjs.c
+--- freetype-2.4.3.orig/src/base/ftobjs.c 2010-08-06 13:02:15.000000000 -0500
++++ freetype-2.4.3.new/src/base/ftobjs.c 2010-11-14 15:43:02.906303324 -0600
+@@ -562,6 +562,45 @@
+ FT_Bool autohint = FALSE;
+ FT_Module hinter;
+
++ TT_Face face2=(TT_Face)face;
++ int checked_auto_autohint_env;
++ FT_Bool auto_autohint = FALSE;
++
++ if ( !checked_auto_autohint_env )
++ {
++ char *auto_autohint_env = getenv( "INFINALITY_FT_AUTO_AUTOHINT" );
++ if ( auto_autohint_env != NULL )
++ {
++ if ( strcasecmp(auto_autohint_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(auto_autohint_env, "true") == 0) auto_autohint = TRUE;
++ else if ( strcasecmp(auto_autohint_env, "1") == 0) auto_autohint = TRUE;
++ else if ( strcasecmp(auto_autohint_env, "on") == 0) auto_autohint = TRUE;
++ else if ( strcasecmp(auto_autohint_env, "yes") == 0) auto_autohint = TRUE;
++ }
++ }
++ checked_auto_autohint_env = 1;
++ }
++/*printf("%d,%d ", load_flags, FT_LOAD_TARGET_NORMAL);
++10000001000101000
++0#define FT_LOAD_DEFAULT 0x0
++0#define FT_LOAD_NO_SCALE 0x1
++0#define FT_LOAD_NO_HINTING 0x2
++1#define FT_LOAD_RENDER 0x4
++0#define FT_LOAD_NO_BITMAP 0x8
++1#define FT_LOAD_VERTICAL_LAYOUT 0x10
++0#define FT_LOAD_FORCE_AUTOHINT 0x20
++0#define FT_LOAD_CROP_BITMAP 0x40
++0#define FT_LOAD_PEDANTIC 0x80
++1#define FT_LOAD_ADVANCE_ONLY 0x100
++0#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200
++0#define FT_LOAD_NO_RECURSE 0x400
++0#define FT_LOAD_IGNORE_TRANSFORM 0x800
++0#define FT_LOAD_MONOCHROME 0x1000
++0#define FT_LOAD_LINEAR_DESIGN 0x2000
++0#define FT_LOAD_SBITS_ONLY 0x4000
++1#define FT_LOAD_NO_AUTOHINT 0x8000U
++*/
+
+ if ( !face || !face->size || !face->glyph )
+ return FT_Err_Invalid_Face_Handle;
+@@ -627,8 +666,11 @@
+
+
+ if ( mode == FT_RENDER_MODE_LIGHT ||
+- face->internal->ignore_unpatented_hinter )
++ face->internal->ignore_unpatented_hinter ||
++ ( auto_autohint && face2->max_profile.maxSizeOfInstructions == 0 ) )
++ {
+ autohint = TRUE;
++ }
+ }
+ }
+
+diff -Nur freetype-2.4.3.orig/src/base/ftoutln.c freetype-2.4.3.new/src/base/ftoutln.c
+--- freetype-2.4.3.orig/src/base/ftoutln.c 2010-06-27 08:03:58.000000000 -0500
++++ freetype-2.4.3.new/src/base/ftoutln.c 2010-11-14 09:06:38.779916717 -0600
+@@ -888,6 +888,28 @@
+ FT_Int c, n, first;
+ FT_Int orientation;
+
++ int checked_enhanced_embolden_env = 0;
++ FT_Bool enhanced_embolden = FALSE;
++
++ if ( checked_enhanced_embolden_env == 0 )
++ {
++ char *enhanced_embolden_env = getenv( "INFINALITY_FT_ENHANCED_EMBOLDEN" );
++ if ( enhanced_embolden_env != NULL )
++ {
++ if ( strcasecmp(enhanced_embolden_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(enhanced_embolden_env, "true") == 0)
++ enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "1") == 0)
++ enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "on") == 0)
++ enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "yes") == 0)
++ enhanced_embolden = TRUE;
++ }
++ }
++ checked_enhanced_embolden_env = 1;
++ }
+
+ if ( !outline )
+ return FT_Err_Invalid_Argument;
+@@ -957,7 +979,8 @@
+ }
+
+ outline->points[n].x = v_cur.x + strength + in.x;
+- outline->points[n].y = v_cur.y + strength + in.y;
++ if ( !enhanced_embolden )
++ outline->points[n].y = v_cur.y + strength + in.y;
+
+ v_prev = v_cur;
+ v_cur = v_next;
+diff -Nur freetype-2.4.3.orig/src/base/ftsynth.c freetype-2.4.3.new/src/base/ftsynth.c
+--- freetype-2.4.3.orig/src/base/ftsynth.c 2010-09-11 01:28:32.000000000 -0500
++++ freetype-2.4.3.new/src/base/ftsynth.c 2010-11-14 09:19:16.860168106 -0600
+@@ -88,9 +88,28 @@
+ FT_Error error;
+ FT_Pos xstr, ystr;
+
++ int checked_enhanced_embolden_env = 0;
++ FT_Bool enhanced_embolden = FALSE;
++
++ if ( checked_enhanced_embolden_env == 0 )
++ {
++ char *enhanced_embolden_env = getenv( "INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH" );
++ if ( enhanced_embolden_env != NULL )
++ {
++ if ( strcasecmp(enhanced_embolden_env, "default" ) != 0 )
++ {
++ if ( strcasecmp(enhanced_embolden_env, "true") == 0) enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "1") == 0) enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "on") == 0) enhanced_embolden = TRUE;
++ else if ( strcasecmp(enhanced_embolden_env, "yes") == 0) enhanced_embolden = TRUE;
++ }
++ }
++ checked_enhanced_embolden_env = 1;
++ }
++
+
+ if ( slot->format != FT_GLYPH_FORMAT_OUTLINE &&
+- slot->format != FT_GLYPH_FORMAT_BITMAP )
++ slot->format != FT_GLYPH_FORMAT_BITMAP )
+ return;
+
+ /* some reasonable strength */
+@@ -108,7 +127,7 @@
+ xstr = xstr * 2;
+ ystr = xstr;
+ }
+- else /* slot->format == FT_GLYPH_FORMAT_BITMAP */
++ else if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
+ {
+ /* round to full pixels */
+ xstr &= ~63;
+@@ -146,7 +165,8 @@
+ slot->metrics.width += xstr;
+ slot->metrics.height += ystr;
+ slot->metrics.horiBearingY += ystr;
+- slot->metrics.horiAdvance += xstr;
++ /* Don't add any horiAdvance - Personal preference */
++ if ( !enhanced_embolden ) slot->metrics.horiAdvance += xstr;
+ slot->metrics.vertBearingX -= xstr / 2;
+ slot->metrics.vertBearingY += ystr;
+ slot->metrics.vertAdvance += ystr;
+diff -Nur freetype-2.4.3.orig/src/smooth/ftsmooth.c freetype-2.4.3.new/src/smooth/ftsmooth.c
+--- freetype-2.4.3.orig/src/smooth/ftsmooth.c 2010-08-09 19:47:47.000000000 -0500
++++ freetype-2.4.3.new/src/smooth/ftsmooth.c 2010-11-07 11:17:08.693652341 -0600
+@@ -283,6 +283,9 @@
+ vec->y /= 3;
+ }
+
++ if ( slot->library->lcd_stem_align_func )
++ slot->library->lcd_stem_align_func ( bitmap, mode, slot );
++
+ if ( slot->library->lcd_filter_func )
+ slot->library->lcd_filter_func( bitmap, mode, slot->library );
diff --git a/testing/freetype-infinality/freetype2-infinality-protect_null_pointer-goddesse.patch b/testing/freetype-infinality/freetype2-infinality-protect_null_pointer-goddesse.patch
new file mode 100644
index 000000000..43143e69e
--- /dev/null
+++ b/testing/freetype-infinality/freetype2-infinality-protect_null_pointer-goddesse.patch
@@ -0,0 +1,71 @@
+Contributed by goddesse
+https://bbs.archlinux.org/viewtopic.php?pid=864901#p864901
+
+diff -Naur freetype-2.4.4/src/base/ftlcdfil.c freetype-2.4.4.new/src/base/ftlcdfil.c
+--- freetype-2.4.4/src/base/ftlcdfil.c 2010-12-12 12:05:21.606671258 -0600
++++ freetype-2.4.4.new/src/base/ftlcdfil.c 2010-12-12 12:08:17.726671242 -0600
+@@ -180,14 +180,17 @@
+ else if (strcasecmp(alignment_type_env, "infinality1") == 0) alignment_type = 6;
+ else alignment_type = 0;
+
+- if ( /*strstr(slot.metrics->root.scaler.face->style_name, "Regular")
+- || strstr(slot.metrics->root.scaler.face->style_name, "Book")
+- || strstr(slot.metrics->root.scaler.face->style_name, "Medium")
+- ||*/ strcasestr(slot->face->style_name, "Italic")
+- || strcasestr(slot->face->style_name, "Oblique") )
+- alignment_type = 0;
+- if ( strcasestr(slot->face->style_name, "Bold") )
+- alignment_type = 0;
++ if ( slot->face != NULL && slot->face->style_name != NULL )
++ {
++ if ( /*strstr(slot.metrics->root.scaler.face->style_name, "Regular")
++ || strstr(slot.metrics->root.scaler.face->style_name, "Book")
++ || strstr(slot.metrics->root.scaler.face->style_name, "Medium")
++ ||*/ strcasestr(slot->face->style_name, "Italic")
++ || strcasestr(slot->face->style_name, "Oblique") )
++ alignment_type = 0;
++ if ( strcasestr(slot->face->style_name, "Bold") )
++ alignment_type = 0;
++ }
+ }
+ checked_alignment_type = 1;
+ }
+@@ -214,16 +217,19 @@
+ /*printf("%s,%s ", slot->face->family_name, slot->face->style_name);*/
+ /*printf("%d ", slot->face->size->metrics.x_ppem);*/
+
+- /* set gamma value to 1 if out of range */
+- if ( slot->face->size->metrics.x_ppem >= pseudo_gamma_lt )
++ if ( slot->face && slot->face->size )
+ {
+- pseudo_gamma_value = 1;
+- }
++ /* set gamma value to 1 if out of range */
++ if ( slot->face->size->metrics.x_ppem >= pseudo_gamma_lt )
++ {
++ pseudo_gamma_value = 1;
++ }
+
+- /* don't do alignment for < 10 */
+- if ( slot->face->size->metrics.x_ppem < 10 )
+- {
+- alignment_type = 0;
++ /* don't do alignment for < 10 */
++ if ( slot->face->size->metrics.x_ppem < 10 )
++ {
++ alignment_type = 0;
++ }
+ }
+
+ if ( mode == FT_RENDER_MODE_LCD )
+@@ -642,7 +648,9 @@
+ if ( pseudo_gamma_value != 1 )
+ {
+ FT_Byte* line = bitmap->buffer;
+- float ppem = (float)slot->face->size->metrics.x_ppem;
++ float ppem = 0;
++ if ( slot->face && slot->face->size )
++ ppem = (float)slot->face->size->metrics.x_ppem;
+
+ if (ppem >= 5 )
+ for (height = (FT_UInt)bitmap->rows; height > 0; height--, line += bitmap->pitch )
diff --git a/testing/freetype-infinality/infinality-settings b/testing/freetype-infinality/infinality-settings
new file mode 100644
index 000000000..f6fca1aac
--- /dev/null
+++ b/testing/freetype-infinality/infinality-settings
@@ -0,0 +1,230 @@
+##################################################################
+# INFINALITY ENVIRONMENT VARIABLES FOR EXTRA RUN-TIME OPTIONS
+##################################################################
+#
+# These environment variables require that their respective patches
+# from http://www.infinality.net have been applied to the Freetype
+# installation you are using. They will do abolutely
+# nothing otherwise!
+#
+
+# This file should be copied to /etc/profile.d/ for system-wide
+# effects and/or included in ~/.bashrc or ~/.bash_profile for per-user
+# effects:
+#
+# . ~/path/to/this/file/infinality-settings
+#
+# Of course, the per-user settings will override the system-wide
+# settings. Default values indicated below will be used when the
+# environment variables below are not defined.
+
+
+
+##################################################################
+# INFINALITY_FT_FILTER_PARAMS
+#
+# This is a modified version of the patch here:
+# http://levelsofdetail.kendeeter.com/2008/12/dynamic_fir_filter_patch.html
+#
+# Allows you to adjust the FIR filter at runtime instead of at
+# compile time. The idea is to have values add up to one, and be
+# symmetrical around the middle value. Here are some samples
+# of various filter parameters:
+#
+# Strong Extra Smooth "15e-2 20e-2 30e-2 20e-2 15e-2" (extra smooth, natural weight)
+# Extra Smooth "20e-2 20e-2 30e-2 20e-2 20e-2" (extra smooth, extra weight)
+# Smooth "15e-2 20e-2 32e-2 20e-2 15e-2" (smooth, natural weight)
+# Stronger Gibson "11e-2 22e-2 38e-2 22e-2 11e-2" (smooth, extra weight)
+# Gibson "11e-2 22e-2 33e-2 22e-2 11e-2" (smooth, natural weight)
+# Freetype Light "00e-2 33e-2 34e-2 33e-2 00e-2" (sharp, natural weight)
+# Freetype Default "06e-2 25e-2 44e-2 25e-2 06e-2" (sharp, extra weight) *default
+# Extra Sharp "00e-2 35e-2 35e-2 35e-2 00e-2" (extra sharp, extra weight)
+#
+# Default: [Freetype's default]
+# Recommended: "11e-2 22e-2 38e-2 22e-2 11e-2"
+#
+# Example 1: export INFINALITY_FT_FILTER_PARAMS="11e-2 22e-2 38e-2 22e-2 11e-2"
+#
+
+export INFINALITY_FT_FILTER_PARAMS="11e-2 22e-2 38e-2 22e-2 11e-2"
+
+
+
+
+##################################################################
+# INFINALITY_FT_STEM_ALIGNMENT_TYPE
+#
+# This performs analysis on each glyph and determines the best
+# subpixel orientation for the glyph. The glyph is not scaled in
+# any way, just moved left or right by a subpixel amount. This
+# results in subtley cleaner looking fonts, at the expense of
+# proper distances between glyphs. This is only active for sizes
+# 10 px or greater and does not apply to bold or italic fonts.
+#
+# Possible values:
+# full - Allows a glyph to be moved to the LEFT or RIGHT by 1 subpixel
+# Best alignment, Worst positioning
+# medium,medium1 - Only allows a glyph to be moved to the LEFT by 1 subpixel
+# Good alignment, Good positioning
+# medium2 - Only allows a glyph to be moved to the RIGHT by 1 subpixel
+# Good alignment, Good positioning
+# slight,slight1 - A stricter version of medium
+# Minor alignment, Best positioning
+# slight2 - A stricter version of medium2
+# Minor alignment, Best positioning
+# infinality - medium1 when stem < 5 subpixels, full when >= 5 subpixels
+# none - Don't do any alignment
+#
+# Default: none
+# Recommended: medium
+
+export INFINALITY_FT_STEM_ALIGNMENT_TYPE=medium
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT
+#
+# Cause the height of horizontal stems to snap to integer pixels
+# when using light auto-hinting. (This happens automatically
+# when using full auto-hinting)
+#
+# This produces an effect similar to the way Windows renders fonts
+# without requiring the font to contain bytecode instructions.
+#
+# Possible values:
+# true - enable stem snapping
+# false - do not enable stem snapping
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT
+#
+# Embolden particularly light or thin fonts, like DejaVu Sans Light,
+# Inconsolata, Freemono, Courier New, etc. up until stem width is
+# 1 pixel wide. This makes these fonts easier to read at lower
+# ppems. Only applies when the autohinter is being used.
+#
+# Possible values:
+# true - enable emboldening of light fonts
+# false - do not enable emboldening of light fonts
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_PSEUDO_GAMMA
+#
+# This does a weighted gamma correction at the LCD filter phase
+# prior to the LCD filter.
+#
+# The first value indicates a px value, the second indicates a
+# "gamma" value. All sizes < the px value will be corrected
+# on a weighted scale based on the second value.
+#
+# Values .1 < 1.0 will darken the glyph
+# Values > 1.0 will lighten the glyph
+#
+# Example 1: Darken glyphs that are less than 10 px. With some fonts
+# even 5 or 6px is readable!
+# export INFINALITY_FT_PSEUDO_GAMMA="10 6e-1"
+#
+# Example 2: Lighten all glyphs (below 100px)
+# export INFINALITY_FT_PSEUDO_GAMMA="100 15e-1"
+#
+# Default: [No gamma correction]
+# Recommended: "9 5e-1"
+
+export INFINALITY_FT_PSEUDO_GAMMA="9 7e-1"
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS
+#
+# This will slightly stretch some glyphs vertically between 9px
+# and 14px (inclusive). Some people may find this more
+# aesthetically pleasing. This only applies to fonts that are
+# using autohint.
+#
+# Possible values:
+# true - enable height adjustment
+# false - do not enable height adjustment
+#
+# Default: false
+
+export INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_ENHANCED_EMBOLDEN
+#
+# When doing artificial emboldening, only embolden in the X
+# direction, skipping the Y direction. Most people will find this
+# more aesthetically pleasing than the default behavior.
+#
+# Possible values:
+# true - enable enhanced emboldening
+# false - no not enable enhanced emboldening
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_ENHANCED_EMBOLDEN=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH
+#
+# When doing artificial emboldening, don't change the glyph width.
+#
+# Possible values:
+# true - maintain width
+# false - do not maintain width
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH=true
+
+
+
+
+##################################################################
+# INFINALITY_FT_AUTO_AUTOHINT
+#
+# Automatically use autohint when rendering a font that contains
+# no truetype instructions, regardless of what the calling
+# program asks for. The truetype hinter will not do a good job
+# on these.
+#
+# Possible values:
+# true - automatically use autohint
+# false - do not automatically use autohint
+#
+# Default: false
+# Recommended: true
+
+export INFINALITY_FT_AUTO_AUTOHINT=true
+
+
+
+
diff --git a/testing/ftgl/APKBUILD b/testing/ftgl/APKBUILD
new file mode 100644
index 000000000..7ee3177ff
--- /dev/null
+++ b/testing/ftgl/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ftgl
+pkgver=2.1.3_rc5
+_pkgver=2.1.3-rc5
+pkgrel=1
+pkgdesc="freetype OpenGL layer"
+url="http://ftgl.wiki.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="mesa-dev freetype-dev freeglut-dev"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-${_pkgver}.tar.bz2"
+
+_builddir="$srcdir/$pkgname-2.1.3~rc5"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+md5sums="c7879018cde844059495b3029b0b6503 ftgl-2.1.3-rc5.tar.bz2"
diff --git a/testing/geany-plugins/APKBUILD b/testing/geany-plugins/APKBUILD
new file mode 100644
index 000000000..7ef1f484f
--- /dev/null
+++ b/testing/geany-plugins/APKBUILD
@@ -0,0 +1,97 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=geany-plugins
+pkgver=0.21
+pkgrel=0
+pkgdesc="Plugins for Geany"
+url="http://plugins.geany.org/"
+arch="all"
+license="GPLv3+"
+depends=
+makedepends="lua-dev geany-dev enchant-dev intltool gtkspell-dev libxml2-dev
+ bash"
+install=""
+subpackages="$pkgname-doc
+ $pkgname-addons
+ $pkgname-codenav
+ $pkgname-geanydoc
+ $pkgname-geanyextrasel
+ $pkgname-geanygdb
+ $pkgname-geanyinsertnum
+ $pkgname-geanylatex
+ $pkgname-geanylipsum
+ $pkgname-geanylua
+ $pkgname-geanyprj
+ $pkgname-geanysendmail
+ $pkgname-geanyvc
+ $pkgname-pretty-print:pretty_print
+ $pkgname-shiftcolumn
+ $pkgname-spellcheck
+ $pkgname-treebrowser
+ $pkgname-lang
+ "
+
+source="http://plugins.geany.org/geany-plugins/geany-plugins-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/geany-plugins-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/*/*.la
+}
+
+_plugin() {
+ pkgdesc="$2"
+ local _d
+ mkdir -p "$subpkgdir"/usr/lib/geany
+ mv "$pkgdir"/usr/lib/geany/$1.so "$subpkgdir"/usr/lib/geany/ || return 1
+ cd "$pkgdir"
+ for _d in usr/*/geany-plugins/$1; do
+ if [ -d "$_d" ]; then
+ mkdir -p "$subpkgdir"/${_d%/*}
+ mv "$pkgdir"/$_d "$subpkgdir"/$_d
+ fi
+ done
+}
+
+addons() { _plugin addons "Miscellaneous Addons for Geany"; }
+codenav() { _plugin codenav "Navigate through your source code easily"; }
+geanydoc() { _plugin geanydoc "Call documentation from within Geany"; }
+geanyextrasel() { _plugin geanyextrasel "Additional features for selecting code"; }
+geanygdb() { _plugin geanygdb "Debugger Plugin for Geany using GDB"; }
+geanyinsertnum() { _plugin geanyinsertnum "Insert huge number ranges with small efforts"; }
+geanylatex() { _plugin geanylatex "LaTeX support for Geany"; }
+geanylipsum() { _plugin geanylipsum "Lorem Ipsum generator for Inserting Placeholder Text"; }
+geanylua() { _plugin geanylua "Lua Scripting for Geany"; }
+geanyprj() { _plugin geanyprj "Alternate project management tool for Geany"; }
+geanysendmail() { _plugin geanysendmail "Send E-Mails from within Geany"; }
+geanyvc() { _plugin geanyvc "Version Control for Geany"; }
+pretty_print() { _plugin pretty-print "XML pretty printing plugin for Geany"; }
+shiftcolumn() { _plugin shiftcolumn "Move Blocks of Text horizontally"; }
+spellcheck() { _plugin spellcheck "Spellcheck text in Geany"; }
+treebrowser() { _plugin treebrowser "Alternate file browser plugin "; }
+
+
+md5sums="22e106d7a026e720dd91feb79e44456f geany-plugins-0.21.tar.bz2"
diff --git a/testing/giggle/APKBUILD b/testing/giggle/APKBUILD
new file mode 100644
index 000000000..78cda69be
--- /dev/null
+++ b/testing/giggle/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=giggle
+pkgver=0.5
+pkgrel=1
+pkgdesc="graphical frontend for the git content tracker"
+url="http://live.gnome.org/giggle"
+arch="all"
+license="GPL"
+depends=
+makedepends="gtk+-dev gtksourceview-dev vte-dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://ftp.gnome.org/pub/GNOME/sources/giggle/$pkgver/giggle-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/giggle-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-evolution-data-server \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="91d2000fb97c5cb0bb0027edf444ecff giggle-0.5.tar.bz2"
diff --git a/testing/gitolite/APKBUILD b/testing/gitolite/APKBUILD
new file mode 100644
index 000000000..673f0d6bd
--- /dev/null
+++ b/testing/gitolite/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=gitolite
+pkgver=2.1
+pkgrel=0
+pkgdesc="A centralized git server, with very fine-grained access control and many powerful features."
+url="http://github.com/sitaramc/gitolite"
+arch="noarch"
+license="GPL2"
+depends="git perl"
+depends_dev=""
+makedepends="$depends_dev wget"
+install=""
+subpackages="$pkgname-doc"
+source="saveas-https://github.com/sitaramc/gitolite/tarball/v2.1/gitolite-2.1.tar.gz
+ configuration.patch"
+
+_builddir="$srcdir"/sitaramc-gitolite-871ed28
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/bin \
+ "$pkgdir"/etc/gitolite \
+ "$pkgdir"/usr/share/gitolite/hooks \
+ "$pkgdir"/usr/share/doc/gitolite
+ mv src/* "$pkgdir"/usr/bin/
+ mv conf/* "$pkgdir"/etc/gitolite/
+ mv hooks/* "$pkgdir"/usr/share/gitolite/hooks/
+ mv doc/* "$pkgdir"/usr/share/doc/gitolite/
+}
+
+md5sums="33e0f6f384cf0596aed974fa563b50c3 gitolite-2.1.tar.gz
+b4603bb37d3a746a1508bd7528464ba4 configuration.patch"
diff --git a/testing/gitolite/configuration.patch b/testing/gitolite/configuration.patch
new file mode 100644
index 000000000..403dc4e26
--- /dev/null
+++ b/testing/gitolite/configuration.patch
@@ -0,0 +1,27 @@
+diff --git a/conf/example.gitolite.rc b/conf/example.gitolite.rc
+index d800357..95c5a24 100644
+--- a/conf/example.gitolite.rc
++++ b/conf/example.gitolite.rc
+@@ -19,8 +19,8 @@ $GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
+ # DO NOT CHANGE THE NEXT FOUR LINES UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
+ # These variables are set automatically by the install method you choose.
+ # (PACKAGE MAINTAINERS: PLEASE READ doc/packaging.mkd)
+-# $GL_PACKAGE_CONF = "";
+-# $GL_PACKAGE_HOOKS = "";
++$GL_PACKAGE_CONF = "/etc/gitolite";
++$GL_PACKAGE_HOOKS = "/usr/share/gitolite/hooks";
+
+ # ------------------------------------------------------------------------------
+ # most often used/changed variables
+diff --git a/src/gl-setup b/src/gl-setup
+index fd8357b..59de183 100755
+--- a/src/gl-setup
++++ b/src/gl-setup
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-GL_PACKAGE_CONF=/tmp/share/gitolite/conf
++GL_PACKAGE_CONF=/etc/gitolite
+ # must be the same as the value for the same variable in
+ # $GL_PACKAGE_CONF/example.gitolite.rc. Sorry about the catch-22 :)
+
diff --git a/testing/gjs/APKBUILD b/testing/gjs/APKBUILD
new file mode 100644
index 000000000..1f2875588
--- /dev/null
+++ b/testing/gjs/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=gjs
+pkgver=0.7.10
+pkgrel=1
+pkgdesc="GNOME javascript platform"
+url="http://live.gnome.org/gjs"
+arch=""
+license="LGPL"
+depends="xulrunner"
+depends_dev="xulrunner-dev gtk+-dev glib-dev cairo-dev dbus-glib-dev nspr-dev"
+makedepends="$depends_dev gobject-introspection-dev"
+install=""
+subpackages="$pkgname-dev"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-scrollkeeper || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install -j1 || return 1
+}
+
+md5sums="12df4ed701ef4e2dc742cfbea6bb43eb gjs-0.7.10.tar.bz2"
diff --git a/testing/gmime/APKBUILD b/testing/gmime/APKBUILD
new file mode 100644
index 000000000..add8f04a6
--- /dev/null
+++ b/testing/gmime/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=gmime
+pkgver=2.6.0
+pkgrel=0
+pkgdesc="glib mime library"
+url="http://spruce.sourceforge.net/gmime/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="glib-dev gpgme-dev"
+makedepends="$depends_dev intltool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="8e939c46e363ed8071a3f6d51299316d gmime-2.6.0.tar.bz2"
diff --git a/testing/gnash/APKBUILD b/testing/gnash/APKBUILD
new file mode 100644
index 000000000..06f7cc694
--- /dev/null
+++ b/testing/gnash/APKBUILD
@@ -0,0 +1,69 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=gnash
+pkgver=0.8.9
+pkgrel=5
+pkgdesc="GNU flash player implementation"
+url="http://www.gnashdev.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="agg-dev cairo-dev gstreamer-dev gst-plugins-base-dev
+ mesa-dev gtk+-dev sdl-dev boost-dev giflib-dev
+ speex-dev libxml2-dev jpeg-dev xulrunner-dev gtkglext-dev
+ curl-dev libxmu-dev libx11-dev"
+makedepends="$depends_dev libtool"
+install=""
+subpackages="$pkgname-doc $pkgname-dev $pkgname-mozilla $pkgname-sdl $pkgname-fb"
+source="http://mirrors.igsobe.com/gnu/gnash/$pkgver/gnash-$pkgver.tar.gz
+ gnash-ffmpeg.patch"
+
+_builddir="$srcdir"/gnash-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-media=gst \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+sdl() {
+ pkgdesc="$pkgdesc (sdl player)"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/sdl-gnash "$subpkgdir"/usr/bin
+}
+
+fb() {
+ pkgdesc="$pkgdesc (framebuffer player)"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/fb-gnash "$subpkgdir"/usr/bin
+}
+
+mozilla() {
+ depends="gnash"
+ pkgdesc="$pkgdesc (mozilla plugin)"
+ mkdir -p "$subpkgdir"/usr/lib/mozilla/plugins
+ mv "$_builddir"/plugin/npapi/.libs/libgnashplugin.so "$subpkgdir"/usr/lib/mozilla/plugins
+}
+
+md5sums="01d0420932eede07211e368d405aee9c gnash-0.8.9.tar.gz
+b324b3fee1e017d8fcc4d991146266f8 gnash-ffmpeg.patch"
diff --git a/testing/gnash/gnash-ffmpeg.patch b/testing/gnash/gnash-ffmpeg.patch
new file mode 100644
index 000000000..dc78e81c5
--- /dev/null
+++ b/testing/gnash/gnash-ffmpeg.patch
@@ -0,0 +1,24 @@
+--- gnash-0.8.9.orig/libmedia/ffmpeg/MediaParserFfmpeg.cpp
++++ gnash-0.8.9/libmedia/ffmpeg/MediaParserFfmpeg.cpp
+@@ -52,8 +52,8 @@
+ return p->readPacket(buf, buf_size);
+ }
+
+-boost::int64_t
+-MediaParserFfmpeg::seekMediaWrapper(void *opaque, boost::int64_t offset, int whence)
++::int64_t
++MediaParserFfmpeg::seekMediaWrapper(void *opaque, ::int64_t offset, int whence)
+ {
+ MediaParserFfmpeg* p = static_cast<MediaParserFfmpeg*>(opaque);
+ return p->seekMedia(offset, whence);
+--- gnash-0.8.9.orig/libmedia/ffmpeg/MediaParserFfmpeg.h
++++ gnash-0.8.9/libmedia/ffmpeg/MediaParserFfmpeg.h
+@@ -126,7 +126,7 @@
+ boost::int64_t seekMedia(boost::int64_t offset, int whence);
+
+ /// ffmpeg callback function
+- static boost::int64_t seekMediaWrapper(void *opaque, boost::int64_t offset, int whence);
++ static int64_t seekMediaWrapper(void *opaque, int64_t offset, int whence);
+
+ /// Read some of the input to figure an AVInputFormat
+ AVInputFormat* probeStream();
diff --git a/testing/gnump3d/APKBUILD b/testing/gnump3d/APKBUILD
new file mode 100644
index 000000000..1fa85b283
--- /dev/null
+++ b/testing/gnump3d/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=gnump3d
+pkgver=3.0
+pkgrel=0
+pkgdesc="A streaming server for MP3, OGG vorbis and other streamable files"
+url="http://www.gnump3d.org/"
+arch="all"
+license="GPL-2"
+depends="perl"
+makedepends=""
+install=
+subpackages="$pkgname-doc"
+source="http://savannah.gnu.org/download/gnump3d/$pkgname-$pkgver.tar.gz
+ gnump3d.confd
+ gnump3d.initd"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ make PREFIX="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ mv "$pkgdir"/usr/local "$pkgdir"-doc/
+}
+
+md5sums="d2b665c3267253cc8cae29659131b9b4 gnump3d-3.0.tar.gz
+59f0286d4c943226a67ab7b7787547c6 gnump3d.confd
+5202488dff1c7e6c6788fb00fb32f071 gnump3d.initd"
diff --git a/testing/gnump3d/gnump3d.confd b/testing/gnump3d/gnump3d.confd
new file mode 100644
index 000000000..1d6cf397d
--- /dev/null
+++ b/testing/gnump3d/gnump3d.confd
@@ -0,0 +1,6 @@
+# Set this to 0 to stop the init script from indexing your mp3s.
+# It takes the longest on the first time, but after that, it only does
+# updates.
+
+DO_INDEX=1
+
diff --git a/testing/gnump3d/gnump3d.initd b/testing/gnump3d/gnump3d.initd
new file mode 100644
index 000000000..43290ee30
--- /dev/null
+++ b/testing/gnump3d/gnump3d.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/media-sound/gnump3d/files/gnump3d.init.d,v 1.4 2008/06/03 14:52:33 beandog Exp $
+
+opts="start stop index"
+
+depend() {
+ need net
+ after netmount nfsmount
+}
+
+start() {
+ ebegin "Starting gnump3d"
+
+ if [ ${DO_INDEX} -eq 1 ]; then
+ ebegin "Updating index of music files (may take a while for the first time)"
+ /usr/bin/gnump3d-index
+ eend $?
+ fi
+
+ start-stop-daemon --start --quiet --exec /usr/bin/gnump3d2 --make-pidfile \
+ --pidfile /var/run/gnump3d.pid --background -- --quiet
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gnump3d"
+ start-stop-daemon --stop --quiet --pidfile /var/run/gnump3d.pid
+ eend $?
+}
+
+index() {
+ ebegin "Indexing music files"
+ /usr/bin/gnump3d-index
+ eend $?
+}
diff --git a/testing/gource/APKBUILD b/testing/gource/APKBUILD
new file mode 100644
index 000000000..fd0a2b6c9
--- /dev/null
+++ b/testing/gource/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=gource
+pkgver=0.35
+pkgrel=0
+pkgdesc="Software version control visualization"
+url="http://code.google.com&p/gource"
+arch="all"
+license="GPL3"
+depends=
+depends_dev="ftgl-dev sdl-dev sdl_image-dev pcre-dev glew-dev libpng-dev
+ jpeg-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://gource.googlecode.com/files/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="6d4f776d314da3ae5d309cb580b83a9f gource-0.35.tar.gz"
diff --git a/testing/gpgme/APKBUILD b/testing/gpgme/APKBUILD
new file mode 100644
index 000000000..bda11b1ff
--- /dev/null
+++ b/testing/gpgme/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gpgme
+pkgver=1.3.1
+pkgrel=0
+pkgdesc="gnupg made easy"
+url="http://www.gnupg.org/related_software/gpgme/"
+arch="all"
+license="GPL"
+depends=gnupg
+depends_dev="libgpg-error-dev libassuan-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/gpgme-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="90afa8436ce2b2683c001c824bd22601 gpgme-1.3.1.tar.bz2"
diff --git a/testing/graphviz/0001-clone-nameclash.patch b/testing/graphviz/0001-clone-nameclash.patch
new file mode 100644
index 000000000..6222238d8
--- /dev/null
+++ b/testing/graphviz/0001-clone-nameclash.patch
@@ -0,0 +1,87 @@
+From cb8bbbd3a48fa1f41965617852d11e02eb20b1f0 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 26 Jul 2011 12:41:21 +0000
+Subject: [PATCH] clone nameclash
+
+---
+ lib/gvpr/actions.c | 6 +++---
+ lib/gvpr/actions.h | 2 +-
+ lib/gvpr/compile.c | 2 +-
+ lib/gvpr/gvpr.c | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c
+index 05bfcd1..b3b4a60 100644
+--- a/lib/gvpr/actions.c
++++ b/lib/gvpr/actions.c
+@@ -380,7 +380,7 @@ Agraph_t *cloneG(Agraph_t * g, char* name)
+ * graph. Otherwise, create a clone subgraph of g.
+ * Assume obj != NULL.
+ */
+-Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
++Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj)
+ {
+ Agobj_t *nobj = 0;
+ Agedge_t *e;
+@@ -415,8 +415,8 @@ Agobj_t *clone(Agraph_t * g, Agobj_t * obj)
+ case AGINEDGE:
+ case AGOUTEDGE:
+ e = (Agedge_t *) obj;
+- t = (Agnode_t *) clone(g, OBJ(agtail(e)));
+- h = (Agnode_t *) clone(g, OBJ(aghead(e)));
++ t = (Agnode_t *) cloneO(g, OBJ(agtail(e)));
++ h = (Agnode_t *) cloneO(g, OBJ(aghead(e)));
+ name = agnameof (AGMKOUT(e));
+ nobj = (Agobj_t *) openEdge(g, t, h, name);
+ if (nobj)
+diff --git a/lib/gvpr/actions.h b/lib/gvpr/actions.h
+index 5c62a3b..4223c52 100644
+--- a/lib/gvpr/actions.h
++++ b/lib/gvpr/actions.h
+@@ -22,7 +22,7 @@ extern "C" {
+ #include "expr.h"
+
+ extern void nodeInduce(Agraph_t * selected);
+- extern Agobj_t *clone(Agraph_t * g, Agobj_t * obj);
++ extern Agobj_t *cloneO(Agraph_t * g, Agobj_t * obj);
+ extern Agraph_t *cloneG(Agraph_t * g, char* name);
+ extern Agobj_t *copy(Agraph_t * g, Agobj_t * obj);
+ extern int copyAttr(Agobj_t * obj, Agobj_t * obj1);
+diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c
+index c157572..0914210 100644
+--- a/lib/gvpr/compile.c
++++ b/lib/gvpr/compile.c
+@@ -1087,7 +1087,7 @@ getval(Expr_t * pgm, Exnode_t * node, Exid_t * sym, Exref_t * ref,
+ error(ERROR_WARNING, "NULL object passed to clone()");
+ v.integer = 0;
+ } else
+- v.integer = PTR2INT(clone(gp, objp));
++ v.integer = PTR2INT(cloneO(gp, objp));
+ break;
+ case F_cloneG:
+ gp = INT2PTR(Agraph_t *, args[0].integer);
+diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c
+index 0d47d70..9a1bfd1 100644
+--- a/lib/gvpr/gvpr.c
++++ b/lib/gvpr/gvpr.c
+@@ -803,7 +803,7 @@ addOutputGraph (Gpr_t* state, gvpropts* uopts)
+ Agraph_t* g = state->outgraph;
+
+ if ((agroot(g) == state->curgraph) && !uopts->ingraphs)
+- g = (Agraph_t*)clone (0, (Agobj_t *)g);
++ g = (Agraph_t*)cloneO (0, (Agobj_t *)g);
+
+ uopts->n_outgraphs++;
+ uopts->outgraphs = oldof(uopts->outgraphs,Agraph_t*,uopts->n_outgraphs,0);
+@@ -988,7 +988,7 @@ int gvpr (int argc, char *argv[], gvpropts * uopts)
+
+ /* begin graph */
+ if (incoreGraphs && (opts->compflags & CLONE))
+- state->curgraph = (Agraph_t*)clone (0, (Agobj_t*)(state->curgraph));
++ state->curgraph = (Agraph_t*)cloneO (0, (Agobj_t*)(state->curgraph));
+ state->curobj = (Agobj_t *) state->curgraph;
+ state->tvroot = 0;
+ if (bp->begg_stmt)
+--
+1.7.6
+
diff --git a/testing/graphviz/APKBUILD b/testing/graphviz/APKBUILD
new file mode 100644
index 000000000..03b33aacc
--- /dev/null
+++ b/testing/graphviz/APKBUILD
@@ -0,0 +1,101 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=graphviz
+pkgver=2.28.0
+pkgrel=0
+pkgdesc="Graph Visualization Tools"
+url="http://www.graphviz.org/"
+arch="all"
+license="EPL"
+depends=""
+depends_dev="zlib-dev libpng-dev jpeg-dev expat-dev freetype-dev bison m4 flex
+ fontconfig-dev libtool libsm-dev libxext-dev cairo-dev pango-dev
+ gmp-dev lua-dev gtk+-dev swig python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py lua-$pkgname:_lua
+ $pkgname-gtk $pkgname-graphs"
+source="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$pkgver.tar.gz
+ 0001-clone-nameclash.patch"
+
+_builddir="$srcdir"/graphviz-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # use /usr/lib instead of /usr/lib64
+ sed -i -e 's/LIBPOSTFIX="64"/LIBPOSTFIX=/' configure || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-x \
+ --disable-static \
+ --disable-dependency-tracking \
+ --enable-lua=yes \
+ --without-mylibgd \
+ --with-ipsepcola \
+ --with-pangocairo \
+ --with-gdk-pixbuf \
+ --with-png \
+ --with-jpeg \
+ || return 1
+ if [ "$CARCH" = "x86_64" ]; then
+ # the configure script thinks we have sincos. we dont.
+ sed -i -e '/HAVE_SINCOS/d' config.h || return 1
+ fi
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" \
+ pkgconfigdir=/usr/lib/pkgconfig \
+ install || return 1
+ mkdir -p "$pkgdir"/usr/share/doc
+ mv "$pkgdir"/usr/share/graphviz/doc "$pkgdir"/usr/share/doc/graphviz || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/graphviz/*.la \
+ "$pkgdir"/usr/lib/graphviz/*/*.la \
+ || return 1
+}
+
+py() {
+ pkgdesc="Python extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz \
+ "$subpkgdir"/usr/lib || return 1
+ mv "$pkgdir"/usr/lib/graphviz/python* \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+_lua() {
+ pkgdesc="Lua extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz \
+ "$subpkgdir"/usr/lib/lua || return 1
+ mv "$pkgdir"/usr/lib/graphviz/lua \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/
+}
+
+gtk() {
+ pkgdesc="Gtk extension for graphviz"
+ mkdir -p "$subpkgdir"/usr/lib/graphviz || return 1
+ mv "$pkgdir"/usr/lib/graphviz/libgvplugin_g?k* \
+ "$subpkgdir"/usr/lib/graphviz || return 1
+}
+
+graphs() {
+ pkgdesc="Demo graphs for graphviz"
+ mkdir -p "$subpkgdir"/usr/share/graphviz || return 1
+ mv "$pkgdir"/usr/share/graphviz/graphs \
+ "$subpkgdir"/usr/share/graphviz/
+}
+md5sums="8d26c1171f30ca3b1dc1b429f7937e58 graphviz-2.28.0.tar.gz
+bce8a9ae4c3a8c52c1bcf0e03d5ce364 0001-clone-nameclash.patch"
diff --git a/testing/gssdp/APKBUILD b/testing/gssdp/APKBUILD
new file mode 100644
index 000000000..a70543da6
--- /dev/null
+++ b/testing/gssdp/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gssdp
+pkgver=0.10.0
+pkgrel=1
+pkgdesc="Resource discovery and announcement over SSDP"
+url="http://www.gupnp.org/"
+arch="all"
+license="LGPLv2"
+depends=
+depends_dev="dbus-glib-dev glib-dev gtk+-dev libsoup-dev libxml2-dev"
+makedepends="$depends_dev gobject-introspection-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.gupnp.org/sites/all/files/sources/gssdp-$pkgver.tar.gz
+ gssdp-fixdso.patch"
+
+_builddir="$srcdir"/gssdp-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-introspection=yes \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" -name '*.la' -delete
+}
+
+md5sums="aec6a56ac1d4f8a4837da83f2d152556 gssdp-0.10.0.tar.gz
+44a768c4245e69b54b96b985143a6faa gssdp-fixdso.patch"
diff --git a/testing/gssdp/gssdp-fixdso.patch b/testing/gssdp/gssdp-fixdso.patch
new file mode 100644
index 000000000..597e41e3c
--- /dev/null
+++ b/testing/gssdp/gssdp-fixdso.patch
@@ -0,0 +1,11 @@
+--- gssdp-0.7.2/tests/Makefile.in.orig 2010-04-09 13:55:16.000000000 +0100
++++ gssdp-0.7.2/tests/Makefile.in 2010-04-09 18:07:19.357276589 +0100
+@@ -129,7 +129,7 @@
+ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
+ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
+ LD = @LD@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @LDFLAGS@ -lgobject-2.0 -lglib-2.0
+ LIBGSSDP_CFLAGS = @LIBGSSDP_CFLAGS@
+ LIBGSSDP_LIBS = @LIBGSSDP_LIBS@
+ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
diff --git a/testing/gtk-equinox-engine/APKBUILD b/testing/gtk-equinox-engine/APKBUILD
new file mode 100644
index 000000000..0a78bcf74
--- /dev/null
+++ b/testing/gtk-equinox-engine/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=gtk-equinox-engine
+pkgver=1.30.2
+pkgrel=2
+pkgdesc="enhanced cairo-based GTK+ engine"
+url="http://gnome-look.org/content/show.php/Equinox+GTK+Engine"
+license="GPL"
+arch="all"
+depends=
+makedepends="gtk+-dev"
+install=
+subpackages=
+source="http://gnome-look.org/CONTENT/content-files/121881-equinox-1.30.tar.bz2"
+
+_builddir="$srcdir"/equinox-${pkgver%.*}
+
+prepare() {
+ cd "$srcdir"
+
+ msg "Unpacking GTK+ engine"
+ tar zxf equinox-gtk-engine.tar.gz
+
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir"/usr/share/themes
+ cd "$pkgdir"/usr/share/themes
+
+ msg "Unpacking themes"
+ tar zxf "$srcdir"/equinox-themes.tar.gz
+}
+
+md5sums="07d43dede6bdc17ba74f1740a3743601 121881-equinox-1.30.tar.bz2"
diff --git a/testing/gtk-murrine-engine/APKBUILD b/testing/gtk-murrine-engine/APKBUILD
new file mode 100644
index 000000000..1cc48e2a3
--- /dev/null
+++ b/testing/gtk-murrine-engine/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=gtk-murrine-engine
+pkgver=0.98.1
+pkgrel=1
+pkgdesc="cairo-based gtk engine"
+url="http://www.cimitan.com/murrine/"
+arch="all"
+license="LGPL"
+depends=
+makedepends="gtk+-dev cairo-dev intltool"
+install=""
+subpackages=""
+source="http://ftp.acc.umu.se/pub/GNOME/sources/murrine/${pkgver%.*}/murrine-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/murrine-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="fb8481dd068e27425acf7e91a1250107 murrine-0.98.1.tar.bz2"
diff --git a/testing/gtk-qt-engine/APKBUILD b/testing/gtk-qt-engine/APKBUILD
new file mode 100644
index 000000000..c6c367c65
--- /dev/null
+++ b/testing/gtk-qt-engine/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=gtk-qt-engine
+pkgver=1.1
+pkgrel=0
+pkgdesc="GTK QT engine"
+url="http://gtk-qt-engine.googlecode.com/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev gtk+-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages=
+source="http://gtk-qt-engine.googlecode.com/files/gtk-qt-engine-$pkgver.tar.bz2
+ stdlib.patch"
+install_if="kdebase-workspace"
+
+_builddir="$srcdir"/gtk-qt-engine
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON . || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="de8048baef7dfe6c97cd97c463d66152 gtk-qt-engine-1.1.tar.bz2
+1658c0431dd13bef9c3f72183815c6f3 stdlib.patch"
diff --git a/testing/gtk-qt-engine/stdlib.patch b/testing/gtk-qt-engine/stdlib.patch
new file mode 100644
index 000000000..44fd2c49e
--- /dev/null
+++ b/testing/gtk-qt-engine/stdlib.patch
@@ -0,0 +1,10 @@
+--- gtk-qt-engine.orig/src/qt_theme_draw.c
++++ gtk-qt-engine/src/qt_theme_draw.c
+@@ -19,6 +19,7 @@
+ ***************************************************************************/
+
+ #include <math.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <gtk/gtkprogressbar.h>
+ #include <gdk/gdk.h>
diff --git a/testing/gtkhtml/APKBUILD b/testing/gtkhtml/APKBUILD
new file mode 100644
index 000000000..b56ca79e3
--- /dev/null
+++ b/testing/gtkhtml/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gtkhtml
+pkgver=3.32.2
+pkgrel=1
+pkgdesc="GTK HTML renderer"
+url="http://projects.gnome.org/evolution"
+arch="all"
+license="LGPL"
+depends="iso-codes gnome-icon-theme"
+depends_dev="gtk+-dev libxml2-dev gnome-vfs-dev libxrandr-dev libxau-dev libxi-dev libxt-dev libxrender-dev libxcursor-dev libxdmcp-dev libxcomposite-dev
+ enchant-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-deprecated-warning-flags \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+
+md5sums="3e1a1d56beef147aa0a95e5ebbf61c8c gtkhtml-3.32.2.tar.bz2"
diff --git a/testing/gtkimageview/APKBUILD b/testing/gtkimageview/APKBUILD
new file mode 100644
index 000000000..1914cc4a2
--- /dev/null
+++ b/testing/gtkimageview/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=gtkimageview
+pkgver=1.6.4
+pkgrel=1
+pkgdesc="image viewing widget for GTK+"
+url="http://trac.bjourne.webfactional.com/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="gtk+-dev gdk-pixbuf-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="saveas-http://trac.bjourne.webfactional.com/attachment/wiki/WikiStart/${pkgname}-${pkgver}.tar.gz?format=raw/${pkgname}-${pkgver}.tar.gz"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="501367b3f50e69a12208dc9c6ad00b18 gtkimageview-1.6.4.tar.gz"
diff --git a/testing/gupnp/APKBUILD b/testing/gupnp/APKBUILD
new file mode 100644
index 000000000..b0b58d3d8
--- /dev/null
+++ b/testing/gupnp/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gupnp
+pkgver=0.16.1
+pkgrel=2
+pkgdesc="A framework for creating UPnP devices & control points"
+url="http://www.gupnp.org/"
+arch="all"
+license="LGPLv2+"
+depends=
+depends_dev="dbus-dev libsoup-dev libxml2-dev util-linux-dev gssdp-dev"
+makedepends="$depends_dev gobject-introspection-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.gupnp.org/sites/all/files/sources/gupnp-$pkgver.tar.gz"
+
+_builddir="$srcdir"/gupnp-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-introspection=yes \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="021bb237741532af4bca50157ff326e4 gupnp-0.16.1.tar.gz"
diff --git a/testing/guvcview/APKBUILD b/testing/guvcview/APKBUILD
new file mode 100644
index 000000000..e0f355374
--- /dev/null
+++ b/testing/guvcview/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=guvcview
+pkgver=1.4.5
+pkgrel=0
+pkgdesc="Webcam viewer"
+url="http://guvcview.berlios.de/"
+arch="all"
+license="GPLv3"
+depends=
+depends_dev=
+makedepends="gtk+-dev udev-dev sdl-dev portaudio-dev ffmpeg-dev v4l-utils-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://download.berlios.de/guvcview/guvcview-src-$pkgver.tar.gz"
+
+_builddir="$srcdir"/guvcview-src-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="33d50a974f3db34eb5241686c3f86b60 guvcview-src-1.4.5.tar.gz"
diff --git a/testing/hardinfo/APKBUILD b/testing/hardinfo/APKBUILD
new file mode 100644
index 000000000..1c721efc2
--- /dev/null
+++ b/testing/hardinfo/APKBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=hardinfo
+pkgver=0.5.1
+pkgrel=4
+pkgdesc="A system information and benchmark tool."
+url="http://hardinfo.berlios.de/wiki/index.php/Main_Page"
+arch="all"
+license="GPL-2"
+makedepends="gtk+-dev libsoup-dev>=2.4.0 gnutls-dev>=2.4.1"
+depends=
+source="http://download.berlios.de/$pkgname/$pkgname-$pkgver.tar.bz2
+ fixsensors.patch
+ uclibc.patch
+ hardinfo-alpine.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ # configure scrip says bash but bb ash works just fine
+ sed -i -e '1,1s/bash/sh/' configure
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -d "$pkgdir"/etc
+ echo "Alpine Linux" > "$pkgdir"/etc/hardinfo.distro
+}
+md5sums="6fb38992e140f2fab16518ae1f38e188 hardinfo-0.5.1.tar.bz2
+05c212db07b9f152cdea052ff7bb28fa fixsensors.patch
+e5dfccb5d3cb46acd36072f9e2396ff4 uclibc.patch
+41651eb55dc219b6d9c279227a17514a hardinfo-alpine.patch"
diff --git a/testing/hardinfo/fixsensors.patch b/testing/hardinfo/fixsensors.patch
new file mode 100644
index 000000000..812c29458
--- /dev/null
+++ b/testing/hardinfo/fixsensors.patch
@@ -0,0 +1,13 @@
+ diff -upNr hardinfo-0.4.2.2.orign/util.c hardinfo-0.4.2.2/util.c
+--- hardinfo-0.4.2.2.orign/util.c 2007-07-20 16:45:08.000000000 +0200
++++ hardinfo-0.4.2.2/util.c 2007-07-26 10:15:32.000000000 +0200
+@@ -996,7 +996,8 @@ gchar *h_strdup_cprintf(const gchar * fo
+ if (source) {
+ retn = g_strconcat(source, buffer, NULL);
+ g_free(buffer);
+- g_free(source);
++ if(strlen(source))
++ g_free(source);
+ } else {
+ retn = buffer;
+ }
diff --git a/testing/hardinfo/hardinfo-alpine.patch b/testing/hardinfo/hardinfo-alpine.patch
new file mode 100644
index 000000000..47e3cb73a
--- /dev/null
+++ b/testing/hardinfo/hardinfo-alpine.patch
@@ -0,0 +1,10 @@
+--- ./computer.h.orig
++++ ./computer.h
+@@ -23,6 +23,7 @@
+ static struct {
+ gchar *file, *codename;
+ } distro_db[] = {
++ { DB_PREFIX "alpine-release", "al" },
+ { DB_PREFIX "debian_version", "deb" },
+ { DB_PREFIX "slackware-version", "slk" },
+ { DB_PREFIX "mandrake-release", "mdk" },
diff --git a/testing/hardinfo/uclibc.patch b/testing/hardinfo/uclibc.patch
new file mode 100644
index 000000000..c24e9ea1a
--- /dev/null
+++ b/testing/hardinfo/uclibc.patch
@@ -0,0 +1,22 @@
+diff --git a/arch/linux/common/os.h b/arch/linux/common/os.h
+index f3c2c2d..78bc78b 100644
+--- a/arch/linux/common/os.h
++++ b/arch/linux/common/os.h
+@@ -49,6 +49,9 @@ err:
+ static gchar *
+ get_libc_version(void)
+ {
++#if defined(__UCLIBC__)
++ return g_strdup("uClibc");
++#else
+ FILE *libc;
+ gchar buf[256], *tmp, *p;
+
+@@ -70,6 +73,7 @@ get_libc_version(void)
+ strstr(buf, " stable ") ? "" : "un");
+ err:
+ return g_strdup("Unknown");
++#endif
+ }
+
+ static gchar *
diff --git a/testing/haveged/APKBUILD b/testing/haveged/APKBUILD
new file mode 100644
index 000000000..e3548c7a0
--- /dev/null
+++ b/testing/haveged/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=haveged
+pkgver=1.2
+pkgrel=1
+pkgdesc="haveged is a daemon that feeds the /dev/random pool on Linux"
+url="http://www.issihosts.com/haveged/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.issihosts.com/haveged/haveged-$pkgver.tar.gz
+ haveged.initd haveged.confd"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix /usr --sysconfdir /etc
+ make || return 1
+ make check || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ install -Dm644 AUTHORS "$pkgdir"/usr/share/doc/$pkgname/AUTHORS
+ install -Dm644 ChangeLog "$pkgdir"/usr/share/doc/$pkgname/ChangeLog
+ install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL
+ install -Dm644 NEWS "$pkgdir"/usr/share/doc/$pkgname/NEWS
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ install -Dm755 "$srcdir"/haveged.initd "$pkgdir"/etc/init.d/haveged
+ install -Dm644 "$srcdir"/haveged.confd "$pkgdir"/etc/conf.d/haveged
+}
+
+md5sums="dc961f36c065239f2ddeeb840ddf9ec0 haveged-1.2.tar.gz
+0718d29f820b878a311e939b3682935c haveged.initd
+242300ea7948a16018d1b0f77fb5ec96 haveged.confd"
diff --git a/testing/haveged/haveged.confd b/testing/haveged/haveged.confd
new file mode 100644
index 000000000..9ee6c6177
--- /dev/null
+++ b/testing/haveged/haveged.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/haveged
+
+# Any extra options you want to pass to haveged
+# on start-up should be put here.
+HAVEGED_OPTS=""
diff --git a/testing/haveged/haveged.initd b/testing/haveged/haveged.initd
new file mode 100644
index 000000000..d8b2fadbf
--- /dev/null
+++ b/testing/haveged/haveged.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting haveged"
+ start-stop-daemon --start --quiet --exec /usr/sbin/haveged -- ${HAVEGED_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping haveged"
+ start-stop-daemon --stop --quiet --pidfile /var/run/haveged.pid
+ result=$?
+ eend $result
+}
diff --git a/testing/hdparm/APKBUILD b/testing/hdparm/APKBUILD
new file mode 100644
index 000000000..c3d24ed7a
--- /dev/null
+++ b/testing/hdparm/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=hdparm
+pkgver=9.37
+pkgrel=0
+pkgdesc="hard drive parameter setting and benchmarking tool"
+url="http://sourceforge.net/projects/hdparm"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/hdparm/files/hdparm/hdparm-$pkgver.tar.gz"
+
+_builddir="$srcdir"/hdparm-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="0bb94ddd1bedd5c02b1ca62f1caaf6de hdparm-9.37.tar.gz"
diff --git a/testing/hessling-editor/APKBUILD b/testing/hessling-editor/APKBUILD
new file mode 100644
index 000000000..7153775ca
--- /dev/null
+++ b/testing/hessling-editor/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor:
+# Maintainer:
+pkgname=hessling-editor
+_pkgname=THE
+pkgver=3.3_rc1
+_pkgver=3.3RC1
+pkgrel=1
+pkgdesc="Powerful text editor modelled on the XEDIT with the best features of Kedit."
+url="http://hessling-editor.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=
+makedepends="ncurses-dev regina-rexx"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$_pkgname-$_pkgver.tar.gz"
+
+_builddir="$srcdir"/$_pkgname-$_pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --with-rexx=regina --with-ncurses --prefix=/usr || return 1
+ make all || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="e46b63e533bc458f6f701983b7f2150b THE-3.3RC1.tar.gz"
diff --git a/testing/hexcurse/APKBUILD b/testing/hexcurse/APKBUILD
new file mode 100644
index 000000000..7bf023913
--- /dev/null
+++ b/testing/hexcurse/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=hexcurse
+pkgver=1.55
+pkgrel=0
+pkgdesc="Versatile ncurses-based hex editor"
+url="http://directory.fsf.org/project/HexCurse"
+arch="all"
+license="GPL"
+depends=
+depends_dev="ncurses-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://gd.tuwien.ac.at/opsys/linux/gentoo/distfiles/hexcurse-$pkgver.tar.gz
+ hexcurse-alloca.patch"
+
+_builddir="$srcdir"/hexcurse-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="c9f9485490300b5111aa429eabfef789 hexcurse-1.55.tar.gz
+5aae74a76923ee8e4fe033e0aa381a82 hexcurse-alloca.patch"
diff --git a/testing/hexcurse/hexcurse-alloca.patch b/testing/hexcurse/hexcurse-alloca.patch
new file mode 100644
index 000000000..2ea060f2d
--- /dev/null
+++ b/testing/hexcurse/hexcurse-alloca.patch
@@ -0,0 +1,14 @@
+--- hexcurse/src/getopt.c 2002-03-21 17:55:54.000000000 +0100
++++ hexcurse/src/getopt.c 2004-08-09 12:52:39.592951560 +0200
+@@ -36,8 +36,8 @@
+ * enables hexcurse to be compiled with SGI's proprietary compiler */
+ #ifdef _SGIAPI
+ #include <alloca.h>
+-#else
+-char *alloca ();
++//#else
++//char *alloca ();
+ #endif
+ #define __alloca alloca
+ /* end of modification */
+
diff --git a/testing/hping3/APKBUILD b/testing/hping3/APKBUILD
new file mode 100644
index 000000000..c58c0e4a0
--- /dev/null
+++ b/testing/hping3/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=hping3
+pkgver=20051105
+pkgrel=2
+pkgdesc="A ping-like TCP/IP packet assembler/analyzer"
+url="http://www.hping.org"
+arch="all"
+license="GPL"
+depends=""
+makedepends="libpcap-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://www.hping.org/$pkgname-$pkgver.tar.gz
+ hping3-bytesex.patch"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ sed -i -e 's:net/bpf.h:pcap/bpf.h:' libpcap_stuff.c script.c || return 1
+
+ patch -p0 < "$srcdir"/hping3-bytesex.patch
+}
+
+build() {
+ cd "$_builddir"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --no-tcl
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ install -m755 -D hping3 "$pkgdir"/usr/sbin/hping3
+ ln -s hping3 "$pkgdir"/usr/sbin/hping
+ ln -s hping3 "$pkgdir"/usr/sbin/hping2
+ install -m644 -D docs/hping2.8 "$pkgdir"/usr/share/man/man8/hping2.8
+ install -m644 -D docs/hping3.8 "$pkgdir"/usr/share/man/man8/hping3.8
+}
+
+md5sums="ca4ea4e34bcc2162aedf25df8b2d1747 hping3-20051105.tar.gz
+f2a6d31aa1694cfebe325929f832fd78 hping3-bytesex.patch"
diff --git a/testing/hping3/hping3-bytesex.patch b/testing/hping3/hping3-bytesex.patch
new file mode 100644
index 000000000..b58d6ea66
--- /dev/null
+++ b/testing/hping3/hping3-bytesex.patch
@@ -0,0 +1,23 @@
+--- bytesex.h.orig 2003-08-31 19:23:48.000000000 +0200
++++ bytesex.h 2009-05-25 09:40:31.000000000 +0200
+@@ -9,13 +9,19 @@
+
+ #if defined(__i386__) \
+ || defined(__alpha__) \
++ || defined(__x86_64__) \
++ || defined(__ia64__) \
++ || defined(__sh__) \
++ || (defined(__arm__) && defined(__ARMEL__)) \
+ || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+ #define BYTE_ORDER_LITTLE_ENDIAN
+ #elif defined(__mc68000__) \
++ || defined (__s390__) \
+ || defined (__sparc__) \
+ || defined (__sparc) \
+ || defined (__PPC__) \
+ || defined (__BIG_ENDIAN__) \
++ || (defined(__arm__) && defined(__ARMEB__)) \
+ || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
+ #define BYTE_ORDER_BIG_ENDIAN
+ #else
+
diff --git a/testing/html2ps/APKBUILD b/testing/html2ps/APKBUILD
new file mode 100644
index 000000000..c57f659c6
--- /dev/null
+++ b/testing/html2ps/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor:
+# Maintainer:
+pkgname=html2ps
+pkgver=1.0b5
+pkgrel=0
+pkgdesc="Perl version of html2ps"
+url="http://user.it.uu.se/~jan/html2ps.html"
+arch="all"
+license="GPL"
+depends="perl wget imagemagick"
+makedepends=""
+install=
+subpackages="$pkgname-doc"
+source="http://user.it.uu.se/~jan/$pkgname-$pkgver.tar.gz
+ html2ps-conf.patch"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i"
+ patch < $i || return 1
+ done
+ mv install install.sh
+
+ install -m755 -D "$srcdir"/$pkgname-$pkgver/html2ps "$pkgdir"/usr/bin/html2ps
+ install -m644 -D "$srcdir"/$pkgname-$pkgver/sample "$pkgdir"/etc/html2ps.conf
+ install -m644 -D "$srcdir"/$pkgname-$pkgver/html2ps.1 "$pkgdir"/usr/share/man/man1/html2ps.1
+ install -m644 -D "$srcdir"/$pkgname-$pkgver/html2psrc.5 "$pkgdir"/usr/share/man/man5/html2psrc.5
+}
+
+md5sums="0998fefa4c8f9a04c88cfac7a83df629 html2ps-1.0b5.tar.gz
+336a9e908578aeee303660a083b58c03 html2ps-conf.patch"
diff --git a/testing/html2ps/html2ps-conf.patch b/testing/html2ps/html2ps-conf.patch
new file mode 100644
index 000000000..e96e1e1e8
--- /dev/null
+++ b/testing/html2ps/html2ps-conf.patch
@@ -0,0 +1,11 @@
+--- html2ps-1.0b5.orig/html2ps Wed Aug 5 19:54:09 2009
++++ html2ps-1.0b5/html2ps Wed Aug 5 19:54:34 2009
+@@ -26,7 +26,7 @@
+ # Set the name of the global configuration file. See the installation notes
+ # and manual page for more details on configuration files.
+
+-$globrc='/opt/misc/lib/html2ps/html2psrc';
++$globrc='/etc/html2ps.conf';
+ $ug='/opt/misc/lib/html2ps/html2ps.html';
+
+ $conf=<<'EOR';
diff --git a/testing/httpry/APKBUILD b/testing/httpry/APKBUILD
new file mode 100644
index 000000000..9a3c41933
--- /dev/null
+++ b/testing/httpry/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=httpry
+pkgver=0.1.6
+pkgrel=0
+pkgdesc="A packet sniffer designed for HTTP traffic"
+url="http://dumpsterventures.com/jason/httpry/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="libpcap-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://dumpsterventures.com/jason/httpry/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -m755 -D "$_builddir"/$pkgname "$pkgdir"/usr/sbin/$pkgname
+ install -m644 -D "$_builddir"/$pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1
+}
+
+md5sums="ef016e3e0e950993b7c9811b6859ec4d httpry-0.1.6.tar.gz"
diff --git a/testing/hydrogen/APKBUILD b/testing/hydrogen/APKBUILD
new file mode 100644
index 000000000..db4ea7708
--- /dev/null
+++ b/testing/hydrogen/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=hydrogen
+pkgver=0.9.5
+pkgrel=1
+pkgdesc="Advanced drum machine for GNU/Linux"
+url="http://www.hydrogen-music.org/"
+arch="all"
+license="GPLv2+"
+depends=""
+makedepends="qt-dev alsa-lib-dev flac-dev libsndfile-dev scons portaudio-dev
+ libarchive-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/hydrogen/hydrogen-$pkgver.tar.gz
+ hydrogen-docdir.patch"
+
+_builddir="$srcdir"/hydrogen-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ patch -p0 -i patches/portaudio.patch || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export QTDIR=/usr/lib
+ scons -j${JOBS:-2} \
+ prefix=/usr \
+ jack=0 \
+ portaudio=1 \
+ libarchive=1 \
+ portmidi=0 \
+ lash=0 \
+ lrdf=0 \
+ oss=0 \
+ optflags="$CFLAGS" \
+ || return 1
+}
+
+package() {
+ cd "$_builddir"
+ export QTDIR=/usr/lib
+ scons -j ${JOBS:-2} install DESTDIR="$pkgdir" || return 1
+}
+
+md5sums="e96f291d60e58f5d62fe616cee577dc0 hydrogen-0.9.5.tar.gz
+0d9552ee114f57df67d677263816ec78 hydrogen-docdir.patch"
diff --git a/testing/hydrogen/hydrogen-docdir.patch b/testing/hydrogen/hydrogen-docdir.patch
new file mode 100644
index 000000000..71c6a6d86
--- /dev/null
+++ b/testing/hydrogen/hydrogen-docdir.patch
@@ -0,0 +1,11 @@
+--- ./Sconstruct.orig
++++ ./Sconstruct
+@@ -309,7 +309,7 @@
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/hydrogen.default.conf"))
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/emptySample.wav"))
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/click.wav"))
+- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/doc"))
++ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/doc/hydrogen', source="./data/doc"))
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/DefaultSong.h2song"))
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/bin/', source="./hydrogen"))
+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/applications', source="./hydrogen.desktop"))
diff --git a/testing/ices/APKBUILD b/testing/ices/APKBUILD
new file mode 100644
index 000000000..574954b3b
--- /dev/null
+++ b/testing/ices/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=ices
+pkgver=0.4
+pkgrel=2
+pkgdesc="Source client for broadcasting in MP3 format to an icecast2 server"
+url="http://icecast.org/ices.php"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="libogg-dev libxml2-dev libvorbis-dev libshout-dev alsa-lib-dev lame-dev perl-dev python-dev libxml2-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.us.xiph.org/releases/ices/$pkgname-$pkgver.tar.gz"
+_builddir=$srcdir/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --with-lame \
+ --with-vorbis \
+ --with-python \
+ --with-perl
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m644 -D conf/$pkgname.conf.dist "$pkgdir"/etc/$pkgname/$pkgname.conf
+}
+
+md5sums="d31450c4011561dae0229f071cb41cb6 ices-0.4.tar.gz"
diff --git a/testing/ices2/APKBUILD b/testing/ices2/APKBUILD
new file mode 100644
index 000000000..154513999
--- /dev/null
+++ b/testing/ices2/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=ices2
+_pkgname=ices
+pkgver=2.0.1
+pkgrel=3
+pkgdesc="source client for broadcasting in Ogg Vorbis format to an icecast2 server."
+url="http://icecast.org/ices.php"
+arch="all"
+license="GPL"
+depends=
+depends_dev="libogg-dev libxml2-dev libvorbis-dev libshout-dev alsa-lib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.us.xiph.org/releases/ices/$_pkgname-$pkgver.tar.gz"
+_builddir=$srcdir/$_pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --disable-sun-audio \
+ --enable-alsa
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/etc/$pkgname
+ make DESTDIR="$pkgdir" install || return 1
+ cd "$_builddir"/conf
+ for i in `ls *.xml`; do
+ install -m644 -D $i "$pkgdir"/etc/$pkgname/$i
+ done
+}
+md5sums="0d95ac34d59fed337028d5e7771076d8 ices-2.0.1.tar.gz"
diff --git a/testing/ifupdown/APKBUILD b/testing/ifupdown/APKBUILD
new file mode 100644
index 000000000..503d92720
--- /dev/null
+++ b/testing/ifupdown/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=ifupdown
+pkgver=0.6.10
+pkgrel=3
+pkgdesc="high level tools to configure network interfaces"
+url="http://packages.debian.org/ifupdown"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="perl"
+install="$pkgname.post-deinstall $pkgname.post-upgrade"
+subpackages=
+source="http://ftp.debian.org/pool/main/i/$pkgname/${pkgname}_$pkgver.tar.gz
+ ifupdown-busybox-compat.patch
+ ifupdown-alpine-ifstate.patch"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make BASEDIR="$pkgdir" install || return 1
+}
+
+md5sums="70db0d8caf06a17d65b612fa8919732b ifupdown_0.6.10.tar.gz
+b0f42f7ce1a4f416eddaa304db2d270e ifupdown-busybox-compat.patch
+486600edad1d9bf5b1a05bde421345e9 ifupdown-alpine-ifstate.patch"
diff --git a/testing/ifupdown/ifupdown-alpine-ifstate.patch b/testing/ifupdown/ifupdown-alpine-ifstate.patch
new file mode 100644
index 000000000..ae0095081
--- /dev/null
+++ b/testing/ifupdown/ifupdown-alpine-ifstate.patch
@@ -0,0 +1,13 @@
+--- ifupdown-0.6.10.orig/main.c
++++ ifupdown-0.6.10/main.c
+@@ -17,8 +17,8 @@
+ #line 3166 "ifupdown.nw"
+ int no_act = 0;
+ int verbose = 0;
+-char *statefile = "/etc/network/run/ifstate";
+-char *tmpstatefile = "/etc/network/run/.ifstate.tmp";
++char *statefile = "/var/run/ifstate";
++char *tmpstatefile = "/var/run/.ifstate.tmp";
+ #line 3185 "ifupdown.nw"
+ static void usage(char *execname);
+ static void help(char *execname);
diff --git a/testing/ifupdown/ifupdown-busybox-compat.patch b/testing/ifupdown/ifupdown-busybox-compat.patch
new file mode 100644
index 000000000..10d4ceeaa
--- /dev/null
+++ b/testing/ifupdown/ifupdown-busybox-compat.patch
@@ -0,0 +1,38 @@
+--- ifupdown-0.6.10.orig/main.c
++++ ifupdown-0.6.10/main.c
+@@ -61,7 +61,7 @@
+ printf("\t\t\t\t(note that this option doesn't disable mappings)\n");
+ printf("\t-v, --verbose\t\tprint out what would happen before doing it\n");
+ printf("\t--no-mappings\t\tdon't run any mappings\n");
+- printf("\t--force\t\t\tforce de/configuration\n");
++ printf("\t-f, --force\t\t\tforce de/configuration\n");
+ exit(0);
+ }
+ #line 3573 "ifupdown.nw"
+@@ -345,7 +345,7 @@
+ {"exclude", required_argument, NULL, 'e'},
+ {"no-act", no_argument, NULL, 'n'},
+ {"no-mappings", no_argument, NULL, 1 },
+- {"force", no_argument, NULL, 2 },
++ {"force", no_argument, NULL, 'f'},
+ {0,0,0,0}
+ };
+ #line 3173 "ifupdown.nw"
+@@ -415,7 +415,7 @@
+ #line 3235 "ifupdown.nw"
+ for(;;) {
+ int c;
+- c = getopt_long(argc, argv, "e:s:i:hVvna", long_opts, NULL);
++ c = getopt_long(argc, argv, "e:s:i:hVvnaf", long_opts, NULL);
+ if (c == EOF) break;
+
+ switch(c) {
+@@ -445,7 +445,7 @@
+ run_mappings = 0;
+ break;
+ #line 3283 "ifupdown.nw"
+-case 2:
++case 'f':
+ force = 1;
+ break;
+ #line 3288 "ifupdown.nw"
diff --git a/testing/ifupdown/ifupdown.post-deinstall b/testing/ifupdown/ifupdown.post-deinstall
new file mode 100644
index 000000000..99b57c463
--- /dev/null
+++ b/testing/ifupdown/ifupdown.post-deinstall
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+busybox --install -s
diff --git a/testing/ifupdown/ifupdown.post-upgrade b/testing/ifupdown/ifupdown.post-upgrade
new file mode 100644
index 000000000..99b57c463
--- /dev/null
+++ b/testing/ifupdown/ifupdown.post-upgrade
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+busybox --install -s
diff --git a/testing/imagination/APKBUILD b/testing/imagination/APKBUILD
new file mode 100644
index 000000000..28104e612
--- /dev/null
+++ b/testing/imagination/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=imagination
+pkgver=3.0
+pkgrel=0
+pkgdesc="Lightweight and simple DVD slide show maker"
+url="http://imagination.sourceforge.net/"
+arch="all"
+license="GPL3"
+depends=
+makedepends="gtk+-dev ffmpeg-dev sox-dev docbook-xsl"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/imagination/imagination/$pkgver/imagination-$pkgver.tar.gz"
+
+_builddir="$srcdir"/imagination-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/imagination/*.la
+}
+
+md5sums="ec7e6cf234020801a2af0fa04cfefef1 imagination-3.0.tar.gz"
diff --git a/testing/imake/APKBUILD b/testing/imake/APKBUILD
new file mode 100644
index 000000000..64704c637
--- /dev/null
+++ b/testing/imake/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=imake
+pkgver=1.0.4
+pkgrel=0
+pkgdesc="X Windows make utility"
+url="http://www.x.org"
+arch="all"
+license="custom"
+depends=
+depends_dev=
+makedepends="xproto util-macros $depends_dev"
+install=""
+#subpackages="$pkgname-dev $pkgname-doc"
+source="http://ftp.x.org/pub/individual/util/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure || make || return 1
+}
+
+package() {
+ echo "PACKAGE stage"
+ echo "pkgdir = $pkgdir"
+ cd "$_builddir"
+ pwd
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="0fd1e53d94142ddee5340f87de0b9561 imake-1.0.4.tar.gz"
diff --git a/testing/imapproxy/APKBUILD b/testing/imapproxy/APKBUILD
new file mode 100644
index 000000000..899e35757
--- /dev/null
+++ b/testing/imapproxy/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=imapproxy
+pkgver=1.2.7
+pkgrel=0
+pkgdesc="session pooling imap proxy"
+url="http://imapproxy.org"
+arch="all"
+license="GPL-2"
+depends=
+makedepends="ncurses-dev openssl-dev"
+install=
+subpackages=
+source="http://prdownloads.sourceforge.net/squirrelmail/squirrelmail-imap_proxy-$pkgver.tar.bz2"
+
+_builddir="$srcdir/squirrelmail-imap_proxy-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make EBIN="$pkgdir"/usr/sbin install || return 1
+}
+
+md5sums="c46524414a2375310557686e723bd120 squirrelmail-imap_proxy-1.2.7.tar.bz2"
diff --git a/testing/inotify-tools/APKBUILD b/testing/inotify-tools/APKBUILD
new file mode 100644
index 000000000..730b05c23
--- /dev/null
+++ b/testing/inotify-tools/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname="inotify-tools"
+pkgver=3.14
+pkgrel=1
+pkgdesc="C library and CLI tools providing a simple interface to inotify"
+url="http://github.com/rvoicilas/inotify-tools"
+arch="all"
+license="GPL"
+depends=
+makedepends="wget"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/downloads/rvoicilas/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="b43d95a0fa8c45f8bab3aec9672cf30c inotify-tools-3.14.tar.gz"
diff --git a/testing/iotop/APKBUILD b/testing/iotop/APKBUILD
new file mode 100644
index 000000000..8abe65cf9
--- /dev/null
+++ b/testing/iotop/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=iotop
+pkgver=0.4.4
+pkgrel=0
+pkgdesc="I/O monitoring tool"
+url="http://guichaz.free.fr/iotop/"
+arch="noarch"
+license="GPL"
+depends="python"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://guichaz.free.fr/iotop/files/iotop-$pkgver.tar.gz"
+
+_builddir="$srcdir"/iotop-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="03f9a5866435cd67108cdb4f68b0d1f3 iotop-0.4.4.tar.gz"
diff --git a/testing/ipgrab/APKBUILD b/testing/ipgrab/APKBUILD
new file mode 100644
index 000000000..778fc1bee
--- /dev/null
+++ b/testing/ipgrab/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=ipgrab
+pkgver=0.9.8
+pkgrel=0
+pkgdesc="A verbose packet sniffer for hosts"
+url="http://ipgrab.sourceforge.net/"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends="libpcap-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/ipgrab/ipgrab-$pkgver.tar.gz"
+_builddir="$srcdir"/ipgrab-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure ÂÂÂ\
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="73404aeee6e8c07b6b7d260ffe80b692 ipgrab-0.9.8.tar.gz"
diff --git a/testing/iproute2/0001-xfrm-mark.patch b/testing/iproute2/0001-xfrm-mark.patch
new file mode 100644
index 000000000..9d8f1bfac
--- /dev/null
+++ b/testing/iproute2/0001-xfrm-mark.patch
@@ -0,0 +1,401 @@
+From d7cdb7750c80071fd2176d9e2c78e2e5052a2ac7 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 23 Feb 2010 16:08:17 +0000
+Subject: [PATCH] xfrm mark
+
+---
+ include/linux/xfrm.h | 6 ++++
+ ip/ipxfrm.c | 40 +++++++++++++++++++++++++++
+ ip/xfrm.h | 1 +
+ ip/xfrm_policy.c | 38 ++++++++++++++++++++++++-
+ ip/xfrm_state.c | 74 ++++++++++++++++++++++++++++++++++++++++---------
+ 5 files changed, 143 insertions(+), 16 deletions(-)
+
+diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
+index a59bc4a..5cc2dd2 100644
+--- a/include/linux/xfrm.h
++++ b/include/linux/xfrm.h
+@@ -283,11 +283,17 @@ enum xfrm_attr_type_t {
+ XFRMA_MIGRATE,
+ XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
+ XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
++ XFRMA_MARK,
+ __XFRMA_MAX
+
+ #define XFRMA_MAX (__XFRMA_MAX - 1)
+ };
+
++struct xfrm_umark {
++ __u32 v; /* value */
++ __u32 m; /* mask */
++};
++
+ enum xfrm_sadattr_type_t {
+ XFRMA_SAD_UNSPEC,
+ XFRMA_SAD_CNT,
+diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
+index 18250de..8250ec1 100644
+--- a/ip/ipxfrm.c
++++ b/ip/ipxfrm.c
+@@ -629,9 +629,48 @@ static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len,
+ }
+ }
+
++int xfrm_parse_mark(struct xfrm_umark *mark, int *argcp, char ***argvp)
++{
++ int argc = *argcp;
++ char **argv = *argvp;
++
++ NEXT_ARG();
++ if (get_u32(&mark->v, *argv, 0)) {
++ invarg("Illegal \"mark\" value\n", *argv);
++ }
++ if (argc > 1)
++ NEXT_ARG();
++ else { /* last entry on parse line */
++ mark->m = 0xffffffff;
++ goto done;
++ }
++
++ if (strcmp(*argv, "mask") == 0) {
++ NEXT_ARG();
++ if (get_u32(&mark->m, *argv, 0)) {
++ invarg("Illegal \"mark\" mask\n", *argv);
++ }
++ } else {
++ mark->m = 0xffffffff;
++ PREV_ARG();
++ }
++
++done:
++ *argcp = argc;
++ *argvp = argv;
++
++ return 0;
++}
++
+ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
+ FILE *fp, const char *prefix)
+ {
++ if (tb[XFRMA_MARK]) {
++ struct rtattr *rta = tb[XFRMA_MARK];
++ struct xfrm_umark *m = (struct xfrm_umark *) RTA_DATA(rta);
++ fprintf(fp, "\tmark %d/0x%x\n", m->v, m->m);
++ }
++
+ if (tb[XFRMA_ALG_AUTH]) {
+ struct rtattr *rta = tb[XFRMA_ALG_AUTH];
+ xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta),
+@@ -740,6 +779,7 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
+ fprintf(fp, "%s", strxf_time(lastused));
+ fprintf(fp, "%s", _SL_);
+ }
++
+ }
+
+ static int xfrm_selector_iszero(struct xfrm_selector *s)
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 104fb20..ab03b19 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -121,6 +121,7 @@ int xfrm_xfrmproto_is_ipsec(__u8 proto);
+ int xfrm_xfrmproto_is_ro(__u8 proto);
+ int xfrm_xfrmproto_getbyname(char *name);
+ int xfrm_algotype_getbyname(char *name);
++int xfrm_parse_mark(struct xfrm_umark *mark, int *argcp, char ***argvp);
+ const char *strxf_xfrmproto(__u8 proto);
+ const char *strxf_algotype(int type);
+ const char *strxf_mask8(__u8 mask);
+diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
+index 11116e5..5b5bafa 100644
+--- a/ip/xfrm_policy.c
++++ b/ip/xfrm_policy.c
+@@ -54,8 +54,8 @@ static void usage(void) __attribute__((noreturn));
+ static void usage(void)
+ {
+ fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR SELECTOR [ index INDEX ] [ ptype PTYPE ]\n");
+- fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ] [ LIMIT-LIST ] [ TMPL-LIST ]\n");
+- fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ptype PTYPE ]\n");
++ fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ] [ LIMIT-LIST ] [ TMPL-LIST ] [mark MARK [mask MASK]]\n");
++ fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ptype PTYPE ] [mark MARK [mask MASK]]\n");
+ fprintf(stderr, "Usage: ip xfrm policy { deleteall | list } [ dir DIR ] [ SELECTOR ]\n");
+ fprintf(stderr, " [ index INDEX ] [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ]\n");
+ fprintf(stderr, "Usage: ip xfrm policy flush [ ptype PTYPE ]\n");
+@@ -235,6 +235,7 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+ struct xfrm_userpolicy_type upt;
+ char tmpls_buf[XFRM_TMPLS_BUF_SIZE];
+ int tmpls_len = 0;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&upt, 0, sizeof(upt));
+@@ -258,6 +259,8 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+
+ NEXT_ARG();
+ xfrm_policy_dir_parse(&req.xpinfo.dir, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "index") == 0) {
+ NEXT_ARG();
+ if (get_u32(&req.xpinfo.index, *argv, 0))
+@@ -334,6 +337,16 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+ (void *)tmpls_buf, tmpls_len);
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "%s: XFRMA_MARK failed\n",__func__);
++ exit(1);
++ }
++ }
++
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -515,6 +528,7 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ char *indexp = NULL;
+ char *ptypep = NULL;
+ struct xfrm_userpolicy_type upt;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&upt, 0, sizeof(upt));
+@@ -532,6 +546,8 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ NEXT_ARG();
+ xfrm_policy_dir_parse(&req.xpid.dir, &argc, &argv);
+
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "index") == 0) {
+ if (indexp)
+ duparg("index", *argv);
+@@ -584,6 +600,15 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ if (req.xpid.sel.family == AF_UNSPEC)
+ req.xpid.sel.family = AF_INET;
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "%s: XFRMA_MARK failed\n",__func__);
++ exit(1);
++ }
++ }
++
+ if (rtnl_talk(&rth, &req.n, 0, 0, res_nlbuf, NULL, NULL) < 0)
+ exit(2);
+
+@@ -951,26 +976,35 @@ static int xfrm_policy_flush(int argc, char **argv)
+
+ int do_xfrm_policy(int argc, char **argv)
+ {
++//Needs testing ..
+ if (argc < 1)
+ return xfrm_policy_list_or_deleteall(0, NULL, 0);
+
++//should work
+ if (matches(*argv, "add") == 0)
+ return xfrm_policy_modify(XFRM_MSG_NEWPOLICY, 0,
+ argc-1, argv+1);
++//should work
+ if (matches(*argv, "update") == 0)
+ return xfrm_policy_modify(XFRM_MSG_UPDPOLICY, 0,
+ argc-1, argv+1);
++//should work
+ if (matches(*argv, "delete") == 0)
+ return xfrm_policy_delete(argc-1, argv+1);
++//Needs fixing ..
+ if (matches(*argv, "deleteall") == 0 || matches(*argv, "delall") == 0)
+ return xfrm_policy_list_or_deleteall(argc-1, argv+1, 1);
++//should work
+ if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
+ || matches(*argv, "lst") == 0)
+ return xfrm_policy_list_or_deleteall(argc-1, argv+1, 0);
++//should work
+ if (matches(*argv, "get") == 0)
+ return xfrm_policy_get(argc-1, argv+1);
++//should work
+ if (matches(*argv, "flush") == 0)
+ return xfrm_policy_flush(argc-1, argv+1);
++//should work
+ if (matches(*argv, "count") == 0)
+ return xfrm_spd_getinfo(argc, argv);
+ if (matches(*argv, "help") == 0)
+diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
+index b1e3f22..d645c18 100644
+--- a/ip/xfrm_state.c
++++ b/ip/xfrm_state.c
+@@ -67,7 +67,7 @@ static void usage(void)
+ fprintf(stderr, "Usage: ip xfrm state flush [ proto XFRM_PROTO ]\n");
+ fprintf(stderr, "Usage: ip xfrm state count \n");
+
+- fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM_PROTO ] [ spi SPI ]\n");
++ fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM_PROTO ] [ spi SPI ] [mark MARK [mask MASK]]\n");
+ //fprintf(stderr, "XFRM_PROTO := [ esp | ah | comp ]\n");
+ fprintf(stderr, "XFRM_PROTO := [ ");
+ fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
+@@ -242,6 +242,7 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
+ char *aalgop = NULL;
+ char *calgop = NULL;
+ char *coap = NULL;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&replay, 0, sizeof(replay));
+@@ -260,6 +261,8 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
+ if (strcmp(*argv, "mode") == 0) {
+ NEXT_ARG();
+ xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "reqid") == 0) {
+ NEXT_ARG();
+ xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
+@@ -436,6 +439,15 @@ parse_algo:
+ exit(1);
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ switch (req.xsinfo.mode) {
+ case XFRM_MODE_TRANSPORT:
+ case XFRM_MODE_TUNNEL:
+@@ -515,6 +527,7 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ char *idp = NULL;
+ char *minp = NULL;
+ char *maxp = NULL;
++ struct xfrm_umark mark = {0, 0};
+ char res_buf[NLMSG_BUF_SIZE];
+ struct nlmsghdr *res_n = (struct nlmsghdr *)res_buf;
+
+@@ -538,6 +551,8 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ if (strcmp(*argv, "mode") == 0) {
+ NEXT_ARG();
+ xfrm_mode_parse(&req.xspi.info.mode, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "reqid") == 0) {
+ NEXT_ARG();
+ xfrm_reqid_parse(&req.xspi.info.reqid, &argc, &argv);
+@@ -614,6 +629,15 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ req.xspi.max = 0xffff;
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -759,6 +783,7 @@ static int xfrm_state_get_or_delete(int argc, char **argv, int delete)
+ } req;
+ struct xfrm_id id;
+ char *idp = NULL;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+
+@@ -770,26 +795,39 @@ static int xfrm_state_get_or_delete(int argc, char **argv, int delete)
+ while (argc > 0) {
+ xfrm_address_t saddr;
+
+- if (idp)
+- invarg("unknown", *argv);
+- idp = *argv;
++ if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
++ } else {
++ if (idp)
++ invarg("unknown", *argv);
++ idp = *argv;
+
+- /* ID */
+- memset(&id, 0, sizeof(id));
+- memset(&saddr, 0, sizeof(saddr));
+- xfrm_id_parse(&saddr, &id, &req.xsid.family, 0,
+- &argc, &argv);
++ /* ID */
++ memset(&id, 0, sizeof(id));
++ memset(&saddr, 0, sizeof(saddr));
++ xfrm_id_parse(&saddr, &id, &req.xsid.family, 0,
++ &argc, &argv);
+
+- memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr));
+- req.xsid.spi = id.spi;
+- req.xsid.proto = id.proto;
++ memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr));
++ req.xsid.spi = id.spi;
++ req.xsid.proto = id.proto;
+
+- addattr_l(&req.n, sizeof(req.buf), XFRMA_SRCADDR,
+- (void *)&saddr, sizeof(saddr));
++ addattr_l(&req.n, sizeof(req.buf), XFRMA_SRCADDR,
++ (void *)&saddr, sizeof(saddr));
++ }
+
+ argc--; argv++;
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -1113,23 +1151,31 @@ int do_xfrm_state(int argc, char **argv)
+ if (argc < 1)
+ return xfrm_state_list_or_deleteall(0, NULL, 0);
+
++ //XXX: should work
+ if (matches(*argv, "add") == 0)
+ return xfrm_state_modify(XFRM_MSG_NEWSA, 0,
+ argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "update") == 0)
+ return xfrm_state_modify(XFRM_MSG_UPDSA, 0,
+ argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "allocspi") == 0)
+ return xfrm_state_allocspi(argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "delete") == 0)
+ return xfrm_state_get_or_delete(argc-1, argv+1, 1);
++ //XXX: needs testing ..
+ if (matches(*argv, "deleteall") == 0 || matches(*argv, "delall") == 0)
+ return xfrm_state_list_or_deleteall(argc-1, argv+1, 1);
++ //XXX: should work
+ if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
+ || matches(*argv, "lst") == 0)
+ return xfrm_state_list_or_deleteall(argc-1, argv+1, 0);
++ //XXX: should work
+ if (matches(*argv, "get") == 0)
+ return xfrm_state_get_or_delete(argc-1, argv+1, 0);
++ //XXX: should work
+ if (matches(*argv, "flush") == 0)
+ return xfrm_state_flush(argc-1, argv+1);
+ if (matches(*argv, "count") == 0) {
+--
+1.6.6.1
+
diff --git a/testing/iproute2/2.patch b/testing/iproute2/2.patch
new file mode 100644
index 000000000..57621bc65
--- /dev/null
+++ b/testing/iproute2/2.patch
@@ -0,0 +1,363 @@
+diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
+index 7dc36f3..0aaf97a 100644
+--- a/ip/ipxfrm.c
++++ b/ip/ipxfrm.c
+@@ -629,9 +629,48 @@ static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len,
+ }
+ }
+
++int xfrm_parse_mark(struct xfrm_umark *mark, int *argcp, char ***argvp)
++{
++ int argc = *argcp;
++ char **argv = *argvp;
++
++ NEXT_ARG();
++ if (get_u32(&mark->v, *argv, 0)) {
++ invarg("Illegal \"mark\" value\n", *argv);
++ }
++ if (argc > 1)
++ NEXT_ARG();
++ else { /* last entry on parse line */
++ mark->m = 0xffffffff;
++ goto done;
++ }
++
++ if (strcmp(*argv, "mask") == 0) {
++ NEXT_ARG();
++ if (get_u32(&mark->m, *argv, 0)) {
++ invarg("Illegal \"mark\" mask\n", *argv);
++ }
++ } else {
++ mark->m = 0xffffffff;
++ PREV_ARG();
++ }
++
++done:
++ *argcp = argc;
++ *argvp = argv;
++
++ return 0;
++}
++
+ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
+ FILE *fp, const char *prefix)
+ {
++ if (tb[XFRMA_MARK]) {
++ struct rtattr *rta = tb[XFRMA_MARK];
++ struct xfrm_umark *m = (struct xfrm_umark *) RTA_DATA(rta);
++ fprintf(fp, "\tmark %d/0x%x\n", m->v, m->m);
++ }
++
+ if (tb[XFRMA_ALG_AUTH]) {
+ struct rtattr *rta = tb[XFRMA_ALG_AUTH];
+ xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta),
+@@ -740,6 +779,7 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
+ fprintf(fp, "%s", strxf_time(lastused));
+ fprintf(fp, "%s", _SL_);
+ }
++
+ }
+
+ static int xfrm_selector_iszero(struct xfrm_selector *s)
+diff --git a/ip/xfrm.h b/ip/xfrm.h
+index 104fb20..ab03b19 100644
+--- a/ip/xfrm.h
++++ b/ip/xfrm.h
+@@ -121,6 +121,7 @@ int xfrm_xfrmproto_is_ipsec(__u8 proto);
+ int xfrm_xfrmproto_is_ro(__u8 proto);
+ int xfrm_xfrmproto_getbyname(char *name);
+ int xfrm_algotype_getbyname(char *name);
++int xfrm_parse_mark(struct xfrm_umark *mark, int *argcp, char ***argvp);
+ const char *strxf_xfrmproto(__u8 proto);
+ const char *strxf_algotype(int type);
+ const char *strxf_mask8(__u8 mask);
+diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
+index 2788477..7cdf0b6 100644
+--- a/ip/xfrm_policy.c
++++ b/ip/xfrm_policy.c
+@@ -54,8 +54,8 @@ static void usage(void) __attribute__((noreturn));
+ static void usage(void)
+ {
+ fprintf(stderr, "Usage: ip xfrm policy { add | update } dir DIR SELECTOR [ index INDEX ] [ ptype PTYPE ]\n");
+- fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ] [ LIMIT-LIST ] [ TMPL-LIST ]\n");
+- fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ptype PTYPE ]\n");
++ fprintf(stderr, " [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ] [ LIMIT-LIST ] [ TMPL-LIST ] [mark MARK [mask MASK]]\n");
++ fprintf(stderr, "Usage: ip xfrm policy { delete | get } dir DIR [ SELECTOR | index INDEX ] [ ptype PTYPE ] [mark MARK [mask MASK]]\n");
+ fprintf(stderr, "Usage: ip xfrm policy { deleteall | list } [ dir DIR ] [ SELECTOR ]\n");
+ fprintf(stderr, " [ index INDEX ] [ action ACTION ] [ priority PRIORITY ] [ flag FLAG-LIST ]\n");
+ fprintf(stderr, "Usage: ip xfrm policy flush [ ptype PTYPE ]\n");
+@@ -235,6 +235,7 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+ struct xfrm_userpolicy_type upt;
+ char tmpls_buf[XFRM_TMPLS_BUF_SIZE];
+ int tmpls_len = 0;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&upt, 0, sizeof(upt));
+@@ -258,6 +259,8 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+
+ NEXT_ARG();
+ xfrm_policy_dir_parse(&req.xpinfo.dir, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "index") == 0) {
+ NEXT_ARG();
+ if (get_u32(&req.xpinfo.index, *argv, 0))
+@@ -334,6 +337,16 @@ static int xfrm_policy_modify(int cmd, unsigned flags, int argc, char **argv)
+ (void *)tmpls_buf, tmpls_len);
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "%s: XFRMA_MARK failed\n",__func__);
++ exit(1);
++ }
++ }
++
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -515,6 +528,7 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ char *indexp = NULL;
+ char *ptypep = NULL;
+ struct xfrm_userpolicy_type upt;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&upt, 0, sizeof(upt));
+@@ -532,6 +546,8 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ NEXT_ARG();
+ xfrm_policy_dir_parse(&req.xpid.dir, &argc, &argv);
+
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "index") == 0) {
+ if (indexp)
+ duparg("index", *argv);
+@@ -584,6 +600,15 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
+ if (req.xpid.sel.family == AF_UNSPEC)
+ req.xpid.sel.family = AF_INET;
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "%s: XFRMA_MARK failed\n",__func__);
++ exit(1);
++ }
++ }
++
+ if (rtnl_talk(&rth, &req.n, 0, 0, res_nlbuf, NULL, NULL) < 0)
+ exit(2);
+
+@@ -951,26 +976,35 @@ static int xfrm_policy_flush(int argc, char **argv)
+
+ int do_xfrm_policy(int argc, char **argv)
+ {
++//Needs testing ..
+ if (argc < 1)
+ return xfrm_policy_list_or_deleteall(0, NULL, 0);
+
++//should work
+ if (matches(*argv, "add") == 0)
+ return xfrm_policy_modify(XFRM_MSG_NEWPOLICY, 0,
+ argc-1, argv+1);
++//should work
+ if (matches(*argv, "update") == 0)
+ return xfrm_policy_modify(XFRM_MSG_UPDPOLICY, 0,
+ argc-1, argv+1);
++//should work
+ if (matches(*argv, "delete") == 0)
+ return xfrm_policy_delete(argc-1, argv+1);
++//Needs fixing ..
+ if (matches(*argv, "deleteall") == 0 || matches(*argv, "delall") == 0)
+ return xfrm_policy_list_or_deleteall(argc-1, argv+1, 1);
++//should work
+ if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
+ || matches(*argv, "lst") == 0)
+ return xfrm_policy_list_or_deleteall(argc-1, argv+1, 0);
++//should work
+ if (matches(*argv, "get") == 0)
+ return xfrm_policy_get(argc-1, argv+1);
++//should work
+ if (matches(*argv, "flush") == 0)
+ return xfrm_policy_flush(argc-1, argv+1);
++//should work
+ if (matches(*argv, "count") == 0)
+ return xfrm_spd_getinfo(argc, argv);
+ if (matches(*argv, "help") == 0)
+diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
+index 32238ab..4255d25 100644
+--- a/ip/xfrm_state.c
++++ b/ip/xfrm_state.c
+@@ -67,7 +67,7 @@ static void usage(void)
+ fprintf(stderr, "Usage: ip xfrm state flush [ proto XFRM_PROTO ]\n");
+ fprintf(stderr, "Usage: ip xfrm state count \n");
+
+- fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM_PROTO ] [ spi SPI ]\n");
++ fprintf(stderr, "ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM_PROTO ] [ spi SPI ] [mark MARK [mask MASK]]\n");
+ //fprintf(stderr, "XFRM_PROTO := [ esp | ah | comp ]\n");
+ fprintf(stderr, "XFRM_PROTO := [ ");
+ fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
+@@ -246,6 +246,7 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
+ char *aalgop = NULL;
+ char *calgop = NULL;
+ char *coap = NULL;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+ memset(&replay, 0, sizeof(replay));
+@@ -264,6 +265,8 @@ static int xfrm_state_modify(int cmd, unsigned flags, int argc, char **argv)
+ if (strcmp(*argv, "mode") == 0) {
+ NEXT_ARG();
+ xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "reqid") == 0) {
+ NEXT_ARG();
+ xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
+@@ -440,6 +443,15 @@ parse_algo:
+ exit(1);
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ switch (req.xsinfo.mode) {
+ case XFRM_MODE_TRANSPORT:
+ case XFRM_MODE_TUNNEL:
+@@ -519,6 +531,7 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ char *idp = NULL;
+ char *minp = NULL;
+ char *maxp = NULL;
++ struct xfrm_umark mark = {0, 0};
+ char res_buf[NLMSG_BUF_SIZE];
+ struct nlmsghdr *res_n = (struct nlmsghdr *)res_buf;
+
+@@ -542,6 +555,8 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ if (strcmp(*argv, "mode") == 0) {
+ NEXT_ARG();
+ xfrm_mode_parse(&req.xspi.info.mode, &argc, &argv);
++ } else if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
+ } else if (strcmp(*argv, "reqid") == 0) {
+ NEXT_ARG();
+ xfrm_reqid_parse(&req.xspi.info.reqid, &argc, &argv);
+@@ -618,6 +633,15 @@ static int xfrm_state_allocspi(int argc, char **argv)
+ req.xspi.max = 0xffff;
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -763,6 +787,7 @@ static int xfrm_state_get_or_delete(int argc, char **argv, int delete)
+ } req;
+ struct xfrm_id id;
+ char *idp = NULL;
++ struct xfrm_umark mark = {0, 0};
+
+ memset(&req, 0, sizeof(req));
+
+@@ -774,26 +799,39 @@ static int xfrm_state_get_or_delete(int argc, char **argv, int delete)
+ while (argc > 0) {
+ xfrm_address_t saddr;
+
+- if (idp)
+- invarg("unknown", *argv);
+- idp = *argv;
++ if (strcmp(*argv, "mark") == 0) {
++ xfrm_parse_mark(&mark, &argc, &argv);
++ } else {
++ if (idp)
++ invarg("unknown", *argv);
++ idp = *argv;
+
+- /* ID */
+- memset(&id, 0, sizeof(id));
+- memset(&saddr, 0, sizeof(saddr));
+- xfrm_id_parse(&saddr, &id, &req.xsid.family, 0,
+- &argc, &argv);
++ /* ID */
++ memset(&id, 0, sizeof(id));
++ memset(&saddr, 0, sizeof(saddr));
++ xfrm_id_parse(&saddr, &id, &req.xsid.family, 0,
++ &argc, &argv);
+
+- memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr));
+- req.xsid.spi = id.spi;
+- req.xsid.proto = id.proto;
++ memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr));
++ req.xsid.spi = id.spi;
++ req.xsid.proto = id.proto;
+
+- addattr_l(&req.n, sizeof(req.buf), XFRMA_SRCADDR,
+- (void *)&saddr, sizeof(saddr));
++ addattr_l(&req.n, sizeof(req.buf), XFRMA_SRCADDR,
++ (void *)&saddr, sizeof(saddr));
++ }
+
+ argc--; argv++;
+ }
+
++ if (mark.m & mark.v) {
++ int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK,
++ (void *)&mark, sizeof(mark));
++ if (r < 0) {
++ fprintf(stderr, "XFRMA_MARK failed\n");
++ exit(1);
++ }
++ }
++
+ if (rtnl_open_byproto(&rth, 0, NETLINK_XFRM) < 0)
+ exit(1);
+
+@@ -1117,23 +1155,31 @@ int do_xfrm_state(int argc, char **argv)
+ if (argc < 1)
+ return xfrm_state_list_or_deleteall(0, NULL, 0);
+
++ //XXX: should work
+ if (matches(*argv, "add") == 0)
+ return xfrm_state_modify(XFRM_MSG_NEWSA, 0,
+ argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "update") == 0)
+ return xfrm_state_modify(XFRM_MSG_UPDSA, 0,
+ argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "allocspi") == 0)
+ return xfrm_state_allocspi(argc-1, argv+1);
++ //XXX: should work
+ if (matches(*argv, "delete") == 0)
+ return xfrm_state_get_or_delete(argc-1, argv+1, 1);
++ //XXX: needs testing ..
+ if (matches(*argv, "deleteall") == 0 || matches(*argv, "delall") == 0)
+ return xfrm_state_list_or_deleteall(argc-1, argv+1, 1);
++ //XXX: should work
+ if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
+ || matches(*argv, "lst") == 0)
+ return xfrm_state_list_or_deleteall(argc-1, argv+1, 0);
++ //XXX: should work
+ if (matches(*argv, "get") == 0)
+ return xfrm_state_get_or_delete(argc-1, argv+1, 0);
++ //XXX: should work
+ if (matches(*argv, "flush") == 0)
+ return xfrm_state_flush(argc-1, argv+1);
+ if (matches(*argv, "count") == 0) {
diff --git a/testing/iproute2/APKBUILD b/testing/iproute2/APKBUILD
new file mode 100644
index 000000000..42065e980
--- /dev/null
+++ b/testing/iproute2/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=iproute2
+pkgver=2.6.31
+_realver=2.6.31
+pkgrel=1
+pkgdesc="IP Routing Utilities"
+url="http://www.linux-foundation.org/en/Net:Iproute2"
+arch="all"
+license="GPL2"
+depends=
+install="$pkgname.post-install $pkgname.post-deinstall"
+makedepends="bison flex bash"
+subpackages="$pkgname-doc"
+source="http://devresources.linux-foundation.org/dev/iproute2/download/$pkgname-$_realver.tar.bz2
+ 0001-xfrm-mark.patch"
+
+prepare() {
+ cd "$srcdir"/$pkgname-$_realver
+
+ patch -p1 -i "$srcdir"/0001-xfrm-mark.patch || return 1
+ sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
+ sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h || return 1
+ sed -i 's:=/share:=/usr/share:' Makefile || return 1
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$_realver
+ ./configure || return 1
+ make CCOPTS="-D_GNU_SOURCE $CFLAGS" LIBDIR=/lib || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$_realver
+ make -j1 DESTDIR="$pkgdir" install
+}
+
+md5sums="230f35282a95451622f3e8394f9cd80a iproute2-2.6.31.tar.bz2
+f32fc320c0b5640d3f4d511d7c763f46 0001-xfrm-mark.patch"
diff --git a/testing/iproute2/iproute2.post-deinstall b/testing/iproute2/iproute2.post-deinstall
new file mode 100644
index 000000000..dd117e5d8
--- /dev/null
+++ b/testing/iproute2/iproute2.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+busybox --install -s
+
diff --git a/testing/iproute2/iproute2.post-install b/testing/iproute2/iproute2.post-install
new file mode 100644
index 000000000..36d567ea2
--- /dev/null
+++ b/testing/iproute2/iproute2.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "$(readlink /bin/ip)" = "/bin/busybox" ]; then
+ rm -f /bin/ip
+fi
+exit 0
diff --git a/testing/irrlicht/APKBUILD b/testing/irrlicht/APKBUILD
new file mode 100644
index 000000000..6d1405ba2
--- /dev/null
+++ b/testing/irrlicht/APKBUILD
@@ -0,0 +1,77 @@
+# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
+pkgname=irrlicht
+pkgver=1.7.2
+_pkgmajver=1.7
+pkgrel=0
+pkgdesc="3D graphics engine"
+url="http://irrlicht.sourceforge.net"
+arch="all"
+license="ZLIB"
+depends=
+depends_dev="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev"
+makedepends="$depends_dev"
+install=""
+source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip"
+
+_builddir="$srcdir"/$pkgname-$pkgver/source/Irrlicht
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make sharedlib || return 1
+ make || return 1
+
+ #from arch pkgbuild: example build helper
+ ln -s libIrrlicht.so.$pkgver "$srcdir"/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
+
+ cd ../../examples
+ # Fix examples building
+ sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/lib
+ mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
+ mkdir -p "$pkgdir"/usr/share/$pkgname/examples/bin
+ mkdir -p "$pkgdir"/usr/share/doc/$pkgname
+ mkdir -p "$pkgdir"/usr/include/$pkgname/include
+
+ make INSTALL_DIR="$pkgdir" install || return 1
+
+ cd ../..
+ install -m644 readme.txt "$pkgdir"/usr/share/licenses/$pkgname
+
+ #from arch pkgbuild: install static library and fix perms
+ install -m644 lib/Linux/libIrrlicht.a "$pkgdir"/usr/lib
+
+ #from arch pkgbuild: install media file examples
+ cp -r media "$pkgdir"/usr/share/$pkgname
+
+ #from arch pkgbuild: install docs
+ cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/*.txt
+
+ cd "$pkgdir"/usr/lib
+ mv ../../libIrrlicht* ./
+ ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
+ ln -s libIrrlicht.so.$pkgver libIrrlicht.so.$_pkgmajver
+
+ mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/
+ mv "$pkgdir"/usr/include/$pkgname/include/irrlicht/* "$pkgdir"/usr/include/$pkgname/include/
+ rm -rf "$pkgdir"/../include/
+
+ install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/
+}
+
+md5sums="eb627d4c432bf73f12bc6d9ddc700b07 irrlicht-1.7.2.zip"
diff --git a/testing/ivtv-utils/APKBUILD b/testing/ivtv-utils/APKBUILD
new file mode 100644
index 000000000..a496dbb65
--- /dev/null
+++ b/testing/ivtv-utils/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ivtv-utils
+pkgver=1.4.1
+pkgrel=0
+pkgdesc="Userspace utilities and firmware for Hauppauge PVR cards"
+url="http://ivtvdriver.org"
+arch="all"
+license="GPL"
+depends=
+makedepends=
+source="http://dl.ivtvdriver.org/ivtv/stable/$pkgname-$pkgver.tar.gz
+ http://dl.ivtvdriver.org/ivtv/firmware/ivtv-firmware.tar.gz"
+
+build ()
+{
+ cd "$srcdir"/$pkgname-$pkgver
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" PREFIX=/usr install || return 1
+
+ cd "$srcdir"
+ for file in *.fw v4l-cx2341x-init.mpg; do
+ install -D -m644 $file "$pkgdir"/lib/firmware/$file || return 1
+ done
+ rm -rf "$pkgdir"/usr/include
+}
+
+md5sums="3a4219d698262ca2b28e41f0f547b0a2 ivtv-utils-1.4.1.tar.gz
+b9a871f1c569025be9c48a77b3515faf ivtv-firmware.tar.gz"
diff --git a/testing/jbig2dec/APKBUILD b/testing/jbig2dec/APKBUILD
new file mode 100644
index 000000000..6c502864e
--- /dev/null
+++ b/testing/jbig2dec/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Michael Zhou <zhoumichaely@gmail.com>
+# Maintainer:
+pkgname=jbig2dec
+pkgver=0.11
+pkgrel=0
+pkgdesc="JBIG2 image compression format decoder"
+url="http://jbig2dec.sourceforge.net"
+arch="x86 x86_64"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://ghostscript.com/~giles/jbig2/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="1f61e144852c86563fee6e5ddced63f1 jbig2dec-0.11.tar.gz"
diff --git a/testing/jsoncpp/APKBUILD b/testing/jsoncpp/APKBUILD
new file mode 100644
index 000000000..5d42b6b0a
--- /dev/null
+++ b/testing/jsoncpp/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=jsoncpp
+pkgver=0.5.0
+pkgrel=1
+pkgdesc="JSON C++ library"
+url="http://jsoncpp.sourceforge.net/"
+arch="all"
+license="PublicDomain"
+depends=
+depends_dev=
+makedepends="$depends_dev scons"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/$pkgver/jsoncpp-src-$pkgver.tar.gz"
+
+_builddir="$srcdir"/jsoncpp-src-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ scons platform=linux-gcc || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/lib
+ cp "$_builddir"/libs/*/libjson*.so "$pkgdir"/usr/lib/libjson.so
+
+ mkdir -p "$pkgdir"/usr/include
+ cp -r "$_builddir"/include/json "$pkgdir"/usr/include/
+ ln -sf /usr/include/json "$pkgdir"/usr/include/jsoncpp
+}
+
+md5sums="24482b67c1cb17aac1ed1814288a3a8f jsoncpp-src-0.5.0.tar.gz"
+
diff --git a/testing/kbd/APKBUILD b/testing/kbd/APKBUILD
new file mode 100644
index 000000000..3a02a1e6c
--- /dev/null
+++ b/testing/kbd/APKBUILD
@@ -0,0 +1,97 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=kbd
+pkgver=1.15.3
+pkgrel=0
+pkgdesc="Tools for configuring the console (keyboard, virtual terminals, etc.)"
+url="http://ftp.altlinux.org/pub/people/legion/kbd"
+arch="all"
+license="GPLv2+"
+depends="kbd-misc"
+makedepends="bison flex autoconf automake"
+install=""
+subpackages="$pkgname-misc $pkgname-doc"
+source="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-$pkgver.tar.gz
+ kbd-1.15-resizecon-x86_64.patch
+ kbd-1.15.3-loadkeys-d.patch
+ "
+
+_builddir="$srcdir"/kbd-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ aclocal -I m4 && autoreconf || return 1
+
+ # fixes from fedora
+ # 7-bit maps are obsolete; so are non-euro maps
+ cd "$_builddir"/data/keymaps/i386
+ mv qwerty/fi.map qwerty/fi-old.map
+ cp qwerty/fi-latin9.map qwerty/fi.map
+ cp qwerty/pt-latin9.map qwerty/pt.map
+ cp qwerty/sv-latin1.map qwerty/se-latin1.map
+
+ mv azerty/fr.map azerty/fr-old.map
+ cp azerty/fr-latin9.map azerty/fr.map
+
+ cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
+
+ # Rename conflicting keymaps
+ mv dvorak/no.map dvorak/no-dvorak.map
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map
+ mv olpc/es.map olpc/es-olpc.map
+ mv olpc/pt.map olpc/pt-olpc.map
+ mv qwerty/cz.map qwerty/cz-qwerty.map
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --datadir=/lib/kbd \
+ --localedir=/usr/share/locale \
+ --disable-nls \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+
+ # ro_win.map.gz is useless
+ rm -f "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ro_win.map.gz
+
+ # Create additional name for Serbian latin keyboard
+ ln -s sr-cy.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/sr-latin.map.gz
+
+ # The rhpl keyboard layout table is indexed by kbd layout names,
+ # so we need a Korean keyboard
+ ln -s us.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ko.map.gz
+
+ # Move binaries which we use before /usr is mounted to /bin.
+ mkdir -p "$pkgdir"/bin
+ for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop loadkeys ; do
+ mv "$pkgdir"/usr/bin/$binary "$pkgdir"/bin/ || return 1
+ done
+
+ # Link open to openvt
+ ln -s openvt "$pkgdir"/usr/bin/open
+
+}
+
+misc() {
+ pkgdesc="Data for kbd package"
+ arch="noarch"
+ mkdir -p "$subpkgdir"/lib
+ mv "$pkgdir"/lib/kbd "$subpkgdir"/lib/
+}
+
+md5sums="8143e179a0f3c25646ce5085e8777200 kbd-1.15.3.tar.gz
+435755fb51017b17558f38a2a2c5074c kbd-1.15-resizecon-x86_64.patch
+d7bb334afc00f7794774762a07dacaa7 kbd-1.15.3-loadkeys-d.patch"
diff --git a/testing/kbd/kbd-1.15-resizecon-x86_64.patch b/testing/kbd/kbd-1.15-resizecon-x86_64.patch
new file mode 100644
index 000000000..3ce5a6868
--- /dev/null
+++ b/testing/kbd/kbd-1.15-resizecon-x86_64.patch
@@ -0,0 +1,11 @@
+diff -up kbd-1.15.3/configure.ac.orig kbd-1.15.3/configure.ac
+--- kbd-1.15.3/configure.ac.orig 2011-08-22 16:01:11.456165128 +0200
++++ kbd-1.15.3/configure.ac 2011-08-22 16:01:38.878163675 +0200
+@@ -60,6 +60,7 @@ AM_CONDITIONAL(KEYCODES_PROGS, test "$KE
+
+ case $host_cpu in
+ i?86*) RESIZECONS_PROGS=yes ;;
++ x86_64*) RESIZECONS_PROGS=yes ;;
+ *) RESIZECONS_PROGS=no ;;
+ esac
+ AM_CONDITIONAL(RESIZECONS_PROGS, test "$RESIZECONS_PROGS" = "yes")
diff --git a/testing/kbd/kbd-1.15.3-loadkeys-d.patch b/testing/kbd/kbd-1.15.3-loadkeys-d.patch
new file mode 100644
index 000000000..73bb7c47f
--- /dev/null
+++ b/testing/kbd/kbd-1.15.3-loadkeys-d.patch
@@ -0,0 +1,20 @@
+diff -up kbd-1.15.3/src/loadkeys.c.orig kbd-1.15.3/src/loadkeys.c
+--- kbd-1.15.3/src/loadkeys.c.orig 2011-10-24 13:44:52.222401546 +0200
++++ kbd-1.15.3/src/loadkeys.c 2011-10-24 13:47:52.413389029 +0200
+@@ -2958,7 +2958,7 @@ int main(int argc, char *argv[])
+ close(fd);
+ }
+
+- for (i = optind; argv[i]; i++) {
++ for (i = optind; argv[i] || optd; i++) {
+ FILE *f;
+ char *ev;
+
+@@ -2974,6 +2974,7 @@ int main(int argc, char *argv[])
+ if (optd) {
+ /* first read default map - search starts in . */
+ optd = 0;
++ i--;
+ if ((f = findfile(DEFMAP, dirpath, suffixes)) == NULL) {
+ fprintf(stderr, _("Cannot find %s\n"), DEFMAP);
+ exit(EXIT_FAILURE);
diff --git a/testing/kde4-base/APKBUILD b/testing/kde4-base/APKBUILD
new file mode 100644
index 000000000..9cf6d3bd6
--- /dev/null
+++ b/testing/kde4-base/APKBUILD
@@ -0,0 +1,20 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kde4-base
+pkgver=4.6.3
+pkgrel=3
+pkgdesc="metapackage for KDE"
+url="http://www.kde.org/"
+arch="noarch"
+license="GPL"
+depends="kdebase-runtime kdebase-workspace kdemultimedia kdenetwork kdegraphics"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=
+source=""
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
diff --git a/testing/kdeadmin/APKBUILD b/testing/kdeadmin/APKBUILD
new file mode 100644
index 000000000..7f2d4db96
--- /dev/null
+++ b/testing/kdeadmin/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdeadmin
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="kde administrative tools"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev kdepimlibs-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdeadmin-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdeadmin-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="8ac0a89337a58ddec49be0ca7a4a7534 kdeadmin-4.6.3.tar.bz2"
diff --git a/testing/kdeartwork/APKBUILD b/testing/kdeartwork/APKBUILD
new file mode 100644
index 000000000..a69fc54ae
--- /dev/null
+++ b/testing/kdeartwork/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdeartwork
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="artwork for KDE desktop"
+url="http://www.kde.org/"
+arch="all"
+license="GPL LGPL"
+depends="xscreensaver"
+depends_dev="kdebase-workspace-dev cmake automoc4"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdeartwork-$pkgver.tar.bz2"
+install_if="kdebase-workspace"
+
+_builddir="$srcdir"/kdeartwork-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="f45a8ed91c578275056c86f7022695ee kdeartwork-4.6.3.tar.bz2"
diff --git a/testing/kdebase-runtime/APKBUILD b/testing/kdebase-runtime/APKBUILD
new file mode 100644
index 000000000..da8858693
--- /dev/null
+++ b/testing/kdebase-runtime/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdebase-runtime
+pkgver=4.6.3
+pkgrel=3
+pkgdesc="KDE base runtime"
+url="http://www.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="kdebase-dev libcanberra-dev libssh-dev samba-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdebase-runtime-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdebase-runtime-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/share/icons/hicolor/index.theme
+}
+
+md5sums="a6f294900d73d92cd68ea93aea297ff0 kdebase-runtime-4.6.3.tar.bz2"
diff --git a/testing/kdebase-workspace/APKBUILD b/testing/kdebase-workspace/APKBUILD
new file mode 100644
index 000000000..df2d45b20
--- /dev/null
+++ b/testing/kdebase-workspace/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdebase-workspace
+pkgver=4.6.3
+pkgrel=2
+pkgdesc="base kde applications"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-runtime-dev qimageblitz-dev libxkbfile-dev libusb-dev
+ consolekit-dev libxcursor-dev libxrandr-dev libraw1394-dev
+ libxcomposite-dev libxtst-dev networkmanager-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdebase-workspace-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdebase-workspace-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="1e481727c3a5c2e4b751b9c56bd56583 kdebase-workspace-4.6.3.tar.bz2"
diff --git a/testing/kdebase/APKBUILD b/testing/kdebase/APKBUILD
new file mode 100644
index 000000000..11766ef98
--- /dev/null
+++ b/testing/kdebase/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdebase
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="KDE base libraries"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="qt-dev kdelibs-dev glib-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdebase-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdebase-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="4f0627e33bd857beebd92be1065ed83e kdebase-4.6.3.tar.bz2"
diff --git a/testing/kdegraphics/APKBUILD b/testing/kdegraphics/APKBUILD
new file mode 100644
index 000000000..1383c2858
--- /dev/null
+++ b/testing/kdegraphics/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdegraphics
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="graphics applications for kde"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev poppler-qt4-dev lcms-dev tiff-dev exiv2-dev libgphoto2-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/latest/src/kdegraphics-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdegraphics-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="26c2eca2d707f9fc69db87c0467e5849 kdegraphics-4.6.3.tar.bz2"
diff --git a/testing/kdelibs/APKBUILD b/testing/kdelibs/APKBUILD
new file mode 100644
index 000000000..08dd75481
--- /dev/null
+++ b/testing/kdelibs/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdelibs
+pkgver=4.6.3
+pkgrel=3
+pkgdesc="KDE base libraries"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends="shared-desktop-ontologies"
+depends_dev="qt-dev phonon-dev polkit-qt-dev pcre-dev gamin-dev enchant-dev udev-dev
+ giflib-dev docbook-xml docbook-xsl acl-dev jasper-dev strigi-dev xz-dev
+ avahi-dev attica-dev aspell-dev libdbusmenu-qt-dev soprano-dev jpeg-dev
+ qca-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdelibs-$pkgver.tar.bz2
+ kdelibs-madvise.patch
+ kdelibs-skipname.patch"
+
+_builddir="$srcdir"/kdelibs-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+dev() {
+ default_dev
+ mv "$subpkgdir"/usr/bin/kde4-config "$pkgdir"/usr/bin/kde4-config
+}
+
+md5sums="923a7e8f89aa504647e14472b24b8c0a kdelibs-4.6.3.tar.bz2
+90c533263848d54312ba37c6ac203818 kdelibs-madvise.patch
+9ff128752c657094dff94bae96d1528f kdelibs-skipname.patch"
diff --git a/testing/kdelibs/kdelibs-madvise.patch b/testing/kdelibs/kdelibs-madvise.patch
new file mode 100644
index 000000000..3f3b42569
--- /dev/null
+++ b/testing/kdelibs/kdelibs-madvise.patch
@@ -0,0 +1,22 @@
+--- kdelibs-4.6.3.orig/kdecore/sycoca/ksycoca.cpp
++++ kdelibs-4.6.3/kdecore/sycoca/ksycoca.cpp
+@@ -139,7 +139,7 @@
+ return false;
+ } else {
+ #ifdef HAVE_MADVISE
+- (void) posix_madvise((void*)sycoca_mmap, sycoca_size, POSIX_MADV_WILLNEED);
++ (void) madvise((void*)sycoca_mmap, sycoca_size, MADV_WILLNEED);
+ #endif // HAVE_MADVISE
+ return true;
+ }
+--- kdelibs-4.6.3.orig/kdeui/util/kpixmapcache.cpp
++++ kdelibs-4.6.3/kdeui/util/kpixmapcache.cpp
+@@ -443,7 +443,7 @@
+ }
+ info->indexHeader = reinterpret_cast<KPixmapCacheIndexHeader *>(indexMem);
+ #ifdef HAVE_MADVISE
+- posix_madvise(indexMem, info->size, POSIX_MADV_WILLNEED);
++ madvise(indexMem, info->size, MADV_WILLNEED);
+ #endif
+
+ info->file->close();
diff --git a/testing/kdelibs/kdelibs-skipname.patch b/testing/kdelibs/kdelibs-skipname.patch
new file mode 100644
index 000000000..7bcb5895e
--- /dev/null
+++ b/testing/kdelibs/kdelibs-skipname.patch
@@ -0,0 +1,60 @@
+--- kdelibs-4.6.3.orig/kio/misc/kpac/discovery.cpp
++++ kdelibs-4.6.3/kio/misc/kpac/discovery.cpp
+@@ -90,6 +90,34 @@
+ return !m_hostname.isEmpty();
+ }
+
++ int
++ Discovery::skipName(const unsigned char *comp_dn, const unsigned char *eom) const
++ {
++ const u_char *cp;
++ int n;
++
++ cp = comp_dn;
++ while (cp < eom && (n = *cp++)) {
++ /*
++ * check for indirection
++ */
++ switch (n & INDIR_MASK) {
++ case 0: /* normal case, n == len */
++ cp += n;
++ continue;
++ case INDIR_MASK: /* indirection */
++ cp++;
++ break;
++ default: /* illegal type */
++ return (-1);
++ }
++ break;
++ }
++ if (cp > eom)
++ return (-1);
++ return (cp - comp_dn);
++ }
++
+ bool Discovery::checkDomain() const
+ {
+ // If a domain has a SOA record, don't traverse any higher.
+@@ -107,10 +135,10 @@
+ unsigned char* pos = response.buf + sizeof( response.header );
+ unsigned char* end = response.buf + len;
+ // skip query section
+- pos += dn_skipname( pos, end ) + QFIXEDSZ;
++ pos += this->skipName( pos, end ) + QFIXEDSZ;
+ if ( pos >= end ) return true;
+ // skip answer domain
+- pos += dn_skipname( pos, end );
++ pos += this->skipName( pos, end );
+ short type;
+ GETSHORT( type, pos );
+ return type != T_SOA;
+--- kdelibs-4.6.3.orig/kio/misc/kpac/discovery.h
++++ kdelibs-4.6.3/kio/misc/kpac/discovery.h
+@@ -43,6 +43,7 @@
+ private:
+ bool initHostName();
+ bool checkDomain() const;
++ int skipName(const unsigned char*, const unsigned char*) const;
+
+ KProcess* m_helper;
+ QString m_hostname;
diff --git a/testing/kdemultimedia/APKBUILD b/testing/kdemultimedia/APKBUILD
new file mode 100644
index 000000000..19de64559
--- /dev/null
+++ b/testing/kdemultimedia/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdemultimedia
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="multimedia applications for kde"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev taglib-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdemultimedia-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdemultimedia-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="fcfef0fe2ee4f216831f74efa78b554b kdemultimedia-4.6.3.tar.bz2"
diff --git a/testing/kdenetwork/APKBUILD b/testing/kdenetwork/APKBUILD
new file mode 100644
index 000000000..8bdaf79b0
--- /dev/null
+++ b/testing/kdenetwork/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdenetwork
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="network tools for kde"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev kdepimlibs-dev libotr-dev v4l-utils-dev libidn-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdenetwork-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdenetwork-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="0fd1a35dd3c820d840ca2e11c51b1215 kdenetwork-4.6.3.tar.bz2"
diff --git a/testing/kdepimlibs/APKBUILD b/testing/kdepimlibs/APKBUILD
new file mode 100644
index 000000000..2b8cad08b
--- /dev/null
+++ b/testing/kdepimlibs/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdepimlibs
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="kde personal information management libraries"
+url="http://www.kde.org/"
+arch="all"
+license="LGPL"
+depends="shared-desktop-ontologies"
+depends_dev="kdelibs-dev boost-dev libical-dev cyrus-sasl-dev openldap-dev gpgme-dev
+ akonadi-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdepimlibs-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/kdepimlibs-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="0b0fc8d9fea0a6f26e705460a2865e18 kdepimlibs-4.6.3.tar.bz2"
diff --git a/testing/kdesdk/APKBUILD b/testing/kdesdk/APKBUILD
new file mode 100644
index 000000000..f259f6be6
--- /dev/null
+++ b/testing/kdesdk/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=kdesdk
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="software development tools for kde"
+url="http://www.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="kdebase-workspace-dev hunspell-dev boost-dev perl-dev subversion-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/kdesdk-$pkgver.tar.bz2
+ not-glibc.patch"
+
+_builddir="$srcdir"/kdesdk-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PATH=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="c4a223067a228688c6b62a6bdd67a022 kdesdk-4.6.3.tar.bz2
+00e1451447f9097a677c4606484077ca not-glibc.patch"
diff --git a/testing/kdesdk/not-glibc.patch b/testing/kdesdk/not-glibc.patch
new file mode 100644
index 000000000..646efb4f9
--- /dev/null
+++ b/testing/kdesdk/not-glibc.patch
@@ -0,0 +1,12 @@
+--- kdesdk-4.6.3.orig/CMakeLists.txt
++++ kdesdk-4.6.3/CMakeLists.txt
+@@ -71,9 +71,7 @@
+ #include <stdlib.h>
+
+ int main() {
+-#ifndef __GLIBC__
+ choke me
+-#endif
+ return 0;
+ }" LIBC_IS_GLIBC)
+ if (LIBC_IS_GLIBC)
diff --git a/testing/keepalived/APKBUILD b/testing/keepalived/APKBUILD
new file mode 100644
index 000000000..fb85a5f5a
--- /dev/null
+++ b/testing/keepalived/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
+# Maintainer: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
+pkgname=keepalived
+pkgver=1.1.20
+pkgrel=0
+pkgdesc="Health Checking for Linux Virtual Server & High-Availability"
+url="http://www.keepalived.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="openssl-dev popt-dev linux-headers"
+install=
+subpackages="$pkgname-doc $pkgname-sample-config:samples"
+source="http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz
+ keepalived-1.1.20-ipvs_haeader_check.patch
+ $pkgname.initd
+ $pkgname.confd
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-kernel-dir=/usr/include/linux \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+samples() {
+ pkgdesc="Sample configuration for keepalived"
+ mkdir -p "$subpkgdir"/etc/keepalived/
+ mv "$pkgdir"/etc/keepalived/samples "$subpkgdir"/etc/keepalived/
+}
+
+md5sums="6c3065c94bb9e2187c4b5a80f6d8be31 keepalived-1.1.20.tar.gz
+78c19e15f649e353c2fba44e1f70b1e1 keepalived-1.1.20-ipvs_haeader_check.patch
+d20faa8d55b8a41b8ddb71bb00a6bead keepalived.initd
+56ff68ad19e973826c2dbc42c892939f keepalived.confd"
diff --git a/testing/keepalived/keepalived-1.1.20-ipvs_haeader_check.patch b/testing/keepalived/keepalived-1.1.20-ipvs_haeader_check.patch
new file mode 100644
index 000000000..d5220fe4c
--- /dev/null
+++ b/testing/keepalived/keepalived-1.1.20-ipvs_haeader_check.patch
@@ -0,0 +1,68 @@
+--- old/configure
++++ new/configure
+@@ -3849,8 +3889,8 @@
+
+ IPVS_SUPPORT="_WITHOUT_LVS_"
+ if test "$enable_lvs" != "no"; then
+- ac_fn_c_check_header_mongrel "$LINENO" "net/ip_vs.h" "ac_cv_header_net_ip_vs_h" "$ac_includes_default"
+-if test "x$ac_cv_header_net_ip_vs_h" = x""yes; then :
++ ac_fn_c_check_header_mongrel "$LINENO" "linux/ip_vs.h" "ac_cv_header_linux_ip_vs_h" "$ac_includes_default"
++if test "x$ac_cv_header_linux_ip_vs_h" = xyes; then :
+ IPVS_SUPPORT="_WITH_LVS_"
+ else
+
+--- old/configure.in
++++ new/configure.in
+@@ -113,7 +113,7 @@
+ dnl ----[ Checks for LVS and VRRP support ]----
+ IPVS_SUPPORT="_WITHOUT_LVS_"
+ if test "$enable_lvs" != "no"; then
+- AC_CHECK_HEADER([net/ip_vs.h],
++ AC_CHECK_HEADER([linux/ip_vs.h],
+ [IPVS_SUPPORT="_WITH_LVS_"],
+ [
+ IPVS_SUPPORT="_WITHOUT_LVS_"
+--- keepalived-1.1.20-orig/keepalived/include/check_data.h
++++ keepalived-1.1.20/keepalived/include/check_data.h
+@@ -33,7 +33,7 @@
+
+ #ifdef _WITH_LVS_
+ #define SCHED_MAX_LENGTH IP_VS_SCHEDNAME_MAXLEN
+- #include <net/ip_vs.h>
++ #include <linux/ip_vs.h>
+ #else
+ #define SCHED_MAX_LENGTH 1
+ #endif
+--- keepalived-1.1.20-orig/keepalived/include/ipvswrapper.h
++++ keepalived-1.1.20/keepalived/include/ipvswrapper.h
+@@ -43,7 +43,7 @@
+ #elif _KRNL_2_6_
+ #include "../libipvs-2.6/libipvs.h"
+ #endif
+- #include <net/ip_vs.h>
++ #include <linux/ip_vs.h>
+ #endif
+
+ #ifndef IP_VS_TEMPLATE_TIMEOUT
+--- keepalived-1.1.20-orig/keepalived/libipvs-2.4/libipvs.h
++++ keepalived-1.1.20/keepalived/libipvs-2.4/libipvs.h
+@@ -10,7 +10,7 @@
+ #ifndef _LIBIPVS_H
+ #define _LIBIPVS_H
+
+-#include <net/ip_vs.h>
++#include <linux/ip_vs.h>
+
+ /*
+ * The default IPVS_SVC_PERSISTENT_TIMEOUT is a little larger than average
+--- keepalived-1.1.20-orig/keepalived/libipvs-2.6/libipvs.h
++++ keepalived-1.1.20/keepalived/libipvs-2.6/libipvs.h
+@@ -10,7 +10,7 @@
+ #ifndef _LIBIPVS_H
+ #define _LIBIPVS_H
+
+-#include <net/ip_vs.h>
++#include <linux/ip_vs.h>
+
+ #define MINIMUM_IPVS_VERSION_MAJOR 1
+ #define MINIMUM_IPVS_VERSION_MINOR 1
diff --git a/testing/keepalived/keepalived.confd b/testing/keepalived/keepalived.confd
new file mode 100644
index 000000000..87094b355
--- /dev/null
+++ b/testing/keepalived/keepalived.confd
@@ -0,0 +1,7 @@
+# keepalived config file
+# default: /etc/keepalived/keepalived.conf
+#KEEPALIVED_CFG=/etc/keepalived
+
+# extra options for keepalived
+#KEEPALIVED_OPTS="" # you must NOT use -f here!
+
diff --git a/testing/keepalived/keepalived.initd b/testing/keepalived/keepalived.initd
new file mode 100755
index 000000000..a5b2bb9f9
--- /dev/null
+++ b/testing/keepalived/keepalived.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+KEEPALIVED_BIN="/usr/sbin/keepalived"
+KEEPALIVED_CFG=${KEEPALIVED_CFG:-/etc/keepalived/keepalived.conf}
+
+depend() {
+ use logger
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting keepalived"
+ start-stop-daemon --start --exec "${KEEPALIVED_BIN}" \
+ -- -f "${KEEPALIVED_CFG}" ${KEEPALIVED_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping keepalived"
+ start-stop-daemon --stop --exec "${KEEPALIVED_BIN}"
+ eend $?
+}
diff --git a/testing/kismet/APKBUILD b/testing/kismet/APKBUILD
new file mode 100644
index 000000000..cb04b7f8a
--- /dev/null
+++ b/testing/kismet/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=kismet
+pkgver=2011.03_p2
+_ver=${pkgver/_p/-R};
+_ver=${_ver/./-}
+pkgrel=0
+pkgdesc="802.11 layer2 wireless network detector, sniffer, and intrusion detection system"
+url="http://www.kismetwireless.net"
+arch="all"
+license="GPL"
+depends_dev="libpcap-dev libnl-dev pcre-dev ncurses-dev openssl-dev bluez-dev"
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://www.kismetwireless.net/code/kismet-$_ver.tar.gz"
+_builddir="${srcdir}"/$pkgname-$_ver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/kismet \
+ --localstatedir=/var
+ make dep || return 1
+ make || return 1
+ make plugins || return 1
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ make plugins-install DESTDIR="$pkgdir" || return 1
+ install -o "root" -g "root" -m 4550 kismet_capture "${pkgdir}/usr/bin/"
+ mkdir -p "$pkgdir"/etc/kismet
+ install -m644 -D "$_builddir"/conf/kismet.conf "$pkgdir"/etc/kismet/kismet.conf
+}
+md5sums="8bf077e8111e6dc8c12cadefdf40aadd kismet-2011-03-R2.tar.gz"
diff --git a/testing/kismet/kismet.post-install b/testing/kismet/kismet.post-install
new file mode 100644
index 000000000..a60b29ea5
--- /dev/null
+++ b/testing/kismet/kismet.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+chown root:kismet "/usr/bin/kismet_capture"
+chmod 4550 "/usr/bin/kismet_capture"
diff --git a/testing/kismet/kismet.pre-install b/testing/kismet/kismet.pre-install
new file mode 100644
index 000000000..27e39754d
--- /dev/null
+++ b/testing/kismet/kismet.pre-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+addgroup -g 315 kismet &>/dev/null
diff --git a/testing/libamz/APKBUILD b/testing/libamz/APKBUILD
new file mode 100644
index 000000000..67a0343cd
--- /dev/null
+++ b/testing/libamz/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=libamz
+pkgver=0.0.2
+pkgrel=0
+pkgdesc="library and tools for accessing amazon mp3 download queues"
+url="http://nenolod.net/projects/libamz"
+arch="all"
+license="ISC"
+depends=
+makedepends="libgcrypt-dev libsoup-dev libxml2-dev gtk+-dev"
+install=
+subpackages="$pkgname-dev"
+source="http://nenolod.net/~nenolod/distfiles/$pkgname-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # workaround bug in busybox
+ sed -e "/touch/s/0001010000/200001010000/g" \
+ -i configure
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="fcecea69be7b62aa6d31b80b23e8f0db libamz-0.0.2.tar.bz2"
diff --git a/testing/libburn/APKBUILD b/testing/libburn/APKBUILD
new file mode 100644
index 000000000..a0c8e6d02
--- /dev/null
+++ b/testing/libburn/APKBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libburn
+pkgver=1.1.6
+_ver=${pkgver%_p*}
+_pver=
+if [ "$_ver" != "$pkgver" ]; then
+ _pver=".pl${pkgver##*_p}"
+fi
+pkgrel=0
+pkgdesc="Library for reading, mastering and writing optical discs"
+url="http://libburnia.pykix.org/"
+arch="all"
+license="GPL"
+depends=""
+makedepends=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://files.libburnia-project.org/releases/libburn-${_ver}${_pver}.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$_ver
+build ()
+{
+ cd "$_builddir"
+ ./configure --prefix=/usr --disable-static
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="741604c3d4064502f06bae20293c508c libburn-1.1.6.tar.gz"
diff --git a/testing/libc6/APKBUILD b/testing/libc6/APKBUILD
new file mode 100644
index 000000000..2eb91a219
--- /dev/null
+++ b/testing/libc6/APKBUILD
@@ -0,0 +1,117 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=libc6
+pkgver=2.14
+pkgrel=0
+svnrev=14663
+pkgdesc="Embedded GNU C Library"
+url="http://eglibc.org/"
+arch=""
+license="LGPL"
+depends=
+depends_dev="linux-headers>=2.6.18"
+provides="libiconv"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev
+ $pkgname-doc
+
+ gconv-modules:gconv
+ locales
+ nscd"
+options="!strip"
+source="http://dev.alpinelinux.org/~nenolod/eglibc-${pkgver}.r${svnrev}.tar.gz
+
+ glibc-2.12-hardened-pie.patch
+ glibc-2.10-hardened-configure-picdefault.patch
+ glibc-2.10-hardened-inittls-nosysenter.patch
+
+ chk_fail.c
+ stack_chk_fail.c
+
+ nscd.initd"
+
+_srcdir="$srcdir"/eglibc-$pkgver
+_builddir="$srcdir"/eglibc-build
+prepare() {
+ local i
+ cd "$_srcdir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ echo "slibdir=/lib" >> configparms
+
+ cp "$srcdir"/chk_fail.c "$_srcdir"/debug/chk_fail.c
+ cp "$srcdir"/stack_chk_fail.c "$_srcdir"/debug/stack_chk_fail.c
+
+ mkdir "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+
+ export CFLAGS="$CFLAGS -fno-stack-protector"
+
+ "$_srcdir"/configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --with-headers=/usr/include \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-kernel=2.6.18 \
+ --enable-add-ons=nptl,libidn \
+ --disable-profile \
+ --enable-bind-now \
+ --with-tls \
+ --with-__thread \
+ --without-zoneinfo \
+ --without-cvs \
+ --without-gd \
+ --with-pkgversion="Alpine EGLIBC ${pkgver}-r${pkgrel} [svn r${svnrev}]" \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make install_root="$pkgdir" install || return 1
+}
+
+gconv() {
+ pkgdesc="GNU iconv character modules"
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/iconv "$subpkgdir"/usr/lib
+}
+
+locales() {
+ pkgdesc="Common files for locale support"
+
+ mkdir -p "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/* "$subpkgdir"/usr/share
+}
+
+nscd() {
+ pkgdesc="Cache daemon for NIS/DNS"
+
+ mkdir -p "$subpkgdir"/var/db/nscd
+ mkdir -p "$subpkgdir"/var/run/nscd
+
+ install -Dm 755 "$srcdir"/nscd.initd "$subpkgdir"/etc/init.d/nscd
+ install -Dm 644 "$srcdir"/libc/nscd/nscd.conf "$subpkgdir"/etc/nscd.conf
+
+ mkdir -p "$subpkgdir"/usr/sbin
+ mv "$pkgdir"/usr/sbin/nscd "$subpkgdir"/usr/sbin
+}
+
+md5sums="c6de1455fcef3487ee42c14349a72cf4 eglibc-2.14.r14663.tar.gz
+03ffc414f8eb9f1fcb93325008f5ecd7 glibc-2.12-hardened-pie.patch
+8bca42eb8f6d117107ab8e356566b805 glibc-2.10-hardened-configure-picdefault.patch
+d3b50eec50099791bf2f0c10b605ff7c glibc-2.10-hardened-inittls-nosysenter.patch
+1b31d2c7a39298da10e3840076514823 chk_fail.c
+6a6b9992c76a9bece219eb00a16d7549 stack_chk_fail.c
+ff0b0069eeb662145d287d7f98c79447 nscd.initd"
diff --git a/testing/libc6/nscd.initd b/testing/libc6/nscd.initd
new file mode 100644
index 000000000..949c49e82
--- /dev/null
+++ b/testing/libc6/nscd.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+DAEMON=/usr/sbin/nscd
+
+start() {
+ ebegin "Starting nscd"
+ # remove stale files
+ rm -f /var/db/nscd/* /var/run/nscd/* 2>/dev/null
+ start-stop-daemon --start --exec $DAEMON
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping nscd"
+ start-stop-daemon --stop --quiet \
+ --pidfile=/var/run/nscd/nscd.pid
+ eend $?
+}
diff --git a/testing/libdbusmenu-qt/APKBUILD b/testing/libdbusmenu-qt/APKBUILD
new file mode 100644
index 000000000..4148d9670
--- /dev/null
+++ b/testing/libdbusmenu-qt/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=libdbusmenu-qt
+pkgver=0.8.2
+pkgrel=0
+pkgdesc="library to export QMenu over DBusMenu protocol"
+url="http://people.canonical.com/~agateau/dbusmenu/index.html"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev"
+makedepends="$depends_dev cmake automoc4 doxygen"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://launchpad.net/libdbusmenu-qt/trunk/$pkgver/+download/libdbusmenu-qt-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/libdbusmenu-qt-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="88be2548e00acf988c66ed3a35844f64 libdbusmenu-qt-0.8.2.tar.bz2"
diff --git a/testing/libdlna/APKBUILD b/testing/libdlna/APKBUILD
new file mode 100644
index 000000000..1f6fa2bb0
--- /dev/null
+++ b/testing/libdlna/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=libdlna
+pkgver=0.2.3
+pkgrel=0
+pkgdesc="An open-source implementation of DLNA (Digital Living Network Alliance) standards"
+url="http://libdlna.geexbox.org"
+arch="all"
+license="LGPL"
+depends="ctags"
+depends_dev="ffmpeg-dev"
+makedepends="$depends_dev"
+subpackages="$pkgname-dev"
+source="http://libdlna.geexbox.org/releases/$pkgname-$pkgver.tar.bz2
+ Makefile.patched"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ sed -i -e 's/cat -n/cat/' configure
+ sed -i 's|ffmpeg/avformat.h|libavformat/avformat.h|' ./configure src/profiles.h src/*.c || return 1
+ sed -i 's|ffmpeg/avcodec.h|libavcodec/avcodec.h|' ./configure src/profiles.h src/*.c || return 1
+ ./configure --prefix=/usr \
+ --includedir=/usr/include/libavformat \
+ --with-ffmpeg-dir=/usr/lib \
+ --disable-static
+ cp "$srcdir"/Makefile.patched Makefile
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="2c974f95b711e5fd07f78fc4ebfcca66 libdlna-0.2.3.tar.bz2
+5ba58c2f91079f73d80837974259d2ad Makefile.patched"
diff --git a/testing/libdlna/Makefile.patched b/testing/libdlna/Makefile.patched
new file mode 100644
index 000000000..7c4a028aa
--- /dev/null
+++ b/testing/libdlna/Makefile.patched
@@ -0,0 +1,64 @@
+ifeq (,$(wildcard config.mak))
+$(error "config.mak is not present, run configure !")
+endif
+include config.mak
+
+DISTFILE = libdlna-$(VERSION).tar.bz2
+PKGCONFIG_DIR = $(libdir)/pkgconfig
+PKGCONFIG_FILE = libdlna.pc
+
+SRCS = test-libdlna.c
+
+EXTRADIST = AUTHORS \
+ ChangeLog \
+ configure \
+ COPYING \
+ README \
+
+SUBDIRS = src \
+
+CFLAGS += -Isrc
+LDFLAGS += -Lsrc -ldlna
+
+ifeq ($(BUILD_STATIC),yes)
+ LDFLAGS += $(EXTRALIBS)
+endif
+
+all: lib
+
+lib:
+ $(MAKE) -C src
+
+clean:
+ $(MAKE) -C src clean
+ -$(RM) -f $(LIBTEST)
+
+distclean: clean
+ -$(RM) -f config.log
+ -$(RM) -f config.mak
+ -$(RM) -f $(PKGCONFIG_FILE)
+
+install: install-pkgconfig
+ $(MAKE) -C src install
+
+install-pkgconfig: $(PKGCONFIG_FILE)
+ $(INSTALL) -d "$(PKGCONFIG_DIR)"
+ $(INSTALL) -m 644 $< "$(PKGCONFIG_DIR)"
+
+.PHONY: clean distclean
+.PHONY: install install-pkgconfig
+
+dist:
+ -$(RM) $(DISTFILE)
+ dist=$(shell pwd)/libdlna-$(VERSION) && \
+ for subdir in . $(SUBDIRS); do \
+ mkdir -p "$$dist/$$subdir"; \
+ $(MAKE) -C $$subdir dist-all DIST="$$dist/$$subdir"; \
+ done && \
+ tar cjf $(DISTFILE) libdlna-$(VERSION)
+ -$(RM) -rf libdlna-$(VERSION)
+
+dist-all:
+ cp $(EXTRADIST) $(SRCS) Makefile $(DIST)
+
+.PHONY: dist dist-all
diff --git a/testing/libewf/APKBUILD b/testing/libewf/APKBUILD
new file mode 100644
index 000000000..642dbac82
--- /dev/null
+++ b/testing/libewf/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=libewf
+pkgver=20100226
+pkgrel=0
+pkgdesc="Library to support the Expert Witness Compression Format"
+url="http://libewf.sourceforge.net"
+arch="all"
+license="LGPL2+"
+depends=""
+depends_dev="zlib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/libewf/libewf-$pkgver.tar.gz"
+_builddir="$srcdir"/libewf-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="a697d629bb74df1fa68f22658634fdb9 libewf-20100226.tar.gz"
diff --git a/testing/libfetch/APKBUILD b/testing/libfetch/APKBUILD
new file mode 100644
index 000000000..fcd925cb1
--- /dev/null
+++ b/testing/libfetch/APKBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libfetch
+pkgver=2.33
+pkgrel=0
+pkgdesc="URL based download library"
+url="http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/"
+arch="all"
+license="BSD"
+depends=
+makedepends="openssl-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="Makefile
+ ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cp "$srcdir"/Makefile "$_builddir"
+}
+
+build () {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR=$pkgdir install
+}
+md5sums="cf18907a75c67f543b1173d7f87830af Makefile
+a176b94f7f30344ef8a71c047ca2136b libfetch-2.33.tar.gz"
diff --git a/testing/libfetch/Makefile b/testing/libfetch/Makefile
new file mode 100644
index 000000000..9bc8c116d
--- /dev/null
+++ b/testing/libfetch/Makefile
@@ -0,0 +1,93 @@
+prefix = /usr
+DESTDIR =
+DEBUG = false
+FETCH_WITH_INET6 = true
+FETCH_WITH_OPENSSL = true
+FETCH_WITH_LFS = true
+
+WARNINGS = -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts \
+ -Wpointer-arith -Wcast-align -Wsign-compare
+CFLAGS += -O2 -pipe -I. -fPIC $(WARNINGS)
+
+
+CFLAGS += -DFTP_COMBINE_CWDS -DNETBSD
+
+ifeq ($(strip $(FETCH_WITH_LFS)), true)
+CFLAGS+= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
+endif
+
+ifeq ($(strip $(FETCH_WITH_INET6)), true)
+CFLAGS+= -DINET6
+endif
+
+ifeq ($(strip $(FETCH_WITH_OPENSSL)), true)
+CFLAGS+= -DWITH_SSL
+LDFLAGS= -lssl -lcrypto
+endif
+
+ifeq ($(strip $(DEBUG)), true)
+CFLAGS += -g -DDEBUG
+else
+CFLAGS += -UDEBUG
+endif
+
+CC = gcc
+LD = gcc
+AR = ar
+RANLIB = ranlib
+INSTALL = install -c -D
+
+OBJS= fetch.o common.o ftp.o http.o file.o
+INCS= fetch.h common.h
+GEN = ftperr.h httperr.h
+MAN = libdownload.3
+
+#pretty print!
+E = @echo
+Q = @
+
+all: libfetch.so libfetch.a
+ $(E) " built with: " $(CFLAGS)
+.PHONY: all
+
+%.o: %.c $(INCS) $(GEN)
+ $(E) " compile " $@
+ $(Q) $(CC) $(CFLAGS) -c $<
+
+ftperr.h: ftp.errors
+ $(E) " generate " $@
+ $(Q) ./errlist.sh ftp_errlist FTP ftp.errors > $@
+
+httperr.h: http.errors
+ $(E) " generate " $@
+ $(Q) ./errlist.sh http_errlist HTTP http.errors > $@
+
+libfetch.so: $(GEN) $(INCS) $(OBJS)
+ $(E) " build " $@
+ $(Q) rm -f $@
+ $(Q) $(LD) $(LDFLAGS) *.o -shared -o $@
+
+libfetch.a: $(GEN) $(INCS) $(OBJS)
+ $(E) " build " $@
+ $(Q) rm -f $@
+ $(Q) $(AR) rcs $@ *.o
+ $(Q) $(RANLIB) $@
+
+clean:
+ $(E) " clean "
+ $(Q) rm -f libfetch.so libfetch.a *.o $(GEN)
+.PHONY: clean
+
+install: all
+ $(Q) $(INSTALL) -m 755 libfetch.so $(DESTDIR)$(prefix)/lib/libfetch.so
+ $(Q) $(INSTALL) -m 644 libfetch.a $(DESTDIR)$(prefix)/lib/libfetch.a
+ $(Q) $(INSTALL) -m 644 fetch.h $(DESTDIR)$(prefix)/include/fetch.h
+ $(Q) $(INSTALL) -m 644 fetch.3 $(DESTDIR)$(prefix)/share/man/man3/fetch.3
+.PHONY: install
+
+uninstall:
+ $(Q) rm -f $(DESTDIR)$(prefix)/lib/libfetch.so
+ $(Q) rm -f $(DESTDIR)$(prefix)/lib/libfetch.a
+ $(Q) rm -f $(DESTDIR)$(prefix)/include/fetch.h
+ $(Q) rm -f $(DESTDIR)$(prefix)/share/man/man3/fetch.3
+.PHONY: uninstall
diff --git a/testing/libgdata/APKBUILD b/testing/libgdata/APKBUILD
new file mode 100644
index 000000000..7a63c90f2
--- /dev/null
+++ b/testing/libgdata/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=libgdata
+pkgver=0.6.6
+pkgrel=1
+pkgdesc="access library for gdata"
+url="http://live.gnome.org/libgdata"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="glib-dev libsoup-dev"
+makedepends="$depends_dev intltool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-gnome \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="17e736759dea67d5e9d919fab57fe703 libgdata-0.6.6.tar.bz2"
diff --git a/testing/libiodbc/APKBUILD b/testing/libiodbc/APKBUILD
new file mode 100644
index 000000000..07a79ee37
--- /dev/null
+++ b/testing/libiodbc/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=libiodbc
+pkgver=3.52.7
+pkgrel=0
+pkgdesc="iODBC ODBC implementation"
+url="http://www.iodbc.org/"
+arch="all"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.iodbc.org/downloads/iODBC/libiodbc-$pkgver.tar.gz"
+
+_builddir="$srcdir"/libiodbc-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-gui \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ddbd274cb31d65be6a78da58fc09079a libiodbc-3.52.7.tar.gz"
diff --git a/testing/libisofs/APKBUILD b/testing/libisofs/APKBUILD
new file mode 100644
index 000000000..eb8b0f1de
--- /dev/null
+++ b/testing/libisofs/APKBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libisofs
+pkgver=1.1.6
+pkgrel=0
+pkgdesc="Library to pack up hard disk files and directories into a ISO 9660 disk image"
+url="http://libburnia.pykix.org/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="acl-dev zlib-dev libiconv-dev"
+subpackages="$pkgname-dev"
+source="http://files.libburnia-project.org/releases/libisofs-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-libacl \
+ --enable-xattr \
+ --disable-static
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="2f6088ba9ae7ed6cc91a51d2b6f2dfa0 libisofs-1.1.6.tar.gz"
diff --git a/testing/libmnl/APKBUILD b/testing/libmnl/APKBUILD
new file mode 100644
index 000000000..c3f604ab5
--- /dev/null
+++ b/testing/libmnl/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=libmnl
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="Library for minimalistic netlink"
+url="http://www.netfilter.org/projects/libmnl/"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="e936236bb57a2375afa4e70e75dc3ba9 libmnl-1.0.1.tar.bz2"
diff --git a/testing/libmp3splt/APKBUILD b/testing/libmp3splt/APKBUILD
new file mode 100644
index 000000000..997af8590
--- /dev/null
+++ b/testing/libmp3splt/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libmp3splt
+pkgver=0.7
+pkgrel=1
+pkgdesc="Library to split mp3 and ogg files without decoding"
+url="http://mp3splt.sourceforge.net/"
+arch="all"
+license="GPLv2"
+depends=""
+depends_dev="pcre-dev libogg-dev libmad-dev libvorbis-dev libid3tag-dev libtool"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://prdownloads.sourceforge.net/mp3splt/libmp3splt-$pkgver.tar.gz"
+
+_builddir="$srcdir"/libmp3splt-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-ogg \
+ --enable-mp3 \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/libmp3splt/*.la
+}
+
+md5sums="dadb166361e2a28955032a1b9f10ed38 libmp3splt-0.7.tar.gz"
diff --git a/testing/libnetfilter_log/APKBUILD b/testing/libnetfilter_log/APKBUILD
new file mode 100644
index 000000000..fed9886f4
--- /dev/null
+++ b/testing/libnetfilter_log/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+pkgname=libnetfilter_log
+pkgver=0.0.16
+pkgrel=1
+pkgdesc="interface to packets that have been logged by the kernel packet filter"
+url="http://www.netfilter.org/projects/libnetfilter_log/"
+arch="all"
+license="GPL-2"
+depends="libnfnetlink"
+makedepends="libnfnetlink-dev pkgconfig"
+subpackages="$pkgname-dev"
+source="http://www.netfilter.org/projects/libnetfilter_log/files/libnetfilter_log-0.0.16.tar.bz2"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="4ffcf46dad9d0c81f6611dd185639694 libnetfilter_log-0.0.16.tar.bz2"
diff --git a/testing/liboping/APKBUILD b/testing/liboping/APKBUILD
new file mode 100644
index 000000000..438b967e7
--- /dev/null
+++ b/testing/liboping/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Harry
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=liboping
+pkgver=1.6.1
+pkgrel=0
+pkgdesc="A Ping Lib"
+url="http://verplant.org/liboping/"
+arch="all"
+license=GPL
+depends=
+# make install needs setcap provided by libcap
+makedepends="ncurses-dev libcap"
+source="http://verplant.org/liboping/files/$pkgname-$pkgver.tar.bz2"
+subpackages="$pkgname-dev $pkgname-doc"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --libdir=/usr/lib \
+ --without-perl-bindings \
+ --disable-static \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir" || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="748554a18e1771913f4f402ee9f957c9 liboping-1.6.1.tar.bz2"
diff --git a/testing/libplist/APKBUILD b/testing/libplist/APKBUILD
new file mode 100644
index 000000000..c4e2ff487
--- /dev/null
+++ b/testing/libplist/APKBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libplist
+pkgver=1.4
+pkgrel=1
+pkgdesc="A library to handle Apple Property List format whereas it's binary or XML"
+url="http://libimobiledevice.org/"
+arch="all"
+license="GPL2 LGPL2.1"
+depends=""
+depends_dev="libxml2-dev glib-dev"
+makedepends="cmake swig python-dev $depends_dev"
+subpackages="$pkgname-dev py-$pkgname:py $pkgname-util $pkgname++:cxx"
+source="http://www.libimobiledevice.org/downloads/libplist-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/build
+_src="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$srcdir"
+ mkdir -p "$_builddir"
+ cd "$_builddir"
+ cmake "$_src" -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+util() {
+ pkgdesc="Util for libplist"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+}
+
+py() {
+ pkgdesc="Python bindings for libplist"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+cxx() {
+ pkgdesc="C++ bindings to libplist"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*++.so.* "$subpkgdir"/usr/lib/
+}
+
+md5sums="2ef8bf33d9aeb078c6d8b6ecafbc6396 libplist-1.4.tar.bz2"
diff --git a/testing/libprojectm/APKBUILD b/testing/libprojectm/APKBUILD
new file mode 100644
index 000000000..bbd10f1c2
--- /dev/null
+++ b/testing/libprojectm/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=libprojectm
+pkgver=2.0.1
+pkgrel=0
+pkgdesc="milkdrop-like music visualizer using opengl"
+url="http://projectm.sourceforge.net/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="mesa-dev ftgl-dev glew-dev"
+makedepends="cmake $depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/projectm/projectM-${pkgver}-Source.tar.gz
+ projectm-isnan.patch"
+
+_srcdir="$srcdir/projectM-${pkgver}-Source"
+_builddir="$srcdir/build"
+prepare() {
+ local i
+ mkdir -p "$_builddir"
+ cd "$_srcdir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_srcdir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="f8bf795878cdbbef54784cf2390b4c89 projectM-2.0.1-Source.tar.gz
+0090aaeb6f4df4600ffadfc7b7c0e732 projectm-isnan.patch"
diff --git a/testing/libprojectm/projectm-isnan.patch b/testing/libprojectm/projectm-isnan.patch
new file mode 100644
index 000000000..d8738e709
--- /dev/null
+++ b/testing/libprojectm/projectm-isnan.patch
@@ -0,0 +1,20 @@
+--- projectM-2.0.1-Source/Common.hpp
++++ projectM-2.0.1-Source.mod/Common.hpp
+@@ -30,6 +30,7 @@
+ #include <typeinfo>
+ #include <cstdarg>
+ #include <cassert>
++#include <math.h>
+ #ifdef _MSC_sVER
+ #define strcasecmp(s, t) _strcmpi(s, t)
+ #endif
+@@ -55,7 +56,7 @@
+
+ #ifdef LINUX
+ #include <cstdlib>
+-#define projectM_isnan isnan
++#define projectM_isnan __isnan
+
+ #endif
+
+
diff --git a/testing/libquvi-scripts/APKBUILD b/testing/libquvi-scripts/APKBUILD
new file mode 100644
index 000000000..f1f1b1eea
--- /dev/null
+++ b/testing/libquvi-scripts/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libquvi-scripts
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="scripts for libquvi - the library for parsing video download links"
+url="http://quvi.sourceforge.net/"
+arch="noarch"
+license="LGPLv2+"
+depends=
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/project/quvi/${pkgver%.*}/$pkgname/libquvi-scripts-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/libquvi-scripts-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="8ac2692e63c00a828e14076434c3cd48 libquvi-scripts-0.4.0.tar.bz2"
diff --git a/testing/libquvi/APKBUILD b/testing/libquvi/APKBUILD
new file mode 100644
index 000000000..5fa4de8ab
--- /dev/null
+++ b/testing/libquvi/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libquvi
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="library for parsing video download links"
+url="http://quvi.sourceforge.net/"
+arch="all"
+license="LGPLv2+"
+depends="libquvi-scripts"
+depends_dev="libquvi-scripts-dev curl-dev lua-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/project/quvi/0.4/libquvi/libquvi-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/libquvi-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="a9710096abcbcb1ffa8a947a4a5a00d9 libquvi-0.4.0.tar.bz2"
diff --git a/testing/libsieve/APKBUILD b/testing/libsieve/APKBUILD
new file mode 100644
index 000000000..7a74c13b5
--- /dev/null
+++ b/testing/libsieve/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=libsieve
+pkgver=2.2.7
+pkgrel=1
+pkgdesc="Sieve interpretator lib"
+url="http://libsieve.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev flex"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/sourceforge/libsieve/libsieve-$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver/src"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="7415e7cfe40cfc6cf43ae26efb5f0fb7 libsieve-2.2.7.tar.gz"
diff --git a/testing/libsyncml/APKBUILD b/testing/libsyncml/APKBUILD
new file mode 100644
index 000000000..550f4b40f
--- /dev/null
+++ b/testing/libsyncml/APKBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libsyncml
+pkgver=0.5.4
+pkgrel=1
+pkgdesc="Implementation of the SyncML protocol"
+url="http://libsyncml.opensync.org/"
+arch="all"
+license="LGPL-2.1"
+depends=
+makedepends="glib-dev libxml2-dev libwbxml-dev openobex-dev bluez-dev cmake"
+install=
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/libsyncml/libsyncml-$pkgver.tar.bz2"
+
+_srcdir="$srcdir"/$pkgname-$pkgver
+_builddir="$srcdir"/build
+
+prepare() {
+ mkdir -p "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_srcdir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir"
+}
+
+md5sums="b8ce1f222cccc12acdcd6807d65c1aea libsyncml-0.5.4.tar.bz2"
diff --git a/testing/libuniso/APKBUILD b/testing/libuniso/APKBUILD
new file mode 100644
index 000000000..eb5de7b72
--- /dev/null
+++ b/testing/libuniso/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libuniso
+pkgver=0.1
+pkgrel=0
+pkgdesc="Library to unpack files from CDROM (ISO-9660) images"
+url="http://code.google.com/p/libuniso"
+arch="all"
+license="LGPLv2.1"
+depends=""
+depends_dev=""
+makedepends="lua-dev"
+install=""
+subpackages="$pkgname-dev lua-uniso:_lua"
+source="http://libuniso.googlecode.com/files/libuniso-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/libuniso-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ echo ENABLE_LUA=yes > config.mk
+ echo ENABLE_SHARED=yes >> config.mk
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+_lua() {
+ pkgdesc="Lua module for libuniso"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/
+}
+
+md5sums="9c1e65ceecce5786ff33c5dd82bea897 libuniso-0.1.tar.bz2"
diff --git a/testing/libupnp/APKBUILD b/testing/libupnp/APKBUILD
new file mode 100644
index 000000000..4964dd511
--- /dev/null
+++ b/testing/libupnp/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=libupnp
+pkgver=1.6.13
+pkgrel=0
+pkgdesc="Portable Open Source UPnP Development Kit"
+url="http://pupnp.sourceforge.net/"
+arch="all"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/pupnp/${pkgname}-${pkgver}.tar.bz2"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE
+}
+
+md5sums="71476b1781ad179bfc9bead640be5f54 libupnp-1.6.13.tar.bz2"
diff --git a/testing/liburiparser/APKBUILD b/testing/liburiparser/APKBUILD
new file mode 100644
index 000000000..05da3c032
--- /dev/null
+++ b/testing/liburiparser/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor:
+# Maintainer:
+pkgname=liburiparser
+pkgver=0.7.5
+pkgrel=0
+pkgdesc="A strictly RFC 3986 compliant URI parsing and handling library"
+url="http://uriparser.sourceforge.net/"
+arch="all"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/sourceforge/uriparser/uriparser-${pkgver}.tar.gz"
+
+_builddir="${srcdir}"/"uriparser-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --disable-test --disable-doc
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="459c2786758929b92bfbd0cee25b5aa0 uriparser-0.7.5.tar.gz"
diff --git a/testing/libwbxml/APKBUILD b/testing/libwbxml/APKBUILD
new file mode 100644
index 000000000..190e3ca4a
--- /dev/null
+++ b/testing/libwbxml/APKBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libwbxml
+pkgver=0.10.8
+pkgrel=0
+pkgdesc="libwbxml is a library to encode and decode WAP Binary XML"
+url="https://libwbxml.opensync.org"
+arch="all"
+license="LGPL"
+depends=
+makedepends="cmake expat-dev"
+depends_dev="libxml2-dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/libwbxml/libwbxml-$pkgver.tar.bz2"
+
+_srcdir="$srcdir"/$pkgname-$pkgver
+_builddir="$srcdir"/build
+
+prepare() {
+ mkdir -p "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr "$_srcdir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir"
+}
+
+md5sums="7b51c425fc2ff9f502cd9b1e291b1955 libwbxml-0.10.8.tar.bz2"
diff --git a/testing/libwmf/APKBUILD b/testing/libwmf/APKBUILD
new file mode 100644
index 000000000..ddfc4f16e
--- /dev/null
+++ b/testing/libwmf/APKBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libwmf
+pkgver=0.2.8.4
+pkgrel=2
+pkgdesc="A library for reading vector images in Microsoft's native Windows Metafile Format (WMF)."
+url="http://wvware.sourceforge.net/libwmf.html"
+arch="all"
+license="LGPL"
+makedepends="libpng-dev>=1.4.0 freetype-dev jpeg-dev>=8 expat-dev"
+install=
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/sourceforge/wvware/$pkgname-$pkgver.tar.gz
+ libpng14.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ patch -Np1 -i ""$srcdir"/libpng14.patch" || return 1
+ sed -i -e 's/src include fonts doc/src include fonts/g' Makefile.in
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --with-gsfontdir=/usr/share/fonts/Type1 \
+ --with-fontdir=/usr/share/fonts/Type1 \
+ --with-gsfontmap=/usr/share/ghostscript/8.15/lib/Fontmap.GS
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+md5sums="d1177739bf1ceb07f57421f0cee191e0 libwmf-0.2.8.4.tar.gz
+33d3c07a1be9f99fd88de220930c5550 libpng14.patch"
diff --git a/testing/libwmf/libpng14.patch b/testing/libwmf/libpng14.patch
new file mode 100644
index 000000000..3d38c717a
--- /dev/null
+++ b/testing/libwmf/libpng14.patch
@@ -0,0 +1,12 @@
+diff -Nur libwmf-0.2.8.4.orig/src/extra/gd/gd_png.c libwmf-0.2.8.4/src/extra/gd/gd_png.c
+--- libwmf-0.2.8.4.orig/src/extra/gd/gd_png.c 2005-07-27 23:35:06.000000000 +0300
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2010-01-17 01:33:58.000000000 +0200
+@@ -136,7 +136,7 @@
+ /* first do a quick check that the file really is a PNG image; could
+ * have used slightly more general png_sig_cmp() function instead */
+ gdGetBuf (sig, 8, infile);
+- if (!png_check_sig (sig, 8))
++ if (png_sig_cmp (sig, 0, 8))
+ return NULL; /* bad signature */
+
+ #ifndef PNG_SETJMP_NOT_SUPPORTED
diff --git a/testing/libxdg-basedir/APKBUILD b/testing/libxdg-basedir/APKBUILD
new file mode 100644
index 000000000..17d56fdde
--- /dev/null
+++ b/testing/libxdg-basedir/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=libxdg-basedir
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="library for XDG base dir specification"
+url="http://n.ethz.ch/~nevillm/download/libxdg-basedir/"
+arch="all"
+license="MIT"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://n.ethz.ch/~nevillm/download/libxdg-basedir/${pkgname}-${pkgver}.tar.gz"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="7c64a28b08c8fdf6c8a95b0d5f1497b0 libxdg-basedir-1.1.1.tar.gz"
diff --git a/testing/libyaml/APKBUILD b/testing/libyaml/APKBUILD
new file mode 100644
index 000000000..4584087c8
--- /dev/null
+++ b/testing/libyaml/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=libyaml
+pkgver=0.1.4
+pkgrel=0
+pkgdesc="Yaml parser and emitter written in C"
+url="http://pyyaml.org/"
+arch="all"
+license=MIT""
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages="$pkgname-dev"
+source="http://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz"
+_builddir="$srcdir"/yaml-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+ make check || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="36c852831d02cf90508c29852361d01b yaml-0.1.4.tar.gz"
diff --git a/testing/libzdb/APKBUILD b/testing/libzdb/APKBUILD
new file mode 100644
index 000000000..f65d20d1e
--- /dev/null
+++ b/testing/libzdb/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=libzdb
+pkgver=2.10
+pkgrel=0
+pkgdesc="A thread-safe high level multi-database connection pool library"
+url="http://www.tildeslash.com/libzdb/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="sqlite-dev mysql-dev postgresql-dev"
+makedepends="$depends_dev flex"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.tildeslash.com/libzdb/dist/libzdb-$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --enable-optimized \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="fdc04b4b7f33cdcdfc6b559ba9965825 libzdb-2.10.tar.gz"
diff --git a/testing/lightdm/APKBUILD b/testing/lightdm/APKBUILD
new file mode 100644
index 000000000..f4ab08e0b
--- /dev/null
+++ b/testing/lightdm/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lightdm
+pkgver=1.1.0
+pkgrel=4
+pkgdesc="A cross-desktop display manager"
+url="http://www.freedesktop.org/wiki/Software/LightDM"
+arch="all"
+license="GPL-3"
+depends="dbus"
+depends_dev=""
+makedepends="linux-pam-dev gtk+3.0-dev libxklavier-dev libxext-dev
+ autoconf automake libtool gobject-introspection-dev"
+install="$pkgname.pre-install"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
+source="http://people.ubuntu.com/~robert-ancell/lightdm/releases/lightdm-$pkgver.tar.gz
+ lightdm-x11-configure.patch
+ disallow-guest.patch
+ lightdm.initd"
+
+_builddir="$srcdir"/lightdm-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-liblightdm-gobject \
+ --enable-gtk-greeter \
+ --with-greeter-session=lightdm-gtk-greeter \
+ || return 1
+
+ # workaround build bug
+ touch tests/src/lightdm-session
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ mv "$pkgdir"/usr/lib/locale "$pkgdir"/usr/share/
+
+ install -Dm755 "$srcdir"/lightdm.initd "$pkgdir"/etc/init.d/lightdm
+}
+
+md5sums="c2347200b1af29c677ef5ad83855217b lightdm-1.1.0.tar.gz
+10b9a72013ed824a12a8720ff28810a1 lightdm-x11-configure.patch
+04956acfe2817e8d953f012ad6c72998 disallow-guest.patch
+9eb01e4202919424face9bafbda4936c lightdm.initd"
diff --git a/testing/lightdm/disallow-guest.patch b/testing/lightdm/disallow-guest.patch
new file mode 100644
index 000000000..b9ed6b3c2
--- /dev/null
+++ b/testing/lightdm/disallow-guest.patch
@@ -0,0 +1,22 @@
+--- ./data/lightdm.conf.orig
++++ ./data/lightdm.conf
+@@ -63,7 +63,7 @@
+ #greeter-session=example-gtk-gnome
+ #greeter-hide-users=false
+ #user-session=default
+-#allow-guest=true
++#allow-guest=false
+ #guest-session=UNIMPLEMENTED
+ #session-wrapper=lightdm-session
+ #display-setup-script=
+--- ./src/lightdm.c.orig
++++ ./src/lightdm.c
+@@ -957,7 +957,7 @@
+ if (!config_has_key (config_get_instance (), "SeatDefaults", "start-session"))
+ config_set_boolean (config_get_instance (), "SeatDefaults", "start-session", TRUE);
+ if (!config_has_key (config_get_instance (), "SeatDefaults", "allow-guest"))
+- config_set_boolean (config_get_instance (), "SeatDefaults", "allow-guest", TRUE);
++ config_set_boolean (config_get_instance (), "SeatDefaults", "allow-guest", FALSE);
+ if (!config_has_key (config_get_instance (), "SeatDefaults", "greeter-session"))
+ config_set_string (config_get_instance (), "SeatDefaults", "greeter-session", GREETER_SESSION);
+ if (!config_has_key (config_get_instance (), "SeatDefaults", "user-session"))
diff --git a/testing/lightdm/lightdm-x11-configure.patch b/testing/lightdm/lightdm-x11-configure.patch
new file mode 100644
index 000000000..e1819eaa4
--- /dev/null
+++ b/testing/lightdm/lightdm-x11-configure.patch
@@ -0,0 +1,122 @@
+--- ./configure.orig
++++ ./configure
+@@ -17154,10 +17154,12 @@
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+@@ -17165,6 +17167,7 @@
+ pkg_cv_LIGHTDM_GTK_GREETER_CFLAGS=`$PKG_CONFIG --cflags "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -17180,10 +17183,12 @@
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+@@ -17191,6 +17196,7 @@
+ pkg_cv_LIGHTDM_GTK_GREETER_LIBS=`$PKG_CONFIG --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -17215,11 +17221,13 @@
+ LIGHTDM_GTK_GREETER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>&1`
+ else
+ LIGHTDM_GTK_GREETER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+@@ -17250,10 +17258,12 @@
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+@@ -17261,6 +17271,7 @@
+ pkg_cv_LIGHTDM_GTK_GREETER_CFLAGS=`$PKG_CONFIG --cflags "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -17276,10 +17287,12 @@
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+@@ -17287,6 +17300,7 @@
+ pkg_cv_LIGHTDM_GTK_GREETER_LIBS=`$PKG_CONFIG --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -17311,11 +17325,13 @@
+ LIGHTDM_GTK_GREETER_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>&1`
+ else
+ LIGHTDM_GTK_GREETER_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+@@ -17324,6 +17340,7 @@
+ as_fn_error $? "Package requirements (
+ gtk+-3.0
+ gmodule-export-2.0
++ x11
+ ) were not met:
+
+ $LIGHTDM_GTK_GREETER_PKG_ERRORS
diff --git a/testing/lightdm/lightdm.initd b/testing/lightdm/lightdm.initd
new file mode 100755
index 000000000..4e560c3fc
--- /dev/null
+++ b/testing/lightdm/lightdm.initd
@@ -0,0 +1,11 @@
+#!/sbin/runscript
+
+depends() {
+ needs localmount dbus
+}
+
+description="Lightweigh display manager"
+command="/usr/sbin/lightdm"
+command_background="yes"
+pidfile="/var/run/lightdm.pid"
+
diff --git a/testing/lightdm/lightdm.pre-install b/testing/lightdm/lightdm.pre-install
new file mode 100644
index 000000000..7a5fefea5
--- /dev/null
+++ b/testing/lightdm/lightdm.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+name=lightdm
+addgroup -S $name 2>/dev/null
+adduser -S -H -h /var/run/lightdm -s /bin/false -D -G $name $name 2>/dev/null
+exit 0
diff --git a/testing/linux-pam/APKBUILD b/testing/linux-pam/APKBUILD
new file mode 100644
index 000000000..3ab15a20f
--- /dev/null
+++ b/testing/linux-pam/APKBUILD
@@ -0,0 +1,77 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=linux-pam
+pkgver=1.1.3
+pkgrel=3
+pkgdesc="pluggable authentication modules for linux"
+url="http://www.kernel.org/pub/linux/libs/pam"
+arch="all"
+license="BSD"
+depends=
+depends_dev="gettext-dev"
+makedepends="$depends_dev bison flex"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.kernel.org/pub/linux/libs/pam/library/Linux-PAM-$pkgver.tar.bz2
+ linux-pam-innetgr.patch
+ base-auth.pamd
+ base-account.pamd
+ base-password.pamd
+ base-session.pamd
+ base-session-noninteractive.pamd
+ other.pamd"
+
+_builddir="$srcdir"/Linux-PAM-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --libdir=/lib \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-nls \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ # do not install pam.d files bundled with the source, they could be broken
+ rm -rf "$pkgdir"/etc/pam.d
+
+ # install our pam.d files
+ mkdir "$pkgdir"/etc/pam.d
+ for i in $source; do
+ case $i in
+ *.pamd)
+ basename=$(echo $i | cut -d. -f1)
+ cp "$srcdir"/$i "$pkgdir"/etc/pam.d/"$basename"
+ ;;
+ esac
+ done
+
+ # delete pointless libtool archives.
+ rm -rf "$pkgdir"/lib/security/*.la
+}
+
+md5sums="6db7fcb5db6253350e3a4648ceac40e7 Linux-PAM-1.1.3.tar.bz2
+c309401e103cc86e8b25557ff3eb0b53 linux-pam-innetgr.patch
+aa5bb7c9d8e4687aea1ae69b7447254a base-auth.pamd
+fafcf29cb9bab788cb4933106be31883 base-account.pamd
+117535e4938f478efced1398b408cf96 base-password.pamd
+baec6808544bf6cebc59e07467f8c213 base-session.pamd
+afbdd8eb4db5c31dfd8e8da35c698b90 base-session-noninteractive.pamd
+b8e839ece64df173f16d28520eb8d66c other.pamd"
diff --git a/testing/linux-pam/base-account.pamd b/testing/linux-pam/base-account.pamd
new file mode 100644
index 000000000..591092944
--- /dev/null
+++ b/testing/linux-pam/base-account.pamd
@@ -0,0 +1,3 @@
+# basic PAM configuration for Alpine.
+
+account required pam_unix.so
diff --git a/testing/linux-pam/base-auth.pamd b/testing/linux-pam/base-auth.pamd
new file mode 100644
index 000000000..012445aa3
--- /dev/null
+++ b/testing/linux-pam/base-auth.pamd
@@ -0,0 +1,5 @@
+# basic PAM configuration for Alpine.
+
+auth required pam_env.so
+auth required pam_unix.so nullok_secure
+auth required pam_nologin.so successok
diff --git a/testing/linux-pam/base-password.pamd b/testing/linux-pam/base-password.pamd
new file mode 100644
index 000000000..a146a93fe
--- /dev/null
+++ b/testing/linux-pam/base-password.pamd
@@ -0,0 +1,3 @@
+# basic PAM configuration for Alpine.
+
+password required pam_unix.so nullok obscure md5 sha512
diff --git a/testing/linux-pam/base-session-noninteractive.pamd b/testing/linux-pam/base-session-noninteractive.pamd
new file mode 100644
index 000000000..85e07d594
--- /dev/null
+++ b/testing/linux-pam/base-session-noninteractive.pamd
@@ -0,0 +1,4 @@
+# basic PAM configuration for Alpine.
+
+session required pam_limits.so
+session required pam_unix.so
diff --git a/testing/linux-pam/base-session.pamd b/testing/linux-pam/base-session.pamd
new file mode 100644
index 000000000..bf5bcb734
--- /dev/null
+++ b/testing/linux-pam/base-session.pamd
@@ -0,0 +1,4 @@
+# basic PAM configuration for Alpine.
+
+session include base-session-noninteractive
+session required pam_motd.so
diff --git a/testing/linux-pam/linux-pam-innetgr.patch b/testing/linux-pam/linux-pam-innetgr.patch
new file mode 100644
index 000000000..a94fa3dae
--- /dev/null
+++ b/testing/linux-pam/linux-pam-innetgr.patch
@@ -0,0 +1,54 @@
+--- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c
++++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c
+@@ -658,10 +658,13 @@
+ continue;
+ }
+ /* If buffer starts with @, we are using netgroups */
++#ifdef HAVE_INNETGR
+ if (buffer[0] == '@')
+ good &= innetgr (&buffer[1], NULL, user, NULL);
+ /* otherwise, if the buffer starts with %, it's a UNIX group */
+- else if (buffer[0] == '%')
++ else
++#endif
++ if (buffer[0] == '%')
+ good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
+ else
+ good &= logic_field(pamh,user, buffer, count, is_same);
+--- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c
++++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
+@@ -233,16 +233,20 @@
+ static int
+ evaluate_innetgr(const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ if (innetgr(group, host, user, NULL) == 1)
+ return PAM_SUCCESS;
++#endif
+ return PAM_AUTH_ERR;
+ }
+ /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
+ static int
+ evaluate_notinnetgr(const char *host, const char *user, const char *group)
+ {
++#ifdef HAVE_INNETGR
+ if (innetgr(group, host, user, NULL) == 0)
+ return PAM_SUCCESS;
++#endif
+ return PAM_AUTH_ERR;
+ }
+
+--- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c
++++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c
+@@ -554,9 +554,11 @@
+ continue;
+ }
+ /* If buffer starts with @, we are using netgroups */
++#ifdef HAVE_INNETGR
+ if (buffer[0] == '@')
+ good &= innetgr (&buffer[1], NULL, user, NULL);
+ else
++#endif
+ good &= logic_field(pamh, user, buffer, count, is_same);
+ D(("with user: %s", good ? "passes":"fails" ));
+
diff --git a/testing/linux-pam/other.pamd b/testing/linux-pam/other.pamd
new file mode 100644
index 000000000..8c9797e71
--- /dev/null
+++ b/testing/linux-pam/other.pamd
@@ -0,0 +1,6 @@
+# basic PAM configuration for Alpine.
+
+auth include base-auth
+account include base-account
+password include base-password
+session include base-session-noninteractive
diff --git a/testing/lua-augeas/APKBUILD b/testing/lua-augeas/APKBUILD
new file mode 100644
index 000000000..f8748cc6a
--- /dev/null
+++ b/testing/lua-augeas/APKBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-augeas
+pkgver=0.1
+pkgrel=2
+pkgdesc="Lua bindings for Augeas"
+url="http://git.alpinelinux.org/cgit/lua-augeas/"
+arch="all"
+license="LGPL"
+depends=
+makedepends="lua-dev pkgconfig augeas-dev"
+install=
+subpackages=
+source="http://git.alpinelinux.org/cgit/lua-augeas.git/snapshot/lua-augeas-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ make CFLAGS="${CFLAGS} -fPIC" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -D augeas.so "$pkgdir"/usr/lib/lua/5.1/augeas.so
+}
+
+md5sums="7b25097b785ee6b2dc09f0bb69a30a6b lua-augeas-0.1.tar.bz2"
diff --git a/testing/lua-crypto/APKBUILD b/testing/lua-crypto/APKBUILD
new file mode 100644
index 000000000..09e1ecc35
--- /dev/null
+++ b/testing/lua-crypto/APKBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-crypto
+pkgver=0.2.0
+pkgrel=3
+pkgdesc="a Lua frontend to the OpenSSL cryptographic library"
+url="http://luacrypto.luaforge.net/"
+arch="all"
+license="MIT/X11"
+depends=
+makedepends="lua-dev openssl-dev"
+install=
+subpackages=
+source="http://luaforge.net/frs/download.php/1722/luacrypto-0.2.0.tar.gz"
+
+_builddir="$srcdir"/luacrypto-$pkgver
+build() {
+ cd "$_builddir"
+ make LUA_VERSION_NUM=510 CFLAGS="$CFLAGS -fPIC" COMPAT_O=
+}
+
+package() {
+ cd "$_builddir"
+ make COMPAT_O= LUA_LIBDIR="$pkgdir"/usr/lib/lua/5.1 install
+}
+
+md5sums="1e1319d960f0760b113b3e7ad9a3607d luacrypto-0.2.0.tar.gz"
diff --git a/testing/lua-ev/APKBUILD b/testing/lua-ev/APKBUILD
new file mode 100644
index 000000000..a9a46d060
--- /dev/null
+++ b/testing/lua-ev/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-ev
+pkgver=1.3
+pkgrel=0
+pkgdesc="Lua bindings to libev"
+url="https://github.com/brimworks/lua-ev"
+arch="all"
+license="MIT"
+depends=
+makedepends="lua-dev cmake libev-dev wget"
+install=
+subpackages="$pkgname-doc"
+source="https://github.com/downloads/brimworks/lua-ev/lua-ev-v$pkgver.tar.gz"
+
+_builddir="$srcdir"/lua-ev-v$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_CMOD=/usr/lib/lua/5.1/ \
+ . || return 1
+ make || return 1
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="4b3703d82711407be6ca5ef793b0cf57 lua-ev-v1.3.tar.gz"
diff --git a/testing/lua-file_slurp/APKBUILD b/testing/lua-file_slurp/APKBUILD
new file mode 100644
index 000000000..7a1afb264
--- /dev/null
+++ b/testing/lua-file_slurp/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-file_slurp
+pkgver=0.001001
+pkgrel=0
+pkgdesc="Lua module for easily read/write entire files from/to a string"
+url="https://gist.github.com/1325400/"
+arch="noarch"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="wget"
+install=""
+subpackages=
+source="https://raw.github.com/gist/1325400/c6a64d8ad9605bcfdaa79d4cdadeb86e4c1d77ee/file_slurp.lua"
+
+_luasharedir=/usr/share/lua/5.1
+build() {
+ return 0
+}
+
+package() {
+ install -D "$srcdir"/file_slurp.lua \
+ "$pkgdir"$_luasharedir/file_slurp.lua
+}
+
+md5sums="2e9874a54acf600050c910c1bfa6841b file_slurp.lua"
diff --git a/testing/lua-ldoc/APKBUILD b/testing/lua-ldoc/APKBUILD
new file mode 100644
index 000000000..3aa4b63d2
--- /dev/null
+++ b/testing/lua-ldoc/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-ldoc
+pkgver=1.0
+pkgrel=0
+pkgdesc="Documentation tool for Lua"
+url="http://github.com/stevedonovan/LDoc"
+arch="noarch"
+license="MIT"
+depends="lua-penlight"
+makedepends="lua-dev"
+install=""
+subpackages=
+source="http://stevedonovan.github.com/files/ldoc-$pkgver.zip"
+
+_luashare=/usr/share/lua/5.1
+_builddir="$srcdir"/LDoc
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -i '1i \
+#!/usr/bin/env lua' ldoc.lua
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm755 ldoc.lua "$pkgdir"/usr/bin/ldoc || return 1
+ install -d "$pkgdir"/$_luashare || return 1
+ cp -a ldoc "$pkgdir"/$_luashare/
+}
+
+md5sums="fcfb9afadd49c672f0cb553f490b2455 ldoc-1.0.zip"
diff --git a/testing/lua-lgi/APKBUILD b/testing/lua-lgi/APKBUILD
new file mode 100644
index 000000000..837b951c3
--- /dev/null
+++ b/testing/lua-lgi/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-lgi
+pkgver=0.3
+pkgrel=0
+pkgdesc="Lua binding using gobject-introspection"
+url="http://github.com/pavouk/lgi"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="lua-dev gtk+-dev wget gobject-introspection-dev"
+install=""
+subpackages="$pkgname-doc"
+source="https://github.com/downloads/pavouk/lgi/lgi-$pkgver.tar.gz"
+
+_builddir="$srcdir"/lgi-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make PREFIX=/usr
+}
+
+package() {
+ cd "$_builddir"
+ make install PREFIX=/usr DESTDIR="$pkgdir"
+ mkdir -p "$pkgdir"/usr/share/doc/lua-lgi
+ cp -r docs/* samples "$pkgdir"/usr/share/doc/lua-lgi/
+}
+
+md5sums="c0b1c724285f2962214bb79367c9591f lgi-0.3.tar.gz"
diff --git a/testing/lua-llthreads/APKBUILD b/testing/lua-llthreads/APKBUILD
new file mode 100644
index 000000000..b27581503
--- /dev/null
+++ b/testing/lua-llthreads/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-llthreads
+pkgver=1.1
+pkgrel=0
+pkgdesc="Low-Level native threads module for Lua"
+url="https://github.com/Neopallium/lua-llthreads"
+arch="all"
+license="MIT"
+depends=""
+makedepends="wget cmake"
+install=""
+subpackages=
+source="saveas-http://github.com/Neopallium/lua-llthreads/tarball/v1.1/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/Neopallium-lua-llthreads-48c39a5
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ . || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir" || return 1
+}
+
+md5sums="f5c80984e7d8849ad777b42c4594da8d lua-llthreads-1.1.tar.gz"
diff --git a/testing/lua-yaml/APKBUILD b/testing/lua-yaml/APKBUILD
new file mode 100644
index 000000000..70aaa542a
--- /dev/null
+++ b/testing/lua-yaml/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lua-yaml
+pkgver=0.2
+pkgrel=0
+pkgdesc="LibYaml binding for Lua"
+url="http://yaml.luaforge.net"
+arch="all"
+license="MIT"
+depends=""
+makedepends="yaml-dev"
+install=""
+subpackages=""
+source="http://luaforge.net/frs/download.php/4284/yaml-$pkgver.tar.gz"
+
+_builddir="$srcdir"/yaml-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d "$pkgdir"/usr/lib/lua/5.1
+ make PREFIX="$pkgdir"/usr install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="18c25a2a6609b2862e3485952cf73634 yaml-0.2.tar.gz"
diff --git a/testing/luajit/APKBUILD b/testing/luajit/APKBUILD
new file mode 100644
index 000000000..7646ed1ba
--- /dev/null
+++ b/testing/luajit/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Cameron Banta <cbanta@gmail.com>
+# Maintainer: Cameron Banta <cbanta@gmail.com>
+pkgname=luajit
+_pkgname=LuaJIT
+pkgver=2.0.0_beta8
+_pkgver=${pkgver//_/-}
+pkgrel=0
+pkgdesc="Just-In-Time Compiler for the Lua programming language"
+url="http://luajit.org"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://luajit.org/download/$_pkgname-$_pkgver.tar.gz"
+
+_builddir=$srcdir/$_pkgname-$_pkgver
+
+build() {
+ cd "$_builddir"
+ make amalg PREFIX=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make install DESTDIR="$pkgdir" PREFIX=/usr || return 1
+ ln -sf /usr/bin/luajit-${_pkgver} $pkgdir/usr/bin/luajit
+}
+
+md5sums="f0748a73ae268d49b1d01f56c4fe3e61 LuaJIT-2.0.0-beta8.tar.gz"
diff --git a/testing/lwm/APKBUILD b/testing/lwm/APKBUILD
new file mode 100644
index 000000000..411291b27
--- /dev/null
+++ b/testing/lwm/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Michael Zhou <zhoumichaely@gmail.com>
+# Maintainer:
+pkgname=lwm
+pkgver=1.2.2
+pkgrel=0
+pkgdesc="Lightweight Window Manager that tries to keep out of your face"
+url="http://www.jfc.org.uk/software/lwm.html"
+arch="all"
+license="GPL"
+depends=""
+makedepends="libx11-dev libsm-dev"
+install=""
+subpackages=""
+source="
+ http://www.jfc.org.uk/files/$pkgname/$pkgname-$pkgver.tar.gz
+ no_xmkmf_makefile.patch
+"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make -f no_xmkmf_makefile || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d "$pkgdir"/usr/bin
+ install lwm "$pkgdir"/usr/bin
+}
+
+md5sums="1748722a293e03d632b615275ef84498 lwm-1.2.2.tar.gz
+cbfa8518daed50927fe4cc8ae5d2e550 no_xmkmf_makefile.patch"
diff --git a/testing/lwm/no_xmkmf_makefile.patch b/testing/lwm/no_xmkmf_makefile.patch
new file mode 100644
index 000000000..6b7ff60f0
--- /dev/null
+++ b/testing/lwm/no_xmkmf_makefile.patch
@@ -0,0 +1,11 @@
+--- a/no_xmkmf_makefile
++++ b/no_xmkmf_makefile
+@@ -24,7 +24,7 @@
+ #DEFINES = -D_POSIX_C_SOURCE=2
+
+ # Add any strange libraries your system needs here.
+-LDFLAGS = -lXext -lX11 -lICE -lSM
++LDFLAGS = -lX11 -lICE -lSM
+
+ # -----------------------------------------------------------------------------
+
diff --git a/testing/mac-robber/APKBUILD b/testing/mac-robber/APKBUILD
new file mode 100644
index 000000000..3b36450d9
--- /dev/null
+++ b/testing/mac-robber/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=mac-robber
+pkgver=1.02
+pkgrel=0
+pkgdesc="Tool to create a timeline of file activity for mounted file systems"
+url="http://sourceforge.net/projects/mac-robber/"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dpm 0755 $pkgname "$pkgdir"/usr/bin/$pkgname || return 1
+}
+
+md5sums="6d6d99aa882a46b2bc5231d195fdb595 mac-robber-1.02.tar.gz"
diff --git a/testing/madwimax/APKBUILD b/testing/madwimax/APKBUILD
new file mode 100644
index 000000000..e85877f73
--- /dev/null
+++ b/testing/madwimax/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Sergey
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=madwimax
+pkgver=0.1.1
+pkgrel=2
+pkgdesc="WiMAX driver for the Samsung SWC-U200 and similar USB modems"
+url="http://code.google.com/p/madwimax/"
+arch="all"
+license="GPL-2"
+depends=
+makedepends="pkgconfig libusb-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://madwimax.googlecode.com/files/madwimax-0.1.1.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --without-man-pages \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+#2009-10-07,SP: you can start it simply by /usr/sbin/madwimax -d
+#, so no init.d script so far...
+
+}
+
+md5sums="4ebd2d74e887e6f9d6f23067a4ad8272 madwimax-0.1.1.tar.gz"
diff --git a/testing/maildrop/APKBUILD b/testing/maildrop/APKBUILD
new file mode 100644
index 000000000..88e83757a
--- /dev/null
+++ b/testing/maildrop/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Juraj Sujan <sujan@sofy.sk>
+# Maintainer: Juraj Sujan <sujan@sofy.sk>
+pkgname=maildrop
+pkgver=2.5.2
+pkgrel=0
+pkgdesc="Mail delivery agent with filtering abilities"
+url="http://courier-mta.org/maildrop/"
+arch="all"
+license="GPL3"
+depends=
+makedepends="perl pcre-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/courier/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2
+ http://www.max.rs/ozone/maildrop-2.3.0-dovecotauth.patch.txt"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ if ! patch --verbose -p1 -i ../maildrop-2.3.0-dovecotauth.patch.txt; then
+ error "dovecotauth patch failed"
+ return 1
+ fi
+}
+
+build() {
+ cd "$_builddir"
+ # workaround for strange detection of default mailbox file/dir
+ export QMAIL="foo"
+ ./configure --prefix=/usr \
+ --disable-authlib \
+ --without-db \
+ --enable-syslog=1 \
+ --with-default-maildrop=./Maildir || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ mkdir "$pkgdir"/usr/share/doc
+ mv "$pkgdir"/usr/share/maildrop "$pkgdir"/usr/share/doc/
+ cp README.dovecotauth "$pkgdir"/usr/share/doc/maildrop/
+}
+md5sums="3edb56534ae442a494255db6c8aaab99 maildrop-2.5.2.tar.bz2
+f5e0fd910d76c4fba2a5fcdd40c6b375 maildrop-2.3.0-dovecotauth.patch.txt"
diff --git a/testing/mediaproxy/APKBUILD b/testing/mediaproxy/APKBUILD
new file mode 100644
index 000000000..169fc2e09
--- /dev/null
+++ b/testing/mediaproxy/APKBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mediaproxy
+pkgver=2.4.4
+pkgrel=1
+pkgdesc="MediaProxy"
+url="http://www.ag-projects.com/MediaProxy/"
+pkgusers="kamailio"
+pkggroups="kamailio"
+arch="all"
+license="GPL"
+depends="python py-application py-gnutls py-twisted py-cjson iptables"
+makedepends="libnetfilter_conntrack-dev libnfnetlink-dev py-buildutils
+ py-setuptools python-dev"
+install=
+subpackages=""
+#subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.ag-projects.com/MediaProxy/$pkgname-$pkgver.tar.gz
+ mediaproxy-dispatcher.initd
+ mediaproxy-relay.initd
+ config.ini
+"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+
+ python setup.py install --root="$pkgdir"
+
+ echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" \
+ > "$pkgdir"/usr/lib/python2.6/site-packages/$_pkgname.pth
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ install -D -m755 "$srcdir"/$pkgname-dispatcher.initd \
+ "$pkgdir"/etc/init.d/$pkgname-dispatcher
+ install -D -m755 "$srcdir"/$pkgname-relay.initd \
+ "$pkgdir"/etc/init.d/$pkgname-relay
+ install -D -m755 "$srcdir"/config.ini \
+ "$pkgdir"/etc/mediaproxy/config.ini
+ install -d -o kamailio "$pkgdir"/etc/mediaproxy/tls/
+ install -d -o kamailio "$pkgdir"/var/run/$pkgname
+}
+
+md5sums="4ae842662702ddd4a5a9db263d261693 mediaproxy-2.4.4.tar.gz
+cf081e451ab5d8d5ff66a8d9fa6707d6 mediaproxy-dispatcher.initd
+1add855d86ead49c19798e9d86c69efe mediaproxy-relay.initd
+d3df3569543d696ca102f131f7ad95e4 config.ini"
diff --git a/testing/mediaproxy/config.ini b/testing/mediaproxy/config.ini
new file mode 100644
index 000000000..995c006d2
--- /dev/null
+++ b/testing/mediaproxy/config.ini
@@ -0,0 +1,19 @@
+[Dispatcher]
+socket = /var/run/mediaproxy/proxydispatcher.sock
+defaultproxy = /var/run/mediaproxy/mediaproxy.sock
+
+[MediaProxy]
+start = yes
+socket = /var/run/mediaproxy/mediaproxy.sock
+group = kamailio
+listen = 0.0.0.0
+allow = None
+proxyIP = # This is where your Kamailio is installed
+portRange = 9000:9049 # These values are set same in ATA's configs for RTP Port Range
+idleTimeout = 60
+holdTimeout = 180
+forceClose = 0
+
+[Accounting]
+accounting = off
+
diff --git a/testing/mediaproxy/mediaproxy-dispatcher.initd b/testing/mediaproxy/mediaproxy-dispatcher.initd
new file mode 100644
index 000000000..9b37a7e06
--- /dev/null
+++ b/testing/mediaproxy/mediaproxy-dispatcher.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+daemon=/usr/bin/media-dispatcher
+pidfile=/var/run/mediaproxy/dispatcher.pid
+
+depend() {
+ need net
+ after firewall
+ after kamailio
+}
+
+start() {
+ ebegin "Starting Mediaproxy Dispatcher"
+ start-stop-daemon --start --verbose --pidfile $pidfile --exec $daemon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Mediaproxy Dispatcher"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}
diff --git a/testing/mediaproxy/mediaproxy-relay.initd b/testing/mediaproxy/mediaproxy-relay.initd
new file mode 100644
index 000000000..09b842f07
--- /dev/null
+++ b/testing/mediaproxy/mediaproxy-relay.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+daemon=/usr/bin/media-relay
+pidfile=/var/run/mediaproxy/relay.pid
+
+depend() {
+ need net
+ after firewall
+ after mediaproxy-dispatcher
+}
+
+start() {
+ ebegin "Starting Mediaproxy Relay"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Mediaproxy Relay"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}
diff --git a/testing/meiga/APKBUILD b/testing/meiga/APKBUILD
new file mode 100644
index 000000000..ea25106e0
--- /dev/null
+++ b/testing/meiga/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=meiga
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="Tool for sharing directories via web"
+url="http://meiga.igalia.com/"
+arch="all"
+license="GPLv2"
+depends=
+makedepends="gtk+-dev libsoup-dev dbus-glib-dev vala gupnp-dev"
+install=
+subpackages=
+source="http://meiga.igalia.com/packages/src/meiga-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="4108c48af075f733c66adcc78dbafa7d meiga-0.4.0.tar.gz"
diff --git a/testing/memtest86+/APKBUILD b/testing/memtest86+/APKBUILD
new file mode 100644
index 000000000..7c0109997
--- /dev/null
+++ b/testing/memtest86+/APKBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname="memtest86+"
+pkgver=4.20
+pkgrel=3
+pkgdesc="A tool for memory failure detection"
+url="http://www.memtest.org"
+arch="x86 x86_64"
+license="GPL"
+depends=
+depends_dev=
+makedepends=
+install=
+subpackages=""
+source="http://www.memtest.org/download/$pkgver/$pkgname-$pkgver.bin.gz"
+
+prepare() {
+ return 0
+}
+
+build() {
+ return 0
+}
+
+package() {
+ gunzip "$srcdir"/$pkgname-$pkgver.bin.gz
+ install -m644 -D "$srcdir"/$pkgname-$pkgver.bin "$pkgdir"/boot/memtest
+}
+
+md5sums="4640a702c3e7a5a74af069f51ab8345f memtest86+-4.20.bin.gz"
diff --git a/testing/mhash/APKBUILD b/testing/mhash/APKBUILD
new file mode 100644
index 000000000..4df377600
--- /dev/null
+++ b/testing/mhash/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=mhash
+pkgver=0.9.9.9
+pkgrel=1
+pkgdesc="A thread-safe hash library which provides a uniform interface to hash algorithms (MD5, SHA-1, HAVAL, etc"
+url="http://mhash.sourceforge.net/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/mhash/$pkgname-$pkgver.tar.bz2"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="f91c74f9ccab2b574a98be5bc31eb280 mhash-0.9.9.9.tar.bz2"
diff --git a/testing/minidlna/APKBUILD b/testing/minidlna/APKBUILD
new file mode 100644
index 000000000..95ccfbd91
--- /dev/null
+++ b/testing/minidlna/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=minidlna
+pkgver=1.0.19
+pkgrel=0
+pkgdesc="A small dlna server"
+url="http://sourceforge.net/projects/minidlna/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="libvorbis-dev libogg-dev libid3tag-dev libexif-dev jpeg-dev
+ sqlite-dev ffmpeg-dev flac-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/minidlna/${pkgname}_${pkgver}_src.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ # fix for busybox install
+ sed -i 's/--mode=0644/-m0644/g' Makefile || return 1
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
+ install -m644 -D "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
+}
+
+md5sums="8bb5f2c0abc009e16039d7deecf09cf6 minidlna_1.0.19_src.tar.gz
+c9965792baec8d2dc6953c7e28eda8bd minidlna.initd
+6dc0cf1e59e0d53b910f306f81cb7e7f minidlna.confd"
diff --git a/testing/minidlna/minidlna.confd b/testing/minidlna/minidlna.confd
new file mode 100644
index 000000000..4cc286c2b
--- /dev/null
+++ b/testing/minidlna/minidlna.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/minidlna
+
+# Should minidlna rescan the entire collection on startup?
+# Warning: This may take a long time!
+RESCAN="false"
+
+# The location of the config file
+#CONFIG="/etc/minidlna.conf"
+
+# vim: ft=gentoo-conf-d
diff --git a/testing/minidlna/minidlna.initd b/testing/minidlna/minidlna.initd
new file mode 100644
index 000000000..bb2062613
--- /dev/null
+++ b/testing/minidlna/minidlna.initd
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/files/minidlna.initd,v 1.1 2010/12/29 16:59:25 xmw Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MiniDLNA"
+ local params=""
+ local stop=0
+
+ if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
+ params="$params -R"
+ fi
+
+ #set the config file and check if it exists
+ if [ -z "${CONFIG}" ]; then
+ if [ ! -f "/etc/minidlna.conf" ]; then
+ ewarn "You did not set the config file correctly"
+ stop=1
+ fi
+ params="$params -f /etc/minidlna.conf"
+ else
+ if [ ! -f "${CONFIG}" ]; then
+ ewarn "The specified config file does not exist"
+ stop=1
+ fi
+ params="$params -f ${CONFIG}"
+ fi
+
+
+ if [ $stop -eq 1 ]; then
+ eend 1
+ else
+ start-stop-daemon --start \
+ --exec /usr/sbin/minidlna -- ${params}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping MiniDLNA"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
+ eend $?
+}
diff --git a/testing/moinmoin/APKBUILD b/testing/moinmoin/APKBUILD
new file mode 100644
index 000000000..bab1a6f06
--- /dev/null
+++ b/testing/moinmoin/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+
+pkgname=moinmoin
+pkgver=1.9.3
+pkgrel=1
+pkgdesc="Python Wiki"
+url="http://moinmo.in/"
+arch="noarch"
+license="GPL"
+depends="python py-jabberbot"
+depends_dev="python-dev"
+makedepends="$depends_dev"
+subpackages=""
+source="http://static.moinmo.in/files/moin-$pkgver.tar.gz"
+
+build() {
+ cd "$srcdir"/moin-$pkgver
+ python setup.py build
+}
+
+package() {
+
+ cd "$srcdir"/moin-$pkgver
+ python setup.py install --root="$pkgdir"
+}
+
+md5sums="b22c15446e9fabda180fc88b21635184 moin-1.9.3.tar.gz"
diff --git a/testing/moodbar/APKBUILD b/testing/moodbar/APKBUILD
new file mode 100644
index 000000000..a1f2d3841
--- /dev/null
+++ b/testing/moodbar/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=moodbar
+pkgver=0.1.2
+pkgrel=0
+pkgdesc="analysis tool for building .mood files"
+url="http://amarok.kde.org/wiki/Moodbar"
+license="GPL"
+depends=
+makedepends="gstreamer-dev gst-plugins-base-dev fftw-dev"
+install=
+subpackages=
+source="http://pwsp.net/~qbob/$pkgname-$pkgver.tar.gz"
+arch="all"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="28c8eb65e83b30f71b84be4fab949360 moodbar-0.1.2.tar.gz"
diff --git a/testing/most/APKBUILD b/testing/most/APKBUILD
new file mode 100644
index 000000000..da3f7a24c
--- /dev/null
+++ b/testing/most/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor:
+# Maintainer:
+pkgname=most
+pkgver=5.0.0a
+pkgrel=0
+pkgdesc="A terminal pager similar to more and less"
+url="ftp://space.mit.edu/pub/davis/most"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=
+makedepends="slang-dev ncurses-dev"
+install=""
+subpackages="$pkgname-doc"
+source="$url/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="30f2131b67f61716f6fe1f65205da48b most-5.0.0a.tar.gz"
diff --git a/testing/mp3info/APKBUILD b/testing/mp3info/APKBUILD
new file mode 100644
index 000000000..a750fc7e6
--- /dev/null
+++ b/testing/mp3info/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+pkgname=mp3info
+pkgver=0.8.5a
+pkgrel=0
+pkgdesc="An MP3 technical info viewer and ID3 1.x tag editor"
+url="http://www.ibiblio.org/mp3info/"
+arch="all"
+license="GPL"
+depends=
+makedepends="ncurses-dev"
+subpackages=""
+source="ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-0.8.5a.tgz
+escape_chars.patch"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ patch -p1 -i "$srcdir"/escape_chars.patch || return 1
+
+ make mp3info || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ install -Dm755 mp3info "$pkgdir"/usr/bin/mp3info
+ install -Dm644 mp3info.1 "$pkgdir"/usr/share/man/man1/mp3info.1
+
+}
+
+md5sums="cb7b619a10a40aaac2113b87bb2b2ea2 mp3info-0.8.5a.tgz
+d0be1068503056b775bf10f05a8497b8 escape_chars.patch"
diff --git a/testing/mp3info/escape_chars.patch b/testing/mp3info/escape_chars.patch
new file mode 100644
index 000000000..ec697a286
--- /dev/null
+++ b/testing/mp3info/escape_chars.patch
@@ -0,0 +1,138 @@
+--- orig/mp3info-0.8.5a/mp3info.c Mon Nov 6 04:03:17 2006
++++ mp3info-0.8.5a/mp3info.c Thu Mar 19 12:33:27 2009
+@@ -32,6 +32,7 @@
+ #undef __MAIN
+ #include <sys/stat.h>
+
++char *escape_chars=NULL;
+ char FILENAME_FORMAT_STRING[]="File: %F\n";
+ char ID3_FORMAT_STRING[]="Title: %-30t Track: %n\nArtist: %a\nAlbum: %-30l Year: %y\nComment: %-30c Genre: %g [%G]\n";
+ char TECH_FORMAT_STRING[]="Media Type: MPEG %2.1v Layer %L\nAudio: %r KB/s, %qKHz (%o)\nEmphasis: %e\nCRC: %E\nCopyright: %C\nOriginal: %O\nPadding: %p\nLength: %m:%02s\n";
+@@ -66,7 +67,7 @@
+
+
+
+- while ((c=getopt(argc,argv,"vhGidfxFt:a:l:y:c:n:g:p:r:"))!=-1) {
++ while ((c=getopt(argc,argv,"vhGidfxFmt:a:l:y:c:n:g:p:r:e:"))!=-1) {
+
+ switch(c) {
+ case 'v': /* View mode is now automatic when no changes are
+@@ -159,6 +160,12 @@
+ }
+ break;
+ case 'F': quickscan=0; break;
++ case 'e':
++ escape_chars = optarg;
++ break;
++ case 'm':
++ escape_chars = "'\"\b\n\r\t\\";
++ break;
+ }
+ }
+
+--- orig/mp3info-0.8.5a/mp3info.h Fri Nov 10 00:14:52 2006
++++ mp3info-0.8.5a/mp3info.h Thu Mar 19 10:42:07 2009
+@@ -111,6 +111,7 @@
+ extern int galphagenreindex [MAXGENRE+2];
+ #endif
+
++extern char *escape_chars;
+ void tagedit_curs(char *filename, int filenum, int fileoutof, id3tag *tag);
+
+
+--- orig/mp3info-0.8.5a/textfunc.c Mon Nov 6 08:59:12 2006
++++ mp3info-0.8.5a/textfunc.c Thu Mar 19 12:24:52 2009
+@@ -24,6 +24,7 @@
+ */
+
+ #include "mp3info.h"
++#include "libgen.h"
+
+ char *layer_text[] = {
+ "I", "II", "III"
+@@ -70,6 +71,8 @@
+ "\t-n track\tSpecify ID3 v1.1 track number\n"\
+ "\t-t title\tSpecify ID3 track title\n"\
+ "\t-y year\t\tSpecify ID3 copyright year\n\n"\
++ "\t-m\t\tMySQL safe output\n"\
++ "\t-e\t\tCharacters to escape\n"\
+ "\t-G\t\tDisplay valid genres\n"\
+ "\t-h\t\tDisplay this help page\n"\
+ "\t-x\t\tDisplay technical attributes of the MP3 file\n"\
+@@ -85,6 +88,7 @@
+ "\n\t\tConversion Specifiers\n\n"\
+ "\t\t%%f\tFilename without the path (string)\n"\
+ "\t\t%%F\tFilename with the path (string)\n"\
++ "\t\t%%d\tPath without filename (string)\n"\
+ "\t\t%%k\tFile size in KB (integer)\n"\
+ "\n\t\t%%a\tArtist (string)\n"\
+ "\t\t%%c\tComment (string)\n"\
+@@ -217,7 +221,27 @@
+ }
+ }
+
++/* const char *escape_chars = "'\"\b\n\r\t\\%_"; */
++/* escape the chars so its sql safe */
++char *escape_string(char *str)
++{
++ static char buf[8192];
++ char *src = str;
++ char *dest = buf;
+
++ /* we might want a cmdline flag to enable escaping */
++ if (escape_chars == NULL || str == NULL)
++ return str;
++
++ while (*src && dest < (buf + sizeof(buf) - 1)) {
++ if (strchr(escape_chars, *src))
++ *dest++ = '\\';
++ *dest++ = *src++;
++ }
++ *dest = '\0';
++ return buf;
++}
++
+ void format_output (char *format_string,mp3info *mp3, int vbr_report) {
+
+ char genre[40]="";
+@@ -242,16 +266,16 @@
+ mod[modlen]=0;
+ mod[modlen-1]='s';
+ switch (*code) {
+- case 't': printf(mod,mp3->id3.title); break;
++ case 't': printf(mod,escape_string(mp3->id3.title)); break;
+ case 'f': pos = (pos=strrchr(mp3->filename,'/')) ?
+ pos+1 : mp3->filename;
+- printf(mod,pos); break;
+- case 'F': printf(mod,mp3->filename); break;
+- case 'a': printf(mod,mp3->id3.artist); break;
+- case 'l': printf(mod,mp3->id3.album); break;
++ printf(mod,escape_string(pos)); break;
++ case 'F': printf(mod,escape_string(mp3->filename)); break;
++ case 'a': printf(mod,escape_string(mp3->id3.artist)); break;
++ case 'l': printf(mod,escape_string(mp3->id3.album)); break;
+ case 'k': mod[modlen-1] = 'd'; printf(mod,mp3->datasize / 1024); break;
+- case 'y': printf(mod,mp3->id3.year); break;
+- case 'c': printf(mod,mp3->id3.comment); break;
++ case 'y': printf(mod,escape_string(mp3->id3.year)); break;
++ case 'c': printf(mod,escape_string(mp3->id3.comment)); break;
+ case 'n': if(mp3->id3_isvalid && mp3->id3.track[0]) {
+ mod[modlen-1]='d';
+ printf(mod, (int) mp3->id3.track[0]);
+@@ -259,7 +283,7 @@
+ break;
+ case 'g': if(mp3->id3_isvalid) {
+ text_genre(mp3->id3.genre,genre);
+- printf(mod,genre);
++ printf(mod,escape_string(genre));
+ }
+ break;
+ case 'G': if(mp3->id3_isvalid) {
+@@ -348,6 +372,7 @@
+ }
+ break;
+ case '%': printf("%%"); break;
++ case 'd': printf(mod,escape_string(dirname(mp3->filename))); break;
+ default: printf("%%%c",*(code=percent+1)); break;
+ }
+ format=code+1;
diff --git a/testing/mp3splt-gtk/APKBUILD b/testing/mp3splt-gtk/APKBUILD
new file mode 100644
index 000000000..f8b83a6de
--- /dev/null
+++ b/testing/mp3splt-gtk/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mp3splt-gtk
+pkgver=0.7
+pkgrel=0
+pkgdesc="Gtk frontend for mp3splt"
+url="http://mp3splt.sourceforge.net/"
+arch="all"
+license="GPLv2"
+depends=""
+makedepends="gtk+-dev gst-plugins-base-dev gnome-doc-utils libmp3splt-dev
+ audacious-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-lang"
+source="http://prdownloads.sourceforge.net/mp3splt/mp3splt-gtk-$pkgver.tar.gz"
+
+_builddir="$srcdir"/mp3splt-gtk-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --disable-gnome \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="a1cefffb7ea78ae7c07c8d3ba7a2630b mp3splt-gtk-0.7.tar.gz"
diff --git a/testing/mp3splt/APKBUILD b/testing/mp3splt/APKBUILD
new file mode 100644
index 000000000..b411ffee0
--- /dev/null
+++ b/testing/mp3splt/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mp3splt
+pkgver=2.4
+pkgrel=0
+pkgdesc="A command-line, AlbumWrap and mp3wrap file exctractor"
+url="http://mp3splt.sourceforge.net/"
+arch="all"
+license="GPLv2"
+depends=""
+makedepends="libmp3splt-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://prdownloads.sourceforge.net/mp3splt/mp3splt-$pkgver.tar.gz"
+
+_builddir="$srcdir"/mp3splt-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --with-mp3splt-includes=/usr/include/libmp3splt \
+ --enable-oggsplt_symlink \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="aa4dc3de6e789961c71d8b3daaac0623 mp3splt-2.4.tar.gz"
diff --git a/testing/mplayer2/APKBUILD b/testing/mplayer2/APKBUILD
new file mode 100644
index 000000000..9d7780ccc
--- /dev/null
+++ b/testing/mplayer2/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mplayer2
+pkgver=2.0
+pkgrel=1
+pkgdesc="advanced general-purpose video player"
+url="http://www.mplayer2.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
+ libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
+ x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev live-media-dev
+ mesa-dev ffmpeg-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://ftp.mplayer2.org/pub/release/mplayer2-$pkgver.tar.xz
+ mplayer-gcc-4.6-audio-fix.patch
+ c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch"
+
+_builddir="$srcdir"/mplayer2-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --datadir=/usr/share/mplayer2 \
+ --confdir=/etc/mplayer2 \
+ --enable-runtime-cpudetection \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ mv "$pkgdir"/usr/bin/mplayer "$pkgdir"/usr/bin/mplayer2
+}
+
+md5sums="b880ae4be0e5b9693cdecf97c84b74f3 mplayer2-2.0.tar.xz
+5f261813c5dfa70ba2378c2535428e5d mplayer-gcc-4.6-audio-fix.patch
+8125a2e2d696f6d5af584b01a2d15e78 c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch"
diff --git a/testing/mplayer2/c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch b/testing/mplayer2/c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch
new file mode 100644
index 000000000..175bc4f4a
--- /dev/null
+++ b/testing/mplayer2/c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch
@@ -0,0 +1,216 @@
+From c33fafd6f1bc2a430c114231cecc6e1c56c1f939 Mon Sep 17 00:00:00 2001
+From: Uoti Urpala <uau@mplayer2.org>
+Date: Tue, 19 Apr 2011 23:59:45 +0000
+Subject: Update libav API uses
+
+Update various code to use newer alternatives instead of deprecated
+functions/fields that are being dropped at libav API bump. An
+exception is avcodec_thread_init() which is being dropped even though
+it's still _necessary_ with fairly recent libav versions, so there's
+no good alternative which would work with both those recent versions
+and latest libavcodec. I think there are grounds to consider the drop
+premature and revert it for now; if that doesn't happen I'll add a
+version-test #if check around it later.
+---
+diff --git a/av_log.c b/av_log.c
+index bd42ce3..bcf1a14 100644
+--- a/av_log.c
++++ b/av_log.c
+@@ -57,10 +57,10 @@ static int extract_msg_type_from_ctx(void *ptr)
+ if (!strcmp(avc->class_name, "AVCodecContext")) {
+ AVCodecContext *s = ptr;
+ if (s->codec) {
+- if (s->codec->type == CODEC_TYPE_AUDIO) {
++ if (s->codec->type == AVMEDIA_TYPE_AUDIO) {
+ if (s->codec->decode)
+ return MSGT_DECAUDIO;
+- } else if (s->codec->type == CODEC_TYPE_VIDEO) {
++ } else if (s->codec->type == AVMEDIA_TYPE_VIDEO) {
+ if (s->codec->decode)
+ return MSGT_DECVIDEO;
+ }
+diff --git a/av_opts.c b/av_opts.c
+index 452253b..59f47ed 100644
+--- a/av_opts.c
++++ b/av_opts.c
+@@ -37,7 +37,7 @@ int parse_avopts(void *v, char *str){
+ arg = strchr(str, '=');
+ if(arg) *arg++= 0;
+
+- if(!av_set_string(v, str, arg)){
++ if (av_set_string3(v, str, arg, 0, NULL) < 0) {
+ free(start);
+ return -1;
+ }
+diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
+index ec6a2f7..8f56e71 100644
+--- a/libmpcodecs/ad_ffmpeg.c
++++ b/libmpcodecs/ad_ffmpeg.c
+@@ -127,7 +127,7 @@ static int init(sh_audio_t *sh_audio)
+ }
+ lavc_context->request_channels = opts->audio_output_channels;
+ lavc_context->codec_tag = sh_audio->format; //FOURCC
+- lavc_context->codec_type = CODEC_TYPE_AUDIO;
++ lavc_context->codec_type = AVMEDIA_TYPE_AUDIO;
+ lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
+
+ /* alloc extra data */
+diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
+index 2424dda..431b5cd 100644
+--- a/libmpcodecs/vd_ffmpeg.c
++++ b/libmpcodecs/vd_ffmpeg.c
+@@ -208,7 +208,7 @@ static int init(sh_video_t *sh){
+ ctx->avctx = avcodec_alloc_context();
+ avctx = ctx->avctx;
+ avctx->opaque = sh;
+- avctx->codec_type = CODEC_TYPE_VIDEO;
++ avctx->codec_type = AVMEDIA_TYPE_VIDEO;
+ avctx->codec_id = lavc_codec->id;
+
+ if (lavc_codec->capabilities & CODEC_CAP_HWACCEL // XvMC
+@@ -541,14 +541,12 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
+ type = MP_IMGTYPE_STATIC;
+ flags |= MP_IMGFLAG_PRESERVE;
+ }
+- flags|=(!avctx->hurry_up && ctx->do_slices) ?
+- MP_IMGFLAG_DRAW_CALLBACK:0;
++ flags |= ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0;
+ mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type == MP_IMGTYPE_STATIC ? "using STATIC\n" : "using TEMP\n");
+ } else {
+ if(!pic->reference){
+ ctx->b_count++;
+- flags|=(!avctx->hurry_up && ctx->do_slices) ?
+- MP_IMGFLAG_DRAW_CALLBACK:0;
++ flags |= ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK:0;
+ }else{
+ ctx->ip_count++;
+ flags|= MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE
+@@ -787,7 +785,7 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len,
+ pkt.data = data;
+ pkt.size = len;
+ // HACK: make PNGs decode normally instead of as CorePNG delta frames
+- pkt.flags = PKT_FLAG_KEY;
++ pkt.flags = AV_PKT_FLAG_KEY;
+ // The avcodec opaque field stupidly supports only int64_t type
+ *(double *)&avctx->reordered_opaque = *reordered_pts;
+ ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt);
+diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c
+index ed855d1..68a9cf7 100644
+--- a/libmpcodecs/vf_geq.c
++++ b/libmpcodecs/vf_geq.c
+@@ -116,7 +116,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
+ const_values[3]=y;
+ for(x=0; x<w; x++){
+ const_values[2]=x;
+- dst[x + y * dst_stride] = av_eval_expr(vf->priv->e[plane],
++ dst[x + y * dst_stride] = av_expr_eval(vf->priv->e[plane],
+ const_values, vf);
+ }
+ }
+@@ -176,7 +176,7 @@ static int vf_open(vf_instance_t *vf, char *args){
+ plane==0 ? lum : (plane==1 ? cb : cr),
+ NULL
+ };
+- res = av_parse_expr(&vf->priv->e[plane], eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL);
++ res = av_expr_parse(&vf->priv->e[plane], eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL);
+
+ if (res < 0) {
+ mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]);
+diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c
+index f3dc4d9..10c4edf 100644
+--- a/libmpcodecs/vf_pp.c
++++ b/libmpcodecs/vf_pp.c
+@@ -37,7 +37,7 @@
+
+ struct vf_priv_s {
+ int pp;
+- pp_mode_t *ppMode[PP_QUALITY_MAX+1];
++ pp_mode *ppMode[PP_QUALITY_MAX+1];
+ void *context;
+ unsigned int outfmt;
+ };
+diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
+index 3aca4b6..0c5b6da 100644
+--- a/libmpdemux/demux_lavf.c
++++ b/libmpdemux/demux_lavf.c
+@@ -289,7 +289,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
+ codec->codec_tag = override_tag;
+
+ switch(codec->codec_type){
+- case CODEC_TYPE_AUDIO:{
++ case AVMEDIA_TYPE_AUDIO:{
+ WAVEFORMATEX *wf;
+ sh_audio_t* sh_audio;
+ sh_audio = new_sh_audio_aid(demuxer, i, priv->audio_streams);
+@@ -361,7 +361,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
+ stream_id = priv->audio_streams++;
+ break;
+ }
+- case CODEC_TYPE_VIDEO:{
++ case AVMEDIA_TYPE_VIDEO:{
+ sh_video_t* sh_video;
+ BITMAPINFOHEADER *bih;
+ sh_video=new_sh_video_vid(demuxer, i, priv->video_streams);
+@@ -433,7 +433,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
+ stream_id = priv->video_streams++;
+ break;
+ }
+- case CODEC_TYPE_SUBTITLE:{
++ case AVMEDIA_TYPE_SUBTITLE:{
+ sh_sub_t* sh_sub;
+ char type;
+ /* only support text subtitles for now */
+@@ -476,9 +476,12 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
+ stream_id = priv->sub_streams++;
+ break;
+ }
+- case CODEC_TYPE_ATTACHMENT:{
++ case AVMEDIA_TYPE_ATTACHMENT:{
++ AVMetadataTag *ftag = av_metadata_get(st->metadata, "filename",
++ NULL, 0);
++ char *filename = ftag ? ftag->value : NULL;
+ if (st->codec->codec_id == CODEC_ID_TTF)
+- demuxer_add_attachment(demuxer, BSTR(st->filename),
++ demuxer_add_attachment(demuxer, BSTR(filename),
+ BSTR("application/x-truetype-font"),
+ (struct bstr){codec->extradata,
+ codec->extradata_size});
+@@ -755,14 +758,14 @@ static int demux_lavf_fill_buffer(demuxer_t *demux, demux_stream_t *dsds){
+ if(ts != AV_NOPTS_VALUE){
+ dp->pts = ts * av_q2d(priv->avfc->streams[id]->time_base);
+ priv->last_pts= dp->pts * AV_TIME_BASE;
+- // always set duration for subtitles, even if PKT_FLAG_KEY is not set,
++ // always set duration for subtitles, even if AV_PKT_FLAG_KEY isn't set,
+ // otherwise they will stay on screen to long if e.g. ASS is demuxed from mkv
+- if((ds == demux->sub || (pkt.flags & PKT_FLAG_KEY)) &&
++ if ((ds == demux->sub || (pkt.flags & AV_PKT_FLAG_KEY)) &&
+ pkt.convergence_duration > 0)
+ dp->duration = pkt.convergence_duration * av_q2d(priv->avfc->streams[id]->time_base);
+ }
+ dp->pos=demux->filepos;
+- dp->flags= !!(pkt.flags&PKT_FLAG_KEY);
++ dp->flags = !!(pkt.flags & AV_PKT_FLAG_KEY);
+ // append packet to DS stream:
+ ds_add_packet(ds,dp);
+ return 1;
+@@ -922,15 +925,15 @@ redo:
+ {
+ switch(priv->avfc->streams[program->stream_index[i]]->codec->codec_type)
+ {
+- case CODEC_TYPE_VIDEO:
++ case AVMEDIA_TYPE_VIDEO:
+ if(prog->vid == -2)
+ prog->vid = program->stream_index[i];
+ break;
+- case CODEC_TYPE_AUDIO:
++ case AVMEDIA_TYPE_AUDIO:
+ if(prog->aid == -2)
+ prog->aid = program->stream_index[i];
+ break;
+- case CODEC_TYPE_SUBTITLE:
++ case AVMEDIA_TYPE_SUBTITLE:
+ if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT)
+ prog->sid = program->stream_index[i];
+ break;
+--
+cgit v0.9
diff --git a/testing/mplayer2/mplayer-gcc-4.6-audio-fix.patch b/testing/mplayer2/mplayer-gcc-4.6-audio-fix.patch
new file mode 100644
index 000000000..148856c23
--- /dev/null
+++ b/testing/mplayer2/mplayer-gcc-4.6-audio-fix.patch
@@ -0,0 +1,22 @@
+Fix broken audio decoding when compiling with gcc-4.6
+http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2011-May/068495.html
+
+--- ./mp3lib/dct64_sse.c.orig
++++ ./mp3lib/dct64_sse.c
+@@ -113,7 +113,6 @@
+ }
+
+ {
+- real *costab = costab_mmx + 24;
+ int i;
+
+ __asm__(
+@@ -122,7 +121,7 @@
+ "movaps %1, %%xmm5\n\t"
+ "movaps %%xmm5, %%xmm6\n\t"
+ :
+- :"m"(*costab), "m"(*nnnn)
++ :"m"(costab_mmx[24]), "m"(*nnnn)
+ );
+
+ for (i = 0; i < 0x20; i += 8)
diff --git a/testing/mtr/APKBUILD b/testing/mtr/APKBUILD
new file mode 100644
index 000000000..d2c155906
--- /dev/null
+++ b/testing/mtr/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: John Keith Hohm <john@hohm.net>
+# Maintainer:
+pkgname=mtr
+pkgver=0.80
+pkgrel=0
+pkgdesc="Full screen ncurses traceroute tool"
+url="http://www.bitwizard.nl/mtr/"
+arch="all"
+license="GPL"
+depends="ncurses"
+depends_dev="ncurses-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.bitwizard.nl/$pkgname/$pkgname-$pkgver.tar.gz
+ mtr-res_mkquery.patch
+ "
+
+_builddir="src/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --without-gtk \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="fa68528eaec1757f52bacf9fea8c68a9 mtr-0.80.tar.gz
+f5982bdacddd8c1ea26d578b62bf810c mtr-res_mkquery.patch"
diff --git a/testing/mtr/mtr-res_mkquery.patch b/testing/mtr/mtr-res_mkquery.patch
new file mode 100644
index 000000000..c761e97e0
--- /dev/null
+++ b/testing/mtr/mtr-res_mkquery.patch
@@ -0,0 +1,374 @@
+--- a/mtr-0.80/configure
++++ b/mtr-0.80/configure
+@@ -7165,317 +7165,6 @@
+
+ # AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
+
+-{ echo "$as_me:$LINENO: checking for res_mkquery" >&5
+-echo $ECHO_N "checking for res_mkquery... $ECHO_C" >&6; }
+-if test "${ac_cv_func_res_mkquery+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-/* Define res_mkquery to an innocuous variant, in case <limits.h> declares res_mkquery.
+- For example, HP-UX 11i <limits.h> declares gettimeofday. */
+-#define res_mkquery innocuous_res_mkquery
+-
+-/* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char res_mkquery (); below.
+- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+- <limits.h> exists even on freestanding compilers. */
+-
+-#ifdef __STDC__
+-# include <limits.h>
+-#else
+-# include <assert.h>
+-#endif
+-
+-#undef res_mkquery
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char res_mkquery ();
+-/* The GNU C library defines this for functions which it implements
+- to always fail with ENOSYS. Some functions are actually named
+- something starting with __ and the normal name is an alias. */
+-#if defined __stub_res_mkquery || defined __stub___res_mkquery
+-choke me
+-#endif
+-
+-int
+-main ()
+-{
+-return res_mkquery ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && {
+- test -z "$ac_c_werror_flag" ||
+- test ! -s conftest.err
+- } && test -s conftest$ac_exeext &&
+- $as_test_x conftest$ac_exeext; then
+- ac_cv_func_res_mkquery=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_cv_func_res_mkquery=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+- conftest$ac_exeext conftest.$ac_ext
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_func_res_mkquery" >&5
+-echo "${ECHO_T}$ac_cv_func_res_mkquery" >&6; }
+-if test $ac_cv_func_res_mkquery = yes; then
+- :
+-else
+-
+-{ echo "$as_me:$LINENO: checking for res_mkquery in -lbind" >&5
+-echo $ECHO_N "checking for res_mkquery in -lbind... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_bind_res_mkquery+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lbind $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char res_mkquery ();
+-int
+-main ()
+-{
+-return res_mkquery ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && {
+- test -z "$ac_c_werror_flag" ||
+- test ! -s conftest.err
+- } && test -s conftest$ac_exeext &&
+- $as_test_x conftest$ac_exeext; then
+- ac_cv_lib_bind_res_mkquery=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_cv_lib_bind_res_mkquery=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_res_mkquery" >&5
+-echo "${ECHO_T}$ac_cv_lib_bind_res_mkquery" >&6; }
+-if test $ac_cv_lib_bind_res_mkquery = yes; then
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBBIND 1
+-_ACEOF
+-
+- LIBS="-lbind $LIBS"
+-
+-else
+-
+-{ echo "$as_me:$LINENO: checking for res_mkquery in -lresolv" >&5
+-echo $ECHO_N "checking for res_mkquery in -lresolv... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_resolv_res_mkquery+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char res_mkquery ();
+-int
+-main ()
+-{
+-return res_mkquery ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && {
+- test -z "$ac_c_werror_flag" ||
+- test ! -s conftest.err
+- } && test -s conftest$ac_exeext &&
+- $as_test_x conftest$ac_exeext; then
+- ac_cv_lib_resolv_res_mkquery=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_cv_lib_resolv_res_mkquery=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_mkquery" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv_res_mkquery" >&6; }
+-if test $ac_cv_lib_resolv_res_mkquery = yes; then
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
+-_ACEOF
+-
+- LIBS="-lresolv $LIBS"
+-
+-else
+-
+-{ echo "$as_me:$LINENO: checking for __res_mkquery in -lresolv" >&5
+-echo $ECHO_N "checking for __res_mkquery in -lresolv... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_resolv___res_mkquery+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lresolv $LIBS"
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-/* Override any GCC internal prototype to avoid an error.
+- Use char because int might match the return type of a GCC
+- builtin and then its argument prototype would still apply. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-char __res_mkquery ();
+-int
+-main ()
+-{
+-return __res_mkquery ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+- (eval "$ac_link") 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && {
+- test -z "$ac_c_werror_flag" ||
+- test ! -s conftest.err
+- } && test -s conftest$ac_exeext &&
+- $as_test_x conftest$ac_exeext; then
+- ac_cv_lib_resolv___res_mkquery=yes
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+- ac_cv_lib_resolv___res_mkquery=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+- conftest$ac_exeext conftest.$ac_ext
+-LIBS=$ac_check_lib_save_LIBS
+-fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_mkquery" >&5
+-echo "${ECHO_T}$ac_cv_lib_resolv___res_mkquery" >&6; }
+-if test $ac_cv_lib_resolv___res_mkquery = yes; then
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRESOLV 1
+-_ACEOF
+-
+- LIBS="-lresolv $LIBS"
+-
+-else
+- { { echo "$as_me:$LINENO: error: No resolver library found" >&5
+-echo "$as_me: error: No resolver library found" >&2;}
+- { (exit 1); exit 1; }; }
+-fi
+-
+-fi
+-
+-fi
+-
+-fi
+-
+-# This next line would override the just detected-or-not -lresolv.
+-# This apparently hurts BSD. And it's bad practise. So it should go.
+-# However, it probably didn't get added for nothing..... Holler if
+-# removing it hurts your OS.... -- REW
+-#LIBS="$LIBS -lresolv"
+-
+ { echo "$as_me:$LINENO: checking for herror" >&5
+ echo $ECHO_N "checking for herror... $ECHO_C" >&6; }
+ if test "${ac_cv_func_herror+set}" = set; then
+--- a/mtr-0.80/dns.c
++++ b/mtr-0.80/dns.c
+@@ -881,6 +881,51 @@
+ }
+
+
++ /* res_mkquery from dietlibc libcruft http://www.fefe.de/dietlibc/ */
++
++static char dnspacket[]="\xfe\xfe\001\000\000\001\000\000\000\000\000\000";
++
++static int res_mkquery(int op, const char *dname, int class, int type, char* data,
++ int datalen, const unsigned char* newrr, char* buf, int buflen) {
++ unsigned char packet[512];
++ unsigned long len;
++
++ memcpy(packet,dnspacket,12);
++ len=rand();
++ packet[0]=len;
++ packet[1]=len>>8;
++ len=0;
++ if ((_res.options&RES_RECURSE)==0) packet[2]=0;
++ {
++ unsigned char* x;
++ const char* y,* tmp;
++ x=packet+12; y=dname;
++ while (*y) {
++ while (*y=='.') ++y;
++ for (tmp=y; *tmp && *tmp!='.'; ++tmp) ;
++ if (tmp-y > 63) return -1;
++ *x=tmp-y;
++ if (!(tmp-y)) break;
++ if ((len+=*x+1) > 254) return -1;
++ ++x;
++ memmove(x,y,tmp-y);
++ x+=tmp-y;
++ if (!*tmp) {
++ *x=0;
++ break;
++ }
++ y=tmp;
++ }
++ *++x= 0; *++x= type; /* A */
++ *++x= 0; *++x= class; /* IN */
++ ++x;
++ if (x-packet>buflen) return -1;
++ memmove(buf,packet,x-packet);
++ return x-packet;
++ }
++}
++
++
+ void dorequest(char *s,int type,word id)
+ {
+ packetheader *hp;
diff --git a/testing/multisort/APKBUILD b/testing/multisort/APKBUILD
new file mode 100644
index 000000000..148d37bf6
--- /dev/null
+++ b/testing/multisort/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Timo TerÃs <timo.teras@iki.fi>
+# Maintainer: Timo TerÃs <timo.teras@iki.fi>
+pkgname=multisort
+pkgver=1.1
+pkgrel=0
+pkgdesc="tool to merge multiple logfiles"
+url="http://www.xach.com/multisort/"
+arch="all"
+license="GPL-2"
+depends=
+makedepends=""
+install=""
+source="http://www.xach.com/$pkgname/$pkgname-$pkgver.tar.gz
+ multisort-syslog-support.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d "$pkgdir/usr/bin/"
+ install -s "$_builddir/multisort" "$pkgdir/usr/bin/"
+}
+
+md5sums="c47f7622773022119e1ea21d2b211bd3 multisort-1.1.tar.gz
+39bf33a771606904b0f7645006a52056 multisort-syslog-support.patch"
diff --git a/testing/multisort/multisort-syslog-support.patch b/testing/multisort/multisort-syslog-support.patch
new file mode 100644
index 000000000..4e934127c
--- /dev/null
+++ b/testing/multisort/multisort-syslog-support.patch
@@ -0,0 +1,286 @@
+diff -ru multisort-1.1/multisort.c multisort-1.1-tt//multisort.c
+--- multisort-1.1/multisort.c 1999-10-28 22:12:36.000000000 +0300
++++ multisort-1.1-tt//multisort.c 2011-04-07 15:25:06.000000000 +0300
+@@ -1,7 +1,6 @@
+ /***********************************************************************
+ *
+- * multisort - sort multiple Common Log Format files into a single,
+- * date-ordered file
++ * multisort - merge multiple sorted log files together
+ *
+ * $Id: multisort.c,v 1.7 1999/10/28 19:11:48 xach Exp $
+ *
+@@ -11,6 +10,11 @@
+ *
+ * - Fixed some potential segfaults by checking the return values
+ * of various functions.
++ *
++ * Modifications by Timo Teräs <timo.teras@iki.fi>
++ * - Support syslog format in addition to common log format
++ * - Some speed improvements
++ *
+ *
+ * Zachary Beane <xach@mint.net>
+ *
+@@ -42,7 +46,7 @@
+ int enabled;
+ char *name;
+ FILE *in_fh;
+- long atime;
++ unsigned long atime;
+ char buf[BUFSIZ + 1];
+ };
+
+@@ -148,7 +152,7 @@
+ {
+ register const char *s = wordlist[key].name;
+
+- if (*str == *s && !strcmp (str + 1, s + 1))
++ if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
+ return &wordlist[key];
+ }
+ }
+@@ -174,6 +178,19 @@
+ #endif
+
+
++static int
++get_int(const char *s, int len)
++{
++ int val = 0, i;
++
++ for (i = 0; i < len; i++) {
++ if (s[i] >= '0' && s[i] <= '9')
++ val = (val * 10) + s[i] - '0';
++ }
++ return val;
++
++}
++
+ /* conv_time
+ * Take a common log format string and return a sortable value. Use a hash
+ * table for month lookup.
+@@ -182,92 +199,89 @@
+ * return values and string lengths and such. Lazy bastard.
+ *
+ */
+-
+-long
+-conv_time(char *s)
++
++unsigned long
++convert_time_common_log_file(const char *s)
+ {
+- char *ptr;
+- char *orig_ptr;
+- int year;
+- int mon;
+- int mday;
+- int hour;
+- int min;
+- int sec;
++ /* 127.198.54.33 - - [14/Jan/1999:13:54:37 -0500] "GET /mint/images/top_maindesigns_on.jpg HTTP/1.0" 200 7164 */
++ const char *ptr;
++ int year, mon, day;
++ int hour, min, sec;
+ struct month *m;
+
+- ptr = s;
+- ptr = strchr(ptr, '[');
+-
++ ptr = strchr(s, '[');
+ if (ptr == NULL)
+ return 0;
+
+- ptr++; /* skip the bracket */
++ /* skip the bracket */
++ ptr++;
+
+- if (strlen(ptr) < 21)
++ /* too short string? */
++ if (memchr(ptr, 0, 21) != NULL)
+ return 0;
+
+- orig_ptr = ptr;
+- ptr[2] = '\0';
+- ptr[6] = '\0';
+- ptr[11] = '\0';
+- ptr[14] = '\0';
+- ptr[17] = '\0';
+- ptr[20] = '\0';
+-
+- mday = atoi(ptr);
+-
+- ptr += 3;
+- m = in_word_set(ptr, 3);
+- if (m == NULL) {
++ m = in_word_set(&ptr[3], 3);
++ if (m == NULL)
+ return 0;
+- } else {
+- mon = m->pos;
+- }
+-
+-
+- ptr += 4;
+- year = atoi(ptr) - 1990;
+-
+- ptr += 5;
+- hour = atoi(ptr);
+
+- ptr += 3;
+- min = atoi(ptr);
+-
+- ptr += 3;
+- sec = atoi(ptr);
+-
+- /* Restore the characters to their original state (this saves us a
+- strdup!) Yay. */
+-
+- ptr = orig_ptr;
+- ptr[2] = '/';
+- ptr[6] = '/';
+- ptr[11] = ':';
+- ptr[14] = ':';
+- ptr[17] = ':';
+- ptr[20] = ' ';
++ mon = m->pos;
++ day = get_int(&ptr[0], 2);
++ year = get_int(&ptr[7], 4) - 1990;
++ hour = get_int(&ptr[12], 2);
++ min = get_int(&ptr[15], 2);
++ sec = get_int(&ptr[18], 2);
+
+ return((year * 31104000)
+ + (mon * 2592000)
+- + (mday * 86400)
++ + (day * 86400)
+ + (hour * 3600)
+ + (min * 60)
+ + sec);
+ }
+
++unsigned long
++convert_time_syslog_file(const char *s)
++{
++ /* Apr 7 02:00:14 blah blah */
++ int mon, day, hour, min, sec;
++ struct month *m;
++
++ /* Too short string? */
++ if (memchr(s, 0, 15) != NULL)
++ return 0;
++
++ m = in_word_set(&s[0], 3);
++ if (m == NULL)
++ return 0;
++
++ mon = m->pos;
++ day = get_int(&s[4], 2);
++ hour = get_int(&s[7], 2);
++ min = get_int(&s[10], 2);
++ sec = get_int(&s[13], 2);
++
++ return((mon * 2592000)
++ + (day * 86400)
++ + (hour * 3600)
++ + (min * 60)
++ + sec);
++}
++
+
+ void
+ usage(void)
+ {
+- fprintf(stderr, "usage: multisort LOGFILE1 LOGFILE2 [LOGFILEn ...]\n");
+- fprintf(stderr, "\n");
+- fprintf(stderr, "multisort 1.1 Copyright (C) 1999 Zachary Beane\n");
+- fprintf(stderr, "This program has NO WARRANTY and is licensed "
++ fprintf(stderr, "usage: multisort [-format] LOGFILE1 LOGFILE2 [LOGFILEn ...]\n"
++ "\n"
++ "multisort 1.1 Copyright (C) 1999 Zachary Beane\n"
++ "This program has NO WARRANTY and is licensed "
+ "under the terms of the\nGNU General Public License.\n"
+- "http://www.xach.com/multisort/ - bugs to xach@mint.net\n");
+-
++ "http://www.xach.com/multisort/ - bugs to xach@mint.net\n"
++ "\n"
++ "Supported formats currently:\n"
++ " -clf Common Log Format (default)\n"
++ " -syslog Syslog Format\n"
++ );
+ exit(1);
+ }
+
+@@ -279,9 +293,10 @@
+ int if_count = 0; /* number of total input files */
+ int if_nr = 0; /* number of active input files */
+ char *ret = NULL;
+- long min_time = 0;
++ unsigned long min_time = 0;
+ int min_index = 0;
+ int i, j;
++ unsigned long (*conv_time)(const char *s);
+
+ if (argc < 3) {
+ usage();
+@@ -295,7 +310,19 @@
+ }
+
+ /* Open up all the files */
+- for (i = 1, j = 0; i < argc; i++, j++) {
++ conv_time = convert_time_common_log_file;
++ i = 1;
++ if (argv[i][0] == '-') {
++ if (strcmp(argv[i], "-clf") == 0)
++ conv_time = convert_time_common_log_file;
++ else if (strcmp(argv[i], "-syslog") == 0)
++ conv_time = convert_time_syslog_file;
++ else
++ usage();
++ i++;
++ }
++
++ for (j = 0; i < argc; i++, j++) {
+ if_list[j] = (InputFile *)malloc(sizeof(InputFile));
+ if (if_list[j] == NULL) {
+ perror("malloc");
+@@ -319,19 +346,18 @@
+ if_list[j]->name);
+ exit(1);
+ }
+-
++ if_list[j]->atime = conv_time(if_list[j]->buf);
+ }
+
+ if_count = if_nr = j;
+
+ while (if_nr) {
+ min_index = 0;
+- min_time = 900000000L;
++ min_time = (unsigned long) -1;
+ for (i = 0; i < if_count; i++) {
+ if (!if_list[i]->enabled)
+ continue;
+
+- if_list[i]->atime = conv_time(if_list[i]->buf);
+ if (if_list[i]->atime < min_time) {
+ min_time = if_list[i]->atime;
+ min_index = i;
+@@ -345,7 +371,9 @@
+ /* refill the buffer */
+ ret = fgets(if_list[min_index]->buf, BUFSIZ,
+ if_list[min_index]->in_fh);
+- if (ret == NULL) {
++ if (ret != NULL) {
++ if_list[min_index]->atime = conv_time(if_list[min_index]->buf);
++ } else {
+ if_list[min_index]->enabled = 0;
+ fclose(if_list[min_index]->in_fh);
+ if_nr--;
+@@ -355,5 +383,3 @@
+ exit(0);
+ }
+
+-
+-
diff --git a/testing/multitail/APKBUILD b/testing/multitail/APKBUILD
new file mode 100644
index 000000000..3ce502f1f
--- /dev/null
+++ b/testing/multitail/APKBUILD
@@ -0,0 +1,26 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=multitail
+pkgver=5.2.6
+pkgrel=0
+pkgdesc="MultiTail lets you view one or multiple files like the original tail program"
+arch="x86 x86_64"
+url="http://www.vanheusden.com/multitail"
+license="GPL"
+depends="ncurses"
+makedepends="ncurses-dev libexecinfo"
+install=
+subpackages=""
+source="http://www.vanheusden.com/multitail/$pkgname-$pkgver.tgz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+package() {
+ cd $_builddir
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/usr/share/man/man1
+ mkdir -p "$pkgdir"/etc
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="6496b3d78660ff8d11c743a0d03cca34 multitail-5.2.6.tgz"
diff --git a/testing/mupdf/APKBUILD b/testing/mupdf/APKBUILD
new file mode 100644
index 000000000..aac11070a
--- /dev/null
+++ b/testing/mupdf/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
+pkgname=mupdf
+pkgver=0.8.165
+pkgrel=0
+pkgdesc="a lightweight PDF and XPS viewer"
+url="http://mupdf.com"
+arch="x86 x86_64"
+license="GPLv3"
+depends=""
+makedepends="pkgconfig freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev openjpeg-dev"
+install=""
+subpackages="$pkgname-doc"
+source="
+ http://$pkgname.googlecode.com/files/$pkgname-$pkgver-source.tar.gz
+ destdir.patch"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make prefix=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make prefix=/usr DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="a95813737924e60d87a944d52b6a5120 mupdf-0.8.165-source.tar.gz
+08c8b77b80544abc65160e4b77f6f328 destdir.patch"
diff --git a/testing/mupdf/destdir.patch b/testing/mupdf/destdir.patch
new file mode 100644
index 000000000..58c863b6b
--- /dev/null
+++ b/testing/mupdf/destdir.patch
@@ -0,0 +1,19 @@
+--- a/Makefile
++++ b/Makefile
+@@ -144,11 +144,11 @@
+ mandir ?= $(prefix)/share/man
+
+ install: $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(APPS)
+- install -d $(bindir) $(libdir) $(incdir) $(mandir)/man1
+- install $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(libdir)
+- install fitz/fitz.h pdf/mupdf.h xps/muxps.h $(incdir)
+- install $(PDF_APPS) $(XPS_APPS) $(MUPDF) $(bindir)
+- install $(wildcard apps/man/*.1) $(mandir)/man1
++ install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(incdir) $(DESTDIR)/$(mandir)/man1
++ install $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(DESTDIR)/$(libdir)
++ install fitz/fitz.h pdf/mupdf.h xps/muxps.h $(DESTDIR)/$(incdir)
++ install $(PDF_APPS) $(XPS_APPS) $(MUPDF) $(DESTDIR)/$(bindir)
++ install $(wildcard apps/man/*.1) $(DESTDIR)/$(mandir)/man1
+
+ # --- Clean and Default ---
+
diff --git a/testing/mutagen/APKBUILD b/testing/mutagen/APKBUILD
new file mode 100644
index 000000000..bb918fa98
--- /dev/null
+++ b/testing/mutagen/APKBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mutagen
+pkgver=1.20
+pkgrel=2
+pkgdesc="An audio metadata tag reader and writer implemented in pure python"
+url="http://code.google.com/p/mutagen/"
+arch="noarch"
+license="GPL2"
+depends="python py-mutagen"
+makedepends="python-dev"
+subpackages="$pkgname-doc py-$pkgname:py"
+source="http://mutagen.googlecode.com/files/mutagen-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+
+py() {
+ pkgdesc="Python library for mutagen"
+ depends="python"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+md5sums="adb16d9f6056bc864a5c86c6f885af79 mutagen-1.20.tar.gz"
diff --git a/testing/mutter/APKBUILD b/testing/mutter/APKBUILD
new file mode 100644
index 000000000..d11454b56
--- /dev/null
+++ b/testing/mutter/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=mutter
+pkgver=2.31.5
+pkgrel=4
+pkgdesc="clutter-based window manager for GNOME"
+url="http://www.gnome.org/"
+arch="all"
+license="GPL"
+depends="zenity"
+depends_dev="clutter-dev libcanberra-dev gconf-dev startup-notification-dev python-dev"
+makedepends="$depends_dev gobject-introspection-dev intltool gnome-doc-utils"
+install="$pkgname.pre-deinstall $pkgname.post-install $pkgname.post-upgrade"
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2
+ mutter-gtk2.patch"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="0bec58091d4a3b1df6d5d6c05a1dd7cd mutter-2.31.5.tar.bz2
+e2f03d7771bf45069f2fba0af8f6b57d mutter-gtk2.patch"
diff --git a/testing/mutter/mutter-gtk2.patch b/testing/mutter/mutter-gtk2.patch
new file mode 100644
index 000000000..70f7c6fd2
--- /dev/null
+++ b/testing/mutter/mutter-gtk2.patch
@@ -0,0 +1,82 @@
+--- mutter-2.31.5.orig/src/ui/frames.c
++++ mutter-2.31.5/src/ui/frames.c
+@@ -2004,47 +2004,26 @@
+ return TRUE;
+ }
+
+-/* Cut and paste from GDK */
+-static GdkGC *
+-get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
++static void
++setup_bg_cr (cairo_t *cr, GdkWindow *window, int x_offset, int y_offset)
+ {
+ GdkWindow *parent = gdk_window_get_parent (window);
+- GdkPixmap *back_pixmap;
+- gboolean parent_relative;
+- guint gc_mask = 0;
+- GdkGCValues gc_values;
++ cairo_pattern_t *bg_pattern;
+
+- gdk_window_get_back_pixmap (window, &back_pixmap, &parent_relative);
+- if (parent_relative && parent)
++ bg_pattern = gdk_window_get_background_pattern (window);
++ if (bg_pattern == NULL && parent)
+ {
+ gint window_x, window_y;
+
+ gdk_window_get_position (window, &window_x, &window_y);
+- return get_bg_gc (parent,
+- x_offset + window_x,
+- y_offset + window_y);
++ setup_bg_cr (cr, parent, x_offset + window_x, y_offset + window_y);
+ }
+- else if (back_pixmap)
++ else if (bg_pattern)
+ {
+- gc_values.fill = GDK_TILED;
+- gc_values.tile = back_pixmap;
+- gc_values.ts_x_origin = x_offset;
+- gc_values.ts_y_origin = y_offset;
+-
+- gc_mask = GDK_GC_FILL | GDK_GC_TILE | GDK_GC_TS_X_ORIGIN | GDK_GC_TS_Y_ORIGIN;
+-
+- return gdk_gc_new_with_values (window, &gc_values, gc_mask);
++ cairo_translate (cr, - x_offset, - y_offset);
++ cairo_set_source (cr, bg_pattern);
++ cairo_translate (cr, x_offset, y_offset);
+ }
+- else
+- {
+- GdkColor bg_color;
+- GdkGC *gc = gdk_gc_new (window);
+-
+- gdk_window_get_background (window, &bg_color);
+- gdk_gc_set_foreground (gc, &bg_color);
+-
+- return gc;
+- }
+ }
+
+ static void
+@@ -2052,12 +2031,16 @@
+ GdkWindow *window,
+ int xoffset, int yoffset)
+ {
+- GdkGC *tmp_gc = get_bg_gc (window, xoffset, yoffset);
++ int width, height;
++ cairo_t *cr = gdk_cairo_create (pixmap);
+
+- gdk_draw_rectangle (pixmap, tmp_gc, TRUE,
+- 0, 0, -1, -1);
+-
+- g_object_unref (tmp_gc);
++ setup_bg_cr (cr, window, xoffset, yoffset);
++
++ gdk_drawable_get_size (GDK_DRAWABLE (pixmap), &width, &height);
++ cairo_rectangle (cr, 0, 0, width, height);
++ cairo_fill (cr);
++
++ cairo_destroy (cr);
+ }
+
+ /* Returns a pixmap with a piece of the windows frame painted on it.
diff --git a/testing/mutter/mutter.post-install b/testing/mutter/mutter.post-install
new file mode 100644
index 000000000..fdaf4e4f4
--- /dev/null
+++ b/testing/mutter/mutter.post-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in mutter.schemas; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/mutter/mutter.post-upgrade b/testing/mutter/mutter.post-upgrade
new file mode 100644
index 000000000..fdaf4e4f4
--- /dev/null
+++ b/testing/mutter/mutter.post-upgrade
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in mutter.schemas; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/mutter/mutter.pre-deinstall b/testing/mutter/mutter.pre-deinstall
new file mode 100644
index 000000000..6ec3c545d
--- /dev/null
+++ b/testing/mutter/mutter.pre-deinstall
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in mutter.schemas; do
+ echo "Uninstalling GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/mytop/APKBUILD b/testing/mytop/APKBUILD
new file mode 100644
index 000000000..22191b6cb
--- /dev/null
+++ b/testing/mytop/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=mytop
+pkgver=1.6
+pkgrel=0
+pkgdesc="A top clone for MySQL"
+url="http://jeremy.zawodny.com/mysql/mytop/"
+arch="noarch"
+license="GPL2"
+depends="perl perl-term-readkey perl-dbd-mysql"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://jeremy.zawodny.com/mysql/mytop/${pkgname}-${pkgver}.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ sed -i 's#"long|!"#"long!"#' $pkgname || return 1
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make && make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="4127c3e486eb664fed60f40849372a9f mytop-1.6.tar.gz"
diff --git a/testing/nbtscan/APKBUILD b/testing/nbtscan/APKBUILD
new file mode 100644
index 000000000..564ae27b3
--- /dev/null
+++ b/testing/nbtscan/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=nbtscan
+pkgver=1.5.1
+pkgrel=0
+pkgdesc="A NetBIOS name network scanner"
+url="http://www.inetcat.net/software/nbtscan.html"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.inetcat.net/software/$pkgname-$pkgver.tar.gz
+ $pkgname-$pkgver-makefile.patch"
+_builddir="$srcdir"/$pkgname-"$pkgver"a
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="85bb085077c380b82a6ff73e0de0c154 nbtscan-1.5.1.tar.gz
+513430ac89e76bfdb2fd9f8bfce4cca2 nbtscan-1.5.1-makefile.patch"
diff --git a/testing/nbtscan/nbtscan-1.5.1-makefile.patch b/testing/nbtscan/nbtscan-1.5.1-makefile.patch
new file mode 100644
index 000000000..300f2a6ae
--- /dev/null
+++ b/testing/nbtscan/nbtscan-1.5.1-makefile.patch
@@ -0,0 +1,20 @@
+--- nbtscan-1.5.1a/Makefile.in.orig
++++ nbtscan-1.5.1a/Makefile.in
+@@ -5,6 +5,7 @@
+ OBJECTS=nbtscan.o statusq.o range.o list.o
+ DEFS=@DEFS@
+ TARGET=@TARGET@
++DESTDIR=
+
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+@@ -14,7 +15,8 @@
+ $(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
+
+ install:
+- $(INSTALL) $(TARGET) $(BINDIR)/$(TARGET)
++ mkdir -p $(DESTDIR)$(BINDIR)
++ $(INSTALL) $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
+
+ nbtscan.o: nbtscan.c statusq.h range.h list.h
+ $(CC) $(CFLAGS) $(DEFS) -c nbtscan.c
diff --git a/testing/ncdu/APKBUILD b/testing/ncdu/APKBUILD
new file mode 100644
index 000000000..a00cbe0b6
--- /dev/null
+++ b/testing/ncdu/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=ncdu
+pkgver=1.7
+pkgrel=0
+pkgdesc="Text-based disk usage viewer"
+url="http://dev.yorhel.nl/ncdu"
+arch="all"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="ncurses-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://dev.yorhel.nl/download/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="172047c29d232724cc62e773e82e592a ncdu-1.7.tar.gz"
diff --git a/testing/ncmpcpp/APKBUILD b/testing/ncmpcpp/APKBUILD
new file mode 100644
index 000000000..88e1c4938
--- /dev/null
+++ b/testing/ncmpcpp/APKBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=ncmpcpp
+pkgver=0.5.8
+pkgrel=0
+pkgdesc="An almost exact clone of ncmpc with some new features."
+url="http://unkart.ovh.org/ncmpcpp/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="curl-dev libmpdclient-dev taglib-dev ncurses-dev openssl-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://unkart.ovh.org/ncmpcpp/ncmpcpp-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build ()
+{
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --enable-unicode \
+ --enable-clock \
+ --with-taglib --with-curl
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="288952c6b4cf4fa3683f3f83a58da37c ncmpcpp-0.5.8.tar.bz2"
diff --git a/testing/ncrack/APKBUILD b/testing/ncrack/APKBUILD
new file mode 100644
index 000000000..c159de5ad
--- /dev/null
+++ b/testing/ncrack/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=ncrack
+pkgver=0.4
+pkgrel=0.alpha
+pkgdesc="A network authentication cracking tool"
+url="http://nmap.org/ncrack/"
+arch="all"
+license="GPL2 with exceptions"
+depends=""
+depends_dev=""
+makedepends="openssl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://nmap.org/ncrack/dist/$pkgname-"$pkgver"ALPHA.tar.gz"
+_builddir="$srcdir"/$pkgname-"$pkgver"ALPHA
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --without-zlib-version-check \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="db9be165469c04650ddc7403b29eb472 ncrack-0.4ALPHA.tar.gz"
diff --git a/testing/nebula/APKBUILD b/testing/nebula/APKBUILD
new file mode 100644
index 000000000..4dd3e5c22
--- /dev/null
+++ b/testing/nebula/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=nebula
+pkgver=0.2.3
+pkgrel=0
+pkgdesc="An Intrusion Signature Generator"
+url="http://nebula.carnivore.it/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="zlib-dev"
+install=""
+subpackages="$pkgname-client"
+source="http://downloads.sourceforge.net/nebula/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make AM_CFLAGS=-D_GNU_SOURCE || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+client() {
+ #cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/"$pkgname"client "$subpkgdir"/usr/bin/
+}
+
+md5sums="06eabd66634e7969203465fb94900f18 nebula-0.2.3.tar.gz"
diff --git a/testing/netdiscover/APKBUILD b/testing/netdiscover/APKBUILD
new file mode 100644
index 000000000..2a22806e4
--- /dev/null
+++ b/testing/netdiscover/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=netdiscover
+pkgver=0.3
+pkgrel=0.beta6
+pkgdesc="A network address discovering tool"
+url="http://nixgeneration.com/~jaime/netdiscover/"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends="libnet-dev libpcap-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/netdiscover/netdiscover-$pkgver-beta6.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver-beta6
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -rf "$pkgdir"/usr/doc/
+}
+
+md5sums="0919227a91ecaeeb2443cff249417be2 netdiscover-0.3-beta6.tar.gz"
diff --git a/testing/netsniff-ng/APKBUILD b/testing/netsniff-ng/APKBUILD
new file mode 100644
index 000000000..772e3edb7
--- /dev/null
+++ b/testing/netsniff-ng/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=netsniff-ng
+pkgver=0.5.5.0
+pkgrel=0
+pkgdesc="A network analyzer and networking toolkit"
+url="http://netsniff-ng.org/"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages="$pkgname-doc"
+source="http://www.netsniff-ng.org/pub/netsniff-ng/$pkgname-$pkgver.tar.gz
+ netsniff-ng-unkown.patch"
+
+_builddir="$srcdir"/$pkgname
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make -C src || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install -C src || return 1
+}
+
+md5sums="bd303bdeb7244bb1e4e966b94f7671c4 netsniff-ng-0.5.5.0.tar.gz
+e3593dead3b91eb42cef984bae75320b netsniff-ng-unkown.patch"
diff --git a/testing/netsniff-ng/netsniff-ng-unkown.patch b/testing/netsniff-ng/netsniff-ng-unkown.patch
new file mode 100644
index 000000000..14c1ae998
--- /dev/null
+++ b/testing/netsniff-ng/netsniff-ng-unkown.patch
@@ -0,0 +1,14 @@
+--- netsniff-ng/src/Makefile.orig
++++ netsniff-ng/src/Makefile
+@@ -39,9 +39,9 @@
+ @install -D $(target) $(DESTDIR)/$(BINDIR)/$(target)
+ @install -d $(DESTDIR)/$(ETCDIR)/$(target)/rules
+ @cp -r rules/*.bpf $(DESTDIR)/$(ETCDIR)/$(target)/rules/
+- @cat $(MANDIR_LOCAL)/$(target).8 | gzip --best > \
++ @cat $(MANDIR_LOCAL)/$(target).8 | gzip > \
+ $(MANDIR_LOCAL)/$(target).8.gz
+- @install -D $(MANDIR_LOCAL)/$(target).8.gz \
++ @install -Dm644 $(MANDIR_LOCAL)/$(target).8.gz \
+ $(DESTDIR)/$(MANDIR)/$(target).8.gz
+
+ uninstall:
diff --git a/testing/network-manager-applet/APKBUILD b/testing/network-manager-applet/APKBUILD
new file mode 100644
index 000000000..de6e5007e
--- /dev/null
+++ b/testing/network-manager-applet/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=network-manager-applet
+pkgver=0.9.0
+pkgrel=0
+pkgdesc="gtk applet for network manager"
+url="http://projects.gnome.org/NetworkManager"
+arch="all"
+license="GPL"
+depends=
+depends_dev="networkmanager-dev gconf-dev libgnome-keyring-dev libnotify-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://ftp.gnome.org/pub/GNOME/sources/network-manager-applet/${pkgver%.*}/network-manager-applet-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/network-manager-applet-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="805d56f756e6844f16b57d9132f5ed81 network-manager-applet-0.9.0.tar.bz2"
diff --git a/testing/networkmanager/APKBUILD b/testing/networkmanager/APKBUILD
new file mode 100644
index 000000000..ebb430e97
--- /dev/null
+++ b/testing/networkmanager/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=networkmanager
+pkgver=0.9.0
+pkgrel=2
+pkgdesc="network management tool"
+url="http://projects.gnome.org/NetworkManager/"
+arch="all"
+license="GPL"
+depends="dhcpcd iptables"
+depends_dev="dbus-glib-dev udev-dev libnl-dev util-linux-dev
+ polkit-dev ppp-dev zlib-dev libiconv-dev wireless-tools-dev
+ nss-dev nspr-dev"
+makedepends="$depends_dev intltool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/${pkgver%.*}/NetworkManager-$pkgver.tar.bz2
+ networkmanager.initd"
+
+_builddir="$srcdir"/NetworkManager-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --with-distro=debian \
+ --with-dhcpcd=yes \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m755 -D "$srcdir"/networkmanager.initd \
+ "$pkgdir"/etc/init.d/networkmanager || return 1
+
+ # stupid make install installs a custom init script, yuck
+ rm "$pkgdir"/etc/init.d/NetworkManager \
+ "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/NetworkManager/*.la \
+ "$pkgdir"/usr/lib/pppd/*/nm-pppd-plugin.la
+}
+
+md5sums="f807102109e63ec708d4fd7a7f3f7deb NetworkManager-0.9.0.tar.bz2
+c1c4609f415d7288e223d8c99e2d52d3 networkmanager.initd"
diff --git a/testing/networkmanager/networkmanager.initd b/testing/networkmanager/networkmanager.initd
new file mode 100644
index 000000000..7db410be9
--- /dev/null
+++ b/testing/networkmanager/networkmanager.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: $
+
+depend() {
+ need dbus
+}
+
+start() {
+ ebegin "Starting NetworkManager"
+ start-stop-daemon --start --quiet --pidfile /var/run/NetworkManager.pid \
+ --exec /usr/sbin/NetworkManager -- --pid-file /var/run/NetworkManager.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NetworkManager"
+ start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManager.pid
+ eend $?
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/testing/nodejs/APKBUILD b/testing/nodejs/APKBUILD
new file mode 100644
index 000000000..fe5acb8e0
--- /dev/null
+++ b/testing/nodejs/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=nodejs
+pkgver=0.4.2
+pkgrel=0
+pkgdesc="event-oriented javascript framework and execution environment"
+url="http://nodejs.org/"
+
+# v8 is not portable so we have to list archs by hand
+arch="x86 x86_64 arm"
+
+license="MIT BSD Apache-2"
+depends=
+depends_dev=
+makedepends="$depends_dev python libev-dev c-ares-dev openssl-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://nodejs.org/dist/node-v${pkgver}.tar.gz
+ nodejs-uclibc.patch
+ nodejs-multiplicity.patch"
+
+_builddir="${srcdir}/node-v${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --shared-cares \
+ --shared-libev
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="9e9e791e125f6a601ebc663dc99c72a8 node-v0.4.2.tar.gz
+b5d7568f58bb9a14d5b9a971e89560c6 nodejs-uclibc.patch
+912d504d56fb194b4ceda8f693f6e200 nodejs-multiplicity.patch"
diff --git a/testing/nodejs/nodejs-multiplicity.patch b/testing/nodejs/nodejs-multiplicity.patch
new file mode 100644
index 000000000..87479690d
--- /dev/null
+++ b/testing/nodejs/nodejs-multiplicity.patch
@@ -0,0 +1,10 @@
+--- node-v0.4.2.orig/wscript
++++ node-v0.4.2/wscript
+@@ -436,7 +436,6 @@
+ # LFS
+ conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
+ conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64')
+- conf.env.append_value('CPPFLAGS', '-DEV_MULTIPLICITY=0')
+
+ # Makes select on windows support more than 64 FDs
+ if sys.platform.startswith("win32"):
diff --git a/testing/nodejs/nodejs-uclibc.patch b/testing/nodejs/nodejs-uclibc.patch
new file mode 100644
index 000000000..68fadff06
--- /dev/null
+++ b/testing/nodejs/nodejs-uclibc.patch
@@ -0,0 +1,20 @@
+--- node-v0.4.2.orig/deps/v8/src/platform-linux.cc
++++ node-v0.4.2/deps/v8/src/platform-linux.cc
+@@ -46,7 +46,7 @@
+ #include <sys/stat.h> // open
+ #include <fcntl.h> // open
+ #include <unistd.h> // sysconf
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h> // backtrace, backtrace_symbols
+ #endif // def __GLIBC__
+ #include <strings.h> // index
+@@ -447,7 +447,7 @@
+
+ int OS::StackWalk(Vector<OS::StackFrame> frames) {
+ // backtrace is a glibc extension.
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ int frames_size = frames.length();
+ ScopedVector<void*> addresses(frames_size);
+
diff --git a/testing/ntfsprogs/APKBUILD b/testing/ntfsprogs/APKBUILD
new file mode 100644
index 000000000..df79553eb
--- /dev/null
+++ b/testing/ntfsprogs/APKBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=ntfsprogs
+pkgver=2.0.0
+pkgrel=0
+pkgdesc="User space utilities for NTFS partitions"
+url="http://sourceforge.net/projects/linux-ntfs/"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/project/linux-ntfs/NTFS%20Tools%20and%20Library/2.0.0/$pkgname-$pkgver.tar.gz"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ find $pkgdir -iname *.la -delete
+}
+
+md5sums="2c402b647bb7aeb1d3f8ce1cc354fd68 ntfsprogs-2.0.0.tar.gz"
diff --git a/testing/nuttcp/APKBUILD b/testing/nuttcp/APKBUILD
new file mode 100644
index 000000000..61dc904da
--- /dev/null
+++ b/testing/nuttcp/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=nuttcp
+pkgver=6.1.2
+pkgrel=0
+pkgdesc="nuttcp - network performance measurement tool"
+url="http://lcp.nrl.navy.mil/nuttcp/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://lcp.nrl.navy.mil/$pkgname/$pkgname-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm755 nuttcp-6.1.2 "$pkgdir"/usr/sbin/nuttcp
+ install -Dm644 nuttcp.8 "$pkgdir"/usr/share/man/man8/nuttcp.8
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+}
+md5sums="a16d4d6d5def02cea980e57feaf30500 nuttcp-6.1.2.tar.bz2"
diff --git a/testing/obexftp/APKBUILD b/testing/obexftp/APKBUILD
new file mode 100644
index 000000000..bcde5b0c9
--- /dev/null
+++ b/testing/obexftp/APKBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=obexftp
+pkgver=0.23
+pkgrel=4
+pkgdesc="A tool for transfer files to/from any OBEX enabled device"
+url="http://openobex.triq.net/obexftp/obexftp"
+arch="all"
+license="GPL"
+depends=
+makedepends="pkgconfig openobex-dev bluez-dev python-dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs py-$pkgname:py"
+source="http://downloads.sourceforge.net/sourceforge/openobex/obexftp-$pkgver.tar.bz2
+ obexftp-0.23-gentoo.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case "$i" in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-bluetooth \
+ --disable-perl \
+ --enable-python \
+ --disable-ruby || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+libs() {
+ pkgdesc="OBEX shared library"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib
+}
+
+py() {
+ pkgdesc="Python library to access devices via the OBEX protocol"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
+md5sums="f20762061b68bc921e80be4aebc349eb obexftp-0.23.tar.bz2
+90b4fadb913673c339bbd04cebc4f9d2 obexftp-0.23-gentoo.patch"
diff --git a/testing/obexftp/obexftp-0.23-gentoo.patch b/testing/obexftp/obexftp-0.23-gentoo.patch
new file mode 100644
index 000000000..b805bc625
--- /dev/null
+++ b/testing/obexftp/obexftp-0.23-gentoo.patch
@@ -0,0 +1,24 @@
+diff -Nru obexftp-0.23.orig/obexftp/client.c obexftp-0.23/obexftp/client.c
+--- obexftp-0.23.orig/obexftp/client.c 2009-02-17 18:27:48.000000000 +0000
++++ obexftp-0.23/obexftp/client.c 2009-03-22 16:12:05.000000000 +0000
+@@ -51,8 +51,6 @@
+
+ #ifdef HAVE_BLUETOOTH
+ #include "bt_kit.h"
+-#else
+-#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+ #endif /* HAVE_BLUETOOTH */
+
+ #include <openobex/obex.h>
+diff -Nru obexftp-0.23.orig/apps/obexftp.c obexftp-0.23/apps/obexftp.c
+--- obexftp-0.23.orig/apps/obexftp.c 2009-02-17 18:27:48.000000000 +0000
++++ obexftp-0.23/apps/obexftp.c 2009-03-22 16:19:29.000000000 +0000
+@@ -29,6 +29,8 @@
+
+ #include <sys/types.h>
+
++#include <config.h>
++
+ #ifdef HAVE_SYS_TIMES_H
+ #include <sys/times.h>
+ #endif
diff --git a/testing/obmenu/APKBUILD b/testing/obmenu/APKBUILD
new file mode 100644
index 000000000..6f5d35c91
--- /dev/null
+++ b/testing/obmenu/APKBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
+pkgname=obmenu
+pkgver=1.0
+pkgrel=0
+pkgdesc="Graphical Openbox menu editor"
+url="http://obmenu.sourceforge.net"
+arch="noarch"
+license="GPL"
+depends="python py-gtk"
+makedepends="py-setuptools"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+}
+md5sums="710036a5edc9886d6d563ce46c747432 obmenu-1.0.tar.gz"
diff --git a/testing/openjpeg/APKBUILD b/testing/openjpeg/APKBUILD
new file mode 100644
index 000000000..5f1c0ae52
--- /dev/null
+++ b/testing/openjpeg/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=openjpeg
+pkgver=1.3
+_pkgver="v${pkgver%.*}_${pkgver#*.}"
+pkgrel=1
+pkgdesc="open-source implementation of JPEG2000 image codec"
+url="http://www.openjpeg.org/"
+arch="all"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://openjpeg.googlecode.com/files/openjpeg_${_pkgver}.tar.gz"
+
+_builddir="${srcdir}/OpenJPEG_${_pkgver}"
+prepare() {
+ local i
+ mkdir "$_builddir"
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="f9a3ccfa91ac34b589e9bf7577ce8ff9 openjpeg_v1_3.tar.gz"
diff --git a/testing/openlldp/APKBUILD b/testing/openlldp/APKBUILD
new file mode 100644
index 000000000..651f90c28
--- /dev/null
+++ b/testing/openlldp/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=openlldp
+pkgver=0.4a
+_realver=0.4alpha
+pkgrel=2
+pkgdesc="Open Source implementation of the IEEE standard 802.1AB Link Layer Discovery Protocol (LLDP)"
+url="http://openlldp.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=
+makedepends=
+install=
+subpackages=""
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_realver.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
+
+_builddir="$srcdir"/$pkgname-$_realver
+
+#prepare() {
+# cd "$_builddir"
+# apply patches here
+#}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D ../../$pkgname.initd "$pkgdir"/etc/init.d/lldpd
+ install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/lldpd
+}
+
+md5sums="f48ffd632b96246cbf0f5c485dea3b01 openlldp-0.4alpha.tar.gz
+7e1a489d8ccdd204cac68ce87e0ce360 openlldp.initd
+7ac497e5a8b2f68532816c5718f5bf62 openlldp.confd"
diff --git a/testing/openlldp/openlldp.confd b/testing/openlldp/openlldp.confd
new file mode 100644
index 000000000..38d961348
--- /dev/null
+++ b/testing/openlldp/openlldp.confd
@@ -0,0 +1,2 @@
+# Remove existing pid file at startup
+OPTS="-s"
diff --git a/testing/openlldp/openlldp.initd b/testing/openlldp/openlldp.initd
new file mode 100755
index 000000000..4ab856add
--- /dev/null
+++ b/testing/openlldp/openlldp.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+
+NAME="lldpd"
+DAEMON="/usr/sbin/$NAME"
+pidfile=/var/run/$NAME.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --pidfile ${pidfile} \
+ --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --exec ${DAEMON}
+ eend $?
+}
+
diff --git a/testing/opensips-cp/APKBUILD b/testing/opensips-cp/APKBUILD
new file mode 100644
index 000000000..1d21e1f8f
--- /dev/null
+++ b/testing/opensips-cp/APKBUILD
@@ -0,0 +1,26 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=opensips-cp
+pkgver=2.0
+pkgrel=0
+pkgdesc="Web Control Panel Application for the OpenSIPS SIP server"
+url="http://opensips-cp.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="php"
+makedepends=""
+install=
+options="!strip"
+#subpackages="$pkgname-doc $pkgname-dev"
+source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$pkgver.tgz"
+
+build() {
+ return 0
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/webapps
+ cp -r "$srcdir"/$pkgname "$pkgdir"/usr/share/webapps/$pkgname
+}
+
+md5sums="a9c3b142c7f74eb0201ae2ab0b252c32 opensips-cp_2.0.tgz"
diff --git a/testing/opensips/APKBUILD b/testing/opensips/APKBUILD
new file mode 100644
index 000000000..debdbbf1e
--- /dev/null
+++ b/testing/opensips/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=opensips
+pkgver=1.6.3
+pkgrel=0
+pkgdesc="Flexible and customizable sip routing engine"
+url="http://www.opensips.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="bison flex expat-dev coreutils"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-notls_src.tar.gz
+ $pkgname.initd"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
+ sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
+ -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs
+
+ cd scripts
+ sed -i -e 's:/var/run/opensips.pid:/var/run/opensips/opensips.pid:g' \
+ opensipsctl.base opensipsctlrc osipsconsole osipsconsolerc
+ cd ..
+
+ make prefix=/usr || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
+ make prefix=/usr basedir="$pkgdir" install
+ chmod 750 "$pkgdir"/etc/opensips/opensips.cfg
+ install -d "$pkgdir"/var/run/opensips
+ install -Dm755 ../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="84e5d6da6476dcdb8bc0fd736507040a opensips-1.6.3-notls_src.tar.gz
+7fb51d35517f7f10cfe6e89139f7060a opensips.initd"
diff --git a/testing/opensips/opensips.initd b/testing/opensips/opensips.initd
new file mode 100644
index 000000000..09c03fd5d
--- /dev/null
+++ b/testing/opensips/opensips.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+daemon=/usr/sbin/opensips
+pidfile=/var/run/opensips/opensips.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting OpenSIPS"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
+ -- \
+ -u ${OPENSIPS_USER:-opensips} \
+ -g ${OPENSIPS_GROUP:-opensips} \
+ -P $pidfile
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenSIPS"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}
+
diff --git a/testing/opensips/opensips.post-install b/testing/opensips/opensips.post-install
new file mode 100644
index 000000000..eb9d86d98
--- /dev/null
+++ b/testing/opensips/opensips.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown -R opensips:opensips /var/run/opensips
+chgrp opensips /etc/opensips/opensips.cfg
+exit 0
diff --git a/testing/opensips/opensips.pre-install b/testing/opensips/opensips.pre-install
new file mode 100644
index 000000000..4b9ccd418
--- /dev/null
+++ b/testing/opensips/opensips.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -H -h /var/empty -s /bin/false -D opensips 2>/dev/null
+
+exit 0
diff --git a/testing/openswan-grsec/APKBUILD b/testing/openswan-grsec/APKBUILD
new file mode 100644
index 000000000..bb224fb53
--- /dev/null
+++ b/testing/openswan-grsec/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+_flavor=grsec
+
+# source the kernel version
+if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
+ . ../../main/linux-${_flavor}/APKBUILD
+fi
+
+_kernelver="$pkgver-r$pkgrel"
+_abi_release=${pkgver}-${_flavor}
+_kpkgrel=$pkgrel
+_realname=openswan
+# version of openswan module
+_realver=2.6.35
+# _mypkgrel can be reset to 0 when kernel pkgver increases
+_mypkgrel=0
+
+pkgname="$_realname-$_flavor"
+pkgver=$pkgver
+pkgrel=$(( $_kpkgrel + $_mypkgrel ))
+pkgdesc="IPsec Implementation which Allows Building of VPNs"
+url="http://www.openswan.org/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="gmp-dev bison flex linux-$_flavor-dev=$_kernelver"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.openswan.org/download/$_realname-$_realver.tar.gz"
+
+_ksrc=/usr/src/linux-headers-${_abi_release}
+
+_builddir="$srcdir"/$_realname-$_realver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ # make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr programs || return 1
+ export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
+ export INSTALL_MOD_PATH="$pkgdir"
+ export INSTALL_MOD_DIR=misc
+ make KERNELSRC="$_ksrc" module || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INC_RCDEFAULT=/etc/init.d \
+ INC_USRLOCAL=/usr \
+ KERNELSRC="$_ksrc" \
+ DESTDIR="$pkgdir" minstall
+}
+
+md5sums="7909a251fbbb807914545b7f42437013 openswan-2.6.35.tar.gz"
diff --git a/testing/openswan/APKBUILD b/testing/openswan/APKBUILD
new file mode 100644
index 000000000..681521b57
--- /dev/null
+++ b/testing/openswan/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=openswan
+pkgver=2.6.35
+pkgrel=3
+pkgdesc="IPsec Implementation which Allows Building of VPNs"
+url="http://www.openswan.org/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="gmp-dev bison flex coreutils"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.openswan.org/download/$pkgname-$pkgver.tar.gz ipsec.initd setup.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr programs || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INC_MANDIR=share/man INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr DESTDIR="$pkgdir" install || return 1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+
+ install -Dm755 "$srcdir"/ipsec.initd "$pkgdir"/etc/init.d/ipsec
+ install -Dm644 BUGS "$pkgdir"/usr/share/doc/$pkgname/BUGS
+ install -Dm644 CHANGES "$pkgdir"/usr/share/doc/$pkgname/CHANGES
+ install -Dm644 CREDITS "$pkgdir"/usr/share/doc/$pkgname/CREDITS
+ install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ cp -aR docs/* "$pkgdir"/usr/share/doc/$pkgname/
+
+}
+md5sums="7909a251fbbb807914545b7f42437013 openswan-2.6.35.tar.gz
+f019d1fa23627d54462054fedc9de03b ipsec.initd
+fd3cd27f9da9140fabd935377c3d6921 setup.patch"
diff --git a/testing/openswan/ipsec.initd b/testing/openswan/ipsec.initd
new file mode 100644
index 000000000..32a06008a
--- /dev/null
+++ b/testing/openswan/ipsec.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+# Openswan ipsec init.d file for alpine linux.
+
+name=ipsec
+daemon=/usr/libexec/ipsec/setup
+pidfile=/var/run/pluto/ipsec_setup.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ $daemon start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ $daemon stop
+ eend $?
+}
+
diff --git a/testing/openswan/setup.patch b/testing/openswan/setup.patch
new file mode 100644
index 000000000..86ff6d80a
--- /dev/null
+++ b/testing/openswan/setup.patch
@@ -0,0 +1,12 @@
+--- openswan-2.6.35-orig/programs/setup/Makefile
++++ openswan-2.6.35/programs/setup/Makefile
+@@ -36,8 +36,7 @@
+ # check the directories we need exist (ie., make install DESTDIR=/tmp/IPsec)
+ @mkdir -p $(RCDIR) $(BINDIR)
+ # install and link everything
+- @$(INSTALL) $(INSTBINFLAGS) setup $(RCDIR)/ipsec
+- @ln -s $(FINALRCDIR)/ipsec $(BINDIR)/setup
++ @$(INSTALL) $(INSTBINFLAGS) setup $(BINDIR)/setup
+
+ install_file_list::
+ @echo $(RCDIR)/ipsec
diff --git a/testing/openvcp/APKBUILD b/testing/openvcp/APKBUILD
new file mode 100644
index 000000000..2afdc1695
--- /dev/null
+++ b/testing/openvcp/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=openvcp
+_pkgname=openvcpd
+pkgver=0.5
+_pkgver=0.5rc3
+pkgrel=4
+pkgdesc="Control Panel for VServer instances"
+url="http://www.openvcp.org"
+arch="all"
+license="GPL"
+depends=
+depends_dev="gnutls-dev util-vserver-dev libxml2-dev libpcap-dev libtool sqlite-dev rsync iptables-dev"
+makedepends="$depends_dev"
+install=
+subpackages=
+source="http://files.openvcp.org/$_pkgname-$_pkgver.tar.gz
+ system-libiptc.patch
+ $pkgname.initd"
+
+_builddir="$srcdir"/$_pkgname-$_pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-gnutls
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/vservers/backups
+ mkdir -p "$pkgdir"/vservers/userbackups
+ mkdir -p "$pkgdir"/vservers/images
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="9c65d706133ea48553c90236997f1b8b openvcpd-0.5rc3.tar.gz
+bf034b4507f79f635596f1c78f5f7e3f system-libiptc.patch
+1c3e0df6937b2a73b49850a81de15365 openvcp.initd"
diff --git a/testing/openvcp/openvcp.initd b/testing/openvcp/openvcp.initd
new file mode 100644
index 000000000..609dac612
--- /dev/null
+++ b/testing/openvcp/openvcp.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend () {
+ use net
+ after firewall
+}
+
+start() {
+ ebegin "OpenVCP Starting"
+ start-stop-daemon --start --quiet --background --exec /bin/openvcpd || return 1
+ eend $?
+}
+
+stop() {
+ ebegin "OpenVCP Stopping"
+ kpid=`cat /var/run/openvcpd.pid`
+ kill -kill `expr $kpid - 1`
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/openvcpd.pid
+ eend $?
+}
diff --git a/testing/openvcp/system-libiptc.patch b/testing/openvcp/system-libiptc.patch
new file mode 100644
index 000000000..cfbe7296e
--- /dev/null
+++ b/testing/openvcp/system-libiptc.patch
@@ -0,0 +1,27 @@
+--- ./Makefile.in.orig
++++ ./Makefile.in
+@@ -7,9 +7,9 @@
+ CC=@CC@
+ CFLAGS=@CFLAGS@ @DEFS@ -DOPENVCP_CONFIG=\"$(sysconfdir)/openvcpd.conf\" -DOPENVCP_DATA=\"$(datadir)/openvcpd\" -Ilib/ -Isrc/ -rdynamic -DREVISION=\"$(REV)\" `python-config --cflags`
+ LDFLAGS=@LDFLAGS@
+-LIBS=@LIBS@ `python-config --ldflags`
++LIBS=@LIBS@ `python-config --ldflags` -liptc
+
+-OBJECTS = lib/libiptc/libip6tc.o lib/libiptc/libip4tc.o src/modules.o src/misc.o src/node.o src/traffic.o src/logtraffic.o src/setup.o src/set.o src/parseconfig.o src/get.o src/request.o lib/fs.o lib/strings.o lib/ovcpxml.o src/filter.o src/bandwidth.o src/trafficlimit.o src/userbackup.o src/task.o
++OBJECTS = src/modules.o src/misc.o src/node.o src/traffic.o src/logtraffic.o src/setup.o src/set.o src/parseconfig.o src/get.o src/request.o lib/fs.o lib/strings.o lib/ovcpxml.o src/filter.o src/bandwidth.o src/trafficlimit.o src/userbackup.o src/task.o
+
+ all: openvcpd lib/pyovcp/ovcp.so
+ openvcpd: src/main.c $(OBJECTS) lib/pyovcp/pyovcp.a
+@@ -35,12 +35,6 @@
+
+ lib/ovcpxml.o: lib/ovcpxml.c
+ $(CC) $(CFLAGS) -fPIC -c lib/ovcpxml.c -o lib/ovcpxml.o
+-
+-lib/libiptc/libip4tc.o:
+- cd lib/libiptc/; make libip4tc.o;
+-
+-lib/libiptc/libip6tc.o:
+- cd lib/libiptc/; make libip6tc.o;
+
+ lib/pyovcp/ovcp.so:
+ cd lib/pyovcp/; make ovcp.so;
diff --git a/testing/openxcap/APKBUILD b/testing/openxcap/APKBUILD
new file mode 100644
index 000000000..4ee40c401
--- /dev/null
+++ b/testing/openxcap/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=openxcap
+pkgver=2.0.0
+pkgrel=1
+pkgdesc="Open source fully featured XCAP server "
+url="http://openxcap.org"
+pkgusers="openxcap"
+pkggroups="openxcap"
+arch="noarch"
+license="GPL"
+depends="python py-application py-gnutls py-twisted py-twisted-web2 py-imaging
+ py-lxml py-mysqldb"
+makedepends="python-dev"
+install="$pkgname.pre-install $pkgname.post-install"
+source="http://download.ag-projects.com/XCAP/$pkgname-$pkgver.tar.gz
+ config.ini
+ openxcap.initd
+"
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir" || return 1
+ echo "/usr/lib/python2.6/site-packages/$pkgname-$pkgver-py2.6.egg" \
+ > "$pkgdir"/usr/lib/python2.6/site-packages/$pkgname.pth
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/config.ini \
+ "$pkgdir"/etc/openxcap/config.ini
+ install -d -o openxcap "$pkgdir"/var/run/openxcap
+}
+
+md5sums="155b1ee85dd3217e5647ad3ac9f72cf6 openxcap-2.0.0.tar.gz
+7a18872843586717eaf3879444cc13d2 config.ini
+0043d28e9e6e51e03661755d12080a28 openxcap.initd"
diff --git a/testing/openxcap/config.ini b/testing/openxcap/config.ini
new file mode 100644
index 000000000..bcf5b22f2
--- /dev/null
+++ b/testing/openxcap/config.ini
@@ -0,0 +1,118 @@
+;
+; Configuration file for OpenXCAP
+;
+; The values in the commented lines represent the defaults built in the
+; server software
+;
+[Server]
+
+; IP address to listen for requests
+; 0.0.0.0 means any address of this host
+
+; address = 0.0.0.0
+
+; This is a comma separated list of XCAP root URIs. The first is the
+; primary XCAP root URI, while the others (if specified) are aliases.
+; The primary root URI is used when generating xcap-diff
+; If the scheme is https, then the server will listen for requests in TLS mode.
+
+root = http://xcap.example.com/xcap-root
+
+; The backend to be used for storage and authentication. Current supported
+; values are Database and OpenSIPS. OpenSIPS backend inherits all the settings
+; from the Database backend but performs extra actions related to the
+; integration with OpenSIPS for which it read the settings from [OpenSIPS]
+; section
+
+backend = OpenSIPS
+
+; Validate XCAP documents against XML schemas
+
+; document_validation = Yes
+
+
+[Logging]
+
+; Start, stop and major server error messages are always logged to syslog.
+
+; This section can be used to log more details about XCAP clients accessing
+; the server. The values in the commented lines represent the defaults built
+; in the server software
+
+; Directory where to write access.log file that will contain requests and/or
+; responses to OpenXCAP server in Apache style. If set to an empty string,
+; access logs will be printed to stdout if the server runs in no-fork mode
+; or to syslog if the server runs in the background
+
+; directory=/var/log/openxcap
+
+; The following parameters control what kind of information (like
+; stacktrace, body or headers) is logged for which response codes. The
+; values must be a comma-separated list of HTTP response codes or the
+; keyword 'any' that matches all response codes.
+
+; log_stacktrace=500
+; log_response_headers=500
+; log_response_body=500
+; log_request_headers=500
+; log_request_body=500
+
+
+[Authentication]
+
+; The HTTP authentication type, this can be either 'basic' or 'digest'. The
+; standard states 'digest' as the mandatory, however it can be changed to
+; basic
+
+; type = digest
+
+; Specify if the passwords are stored as plain text - Yes
+; or in a hashed format MD5('username:domain:password') - No
+; cleartext_passwords = Yes
+
+; The default authentication realm, if none indicated in the HTTP request
+; URI
+default_realm = example.com
+
+; A comma-separated list of hosts or networks to trust.
+; The elements can be an IP address in CIDR format, a
+; hostname or an IP address (in the latter 2 a mask of 32
+; is assumed), or the special keywords 'any' and 'none'
+; (being equivalent to 0.0.0.0/0 and 0.0.0.0/32
+; respectively).
+; trusted_peers =
+
+
+[TLS]
+
+; Location of X509 certificate and private key that identify this server.
+; The path is relative to /etc/openxcap, or it can be given as an absolute
+; path.
+
+; Server X509 certificate
+; certificate =
+
+; Server X509 private key
+; private_key =
+
+
+[Database]
+
+; The database connection URI for the datase with subscriber accounts
+authentication_db_uri = pgsql://username:password@db/opensips
+
+; The database connection URI for the database that stores the XCAP documents
+storage_db_uri = mysql://username:password@db/opensips
+
+; Authentication and storage tables
+; subscriber_table = subscriber
+; xcap_table = xcap
+
+
+[OpenSIPS]
+
+; The address and port of the xml-rpc management interface
+xmlrpc_url = http://sip.example.com:8080
+
+; Publish xcap-diff event via OpenSIPS management interface
+; enable_publish_xcapdiff = yes
diff --git a/testing/openxcap/openxcap.initd b/testing/openxcap/openxcap.initd
new file mode 100644
index 000000000..03286cce3
--- /dev/null
+++ b/testing/openxcap/openxcap.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+INSTALL_DIR="/usr/bin"
+RUNTIME_DIR="/var/run/openxcap"
+DEFAULTS="/etc/default/openxcap"
+SERVER="$INSTALL_DIR/openxcap"
+PID="$RUNTIME_DIR/openxcap.pid"
+OPTIONS=""
+NAME="openxcap"
+DESC="OpenXCAP server"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting $DESC: $NAME "
+ start-stop-daemon --start --quiet --pidfile $PID --exec $SERVER -- $OPTIONS
+ eend $?
+}
+
+stop () {
+ ebegin -n "Stopping $DESC: $NAME "
+ start-stop-daemon --stop --quiet --oknodo --signal 15 --pidfile $PID
+ eend $?
+}
+
+exit 0
+
diff --git a/testing/openxcap/openxcap.post-install b/testing/openxcap/openxcap.post-install
new file mode 100755
index 000000000..b3dff4203
--- /dev/null
+++ b/testing/openxcap/openxcap.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown -R openxcap:openxcap /var/run/openxcap
+chgrp openxcap /etc/openxcap/config.ini
+exit 0
diff --git a/testing/openxcap/openxcap.pre-install b/testing/openxcap/openxcap.pre-install
new file mode 100755
index 000000000..cc2b529e9
--- /dev/null
+++ b/testing/openxcap/openxcap.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup openxcap 2>/dev/null
+adduser -G openxcap -h /var/run/openxcap -s /bin/false -S -D -H openxcap 2>/dev/null
+exit 0
diff --git a/testing/oxygen-gtk/APKBUILD b/testing/oxygen-gtk/APKBUILD
new file mode 100644
index 000000000..9e32f06be
--- /dev/null
+++ b/testing/oxygen-gtk/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=oxygen-gtk
+pkgver=1.1.0
+pkgrel=0
+pkgdesc="gtk+ oxygen port"
+url="http://www.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="gtk+-dev"
+makedepends="$depends_dev cmake"
+install=""
+subpackages=
+source="http://kde.mirrors.tds.net/pub/kde/stable/oxygen-gtk/$pkgver/src/oxygen-gtk-$pkgver.tar.bz2
+ isnan.patch"
+
+_builddir="$srcdir"/oxygen-gtk-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="bacbe2be37db8e8fb3e60a3e13be7fb8 oxygen-gtk-1.1.0.tar.bz2
+7425615ff80fd7afb0b90e6bed613f62 isnan.patch"
diff --git a/testing/oxygen-gtk/isnan.patch b/testing/oxygen-gtk/isnan.patch
new file mode 100644
index 000000000..5e2d27477
--- /dev/null
+++ b/testing/oxygen-gtk/isnan.patch
@@ -0,0 +1,20 @@
+--- oxygen-gtk-1.0.5.orig/src/oxygencolorutils.cpp
++++ oxygen-gtk-1.0.5/src/oxygencolorutils.cpp
+@@ -460,7 +460,7 @@
+ {
+ if( amount <= 0.0 ) return base;
+ if( amount >= 1.0 ) return color;
+- if( isnan( amount ) ) return base;
++ if( __isnan( amount ) ) return base;
+
+ double ri = contrastRatio( base, color );
+ double rg = 1.0 + ( ( ri + 1.0 ) * amount * amount * amount );
+@@ -487,7 +487,7 @@
+ {
+ if( bias <= 0.0 ) return c1;
+ if( bias >= 1.0 ) return c2;
+- if( isnan( bias ) ) return c1;
++ if( __isnan( bias ) ) return c1;
+
+ double r = mixdouble( c1.red(), c2.red(), bias );
+ double g = mixdouble( c1.green(), c2.green(), bias );
diff --git a/testing/oxygen-icons/APKBUILD b/testing/oxygen-icons/APKBUILD
new file mode 100644
index 000000000..cd047708a
--- /dev/null
+++ b/testing/oxygen-icons/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=oxygen-icons
+pkgver=4.6.3
+pkgrel=0
+pkgdesc="oxygen icon set"
+url="http://www.kde.org/"
+arch="noarch"
+license="LGPL"
+depends=
+depends_dev="cmake icon-naming-utils"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://kde.mirrors.tds.net/pub/kde/stable/$pkgver/src/oxygen-icons-$pkgver.tar.bz2"
+install_if="kdebase-workspace"
+
+_builddir="$srcdir"/oxygen-icons-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="3390ae73d1a0c70c121f69b556757fdd oxygen-icons-4.6.3.tar.bz2"
diff --git a/testing/pacemaker/APKBUILD b/testing/pacemaker/APKBUILD
new file mode 100644
index 000000000..026cc69e2
--- /dev/null
+++ b/testing/pacemaker/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=pacemaker
+pkgver=1.1.6.1
+pkgrel=0
+pkgdesc="Scalable High-Availability cluster resource manager"
+url="http://www.clusterlabs.org"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev="glib-dev libxml2-dev libxslt-dev bzip2-dev gnutls-dev
+ cluster-glue-dev resource-agents-dev corosync-dev"
+makedepends="$depends_dev automake autoconf libtool libltdl wget docbook-xsl"
+install=""
+subpackages="$pkgname-doc $pkgname-dev"
+source="saveas-https://nodeload.github.com/ClusterLabs/pacemaker/tarball/Pacemaker-1.1.6.1/pacemaker-1.1.6.1.tar.gz
+ $pkgname.initd"
+
+_builddir="$srcdir"/ClusterLabs-pacemaker-0c7312c
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure \
+ --enable-fatal-warnings=no \
+ --with-corosync
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib*/*.la
+ rm -f "$pkgdir"/usr/lib*/heartbeat/plugins/RAExec/*.la
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+
+}
+
+libs() {
+ pkgdesc="$pkgname libraries"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/lib*.so.* \
+ "$subpkgdir"/usr/lib/
+}
+
+md5sums="6a4132bbba017581b36b87c35246bb92 pacemaker-1.1.6.1.tar.gz
+aca8b793c4a977294121615ed3ce6398 pacemaker.initd"
diff --git a/testing/pacemaker/pacemaker.initd b/testing/pacemaker/pacemaker.initd
new file mode 100644
index 000000000..4231425f8
--- /dev/null
+++ b/testing/pacemaker/pacemaker.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pacemaker/files/pacemaker.initd,v 1.1 2011/02/21 14:39:28 ultrabug Exp $
+
+PIDFILE=/var/run/pacemaker.pid
+
+depend() {
+ need net corosync
+ use syslog
+}
+
+start() {
+ nc=0
+ ebegin "Starting Pacemaker Cluster Manager"
+ einfon "Waiting for Corosync startup ."
+ while true; do
+ /usr/sbin/corosync-cfgtool -s &>/dev/null && break
+ nc=$(expr $nc + 1)
+ if [ $nc -gt 30 ]; then
+ echo
+ eend 1 "Failed to detect Corosync startup, is it really running ?"
+ exit 1
+ fi
+ sleep 1
+ echo -n "."
+ done
+ echo
+ start-stop-daemon --start -q --exec /usr/sbin/pacemakerd \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ -- -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Pacemaker Cluster Manager"
+ start-stop-daemon --stop -q --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/testing/packagekit/APKBUILD b/testing/packagekit/APKBUILD
new file mode 100644
index 000000000..22ac2c66a
--- /dev/null
+++ b/testing/packagekit/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=packagekit
+pkgver=0.7.0
+pkgrel=0
+pkgdesc="Package management service"
+url="http://www.packagekit.org"
+arch="all"
+license="GPLv2+ and LGPLv2+"
+depends=""
+depends_dev=""
+makedepends="dbus-glib-dev polkit-dev bash intltool sqlite-dev gtk+-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
+source="http://www.packagekit.org/releases/PackageKit-$pkgver.tar.xz"
+
+_builddir="$srcdir"/PackageKit-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-qt \
+ --enable-gtk-module \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/lib/packagekit-backend/*.la \
+ "$pkgdir"//usr/lib/packagekit-plugins/*.la
+}
+
+md5sums="8f1bf39b54d24bbe6d836ba83389e9f0 PackageKit-0.7.0.tar.xz"
diff --git a/testing/par2cmdline/APKBUILD b/testing/par2cmdline/APKBUILD
new file mode 100644
index 000000000..d0c41caef
--- /dev/null
+++ b/testing/par2cmdline/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: <kalonji@gmail.com>
+# Maintainer: <kalonji@gmail.com>
+pkgname=par2cmdline
+pkgver=0.4
+pkgrel=1
+pkgdesc="Providing a tool to apply the data-recovery capability concepts of RAID-like systems to the posting & recovery of multi-part archives on Usenet."
+url="http://sourceforge.net/projects/parchive/"
+arch="all"
+license="GPL"
+depends=
+makedepends=
+install=
+source="http://downloads.sourceforge.net/sourceforge/parchive/${pkgname}-${pkgver}.tar.gz
+par2cmdline-0.4-autoconf.patch
+par2cmdline-0.4-letype.patch
+par2cmdline-0.4-cosmetic.patch
+par2cmdline-0.4-offset.patch
+par2cmdline-0.4-gcc4.patch
+par2cmdline-0.4-wildcard-fix.patch
+par2cmdline-0.4-hardlinks.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ msg "Applying ${i}"
+ patch -N -i $i || return 1
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="1551b63e57e3c232254dc62073b723a9 par2cmdline-0.4.tar.gz
+8a0fad41e3c3165e3c788d2693797557 par2cmdline-0.4-autoconf.patch
+1f7adb9308d4e972a5630eb56a42f8d5 par2cmdline-0.4-letype.patch
+986d44b0cdba449459f9cfd93322144f par2cmdline-0.4-cosmetic.patch
+cd54801b5107f03982c2b01ead21f02a par2cmdline-0.4-offset.patch
+d52515669d3bc43f19c545fd6405dacc par2cmdline-0.4-gcc4.patch
+c823d25f8862531e6e435ce0c76f8384 par2cmdline-0.4-wildcard-fix.patch
+8683d237bc11e9d5581d14b4697d1f8b par2cmdline-0.4-hardlinks.patch"
diff --git a/testing/par2cmdline/par2cmdline-0.4-autoconf.patch b/testing/par2cmdline/par2cmdline-0.4-autoconf.patch
new file mode 100644
index 000000000..a0f2fbb55
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-autoconf.patch
@@ -0,0 +1,22 @@
+--- ../orig/par2cmdline-0.4/par2cmdline.h 2004-04-15 15:30:02.000000000 +0200
++++ ./par2cmdline.h 2007-03-24 13:25:43.000000000 +0100
+@@ -132,6 +132,10 @@
+ typedef unsigned long long u64;
+ #endif
+
++// FIXME: this is not done right w/ autoconf
++#include <sys/ioctl.h>
++#include <sys/mount.h>
++
+ #if HAVE_SYS_STAT_H
+ # include <sys/stat.h>
+ #endif
+@@ -179,6 +183,8 @@
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/ioctl.h>
++#include <sys/mount.h>
+ #include <dirent.h>
+ #include <assert.h>
+
diff --git a/testing/par2cmdline/par2cmdline-0.4-cosmetic.patch b/testing/par2cmdline/par2cmdline-0.4-cosmetic.patch
new file mode 100644
index 000000000..0d5df2161
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-cosmetic.patch
@@ -0,0 +1,106 @@
+--- verificationhashtable.h 2003-06-03 13:48:52.000000000 +0200
++++ verificationhashtable.h.new 2010-02-10 20:48:50.425580166 +0100
+@@ -66,11 +66,11 @@ public:
+ // Comparison operators for searching
+ bool operator <(const VerificationHashEntry &r) const
+ {
+- return crc < r.crc || crc == r.crc && hash < r.hash;
++ return crc < r.crc || ( crc == r.crc && hash < r.hash );
+ }
+ bool operator >(const VerificationHashEntry &r) const
+ {
+- return crc > r.crc || crc == r.crc && hash > r.hash;
++ return crc > r.crc || ( crc == r.crc && hash > r.hash );
+ }
+ bool operator ==(const VerificationHashEntry &r) const
+ {
+@@ -183,11 +183,11 @@ inline const VerificationHashEntry* Veri
+
+ while (entry)
+ {
+- if (entry->crc < crc || entry->crc == crc && entry->hash < hash)
++ if (entry->crc < crc || ( entry->crc == crc && entry->hash < hash ) )
+ {
+ entry = entry->right;
+ }
+- else if (entry->crc > crc || entry->crc == crc && entry->hash > hash)
++ else if (entry->crc > crc || ( entry->crc == crc && entry->hash > hash ) )
+ {
+ entry = entry->left;
+ }
+@@ -402,14 +402,14 @@ inline const VerificationHashEntry* Veri
+ // have already been matched, or ones that are the wrong length
+ while (currententry && (currententry->SourceFile() != sourcefile ||
+ currententry->IsSet() ||
+- checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength()
++ ( checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength() )
+ )
+ )
+ {
+ // If we found an unused entry (which was presumably for the wrong
+ // source file) remember it (providing it is the correct length).
+- if (0 == nextentry && !(currententry->IsSet() ||
+- checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength()
++ if ( ( ( 0 == nextentry && !(currententry->IsSet() ) ) ||
++ ( checksummer.ShortBlock() && checksummer.BlockLength() != currententry->GetDataBlock()->GetLength() )
+ )
+ )
+ {
+@@ -425,8 +425,8 @@ inline const VerificationHashEntry* Veri
+ }
+
+ // Check for an unused entry which is the correct length
+- while (nextentry && (nextentry->IsSet() ||
+- checksummer.ShortBlock() && checksummer.BlockLength() != nextentry->GetDataBlock()->GetLength()
++ while ( ( ( nextentry && (nextentry->IsSet() ) ) ||
++ ( checksummer.ShortBlock() && checksummer.BlockLength() != nextentry->GetDataBlock()->GetLength() )
+ )
+ )
+ {
+--- par1repairer.cpp 2004-04-15 15:40:48.000000000 +0200
++++ par1repairer.cpp.new 2010-02-10 21:04:43.288702325 +0100
+@@ -324,7 +324,7 @@ bool Par1Repairer::LoadRecoveryFile(stri
+ ||
+ (fileheader.datasize && (fileheader.dataoffset < sizeof(fileheader) || fileheader.dataoffset + fileheader.datasize > filesize))
+ ||
+- (fileheader.datasize && (fileheader.filelistoffset <= fileheader.dataoffset && fileheader.dataoffset < fileheader.filelistoffset+fileheader.filelistsize || fileheader.dataoffset <= fileheader.filelistoffset && fileheader.filelistoffset < fileheader.dataoffset + fileheader.datasize)))
++ (fileheader.datasize && ( ( fileheader.filelistoffset <= fileheader.dataoffset && fileheader.dataoffset < fileheader.filelistoffset+fileheader.filelistsize ) || ( fileheader.dataoffset <= fileheader.filelistoffset && fileheader.filelistoffset < fileheader.dataoffset + fileheader.datasize ) )))
+ break;
+
+ // Check the size of the file list
+@@ -518,9 +518,9 @@ bool Par1Repairer::LoadOtherRecoveryFile
+ // Check the the file extension is the correct form
+ if ((tail[0] == 'P' || tail[0] == 'p') &&
+ (
+- (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
++ ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
+ ||
+- isdigit(tail[1]) && isdigit(tail[2])
++ ( isdigit(tail[1]) && isdigit(tail[2]) )
+ ))
+ {
+ LoadRecoveryFile(filename);
+@@ -549,9 +549,9 @@ bool Par1Repairer::LoadExtraRecoveryFile
+ // Check the the file extension is the correct form
+ if ((tail[0] == 'P' || tail[0] == 'p') &&
+ (
+- (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
++ ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
+ ||
+- isdigit(tail[1]) && isdigit(tail[2])
++ ( isdigit(tail[1]) && isdigit(tail[2]) )
+ ))
+ {
+ LoadRecoveryFile(filename);
+@@ -652,9 +652,9 @@ bool Par1Repairer::VerifyExtraFiles(cons
+ // Check the the file extension is the correct form
+ if ((tail[0] == 'P' || tail[0] == 'p') &&
+ (
+- (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r')
++ ( (tail[1] == 'A' || tail[1] == 'a') && (tail[2] == 'R' || tail[2] == 'r') )
+ ||
+- isdigit(tail[1]) && isdigit(tail[2])
++ ( isdigit(tail[1]) && isdigit(tail[2]) )
+ ))
+ {
+ skip = true;
diff --git a/testing/par2cmdline/par2cmdline-0.4-gcc4.patch b/testing/par2cmdline/par2cmdline-0.4-gcc4.patch
new file mode 100644
index 000000000..c6da26789
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-gcc4.patch
@@ -0,0 +1,62 @@
+Fix compilation with gcc-4.
+
+Patch by Dirk-Jan Heijs.
+
+http://bugs.gentoo.org/102391
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287904
+
+--- par2cmdline-0.4/reedsolomon.cpp
++++ par2cmdline-0.4/reedsolomon.cpp
+@@ -51,7 +51,7 @@
+ }
+ }
+
+-bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
++template <> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
+ {
+ inputcount = (u32)present.size();
+
+@@ -80,7 +80,7 @@
+ return true;
+ }
+
+-bool ReedSolomon<Galois8>::SetInput(u32 count)
++template <> bool ReedSolomon<Galois8>::SetInput(u32 count)
+ {
+ inputcount = count;
+
+@@ -101,7 +101,7 @@
+ return true;
+ }
+
+-bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
++template <> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
+ {
+ // Look up the appropriate element in the RS matrix
+ Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex];
+@@ -189,7 +189,7 @@
+
+ // Set which of the source files are present and which are missing
+ // and compute the base values to use for the vandermonde matrix.
+-bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
++template <> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
+ {
+ inputcount = (u32)present.size();
+
+@@ -233,7 +233,7 @@
+
+ // Record that the specified number of source files are all present
+ // and compute the base values to use for the vandermonde matrix.
+-bool ReedSolomon<Galois16>::SetInput(u32 count)
++template <> bool ReedSolomon<Galois16>::SetInput(u32 count)
+ {
+ inputcount = count;
+
+@@ -267,7 +267,7 @@
+ return true;
+ }
+
+-bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
++template <> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
+ {
+ // Look up the appropriate element in the RS matrix
diff --git a/testing/par2cmdline/par2cmdline-0.4-hardlinks.patch b/testing/par2cmdline/par2cmdline-0.4-hardlinks.patch
new file mode 100644
index 000000000..0d815f094
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-hardlinks.patch
@@ -0,0 +1,15 @@
+--- Makefile.in 2004-04-12 18:44:18.000000000 +0200
++++ Makefile.in.new 2010-02-10 21:08:17.799145528 +0100
+@@ -716,9 +716,9 @@ uninstall-am: uninstall-binPROGRAMS unin
+
+
+ install-exec-hook :
+- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2create$(EXEEXT)
+- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2verify$(EXEEXT)
+- ln -f $(DESTDIR)$(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2repair$(EXEEXT)
++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2create$(EXEEXT)
++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2verify$(EXEEXT)
++ ln -sf $(bindir)/par2$(EXEEXT) $(DESTDIR)$(bindir)/par2repair$(EXEEXT)
+
+ uninstall-hook :
+ rm -f $(DESTDIR)$(bindir)/par2create$(EXEEXT)
diff --git a/testing/par2cmdline/par2cmdline-0.4-letype.patch b/testing/par2cmdline/par2cmdline-0.4-letype.patch
new file mode 100644
index 000000000..e0c8d6c57
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-letype.patch
@@ -0,0 +1,219 @@
+diff -ur par2cmdline-0.4-orig/letype.h par2cmdline-0.4/letype.h
+--- par2cmdline-0.4-orig/letype.h 2003-05-26 20:01:17.000000000 +0200
++++ par2cmdline-0.4/letype.h 2006-05-09 10:47:29.000000000 +0200
+@@ -28,44 +28,15 @@
+
+ #else
+
+-class leu16
++struct leu16
+ {
+-public:
+- leu16(void);
+-
+- leu16(const leu16 &other);
+- leu16& operator=(const leu16 &other);
+-
+- leu16(const u16 &other);
+ leu16& operator=(const u16 &other);
+
+ operator u16(void) const;
+
+-protected:
+ u16 value;
+ };
+
+-inline leu16::leu16(void)
+-{
+-}
+-
+-inline leu16::leu16(const leu16 &other)
+-: value(other.value)
+-{
+-}
+-
+-inline leu16& leu16::operator =(const leu16 &other)
+-{
+- value = other.value;
+- return *this;
+-}
+-
+-inline leu16::leu16(const u16 &other)
+-{
+- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
+-}
+-
+ inline leu16& leu16::operator=(const u16 &other)
+ {
+ ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+@@ -81,46 +52,15 @@
+ }
+
+
+-class leu32
++struct leu32
+ {
+-public:
+- leu32(void);
+-
+- leu32(const leu32 &other);
+- leu32& operator=(const leu32 &other);
+-
+- leu32(const u32 &other);
+ leu32& operator=(const u32 &other);
+
+ operator u32(void) const;
+
+-protected:
+ u32 value;
+ };
+
+-inline leu32::leu32(void)
+-{
+-}
+-
+-inline leu32::leu32(const leu32 &other)
+-: value(other.value)
+-{
+-}
+-
+-inline leu32& leu32::operator =(const leu32 &other)
+-{
+- value = other.value;
+- return *this;
+-}
+-
+-inline leu32::leu32(const u32 &other)
+-{
+- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
+- ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff);
+- ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff);
+-}
+-
+ inline leu32& leu32::operator=(const u32 &other)
+ {
+ ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+@@ -140,50 +80,15 @@
+ }
+
+
+-class leu64
++struct leu64
+ {
+-public:
+- leu64(void);
+-
+- leu64(const leu64 &other);
+- leu64& operator=(const leu64 &other);
+-
+- leu64(const u64 &other);
+ leu64& operator=(const u64 &other);
+
+ operator u64(void) const;
+
+-protected:
+ u64 value;
+ };
+
+-inline leu64::leu64(void)
+-{
+-}
+-
+-inline leu64::leu64(const leu64 &other)
+-: value(other.value)
+-{
+-}
+-
+-inline leu64& leu64::operator =(const leu64 &other)
+-{
+- value = other.value;
+- return *this;
+-}
+-
+-inline leu64::leu64(const u64 &other)
+-{
+- ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+- ((unsigned char*)&value)[1] = (unsigned char)((other >> 8) & 0xff);
+- ((unsigned char*)&value)[2] = (unsigned char)((other >> 16) & 0xff);
+- ((unsigned char*)&value)[3] = (unsigned char)((other >> 24) & 0xff);
+- ((unsigned char*)&value)[4] = (unsigned char)((other >> 32) & 0xff);
+- ((unsigned char*)&value)[5] = (unsigned char)((other >> 40) & 0xff);
+- ((unsigned char*)&value)[6] = (unsigned char)((other >> 48) & 0xff);
+- ((unsigned char*)&value)[7] = (unsigned char)((other >> 56) & 0xff);
+-}
+-
+ inline leu64& leu64::operator=(const u64 &other)
+ {
+ ((unsigned char*)&value)[0] = (unsigned char)((other >> 0) & 0xff);
+diff -ur par2cmdline-0.4-orig/md5.h par2cmdline-0.4/md5.h
+--- par2cmdline-0.4-orig/md5.h 2003-08-02 01:41:04.000000000 +0200
++++ par2cmdline-0.4/md5.h 2006-05-09 10:47:29.000000000 +0200
+@@ -20,6 +20,13 @@
+ #ifndef __MD5_H__
+ #define __MD5_H__
+
++#ifdef WIN32
++#pragma pack(push, 1)
++#define PACKED
++#else
++#define PACKED __attribute__ ((packed))
++#endif
++
+ // This file defines the MD5Hash and MD5Context objects which are used
+ // to compute and manipulate the MD5 Hash values for a block of data.
+
+@@ -35,12 +42,11 @@
+
+ // MD5 Hash value
+
+-class MD5Hash
+-{
+-public:
+- // Constructor does not initialise the value
+- MD5Hash(void) {};
++struct MD5Hash;
++ostream& operator<<(ostream &s, const MD5Hash &hash);
+
++struct MD5Hash
++{
+ // Comparison operators
+ bool operator==(const MD5Hash &other) const;
+ bool operator!=(const MD5Hash &other) const;
+@@ -54,13 +60,8 @@
+ friend ostream& operator<<(ostream &s, const MD5Hash &hash);
+ string print(void) const;
+
+- // Copy and assignment
+- MD5Hash(const MD5Hash &other);
+- MD5Hash& operator=(const MD5Hash &other);
+-
+-public:
+ u8 hash[16]; // 16 byte MD5 Hash value
+-};
++} PACKED;
+
+ // Intermediate computation state
+
+@@ -144,16 +145,9 @@
+ return !other.operator<(*this);
+ }
+
+-inline MD5Hash::MD5Hash(const MD5Hash &other)
+-{
+- memcpy(&hash, &other.hash, sizeof(hash));
+-}
+-
+-inline MD5Hash& MD5Hash::operator=(const MD5Hash &other)
+-{
+- memcpy(&hash, &other.hash, sizeof(hash));
+-
+- return *this;
+-}
++#ifdef WIN32
++#pragma pack(pop)
++#endif
++#undef PACKED
+
+ #endif // __MD5_H__
diff --git a/testing/par2cmdline/par2cmdline-0.4-offset.patch b/testing/par2cmdline/par2cmdline-0.4-offset.patch
new file mode 100644
index 000000000..653928066
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-offset.patch
@@ -0,0 +1,16 @@
+--- par2cmdline-0.4.orig/par2creatorsourcefile.cpp 2004-04-15 14:45:23.000000000 +0100
++++ par2cmdline-0.4/par2creatorsourcefile.cpp 2005-09-29 02:27:43.000000000 +0100
+@@ -213,11 +213,12 @@
+ }
+ }
+
++ offset += want;
++
+ if (noiselevel > CommandLine::nlQuiet)
+ {
+ // Display progress
+ u32 oldfraction = (u32)(1000 * offset / filesize);
+- offset += want;
+ u32 newfraction = (u32)(1000 * offset / filesize);
+ if (oldfraction != newfraction)
+ {
diff --git a/testing/par2cmdline/par2cmdline-0.4-wildcard-fix.patch b/testing/par2cmdline/par2cmdline-0.4-wildcard-fix.patch
new file mode 100644
index 000000000..d5f43c796
--- /dev/null
+++ b/testing/par2cmdline/par2cmdline-0.4-wildcard-fix.patch
@@ -0,0 +1,23 @@
+--- commandline.cpp.orig 2006-04-06 21:41:27.000000000 -0700
++++ commandline.cpp 2006-04-07 00:12:29.000000000 -0700
+@@ -550,6 +550,20 @@
+ }
+ else
+ {
++ //start of shell expanded * patch. -- Michael Evans
++ //The shell might expaned * so, if we have our name and we're creating, then filter for files...
++ if ((parfilename.length() != 0) && (operation == opCreate))
++ {
++ struct stat st;
++ if (!(stat(argv[0], &st) == 0 && S_ISREG(st.st_mode)))
++ {
++ cerr << "Skipping non-regular file: " << argv[0] << endl;
++ argc--;
++ argv++;
++ options = false;
++ continue;
++ }
++ }//end of shell expanded * patch. -- Michael Evans
+ filenames = new list<string>;
+ filenames->push_back(argv[0]);
+ }
diff --git a/testing/partclone/APKBUILD b/testing/partclone/APKBUILD
new file mode 100644
index 000000000..e5a381352
--- /dev/null
+++ b/testing/partclone/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Leonardo Arena <rnarld@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=partclone
+pkgver=0.2.24
+pkgrel=1
+pkgdesc="Partition cloning tool"
+url="http://partclone.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="e2fsprogs-dev ncurses-dev ntfsprogs-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/partclone/testing/src/partclone-$pkgver.tar.gz
+ memtrace.patch"
+
+# TODO:
+# libreiserfs: http://reiserfs.linux.kiev.ua
+#
+
+_builddir="$srcdir"/partclone-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+# --enable-all enable all supported file system
+# --enable-extfs enable ext2/3/4 file system
+# --enable-xfs enable XFS file system
+# --enable-reiserfs enable REISERFS 3.6/3.6 file system
+# --enable-reiser4 enable Reiser4 file system
+# --enable-hfsp enable HFS plus file system
+# --enable-fat enable FAT file system
+# --enable-ntfs enable NTFS file system
+# --enable-ufs enable UFS(1/2) file system
+# --enable-vmfs enable vmfs file system
+# --enable-jfs enable jfs file system
+# --enable-btrfs enable btrfs file system
+## --enable-xfs \
+ ac_cv_lib_rt_aio_init=yes ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-extfs \
+ --enable-fat \
+ --enable-ntfs \
+ --enable-ncursesw \
+ --disable-nls \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="d2856820ed3f92e064fcbda3cd20f94e partclone-0.2.24.tar.gz
+83dfb01e5d68795266726826a49a2de8 memtrace.patch"
diff --git a/testing/partclone/memtrace.patch b/testing/partclone/memtrace.patch
new file mode 100644
index 000000000..9c8ba9af1
--- /dev/null
+++ b/testing/partclone/memtrace.patch
@@ -0,0 +1,14 @@
+diff --git a/src/main.c b/src/main.c
+index 2fb6b58..8f079f2 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -20,7 +20,9 @@
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#ifdef HAVE_MEMTRACE
+ #include <mcheck.h>
++#endif
+ #include <stdint.h>
+ #include <stdarg.h>
+ #include <string.h>
diff --git a/testing/partimage/APKBUILD b/testing/partimage/APKBUILD
new file mode 100644
index 000000000..96896cf61
--- /dev/null
+++ b/testing/partimage/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=partimage
+pkgver=0.6.8
+pkgrel=0
+pkgdesc="Saves partitions having a supported filesystem to an image file"
+url="http://www.partimage.org"
+arch="all"
+license="GPL"
+depends=
+makedepends="bzip2-dev newt-dev zlib-dev gettext-dev slang-dev openssl-dev \
+ newt-dev autoconf"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/$pkgname/stable/$pkgver/$pkgname-$pkgver.tar.bz2
+ partimage-0.6.8-gcc44.patch
+"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 -i $srcdir/$pkgname-0.6.8-gcc44.patch || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export LIBS="$LIBS -lintl"
+ autoconf && automake
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-nls
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="c13c8ede8cdf7745b97ec5827920ece7 partimage-0.6.8.tar.bz2
+a6430cf98c8f236c41dd3addcde1fcb8 partimage-0.6.8-gcc44.patch"
diff --git a/testing/partimage/partimage-0.6.8-gcc44.patch b/testing/partimage/partimage-0.6.8-gcc44.patch
new file mode 100644
index 000000000..b171dad08
--- /dev/null
+++ b/testing/partimage/partimage-0.6.8-gcc44.patch
@@ -0,0 +1,24 @@
+diff -Naur partimage-0.6.8/src/client/netclient.h partimage-0.6.8-new/src/client/netclient.h
+--- partimage-0.6.8/src/client/netclient.h 2009-09-24 16:21:42.000000000 -0300
++++ partimage-0.6.8-new/src/client/netclient.h 2009-11-26 09:23:07.000000000 -0200
+@@ -35,7 +35,7 @@
+ #ifdef HAVE_SSL
+ SSL_CTX * ctx;
+ X509 * server_cert;
+- SSL_METHOD * meth;
++ const SSL_METHOD * meth;
+ #endif
+ bool m_bUseSSL;
+ bool m_bMustLogin;
+diff -Naur partimage-0.6.8/src/server/netserver.h partimage-0.6.8-new/src/server/netserver.h
+--- partimage-0.6.8/src/server/netserver.h 2009-09-12 05:06:22.000000000 -0300
++++ partimage-0.6.8-new/src/server/netserver.h 2009-11-26 09:32:02.000000000 -0200
+@@ -41,7 +41,7 @@
+ #ifdef HAVE_SSL
+ SSL_CTX * ctx;
+ X509 * client_cert;
+- SSL_METHOD * meth;
++ const SSL_METHOD * meth;
+ int err;
+ #endif
+
diff --git a/testing/pastebinc/APKBUILD b/testing/pastebinc/APKBUILD
new file mode 100644
index 000000000..65eaddbc9
--- /dev/null
+++ b/testing/pastebinc/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Jeremy Thomerson <jeremy@thomersonfamily.com>
+# Maintainer: Jeremy Thomerson <jeremy@thomersonfamily.com>
+pkgname=pastebinc
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="utility to pipe data into a paste on pastebin.com or a similar site"
+url="https://github.com/jthomerson/pastebinc"
+arch="all"
+license="ASL 2.0"
+depends=
+depends_dev=
+makedepends="wget glib-dev curl-dev"
+install=""
+subpackages=""
+source="saveas-https://github.com/jthomerson/pastebinc/tarball/RELEASE_0.9.1/$pkgname-$pkgver-$pkgrel.tar.gz"
+_builddir="$srcdir/jthomerson-pastebinc-e16f22d"
+
+makeparams="VERSION=$pkgver-$pkgrel CONFDIR=/etc/pastebinc"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make $makeparams clean || return 1
+ make $makeparams || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make $makeparams DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="68a1c51b2fa39ecb6fd29a14f2e9f591 pastebinc-0.9.1-0.tar.gz"
diff --git a/testing/pcapy/APKBUILD b/testing/pcapy/APKBUILD
new file mode 100644
index 000000000..dd9971ec3
--- /dev/null
+++ b/testing/pcapy/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=pcapy
+pkgver=0.10.5
+pkgrel=0
+pkgdesc="Module to interfaces with the libpcap packet capture library"
+url="http://oss.coresecurity.com/projects/pcapy.html"
+arch="all"
+license="ASL"
+depends=""
+depends_dev=""
+makedepends="python-dev libpcap-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://oss.coresecurity.com/repo/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="1dcff6af494f3d6763f457aa86aa0853 pcapy-0.10.5.tar.gz"
diff --git a/testing/pdns-gui/0010-replace-bash-with-sh.patch b/testing/pdns-gui/0010-replace-bash-with-sh.patch
new file mode 100644
index 000000000..e684009bf
--- /dev/null
+++ b/testing/pdns-gui/0010-replace-bash-with-sh.patch
@@ -0,0 +1,81 @@
+--- ./batch/install.sh.orig
++++ ./batch/install.sh
+@@ -1,10 +1,11 @@
+-#!/bin/bash
++#!/bin/sh
+
+-abspath=$(cd ${0%/*} && pwd -P)
++abspath=${0%/*}
++php=$(which php)
+
+-if [[ `which php` == "" ]]; then
++if [ -z "$php" ]; then
+ echo "Error: can't locate PHP CLI interpreter"
+ exit 1
+ fi
+
+-php -q $abspath/install.php
++$php -q $abspath/install.php
+--- ./batch/install.php.orig
++++ ./batch/install.php
+@@ -110,7 +110,7 @@
+ echo "\n\nAnd make sure 'mod_rewrite' is enabled.\n\n";
+ /**
+ * Interactively prompts for input without echoing to the terminal.
+- * Requires a bash shell or Windows and won't work with
++ * Requires a sh shell or Windows and won't work with
+ * safe_mode settings (Uses `shell_exec`)
+ */
+ function prompt_silent($prompt = "Enter Password:") {
+@@ -125,12 +125,12 @@
+ unlink($vbscript);
+ return $password;
+ } else {
+- $command = "/usr/bin/env bash -c 'echo OK'";
++ $command = "/usr/bin/env sh -c 'echo OK'";
+ if (rtrim(shell_exec($command)) !== 'OK') {
+- trigger_error("Can't invoke bash");
++ trigger_error("Can't invoke sh");
+ return;
+ }
+- $command = "/usr/bin/env bash -c 'read -s -p \""
++ $command = "/usr/bin/env sh -c 'read -s -p \""
+ . addslashes($prompt)
+ . "\" mypassword && echo \$mypassword'";
+ $password = rtrim(shell_exec($command));
+--- ./batch/upgrade.sh.orig
++++ ./batch/upgrade.sh
+@@ -1,10 +1,11 @@
+-#!/bin/bash
++#!/bin/sh
+
+-abspath=$(cd ${0%/*} && pwd -P)
++abspath=${0%/*}
++php=$(which php)
+
+-if [[ `which php` == "" ]]; then
++if [ -z "$php" ]; then
+ echo "Error: can't locate PHP CLI interpreter"
+ exit 1
+ fi
+
+-php -q $abspath/upgrade.php
++$php -q $abspath/upgrade.php
+--- ./batch/dev/refresh.sh.orig
++++ ./batch/dev/refresh.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ echo ""
+ echo ""
+@@ -15,8 +15,7 @@
+ echo -n " Do you want to continue [no]: "
+ read confirm
+
+-if [[ "$confirm" != "YES" ]]
+-then
++if [ "$confirm" != "YES" ]; then
+ exit 0
+ fi
+
diff --git a/testing/pdns-gui/0020-update-for-mysql55.patch b/testing/pdns-gui/0020-update-for-mysql55.patch
new file mode 100644
index 000000000..2f2800a20
--- /dev/null
+++ b/testing/pdns-gui/0020-update-for-mysql55.patch
@@ -0,0 +1,67 @@
+--- ./data/sql/lib.model.schema.sql.orig
++++ ./data/sql/lib.model.schema.sql
+@@ -21,7 +21,7 @@
+ `account` VARCHAR(40),
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name_index` (`name`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- records
+@@ -47,7 +47,7 @@
+ CONSTRAINT `records_FK_1`
+ FOREIGN KEY (`domain_id`)
+ REFERENCES `domains` (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- supermasters
+@@ -63,7 +63,7 @@
+ `account` VARCHAR(40),
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- template
+@@ -78,7 +78,7 @@
+ `name` VARCHAR(255),
+ `type` VARCHAR(45),
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- template_record
+@@ -101,7 +101,7 @@
+ CONSTRAINT `template_record_FK_1`
+ FOREIGN KEY (`template_id`)
+ REFERENCES `template` (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ #-----------------------------------------------------------------------------
+ #-- setting
+@@ -115,7 +115,7 @@
+ `name` VARCHAR(255) NOT NULL,
+ `value` TEXT,
+ PRIMARY KEY (`name`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ # This restores the fkey checks, after having unset them earlier
+ SET FOREIGN_KEY_CHECKS = 1;
+--- ./data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql.orig
++++ ./data/sql/plugins.sfPropelAuditPlugin.lib.model.schema.sql
+@@ -22,7 +22,7 @@
+ `type` VARCHAR(255),
+ `created_at` DATETIME,
+ PRIMARY KEY (`id`)
+-)Type=MyISAM;
++) Engine=MyISAM;
+
+ # This restores the fkey checks, after having unset them earlier
+ SET FOREIGN_KEY_CHECKS = 1;
diff --git a/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch b/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch
new file mode 100644
index 000000000..6c3c5a7aa
--- /dev/null
+++ b/testing/pdns-gui/0030-remove-zend.ze1_compatibility_mode-option.patch
@@ -0,0 +1,12 @@
+--- ./data/symfony/config/php.yml.orig
++++ ./data/symfony/config/php.yml
+@@ -4,9 +4,6 @@
+ arg_separator.output: |
+ &amp;
+
+-check:
+- zend.ze1_compatibility_mode: off
+-
+ warn:
+ magic_quotes_gpc: off
+ register_globals: off
diff --git a/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch b/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch
new file mode 100644
index 000000000..4842a425f
--- /dev/null
+++ b/testing/pdns-gui/0040-alpine-default-htaccess-fix.patch
@@ -0,0 +1,11 @@
+--- ./web/.htaccess.orig
++++ ./web/.htaccess
+@@ -5,7 +5,7 @@
+
+ # uncomment the following line, if you are having trouble
+ # getting no_script_name to work
+- #RewriteBase /
++ RewriteBase /pdns-gui
+
+ # we skip all files with .something
+ # comment the following 3 lines to allow periods in routes
diff --git a/testing/pdns-gui/APKBUILD b/testing/pdns-gui/APKBUILD
new file mode 100644
index 000000000..481279012
--- /dev/null
+++ b/testing/pdns-gui/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdns-gui
+pkgver=0.3.3
+pkgrel=1
+pkgdesc="Web-based GUI for administering PowerDNS"
+url="http://code.google.com/p/pdns-gui/"
+arch="noarch"
+license="GPL"
+depends="mysql php php-cli php-mysql php-xsl pdns pdns-backend-mysql"
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.post-install $pkgname.post-upgrade"
+subpackages=
+source="http://$pkgname.googlecode.com/files/$pkgname.$pkgver.tgz
+ 0010-replace-bash-with-sh.patch
+ 0020-update-for-mysql55.patch
+ 0030-remove-zend.ze1_compatibility_mode-option.patch
+ 0040-alpine-default-htaccess-fix.patch
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$pkgname.$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ # copy pdns-gui
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname || return 1
+ cp -a "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
+
+ # move log directory
+ mkdir -p "$pkgdir"/var/log/$pkgname || return 1
+ chmod 2755 "$pkgdir"/var/log/$pkgname || return 1
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/log || return 1
+ ln -fs /var/log/$pkgname "$pkgdir"/usr/share/webapps/$pkgname/log \
+ || return 1
+
+ # remove the install file
+ rm "$pkgdir"/usr/share/webapps/$pkgname/INSTALL || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+md5sums="caa45c5408764ccd98cfffd69e5e976f pdns-gui.0.3.3.tgz
+98acdea457a4805c77cea373a6d57029 0010-replace-bash-with-sh.patch
+21683d18b30aef6082803339413f8c42 0020-update-for-mysql55.patch
+8865c965b6c81dbf2d9de5f8956b0ae0 0030-remove-zend.ze1_compatibility_mode-option.patch
+d621eecb4f688640cb514aff1ea8ef7d 0040-alpine-default-htaccess-fix.patch
+2a4d9133e4ac0c22ed7bd408052b5de0 pdns-gui.apache2.conf"
diff --git a/testing/pdns-gui/pdns-gui.apache2.conf b/testing/pdns-gui/pdns-gui.apache2.conf
new file mode 100644
index 000000000..35e866853
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.apache2.conf
@@ -0,0 +1,7 @@
+Alias /pdns-gui "/usr/share/webapps/pdns-gui/web"
+<Directory "/usr/share/webapps/pdns-gui/web">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/testing/pdns-gui/pdns-gui.post-install b/testing/pdns-gui/pdns-gui.post-install
new file mode 100644
index 000000000..4bc6d990a
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.post-install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* pdns-gui has been installed in: /usr/share/webapps/pdns-gui" >&2
+echo "* pdns-gui logs are at : /var/log/pdns-gui" >&2
+echo "* pdns-gui apache2 config is at : /etc/apache2/conf.d/pdns-gui.conf" >&2
+echo "*" >&2
+echo "* To finish installing pdns-gui, please run the following script:" >&2
+echo "* /usr/share/webapps/pdns-gui/batch/install.sh" >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/pdns-gui/pdns-gui.post-upgrade b/testing/pdns-gui/pdns-gui.post-upgrade
new file mode 100644
index 000000000..7d9922a5d
--- /dev/null
+++ b/testing/pdns-gui/pdns-gui.post-upgrade
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* To finish upgrading pdns-gui, please run the following script:" >&2
+echo "* /usr/share/webapps/pdns-gui/batch/upgrade.sh" >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/pdns/0010-disable-execinfo.patch b/testing/pdns/0010-disable-execinfo.patch
new file mode 100644
index 000000000..23747b31b
--- /dev/null
+++ b/testing/pdns/0010-disable-execinfo.patch
@@ -0,0 +1,25 @@
+--- ./pdns/receiver.cc.orig
++++ ./pdns/receiver.cc
+@@ -375,10 +375,11 @@
+
+
+ #ifdef __linux__
+-#include <execinfo.h>
++//#include <execinfo.h>
+ static void tbhandler(int num)
+ {
+- L<<Logger::Critical<<"Got a signal "<<num<<", attempting to print trace: "<<endl;
++ L<<Logger::Critical<<"Got a signal "<<num<<" (trace printing hard-disabled)"<<endl;
++/*
+ void *array[20]; //only care about last 17 functions (3 taken with tracing support)
+ size_t size;
+ char **strings;
+@@ -389,7 +390,7 @@
+
+ for (i = 0; i < size; i++) //skip useless functions
+ L<<Logger::Error<<strings[i]<<endl;
+-
++*/
+
+ signal(SIGABRT, SIG_DFL);
+ abort();//hopefully will give core
diff --git a/testing/pdns/APKBUILD b/testing/pdns/APKBUILD
new file mode 100644
index 000000000..482a57b31
--- /dev/null
+++ b/testing/pdns/APKBUILD
@@ -0,0 +1,112 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdns
+pkgver=3.0
+_extver=rc1
+_realver=$pkgver-$_extver
+pkgrel=0
+pkgdesc="PowerDNS Authoritative Server"
+url="http://www.powerdns.com/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev boost-dev lua-dev openldap-dev mysql-dev
+ postgresql-dev sqlite-dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages="$pkgname-doc
+ $pkgname-backend-geo:backend_geo
+ $pkgname-backend-ldap:backend_ldap
+ $pkgname-backend-mysql:backend_mysql
+ $pkgname-backend-pgsql:backend_pgsql
+ $pkgname-backend-pipe:backend_pipe
+ $pkgname-backend-sqlite3:backend_sqlite3
+ "
+pkgusers="pdns"
+pkggroups="pdns"
+source="http://powerdnssec.org/downloads/$pkgname-$_realver.tar.gz
+ 0010-disable-execinfo.patch
+ pdns.initd
+ pdns.conf
+ "
+
+_builddir="$srcdir/$pkgname-$_realver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --libdir=/usr/lib/pdns \
+ --with-modules="" \
+ --with-dynmodules="geo ldap gmysql gpgsql pipe gsqlite3" \
+ --disable-recursor \
+ --disable-static \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ rm "$pkgdir"/etc/pdns.conf-dist
+ install -m600 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname.conf || return 1
+ chown pdns:pdns "$pkgdir"/etc/$pkgname.conf || return 1
+}
+
+doc() {
+ mkdir -p "$subpkgdir"/usr || return 1
+ mv "$pkgdir"/usr/share "$subpkgdir"/usr/ || return 1
+
+ _docs="AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ for _doc in $_docs; do
+ cp "$_builddir"/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+}
+
+backend_geo() { _mv_backend geo; }
+backend_ldap() { _mv_backend ldap openldap; }
+backend_mysql() { _mv_backend gmysql mysql; }
+backend_pgsql() { _mv_backend gpgsql postgresql; }
+backend_pipe() { _mv_backend pipe; }
+backend_sqlite3() { _mv_backend gsqlite3 sqlite; }
+
+_mv_backend() {
+ local backend=$1
+ pkgdesc="${backend} backend module for PowerDNS"
+
+ # backend dependencies
+ if [ -n "${2-}" ]; then
+ depends="${2-}"
+ fi
+ depends="${depends} ${pkgname}"
+
+ mkdir -p "$subpkgdir"/usr/lib/pdns || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.so \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.la \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+}
+
+md5sums="99a457688dcc246faa43dfb64c65c424 pdns-3.0-rc1.tar.gz
+fd4d14c30bae793072ba7f3fa6cca80e 0010-disable-execinfo.patch
+3c4789e9a7330579d1882344bc10b27c pdns.initd
+351bac7f784a1a40e768466d9e6f1a79 pdns.conf"
diff --git a/testing/pdns/pdns.conf b/testing/pdns/pdns.conf
new file mode 100644
index 000000000..e0238c0ac
--- /dev/null
+++ b/testing/pdns/pdns.conf
@@ -0,0 +1,337 @@
+# Autogenerated configuration file template
+#################################
+# allow-axfr-ips Allow zonetransfers only to these subnets
+#
+# allow-axfr-ips=0.0.0.0/0
+
+#################################
+# allow-recursion List of subnets that are allowed to recurse
+#
+# allow-recursion=0.0.0.0/0
+
+#################################
+# allow-recursion-override Set this so that local data fully overrides the recursor
+#
+# allow-recursion-override=no
+
+#################################
+# cache-ttl Seconds to store packets in the PacketCache
+#
+cache-ttl=60
+
+#################################
+# chroot If set, chroot to this directory for more security
+#
+chroot=/var/empty
+
+#################################
+# config-dir Location of configuration directory (pdns.conf)
+#
+config-dir=/etc
+
+#################################
+# config-name Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# control-console Debugging switch - don't use
+#
+# control-console=no
+
+#################################
+# daemon Operate as a daemon
+#
+daemon=yes
+
+#################################
+# default-soa-name name to insert in the SOA record if none set in the backend
+#
+# default-soa-name=a.misconfigured.powerdns.server
+
+#################################
+# default-ttl Seconds a result is valid if not set otherwise
+#
+# default-ttl=3600
+
+#################################
+# disable-axfr Disable zonetransfers but do allow TCP queries
+#
+# disable-axfr=no
+
+#################################
+# disable-tcp Do not listen to TCP queries
+#
+# disable-tcp=no
+
+#################################
+# distributor-threads Default number of Distributor (backend) threads to start
+#
+distributor-threads=1
+
+#################################
+# do-ipv6-additional-processing Do AAAA additional processing
+#
+# do-ipv6-additional-processing=no
+
+#################################
+# fancy-records Process URL and MBOXFW records
+#
+# fancy-records=no
+
+#################################
+# guardian Run within a guardian process
+#
+guardian=yes
+
+#################################
+# launch Which backends to launch and order to query them in
+#
+# launch=
+
+#################################
+# lazy-recursion Only recurse if question cannot be answered locally
+#
+# lazy-recursion=yes
+
+#################################
+# load-modules Load this module - supply absolute or relative path
+#
+# load-modules=
+
+#################################
+# local-address Local IP addresses to which we bind
+#
+# local-address=0.0.0.0
+
+#################################
+# local-ipv6 Local IP address to which we bind
+#
+# local-ipv6=
+
+#################################
+# local-port The port on which we listen
+#
+local-port=53
+
+#################################
+# log-dns-details If PDNS should log DNS non-erroneous details
+#
+# log-dns-details=
+
+#################################
+# log-failed-updates If PDNS should log failed update requests
+#
+# log-failed-updates=
+
+#################################
+# logfile Logfile to use (Windows only)
+#
+# logfile=pdns.log
+
+#################################
+# logging-facility Log under a specific facility
+#
+# logging-facility=
+
+#################################
+# loglevel Amount of logging. Higher is more. Do not set below 3
+#
+loglevel=3
+
+#################################
+# master Act as a master
+#
+# master=no
+
+#################################
+# max-queue-length Maximum queuelength before considering situation lost
+#
+# max-queue-length=5000
+
+#################################
+# max-tcp-connections Maximum number of TCP connections
+#
+# max-tcp-connections=10
+
+#################################
+# module-dir Default directory for modules
+#
+module-dir=/usr/lib/pdns
+
+#################################
+# negquery-cache-ttl Seconds to store packets in the PacketCache
+#
+negquery-cache-ttl=60
+
+#################################
+# no-shuffle Set this to prevent random shuffling of answers - for regression testing
+#
+# no-shuffle=off
+
+#################################
+# out-of-zone-additional-processing Do out of zone additional processing
+#
+# out-of-zone-additional-processing=yes
+
+#################################
+# pipebackend-abi-version Version of the pipe backend ABI
+#
+# pipebackend-abi-version=1
+
+#################################
+# query-cache-ttl Seconds to store packets in the PacketCache
+#
+# query-cache-ttl=20
+
+#################################
+# query-local-address Source IP address for sending queries
+#
+# query-local-address=
+
+#################################
+# query-logging Hint backends that queries should be logged
+#
+# query-logging=no
+
+#################################
+# queue-limit Maximum number of milliseconds to queue a query
+#
+# queue-limit=1500
+
+#################################
+# recursive-cache-ttl Seconds to store packets in the PacketCache
+#
+# recursive-cache-ttl=10
+
+#################################
+# recursor If recursion is desired, IP address of a recursing nameserver
+#
+# recursor=no
+
+#################################
+# send-root-referral Send out old-fashioned root-referral instead of ServFail in case of no authority
+#
+# send-root-referral=no
+
+#################################
+# setgid If set, change group id to this gid for more security
+#
+setgid=pdns
+
+#################################
+# setuid If set, change user id to this uid for more security
+#
+setuid=pdns
+
+#################################
+# skip-cname Do not perform CNAME indirection for each query
+#
+# skip-cname=no
+
+#################################
+# slave Act as a slave
+#
+# slave=no
+
+#################################
+# slave-cycle-interval Reschedule failed SOA serial checks once every .. seconds
+#
+# slave-cycle-interval=60
+
+#################################
+# smtpredirector Our smtpredir MX host
+#
+# smtpredirector=a.misconfigured.powerdns.smtp.server
+
+#################################
+# soa-expire-default Default SOA expire
+#
+# soa-expire-default=604800
+
+#################################
+# soa-minimum-ttl Default SOA mininum ttl
+#
+# soa-minimum-ttl=3600
+
+#################################
+# soa-refresh-default Default SOA refresh
+#
+# soa-refresh-default=10800
+
+#################################
+# soa-retry-default Default SOA retry
+#
+# soa-retry-default=3600
+
+#################################
+# soa-serial-offset Make sure that no SOA serial is less than this number
+#
+# soa-serial-offset=0
+
+#################################
+# socket-dir Where the controlsocket will live
+#
+socket-dir=/var/run
+
+#################################
+# strict-rfc-axfrs Perform strictly rfc compliant axfrs (very slow)
+#
+# strict-rfc-axfrs=no
+
+#################################
+# trusted-notification-proxy IP address of incoming notification proxy
+#
+# trusted-notification-proxy=
+
+#################################
+# urlredirector Where we send hosts to that need to be url redirected
+#
+# urlredirector=127.0.0.1
+
+#################################
+# use-logfile Use a log file (Windows only)
+#
+use-logfile=no
+
+#################################
+# version-string PowerDNS version in packets - full, anonymous, powerdns or custom
+#
+# version-string=full
+
+#################################
+# webserver Start a webserver for monitoring
+#
+webserver=no
+
+#################################
+# webserver-address IP Address of webserver to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-password Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port Port of webserver to listen on
+#
+# webserver-port=8081
+
+#################################
+# webserver-print-arguments If the webserver should print arguments
+#
+# webserver-print-arguments=no
+
+#################################
+# wildcard-url Process URL and MBOXFW records
+#
+# wildcard-url=no
+
+#################################
+# wildcards Honor wildcards in the database
+#
+wildcards=yes
+
+
diff --git a/testing/pdns/pdns.initd b/testing/pdns/pdns.initd
new file mode 100644
index 000000000..593d56347
--- /dev/null
+++ b/testing/pdns/pdns.initd
@@ -0,0 +1,64 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/files/pdns,v 1.10 2007/05/07 20:19:18 swegener Exp $
+
+name=pdns
+daemon=/usr/sbin/pdns_server
+pdns_control=/usr/bin/pdns_control
+opts="reload monitor dump"
+
+PDNS_INSTANCE="${SVCNAME#pdns[.-]}"
+PDNS_CONFIG=""
+
+if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ]
+then
+ PDNS_CONFIG="--config-name=${PDNS_INSTANCE}"
+else
+ PDNS_INSTANCE="default"
+fi
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE})"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=yes \
+ --guardian=yes
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} quit &>/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} cycle &>/dev/null
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables"
+ ${pdns_control} ${PDNS_CONFIG} list
+ eend $?
+}
+
+monitor() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=no \
+ --guardian=no \
+ --control-console=yes \
+ --loglevel=9 \
+ --log-dns-details=yes \
+ --query-logging=yes
+ eend $?
+}
diff --git a/testing/pdns/pdns.post-deinstall b/testing/pdns/pdns.post-deinstall
new file mode 100644
index 000000000..f1efa1609
--- /dev/null
+++ b/testing/pdns/pdns.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+deluser pdns 2>/dev/null
+exit 0
diff --git a/testing/pdns/pdns.pre-install b/testing/pdns/pdns.pre-install
new file mode 100644
index 000000000..c9d2d1473
--- /dev/null
+++ b/testing/pdns/pdns.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+adduser -H -h /var/empty -D -s /bin/false pdns 2>/dev/null
+exit 0
diff --git a/testing/perl-async-mergepoint/APKBUILD b/testing/perl-async-mergepoint/APKBUILD
new file mode 100644
index 000000000..9d9300c86
--- /dev/null
+++ b/testing/perl-async-mergepoint/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-async-mergepoint
+_pkgreal=Async-MergePoint
+pkgver=0.04
+pkgrel=0
+pkgdesc="resynchronise diverged control flow"
+url="http://search.cpan.org/dist/Async-MergePoint/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends="perl-test-fatal"
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="e9055c122e02fd75c8d604bb1dca49ca Async-MergePoint-0.04.tar.gz"
diff --git a/testing/perl-bit-vector/APKBUILD b/testing/perl-bit-vector/APKBUILD
new file mode 100644
index 000000000..09eead4e6
--- /dev/null
+++ b/testing/perl-bit-vector/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-bit-vector
+_realname=Bit-Vector
+pkgver=7.1
+pkgrel=0
+pkgdesc="Efficient bit vector, set of integers, and big int math library"
+url="http://search.cpan.org/~stbey/Bit-Vector-7.1/"
+arch="all"
+license="PerlArtistic"
+depends="perl perl-carp-clan"
+depends_dev=""
+makedepends="perl-dev perl-carp-clan"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/ST/STBEY/$_realname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="164c8574b728f6171b2a6f564fcd2e50 Bit-Vector-7.1.tar.gz"
diff --git a/testing/perl-class-gomor/APKBUILD b/testing/perl-class-gomor/APKBUILD
new file mode 100644
index 000000000..db6d2452f
--- /dev/null
+++ b/testing/perl-class-gomor/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-class-gomor
+_realname=Class-Gomor
+pkgver=1.02
+pkgrel=0
+pkgdesc="Another class and object builder"
+url="http://search.cpan.org/~gomor/Class-Gomor-1.02/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/G/GO/GOMOR/$_realname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="287c3b3be72fcb4a4089fe232b8b1002 Class-Gomor-1.02.tar.gz"
diff --git a/testing/perl-cps/APKBUILD b/testing/perl-cps/APKBUILD
new file mode 100644
index 000000000..1b1aaab0a
--- /dev/null
+++ b/testing/perl-cps/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-cps
+_pkgreal=CPS
+pkgver=0.11
+pkgrel=0
+pkgdesc="manage flow of control in Continuation-Passing Style"
+url="http://search.cpan.org/dist/CPS/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="e4f36f053f538a6fa1ea4ed1de038f9e CPS-0.11.tar.gz"
diff --git a/testing/perl-crypt-openssl-bignum/APKBUILD b/testing/perl-crypt-openssl-bignum/APKBUILD
new file mode 100644
index 000000000..3e30d1444
--- /dev/null
+++ b/testing/perl-crypt-openssl-bignum/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-crypt-openssl-bignum
+_pkgreal=Crypt-OpenSSL-Bignum
+pkgver=0.04
+pkgrel=0
+pkgdesc="Perl wrapper of OpenSSL's multiprecision integer arithmetic"
+url="http://search.cpan.org/dist/Crypt-OpenSSL-Bignum/"
+arch="all"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/I/IR/IROBERTS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="9369ef722b0705c0604998559988eb18 Crypt-OpenSSL-Bignum-0.04.tar.gz"
diff --git a/testing/perl-data-hexdump/APKBUILD b/testing/perl-data-hexdump/APKBUILD
new file mode 100644
index 000000000..f2e7ddbeb
--- /dev/null
+++ b/testing/perl-data-hexdump/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=perl-data-hexdump
+_pkgreal=Data-HexDump
+pkgver=0.02
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/Data-HexDump/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/F/FT/FTASSIN/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="467b7183d1062ab4a502b50c34e7d67f Data-HexDump-0.02.tar.gz"
diff --git a/testing/perl-dbd-odbc/APKBUILD b/testing/perl-dbd-odbc/APKBUILD
new file mode 100644
index 000000000..051ed538d
--- /dev/null
+++ b/testing/perl-dbd-odbc/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Jeff Bilyk <jbilyk at gmail>
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=perl-dbd-odbc
+_realpkgname=DBD-ODBC
+pkgver=1.31
+pkgrel=0
+pkgdesc="Perl CPAN DBD::ODBC module"
+url="http://search.cpan.org/dist/DBD-ODBC/"
+arch="all"
+license="GPL PerlArtistic"
+depends="perl perl-dbi unixodbc"
+makedepends="perl perl-dev unixodbc-dev"
+source="http://search.cpan.org/CPAN/authors/id/M/MJ/MJEVANS/DBD-ODBC-$pkgver.tar.gz"
+
+_builddir="$srcdir"/${_realpkgname}-$pkgver
+
+prepare() {
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="a6700d6ad8164e783d973de3b79b769d DBD-ODBC-1.31.tar.gz"
diff --git a/testing/perl-extutils-depends/APKBUILD b/testing/perl-extutils-depends/APKBUILD
new file mode 100644
index 000000000..2027233ff
--- /dev/null
+++ b/testing/perl-extutils-depends/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-extutils-depends
+_pkgreal=ExtUtils-Depends
+pkgver=0.304
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/ExtUtils-Depends/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="da66d6cb19e2c76d7f3266846832026c ExtUtils-Depends-0.304.tar.gz"
diff --git a/testing/perl-extutils-pkgconfig/APKBUILD b/testing/perl-extutils-pkgconfig/APKBUILD
new file mode 100644
index 000000000..03bc080e2
--- /dev/null
+++ b/testing/perl-extutils-pkgconfig/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-extutils-pkgconfig
+_pkgreal=ExtUtils-PkgConfig
+pkgver=1.12
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/ExtUtils-PkgConfig/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/T/TS/TSCH/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="8fc5c0b30cfda2048ec87ae418cc3508 ExtUtils-PkgConfig-1.12.tar.gz"
diff --git a/testing/perl-glib/APKBUILD b/testing/perl-glib/APKBUILD
new file mode 100644
index 000000000..fe083a579
--- /dev/null
+++ b/testing/perl-glib/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-glib
+_pkgreal=Glib
+pkgver=1.241
+pkgrel=0
+pkgdesc="Perl wrappers for the GLib utility and Object libraries"
+url="http://search.cpan.org/dist/Glib/"
+arch="all"
+license="GPL PerlArtistic"
+cpandepends="perl-extutils-pkgconfig perl-extutils-depends"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends glib-dev"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/X/XA/XAOC/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="412118238a372041b130c27d7992f5c3 Glib-1.241.tar.gz"
diff --git a/testing/perl-heap/APKBUILD b/testing/perl-heap/APKBUILD
new file mode 100644
index 000000000..2bcd88ac8
--- /dev/null
+++ b/testing/perl-heap/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-heap
+_pkgreal=Heap
+pkgver=0.80
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/Heap/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/J/JM/JMM/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="05fed19a7552dadee11c780cd68c0116 Heap-0.80.tar.gz"
diff --git a/testing/perl-io-async-loop-glib/APKBUILD b/testing/perl-io-async-loop-glib/APKBUILD
new file mode 100644
index 000000000..08d9d75dd
--- /dev/null
+++ b/testing/perl-io-async-loop-glib/APKBUILD
@@ -0,0 +1,39 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-io-async-loop-glib
+_pkgreal=IO-Async-Loop-Glib
+pkgver=0.20
+pkgrel=0
+pkgdesc="use C<IO::Async> with F<Glib> or F<GTK>"
+url="http://search.cpan.org/dist/IO-Async-Loop-Glib/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-glib perl-io-async"
+cpanmakedepends="perl-io-async"
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends perl-test-pod perl-test-fatal
+ perl-test-refcount"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="57eab4909ffb08162d6a0bd03f61ed0c IO-Async-Loop-Glib-0.20.tar.gz"
diff --git a/testing/perl-io-async-ssl/APKBUILD b/testing/perl-io-async-ssl/APKBUILD
new file mode 100644
index 000000000..933343d54
--- /dev/null
+++ b/testing/perl-io-async-ssl/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-io-async-ssl
+_pkgreal=IO-Async-SSL
+pkgver=0.06
+pkgrel=0
+pkgdesc="Use SSL/TLS with L<IO::Async>"
+url="http://search.cpan.org/dist/IO-Async-SSL/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-io-socket-ssl perl-io-async"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="d357dc71b0bbc0f43ba8fd55f869ae54 IO-Async-SSL-0.06.tar.gz"
diff --git a/testing/perl-io-async/APKBUILD b/testing/perl-io-async/APKBUILD
new file mode 100644
index 000000000..a5e6d1541
--- /dev/null
+++ b/testing/perl-io-async/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-io-async
+_pkgreal=IO-Async
+pkgver=0.45
+pkgrel=0
+pkgdesc="Asynchronous event-driven programming"
+url="http://search.cpan.org/dist/IO-Async/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-heap perl-async-mergepoint perl-cps"
+cpanmakedepends="perl-test-fatal perl-test-warn perl-test-refcount perl-test-identity"
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="00f4213a413bb1fc431bfe56568c0192 IO-Async-0.45.tar.gz"
diff --git a/testing/perl-local-lib/APKBUILD b/testing/perl-local-lib/APKBUILD
new file mode 100644
index 000000000..96b27e279
--- /dev/null
+++ b/testing/perl-local-lib/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-local-lib
+_pkgreal=local-lib
+pkgver=1.008004
+pkgrel=0
+pkgdesc="create and use a local lib/ for perl modules with PERL5LIB"
+url="http://search.cpan.org/dist/local-lib/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="6244fa9d77e818594acbaf572aece326 local-lib-1.008004.tar.gz"
diff --git a/testing/perl-lwp-protocol-https/APKBUILD b/testing/perl-lwp-protocol-https/APKBUILD
new file mode 100644
index 000000000..7c9f60a35
--- /dev/null
+++ b/testing/perl-lwp-protocol-https/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-lwp-protocol-https
+_pkgreal=LWP-Protocol-https
+pkgver=6.02
+pkgrel=0
+pkgdesc="Provide https support for LWP::UserAgent"
+url="http://search.cpan.org/dist/LWP-Protocol-https/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-libwww perl-io-socket-ssl perl-mozilla-ca perl-net-http"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="a37185492b15ad5ac13da4aef48bd388 LWP-Protocol-https-6.02.tar.gz"
diff --git a/testing/perl-math-random-mt-auto/APKBUILD b/testing/perl-math-random-mt-auto/APKBUILD
new file mode 100644
index 000000000..db559d1f3
--- /dev/null
+++ b/testing/perl-math-random-mt-auto/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-math-random-mt-auto
+_pkgreal=Math-Random-MT-Auto
+pkgver=6.16
+pkgrel=0
+pkgdesc="Auto-seeded Mersenne Twister PRNGs"
+url="http://search.cpan.org/dist/Math-Random-MT-Auto/"
+arch="all"
+license="unrestricted"
+cpandepends="perl-object-insideout perl-exception-class"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/J/JD/JDHEDDEN/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="602470f808dbac3f68b373ed1c2be16a Math-Random-MT-Auto-6.16.tar.gz"
diff --git a/testing/perl-modern-perl/APKBUILD b/testing/perl-modern-perl/APKBUILD
new file mode 100644
index 000000000..40ac9f297
--- /dev/null
+++ b/testing/perl-modern-perl/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-modern-perl
+_pkgreal=Modern-Perl
+pkgver=1.03
+pkgrel=0
+pkgdesc="enable all of the features of Modern Perl with one command"
+url="http://search.cpan.org/dist/Modern-Perl/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="1338c29f86b109280f8c723ece49299e Modern-Perl-1.03.tar.gz"
diff --git a/testing/perl-mozilla-ca/APKBUILD b/testing/perl-mozilla-ca/APKBUILD
new file mode 100644
index 000000000..b23c19c34
--- /dev/null
+++ b/testing/perl-mozilla-ca/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-mozilla-ca
+_pkgreal=Mozilla-CA
+pkgver=20110409
+pkgrel=0
+pkgdesc="Mozilla's CA cert bundle in PEM format"
+url="http://search.cpan.org/dist/Mozilla-CA/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AB/ABH/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="b68cbbc2a364de8e2c418b46126221d0 Mozilla-CA-20110409.tar.gz"
diff --git a/testing/perl-net-async-http/APKBUILD b/testing/perl-net-async-http/APKBUILD
new file mode 100644
index 000000000..d4f3961aa
--- /dev/null
+++ b/testing/perl-net-async-http/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-net-async-http
+_pkgreal=Net-Async-HTTP
+pkgver=0.13
+pkgrel=0
+pkgdesc="use HTTP with C<IO::Async>"
+url="http://search.cpan.org/dist/Net-Async-HTTP/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-uri perl-http-message perl-io-async"
+cpanmakedepends="perl-http-cookies perl-test-identity perl-io-async"
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="a624b88a7545cda911e7a983e180e32a Net-Async-HTTP-0.13.tar.gz"
diff --git a/testing/perl-net-ipv4addr/APKBUILD b/testing/perl-net-ipv4addr/APKBUILD
new file mode 100644
index 000000000..4f6aa28d2
--- /dev/null
+++ b/testing/perl-net-ipv4addr/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-net-ipv4addr
+_realname=Net-IPv4Addr
+pkgver=0.10
+pkgrel=0
+pkgdesc="Perl extension for manipulating IPv4 addresses"
+url="http://search.cpan.org/~frajulac/Net-IPv4Addr-0.10/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl "
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/F/FR/FRAJULAC/$_realname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="57aa8e28ebcd4c0c9f15792740e53d3c Net-IPv4Addr-0.10.tar.gz"
diff --git a/testing/perl-net-netmask/APKBUILD b/testing/perl-net-netmask/APKBUILD
new file mode 100644
index 000000000..ca9479438
--- /dev/null
+++ b/testing/perl-net-netmask/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-net-netmask
+_realname=Net-Netmask
+pkgver=1.9016
+pkgrel=0
+pkgdesc="Perl extension to parse, manipulate, and lookup IP network blocks"
+url="http://search.cpan.org/~muir/Net-Netmask-1.9016/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MU/MUIR/modules/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="174606b568f8545b8968aecf50ba7a37 Net-Netmask-1.9016.tar.gz"
diff --git a/testing/perl-object-insideout/APKBUILD b/testing/perl-object-insideout/APKBUILD
new file mode 100644
index 000000000..a4e187dbb
--- /dev/null
+++ b/testing/perl-object-insideout/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-object-insideout
+_pkgreal=Object-InsideOut
+pkgver=3.81
+pkgrel=0
+pkgdesc="Comprehensive inside-out object support module"
+url="http://search.cpan.org/dist/Object-InsideOut/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-exception-class"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/J/JD/JDHEDDEN/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="560170295e21857232d547ccd3b0adf0 Object-InsideOut-3.81.tar.gz"
diff --git a/testing/perl-radiusperl/APKBUILD b/testing/perl-radiusperl/APKBUILD
new file mode 100644
index 000000000..5c7d9a150
--- /dev/null
+++ b/testing/perl-radiusperl/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=perl-radiusperl
+_pkgreal=RadiusPerl
+_modulename=Authen-Radius
+pkgver=0.20
+pkgrel=0
+pkgdesc="Perl module for RadiusPerl"
+url="http://search.cpan.org/dist/RadiusPerl/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends="perl-data-hexdump"
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MA/MANOWAR/$_pkgreal-$pkgver.tar.gz"
+_builddir="$srcdir/$_modulename-$pkgver"
+prepare() {
+ cd "$_builddir"
+ if [ -e Build.PL ]; then
+ perl Build.PL installdirs=vendor || return 1
+ else
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ fi
+}
+build() {
+ cd "$_builddir"
+ # I don't make test because this packages need a radius server installed
+ make
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+md5sums="acd0f83204117e47bacc0105868266b1 RadiusPerl-0.20.tar.gz"
diff --git a/testing/perl-statistics-descriptive/APKBUILD b/testing/perl-statistics-descriptive/APKBUILD
new file mode 100644
index 000000000..de6e581ec
--- /dev/null
+++ b/testing/perl-statistics-descriptive/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=perl-statistics-descriptive
+_pkgreal=Statistics-Descriptive
+pkgver=3.0202
+pkgrel=0
+pkgdesc="Module of basic descriptive statistical functions."
+url="http://search.cpan.org/dist/Statistics-Descriptive/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/SH/SHLOMIF/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="7f66d866acbfd2d499338c16edf0e3bd Statistics-Descriptive-3.0202.tar.gz"
diff --git a/testing/perl-sub-uplevel/APKBUILD b/testing/perl-sub-uplevel/APKBUILD
new file mode 100644
index 000000000..4c285a642
--- /dev/null
+++ b/testing/perl-sub-uplevel/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-sub-uplevel
+_realname=Sub-Uplevel
+pkgver=0.22
+pkgrel=0
+pkgdesc="Apparently run a function in a higher stack frame"
+url="http://search.cpan.org/~dagolden/Sub-Uplevel-0.22/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/$_realname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="c166738a97c0424a0075ebe205d285db Sub-Uplevel-0.22.tar.gz"
diff --git a/testing/perl-sys-syslog/APKBUILD b/testing/perl-sys-syslog/APKBUILD
new file mode 100644
index 000000000..f3e958364
--- /dev/null
+++ b/testing/perl-sys-syslog/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=perl-sys-syslog
+_pkgreal=Sys-Syslog
+pkgver=0.29
+pkgrel=0
+pkgdesc="Perl interface to the UNIX syslog(3) calls"
+url="http://search.cpan.org/dist/Sys-Syslog/"
+arch="all"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="4c7aeb0a05e8dde2ab05a0b3be19d72c Sys-Syslog-0.29.tar.gz"
diff --git a/testing/perl-test-fatal/APKBUILD b/testing/perl-test-fatal/APKBUILD
new file mode 100644
index 000000000..4af1de9b3
--- /dev/null
+++ b/testing/perl-test-fatal/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-test-fatal
+_pkgreal=Test-Fatal
+pkgver=0.008
+pkgrel=0
+pkgdesc="incredibly simple helpers for testing code with exceptions"
+url="http://search.cpan.org/dist/Test-Fatal/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-try-tiny"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="201c94efbbcbd38b32e3cdc6752a6c07 Test-Fatal-0.008.tar.gz"
diff --git a/testing/perl-test-identity/APKBUILD b/testing/perl-test-identity/APKBUILD
new file mode 100644
index 000000000..a97dddc03
--- /dev/null
+++ b/testing/perl-test-identity/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-test-identity
+_pkgreal=Test-Identity
+pkgver=0.01
+pkgrel=0
+pkgdesc="assert the referential identity of a reference"
+url="http://search.cpan.org/dist/Test-Identity/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="ecef85c791cf5847e4c374983cf22a74 Test-Identity-0.01.tar.gz"
diff --git a/testing/perl-test-refcount/APKBUILD b/testing/perl-test-refcount/APKBUILD
new file mode 100644
index 000000000..d4d71f1e7
--- /dev/null
+++ b/testing/perl-test-refcount/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-test-refcount
+_pkgreal=Test-Refcount
+pkgver=0.07
+pkgrel=0
+pkgdesc="assert reference counts on objects"
+url="http://search.cpan.org/dist/Test-Refcount/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="0a78c2f25e91c27baf0f71118a970245 Test-Refcount-0.07.tar.gz"
diff --git a/testing/perl-test-simple/APKBUILD b/testing/perl-test-simple/APKBUILD
new file mode 100644
index 000000000..8122e47de
--- /dev/null
+++ b/testing/perl-test-simple/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-test-simple
+_realname=Test-Simple
+pkgver=0.98
+pkgrel=0
+pkgdesc="Perl modules for writing tests"
+url="http://search.cpan.org/~mschwern/Test-Simple-0.98/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/$_realname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="a8b26c97440269b33dd79fd847c521d8 Test-Simple-0.98.tar.gz"
diff --git a/testing/perl-test-warn/APKBUILD b/testing/perl-test-warn/APKBUILD
new file mode 100644
index 000000000..8b4779281
--- /dev/null
+++ b/testing/perl-test-warn/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-test-warn
+_pkgreal=Test-Warn
+pkgver=0.23
+pkgrel=0
+pkgdesc="Perl extension to test methods for warnings "
+url="http://search.cpan.org/dist/Test-Warn/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-tree-dag_node perl-sub-uplevel"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="96e224cba15bf69b7513c08e70496457 Test-Warn-0.23.tar.gz"
diff --git a/testing/perl-tree-dag_node/APKBUILD b/testing/perl-tree-dag_node/APKBUILD
new file mode 100644
index 000000000..dc47d6a2f
--- /dev/null
+++ b/testing/perl-tree-dag_node/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-tree-dag_node
+_pkgreal=Tree-DAG_Node
+pkgver=1.06
+pkgrel=0
+pkgdesc="(super)class for representing nodes in a tree"
+url="http://search.cpan.org/dist/Tree-DAG_Node/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/C/CO/COGENT/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="3b006f128bd1d8961fc57c466ffa05f2 Tree-DAG_Node-1.06.tar.gz"
diff --git a/testing/perl-try-tiny/APKBUILD b/testing/perl-try-tiny/APKBUILD
new file mode 100644
index 000000000..c8cad7744
--- /dev/null
+++ b/testing/perl-try-tiny/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-try-tiny
+_pkgreal=Try-Tiny
+pkgver=0.11
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/Try-Tiny/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends=""
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/D/DO/DOY/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="4d2c8ff385ac3513edf4c042dd0eacbe Try-Tiny-0.11.tar.gz"
diff --git a/testing/perl-uri-find-simple/APKBUILD b/testing/perl-uri-find-simple/APKBUILD
new file mode 100644
index 000000000..c34a90160
--- /dev/null
+++ b/testing/perl-uri-find-simple/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-uri-find-simple
+_pkgreal=URI-Find-Simple
+pkgver=1.03
+pkgrel=0
+pkgdesc="unknown"
+url="http://search.cpan.org/dist/URI-Find-Simple/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-uri-find"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/T/TO/TOMI/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="a3d62887ea6b6a17559364e8a31fcd8f URI-Find-Simple-1.03.tar.gz"
diff --git a/testing/perl-uri-find/APKBUILD b/testing/perl-uri-find/APKBUILD
new file mode 100644
index 000000000..8cf761fde
--- /dev/null
+++ b/testing/perl-uri-find/APKBUILD
@@ -0,0 +1,38 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-uri-find
+_pkgreal=URI-Find
+pkgver=20111103
+pkgrel=0
+pkgdesc="Find URIs in arbitrary text"
+url="http://search.cpan.org/dist/URI-Find/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-uri"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ perl Build.PL installdirs=vendor || return 1
+}
+
+build() {
+ cd "$_builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+ ./Build && ./Build test
+}
+
+package() {
+ cd "$_builddir"
+ ./Build install destdir="$pkgdir" || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="7129448917d708aeaab2153a5adfbf0d URI-Find-20111103.tar.gz"
diff --git a/testing/perl-xml-writer/APKBUILD b/testing/perl-xml-writer/APKBUILD
new file mode 100644
index 000000000..9c30a2929
--- /dev/null
+++ b/testing/perl-xml-writer/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=perl-xml-writer
+_realname=XML-Writer
+pkgver=0.612
+pkgrel=0
+pkgdesc="Perl extension for writing XML documents"
+url="http://search.cpan.org/~josephw/XML-Writer-0.612/"
+arch="noarch"
+license="PerlArtistic"
+depends="perl"
+depends_dev=""
+makedepends="perl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/J/JO/JOSEPHW/$_realname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="2f3c6c282f9f79d33639c55bf7afa4b0 XML-Writer-0.612.tar.gz"
diff --git a/testing/perl-xml-xpath/APKBUILD b/testing/perl-xml-xpath/APKBUILD
new file mode 100644
index 000000000..439683060
--- /dev/null
+++ b/testing/perl-xml-xpath/APKBUILD
@@ -0,0 +1,37 @@
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=perl-xml-xpath
+_pkgreal=XML-XPath
+pkgver=1.13
+pkgrel=0
+pkgdesc="a set of modules for parsing and evaluating XPath statements"
+url="http://search.cpan.org/dist/XML-XPath/"
+arch="noarch"
+license="GPL PerlArtistic"
+cpandepends="perl-xml-parser"
+cpanmakedepends=""
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/$_pkgreal-$pkgver.tar.gz"
+
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$_builddir"
+ make && make test
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+md5sums="b5919d9220d83982feb6e2321850c5d7 XML-XPath-1.13.tar.gz"
diff --git a/testing/phonon-backend-gstreamer/APKBUILD b/testing/phonon-backend-gstreamer/APKBUILD
new file mode 100644
index 000000000..3c3177a65
--- /dev/null
+++ b/testing/phonon-backend-gstreamer/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=phonon-backend-gstreamer
+pkgver=4.5.1
+pkgrel=1
+pkgdesc="gstreamer backend for phonon"
+url="http://phonon.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="gstreamer-dev gst-plugins-base-dev gst-plugins-good-dev phonon-dev mesa-dev alsa-lib-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages=""
+source="http://kde.mirrors.tds.net/pub/kde/stable/phonon/phonon-backend-gstreamer/$pkgver/src/phonon-backend-gstreamer-$pkgver.tar.bz2"
+install_if="phonon"
+
+_builddir="$srcdir"/phonon-backend-gstreamer-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="021cf7740208e7212b7ce91adb6a349b phonon-backend-gstreamer-4.5.1.tar.bz2"
diff --git a/testing/phonon/APKBUILD b/testing/phonon/APKBUILD
new file mode 100644
index 000000000..37fe0fbab
--- /dev/null
+++ b/testing/phonon/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=phonon
+pkgver=4.5.0
+pkgrel=0
+pkgdesc="KDE multimedia backend"
+url="http://phonon.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev glib-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://kde.mirrors.tds.net/pub/kde/stable/phonon/$pkgver/src/phonon-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/phonon-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="32f8d388c18fde2e23dea7bb103f9713 phonon-4.5.0.tar.bz2"
diff --git a/testing/phppgadmin/APKBUILD b/testing/phppgadmin/APKBUILD
new file mode 100644
index 000000000..f6df49ad3
--- /dev/null
+++ b/testing/phppgadmin/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=phppgadmin
+_pkgname=phpPgAdmin
+pkgver=5.0.2
+pkgrel=0
+pkgdesc="A Web-based PHP tool for administering PostgreSQL"
+url="http://phppgadmin.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="php php-pgsql php-zlib php-ctype postgresql"
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/phppgadmin/$_pkgname-$pkgver.tar.gz
+ phppgadmin.apache2.conf
+ "
+
+_builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname "$pkgdir"/etc/$pkgname \
+ || return 1
+
+ # copy phppgadmin
+ cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ \
+ || return 1
+
+ # install the config
+ install -m440 \
+ "$pkgdir"/usr/share/webapps/$pkgname/conf/config.inc.php-dist \
+ "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/conf/ || return 1
+ ln -fs /etc/phppgadmin/ "$pkgdir"/usr/share/webapps/$pkgname/conf \
+ || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+doc() {
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ _docs="CREDITS DEVELOPERS FAQ HISTORY INSTALL LICENSE TODO \
+ TRANSLATORS help"
+ for _doc in $_docs; do
+ mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/ || return 1
+ done
+}
+
+md5sums="dfdbb5860847123413596292931a44f9 phpPgAdmin-5.0.2.tar.gz
+670eec89bbe794a50d36c80f02608708 phppgadmin.apache2.conf"
diff --git a/testing/phppgadmin/phppgadmin.apache2.conf b/testing/phppgadmin/phppgadmin.apache2.conf
new file mode 100644
index 000000000..b69e01b22
--- /dev/null
+++ b/testing/phppgadmin/phppgadmin.apache2.conf
@@ -0,0 +1,7 @@
+Alias /phppgadmin "/usr/share/webapps/phppgadmin"
+<Directory "/usr/share/webapps/phppgadmin">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/testing/phppgadmin/phppgadmin.post-install b/testing/phppgadmin/phppgadmin.post-install
new file mode 100644
index 000000000..f9650a192
--- /dev/null
+++ b/testing/phppgadmin/phppgadmin.post-install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* phppgadmin has been installed to:" >&2
+echo "* /usr/share/webapps/phppgadmin" >&2
+echo "* phppgadmin config file has been installed to:" >&2
+echo "* /etc/phppgadmin/config.inc.php" >&2
+echo "* If you use apache2:" >&2
+echo "* 1) Change the ownership of the config directory:" >&2
+echo "* chown -R apache:apache /etc/phppgadmin" >&2
+echo "* 2) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/phppgadmin.conf" >&2
+echo "* 3) Restart apache2 when done." >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/pkgconf/APKBUILD b/testing/pkgconf/APKBUILD
new file mode 100644
index 000000000..ecdb9080e
--- /dev/null
+++ b/testing/pkgconf/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=pkgconf
+pkgver=0.1.1
+pkgrel=2
+pkgdesc="development framework configuration tools"
+url="http://www.atheme.org/"
+arch="all"
+license="ISC"
+depends=""
+depends_dev="popt-dev"
+makedepends="$depends_dev"
+install=""
+replaces="pkgconfig"
+source="http://tortois.es/~nenolod/distfiles/pkgconf-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/pkgconf-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/bin
+ make DESTDIR="$pkgdir" install || return 1
+ # we remove the pkg-config symlink since it breaks the build boxes
+ rm -f "$pkgdir"/usr/lib/*.la \
+ "$pkgdir"/usr/bin/pkg-config
+}
+
+md5sums="87fe4e0128fbf0b9f9a393df37895052 pkgconf-0.1.1.tar.bz2"
diff --git a/testing/pnp4nagios/APKBUILD b/testing/pnp4nagios/APKBUILD
new file mode 100644
index 000000000..f08d322e0
--- /dev/null
+++ b/testing/pnp4nagios/APKBUILD
@@ -0,0 +1,76 @@
+# Contributor: Peter de Zoeten <peter@dezoeten.mine.nu>
+# Maintainer: Peter de Zoeten <peter@dezoeten.mine.nu>
+pkgname=pnp4nagios
+pkgver=0.6.15
+pkgrel=0
+pkgdesc="PNP4Nagios"
+url="http://www.pnp4nagios.org"
+arch="all"
+license="GPL"
+depends="nagios perl-time-hires perl-rrd php-zlib"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sourceforge.net/projects/pnp4nagios/files/PNP-0.6/pnp4nagios-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr/share/webapps/pnp4nagios \
+ --exec-prefix=/usr \
+ --libexecdir=/usr/lib/pnp4nagios \
+ --sysconfdir=/etc/pnp4nagios \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var/run \
+ --datarootdir=/usr/share/webapps/pnp4nagios \
+ --with-perfdata-logfile=/var/pnp4nagios/perfdata/process_perfdata.pl \
+ --with-perfdata-dir=/var/pnp4nagios/perfdata \
+ --with-perfdata-spool-dir=/var/pnp4nagios/perfdata/spool \
+ || return 1
+ make all || return 1
+}
+doc() {
+ arch="noarch"
+ # Man pages
+ mkdir -p "$subpkgdir"/usr/share/man || return 1
+ mv "$pkgdir"/usr/share/webapps/pnp4nagios/man/man* "$subpkgdir"/usr/share/man/ \
+ || return 1
+
+ # Doc files
+ _docs="INSTALL README"
+ for _doc in $_docs; do
+ install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+ rmdir "$pkgdir"/usr/share/webapps/pnp4nagios/man
+}
+
+package() {
+ cd "$_builddir"
+ make fullinstall DESTDIR="$pkgdir" || return 1
+ mkdir -p "$pkgdir"/usr/share/nagios/htdocs/ssi
+ rm -f "$pkgdir"/usr/lib/*.la
+ cp "$_builddir"/contrib/ssi/status-header.ssi "$pkgdir"/usr/share/nagios/htdocs/ssi/status-header.ssi
+# rm -rf "$pkgdir"/etc/httpd
+ mkdir -p "$pkgdir"/etc/lighttpd
+ cp "$_builddir"/sample-config/lighttpd.pnp4nagios.conf "$pkgdir"/etc/lighttpd/pnp4nagios.conf.sample
+ install -D -m644 ../../npcd.cfg "$pkgdir"/etc/pnp4nagios/npcd.cfg
+ rm -f "$pkgdir"/etc/init.d/npcd
+ install -D -m755 ../../npcd "$pkgdir"/etc/init.d/npcd
+ chown nagios.nagios "$pkgdir"/var/pnp4nagios
+}
+
+
+md5sums="27cdab96510e15cfa0f4b7c2bf15dd2b pnp4nagios-0.6.15.tar.gz"
diff --git a/testing/pnp4nagios/npcd b/testing/pnp4nagios/npcd
new file mode 100644
index 000000000..2b17bea51
--- /dev/null
+++ b/testing/pnp4nagios/npcd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+
+depend() {
+ use net
+ need dbus
+ before nfs
+ after logger
+ }
+
+start() {
+ ebegin "Starting npcd"
+ start-stop-daemon --start --quiet --exec /usr/bin/npcd -- -d -f /etc/pnp4nagios/npcd.cfg
+ eend $?
+ }
+
+stop() {
+ ebegin "Stopping npcd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/npcd
+ eend $?
+ }
+
diff --git a/testing/pnp4nagios/npcd.cfg b/testing/pnp4nagios/npcd.cfg
new file mode 100644
index 000000000..43bf14424
--- /dev/null
+++ b/testing/pnp4nagios/npcd.cfg
@@ -0,0 +1,195 @@
+# NPCD.cfg - sample configuration file for PNPs NPCD
+#
+# 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 free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
+#
+# 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 St, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Privilege Options
+
+user = nagios
+group = nagios
+
+#########################
+# #
+# Logging Options #
+# #
+#########################
+
+# log_type - define if you want your logs to
+# 'syslog' or to a 'file'
+#
+# log_type = <value>
+#
+
+log_type = file
+#log_type = syslog
+
+
+# log_file - define a path to your logfile
+# needed if 'log_type'='file'
+#
+# log_file = </path/to/logpath/filename>
+#
+
+log_file = /var/pnp4nagios/npcd.log
+
+
+# max_logfile_size - defines the maximum filesize (bytes)
+# before the logfile will rotated.
+#
+# max_logfile_size = <value> (default 10Mbyte)
+#
+
+max_logfile_size = 10485760
+
+
+# log_level - how much should we log?
+#
+# log_level = <integer value>
+#
+# 0 = No logging - except errors
+# 1 = Small logging - some few more output
+# 2 = More Logging (actual ALL logs)
+# -1 = DEBUG Mode - ALL Logging and slower processing
+#
+
+log_level = 0
+
+#########################
+# #
+# NEEDED OPTIONS #
+# #
+#########################
+
+# perfdata_spool_dir - where we can find the
+# performance data files
+#
+# perfdata_spool_dir = </path/to/directory/>
+#
+
+perfdata_spool_dir = /var/pnp4nagios/perfdata/spool/
+
+
+# Execute following command for each found file
+# in 'perfdata_spool_dir'
+#
+# perfdata_file_run_cmd = </path/to/command>
+#
+# Must be executable by user/group from above
+#
+# perfdata_file_run_cmd = </path/to/filename>
+#
+
+perfdata_file_run_cmd = /usr/lib/pnp4nagios/process_perfdata.pl
+
+
+# perfdata_file_run_cmd_args (optional)
+#
+# If you wish, you can apply more arguments to the
+# perfdata_file_run_cmd
+#
+# Hint:
+# NPCD will create a command line like this:
+# '<perfdata_file_run_cmd> <perfdata_file_run_cmd_args> <filename_from_spool_dir>'
+#
+
+perfdata_file_run_cmd_args = -b
+
+
+# identify_npcd (optional)
+#
+# If set to one (by default) npcd will append
+# '-n' to the perfdata_file_run_cmd
+#
+# identify_npcd = 0|1 (default: 1)
+
+identify_npcd = 1
+
+
+# npcd_max_threads - define how many parallel threads we
+# should start
+
+npcd_max_threads = 5
+
+# sleep_time - how many seconds npcd should wait between dirscans
+#
+# sleep_time = 15 (default)
+
+sleep_time = 15
+
+
+# EXPERIMENTAL
+#
+# load_threshold - npcd won't start new threads
+# if your system load is above this threshold
+#
+# load_threshold = <float value> (default: 0.0)
+#
+# Hint: Do not use "," as decimal delimiter
+#
+# 07/15/2008: Every value above 0.0 will
+# enable this feature
+
+load_threshold = 0.0
+
+
+# location of your pid file
+
+pid_file=/var/run/npcd.pid
+
+
+#########################
+# #
+# NPCDMOD OPTIONS #
+# #
+#########################
+
+
+# perfdata_file - where should the npcdmod.o
+# write the performance data
+#
+# must not be within the same directory as
+# perfdata_spool_dir
+#
+# perfdata_file = </path/to/file>
+#
+
+perfdata_file = /var/pnp4nagios/perfdata.dump
+
+
+# perfdata_spool_filename - declare the destination
+# filename for the spooled files
+#
+# This option allows you a customized filename.
+# Usefull if you own different nagios servers
+# which write their data to a shared storage.
+#
+# perfdata_spool_filename = <filename>
+#
+# Hint:
+# The final files will be moved to
+# 'perfdata_spool_dir/perfdata_spool_filename-TIMESTAMP'
+#
+# Example:
+#
+# perfdata_spool_filename = perfdata-NY
+# perfdata_spool_filename = perfdata-LA
+
+perfdata_spool_filename = perfdata
+
+#
+# perfdata_file_processing_interval
+#
+perfdata_file_processing_interval = 15
+
+# We have to end with a newline
+
diff --git a/testing/podofo/APKBUILD b/testing/podofo/APKBUILD
new file mode 100644
index 000000000..1b413ebf1
--- /dev/null
+++ b/testing/podofo/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=podofo
+pkgver=0.9.1
+pkgrel=0
+pkgdesc="A C++ library to work with the PDF file format"
+url="http://podofo.sourceforge.net"
+arch="all"
+license="GPL"
+depends=
+depends_dev="tiff-dev libpng-dev fontconfig-dev cmake"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DPODOFO_BUILD_SHARED=1 \
+ -DPODOFO_HAVE_JPEG_LIB=1 \
+ -DPODOFO_HAVE_PNG_LIB=1 \
+ -DPODOFO_HAVE_TIFF_LIB=1
+ make || return 1
+}
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="cec586ab69f92bc88d38b5d4b8eee5a0 podofo-0.9.1.tar.gz"
diff --git a/testing/polkit-gnome/APKBUILD b/testing/polkit-gnome/APKBUILD
new file mode 100644
index 000000000..bf43b1928
--- /dev/null
+++ b/testing/polkit-gnome/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=polkit-gnome
+pkgver=0.101
+pkgrel=1
+pkgdesc="PolicyKit integration for the GNOME desktop"
+url="http://www.freedesktop.org/wiki/Software/PolicyKit"
+arch="all"
+license="LGPL"
+depends=""
+makedepends="polkit-dev gtk+-dev gobject-introspection-dev"
+subpackages="$pkgname-dev"
+source="http://hal.freedesktop.org/releases/polkit-gnome-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/polkit-gnome \
+ --disable-static \
+ --disable-introspection \
+ || return 1
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="da6aaff473ed80f8958fd6f67a59defe polkit-gnome-0.101.tar.bz2"
diff --git a/testing/polkit-qt/APKBUILD b/testing/polkit-qt/APKBUILD
new file mode 100644
index 000000000..9bb0fc940
--- /dev/null
+++ b/testing/polkit-qt/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=polkit-qt
+pkgver=0.99.0
+pkgrel=0
+pkgdesc="Qt bindings for PolicyKit"
+url="http://www.kde.org/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="polkit-dev qt-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://kde.mirrors.tds.net/pub/kde/stable/apps/KDE4.x/admin/polkit-qt-1-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/polkit-qt-1-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="1c5b4113a2a167624b5f716b4f03a219 polkit-qt-1-0.99.0.tar.bz2"
diff --git a/testing/poppler-qt4/APKBUILD b/testing/poppler-qt4/APKBUILD
new file mode 100644
index 000000000..c20c60362
--- /dev/null
+++ b/testing/poppler-qt4/APKBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+
+# this aport only includes glib/gtk support in order to break the
+# circular make dependency: gtk <- cups <- poppler <- gtk
+
+# get the pkgver from poppler
+if [ -r ../../main/poppler/APKBUILD ]; then
+ . ../../main/poppler/APKBUILD
+fi
+
+pkgname=poppler-qt4
+_realname=poppler
+pkgver=$pkgver
+pkgrel=1
+pkgdesc="PDF rendering library based on xpdf 3.0"
+url="http://poppler.freedesktop.org/"
+arch="all"
+license="GPL"
+subpackages="$pkgname-dev"
+makedepends="jpeg-dev cairo-dev libxml2-dev fontconfig-dev qt-dev
+ poppler-dev lcms-dev"
+depends=
+replaces="poppler-glib"
+depends_dev="$makedepends"
+source="http://poppler.freedesktop.org/poppler-$pkgver.tar.gz"
+
+prepare() {
+ return 0
+}
+
+build() {
+ cd "$srcdir"/$_realname-$pkgver
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-gdk \
+ --disable-poppler-glib \
+ --enable-cairo-output \
+ --enable-xpdf-headers \
+ --enable-libjpeg \
+ --enable-zlib \
+ --enable-poppler-qt4 \
+ --disable-poppler-qt \
+ --disable-utils \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$_realname-$pkgver
+ install -D -m644 poppler-qt4.pc "$pkgdir"/usr/lib/pkgconfig/poppler-qt4.pc
+ cd qt4
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="d30e883a27423c936ef338ce1d967e2d poppler-0.18.1.tar.gz"
diff --git a/testing/portaudio/APKBUILD b/testing/portaudio/APKBUILD
new file mode 100644
index 000000000..4ca739e98
--- /dev/null
+++ b/testing/portaudio/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=portaudio
+pkgver=19
+pkgrel=0
+pkgdesc="Cross platform, open-source, audio I/O library"
+url="http://www.portaudio.com/"
+arch="all"
+license="MIT"
+depends=
+depends_dev="alsa-lib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.portaudio.com/archives/pa_stable_v19_20110326.tgz"
+
+_builddir="$srcdir"/portaudio
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="8f266ce03638419ef46e4efcb0fabde6 pa_stable_v19_20110326.tgz"
diff --git a/testing/postfixadmin/APKBUILD b/testing/postfixadmin/APKBUILD
new file mode 100644
index 000000000..8043f1a0d
--- /dev/null
+++ b/testing/postfixadmin/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=postfixadmin
+pkgver=2.3.3
+pkgrel=0
+pkgdesc="Web Based Management tool for Postfix"
+url="http://postfixadmin.com/"
+arch="noarch"
+license="GPL"
+depends="php postfix"
+makedepends=""
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-$pkgver/postfixadmin-$pkgver.tar.gz"
+
+_builddir="$srcdir"/postfixadmin-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/webapps/postfixadmin \
+ "$pkgdir"/etc/postfixadmin
+ cp -r * "$pkgdir"/usr/share/webapps/postfixadmin/
+
+ # move config to /etc/postfixadmin and create symlink
+ mv "$pkgdir"/usr/share/webapps/postfixadmin/config.inc.php \
+ "$pkgdir"/etc/postfixadmin/
+ ln -s /etc/postfixadmin/config.inc.php \
+ "$pkgdir"/usr/share/webapps/postfixadmin/config.inc.php
+}
+
+md5sums="0dfcd8a4535e00aced45c82dbcedf859 postfixadmin-2.3.3.tar.gz"
diff --git a/testing/postler/APKBUILD b/testing/postler/APKBUILD
new file mode 100644
index 000000000..12aa2604f
--- /dev/null
+++ b/testing/postler/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=postler
+pkgver=0.1.1
+pkgrel=1
+pkgdesc="Email client"
+url="https://launchpad.net/postler/"
+arch=""
+license="LGPL-2.1"
+depends="msmtp"
+makedepends="gtk+-dev webkit-dev libunique-dev libnotify-dev libcanberra-dev
+ python vala db-dev openssl-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://archive.xfce.org/src/apps/postler/0.1/postler-$pkgver.tar.bz2
+ inet_ntoa.patch"
+
+_builddir="$srcdir"/postler-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./waf configure --prefix=/usr \
+ --disable-libindicate \
+ || return 1
+ ./waf build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ ./waf install --destdir="$pkgdir" || return 1
+}
+
+md5sums="02e502c9f4a4b92e4ace32d9e268f06d postler-0.1.1.tar.bz2
+06bb9bb2d1a809b6e58b2a5012393151 inet_ntoa.patch"
diff --git a/testing/postler/inet_ntoa.patch b/testing/postler/inet_ntoa.patch
new file mode 100644
index 000000000..bbb0969bc
--- /dev/null
+++ b/testing/postler/inet_ntoa.patch
@@ -0,0 +1,10 @@
+--- a/wscript
++++ b/wscript
+@@ -141,7 +141,6 @@
+ includes=['/usr/local/include/db42'],
+ libpath=['/usr/local/lib/db42'], lib='db', mandatory=True)
+ else:
+- check_function ('inet_ntoa', 'arpa/inet.h', 'nsl')
+ check_function ('dlopen', 'dlfcn.h', 'dl')
+ check_function ('db_create', 'db.h', 'db')
+ check_pkg ('openssl')
diff --git a/testing/poweradmin/0010-fix-installer-config.patch b/testing/poweradmin/0010-fix-installer-config.patch
new file mode 100644
index 000000000..11dd43516
--- /dev/null
+++ b/testing/poweradmin/0010-fix-installer-config.patch
@@ -0,0 +1,31 @@
+--- ./install/index.php.orig
++++ ./install/index.php
+@@ -287,11 +287,27 @@
+ "\$db_port\t\t= '" . $_POST['db_port'] . "';\n" .
+ "\$db_type\t\t= '" . $_POST['db_type'] . "';\n" .
+ "\n" .
+- "\$iface_lang\t\t= '" . $_POST['language'] . "';\n" .
++ "\$iface_lang\t\t= '" . $_POST['language'] . "';\n" .
++ "\$iface_style\t\t= ". "'example';\n" .
++ "\$iface_rowamount\t=". "50;\n" .
++ "\$iface_expire\t\t=". "1800;\n" .
++ "\$iface_zonelist_serial\t=". "false;\n" .
++ "\$iface_title\t\t=". "'Poweradmin';\n" .
+ "\n" .
+ "\$dns_hostmaster\t\t= '" . $_POST['dns_hostmaster'] . "';\n" .
+ "\$dns_ns1\t\t= '" . $_POST['dns_ns1'] . "';\n" .
+ "\$dns_ns2\t\t= '" . $_POST['dns_ns2'] . "';\n" .
++ "\n" .
++ "// See <http://www.php.net/manual/en/timezones.php> for help.\n" .
++ "//\$timezone\t\t=". "'UTC';\n" .
++ "\n" .
++ "/* Syslog usage - writes authentication attempts to syslog\n" .
++ " This facility could be used in combination with fail2ban to\n" .
++ " ban IPs with break-in attempts\n" .
++ "*/\n" .
++ "\$syslog_use = false;\n" .
++ "\$syslog_ident = 'poweradmin';\n" .
++ "\$syslog_facility = LOG_USER;\n" .
+ "\n?>\n";
+
+ if (is_writeable($local_config_file)) {
diff --git a/testing/poweradmin/0020-fix-for-mysql55.patch b/testing/poweradmin/0020-fix-for-mysql55.patch
new file mode 100644
index 000000000..dbf59973c
--- /dev/null
+++ b/testing/poweradmin/0020-fix-for-mysql55.patch
@@ -0,0 +1,20 @@
+--- ./docs/powerdns-mysql-db-structure.sql.orig
++++ ./docs/powerdns-mysql-db-structure.sql
+@@ -7,7 +7,7 @@
+ notified_serial INT DEFAULT NULL,
+ account VARCHAR(40) DEFAULT NULL,
+ primary key (id)
+-)type=InnoDB;
++) Engine=InnoDB;
+
+ CREATE UNIQUE INDEX name_index ON domains(name);
+
+@@ -21,7 +21,7 @@
+ prio INT DEFAULT NULL,
+ change_date INT DEFAULT NULL,
+ primary key(id)
+-)type=InnoDB;
++) Engine=InnoDB;
+
+ CREATE INDEX rec_name_index ON records(name);
+ CREATE INDEX nametype_index ON records(name,type);
diff --git a/testing/poweradmin/APKBUILD b/testing/poweradmin/APKBUILD
new file mode 100644
index 000000000..2ec8077ed
--- /dev/null
+++ b/testing/poweradmin/APKBUILD
@@ -0,0 +1,81 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=poweradmin
+pkgver=2.1.5.999
+pkgrel=0
+pkgdesc="A Web-based PHP tool for administering PowerDNS"
+url="https://www.poweradmin.org/"
+arch="noarch"
+license="GPL"
+depends="php php-gettext php-mcrypt php-pear php-pear-mdb2 pdns"
+# user needs to select either mysql or pgsql:
+# - mysql php-mysql php-pear-mdb2-driver-mysql
+# - postgresql php-pgsql php-pear-mdb2-driver-pgsql
+depends_dev=
+makedepends="$depends_dev wget"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="https://www.poweradmin.org/download/poweradmin.nightly.tgz
+ 0010-fix-installer-config.patch
+ 0020-fix-for-mysql55.patch
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$pkgname-nightly
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ # copy poweradmin
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
+
+ # install empty config file (for the web installer)
+ mkdir -p "$pkgdir"/etc/$pkgname || return 1
+ touch "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ chmod 660 "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ ln -fs /etc/$pkgname/config.inc.php "$pkgdir"/usr/share/webapps/$pkgname/inc/config.inc.php || return 1
+
+ # share files
+ _shares="i18n-template-db.pot i18n-template-php.pot \
+ poweradmin-mysql-db-structure.sql poweradmin-pgsql-db-structure.sql \
+ powerdns-mysql-db-structure.sql powerdns-pgsql-db-structure.sql \
+ powerdns-sqlite-db-structure.sql"
+ for _share in $_shares; do
+ install -Dm644 \
+ "$pkgdir"/usr/share/webapps/$pkgname/docs/$_share \
+ "$pkgdir"/usr/share/$pkgname/$_share || return 1
+ done
+ mv "$pkgdir"/usr/share/webapps/$pkgname/inc/config-me.inc.php \
+ "$pkgdir"/usr/share/$pkgname/config-me.inc.php || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+doc() {
+ _docs="CHANGELOG LICENSE README"
+ for _doc in $_docs; do
+ install -Dm644 \
+ "$pkgdir"/usr/share/webapps/$pkgname/docs/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/docs || return 1
+}
+
+md5sums="323f19990f3b0263f16db1dc18e0d42d poweradmin.nightly.tgz
+f2936b9362269f5ed08dc853d49576cb 0010-fix-installer-config.patch
+15638562a494a7ee3043e32476a47c94 0020-fix-for-mysql55.patch
+a74d64fc95f48c64927dd10df214127a poweradmin.apache2.conf"
diff --git a/testing/poweradmin/poweradmin.apache2.conf b/testing/poweradmin/poweradmin.apache2.conf
new file mode 100644
index 000000000..56355e388
--- /dev/null
+++ b/testing/poweradmin/poweradmin.apache2.conf
@@ -0,0 +1,7 @@
+Alias /poweradmin "/usr/share/webapps/poweradmin"
+<Directory "/usr/share/webapps/poweradmin">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/testing/poweradmin/poweradmin.post-install b/testing/poweradmin/poweradmin.post-install
new file mode 100644
index 000000000..b317e0385
--- /dev/null
+++ b/testing/poweradmin/poweradmin.post-install
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* Poweradmin has been installed to:" >&2
+echo "* /usr/share/webapps/poweradmin" >&2
+echo "* An empty Poweradmin config file has been installed to:" >&2
+echo "* /etc/poweradmin/config.inc.php" >&2
+echo "* If you use apache2:" >&2
+echo "* 1) Change the ownership of the config directory:" >&2
+echo "* chown -R apache:apache /etc/poweradmin" >&2
+echo "* 2) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/poweradmin.conf" >&2
+echo "* 3) Restart apache2 when done." >&2
+echo "*" >&2
+echo "* Installation Steps:" >&2
+echo "* 1) Install the database packages you need for Poweradmin:" >&2
+echo "* For MySQL: apk add mysql php-mysql php-pear-mdb2-driver-mysql" >&2
+echo "* For PgSQL: apk add postgresql php-pgsql php-pear-mdb2-driver-pgsql" >&2
+echo "* 2) Point your browser to the install directory, e.g." >&2
+echo "* http://server_ip/poweradmin/install" >&2
+echo "* and follow the instructions on the screen." >&2
+echo "* 3) Remove the 'install' directory from the Poweradmin directory:" >&2
+echo "* rm /usr/share/webapps/poweradmin/install -rf" >&2
+echo "* 4) Point your browser to Poweradmin, e.g." >&2
+echo "* http://server_ip/poweradmin/" >&2
+echo "* and login using the username 'admin' and the password you provided" >&2
+echo "* during the installation process of Step 1 (above)." >&2
+echo "*" >&2
+
+exit 0
diff --git a/testing/powertop/APKBUILD b/testing/powertop/APKBUILD
new file mode 100644
index 000000000..3cf4ec8d2
--- /dev/null
+++ b/testing/powertop/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=powertop
+pkgver=1.97
+pkgrel=0
+pkgdesc="Power consumption monitor"
+url="http://www.lesswatts.org/"
+arch="all"
+license="GPLv2"
+depends=
+makedepends="ncurses-dev pciutils-dev zlib-dev libnl-dev gettext-dev"
+install=""
+subpackages=
+source="http://www.kernel.org/pub/linux/status/powertop/powertop-$pkgver.tar.bz2
+ intl.patch"
+
+_builddir="$srcdir"/powertop-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ rm -f po/nl.po
+}
+
+build() {
+ cd "$_builddir"
+ make FLAGS="$CFLAGS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ddd318fe930c86b3666cad6f40b661bc powertop-1.97.tar.bz2
+2f04368b889cf5ef679bed7d1517857b intl.patch"
diff --git a/testing/powertop/intl.patch b/testing/powertop/intl.patch
new file mode 100644
index 000000000..d88039fc7
--- /dev/null
+++ b/testing/powertop/intl.patch
@@ -0,0 +1,11 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -48,7 +48,7 @@
+ # ncurses-devel and pciutils-devel
+ #
+
+-LIBS += -lpthread -lncursesw -lpci -lz -lresolv
++LIBS += -lpthread -lncursesw -lpci -lz -lresolv -lintl
+
+ HEADERS := cpu/cpu.h
+
diff --git a/testing/pptpclient/APKBUILD b/testing/pptpclient/APKBUILD
new file mode 100644
index 000000000..757fff26b
--- /dev/null
+++ b/testing/pptpclient/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=pptpclient
+pkgver=1.7.2
+pkgrel=1
+pkgdesc="Client for the proprietary Microsoft Point-to-Point Tunneling Protocol, PPTP."
+url="http://pptpclient.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="ppp iproute2"
+makedepends="perl"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/pptp-$pkgver.tar.gz
+ pptpclient-uclibc.patch"
+
+prepare() {
+ cd "$srcdir"/pptp-$pkgver
+ patch -p1 -i "$srcdir"/pptpclient-uclibc.patch || return 1
+ sed -i '/CFLAGS/d' Makefile
+ sed -i 's|\/bin\/ip|\/usr\/sbin\/ip|g' routing.c
+}
+
+build() {
+ cd "$srcdir"/pptp-$pkgver
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/pptp-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+md5sums="4c3d19286a37459a632c7128c92a9857 pptp-1.7.2.tar.gz
+34b643e4e4224e723f6a768018b46015 pptpclient-uclibc.patch"
diff --git a/testing/pptpclient/pptpclient-uclibc.patch b/testing/pptpclient/pptpclient-uclibc.patch
new file mode 100644
index 000000000..aa9536e4d
--- /dev/null
+++ b/testing/pptpclient/pptpclient-uclibc.patch
@@ -0,0 +1,21 @@
+diff --git a/pptp_compat.c b/pptp_compat.c
+index 1760a3b..6ebbea4 100644
+--- a/pptp_compat.c
++++ b/pptp_compat.c
+@@ -2,6 +2,7 @@
+ *
+ */
+
++#if defined (__SVR4) && defined (__sun) /* Solaris */
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+@@ -14,8 +15,6 @@
+ #include <stdio.h>
+ #include "util.h"
+
+-
+-#if defined (__SVR4) && defined (__sun) /* Solaris */
+ /*
+ * daemon implementation from uClibc
+ */
diff --git a/testing/pptpd/APKBUILD b/testing/pptpd/APKBUILD
new file mode 100644
index 000000000..265e13939
--- /dev/null
+++ b/testing/pptpd/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=pptpd
+pkgver=1.3.4
+pkgrel=0
+pkgdesc="PoPToP - PPTP Daemon, Linux as Microsoft VPN Server"
+url="http://www.poptop.org/"
+arch="all"
+license="GPL v2 or later"
+depends=""
+makedepends="ppp-dev"
+install=""
+subpackages="$pkgname-doc"
+source="saveas-http://sourceforge.net/projects/poptop/files/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz/download/$pkgname-$pkgver.tar.gz pptpd.patch pptpd.confd pptpd.initd options.pptp pptpd.conf"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ install -Dm755 "$srcdir"/pptpd.initd "$pkgdir"/etc/init.d/pptpd
+ install -Dm644 "$srcdir"/pptpd.confd "$pkgdir"/etc/conf.d/pptpd
+ install -Dm644 "$srcdir"/options.pptp "$pkgdir"/etc/ppp/options.pptp
+ install -Dm644 "$srcdir"/pptpd.conf "$pkgdir"/etc/
+}
+
+md5sums="b38df9c431041922c997c1148bedf591 pptpd-1.3.4.tar.gz
+5a6da6f9d62c9db58033267f0578e79f pptpd.patch
+bff575819b8997e7bbe743b95cb134cb pptpd.confd
+184b6c9cc04e1efc830e39da6c3bfefc pptpd.initd
+95f1efd9f4f896bf3b7aef1940c58e79 options.pptp
+0a7af8968a964ebccf12ad512be9bba5 pptpd.conf"
diff --git a/testing/pptpd/options.pptp b/testing/pptpd/options.pptp
new file mode 100644
index 000000000..645c6e24d
--- /dev/null
+++ b/testing/pptpd/options.pptp
@@ -0,0 +1,11 @@
+lock
+debug
+auth
++chap
++chapms
++chapms-v2
+mppe-40
+mppe-128
+mppe-stateless
+name test02
+proxyarp
diff --git a/testing/pptpd/pptpd.conf b/testing/pptpd/pptpd.conf
new file mode 100644
index 000000000..258f5d5cc
--- /dev/null
+++ b/testing/pptpd/pptpd.conf
@@ -0,0 +1,88 @@
+################################################################################
+#
+# Sample PoPToP configuration file
+#
+# for PoPToP version 1.0.0
+#
+################################################################################
+
+# TAG: speed
+#
+# Specifies the speed for the PPP daemon to talk at.
+# Some PPP daemons will ignore this value.
+#
+speed 115200
+
+# TAG: option
+#
+# Specifies the location of the PPP options file.
+# By default PPP looks in '/etc/ppp/options'
+#
+#option /this/is/the/options/file
+option /etc/ppp/options.pptp
+
+# TAG: debug
+#
+# Turns on (more) debugging to syslog.
+#
+debug
+
+# TAG: localip
+# TAG: remoteip
+#
+# Specifies the local and remote IP address ranges.
+#
+# You can specify single IP addresses seperated by commas or you can
+# specify ranges, or both. For example:
+#
+# 192.168.0.234,192.168.0.245-249,192.168.0.254
+#
+# IMPORTANT RESTRICTIONS:
+#
+# 1. No spaces are permitted between commas or within addresses.
+#
+# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
+# start at the beginning of the list and go until it gets
+# MAX_CONNECTIONS IPs. Others will be ignored.
+#
+# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
+# you must type 234-238 if you mean this.
+#
+# 4. If you give a single localIP, that's ok - all local IPs will
+# be set to the given one. You MUST still give at least one remote
+# IP for each simultaneous client.
+#
+#localip 192.168.0.234-238,192.168.0.245
+#remoteip 192.168.1.234-238,192.168.1.245
+
+localip 192.168.0.1
+remoteip 192.168.1.100-199
+
+# TAG: ipxnets
+#
+# This gives the range of IPX networks to allocate to clients. By
+# default IPX network number allocation is not handled internally.
+# By putting a low and high network number here a pool of IPX networks
+# can be defined. If this is done then there must be one IPX network
+# per client.
+#
+# The format is a pair of hex numbers without any 0x prefix separated
+# by a hyphen.
+#
+#ipxnets 00001000-00001FFF
+
+# TAG: listen
+#
+# Defines the IP address of the local interface on which pptpd
+# should listen for connections. The default is to listen on all
+# local interfaces (even ones brought up by pptp connections, thus
+# permitting pptp tunnels inside the pptp tunnels).
+#
+#listen 192.168.0.1
+
+# TAG: pidfile
+#
+# This defines the file name in which pptpd should store its process
+# ID (or pid). The default is /var/run/pptpd.pid.
+#
+pidfile /var/run/pptpd.pid
diff --git a/testing/pptpd/pptpd.confd b/testing/pptpd/pptpd.confd
new file mode 100644
index 000000000..1169e57f1
--- /dev/null
+++ b/testing/pptpd/pptpd.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pptpd
+
+# Any extra options you want to pass to pptpd
+# on start-up should be put here.
+PPTPD_OPTS=""
diff --git a/testing/pptpd/pptpd.initd b/testing/pptpd/pptpd.initd
new file mode 100644
index 000000000..36af3f25f
--- /dev/null
+++ b/testing/pptpd/pptpd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting pptpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pptpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/pptpd.pid
+ result=$?
+ start-stop-daemon --stop --quiet --exec /usr/sbin/pptpctrl
+ result=$(( $result + $? ))
+ eend $result
+}
diff --git a/testing/pptpd/pptpd.patch b/testing/pptpd/pptpd.patch
new file mode 100644
index 000000000..3b4522dc7
--- /dev/null
+++ b/testing/pptpd/pptpd.patch
@@ -0,0 +1,69 @@
+--- pptpd-1.3.4/Makefile.am
++++ pptpd-1.3.4-orig/Makefile.am
+@@ -11,7 +11,8 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++OPTFLAGS=-O2
++CFLAGS = $(OPTFLAGS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+--- pptpd-1.3.4/bcrelay.c
++++ pptpd-1.3.4-orig/bcrelay.c
+@@ -381,12 +381,12 @@
+ return 1;
+ }
+ }
+- if (ifin == "") {
++ if (!strlen(ifin)) {
+ syslog(LOG_INFO,"Incoming interface required!");
+ showusage(argv[0]);
+ _exit(1);
+ }
+- if (ifout == "" && ipsec == "") {
++ if (!strlen(ifout) && !strlen(ipsec)) {
+ syslog(LOG_INFO,"Listen-mode or outgoing or IPsec interface required!");
+ showusage(argv[0]);
+ _exit(1);
+@@ -870,7 +870,7 @@
+ // IPSEC tunnels are a fun one. We must change the destination address
+ // so that it will be routed to the correct tunnel end point.
+ // We can define several tunnel end points for the same ipsec interface.
+- } else if (ipsec != "" && strncmp(ifs.ifc_req[i].ifr_name, "ipsec", 5) == 0) {
++ } else if (strlen(ipsec) && strncmp(ifs.ifc_req[i].ifr_name, "ipsec", 5) == 0) {
+ if (strncmp(ifs.ifc_req[i].ifr_name, ipsec, 6) == 0) {
+ struct hostent *hp = gethostbyname(ipsec+7);
+ ioctl(s, SIOCGIFINDEX, &ifs.ifc_req[i]);
+--- pptpd-1.3.4/plugins/Makefile
++++ pptpd-1.3.4-orig/plugins/Makefile
+@@ -3,7 +3,7 @@
+ CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS = -shared
+ LDADD = -lutil
+-INSTALL = install -o root
++INSTALL = install
+ prefix = /usr/local
+
+ PLUGINS = pptpd-logwtmp.so
+@@ -18,7 +18,7 @@
+ %.so: %.c
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+
+-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd
+
+ install: $(PLUGINS)
+ $(INSTALL) -d $(LIBDIR)
+--- pptpd-1.3.4/plugins/pptpd-logwtmp.c
++++ pptpd-1.3.4-orig/plugins/pptpd-logwtmp.c
+@@ -12,7 +12,7 @@
+ #include <unistd.h>
+ #include <utmp.h>
+ #include <string.h>
+-#include "pppd.h"
++#include <pppd/pppd.h>
+
+ char pppd_version[] = VERSION;
+
diff --git a/testing/pptpd/rcpptpd b/testing/pptpd/rcpptpd
new file mode 100644
index 000000000..83afd0ce7
--- /dev/null
+++ b/testing/pptpd/rcpptpd
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
+#
+# Author: Bernd Kaindl
+#
+# /etc/init.d/pptpd
+#
+
+### BEGIN INIT INFO
+# Provides: pptpd
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Default-Start: 3 5
+# Default-Stop:
+# Description: start pptp daemon
+# Short-Description: pptp daemon
+### END INIT INFO
+
+PPTPD_BIN=/usr/sbin/pptpd
+test -x $PPTPD_BIN || exit 5
+
+# Shell functions sourced from /etc/rc.status:
+. /etc/rc.status
+
+# First reset status of this service
+rc_reset
+
+case "$1" in
+ start)
+ echo -n "Starting MS VPN server pptpd"
+ if modprobe ppp_mppe ; then
+ startproc -sq $PPTPD_BIN
+ rc_status -v
+ else
+ rc_failed 3
+ fi
+ ;;
+ stop)
+ echo -n "Shutting down MS VPN server pptpd"
+ killproc -TERM $PPTPD_BIN
+ rc_status -v
+ rmmod ppp_mppe > /dev/null 2>&1
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ force-reload)
+ $0 stop && $0 start
+ rc_status
+ ;;
+ reload)
+ rc_failed 3
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for MS VPN server pptpd: "
+ checkproc $PPTPD_BIN
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit
diff --git a/testing/proftpd/APKBUILD b/testing/proftpd/APKBUILD
new file mode 100644
index 000000000..63af201f4
--- /dev/null
+++ b/testing/proftpd/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+pkgname=proftpd
+pkgver=1.3.4a
+pkgrel=0
+pkgdesc="Highly configurable GPL-licensed FTP server software"
+url="http://www.proftpd.org/"
+arch="all"
+license="GPLv2"
+depends="openssl gettext ncurses"
+depends_dev="ncurses-dev openssl-dev"
+makedepends="$depends_dev libtool"
+install=""
+subpackages="$pkgname-doc"
+source="ftp://ftp.proftpd.org/distrib/source/proftpd-${pkgver}.tar.bz2
+ mempcpy.patch
+ proftpd.initd
+ proftpd.confd"
+
+_builddir="$srcdir"/"$pkgname"-"$pkgver"
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --enable-openssl \
+ --enable-facl \
+ --enable-dso \
+ --enable-ipv6 \
+ --enable-ctrls \
+ --with-modules=mod_quotatab:mod_quotatab_file:mod_tls \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var/run
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="4e3235dc1ef95d36e59721d70c5c489c proftpd-1.3.4a.tar.bz2
+cee983fba72533440d1a95c87bbbefc3 mempcpy.patch
+175ce0cef2fb410d0ac8929ad421f941 proftpd.initd
+aab5852ac574e87781f1c9c4942e699b proftpd.confd"
diff --git a/testing/proftpd/mempcpy.patch b/testing/proftpd/mempcpy.patch
new file mode 100644
index 000000000..e58210f37
--- /dev/null
+++ b/testing/proftpd/mempcpy.patch
@@ -0,0 +1,13 @@
+diff --git a/lib/pr_fnmatch.c b/lib/pr_fnmatch.c
+index 9e398e7..102591a 100644
+--- a/lib/pr_fnmatch.c
++++ b/lib/pr_fnmatch.c
+@@ -233,7 +233,7 @@ __wcschrnul (const wchar_t *s, wint_t c)
+ # endif
+ # define STRLEN(S) strlen (S)
+ # define STRCAT(D, S) strcat (D, S)
+-# define MEMPCPY(D, S, N) __mempcpy (D, S, N)
++# define MEMPCPY(D, S, N) mempcpy (D, S, N)
+ # define MEMCHR(S, C, N) memchr (S, C, N)
+ # define STRCOLL(S1, S2) strcoll (S1, S2)
+ # include "pr_fnmatch_loop.c"
diff --git a/testing/proftpd/proftpd.confd b/testing/proftpd/proftpd.confd
new file mode 100644
index 000000000..0cf909c43
--- /dev/null
+++ b/testing/proftpd/proftpd.confd
@@ -0,0 +1,7 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon options here.
+#
+
+sample_opts="-6"
diff --git a/testing/proftpd/proftpd.initd b/testing/proftpd/proftpd.initd
new file mode 100644
index 000000000..c20a2543a
--- /dev/null
+++ b/testing/proftpd/proftpd.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=proftpd
+daemon=/usr/sbin/proftpd
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${name}.pid \
+ --exec ${daemon} -- ${sample_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/$name.pid \
+ --exec ${daemon}
+ eend $?
+}
+
diff --git a/testing/prosody/APKBUILD b/testing/prosody/APKBUILD
new file mode 100644
index 000000000..a47078ce3
--- /dev/null
+++ b/testing/prosody/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=prosody
+pkgver=0.8.2
+pkgrel=1
+pkgdesc="Lua based Jabber/XMPP server"
+url="http://prosody.im/"
+arch="all"
+license="MIT"
+depends="lua-socket lua-expat lua-filesystem lua-sec"
+makedepends="lua-dev libidn-dev openssl-dev"
+install="prosody.pre-install prosody.post-install"
+subpackages=""
+source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz
+ $pkgname.cfg.lua.patch
+ $pkgname.initd
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/prosody \
+ --with-lua=/usr/bin \
+ --with-lua-lib=/usr/lib \
+ --with-lua-include=/usr/include
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ install -d "$pkgdir/var/log/prosody" || return 1
+ install -d "$pkgdir/var/run/prosody" || return 1
+ patch "$pkgdir/etc/prosody/prosody.cfg.lua" "$srcdir/prosody.cfg.lua.patch" || return 1
+ install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname"
+
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+md5sums="6e907bf0d0acf24f1011083020ba6ffb prosody-0.8.2.tar.gz
+5a415bb85fb1e00a17cb3ad951e3b889 prosody.cfg.lua.patch
+9b68b81deb2148a3a6c3b5d2eb9c96b9 prosody.initd"
diff --git a/testing/prosody/prosody.cfg.lua.patch b/testing/prosody/prosody.cfg.lua.patch
new file mode 100644
index 000000000..ca1c9b331
--- /dev/null
+++ b/testing/prosody/prosody.cfg.lua.patch
@@ -0,0 +1,32 @@
+--- prosody.cfg.lua.org
++++ prosody.cfg.lua
+@@ -22,6 +22,9 @@
+ -- Example: admins = { "user1@example.com", "user2@example.net" }
+ admins = { }
+
++daemonize = true;
++pidfile = "/var/run/prosody/prosody.pid";
++
+ -- Enable use of libevent for better performance under high load
+ -- For more information see: http://prosody.im/doc/libevent
+ --use_libevent = true;
+@@ -59,7 +62,7 @@
+ --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
+
+ -- Other specific functionality
+- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
++ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
+ --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
+ --"httpserver"; -- Serve static files from a directory over HTTP
+ --"groups"; -- Shared roster support
+@@ -123,8 +126,8 @@
+ -- Logging configuration
+ -- For advanced logging see http://prosody.im/doc/logging
+ log = {
+- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
+- error = "prosody.err";
++ info = "/var/log/prosody.log"; -- Change 'info' to 'debug' for verbose logging
++ error = "/var/log/prosody.err";
+ -- "*syslog"; -- Uncomment this for logging to syslog
+ -- "*console"; -- Log to the console, useful for debugging with daemonize=false
+ }
diff --git a/testing/prosody/prosody.initd b/testing/prosody/prosody.initd
new file mode 100644
index 000000000..1a41d4a9e
--- /dev/null
+++ b/testing/prosody/prosody.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+NAME=prosody
+DAEMON=/usr/bin/$NAME
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ /usr/bin/prosodyctl start
+# start-stop-daemon --start --quiet --background \
+# --make-pidfile --pidfile /var/run/${NAME}/${NAME}.pid \
+# --user ${USER}:${GROUP} \
+# --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ /usr/bin/prosodyctl stop
+# start-stop-daemon --stop --quiet \
+# --exec ${DAEMON} \
+# --pidfile /var/run/${NAME}/${NAME}.pid \
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${NAME}"
+ if ! service_started "${NAME}" ; then
+ eend 1 "${NAME} is not started"
+ return 1
+ fi
+ /usr/bin/prosodyctl stop
+ /usr/bin/prosodyctl start
+# start-stop-daemon --stop --oknodo --signal HUP \
+# --exec ${DAEMON} --pidfile /var/run/${NAME}/${NAME}.pid
+ eend $?
+}
+
diff --git a/testing/prosody/prosody.post-install b/testing/prosody/prosody.post-install
new file mode 100644
index 000000000..2f8f69cdd
--- /dev/null
+++ b/testing/prosody/prosody.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+chown prosody:prosody var/lib/prosody
+chown prosody:prosody var/log/prosody
+chown prosody:prosody var/run/prosody
+
diff --git a/testing/prosody/prosody.pre-install b/testing/prosody/prosody.pre-install
new file mode 100644
index 000000000..db63efa17
--- /dev/null
+++ b/testing/prosody/prosody.pre-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+user=prosody
+home=/var/lib/prosody
+adduser -h $home -s /bin/false -D $user 2>/dev/null
+mkdir -p $home
+chown $user:$user $home
+exit 0
+
diff --git a/testing/protobuf/APKBUILD b/testing/protobuf/APKBUILD
new file mode 100644
index 000000000..f00f134b2
--- /dev/null
+++ b/testing/protobuf/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=protobuf
+pkgver=2.4.1
+pkgrel=0
+pkgdesc="Library for extensible, efficient structure packing"
+url="http://code.google.com/p/protobuf/"
+arch="all"
+license="BSD"
+depends=
+depends_dev="zlib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://protobuf.googlecode.com/files/protobuf-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/protobuf-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+ make check || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+py() {
+ depends="python"
+ cd "$_builddir"/python
+ mkdir -p "$subpkgdir"/usr/lib/python2.6/site-packages/
+ install -m644 google "$subpkgdir"/usr/lib/python2.6/site-packages
+}
+
+md5sums="ed436802019c9e1f40cc750eaf78f318 protobuf-2.4.1.tar.bz2"
diff --git a/testing/psmisc/APKBUILD b/testing/psmisc/APKBUILD
new file mode 100644
index 000000000..79d6eee7b
--- /dev/null
+++ b/testing/psmisc/APKBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=psmisc
+pkgver=22.14
+pkgrel=0
+pkgdesc="a set of some small useful utilities that use the proc filesystem"
+url="http://psmisc.sourceforge.net/"
+arch="all"
+license="BSD GPL"
+depends=
+makedepends="ncurses-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/psmisc/psmisc-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="ba3f4e971895c92bba7770d81c981503 psmisc-22.14.tar.gz"
diff --git a/testing/pure-ftpd/APKBUILD b/testing/pure-ftpd/APKBUILD
new file mode 100644
index 000000000..1717af866
--- /dev/null
+++ b/testing/pure-ftpd/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Douglas Haber <me@douglashaber.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=pure-ftpd
+pkgver=1.0.32
+pkgrel=0
+pkgdesc="Pure FTPD FTP daemon"
+url="http://pureftpd.org"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://download.pureftpd.org/pub/pure-ftpd/releases/$pkgname-$pkgver.tar.gz
+ pure-ftpd.initd
+ pure-ftpd.confd"
+
+_builddir="src/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --without-humor \
+ --without-unicode \
+ --with-minimal \
+ --with-throttling \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D ../$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+
+ install -m644 -D ../$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="a766eb36d537fd30217ffa129eb599b1 pure-ftpd-1.0.32.tar.gz
+4805788f4aeeb4efee64ddad0b526c3c pure-ftpd.initd
+5f1d2a2d353fc00bc39efa0ae6f1955f pure-ftpd.confd"
diff --git a/testing/pure-ftpd/pure-ftpd.confd b/testing/pure-ftpd/pure-ftpd.confd
new file mode 100644
index 000000000..f14cb0b19
--- /dev/null
+++ b/testing/pure-ftpd/pure-ftpd.confd
@@ -0,0 +1,93 @@
+# Config file for /etc/init.d/pure-ftpd
+##Comment variables out to disable its features, or change the values in it... ##
+
+## This variable must be uncommented in order for the server to start ##
+#IS_CONFIGURED="yes"
+
+## FTP Server,Port (separated by comma) ##
+## If you prefer host names over IP addresses, it's your choice:
+## SERVER="-S ftp.rtchat.com,21"
+## IPv6 addresses are supported.
+## !!! WARNING !!!
+## Using an invalid IP will result in the server not starting,
+## but reporting a correct start!
+## SERVER="-S 192.168.0.1,21"
+## By default binds to all available IPs.
+SERVER="-S 21"
+
+## Number of simultaneous connections in total, and per IP ##
+MAX_CONN="-c 30"
+MAX_CONN_IP="-C 10"
+
+## Start daemonized in background ##
+DAEMON="-B"
+
+## Don't allow uploads if the partition is more full then this var ##
+DISK_FULL="-k 90%"
+
+## If your FTP server is behind a NAT box, uncomment this ##
+#USE_NAT="-N"
+
+## Authentication mechanisms (others are 'pam', ...) ##
+## Further infos can be found in the README file.
+AUTH="-l unix"
+
+## Change the maximum idle time (in minutes) ##
+## If this variable is not defined, it will default to 15 minutes.
+#TIMEOUT="-I <timeout>'"
+
+## Facility used for syslog logging ##
+## If this variable is not defined, it will default to the 'ftp' facility.
+## Logging can be disabled with '-f none'.
+#LOG="-f <facility>"
+
+## Charset conversion support *experimental* ##
+## Only works if USE "charconv" is enabled (only Pure-FTPd >=1.0.21).
+## Set the charset of the filesystem.
+# CHARCONV="--fscharset <charset>"
+
+## If you want to process each file uploaded through Pure-FTPd, enter the name
+## of the script that should process the files below.
+## man pure-uploadscript to learn more about how to write this script.
+# UPLOADSCRIPT="/path/to/uploadscript"
+
+## Misc. Others ##
+MISC_OTHER="-A -x -j -R -Z"
+
+#
+# Use these inside $MISC_OTHER
+# More can be found on "http://download.pureftpd.org/pub/pure-ftpd/doc/README"
+#
+# -A [ chroot() everyone, but root ]
+# -e [ Only allow anonymous users ]
+# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]
+# -i [ Disallow upload for anonymous users, whatever directory perms are ]
+# -j [ If the home directory of a user doesn't exist, auto-create it ]
+# -M [ Allow anonymous users to create directories. ]
+# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]
+# -x [ In normal operation mode, authenticated users can read/write
+# files beginning with a dot ('.'). Anonymous users can't, for security reasons
+# (like changing banners or a forgotten .rhosts). When '-x' is used, authenticated
+# users can download dot-files, but not overwrite/create them, even if they own
+# them. ]
+# -X [ This flag is identical to the previous one (writing
+# dot-files is prohibited), but in addition, users can't even *read* files and
+# directories beginning with a dot (like "cd .ssh"). ]
+# -D [ List files beginning with a dot ('.') even when the client doesn't
+# append the '-a' option to the list command. A workaround for badly
+# configured FTP clients. ]
+# -G [ Disallow renaming. ]
+# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]
+# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]
+# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]
+
+
+# Some filesystems don't like accesses being memory mapped. This happens for
+# example with ftpwho on JFFS2 filesystems (bug #330563). If you happen to
+# have such a filesystem on /var set TMPFS_MOUNT to "true".
+TMPFS_MOUNT="false"
+
+# Special mount options (like nosuid or nodev) for the tmpfs mount can be added
+# here. Several options must be separated by comma: "nodev,nosuid"
+#TMPFS_OPTS=""
+
diff --git a/testing/pure-ftpd/pure-ftpd.initd b/testing/pure-ftpd/pure-ftpd.initd
new file mode 100644
index 000000000..768c565ef
--- /dev/null
+++ b/testing/pure-ftpd/pure-ftpd.initd
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/files/pure-ftpd.rc10,v 1.1 2010/08/19 08:07:13 polynomial-c Exp $
+
+ftpd_pidfile="/var/run/pure-ftpd.pid"
+script_pidfile="/var/run/pure-uploadscript.pid"
+ftpd_rundir="/var/lib/run/pure-ftpd"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "$IS_CONFIGURED" ] ; then
+ eerror "You need to setup /etc/conf.d/pure-ftpd first!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ if ${TMPFS_MOUNT:-false} && grep -q tmpfs /proc/filesystems ; then
+ [ -n "${TMPFS_OPTS}" ] && MOUNT_OPTS="-o ${TMPFS_OPTS}"
+ einfo "Mounting tmpfs on ${ftpd_rundir}"
+ mount ${MOUNT_OPTS} -t tmpfs tmpfs ${ftpd_rundir} \
+ || eerror "Unable to mount tmpfs"
+ fi
+
+ # only works with openrc
+ WAIT=""
+ if [ -f /etc/init.d/sysfs ]; then
+ WAIT="--wait 100"
+ fi
+
+ UPSCRIPT=""
+ OKNODO=""
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ UPSCRIPT="--uploadscript"
+ OKNODO="--oknodo"
+ fi
+ ebegin "Starting Pure-FTPd"
+ start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} $OKNODO --exec /usr/sbin/pure-ftpd ${WAIT} -- --pidfile ${ftpd_pidfile} $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT
+ result=$?
+ if [ $result -ne 0 ] ; then
+ eend 1 "Could not launch Pure-FTPd"
+ else
+ eend $result
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Starting Pure-FTPd upload script"
+ start-stop-daemon --start --quiet --make-pidfile --pidfile ${script_pidfile} --exec /usr/sbin/pure-uploadscript --background ${WAIT} -- -r $UPLOADSCRIPT
+ eend $?
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Stopping Pure-FTPd"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile}
+ eend $?
+ if [ -n "$UPLOADSCRIPT" ] ; then
+ ebegin "Stopping Pure-FTPd upload script"
+ start-stop-daemon --stop --retry 20 --quiet --pidfile ${script_pidfile}
+ eend $?
+ fi
+
+ if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then
+ umount ${ftpd_rundir} >/dev/null 2>&1
+ fi
+}
diff --git a/testing/py-application/APKBUILD b/testing/py-application/APKBUILD
new file mode 100644
index 000000000..2135f154f
--- /dev/null
+++ b/testing/py-application/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-application
+_name=python-application
+pkgver=1.2.7
+pkgrel=1
+pkgdesc="Basic building blocks for python applications"
+url="http://pypi.python.org/pypi/python-application"
+arch="all"
+license="PSF"
+depends="python"
+makedepends="python-dev"
+install=
+subpackages=""
+source="http://pypi.python.org/packages/source/p/python-application/python-application-$pkgver.tar.gz"
+build() {
+ cd "$srcdir"/$_name-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+ echo "/usr/lib/python2.6/site-packages/$_name-$pkgver-py2.6.egg" > "$pkgdir"/usr/lib/python2.6/site-packages/$_name.pth
+}
+md5sums="07b32e25d931c5e591278848f3fc9f20 python-application-1.2.7.tar.gz"
diff --git a/testing/py-asn1/APKBUILD b/testing/py-asn1/APKBUILD
new file mode 100644
index 000000000..eb519d356
--- /dev/null
+++ b/testing/py-asn1/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=py-asn1
+pkgver=0.0.13b
+pkgrel=1
+pkgdesc="python ASN1 library"
+url="http://pyasn1.sourceforge.net/"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev="python-dev py-setuptools"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://sourceforge.net/projects/pyasn1/files/pyasn1-devel/$pkgver/pyasn1-$pkgver.tar.gz"
+
+_builddir="$srcdir"/pyasn1-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir" || return 1
+}
+
+md5sums="a48b2661f3c56773e4c7a6da854a4593 pyasn1-0.0.13b.tar.gz"
diff --git a/testing/py-beautifulsoup/APKBUILD b/testing/py-beautifulsoup/APKBUILD
new file mode 100644
index 000000000..795edd02e
--- /dev/null
+++ b/testing/py-beautifulsoup/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-beautifulsoup
+_pkgname=BeautifulSoup
+pkgver=3.2.0
+pkgrel=0
+pkgdesc="A Python HTML/XML parser designed for quick turnaround projects like screen-scraping"
+url="http://www.crummy.com/software/BeautifulSoup/index.html"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev="python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.crummy.com/software/BeautifulSoup/download/3.x/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+}
+md5sums="ef1e78f7689ea61314f7bddebcfde88c BeautifulSoup-3.2.0.tar.gz"
diff --git a/testing/py-bluez/APKBUILD b/testing/py-bluez/APKBUILD
new file mode 100644
index 000000000..af14926da
--- /dev/null
+++ b/testing/py-bluez/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-bluez
+pkgver=0.18
+pkgrel=0
+pkgdesc="Python API for the BlueZ bluetooth stack "
+url="http://code.google.com/p/pybluez/"
+arch="all"
+license="GPLv2"
+depends=
+makedepends="python-dev bluez-dev"
+install=
+subpackages=
+source="http://pybluez.googlecode.com/files/PyBluez-$pkgver.tar.gz"
+
+_builddir="$srcdir"/PyBluez-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="be8c8ce615c3189fda1aaf3d568314b2 PyBluez-0.18.tar.gz"
diff --git a/testing/py-buildutils/APKBUILD b/testing/py-buildutils/APKBUILD
new file mode 100644
index 000000000..cbc08cc7a
--- /dev/null
+++ b/testing/py-buildutils/APKBUILD
@@ -0,0 +1,24 @@
+# Contributor: Andrew Manison <amanison@anselsystems.com>
+# Maintainer:
+pkgname=py-buildutils
+_pkgname=${pkgname#py-}
+pkgver=0.3
+pkgrel=1
+pkgdesc="buildutils is a collection of enhancements to the Python distutils"
+url="http://pypi.python.org/pypi/buildutils/0.3"
+arch="all"
+license="GPL"
+depends="python py-setuptools"
+makedepends="python-dev"
+install=
+subpackages=""
+source="http://pypi.python.org/packages/source/b/$_pkgname/$_pkgname-$pkgver.tar.gz"
+
+build() {
+ cd "$srcdir"/$_pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+ echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > "$pkgdir"/usr/lib/python2.6/site-packages/$_pkgname.pth
+}
+
+md5sums="fec620dee05f591edad386366b52e17b buildutils-0.3.tar.gz"
diff --git a/testing/py-cherrypy/APKBUILD b/testing/py-cherrypy/APKBUILD
new file mode 100644
index 000000000..6d1ab683f
--- /dev/null
+++ b/testing/py-cherrypy/APKBUILD
@@ -0,0 +1,26 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-cherrypy
+_pkgname=CherryPy
+pkgver=3.2.0
+pkgrel=0
+pkgdesc="A pythonic, object-oriented web development framework"
+url="http://www.cherrypy.org"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev="python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://mirror.its.uidaho.edu/pub/gentoo/distfiles/$_pkgname-$pkgver.tar.gz"
+# The real source is the following:
+#http://download.cherrypy.org/cherrypy/$pkgver/$_pkgname-$pkgver.tar.gz"
+#but seems not available atm
+_builddir="$srcdir"/$_pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+ install -Dm644 py2/cherrypy/LICENSE.txt ${pkgdir}/usr/share/licenses/custom/${pkgname}/license
+}
+md5sums="e5c1322bf5ce962c16283ab7a6dcca3f CherryPy-3.2.0.tar.gz"
diff --git a/testing/py-cjson/APKBUILD b/testing/py-cjson/APKBUILD
new file mode 100644
index 000000000..b11f796f5
--- /dev/null
+++ b/testing/py-cjson/APKBUILD
@@ -0,0 +1,25 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+
+pkgname=py-cjson
+_name=python-cjson
+pkgver=1.0.5
+pkgrel=2
+pkgdesc="Fast JSON encoder/decoder for Python"
+url="http://pypi.python.org/pypi/python-gnutls"
+arch="all"
+license="PSF"
+depends="python"
+makedepends="python-dev"
+install=
+subpackages=""
+source="http://pypi.python.org/packages/source/p/python-cjson/$_name-$pkgver.tar.gz"
+build() {
+ cd "$srcdir"/$_name-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+ echo "/usr/lib/python2.6/site-packages/$_name-$pkgver-py2.6.egg" > "$pkgdir"/usr/lib/python2.6/site-packages/$_name.pth
+
+}
+
+md5sums="4d55b66ecdf0300313af9d030d9644a3 python-cjson-1.0.5.tar.gz"
diff --git a/testing/py-crypto/APKBUILD b/testing/py-crypto/APKBUILD
new file mode 100644
index 000000000..f00d805bb
--- /dev/null
+++ b/testing/py-crypto/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-crypto
+_pkgname=pycrypto
+pkgver=2.3
+pkgrel=1
+pkgdesc="A collection of cryptographic algorithms and protocols, implemented for use from Python."
+url="https://www.dlitz.net/software/pycrypto/"
+arch="all"
+license="BSD"
+depends=""
+makedepends="gmp-dev python-dev"
+subpackages=""
+source="http://ftp.dlitz.net/pub/dlitz/crypto/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+ python setup.py test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="2b811cfbfc342d83ee614097effb8101 pycrypto-2.3.tar.gz"
diff --git a/testing/py-curl/APKBUILD b/testing/py-curl/APKBUILD
new file mode 100644
index 000000000..3100eee0d
--- /dev/null
+++ b/testing/py-curl/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-curl
+pkgver=7.19.0
+pkgrel=0
+pkgdesc="A Python interface to libcurl"
+url="http://pycurl.sourceforge.net/"
+arch="all"
+license="LGPLv2+ or MIT"
+depends="python"
+depends_dev=""
+makedepends="curl-dev python-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://pycurl.sourceforge.net/download/pycurl-$pkgver.tar.gz"
+
+_builddir="$srcdir"/pycurl-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="919d58fe37e69fe87ce4534d8b6a1c7b pycurl-7.19.0.tar.gz"
diff --git a/testing/py-dateutil/APKBUILD b/testing/py-dateutil/APKBUILD
new file mode 100644
index 000000000..f1915d816
--- /dev/null
+++ b/testing/py-dateutil/APKBUILD
@@ -0,0 +1,23 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-dateutil
+_pkgname=python-dateutil
+pkgver=1.5
+pkgrel=1
+pkgdesc="Provides powerful extensions to the standard datetime module"
+url="http://labix.org/python-dateutil"
+arch="noarch"
+license="PYTHON"
+depends=
+depends_dev="python-dev py-setuptools"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://labix.org/download/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE
+}
+md5sums="35f3732db3f2cc4afdc68a8533b60a52 python-dateutil-1.5.tar.gz"
diff --git a/testing/py-distutils-extra/APKBUILD b/testing/py-distutils-extra/APKBUILD
new file mode 100644
index 000000000..5ce7fc9e5
--- /dev/null
+++ b/testing/py-distutils-extra/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=py-distutils-extra
+pkgver=2.31
+pkgrel=1
+pkgdesc="Enhanced distutils package for python"
+url="http://launchpad.net/python-distutils-extra"
+arch="noarch"
+license="GPL"
+depends="py-setuptools"
+makedepends="python-dev"
+install=""
+source="http://launchpad.net/python-distutils-extra/trunk/$pkgver/+download/python-distutils-extra-$pkgver.tar.gz"
+_builddir="$srcdir"/python-distutils-extra-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir" || return 1
+}
+
+md5sums="9349361fc3f86ccb77142e6e5eb5185b python-distutils-extra-2.31.tar.gz"
diff --git a/testing/py-django/APKBUILD b/testing/py-django/APKBUILD
new file mode 100644
index 000000000..a48e7e531
--- /dev/null
+++ b/testing/py-django/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Andrew Wilcox <AWilcox@Wilcox-Tech.com>
+# Maintainer:
+pkgname=py-django
+_pkgname=Django
+pkgver=1.2.5
+pkgrel=1
+pkgdesc="A high-level Python Web framework that encourages rapid development and clean, pragmatic design."
+url="http://djangoproject.com/"
+arch="noarch"
+license="bsd"
+depends=python
+depends_dev=python-dev
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$_pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root "$pkgdir"
+}
+
+md5sums="e031ea3d00996035e49e4bfa86e07c40 Django-1.2.5.tar.gz"
diff --git a/testing/py-dnspython/APKBUILD b/testing/py-dnspython/APKBUILD
new file mode 100644
index 000000000..0678ef8bf
--- /dev/null
+++ b/testing/py-dnspython/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-dnspython
+_pkgname=dnspython
+pkgver=1.9.2
+pkgrel=0
+pkgdesc="A DNS toolkit for Python"
+url="http://www.dnspython.org"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev="python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.dnspython.org/kits/$pkgver/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+}
+md5sums="26426043e619d34b47c7c30dc0a02f1c dnspython-1.9.2.tar.gz"
diff --git a/testing/py-eventlet/APKBUILD b/testing/py-eventlet/APKBUILD
new file mode 100644
index 000000000..aaacadaae
--- /dev/null
+++ b/testing/py-eventlet/APKBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+pkgname=py-eventlet
+pkgver=0.9.16
+pkgrel=1
+pkgdesc="Python library for seamless coroutine-based concurrency"
+url="http://eventlet.net/"
+arch="noarch"
+license="MIT"
+depends="python py-greenlet"
+makedepends="python-dev py-setuptools"
+source="http://pypi.python.org/packages/source/e/eventlet/eventlet-${pkgver}.tar.gz"
+
+_builddir="$srcdir"/eventlet-$pkgver
+build ()
+{
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+md5sums="4728e3bd7f72763c1e5dccac0296f8ea eventlet-0.9.16.tar.gz"
diff --git a/testing/py-gevent/APKBUILD b/testing/py-gevent/APKBUILD
new file mode 100644
index 000000000..9bda980c0
--- /dev/null
+++ b/testing/py-gevent/APKBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
+# Contributor: Michael Zhou <zhoumichaely@gmail.com>
+pkgname=py-gevent
+pkgver=0.13.6
+pkgrel=1
+pkgdesc="Python library for seamless coroutine-based concurrency"
+url="http://gevent.org/"
+arch="x86 x86_64"
+license="MIT"
+depends="py-greenlet"
+makedepends="python-dev py-setuptools libevent-dev"
+source="http://pypi.python.org/packages/source/g/gevent/gevent-${pkgver}.tar.gz"
+
+_builddir="$srcdir"/gevent-$pkgver
+build ()
+{
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+md5sums="7c836ce2315d44ba0af6134efbcd38c9 gevent-0.13.6.tar.gz"
diff --git a/testing/py-gnome/APKBUILD b/testing/py-gnome/APKBUILD
new file mode 100644
index 000000000..5517ca7cb
--- /dev/null
+++ b/testing/py-gnome/APKBUILD
@@ -0,0 +1,85 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=py-gnome
+_realname=gnome-python
+pkgver=2.28.1
+_basever=2.28
+pkgrel=2
+pkgdesc="Python interface to GNOME libraries"
+url="http://pygtk.org"
+arch="noarch"
+license="LGPL"
+depends="$pkgname-bonobo $pkgname-gconf $pkgname-libgnome $pkgname-gnomevfs"
+depends_dev="gtk+-dev libgnome-dev py-gobject-dev py-gtk-dev python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-bonobo $pkgname-gconf $pkgname-libgnome \
+ $pkgname-gnomevfs"
+source="http://ftp.gnome.org/pub/gnome/sources/$_realname/$_basever/$_realname-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install-pkgconfigDATA || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+bonobo() {
+ pkgdesc="Python bindings for interfacing with Bonobo"
+ arch="noarch"
+ depends="py-gtk $pkgname-gnomecanvas"
+ cd "$_builddir"
+ make -C bonobo DESTDIR=$subpkgdir install || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+gconf() {
+ pkgdesc="Python bindings for interfacing with GConf"
+ arch="all"
+ depends="gconf py-gtk"
+ cd "$_builddir"
+ make -C gconf DESTDIR=$subpkgdir install || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+# Temporarily disabled as it does not build
+#gnomecanvas() {
+# pkgdesc="Python bindings for the GNOME Canvas"
+# cd "$_builddir"
+# make -C gnomecanvas DESTDIR=$subpkgdir install || return 1
+# find $pkgdir -iname *.la -delete
+#}
+
+gnomevfs() {
+ pkgdesc="Python bindings for interacting with gnome-vfs"
+ arch="all"
+ depends="gnome-vfs"
+ cd "$_builddir"
+ make -C gnomevfs DESTDIR=$subpkgdir install || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+libgnome() {
+ pkgdesc="Python bindings for libgnome"
+ arch="all"
+ depends="py-gtk $pkgname-bonobo $pkgname-gnomecanvas $pkgname-gnomevfs"
+ cd "$_builddir"
+ make -C gnome DESTDIR=$subpkgdir install || return 1
+ find $pkgdir -iname *.la -delete
+}
+
+md5sums="a17ad952813ed86f520de8e07194a2bf gnome-python-2.28.1.tar.bz2"
diff --git a/testing/py-greenlet/APKBUILD b/testing/py-greenlet/APKBUILD
new file mode 100644
index 000000000..2be1c6115
--- /dev/null
+++ b/testing/py-greenlet/APKBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+# Contributor: Elizabeth Jennifer Myers <elizabeth@sporksirc.net>
+pkgname=py-greenlet
+pkgver=0.3.1
+pkgrel=1
+pkgdesc="Lightweight in-process concurrent programming"
+url="http://pypi.python.org/pypi/greenlet"
+arch="all"
+license="MIT"
+depends="python"
+makedepends="python-dev py-setuptools"
+source="http://pypi.python.org/packages/source/g/greenlet/greenlet-$pkgver.tar.gz"
+
+_builddir="$srcdir"/greenlet-$pkgver
+build ()
+{
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+md5sums="8d75d7f3f659e915e286e1b0fa0e1c4d greenlet-0.3.1.tar.gz"
diff --git a/testing/py-jabberbot/APKBUILD b/testing/py-jabberbot/APKBUILD
new file mode 100644
index 000000000..c13d562a4
--- /dev/null
+++ b/testing/py-jabberbot/APKBUILD
@@ -0,0 +1,25 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-jabberbot
+_pkgname=python-jabberbot
+pkgver=0.13
+pkgrel=1
+pkgdesc="A simple Jabber Bot for Python"
+url="http://pypi.python.org/pypi/jabberbot"
+arch="noarch"
+license="GPLv3"
+depends="py-xmpppy python"
+makedepends="python-dev"
+install=""
+subpackages=""
+source="http://thpinfo.com/2007/$_pkgname/jabberbot-$pkgver.tar.gz"
+_builddir=$srcdir/jabberbot-$pkgver
+build() {
+ cd "$_builddir"
+ python setup.py build
+}
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+md5sums="006311f57f38b6e88abb0fbcb2e0fb7c jabberbot-0.13.tar.gz"
diff --git a/testing/py-libacl/APKBUILD b/testing/py-libacl/APKBUILD
new file mode 100644
index 000000000..975524ea8
--- /dev/null
+++ b/testing/py-libacl/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-libacl
+_pkgname=pylibacl
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="A python module for manipulating ACLs"
+url="http://pylibacl.sourceforge.net/"
+arch="all"
+license="LGPL2+"
+depends=""
+depends_dev=""
+makedepends="python-dev acl-dev py-setuptools"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir" || return 1
+}
+
+md5sums="b9d34da90e6da0813115071b3a1ab204 pylibacl-0.5.0.tar.gz"
diff --git a/testing/py-logilab-astng/APKBUILD b/testing/py-logilab-astng/APKBUILD
new file mode 100644
index 000000000..0a8a78882
--- /dev/null
+++ b/testing/py-logilab-astng/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-logilab-astng
+_realname=logilab-astng
+pkgver=0.21.1
+pkgrel=0
+pkgdesc="Rebuild a new abstract syntax tree from Python's ast"
+url="http://pypi.python.org/pypi/logilab-astng"
+arch="noarch"
+license="GPL2+"
+depends="python py-logilab-common"
+depends_dev=""
+makedepends="python-dev py-logilab-common"
+install=""
+subpackages=""
+source="http://pypi.python.org/packages/source/l/"$_realname"/"$_realname"-$pkgver.tar.gz"
+_builddir="$srcdir"/"$_realname"-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ rm -f "$pkgdir"/usr/lib/python2.?/site-packages/logilab/__init__.*
+}
+
+md5sums="f25dd1d92a1b80d07a2f9d5bb4fe9d97 logilab-astng-0.21.1.tar.gz"
diff --git a/testing/py-logilab-common/APKBUILD b/testing/py-logilab-common/APKBUILD
new file mode 100644
index 000000000..b6cd1cee7
--- /dev/null
+++ b/testing/py-logilab-common/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-logilab-common
+_realname=logilab-common
+pkgver=0.56.0
+pkgrel=0
+pkgdesc="A collection of Python packages and modules used by Logilab projects"
+url="http://www.logilab.org/project/logilab-common"
+arch="noarch"
+license="LGPL2+"
+depends="python"
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://ftp.logilab.org/pub/common/"$_realname"-$pkgver.tar.gz"
+_builddir="$srcdir"/"$_realname"-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+doc() {
+ # The man page is not picked-up automatically
+ mkdir -p "$subpkgdir"/usr/share/man/man1 || return 1
+ mv "$_builddir"/doc/*.1 "$subpkgdir"/usr/share/man/man1/ || return 1
+}
+
+md5sums="9737aa6b05758779df201113a9aa592b logilab-common-0.56.0.tar.gz"
diff --git a/testing/py-lxml/APKBUILD b/testing/py-lxml/APKBUILD
new file mode 100644
index 000000000..5830a9348
--- /dev/null
+++ b/testing/py-lxml/APKBUILD
@@ -0,0 +1,21 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-lxml
+_pkgname=lxml
+pkgver=2.2.8
+pkgrel=1
+pkgdesc="Python LXML Library"
+url="http://codespeak.net/lxml"
+arch="all"
+license="GPL"
+depends="libxml2 libxslt"
+makedepends="libxml2-dev libxslt-dev py-setuptools"
+install=
+source="http://codespeak.net/lxml/$_pkgname-$pkgver.tgz"
+build() {
+ cd "$srcdir"/$_pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+ echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > "$pkgdir"/usr/lib/python2.6/site-packages/$_pkgname.pth
+}
+md5sums="d6c612d63a84d79440912a1b29d3b981 lxml-2.2.8.tgz"
diff --git a/testing/py-m2crypto/APKBUILD b/testing/py-m2crypto/APKBUILD
new file mode 100644
index 000000000..4719b4e0e
--- /dev/null
+++ b/testing/py-m2crypto/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=py-m2crypto
+_pkgname=M2Crypto
+pkgver=0.21.1
+pkgrel=0
+pkgdesc="A crypto and SSL toolkit for Python"
+url="http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=
+makedepends="python-dev swig openssl-dev"
+install=""
+subpackages=""
+source="http://pypi.python.org/packages/source/M/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+md5sums="f93d8462ff7646397a9f77a2fe602d17 M2Crypto-0.21.1.tar.gz"
diff --git a/testing/py-mechanize/APKBUILD b/testing/py-mechanize/APKBUILD
new file mode 100644
index 000000000..0fdad0c25
--- /dev/null
+++ b/testing/py-mechanize/APKBUILD
@@ -0,0 +1,23 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-mechanize
+_pkgname=mechanize
+pkgver=0.2.4
+pkgrel=0
+pkgdesc="Stateful programmatic web browsing in Python"
+url="http://wwwsearch.sourceforge.net/mechanize/"
+arch="noarch"
+license="BSD ZPL"
+depends=
+depends_dev="python-dev py-setuptools"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://wwwsearch.sourceforge.net/$_pkgname/src/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir
+ install -Dm644 COPYING.txt ${pkgdir}/usr/share/licenses/custom/${pkgname}/COPYING.txt
+}
+md5sums="0c1c3cec1c6d7b5d87662a069f04eb8d mechanize-0.2.4.tar.gz"
diff --git a/testing/py-mysqldb/APKBUILD b/testing/py-mysqldb/APKBUILD
new file mode 100644
index 000000000..cf990a1aa
--- /dev/null
+++ b/testing/py-mysqldb/APKBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-mysqldb
+pkgver=1.2.3
+pkgrel=0
+pkgdesc="MySQL Module for python"
+url="http://sourceforge.net/projects/mysql-python/"
+arch="all"
+license="GPL"
+depends="python"
+makedepends="py-setuptools mysql-dev"
+source="http://downloads.sourceforge.net/mysql-python/MySQL-python-${pkgver}.tar.gz"
+build() {
+ cd "$srcdir"/MySQL-python-$pkgver
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+ echo "/usr/lib/python2.6/site-packages/$pkgname-$pkgver-py2.6.egg" \
+ > "$pkgdir"/usr/lib/python2.6/site-packages/$pkgname.pth
+}
+md5sums="215eddb6d853f6f4be5b4afc4154292f MySQL-python-1.2.3.tar.gz"
diff --git a/testing/py-newt_syrup/APKBUILD b/testing/py-newt_syrup/APKBUILD
new file mode 100644
index 000000000..5bba5059d
--- /dev/null
+++ b/testing/py-newt_syrup/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-newt_syrup
+pkgver=0.1.2
+pkgrel=0
+pkgdesc="Newt Syrup is an app framework built on top of Newt"
+url="http://newt-syrup.fedorahosted.org/"
+arch="noarch"
+license="LGPLv2+"
+depends=""
+depends_dev=""
+makedepends="python-dev py-setuptools"
+install=""
+subpackages=""
+source="http://mcpierce.fedorapeople.org/rpms/newt_syrup-$pkgver.tar.gz"
+
+_builddir="$srcdir"/newt_syrup-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="b9412ee2483d11da28a09a26c9b70c8d newt_syrup-0.1.2.tar.gz"
diff --git a/testing/py-paramiko/APKBUILD b/testing/py-paramiko/APKBUILD
new file mode 100644
index 000000000..c09e6f2e1
--- /dev/null
+++ b/testing/py-paramiko/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-paramiko
+_pkgname=paramiko
+pkgver=1.7.7.1
+pkgrel=0
+pkgdesc="SSH2 protocol library for Python"
+url="http://www.lag.net/paramiko/"
+arch="noarch"
+license="LGPL2+"
+depends="py-crypto"
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages="$pkgname-demos $pkgname-docs"
+source="http://www.lag.net/paramiko/download/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+demos() {
+ # Put the demo files into a seperate package
+ mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/demos || return 1
+ mv "$_builddir"/demos "$subpkgdir"/usr/share/doc/"$pkgname"/ || return 1
+}
+
+docs() {
+ # Put the documentation files into a seperate package
+ mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/docs || return 1
+ mv "$_builddir"/docs "$subpkgdir"/usr/share/doc/"$pkgname"/ || return 1
+}
+
+md5sums="ce8e2c254378312a264206f65c354d72 paramiko-1.7.7.1.tar.gz"
diff --git a/testing/py-pycountry/APKBUILD b/testing/py-pycountry/APKBUILD
new file mode 100644
index 000000000..e4ad4f3af
--- /dev/null
+++ b/testing/py-pycountry/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-pycountry
+_pkgname=pycountry
+pkgver=0.12.1
+pkgrel=1
+pkgdesc="ISO country, subdivision, language, currency and script definitions and their translations"
+url="http://pypi.python.org/pypi/pycountry"
+arch="noarch"
+license="LGPL2"
+depends=
+depends_dev="python-dev py-lxml py-setuptools"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://pypi.python.org/packages/source/p/${_pkgname}/${_pkgname}-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+package() {
+ cd "$_builddir"
+ python setup.py install --root=$pkgdir/ || return 1
+}
+md5sums="d593c50b446850ee40c4a342677100d5 pycountry-0.12.1.tar.gz"
diff --git a/testing/py-qt/APKBUILD b/testing/py-qt/APKBUILD
new file mode 100644
index 000000000..6cd6361a4
--- /dev/null
+++ b/testing/py-qt/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-qt
+_pkgname=PyQt
+pkgver=4.8.5
+pkgrel=0
+pkgdesc="A set of Python bindings for the Qt toolkit"
+url="http://riverbankcomputing.co.uk/software/pyqt/intro"
+arch="all"
+license="GPL"
+depends="py-sip"
+depends_dev="python-dev py-dbus-dev phonon-dev qt-dev py-sip-dev libx11-dev"
+makedepends="$depends_dev"
+subpackages=""
+install=
+source="http://riverbankcomputing.co.uk/static/Downloads/${_pkgname}4/${_pkgname}-x11-gpl-$pkgver.tar.gz"
+build() {
+ cd "${srcdir}/PyQt-x11-gpl-${pkgver}"
+ python configure.py \
+ --confirm-license \
+ -v /usr/share/sip \
+ --qsci-api
+ # Thanks Gerardo for the rpath fix
+ find -name 'Makefile' | xargs sed -i 's|-Wl,-rpath,/usr/lib||g;s|-Wl,-rpath,.* ||g'
+ make
+}
+package(){
+ cd "${srcdir}/PyQt-x11-gpl-${pkgver}"
+ make DESTDIR="${pkgdir}" INSTALL_ROOT="${pkgdir}" install
+}
+
+md5sums="0e4264bb912edfbda319bb236ac84407 PyQt-x11-gpl-4.8.5.tar.gz"
diff --git a/testing/py-serial/APKBUILD b/testing/py-serial/APKBUILD
new file mode 100644
index 000000000..200eab121
--- /dev/null
+++ b/testing/py-serial/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-serial
+_realname=pyserial
+pkgver=2.5
+pkgrel=0
+pkgdesc="Python Serial Port Extension"
+url="http://pyserial.sourceforge.net/"
+arch="noarch"
+license="Python"
+depends="python"
+makedepends="python-dev"
+install=""
+subpackages="$pkgname-doc $pkgname-examples"
+source="http://pypi.python.org/packages/source/p/"$_realname"/pyserial-$pkgver.tar.gz"
+_builddir="$srcdir"/$_realname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+doc() {
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/ || return 1
+ # Documentation files
+ _docs="appendix.rst examples.rst pyparallel.rst pyserial.rst \
+ pyserial_api.rst shortintro.rst"
+ for _doc in $_docs; do
+ mv "$srcdir"/$_realname-$pkgver/documentation/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+}
+
+examples() {
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/examples || return 1
+ # Example files
+ _examples="enhancedserial.py miniterm.py rfc2217_server.py scan.py \
+ scanlinux.py tcp_serial_redirect.py port_publisher.py port_publisher.sh"
+ for _example in $_examples; do
+ mv "$srcdir"/$_realname-$pkgver/examples/$_example \
+ "$subpkgdir"/usr/share/doc/$pkgname/examples/$_example || return 1
+ done
+}
+
+md5sums="34340820710239bea2ceca7f43ef8cab pyserial-2.5.tar.gz"
diff --git a/testing/py-sip/APKBUILD b/testing/py-sip/APKBUILD
new file mode 100644
index 000000000..188b594e3
--- /dev/null
+++ b/testing/py-sip/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer:
+pkgname=py-sip
+_pkgname=sip
+pkgver=4.12.3
+pkgrel=1
+pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
+url="http://www.riverbankcomputing.com/software/sip/"
+arch="all"
+license="custom:sip"
+depends=
+depends_dev="python-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.riverbankcomputing.com/static/Downloads/sip4/${_pkgname}-${pkgver}.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ python configure.py
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/custom/${pkgname}/LICENSE
+}
+
+md5sums="d0f1fa60494db04b4d115d4c2d92f79e sip-4.12.3.tar.gz"
diff --git a/testing/py-tftpy/APKBUILD b/testing/py-tftpy/APKBUILD
new file mode 100644
index 000000000..c0f2766da
--- /dev/null
+++ b/testing/py-tftpy/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=tftpy
+pkgver=0.6.0
+pkgrel=0
+pkgdesc="A Pure Python TFTP Protocol Implementation"
+url="http://tftpy.sourceforge.net/"
+arch="noarch"
+license="MIT"
+depends=""
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/tftpy/tftpy-$pkgver.tar.gz"
+_builddir="$srcdir"/tftpy-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="b306d30ef1799f1932540a54cd72f79d tftpy-0.6.0.tar.gz"
diff --git a/testing/py-twisted-web2/APKBUILD b/testing/py-twisted-web2/APKBUILD
new file mode 100644
index 000000000..dc80dcc04
--- /dev/null
+++ b/testing/py-twisted-web2/APKBUILD
@@ -0,0 +1,21 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+
+pkgname=py-twisted-web2
+pkgver=8.1.0
+pkgrel=1
+pkgdesc="The twisted.web2 package in Twisted."
+url="http://twistedmatrix.com/"
+arch="all"
+license="GPL"
+depends="py-twisted"
+makedepends="python-dev"
+source="http://tmrc.mit.edu/mirror/twisted/Web2/8.1/TwistedWeb2-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir"/TwistedWeb2-8.1.0/
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+
+md5sums="e34b48edf6fef075bd41ddbd215aed32 TwistedWeb2-8.1.0.tar.bz2"
diff --git a/testing/py-twisted/APKBUILD b/testing/py-twisted/APKBUILD
new file mode 100644
index 000000000..f1bbbb101
--- /dev/null
+++ b/testing/py-twisted/APKBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-twisted
+pkgver=10.0.0
+pkgrel=1
+pkgdesc="Asynchronous networking framework written in Python."
+url="http://twistedmatrix.com/"
+arch="all"
+license="MIT"
+depends="python py-crypto py-zope-interface"
+makedepends="python-dev"
+source="http://tmrc.mit.edu/mirror/twisted/Twisted/${pkgver%.*}/Twisted-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir"/Twisted-$pkgver
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$srcdir"/Twisted-$pkgver
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+md5sums="3b226af1a19b25e3b3e93cc6edf5e284 Twisted-10.0.0.tar.bz2"
diff --git a/testing/py-urlgrabber/APKBUILD b/testing/py-urlgrabber/APKBUILD
new file mode 100644
index 000000000..3d812a5b8
--- /dev/null
+++ b/testing/py-urlgrabber/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-urlgrabber
+pkgver=3.9.1
+pkgrel=0
+pkgdesc="python module for fetching files"
+url="http://urlgrabber.baseurl.org/"
+arch="noarch"
+license="LGPL"
+depends="python py-curl"
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://urlgrabber.baseurl.org/download/urlgrabber-$pkgver.tar.gz"
+
+_builddir="$srcdir"/urlgrabber-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="00c8359bf71062d0946bacea521f80b4 urlgrabber-3.9.1.tar.gz"
diff --git a/testing/py-xattr/APKBUILD b/testing/py-xattr/APKBUILD
new file mode 100644
index 000000000..9d0ec5d9d
--- /dev/null
+++ b/testing/py-xattr/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-xattr
+_pkgname=pyxattr
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="A python module for accessing filesystem Extended Attributes"
+url="http://pyxattr.sourceforge.net/"
+arch="all"
+license="LGPL2+"
+depends=""
+depends_dev=""
+makedepends="python-dev attr-dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/$_pkgname/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir" || return 1
+}
+
+md5sums="0f7ab1e185087329e40f7de218517c84 pyxattr-0.5.0.tar.gz"
diff --git a/testing/py-xmpppy/APKBUILD b/testing/py-xmpppy/APKBUILD
new file mode 100644
index 000000000..fefe8e7cf
--- /dev/null
+++ b/testing/py-xmpppy/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-xmpppy
+_pkgname=xmpppy
+pkgver=0.5.0
+_pkgver=0.5.0rc1
+pkgrel=1
+pkgdesc="A Python library to provide easy scripting with Jabber"
+url="http://xmpppy.sourceforge.net/"
+arch="noarch"
+license="GPL"
+depends="python"
+makedepends="py-setuptools python-dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/sourceforge/xmpppy/$_pkgname-$_pkgver.tar.gz"
+_builddir=$srcdir/$_pkgname-$_pkgver
+build() {
+ cd "$_builddir"
+ python setup.py build
+}
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+ python setup.py install --root="$pkgdir"
+}
+md5sums="e0d2b3f9e4a278c163431e64adb0c861 xmpppy-0.5.0rc1.tar.gz"
diff --git a/testing/py-yaml/APKBUILD b/testing/py-yaml/APKBUILD
new file mode 100644
index 000000000..29e0f3e62
--- /dev/null
+++ b/testing/py-yaml/APKBUILD
@@ -0,0 +1,29 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-yaml
+_pkgname=PyYAML
+pkgver=3.10
+pkgrel=0
+pkgdesc="Python bindings for YAML"
+url="http://pyyaml.org"
+arch="all"
+license="MIT"
+depends=
+depends_dev=
+makedepends="libyaml-dev python-dev"
+install=""
+subpackages=""
+source="http://pyyaml.org/download/pyyaml/$_pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+md5sums="74c94a383886519e9e7b3dd1ee540247 PyYAML-3.10.tar.gz"
diff --git a/testing/py-zope-interface/APKBUILD b/testing/py-zope-interface/APKBUILD
new file mode 100644
index 000000000..fbc21c63e
--- /dev/null
+++ b/testing/py-zope-interface/APKBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-zope-interface
+pkgver=3.6.1
+pkgrel=1
+pkgdesc="Separate distribution of the zope.interface package used in Zope 3."
+url="http://www.zope.org/Products/ZopeInterface/"
+arch="all"
+license="ZPL"
+depends="python"
+makedepends="python-dev"
+source="http://pypi.python.org/packages/source/z/zope.interface/zope.interface-$pkgver.tar.gz"
+
+_builddir="$srcdir"/zope.interface-$pkgver
+build() {
+ cd "$_builddir"
+ python setup.py build
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir"
+ rm "$pkgdir"/usr/lib/python*/site-packages/zope/interface/README*.txt
+}
+md5sums="7a895181b8d10be4a7e9a3afa13cd3be zope.interface-3.6.1.tar.gz"
diff --git a/testing/pylint/APKBUILD b/testing/pylint/APKBUILD
new file mode 100644
index 000000000..bb524faa5
--- /dev/null
+++ b/testing/pylint/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=pylint
+pkgver=0.23.0
+pkgrel=0
+pkgdesc="Analyzes Python code looking for bugs and signs of poor quality"
+url="http://pypi.python.org/pypi/pylint"
+arch="noarch"
+license="GPL2+"
+depends="python py-logilab-astng"
+depends_dev=""
+makedepends="python-dev py-logilab-astng"
+install=""
+subpackages="$pkgname-doc"
+source="http://pypi.python.org/packages/source/p/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ python setup.py build || return 1
+}
+
+package() {
+ cd "$_builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+}
+
+doc() {
+ # The man page is not picked-up automatically
+ mkdir -p "$subpkgdir"/usr/share/man/man1 || return 1
+ mv "$_builddir"/man/*.1 "$subpkgdir"/usr/share/man/man1/ || return 1
+}
+
+md5sums="f010eee3289b1af77cd8e8e45fb72829 pylint-0.23.0.tar.gz"
diff --git a/testing/python3/APKBUILD b/testing/python3/APKBUILD
new file mode 100644
index 000000000..489562fc3
--- /dev/null
+++ b/testing/python3/APKBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Kiyoshi Aman <kiyoshi.aman@gmail.com>
+pkgname=python3
+pkgver=3.2.0
+_pkgver=3.2
+pkgrel=0
+pkgdesc="A high-level scripting language"
+url="http://www.python.org"
+arch="all"
+license="custom"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-tests"
+depends=
+makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev
+ sqlite-dev libffi-dev tcl-dev"
+source="http://www.python.org/ftp/python/$_pkgver/Python-$_pkgver.tar.bz2"
+
+_builddir="$srcdir"/Python-$_pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-shared \
+ --with-threads \
+ --with-system-ffi \
+ --enable-unicode=ucs4 \
+ --with-dbmliborder=ndbm \
+ || return 1
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install
+ mv "$pkgdir"/usr/bin/2to3 "$pkgdir"/usr/bin/2to3-3.1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+_mv_files() {
+ cd "$pkgdir"/usr/lib/python$_pkgver
+ for i in */test */tests; do
+ mkdir -p "$subpkgdir"/usr/lib/python$_pkgver/"$i"
+ mv "$i"/* "$subpkgdir"/usr/lib/python$_pkgver/"$i"
+ rm -rf "$i"
+ done
+ mv "$pkgdir"/usr/lib/python$_pkgver/test "$subpkgdir"/usr/lib/python$_pkgver
+}
+
+tests() {
+ pkgdesc="The test modules from the main python package"
+ arch="noarch"
+ cd "$pkgdir"
+ _mv_files
+}
+
+md5sums="92e94b5b6652b96349d6362b8337811d Python-3.2.tar.bz2"
diff --git a/testing/qca/APKBUILD b/testing/qca/APKBUILD
new file mode 100644
index 000000000..b11415ffc
--- /dev/null
+++ b/testing/qca/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=qca
+pkgver=2.0.3
+pkgrel=0
+pkgdesc="Qt cryptographic architecture"
+url="http://delta.affinix.com/qca/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://delta.affinix.com/download/qca/2.0/qca-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/qca-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INSTALL_ROOT="$pkgdir" install || return 1
+}
+
+md5sums="fc15bd4da22b8096c51fcfe52d2fa309 qca-2.0.3.tar.bz2"
diff --git a/testing/qimageblitz/APKBUILD b/testing/qimageblitz/APKBUILD
new file mode 100644
index 000000000..f4450fcce
--- /dev/null
+++ b/testing/qimageblitz/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=qimageblitz
+pkgver=0.0.4
+pkgrel=0
+pkgdesc="qt image processing library"
+url="http://sourceforge.net/projects/qimageblitz"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://sourceforge.net/projects/qimageblitz/files/qimageblitz-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/qimageblitz-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="cb87c7f1c0455e8984ee4830f1e749cf qimageblitz-0.0.4.tar.bz2"
diff --git a/testing/qpage/APKBUILD b/testing/qpage/APKBUILD
new file mode 100644
index 000000000..63adae631
--- /dev/null
+++ b/testing/qpage/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=qpage
+pkgver=3.3
+pkgrel=0
+pkgdesc="Sends messages to an alphanumeric pager via TAP protocol."
+url="http://www.qpage.org/"
+arch="all"
+license="Custom"
+depends=""
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-install"
+source="saveas-http://archive.debian.org/debian/pool/non-free/q/$pkgname/"$pkgname"_3.3final.orig.tar.gz/$pkgname-$pkgver.tar.gz
+ config.input
+ qpage.initd
+ qpage.patch
+ "
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+build() {
+ cd "$_builddir"
+ cp -f "$srcdir"/config.input "$_builddir" || return 1
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make || return 1
+}
+package() {
+ mkdir -p "$pkgdir"/usr/bin
+ mkdir -p "$pkgdir"/etc/qpage
+ install -m755 "$_builddir"/$pkgname "$pkgdir"/usr/bin/"$pkgname"
+ install -m644 -D "$_builddir"/example.cf "$pkgdir"/etc/qpage/qpage.conf.example
+ install -m644 -D "$_builddir"/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+md5sums="eb98faaa51f89db68ecf7668f5294309 qpage-3.3.tar.gz
+3ac8c6e2aede9e195eba2555eb3b4645 config.input
+f439315da04ebdd1e1cc2840171d45d3 qpage.initd
+e8a4a6926973c940fe34dc6c4e892606 qpage.patch"
diff --git a/testing/qpage/config.input b/testing/qpage/config.input
new file mode 100644
index 000000000..e133cb36a
--- /dev/null
+++ b/testing/qpage/config.input
@@ -0,0 +1,83 @@
+#########################################################
+# #
+# Almost all of the QuickPage configuration options #
+# can be controlled at run-time by keywords in the #
+# configuration file. However, there is a small #
+# set of options that must be defined at compile #
+# time. #
+# #
+# Here are the compile-time configuration options. #
+# Edit these as appropriate for your environment. #
+# #
+# Note: This file is sourced by the configure script. #
+# Do not make any changes incompatible with /bin/sh. #
+# #
+#########################################################
+
+
+#
+# QPAGE_CONFIG defines the location of the configuration file.
+# See the QuickPage documentation for complete details about
+# the syntax of the configuration file.
+#
+QPAGE_CONFIG="/etc/qpage/qpage.cf"
+
+
+#
+# SNPP_SERVER defines the default name of the SNPP server.
+# The default is localhost. This is probably not appropriate
+# for most network configurations; change this to the machine
+# where you intend to run the QuickPage daemon. Multiple
+# hostnames can be specified by separating them with commas.
+#
+SNPP_SERVER="localhost"
+
+
+#
+# SNPP_SERVER_FILE defines a filename containing one or
+# more hostnames of SNPP servers. QuickPage clients
+# read this file (if it exists) to locate a server. All
+# servers listed in this file are assumed to have identical
+# copies of the configuration file. Only one filename
+# may be specified.
+#
+SNPP_SERVER_FILE="/etc/qpage/qpage.servers"
+
+
+#
+# DAEMON_USER specifies which user the QuickPage daemon
+# should run as after dropping root privileges. If a
+# userid or UID is specified and a password entry exists
+# for that user, QuickPage will assume all group privileges
+# assigned to that user.
+#
+DAEMON_USER="qpage"
+
+
+#
+# SYSLOG_FACILITY defines which syslog facility should be
+# used by QuickPage to log messages. See the syslog
+# documentation (i.e. "man syslog") for more information.
+#
+SYSLOG_FACILITY=LOG_DAEMON
+
+
+#
+# SENDMAIL_PATH defines where sendmail (or equivalent) is
+# located on your system. QuickPage uses sendmail to send
+# status messages about failed and/or high-priority pages.
+# Whatever you specify here will be invoked with exactly
+# three arguments:
+#
+# arg1: "-f"
+# arg2: "<>"
+# arg3: user@host
+#
+# The first two arguments tell sendmail to use a null return
+# path (see RFC1123 section 5.2.9) so that bogus e-mail
+# addresses will not annoy the postmaster.
+#
+# If you leave this variable commented out, "configure" will
+# attempt to locate the correct path for your system automatically.
+#
+#SENDMAIL_PATH=/usr/lib/sendmail
diff --git a/testing/qpage/qpage.initd b/testing/qpage/qpage.initd
new file mode 100644
index 000000000..6d5528766
--- /dev/null
+++ b/testing/qpage/qpage.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+#
+# Startup for QuickPage
+#
+
+OPTS_ARGS="q10"
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+start() {
+ ebegin "Starting QuickPage daemon"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec qpage -- ${OPTS_ARGS} >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping QuickPage daemon"
+
+ pid=`ps -e | grep qpage | awk '{print $1}'`
+ if [ ! -z "$pid" ]; then
+ kill $pid > /dev/null 2>&1
+ fi
+ eend $?
+}
+exit 0
diff --git a/testing/qpage/qpage.patch b/testing/qpage/qpage.patch
new file mode 100644
index 000000000..d998942d5
--- /dev/null
+++ b/testing/qpage/qpage.patch
@@ -0,0 +1,231 @@
+diff -crB a/CHANGES b/CHANGES
+*** a/CHANGES 1999-01-02 16:15:03.000000000 +1300
+--- b/CHANGES 2011-01-27 09:56:40.202300708 +1300
+***************
+*** 1,4 ****
+--- 1,15 ----
++ Changes to QuickPage from v3.3 to v3.3.1-unleash
++ ------------------------------------------------
++ Patch by Michael Fincham <michael@unleash.co.nz>
+
++ - The new "-b" option has been added to specify a bind address
++ for the qpage daemon.
++
++ - The default user the daemon runs as is now "qpage" instead
++ of "nobody".
++
++ - To be honest, the "-b" option doesn't sanitise input very well
++ so don't setuid root the qpage binary or anything dumb like that.
+
+ Changes to QuickPage from v3.2 to v3.3
+ ---------------------------------------
+diff -crB a/qpage.c b/qpage.c
+*** a/qpage.c 1999-05-09 09:47:23.000000000 +1200
+--- b/qpage.c 2011-01-21 14:50:55.995162759 +1300
+***************
+*** 17,22 ****
+--- 17,23 ----
+ static char sccsid[] = "@(#)qpage.c 3.36 07/26/98 tomiii@qpage.org";
+ #endif
+ char *ConfigFile = NULL;
++ char *BindAddress = NULL;
+ int Debug = 0;
+ int Interactive = FALSE;
+ int Silent = FALSE;
+***************
+*** 29,35 ****
+ do_version(void)
+ {
+ printf("\n");
+! printf("QuickPage v%s, Copyright 1995-98 by Thomas Dwyer III\n",
+ VERSION);
+ printf("\n");
+ }
+--- 30,36 ----
+ do_version(void)
+ {
+ printf("\n");
+! printf("QuickPage v%s, Copyright 1995-98 by Thomas Dwyer III. Modified for Unleash by Michael Fincham <michael@unleash.co.nz>.\n",
+ VERSION);
+ printf("\n");
+ }
+***************
+*** 46,51 ****
+--- 47,55 ----
+ printf("\n");
+ printf("Options:\n");
+ printf(" -a [+]hhmm send the page at the specified time\n");
++ #ifndef CLIENT_ONLY
++ printf(" -b address bind only to this address (default: 0.0.0.0)\n");
++ #endif
+ printf(" -c coverage coverage area (service name) for pager\n");
+ printf(" -C config use an alternate configuration file\n");
+ printf(" -d debug mode\n");
+***************
+*** 339,345 ****
+
+ (void)memset((char *)&p, 0, sizeof(p));
+
+! while ((c = getopt(argc, argv, "a:c:C:df:hil:mp:P:q:Qs:t:v")) != -1) {
+ switch (c) {
+ case 'a':
+ case 't':
+--- 343,349 ----
+
+ (void)memset((char *)&p, 0, sizeof(p));
+
+! while ((c = getopt(argc, argv, "a:b:c:C:df:hil:mp:P:q:Qs:t:v")) != -1) {
+ switch (c) {
+ case 'a':
+ case 't':
+***************
+*** 353,358 ****
+--- 357,367 ----
+ needpager = TRUE;
+ break;
+
++ #ifndef CLIENT_ONLY
++ case 'b':
++ BindAddress = strdup(optarg);
++ break;
++ #endif
+ case 'c':
+ my_free(coverage);
+ coverage = strdup(optarg);
+***************
+*** 503,509 ****
+ if (optind < argc)
+ port = atoi(argv[optind]);
+
+! (void)become_daemon(sleeptime, port);
+
+ /* NOT REACHED */
+ return(-1);
+--- 512,518 ----
+ if (optind < argc)
+ port = atoi(argv[optind]);
+
+! (void)become_daemon(sleeptime, port, BindAddress);
+
+ /* NOT REACHED */
+ return(-1);
+diff -crB a/qpage.h b/qpage.h
+*** a/qpage.h 1998-10-26 08:55:02.000000000 +1300
+--- b/qpage.h 2011-01-21 14:51:22.682302352 +1300
+***************
+*** 26,32 ****
+ #define fprintf (void)fprintf
+ #endif
+
+! #define VERSION "3.3"
+ #define COMMENTS_ANYWHERE
+
+ #ifndef QPAGE_CONFIG
+--- 26,32 ----
+ #define fprintf (void)fprintf
+ #endif
+
+! #define VERSION "3.3.1-unleash"
+ #define COMMENTS_ANYWHERE
+
+ #ifndef QPAGE_CONFIG
+***************
+*** 51,57 ****
+ #endif
+
+ #ifndef DAEMON_USER
+! #define DAEMON_USER "nobody"
+ #endif
+
+ #define SNPP_SVC_NAME "snpp"
+--- 51,57 ----
+ #endif
+
+ #ifndef DAEMON_USER
+! #define DAEMON_USER "qpage"
+ #endif
+
+ #define SNPP_SVC_NAME "snpp"
+***************
+*** 278,284 ****
+ extern void qpage_log(int pri, char *fmt, ...);
+ extern time_t snpptime(char *arg);
+ extern time_t parse_time(char *str);
+! extern int become_daemon(int sleeptime, short port);
+ extern int submit_page(PAGE *p, char *server);
+ extern int lock_file(int fd, int mode, int block);
+ extern int lock_queue(void);
+--- 278,284 ----
+ extern void qpage_log(int pri, char *fmt, ...);
+ extern time_t snpptime(char *arg);
+ extern time_t parse_time(char *str);
+! extern int become_daemon(int sleeptime, short port, char *BindAddress);
+ extern int submit_page(PAGE *p, char *server);
+ extern int lock_file(int fd, int mode, int block);
+ extern int lock_queue(void);
+diff -crB a/qpage.man b/qpage.man
+*** a/qpage.man 1999-05-09 10:07:31.000000000 +1200
+--- b/qpage.man 2011-01-27 09:51:44.894302942 +1300
+***************
+*** 34,39 ****
+--- 34,42 ----
+ ] [
+ .BI \-C " config
+ ]
++ ] [
++ .BI \-b " address
++ ]
+ .BI \-q " interval
+ .SH DESCRIPTION
+ .B QuickPage
+***************
+*** 91,96 ****
+--- 94,104 ----
+ century. Otherwise assume the specified time is in the current
+ century.
+ .TP
++ .BI \-b
++ Specify an address for the qpage daemon to bind to. The default is
++ to bind to INETADDR_ANY and listen on all interfaces (the old
++ behaviour)
++ .TP
+ .BI \-c
+ Use a different coverage area or paging service. This option is
+ only useful if the recipient has more than one pager and/or more
+diff -crB a/srvrsnpp.c b/srvrsnpp.c
+*** a/srvrsnpp.c 1998-10-26 08:55:05.000000000 +1300
+--- b/srvrsnpp.c 2011-01-21 14:49:17.647300794 +1300
+***************
+*** 1156,1162 ****
+ ** -1 on error, otherwise never
+ */
+ int
+! become_daemon(int sleeptime, short port)
+ {
+ struct sockaddr_in addr;
+ struct servent *svc;
+--- 1156,1162 ----
+ ** -1 on error, otherwise never
+ */
+ int
+! become_daemon(int sleeptime, short port, char *BindAddress)
+ {
+ struct sockaddr_in addr;
+ struct servent *svc;
+***************
+*** 1221,1227 ****
+ len = sizeof(on);
+ (void)setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, len);
+
+! addr.sin_addr.s_addr = INADDR_ANY;
+ addr.sin_family = AF_INET;
+ addr.sin_port = port;
+
+--- 1221,1227 ----
+ len = sizeof(on);
+ (void)setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, len);
+
+! addr.sin_addr.s_addr = BindAddress != NULL ? inet_addr(BindAddress) : INADDR_ANY;
+ addr.sin_family = AF_INET;
+ addr.sin_port = port;
+
diff --git a/testing/qpage/qpage.post-install b/testing/qpage/qpage.post-install
new file mode 100644
index 000000000..53de3edbf
--- /dev/null
+++ b/testing/qpage/qpage.post-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+mkdir -p /var/spool/qpage 2>/dev/null
+chown -R qpage:qpage /var/spool/qpage 2>/dev/null
+exit 0
+
diff --git a/testing/qpage/qpage.pre-install b/testing/qpage/qpage.pre-install
new file mode 100644
index 000000000..c463899a1
--- /dev/null
+++ b/testing/qpage/qpage.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+adduser -h /var/lib/qpage -s /bin/false -G qpage -D qpage 2>/dev/null || true
diff --git a/testing/quvi/APKBUILD b/testing/quvi/APKBUILD
new file mode 100644
index 000000000..6898a5aba
--- /dev/null
+++ b/testing/quvi/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=quvi
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="Command line tool for parsing video download links"
+url="http://quvi.sourceforge.net/"
+arch="all"
+license="LGPLv2+"
+depends=
+depends_dev="libquvi-dev zlib-dev openssl-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/quvi/${pkgver%.*}/quvi/quvi-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/quvi-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="3d59361a98b794392655a36d4424ebcc quvi-0.4.0.tar.bz2"
diff --git a/testing/radvd/APKBUILD b/testing/radvd/APKBUILD
new file mode 100644
index 000000000..93195bd10
--- /dev/null
+++ b/testing/radvd/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=radvd
+pkgver=1.8
+pkgrel=0
+pkgdesc="A Router Advertisement daemon"
+url="http://www.litech.org/radvd/"
+arch="all"
+license="BSD with advertising"
+depends=""
+depends_dev=""
+makedepends="flex bison"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.litech.org/radvd/dist/radvd-$pkgver.tar.gz
+ radvd-1.1-gnu-source.patch
+ radvd.initd
+ radvd.confd
+ "
+
+_builddir="$srcdir"/radvd-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/ \
+ --with-pidfile=/var/run/radvd/radvd.pid \
+ || return 1
+ # work around parallel build issue
+ make gram.h && make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ mkdir -p "$pkgdir"/var/run/radvd
+
+ install -Dm755 "$srcdir"/radvd.initd "$pkgdir"/etc/init.d/radvd \
+ || return 1
+ install -Dm644 "$srcdir"/radvd.confd "$pkgdir"/etc/conf.d/radvd \
+ || return 1
+}
+
+md5sums="50b4cfbdfa04d629d80437fd1d9e2aef radvd-1.8.tar.gz
+c0297515f242d8e8e890d4cdc38bc5b4 radvd-1.1-gnu-source.patch
+6af530b901277953d662dfaf2f5d42e6 radvd.initd
+7593b61c3198d961cc86dd5b85b9f44a radvd.confd"
diff --git a/testing/radvd/radvd-1.1-gnu-source.patch b/testing/radvd/radvd-1.1-gnu-source.patch
new file mode 100644
index 000000000..fc0d88355
--- /dev/null
+++ b/testing/radvd/radvd-1.1-gnu-source.patch
@@ -0,0 +1,11 @@
+--- radvd-1.1.orig/includes.h 2007-10-25 21:29:40.000000000 +0200
++++ radvd-1.1/includes.h 2008-06-14 12:30:25.000000000 +0200
+@@ -18,6 +18,8 @@
+
+ #include <config.h>
+
++#define _GNU_SOURCE /* needed for struct in6_pktinfo */
++
+ #include <string.h>
+ #include <stdio.h>
+ #include <stdarg.h>
diff --git a/testing/radvd/radvd.confd b/testing/radvd/radvd.confd
new file mode 100644
index 000000000..e025c6862
--- /dev/null
+++ b/testing/radvd/radvd.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.conf,v 1.1 2006/07/19 13:02:36 uberlord Exp $
+
+# Extra options to pass to radvd
+OPTIONS=""
+
+# Set this to "no" to tell the init script NOT to set up IPv6 forwarding
+# using /proc/sys/net/ipv6/conf/all/forwarding
+# Only change this if you know what you're doing!
+FORWARD="yes"
diff --git a/testing/radvd/radvd.initd b/testing/radvd/radvd.initd
new file mode 100644
index 000000000..df6faf7a9
--- /dev/null
+++ b/testing/radvd/radvd.initd
@@ -0,0 +1,67 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.init,v 1.4 2011/03/05 10:43:29 vapier Exp $
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/var/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+opts="reload"
+
+depend() {
+ need net
+ after firewall
+}
+
+checkconfig() {
+ if [ ! -f "${CONFIGFILE}" ]; then
+ eerror "Configuration file ${CONFIGFILE} not found"
+ return 1
+ fi
+
+ checkpath -d -o radvd:radvd ${PIDFILE%/*}
+}
+
+start() {
+ checkconfig || return 1
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ ebegin "Starting IPv6 Router Advertisement Daemon"
+ start-stop-daemon --start --exec /usr/sbin/radvd \
+ --pidfile "${PIDFILE}" \
+ -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping IPv6 Router Advertisement Daemon"
+ start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Disabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+ eend $?
+ fi
+}
+
+reload() {
+ checkconfig || return 1
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ ebegin "Reloading IPv6 Router Advertisement Daemon"
+ start-stop-daemon --stop --signal HUP --oknodo \
+ --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/testing/raptor/APKBUILD b/testing/raptor/APKBUILD
new file mode 100644
index 000000000..4f2451c67
--- /dev/null
+++ b/testing/raptor/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=raptor
+pkgver=1.4.21
+pkgrel=1
+pkgdesc="RDF parsing/storage backend"
+url="http://www.librdf.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="curl-dev libxml2-dev libxslt-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.librdf.org/source/raptor-$pkgver.tar.gz
+ raptor-curl.patch"
+
+_builddir="$srcdir"/raptor-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="992061488af7a9e2d933df6b694bb876 raptor-1.4.21.tar.gz
+ab48372dcd90a599fb0da73a10830d79 raptor-curl.patch"
diff --git a/testing/raptor/raptor-curl.patch b/testing/raptor/raptor-curl.patch
new file mode 100644
index 000000000..e47a496c4
--- /dev/null
+++ b/testing/raptor/raptor-curl.patch
@@ -0,0 +1,12 @@
+diff --git a/src/raptor_internal.h b/src/raptor_internal.h
+index f7944db..d9c2068 100644
+--- a/src/raptor_internal.h
++++ b/src/raptor_internal.h
+@@ -852,7 +852,6 @@ int raptor_utf8_is_nfc(const unsigned char *input, size_t length);
+
+ #ifdef RAPTOR_WWW_LIBCURL
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ #endif
+
diff --git a/testing/rasqal/APKBUILD b/testing/rasqal/APKBUILD
new file mode 100644
index 000000000..8b2869598
--- /dev/null
+++ b/testing/rasqal/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=rasqal
+pkgver=0.9.21
+pkgrel=0
+pkgdesc="RDF query library"
+url="http://www.librdf.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="raptor-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.librdf.org/source/rasqal-$pkgver.tar.gz"
+
+_builddir="$srcdir"/rasqal-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="55b67ec92a059ef8979d46486b00a032 rasqal-0.9.21.tar.gz"
diff --git a/testing/rats/APKBUILD b/testing/rats/APKBUILD
new file mode 100644
index 000000000..ff43ff250
--- /dev/null
+++ b/testing/rats/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=rats
+pkgver=2.3
+pkgrel=0
+pkgdesc="A tool to find security related programming errors"
+url="https://www.fortify.com/ssa-elements/threat-intelligence/rats.html"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends="expat-dev wget flex"
+install=""
+subpackages="$pkgname-doc"
+source="https://www.fortify.com/downloads2/public/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/ \
+ --mandir=/usr/share/man
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ ##make DESTDIR="$pkgdir" install || return 1
+ install -Dpm 0755 "$pkgname" "$pkgdir"/usr/bin/$pkgname || return 1
+ mkdir -p "$pkgdir"/usr/share/$pkgname || return 1
+ install -Dm 0644 *.xml "$pkgdir"/usr/share/$pkgname/ || return 1
+}
+
+doc() {
+ # The man page is not picked-up automatically
+ mkdir -p "$subpkgdir"/usr/share/man/man1 || return 1
+ mv "$_builddir"/*.1 "$subpkgdir"/usr/share/man/man1/ || return 1
+}
+
+md5sums="339ebe60fc61789808a457f6f967d226 rats-2.3.tar.gz"
diff --git a/testing/redland/APKBUILD b/testing/redland/APKBUILD
new file mode 100644
index 000000000..616a742bd
--- /dev/null
+++ b/testing/redland/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=redland
+pkgver=1.0.10
+pkgrel=2
+pkgdesc="high-level RDF library"
+url="http://www.librdf.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="raptor-dev rasqal-dev sqlite-dev"
+makedepends="$depends_dev perl"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.librdf.org/source/redland-$pkgver.tar.gz"
+
+_builddir="$srcdir"/redland-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ LIBS="-lm" ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="bdbb9b8dc614fc09a14cd646079619e1 redland-1.0.10.tar.gz"
diff --git a/testing/regina-rexx/APKBUILD b/testing/regina-rexx/APKBUILD
new file mode 100644
index 000000000..e5b14331c
--- /dev/null
+++ b/testing/regina-rexx/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor:
+# Maintainer:
+pkgname=regina-rexx
+_pkgname=Regina-REXX
+pkgver=3.5
+pkgrel=1
+pkgdesc="Regina is an implementation of a Rexx interpreter."
+url="http://regina-rexx.sourceforge.net/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev=
+makedepends=""
+install=""
+subpackages="$pkgname-doc"
+source="regina-rexx.initd
+ http://downloads.sourceforge.net/regina-rexx/$_pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --libdir=/usr/lib
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm -rf "$pkgdir"/usr/etc
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+}
+
+md5sums="d798859c38eb61088f1ca20b16e78639 regina-rexx.initd
+914e223d882f0e4a35f4efda0a75920d Regina-REXX-3.5.tar.gz"
diff --git a/testing/regina-rexx/regina-rexx.initd b/testing/regina-rexx/regina-rexx.initd
new file mode 100644
index 000000000..a3e184780
--- /dev/null
+++ b/testing/regina-rexx/regina-rexx.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=rxstack
+daemon=/usr/bin/$name
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${name}.pid \
+ --exec ${daemon} -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/$name.pid \
+ --exec ${daemon}
+ eend $?
+}
+
diff --git a/testing/resource-agents/APKBUILD b/testing/resource-agents/APKBUILD
new file mode 100644
index 000000000..ed75607de
--- /dev/null
+++ b/testing/resource-agents/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=resource-agents
+pkgver=3.9.2
+pkgrel=0
+pkgdesc="Open Source HA Reusable Cluster Resource Scripts"
+url="http://www.linux-ha.org/wiki/Resource_Agents"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev="cluster-glue-dev libxslt-dev libnet-dev"
+makedepends="$depends_dev automake autoconf perl docbook-xsl wget bash"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="saveas-https://github.com/ClusterLabs/resource-agents/tarball/v3.9.2/resouce-agents-3.9.2.tar.gz"
+
+_builddir="$srcdir"/ClusterLabs-resource-agents-b735277
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -i 's/export -n/export/g' configure.ac
+}
+
+build() {
+ cd "$_builddir"
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --enable-fatal-warnings=no \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="3b5790e8041f2a459d8a0ff310682bfe resouce-agents-3.9.2.tar.gz"
diff --git a/testing/rpmlint/APKBUILD b/testing/rpmlint/APKBUILD
new file mode 100644
index 000000000..abb06ad9a
--- /dev/null
+++ b/testing/rpmlint/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=rpmlint
+pkgver=1.3
+pkgrel=0
+pkgdesc="A tool for checking common errors in RPM packages"
+url="http://rpmlint.zarb.org"
+arch="noarch"
+license="GPL2"
+depends="python"
+depends_dev=""
+makedepends="python-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://rpmlint.zarb.org/download/$pkgname-$pkgver.tar.xz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="afe1b906776d1ab8148888c25fd31006 rpmlint-1.3.tar.xz"
diff --git a/testing/rrdbot/APKBUILD b/testing/rrdbot/APKBUILD
new file mode 100644
index 000000000..3acfd2ae5
--- /dev/null
+++ b/testing/rrdbot/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=rrdbot
+pkgver=0.9.6
+pkgrel=2
+pkgdesc="an SNMP polling daemon which writes the polled values to an RRD database"
+url="http://memberwebs.com/stef/software/rrdbot/"
+arch="all"
+license="BSD"
+depends=
+makedepends=rrdtool-dev
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://memberwebs.com/stef/software/rrdbot/rrdbot-$pkgver.tar.gz
+ rrdbotd.initd
+ rrdbotd.confd
+ "
+
+# append extra dependencies to -dev subpackage
+# remove if not used.
+# depends_dev="somepackage-dev"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/rrdbotd.initd "$pkgdir"/etc/init.d/rrdbotd
+ install -m644 -D "$srcdir"/rrdbotd.confd "$pkgdir"/etc/conf.d/rrdbotd
+}
+
+md5sums="8329c8f58136158b25c3179e825c66e6 rrdbot-0.9.6.tar.gz
+68d118f9a86c6cf8e718d0f2be210306 rrdbotd.initd
+cbcac88f5b728b1441891947a4babbcb rrdbotd.confd"
diff --git a/testing/rrdbot/rrdbot.post-install b/testing/rrdbot/rrdbot.post-install
new file mode 100644
index 000000000..0586fcd5c
--- /dev/null
+++ b/testing/rrdbot/rrdbot.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# add something which happends after install
+
diff --git a/testing/rrdbot/rrdbot.pre-install b/testing/rrdbot/rrdbot.pre-install
new file mode 100644
index 000000000..2c35d02d1
--- /dev/null
+++ b/testing/rrdbot/rrdbot.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# this user should be included in alpine-baselayout-1.2.
+# included here for backward compability.
+adduser -H -s /bin/false -D rrdbotd 2>/dev/null
+
+exit 0
diff --git a/testing/rrdbot/rrdbotd.confd b/testing/rrdbot/rrdbotd.confd
new file mode 100644
index 000000000..486252b03
--- /dev/null
+++ b/testing/rrdbot/rrdbotd.confd
@@ -0,0 +1,7 @@
+# Sample conf.d file for alpine linux
+
+#
+# Specify daemon options here.
+#
+
+sample_opts=""
diff --git a/testing/rrdbot/rrdbotd.initd b/testing/rrdbot/rrdbotd.initd
new file mode 100644
index 000000000..5fae6e8dd
--- /dev/null
+++ b/testing/rrdbot/rrdbotd.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+
+name=rrdbotd
+daemon=/usr/sbin/$name
+pidfile=${rrdbotd_pidfile:-/var/run/rrdbotd/rrdbotd.pid}
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --pidfile "$pidfile" \
+ --user ${rrdbotd_user:-rrdbotd}:${rrdbotd_group:-rrdbotd} \
+ --exec ${daemon} -- ${rrdbotd_opts} -p "$pidfile"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile "$pidfile" \
+ --exec ${daemon}
+ eend $?
+}
+
diff --git a/testing/rrdcollect/APKBUILD b/testing/rrdcollect/APKBUILD
new file mode 100644
index 000000000..36e55972b
--- /dev/null
+++ b/testing/rrdcollect/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=rrdcollect
+pkgver=0.2.4
+pkgrel=1
+pkgdesc="Read system statistical data and feed it to RRDtool"
+url="http://rrdcollect.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="rrdtool"
+makedepends="libpcap-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+}
+
+md5sums="fd7ac95195e3e5cbab0677629505d9be rrdcollect-0.2.4.tar.gz"
diff --git a/testing/rsyslog/APKBUILD b/testing/rsyslog/APKBUILD
new file mode 100644
index 000000000..c0335e9fd
--- /dev/null
+++ b/testing/rsyslog/APKBUILD
@@ -0,0 +1,86 @@
+# Contributor: cbanta@gmail.com
+# Maintainer: cbanta@gmail.com
+pkgname=rsyslog
+pkgver=5.8.5
+pkgrel=0
+pkgdesc="Enhanced multi-threaded syslogd with database support and more."
+url="http://www.rsyslog.com/"
+arch="all"
+license="GPLv3 LGPL-3"
+makedepends="zlib-dev gnutls-dev mysql-dev postgresql-dev net-snmp-dev libnet-dev"
+subpackages="$pkgname-doc $pkgname-mysql $pkgname-pgsql $pkgname-tls $pkgname-snmp"
+source="http://www.rsyslog.com/files/download/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ $pkgname.logrotate
+ $pkgname.conf"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --disable-gui \
+ --disable-rfc3195 \
+ --enable-largefile \
+ --enable-imdiag \
+ --enable-imfile \
+ --enable-imtemplate \
+ --enable-mail \
+ --enable-omprog \
+ --enable-omstdout \
+ --enable-omtemplate \
+ --enable-omudpspoof \
+ --enable-zlib \
+ --enable-mysql \
+ --enable-pgsql \
+ --enable-gnutls \
+ --enable-snmp \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ rm -f "$pkgdir"/usr/lib/rsyslog/*.la || return 1
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
+}
+
+mysql() {
+ pkgdesc="rsyslog mysql support"
+ mkdir -p "$subpkgdir"/usr/lib/rsyslog/
+ mv "$pkgdir"/usr/lib/rsyslog/ommysql.so "$subpkgdir"/usr/lib/rsyslog/
+}
+
+pgsql() {
+ pkgdesc="rsyslog pgsql support"
+ mkdir -p "$subpkgdir"/usr/lib/rsyslog/
+ mv "$pkgdir"/usr/lib/rsyslog/ompgsql.so "$subpkgdir"/usr/lib/rsyslog/
+}
+
+tls() {
+ pkgdesc="rsyslog tls support"
+ mkdir -p "$subpkgdir"/usr/lib/rsyslog/
+ mv "$pkgdir"/usr/lib/rsyslog/lmnsd_gtls.so "$subpkgdir"/usr/lib/rsyslog/
+}
+
+snmp() {
+ pkgdesc="rsyslog snmp support"
+ mkdir -p "$subpkgdir"/usr/lib/rsyslog/
+ mv "$pkgdir"/usr/lib/rsyslog/omsnmp.so "$subpkgdir"/usr/lib/rsyslog/
+}
+
+md5sums="a73cb577cb4bc5b9c8f0d217eb054ad2 rsyslog-5.8.5.tar.gz
+06f6e1ef8a05d3b6b49c06b0b99d3064 rsyslog.initd
+0a0aef98f677364e6178c34274df7723 rsyslog.confd
+bc43debc9ffdf66bc1409025fd3d1176 rsyslog.logrotate
+65fbf5a7a81a53a70974e3085e96cb41 rsyslog.conf"
diff --git a/testing/rsyslog/rsyslog.conf b/testing/rsyslog/rsyslog.conf
new file mode 100644
index 000000000..19187467b
--- /dev/null
+++ b/testing/rsyslog/rsyslog.conf
@@ -0,0 +1,87 @@
+# rsyslog v5: load input modules
+# If you do not load inputs, nothing happens!
+# You may need to set the module load path if modules are not found.
+
+$ModLoad immark.so # provides --MARK-- message capability
+$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
+$ModLoad imklog.so # kernel logging (formerly provided by rklogd)
+
+# Include configuration files from directory
+$IncludeConfig /etc/rsyslog.d/*
+
+# Check config syntax on startup and abort if unclean (default off)
+#$AbortOnUncleanConfig on
+
+# Reduce repeating messages (default off)
+#$RepeatedMsgReduction on
+
+# Log all kernel messages to the console.
+# Logging much else clutters up the screen.
+#kern.* /dev/console
+
+# Log anything (except mail) of level info or higher.
+# Don't log private authentication messages!
+*.info;mail.none;authpriv.none;cron.none -/var/log/messages
+
+# The authpriv file has restricted access.
+authpriv.* /var/log/secure
+
+# Log all the mail messages in one place.
+mail.* -/var/log/maillog
+
+# Log cron stuff
+cron.* -/var/log/cron
+
+# Everybody gets emergency messages
+*.emerg *
+
+# Save news errors of level crit and higher in a special file.
+uucp,news.crit -/var/log/spooler
+
+# Save boot messages also to boot.log
+local7.* /var/log/boot.log
+
+# More configuration examples:
+#
+# Remote Logging (we use TCP for reliable delivery)
+# An on-disk queue is created for this action. If the remote host is
+# down, messages are spooled to disk and sent when it is up again.
+#$WorkDirectory /var/spool/rsyslog # where to place spool files
+#$ActionQueueFileName uniqName # unique name prefix for spool files
+#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
+#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
+#$ActionQueueType LinkedList # run asynchronously
+#$ActionResumeRetryCount -1 # infinety retries if host is down
+#$ActionResumeInterval 30 # retry interval
+# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
+#*.* @@remote-host
+
+# Remote Logging with TCP + SSL/TLS
+#$DefaultNetstreamDriver gtls
+#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
+#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_CLIENT.cert.pem
+#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_CLIENT.key.pem
+#$ActionSendStreamDriverAuthMode x509/name # enable peer authentication
+#$ActionSendStreamDriverPermittedPeer foo # authorize to send encrypted data to server foo
+#$ActionSendStreamDriverMode 1 # run driver in TLS-only mode
+
+# ######### Receiving Messages from Remote Hosts ##########
+# TCP Syslog Server:
+#$ModLoad imtcp # provides TCP syslog reception
+#$TCPServerRun 10514 # start a TCP syslog server at port 10514
+
+# TCP + SSL/TLS Syslog Server:
+#$ModLoad imtcp # provides TCP syslog reception
+#$DefaultNetstreamDriver gtls # use gnuTLS for data encryption
+#$DefaultNetstreamDriverCAFile /etc/ssl/rsyslog/rsyslog_ca.cert.pem
+#$DefaultNetstreamDriverCertFile /etc/ssl/rsyslog/rsyslog_SERVER.cert.pem
+#$DefaultNetstreamDriverKeyFile /etc/ssl/rsyslog/rsyslog_SERVER.key.pem
+#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
+#$InputTCPServerStreamDriverAuthMode x509/name # enable peer authentication
+#$InputTCPServerStreamDriverPermittedPeer bar # authorize client named bar (one line per client)
+#$TCPServerRun 10514 # start a TCP syslog server at port 10514
+
+# UDP Syslog Server:
+#$ModLoad imudp.so # provides UDP syslog reception
+#$UDPServerRun 514 # start a UDP syslog server at standard port 514
+
diff --git a/testing/rsyslog/rsyslog.confd b/testing/rsyslog/rsyslog.confd
new file mode 100644
index 000000000..85e90edc0
--- /dev/null
+++ b/testing/rsyslog/rsyslog.confd
@@ -0,0 +1,17 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.confd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
+
+# Configuration file
+CONFIGFILE="/etc/rsyslog.conf"
+
+# PID file
+PIDFILE="/var/run/rsyslogd.pid"
+
+# Options to rsyslogd
+# See rsyslogd(8) for more details
+# Notes:
+# * Do not specify another PIDFILE but use the variable above to change the location
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+# * "-c5" tells rsyslog to _not_ run in sysklogd compatibility mode
+RSYSLOG_OPTS="-c5"
diff --git a/testing/rsyslog/rsyslog.initd b/testing/rsyslog/rsyslog.initd
new file mode 100644
index 000000000..68ff86c06
--- /dev/null
+++ b/testing/rsyslog/rsyslog.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.initd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
+
+opts="reload"
+
+depend() {
+ provide logger
+}
+
+start() {
+ ebegin "Starting rsyslogd"
+ start-stop-daemon \
+ --start --quiet --exec /usr/sbin/rsyslogd \
+ -- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rsyslogd"
+ start-stop-daemon \
+ --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
+
+reload() {
+ if [ ! -f "${PIDFILE}" ]; then
+ eerror "rsyslogd not running"
+ return 1
+ fi
+
+ ebegin "Re-opening rsyslogd log files"
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/testing/rsyslog/rsyslog.logrotate b/testing/rsyslog/rsyslog.logrotate
new file mode 100644
index 000000000..86095def1
--- /dev/null
+++ b/testing/rsyslog/rsyslog.logrotate
@@ -0,0 +1,9 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.logrotate,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
+/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log {
+ sharedscripts
+ postrotate
+ /etc/init.d/rsyslog reload &>/dev/null || true
+ endscript
+}
diff --git a/testing/rtapd/APKBUILD b/testing/rtapd/APKBUILD
new file mode 100644
index 000000000..e19afbe64
--- /dev/null
+++ b/testing/rtapd/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=rtapd
+_altpkgname="rtnppd"
+_builddir="$pkgname"
+pkgver=1.7
+pkgrel=1
+pkgdesc="daemon for routing packets to rtnppd"
+url="http://sourceforge.net/projects/rtnppd/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="postgresql-dev"
+install=
+subpackages=""
+source="http://downloads.sourceforge.net/$_altpkgname/$pkgname-$pkgver.tar.gz
+ Makefile.patch
+ $pkgname.initd
+ $pkgname.confd"
+
+build() {
+ cd "$srcdir"/"$_builddir"
+ echo "Applying Patch"
+ patch -p1 < ../Makefile.patch || return 1
+ make || return 1
+}
+package() {
+ cd "$srcdir"/"$_builddir"
+ #make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m755 -D ./rtapd "$pkgdir"/usr/sbin/rtapd
+ install -m755 -D ./vsnppd "$pkgdir"/usr/sbin/vsnppd
+ install -m644 -D ./rtapd.conf "$pkgdir"/etc/rtnppd/rtapd.conf
+ install -m644 -D ./tap_dev.conf "$pkgdir"/etc/rtnppd/tap_dev.conf
+ install -m644 -D ./tap_route.conf "$pkgdir"/etc/rtnppd/tag_route.conf
+}
+
+md5sums="f3354efde507d29813754c8f4af7fa02 rtapd-1.7.tar.gz
+7ea62a8bb13e2069164d8639b8c02aad Makefile.patch
+bd5aa6b7477064be5966962b90be55b5 rtapd.initd
+4378fc49b27dcc6ab7f2316ea2453338 rtapd.confd"
diff --git a/testing/rtapd/Makefile.patch b/testing/rtapd/Makefile.patch
new file mode 100644
index 000000000..197cce501
--- /dev/null
+++ b/testing/rtapd/Makefile.patch
@@ -0,0 +1,13 @@
+--- rtapd.orig/Makefile Tue Mar 30 15:10:02 2010
++++ rtapd/Makefile Tue Mar 30 15:10:11 2010
+@@ -23,8 +23,8 @@
+
+ # Use PostgreSQL-server (with includes in /usr/include/pgsql
+ # and libs in /usr/lib
+-#CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
+-#LIBS = -lpq
++CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
++LIBS = -lpq
+
+ PREFIX = /usr/local
+ INCLUDES = -I./
diff --git a/testing/rtapd/rtapd.confd b/testing/rtapd/rtapd.confd
new file mode 100644
index 000000000..4c0047b10
--- /dev/null
+++ b/testing/rtapd/rtapd.confd
@@ -0,0 +1 @@
+#RTAPD_OPTS=""
diff --git a/testing/rtapd/rtapd.initd b/testing/rtapd/rtapd.initd
new file mode 100644
index 000000000..01fce242a
--- /dev/null
+++ b/testing/rtapd/rtapd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DAEMON=/usr/sbin/rtapd
+USER=rtnppd
+
+start() {
+ ebegin "Starting $(basename $DAEMON)"
+ start-stop-daemon --start --user ${USER} --exec ${DAEMON} \
+ -- -C /etc/rtnppd/rtapd.conf ${RTAPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $(basename $DAEMON)"
+ start-stop-daemon --stop --exec ${DAEMON}
+ eend $?
+}
diff --git a/testing/rtnppd/APKBUILD b/testing/rtnppd/APKBUILD
new file mode 100644
index 000000000..bd0f9cb1e
--- /dev/null
+++ b/testing/rtnppd/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Michael Mason <ms13sp@gmail.com>
+pkgname=rtnppd
+_builddir="$pkgname"
+pkgver=1.7b
+pkgrel=1
+pkgdesc="A program route TNPP 3.8 (Telocator Network Paging Protocol) packets between serial and other links"
+url="http://sourceforge.net/projects/rtnppd/"
+arch="all"
+license="GPL"
+depends=""
+makedepends="postgresql-dev"
+install=
+subpackages=""
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ Makefile.patch
+ $pkgname.initd
+ $pkgname.confd"
+
+build() {
+ cd "$srcdir"/"$_builddir"
+ patch -p1 < ../Makefile.patch || return 1
+ make || return 1
+}
+package() {
+ cd "$srcdir"/"$_builddir"
+ #make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m755 -D ./rtnppd "$pkgdir"/usr/sbin/rtnppd
+ install -m755 -D ./tnpppage "$pkgdir"/usr/sbin/tnpppage
+ install -m755 -D ./testq "$pkgdir"/usr/sbin/testq
+ install -m644 -D ./rtnppd.conf "$pkgdir"/etc/rtnppd/rtnppd.conf
+ install -m644 -D ./tnpp_dev.conf "$pkgdir"/etc/rtnppd/tnpp_dev.conf
+ install -m644 -D ./tnpp_trans.conf "$pkgdir"/etc/rtnppd/tnpp_trans.conf
+}
+
+md5sums="3f484a7307b1c237652135fcc26ee798 rtnppd-1.7b.tar.gz
+17ec69098e967021face024251da20fc Makefile.patch
+9bb8ca4d1f073d0b3663d368ff322ecf rtnppd.initd
+58b8113f483bd824e9ef82fbfdf743d8 rtnppd.confd"
diff --git a/testing/rtnppd/Makefile.patch b/testing/rtnppd/Makefile.patch
new file mode 100644
index 000000000..1d7e25724
--- /dev/null
+++ b/testing/rtnppd/Makefile.patch
@@ -0,0 +1,13 @@
+--- rtnppd.orig/Makefile Tue Mar 30 14:46:20 2010
++++ rtnppd/Makefile Tue Mar 30 14:46:30 2010
+@@ -23,8 +23,8 @@
+
+ # Use PostgreSQL-server (with includes in /usr/include/pgsql
+ # and libs in /usr/lib
+-#CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
+-#LIBS = -lpq
++CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql
++LIBS = -lpq
+
+ PREFIX = /usr/local
+ INCLUDES = -I./
diff --git a/testing/rtnppd/rtnppd.confd b/testing/rtnppd/rtnppd.confd
new file mode 100644
index 000000000..c26222555
--- /dev/null
+++ b/testing/rtnppd/rtnppd.confd
@@ -0,0 +1 @@
+#RTNPPD_OPTS=""
diff --git a/testing/rtnppd/rtnppd.initd b/testing/rtnppd/rtnppd.initd
new file mode 100644
index 000000000..6fcd6c2b4
--- /dev/null
+++ b/testing/rtnppd/rtnppd.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DAEMON=/usr/sbin/rtnppd
+USER=rtnppd
+
+start() {
+ ebegin "Starting $(basename $DAEMON)"
+ start-stop-daemon --start --user ${USER} --exec ${DAEMON} \
+ -- ${RTNPPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $(basename $DAEMON)"
+ start-stop-daemon --stop --exec ${DAEMON}
+ eend $?
+}
+
diff --git a/testing/ruby-daemon-controller/APKBUILD b/testing/ruby-daemon-controller/APKBUILD
new file mode 100644
index 000000000..9b1f8d6b7
--- /dev/null
+++ b/testing/ruby-daemon-controller/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=ruby-daemon-controller
+_realname=daemon_controller
+pkgver=0.2.6
+pkgrel=0
+pkgdesc="A library for robust daemon management."
+url="http://rubygems.org/gems/daemon_controller"
+arch="noarch"
+license="MIT"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev ruby-dev ruby rubygems"
+install=""
+subpackages=""
+source=""
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+ mkdir -p "$_builddir" || return 1
+ local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+ gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
+ --ignore-dependencies || return 1
+ rm -rf "$_builddir"$_gemdir/cache/
+}
+
+package() {
+ mkdir -p "$pkgdir" || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/ || return 1
+}
diff --git a/testing/ruby-fastthread/APKBUILD b/testing/ruby-fastthread/APKBUILD
new file mode 100644
index 000000000..1b1c2caed
--- /dev/null
+++ b/testing/ruby-fastthread/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=ruby-fastthread
+_realname=fastthread
+pkgver=1.0.7
+pkgrel=0
+pkgdesc="Optimized replacement for thread.rb primitives"
+url="http://rubygems.org/gems/fastthread"
+arch="all"
+license="GPL"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev ruby-dev ruby rubygems"
+install=""
+subpackages=""
+source=""
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+ mkdir -p "$_builddir" || return 1
+ local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+ gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
+ --ignore-dependencies || return 1
+ rm -rf "$_builddir"$_gemdir/cache/
+}
+
+package() {
+ mkdir -p "$pkgdir" || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/ || return 1
+}
diff --git a/testing/ruby-file-tail/APKBUILD b/testing/ruby-file-tail/APKBUILD
new file mode 100644
index 000000000..300be8275
--- /dev/null
+++ b/testing/ruby-file-tail/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=ruby-file-tail
+_realname=file-tail
+pkgver=1.0.5
+pkgrel=0
+pkgdesc="Small library that allows Ruby to tail files."
+url="http://flori.github.com/file-tail/"
+arch="noarch"
+license="GPL"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev ruby-dev ruby rubygems"
+install=""
+subpackages=""
+source=""
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+ mkdir -p "$_builddir" || return 1
+ local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+ gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
+ --ignore-dependencies || return 1
+ rm -rf "$_builddir"$_gemdir/cache/
+}
+
+package() {
+ mkdir -p "$pkgdir" || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/ || return 1
+}
diff --git a/testing/ruby-spruz/APKBUILD b/testing/ruby-spruz/APKBUILD
new file mode 100644
index 000000000..4329cb690
--- /dev/null
+++ b/testing/ruby-spruz/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=ruby-spruz
+_realname=spruz
+pkgver=0.2.5
+pkgrel=0
+pkgdesc="All the stuff that isn't good/big enough for a real library."
+url="http://rubygems.org/gems/spruz"
+arch="noarch"
+license="MIT"
+depends="ruby"
+depends_dev=
+makedepends="$depends_dev ruby-dev ruby rubygems"
+install=""
+subpackages=""
+source=""
+
+_builddir="$srcdir"/$_realname-$pkgver
+build() {
+ mkdir -p "$_builddir" || return 1
+ local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+ gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
+ --ignore-dependencies || return 1
+ rm -rf "$_builddir"$_gemdir/cache/
+}
+
+package() {
+ mkdir -p "$pkgdir" || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/ || return 1
+}
diff --git a/testing/rxvt-unicode/APKBUILD b/testing/rxvt-unicode/APKBUILD
new file mode 100644
index 000000000..f4a03602c
--- /dev/null
+++ b/testing/rxvt-unicode/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Moritz Wilhelmy
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=rxvt-unicode
+pkgver=9.11
+pkgrel=0
+pkgdesc='rxvt fork with improved unicode support'
+arch=all
+url='http://software.schmorp.de/pkg/rxvt-unicode.html'
+license='GPL'
+depends=
+makedepends="libx11-dev"
+source="http://dist.schmorp.de/rxvt-unicode/$pkgname-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr \
+ --with-terminfo=/usr/share/terminfo \
+ --enable-256-color \
+ --enable-font-styles \
+ --enable-xim \
+ --enable-keepscrolling \
+ --enable-selectionscrolling \
+ --enable-smart-resize \
+ --enable-pixbuf \
+ --disable-transparency \
+ --disable-utmp \
+ --disable-wtmp \
+ --disable-lastlog \
+ --disable-frills \
+ --disable-perl \
+ || return 1
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ install -d "$pkgdir/usr/share/terminfo"
+ export TERMINFO="$pkgdir/usr/share/terminfo"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="1bed5bfeed026e0bfafa0e9e4f62aa37 rxvt-unicode-9.11.tar.bz2"
diff --git a/testing/sarg/APKBUILD b/testing/sarg/APKBUILD
new file mode 100644
index 000000000..96628569a
--- /dev/null
+++ b/testing/sarg/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=sarg
+pkgver=2.3.1
+pkgrel=0
+pkgdesc="SARG Squid Analysis Report Generator"
+url="http://sarg.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc $pkgname-php"
+source="http://sourceforge.net/projects/sarg/files/sarg/sarg-$pkgver/sarg-$pkgver.tar.gz"
+
+_builddir="$srcdir"/sarg-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/sarg \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+php() {
+ pkgdesc="SARG php interface"
+ depends="php"
+ arch="noarch"
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/share/webapps
+ cp -a sarg-php \
+ "$subpkgdir"/usr/share/webapps
+}
+
+md5sums="bf637b8a820b81e2c55e815934151b4d sarg-2.3.1.tar.gz"
diff --git a/testing/sc101-nbd/APKBUILD b/testing/sc101-nbd/APKBUILD
new file mode 100644
index 000000000..7b9c0c706
--- /dev/null
+++ b/testing/sc101-nbd/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Mika Havela <mika.havela@gmail.com>
+# Maintainer: Mika Havela <mika.havela@gmail.com>
+pkgname=sc101-nbd
+pkgver=0.03
+pkgrel=0
+pkgdesc="Software to access the the Netgear Storage Central 101 (sc101) as a block device, without requiring a new kernel module."
+url="http://code.google.com/p/sc101-nbd/"
+arch="x86"
+license="GNU GPL v2"
+depends=""
+depends_dev="gzip"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sc101-nbd.googlecode.com/files/sc101-nbd_${pkgver}.tar.gz"
+
+_builddir="$srcdir"/"$pkgname"-"$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="92cc1a4f11c971fede8e0a1e69e1ce2d sc101-nbd_0.03.tar.gz"
diff --git a/testing/scanssh/APKBUILD b/testing/scanssh/APKBUILD
new file mode 100644
index 000000000..4b91dfb42
--- /dev/null
+++ b/testing/scanssh/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer:
+pkgname=scanssh
+pkgver=2.1
+pkgrel=0
+pkgdesc="Fast SSH server and open proxy scanner"
+url="http://monkey.org/~provos/scanssh/"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="libpcap-dev libevent-dev libdnet-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://monkey.org/~provos/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="9fab4253b56b2d15367d4872b370cdcb scanssh-2.1.tar.gz"
diff --git a/testing/scons/APKBUILD b/testing/scons/APKBUILD
new file mode 100644
index 000000000..ef188177b
--- /dev/null
+++ b/testing/scons/APKBUILD
@@ -0,0 +1,22 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=scons
+pkgver=2.0.1
+pkgrel=1
+pkgdesc="scons software construction system"
+url="http://www.scons.org/"
+license="MIT"
+depends="python"
+makedepends="python-dev"
+install=
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+arch="noarch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+package() {
+ cd "$_builddir"
+ python setup.py install --root="$pkgdir"
+}
+
+md5sums="beca648b894cdbf85383fffc79516d18 scons-2.0.1.tar.gz"
diff --git a/testing/scrub/APKBUILD b/testing/scrub/APKBUILD
new file mode 100644
index 000000000..9eb9141fc
--- /dev/null
+++ b/testing/scrub/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=scrub
+pkgver=2.4
+pkgrel=0
+pkgdesc="A disk overwrite utility"
+url="http://code.google.com/p/diskscrub/"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends=""
+install=""
+subpackages="$pkgname-doc"
+source="http://diskscrub.googlecode.com/files/$pkgname-$pkgver.tar.bz2"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="653b9698a7e62fd0c22704e1d6a3469c scrub-2.4.tar.bz2"
diff --git a/testing/sdparm/APKBUILD b/testing/sdparm/APKBUILD
new file mode 100644
index 000000000..fba1af504
--- /dev/null
+++ b/testing/sdparm/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=sdparm
+pkgver=1.06
+pkgrel=0
+pkgdesc="SCSI device parameter modification tool"
+url="http://sg.danny.cz/sg/sdparm.html"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://sg.danny.cz/sg/p/sdparm-$pkgver.tgz"
+
+_builddir="$srcdir"/sdparm-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="5e19913658bb4f9849ddd909e0f47cde sdparm-1.06.tgz"
diff --git a/testing/series60-remote/APKBUILD b/testing/series60-remote/APKBUILD
new file mode 100644
index 000000000..1c516befa
--- /dev/null
+++ b/testing/series60-remote/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=series60-remote
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="S60 operating system mobile phone manager"
+url="http://series60-remote.sourceforge.net"
+arch="noarch"
+license="GPL"
+depends="py-qt py-bluez qt-sqlite"
+makedepends=
+install=
+subpackages=
+options="!tracedeps"
+source="http://downloads.sourceforge.net/project/series60-remote/series60-remote/$pkgver/series60-remote-$pkgver.tar.gz"
+
+_builddir="$srcdir"/series60-remote-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="adc345c3998e594da86c4df150f851e0 series60-remote-0.4.0.tar.gz"
diff --git a/testing/setserial/APKBUILD b/testing/setserial/APKBUILD
new file mode 100644
index 000000000..3af101e88
--- /dev/null
+++ b/testing/setserial/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+pkgname=setserial
+pkgver=2.17
+pkgrel=0
+pkgdesc="Serial driver config tool"
+url="http://sourceforge.net/projects/setserial/"
+license="GPL"
+depends=
+makedepends="groff"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ setserial.patch
+ "
+arch="all"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 -i "$srcdir"/setserial.patch
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/share/man/man8
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="c4867d72c41564318e0107745eb7a0f2 setserial-2.17.tar.gz
+99919d3be7c1550721494070a7ace66a setserial.patch"
diff --git a/testing/setserial/setserial.patch b/testing/setserial/setserial.patch
new file mode 100644
index 000000000..3cce1f07d
--- /dev/null
+++ b/testing/setserial/setserial.patch
@@ -0,0 +1,28 @@
+diff -ur setserial-2.17/Makefile.in setserial-2.17-new/Makefile.in
+--- setserial-2.17/Makefile.in 2000-01-27 16:39:07.000000000 +0100
++++ setserial-2.17-new/Makefile.in 2005-03-09 20:53:31.000000000 +0100
+@@ -17,6 +17,11 @@
+ INCS = -I.
+ TAR = tar
+
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++bindir=@bindir@
++mandir=@mandir@
++
+ all: setserial setserial.cat
+
+ setserial: setserial.c
+@@ -26,9 +31,9 @@
+ nroff -man setserial.8 > setserial.cat
+
+ install: setserial setserial.8
+- $(INSTALL_PROGRAM) setserial $(DESTDIR)/bin
+- $(STRIP) $(DESTDIR)/bin/setserial
+- $(INSTALL_DATA) setserial.8 $(DESTDIR)/usr/man/man8
++ $(INSTALL_PROGRAM) setserial $(DESTDIR)$(bindir)
++ $(STRIP) $(DESTDIR)$(bindir)/setserial
++ $(INSTALL_DATA) setserial.8 $(DESTDIR)$(mandir)/man8
+
+ clean:
+ $(RM) setserial setserial.o setserial.cat *~
diff --git a/testing/shadow/APKBUILD b/testing/shadow/APKBUILD
new file mode 100644
index 000000000..624d60702
--- /dev/null
+++ b/testing/shadow/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=shadow
+pkgver=4.1.4.3
+pkgrel=4
+pkgdesc="PAM-using login and passwd utilities"
+url="http://pkg-shadow.alioth.debian.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="linux-pam-dev"
+makedepends="$depends_dev"
+install="$pkgname.post-upgrade $pkgname.post-deinstall"
+subpackages="$pkgname-doc"
+source="http://pkg-shadow.alioth.debian.org/releases/shadow-$pkgver.tar.bz2
+ login.pamd"
+
+_builddir="$srcdir"/shadow-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --without-nscd \
+ --disable-nls \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ # do not install these pam.d files they are broken and outdated
+ rm "$pkgdir"/etc/pam.d/*
+
+ # however, install our own for login
+ cp "$srcdir"/login.pamd "$pkgdir"/etc/pam.d/login
+
+ # /etc/login.defs is not very useful - replace it with a blank file
+ rm "$pkgdir"/etc/login.defs
+ touch "$pkgdir"/etc/login.defs
+}
+
+md5sums="b8608d8294ac88974f27b20f991c0e79 shadow-4.1.4.3.tar.bz2
+72dfc077a61ab7163e312640cc98bba8 login.pamd"
diff --git a/testing/shadow/login.pamd b/testing/shadow/login.pamd
new file mode 100644
index 000000000..ad4555809
--- /dev/null
+++ b/testing/shadow/login.pamd
@@ -0,0 +1,6 @@
+# /bin/login opens an interactive session.
+
+auth include base-auth
+account include base-account
+password include base-password
+session include base-session
diff --git a/testing/shadow/shadow.post-deinstall b/testing/shadow/shadow.post-deinstall
new file mode 100644
index 000000000..dd117e5d8
--- /dev/null
+++ b/testing/shadow/shadow.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+busybox --install -s
+
diff --git a/testing/shadow/shadow.post-upgrade b/testing/shadow/shadow.post-upgrade
new file mode 100644
index 000000000..dd117e5d8
--- /dev/null
+++ b/testing/shadow/shadow.post-upgrade
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+busybox --install -s
+
diff --git a/testing/shared-desktop-ontologies/APKBUILD b/testing/shared-desktop-ontologies/APKBUILD
new file mode 100644
index 000000000..f92bf231d
--- /dev/null
+++ b/testing/shared-desktop-ontologies/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=shared-desktop-ontologies
+pkgver=0.6.0
+pkgrel=0
+pkgdesc="shared desktop ontologies library"
+url="http://oscaf.sourceforge.net/"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev="cmake"
+makedepends="$depends_dev"
+install=""
+subpackages=
+source="http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.6/shared-desktop-ontologies-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/shared-desktop-ontologies-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="2651122ac27de95e91973ed6b88ccf94 shared-desktop-ontologies-0.6.0.tar.bz2"
diff --git a/testing/shed/APKBUILD b/testing/shed/APKBUILD
new file mode 100644
index 000000000..e159abe88
--- /dev/null
+++ b/testing/shed/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=shed
+pkgver=1.15
+pkgrel=0
+pkgdesc="A simple hex editor"
+url="http://shed.sourceforge.net/"
+arch="all"
+license="GPL2+"
+depends=""
+depends_dev=""
+makedepends="ncurses-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/shed/shed-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="c7d7d464d6b4fa28a7980270d03e0906 shed-1.15.tar.gz"
diff --git a/testing/shorewall/APKBUILD b/testing/shorewall/APKBUILD
new file mode 100644
index 000000000..05e05ca91
--- /dev/null
+++ b/testing/shorewall/APKBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=shorewall
+pkgver=4.4.21
+pkgrel=0
+pkgdesc="Shoreline Firewall is an iptables-based firewall for Linux."
+url="http://www.shorewall.net/"
+arch="noarch"
+license="GPL-2"
+depends="iptables iproute2 perl"
+replaces="shorewall-common shorewall-perl"
+subpackages="$pkgname-doc"
+source="http://www1.shorewall.net/pub/shorewall/4.4/shorewall-$pkgver/shorewall-$pkgver.tar.bz2
+ shorewall.initd
+ shorewall-no-install-T.patch
+ "
+
+_builddir="src/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+
+ PREFIX="${pkgdir}" ./install.sh || return 1
+ install -Dm755 "$srcdir"/shorewall.initd "$pkgdir"/etc/init.d/shorewall
+}
+
+doc() {
+ default_doc
+ mkdir -p "$subpkgdir/usr/share/shorewall"
+ mv "$pkgdir/usr/share/shorewall/configfiles" \
+ "$subpkgdir/usr/share/shorewall/"
+}
+
+md5sums="aac1823063489563330bf5dc57a26487 shorewall-4.4.21.tar.bz2
+71fb6da1f50f5c6e9dd35b60b3629531 shorewall.initd
+546ca14bae43f5046f193efc884c768b shorewall-no-install-T.patch"
diff --git a/testing/shorewall/shorewall-no-install-T.patch b/testing/shorewall/shorewall-no-install-T.patch
new file mode 100644
index 000000000..09567a512
--- /dev/null
+++ b/testing/shorewall/shorewall-no-install-T.patch
@@ -0,0 +1,11 @@
+--- a/shorewall-4.4.21/install.sh
++++ b/shorewall-4.4.21/install.sh
+@@ -96,7 +96,7 @@
+ # INIT is the name of the script in the $DEST directory
+ # ARGS is "yes" if we've already parsed an argument
+ #
+-T="-T"
++T=
+
+ if [ -z "$DEST" ] ; then
+ DEST="/etc/init.d"
diff --git a/testing/shorewall/shorewall.initd b/testing/shorewall/shorewall.initd
new file mode 100644
index 000000000..9dda676c5
--- /dev/null
+++ b/testing/shorewall/shorewall.initd
@@ -0,0 +1,80 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/shorewall-common/files/shorewall.initd,v 1.2 2008/05/04 13:16:40 pva Exp $
+
+opts="start stop restart clear reset refresh check"
+
+depend() {
+ need net
+ provide firewall
+ after ulogd
+}
+
+start() {
+ ebegin "Starting firewall"
+ /sbin/shorewall -f start 1>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping firewall"
+ /sbin/shorewall stop 1>/dev/null
+ eend $?
+}
+
+restart() {
+ # shorewall comes with its own control script that includes a
+ # restart function, so refrain from calling svc_stop/svc_start
+ # here. Note that this comment is required to fix bug 55576;
+ # runscript.sh greps this script... (09 Jul 2004 agriffis)
+ ebegin "Restarting firewall"
+ /sbin/shorewall status >/dev/null
+ if [ $? != 0 ] ; then
+ svc_start
+ else
+ if [ -f /var/lib/shorewall/restore ] ; then
+ /sbin/shorewall restore
+ else
+ /sbin/shorewall restart 1>/dev/null
+ fi
+ fi
+ eend $?
+}
+
+clear() {
+ # clear will remove all the rules and bring the system to an unfirewalled
+ # state. (21 Nov 2004 eldad)
+
+ ebegin "Clearing all firewall rules and setting policy to ACCEPT"
+ /sbin/shorewall clear
+ eend $?
+}
+
+reset() {
+ # reset the packet and byte counters in the firewall
+
+ ebegin "Resetting the packet and byte counters in the firewall"
+ /sbin/shorewall reset
+ eend $?
+}
+
+refresh() {
+ # refresh the rules involving the broadcast addresses of firewall
+ # interfaces, the black list, traffic control rules and
+ # ECN control rules
+
+ ebegin "Refreshing firewall rules"
+ /sbin/shorewall refresh
+ eend $?
+}
+
+check() {
+ # perform cursory validation of the zones, interfaces, hosts, rules
+ # and policy files. CAUTION: does not parse and validate the generated
+ # iptables commands.
+
+ ebegin "Checking configuration files"
+ /sbin/shorewall check
+ eend $?
+}
diff --git a/testing/sipsak/APKBUILD b/testing/sipsak/APKBUILD
new file mode 100644
index 000000000..d328c7e96
--- /dev/null
+++ b/testing/sipsak/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=sipsak
+pkgver=0.9.6
+pkgrel=0
+pkgdesc="SIP swiss army knife"
+url="http://sipsak.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends=
+install=
+subpackages="$pkgname-doc"
+source="http://download.berlios.de/$pkgname/$pkgname-$pkgver-1.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="c4eb8e282902e75f4f040f09ea9d99d5 sipsak-0.9.6-1.tar.gz"
diff --git a/testing/sisctrl/APKBUILD b/testing/sisctrl/APKBUILD
new file mode 100644
index 000000000..584e35926
--- /dev/null
+++ b/testing/sisctrl/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=sisctrl
+pkgver=0.0.20051202
+pkgrel=3
+pkgdesc="SiSCtrl is Display Control Panel for XFree86/X.org SiS driver"
+url="http://www.winischhofer.net/linuxsisvga.shtml"
+arch="all"
+license="GPL"
+depends=
+makedepends="pkgconfig gtk+-dev libxxf86vm-dev libxrandr-dev libxinerama-dev
+ libxv-dev"
+subpackages="$pkgname-doc"
+source="http://www.winischhofer.net/sis/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-xv-path=/usr/lib \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir"/usr/share/man/man1 \
+ "$pkgdir"/usr/share/pixmaps \
+ "$pkgdir"/usr/share/applications
+
+ install -m 644 sisctrl.1x "$pkgdir"/usr/share/man/man1/sisctrl.1
+ install -m 644 icons/32x32/sisctrl.xpm "$pkgdir"/usr/share/pixmaps
+ install -m 644 icons/16x16/sisctrl.png \
+ "$pkgdir"/usr/share/pixmaps/sisctrl_16x16.png
+ install -m 644 icons/32x32/sisctrl.png \
+ "$pkgdir"/usr/share/pixmaps/sisctrl_32x32.png
+ install -m 644 icons/48x48/sisctrl.png \
+ "$pkgdir"/usr/share/pixmaps/sisctrl_48x48.png
+ install -m 644 extra/sisctrl.desktop "$pkgdir"/usr/share/applications || return 1
+}
+md5sums="d9db755fe9fd40809b5c30d1ab286d62 sisctrl-0.0.20051202.tar.gz"
diff --git a/testing/slony1/APKBUILD b/testing/slony1/APKBUILD
new file mode 100644
index 000000000..b45d3b6af
--- /dev/null
+++ b/testing/slony1/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=slony1
+pkgver=2.0.7
+pkgrel=0
+pkgdesc="A master to multiple slaves replication system for PostgreSQL"
+url="http://slony.info/"
+arch="all"
+license="BSD"
+depends=""
+makedepends="postgresql-dev"
+install=""
+subpackages=""
+source="http://main.slony.info/downloads/2.0/source/slony1-$pkgver.tar.bz2
+ slony1.initd
+ slony1.confd"
+
+_builddir="$srcdir"/slony1-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+ install -Dm755 "$srcdir"/slony1.initd "$pkgdir"/etc/init.d/slony1 \
+ || return 1
+ install -Dm644 "$srcdir"/slony1.confd "$pkgdir"/etc/conf.d/slony1 \
+ || return 1
+}
+
+md5sums="e8aadfa9c1115f5ce43079381a4b51b5 slony1-2.0.7.tar.bz2
+a4d6b16ff6f23fbb578af35472f1ec97 slony1.initd
+27fe1a24fcab45c0e3ad4dd3e53287cf slony1.confd"
diff --git a/testing/slony1/slony1.confd b/testing/slony1/slony1.confd
new file mode 100644
index 000000000..07822329a
--- /dev/null
+++ b/testing/slony1/slony1.confd
@@ -0,0 +1,12 @@
+# /etc/conf.d/slony1:
+# $Header: /var/cvsroot/gentoo-x86/dev-db/slony1/files/slony1.conf,v 1.2 2007/03/07 23:18:21 nakano Exp $
+
+# Configuration file for /etc/init.d/slony1
+
+USER=postgres
+CLUSTER=your_cluster_name
+DBUSER=postgres
+DBNAME=your_database_name
+DBHOST=localhost
+LOGFILE=/var/lib/postgresql/data/slony1.log
+LOGLEVEL=1 # 1(minimum)..4(maximum)
diff --git a/testing/slony1/slony1.initd b/testing/slony1/slony1.initd
new file mode 100755
index 000000000..4f1469dc6
--- /dev/null
+++ b/testing/slony1/slony1.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/slony1/files/slony1.init,v 1.2 2007/03/07 23:18:21 nakano Exp $
+
+depend() {
+ need postgresql
+}
+
+start() {
+ ebegin "Starting slony1"
+ /usr/bin/slon -p /var/run/slony1.pid -d $LOGLEVEL $CLUSTER "dbname=$DBNAME user=$DBUSER host=$DBHOST" >> $LOGFILE 2>&1 &
+
+ while :
+ do
+ cnt=$(($cnt + 1))
+ if [ -f "/var/run/slony1.pid" ]; then
+ ret=0
+ break
+ fi
+
+ if [ $cnt -eq 30 ]; then
+ eerror "Please see log file: $LOGFILE"
+ ret=1
+ break
+ fi
+ sleep 1
+ done
+ eend $ret
+}
+
+stop() {
+ ebegin "Stopping slony1"
+ kill `cat /var/run/slony1.pid`
+ eend $?
+}
+
diff --git a/testing/snowstorm/APKBUILD b/testing/snowstorm/APKBUILD
new file mode 100644
index 000000000..4a74d0573
--- /dev/null
+++ b/testing/snowstorm/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=snowstorm
+pkgver=2.5.2
+pkgrel=1
+pkgdesc="snowstorm viewer for secondlife (and compatible servers)"
+url="http://wiki.secondlife.com/wiki/Project_Snowstorm"
+arch=""
+license="GPL"
+depends=
+depends_dev="mesa-dev sdl-dev openal-soft-dev apr-dev
+ apr-util-dev libvorbis-dev
+ libogg-dev freealut-dev db-dev boost-dev c-ares-dev
+ xmlrpc-epi-dev libpng-dev tut-dev openjpeg-dev gtk+-dev
+ qt-dev dbus-glib-dev gstreamer-dev gst-plugins-base-dev
+ jsoncpp-dev boost-coroutine pth-dev"
+makedepends="$depends_dev cmake"
+install=""
+subpackages=""
+source="http://67.202.104.180/~nenolod/secondlife-${pkgver}-sourcebundle.tar.gz
+ indra-no-breakpad.patch"
+
+_builddir="${srcdir}/build"
+_srcdir="${srcdir}/viewer-release/indra"
+prepare() {
+ local i
+ mkdir "$_builddir"
+
+ cd "$_srcdir/.."
+
+ msg "Copying indra to indra.orig for easy patching"
+ cp -R indra indra.orig
+
+ cd "$_srcdir"
+
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ msg "Preparing llqtwebkit"
+ cd "$_builddir/../llqtwebkit"
+
+ qmake CONFIG-=debug
+ make
+
+ msg "Building indra"
+ cd "$_builddir"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DPACKAGE:BOOL=FALSE \
+ -DLLQTWEBKIT_INCLUDE_DIR:STRING=${srcdir}/llqtwebkit \
+ -DLLQTWEBKIT_LIBRARY:STRING=${srcdir}/llqtwebkit \
+ -DCMAKE_BUILD_TYPE:STRING=RELWITHDEBINFO \
+ -DOPENAL:BOOL=TRUE \
+ -DFMOD:BOOL=FALSE \
+ -DUNATTENDED:BOOL=TRUE \
+ -DSTANDALONE:BOOL=TRUE \
+ -DLL_TESTS:BOOL=FALSE \
+ -DNDOF:BOOL=FALSE \
+ -DVIEWER:BOOL=TRUE "$_srcdir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="e16f67d04813953e5eadc1beafc435dd secondlife-2.5.2-sourcebundle.tar.gz
+c75027c0a6f7c52e0ae2b8008ca99f9e indra-no-breakpad.patch"
diff --git a/testing/snowstorm/indra-no-breakpad.patch b/testing/snowstorm/indra-no-breakpad.patch
new file mode 100644
index 000000000..28670b146
--- /dev/null
+++ b/testing/snowstorm/indra-no-breakpad.patch
@@ -0,0 +1,179 @@
+--- indra.orig/cmake/GoogleBreakpad.cmake
++++ indra/cmake/GoogleBreakpad.cmake
+@@ -2,7 +2,7 @@
+ include(Prebuilt)
+
+ if (STANDALONE)
+- set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
++ set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED OFF)
+ include(FindGoogleBreakpad)
+ else (STANDALONE)
+ use_prebuilt_binary(google_breakpad)
+--- indra.orig/llcommon/llapp.cpp
++++ indra/llcommon/llapp.cpp
+@@ -46,7 +46,9 @@
+ #include "llstring.h"
+ #include "lleventtimer.h"
+
++#if 0
+ #include "google_breakpad/exception_handler.h"
++#endif
+
+ //
+ // Signal handling
+@@ -143,8 +145,6 @@
+ // Set the application to this instance.
+ sApplication = this;
+
+- mExceptionHandler = 0;
+-
+ // initialize the buffer to write the minidump filename to
+ // (this is used to avoid allocating memory in the crash handler)
+ memset(minidump_path, 0, MAX_MINDUMP_PATH_LENGTH);
+@@ -177,8 +177,6 @@
+ mThreadErrorp = NULL;
+ }
+
+- if(mExceptionHandler != 0) delete mExceptionHandler;
+-
+ LLCommon::cleanupClass();
+ }
+
+@@ -284,75 +282,7 @@
+
+ void LLApp::setupErrorHandling()
+ {
+- // Error handling is done by starting up an error handling thread, which just sleeps and
+- // occasionally checks to see if the app is in an error state, and sees if it needs to be run.
+-
+-#if LL_WINDOWS
+- // This sets a callback to handle w32 signals to the console window.
+- // The viewer shouldn't be affected, sicne its a windowed app.
+- SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ConsoleCtrlHandler, TRUE);
+-
+- // Install the Google Breakpad crash handler for Windows
+- if(mExceptionHandler == 0)
+- {
+- llwarns << "adding breakpad exception handler" << llendl;
+- mExceptionHandler = new google_breakpad::ExceptionHandler(
+- L"C:\\Temp\\", 0, windows_post_minidump_callback, 0, google_breakpad::ExceptionHandler::HANDLER_ALL);
+- }
+-
+-#else
+- //
+- // Start up signal handling.
+- //
+- // There are two different classes of signals. Synchronous signals are delivered to a specific
+- // thread, asynchronous signals can be delivered to any thread (in theory)
+- //
+- setup_signals();
+-
+- // Add google breakpad exception handler configured for Darwin/Linux.
+- bool installHandler = true;
+-#ifdef LL_DARWIN
+- // For the special case of Darwin, we do not want to install the handler if
+- // the process is being debugged as the app will exit with value ABRT (6) if
+- // we do. Unfortunately, the code below which performs that test relies on
+- // the structure kinfo_proc which has been tagged by apple as an unstable
+- // API. We disable this test for shipping versions to avoid conflicts with
+- // future releases of Darwin. This test is really only needed for developers
+- // starting the app from a debugger anyway.
+- #ifndef LL_RELEASE_FOR_DOWNLOAD
+- int mib[4];
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_PROC;
+- mib[2] = KERN_PROC_PID;
+- mib[3] = getpid();
+-
+- struct kinfo_proc info;
+- memset(&info, 0, sizeof(info));
+-
+- size_t size = sizeof(info);
+- int result = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
+- if((result == 0) || (errno == ENOMEM))
+- {
+- // P_TRACED flag is set, so this process is being debugged; do not install
+- // the handler
+- if(info.kp_proc.p_flag & P_TRACED) installHandler = false;
+- }
+- else
+- {
+- // Failed to discover if the process is being debugged; default to
+- // installing the handler.
+- installHandler = true;
+- }
+- #endif
+-#endif
+- if(installHandler && (mExceptionHandler == 0))
+- {
+- std::string dumpPath = "/tmp/";
+- mExceptionHandler = new google_breakpad::ExceptionHandler(dumpPath, 0, &unix_post_minidump_callback, 0, true);
+- }
+-#endif
+-
+- startErrorThread();
++ sDisableCrashlogger = TRUE;
+ }
+
+ void LLApp::startErrorThread()
+@@ -403,20 +333,10 @@
+
+ void LLApp::setMiniDumpDir(const std::string &path)
+ {
+- if(mExceptionHandler == 0) return;
+-#ifdef LL_WINDOWS
+- wchar_t buffer[MAX_MINDUMP_PATH_LENGTH];
+- mbstowcs(buffer, path.c_str(), MAX_MINDUMP_PATH_LENGTH);
+- mExceptionHandler->set_dump_path(std::wstring(buffer));
+-#else
+- mExceptionHandler->set_dump_path(path);
+-#endif
+ }
+
+ void LLApp::writeMiniDump()
+ {
+- if(mExceptionHandler == 0) return;
+- mExceptionHandler->WriteMinidump();
+ }
+
+ // static
+@@ -473,13 +393,6 @@
+
+ void LLApp::disableCrashlogger()
+ {
+- // Disable Breakpad exception handler.
+- if (mExceptionHandler != 0)
+- {
+- delete mExceptionHandler;
+- mExceptionHandler = 0;
+- }
+-
+ sDisableCrashlogger = TRUE;
+ }
+
+--- indra.orig/llcommon/llapp.h
++++ indra/llcommon/llapp.h
+@@ -60,9 +60,11 @@
+ };
+ #endif
+
++#if 0
+ namespace google_breakpad {
+ class ExceptionHandler; // See exception_handler.h
+ }
++#endif
+
+ class LL_COMMON_API LLApp : public LLOptionInterface
+ {
+@@ -330,9 +332,9 @@
+ private:
+ // the static application instance if it was created.
+ static LLApp* sApplication;
+-
++#if 0
+ google_breakpad::ExceptionHandler * mExceptionHandler;
+-
++#endif
+
+ #if !LL_WINDOWS
+ friend void default_unix_signal_handler(int signum, siginfo_t *info, void *);
diff --git a/testing/soprano/APKBUILD b/testing/soprano/APKBUILD
new file mode 100644
index 000000000..020a47f90
--- /dev/null
+++ b/testing/soprano/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=soprano
+pkgver=2.6.0
+pkgrel=4
+pkgdesc="KDE RDF framework"
+url="http://soprano.sourceforge.net/"
+arch="all"
+license="LGPL"
+depends="shared-desktop-ontologies"
+depends_dev="qt-dev raptor-dev rasqal-dev redland-dev"
+makedepends="$depends_dev cmake automoc4 doxygen"
+install=""
+subpackages="$pkgname-dev"
+source="http://sourceforge.net/projects/soprano/files/Soprano/$pkgver/soprano-$pkgver.tar.bz2
+ redland.patch"
+
+_builddir="$srcdir"/soprano-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON \
+ -DRAPTOR_INCLUDE_DIR=/usr/include/raptor2 "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="03ae49e87c6ec99e57d0433c2650846f soprano-2.6.0.tar.bz2
+0d13b3fd532b7173b9deea47ca89a4b7 redland.patch"
diff --git a/testing/soprano/redland.patch b/testing/soprano/redland.patch
new file mode 100644
index 000000000..24806db41
--- /dev/null
+++ b/testing/soprano/redland.patch
@@ -0,0 +1,11 @@
+--- soprano-2.6.0.orig/cmake/modules/FindRedland.cmake
++++ soprano-2.6.0/cmake/modules/FindRedland.cmake
+@@ -113,7 +113,7 @@
+ ARGS ${_REDLAND_STORAGE_LIBS}
+ )
+ if(NOT "${_TEST_EXITCODE}" EQUAL 0)
+- set(_REDLAND_VERSION_OK)
++# set(_REDLAND_VERSION_OK)
+ message(STATUS "${_OUTPUT}")
+ message(STATUS "Redland with broken NEEDED section detected, disabling")
+ endif(NOT "${_TEST_EXITCODE}" EQUAL 0)
diff --git a/testing/spectools/APKBUILD b/testing/spectools/APKBUILD
new file mode 100644
index 000000000..e8d09a4a1
--- /dev/null
+++ b/testing/spectools/APKBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=spectools
+pkgver=201004
+_pkgver=2010-04-R1
+pkgrel=0
+pkgdesc="Utilities for using Wi-Spy USB spectrum analyzer"
+url="https://www.kismetwireless.net/spectools/"
+arch="all"
+license="GPL-2"
+depends=""
+depends_dev="gtk+2.0-dev bash cairo-dev libusb-compat-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://www.kismetwireless.net/code/$pkgname-${_pkgver}.tar.gz"
+
+_builddir="$srcdir"/$pkgname-${_pkgver}
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ autoreconf --install
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="1574813385fbe652736b439accec7120 spectools-2010-04-R1.tar.gz"
diff --git a/testing/sqstat/APKBUILD b/testing/sqstat/APKBUILD
new file mode 100644
index 000000000..9489e7960
--- /dev/null
+++ b/testing/sqstat/APKBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Natanael Copa
+pkgname=sqstat
+pkgver=1.20
+pkgrel=0
+pkgdesc="SqStat is a script which allows to look through active squid users connections"
+url="http://samm.kiev.ua/sqstat/"
+arch="all"
+license="ISC"
+depends=
+makedepends=
+install=
+subpackages=
+source="http://samm.kiev.ua/sqstat/sqstat-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/webapps/sqstat \
+ "$pkgdir"/etc/sqstat
+ cp config.inc.php.defaults "$pkgdir"/etc/sqstat/config.inc.php
+ mv * "$pkgdir"/usr/share/webapps/sqstat/
+ ln -s /etc/sqstat/config.inc.php \
+ "$pkgdir"/usr/share/webapps/sqstat/config.inc.php
+}
+
+md5sums="2b038a72eb5816995c3d7218ca516f30 sqstat-1.20.tar.gz"
diff --git a/testing/squidguard/APKBUILD b/testing/squidguard/APKBUILD
new file mode 100644
index 000000000..9b781ea22
--- /dev/null
+++ b/testing/squidguard/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=squidguard
+_realname=squidGuard
+pkgver=1.4
+pkgrel=2
+pkgdesc="Squid URL redirector"
+url="http://www.squidguard.org"
+arch="all"
+license="GPL"
+depends=
+makedepends="flex bison db-dev"
+install="$pkgname.post-install"
+subpackages=""
+source="http://www.squidguard.org/Downloads/$_realname-$pkgver.tar.gz
+ squidguard-1.4-gentoo.patch
+ squidguard-1.4-upstream-fixes.patch
+ squidguard-1.4-vsnprintf.patch"
+
+_builddir="$srcdir"/$_realname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 < ../../squidguard-1.4-gentoo.patch
+ patch -p1 < ../../squidguard-1.4-upstream-fixes.patch
+ patch -p1 < ../../squidguard-1.4-vsnprintf.patch
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-sg-config=/etc/squidGuard/squidGuard.conf \
+ --with-sg-logdir=/var/log/squidGuard
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make INSTDIR="$pkgdir" install
+ install -D -m644 ../../squidGuard.conf.blocksites $pkgdir/etc/squidGuard/squidGuard.conf
+ install -D -m644 ../../blockedsites $pkgdir/etc/squidGuard/blockedsites
+}
+
+md5sums="de834150998c1386c30feae196f16b06 squidGuard-1.4.tar.gz
+ba58e934fe2f75fcb5dfbe054e045449 squidguard-1.4-gentoo.patch
+4b512e930dede70ddf36d4f7c75a598f squidguard-1.4-upstream-fixes.patch
+8878c72f27e45dab99e5d0197d50caec squidguard-1.4-vsnprintf.patch"
diff --git a/testing/squidguard/blockedsites b/testing/squidguard/blockedsites
new file mode 100644
index 000000000..46279a47e
--- /dev/null
+++ b/testing/squidguard/blockedsites
@@ -0,0 +1 @@
+sex.com
diff --git a/testing/squidguard/squidGuard.conf.blocksites b/testing/squidguard/squidGuard.conf.blocksites
new file mode 100644
index 000000000..eaa8cdeef
--- /dev/null
+++ b/testing/squidguard/squidGuard.conf.blocksites
@@ -0,0 +1,13 @@
+logdir /var/log/squidGuard
+dbhome /etc/squidGuard/db
+
+dest blockedsites {
+ domainlist blockedsites
+}
+
+acl {
+ default {
+ pass !blockedsites all
+ redirect http://www.sample.com/empty.png
+ }
+}
diff --git a/testing/squidguard/squidGuard.conf.minimal b/testing/squidguard/squidGuard.conf.minimal
new file mode 100644
index 000000000..3b0ebf55c
--- /dev/null
+++ b/testing/squidguard/squidGuard.conf.minimal
@@ -0,0 +1,7 @@
+logdir /var/log/squidGuard
+
+acl {
+ default {
+ pass all
+ }
+}
diff --git a/testing/squidguard/squidguard-1.4-gentoo.patch b/testing/squidguard/squidguard-1.4-gentoo.patch
new file mode 100644
index 000000000..60b5461e9
--- /dev/null
+++ b/testing/squidguard/squidguard-1.4-gentoo.patch
@@ -0,0 +1,74 @@
+diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
+--- squidGuard-1.4.orig/Makefile.in 2008-05-17 18:36:44.000000000 +0000
++++ squidGuard-1.4/Makefile.in 2009-01-10 13:02:14.000000000 +0000
+@@ -43,7 +43,7 @@
+ # Dependencies for installing
+ #
+
+-install: install-build install-conf
++install: install-build
+
+ install-conf:
+ @echo Installing configuration file ;
+@@ -85,10 +85,10 @@
+
+ install-build:
+ @echo Installing squidGuard
+- @if [ ! -d $(bindir) ]; then \
+- $(MKINSTALLDIRS) $(bindir) ; \
++ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
++ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
+ fi ; \
+- cp src/squidGuard $(bindir) || exit 1 ; \
++ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \
+ echo Done. ;
+
+ clean::
+diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
+--- squidGuard-1.4.orig/src/Makefile.in 2009-01-03 20:05:39.000000000 +0000
++++ squidGuard-1.4/src/Makefile.in 2009-01-10 13:02:14.000000000 +0000
+@@ -110,6 +110,8 @@
+ mv -f y.tab.c y.tab.c.bison
+ mv -f y.tab.h y.tab.h.bison
+
++sg.y sg.l:
++
+ #
+ # Dependencies for installing
+ #
+@@ -122,8 +124,8 @@
+
+ install.bin:: squidGuard
+ @echo making $@ in `basename \`pwd\``
+- @$(MKDIR) $(bindir) $(logdir) $(cfgdir)
+- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
++ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
++ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
+
+ uninstall.bin::
+ @echo making $@ in `basename \`pwd\``
+diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c
+--- squidGuard-1.4.orig/src/sgDb.c 2008-07-14 18:29:41.000000000 +0000
++++ squidGuard-1.4/src/sgDb.c 2009-01-10 13:02:14.000000000 +0000
+@@ -103,13 +103,21 @@
+ if(createdb)
+ flag = flag | DB_TRUNCATE;
+ if ((ret =
++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
++#else
+ Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
++#endif
+ (void) Db->dbp->close(Db->dbp, 0);
+ sgLogFatalError("Error db_open: %s", strerror(ret));
+ }
+ } else {
+ if ((ret =
++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
++#else
+ Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
++#endif
+ sgLogFatalError("Error db_open: %s", strerror(ret));
+ }
+ }
diff --git a/testing/squidguard/squidguard-1.4-upstream-fixes.patch b/testing/squidguard/squidguard-1.4-upstream-fixes.patch
new file mode 100644
index 000000000..007e6b4c3
--- /dev/null
+++ b/testing/squidguard/squidguard-1.4-upstream-fixes.patch
@@ -0,0 +1,24 @@
+diff -Nru squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4/src/sgDiv.c.in
+--- squidGuard-1.4.orig/src/sgDiv.c.in 2008-07-14 18:02:43.000000000 +0200
++++ squidGuard-1.4/src/sgDiv.c.in 2009-11-28 09:33:05.000000000 +0100
+@@ -745,7 +745,7 @@
+ p++;
+ break;
+ case 'u': /* Requested URL */
+- strcat(buf, req->orig);
++ strncat(buf, req->orig, 2048);
+ p++;
+ break;
+ default:
+diff -Nru squidGuard-1.4.orig/src/sg.h.in squidGuard-1.4/src/sg.h.in
+--- squidGuard-1.4.orig/src/sg.h.in 2007-11-16 17:58:32.000000000 +0100
++++ squidGuard-1.4/src/sg.h.in 2009-11-28 09:33:37.000000000 +0100
+@@ -73,7 +73,7 @@
+ #define REQUEST_TYPE_REDIRECT 2
+ #define REQUEST_TYPE_PASS 3
+
+-#define MAX_BUF 4096
++#define MAX_BUF 12288
+
+ #define DEFAULT_LOGFILE "squidGuard.log"
+ #define WARNING_LOGFILE "squidGuard.log"
diff --git a/testing/squidguard/squidguard-1.4-vsnprintf.patch b/testing/squidguard/squidguard-1.4-vsnprintf.patch
new file mode 100644
index 000000000..bf4efec60
--- /dev/null
+++ b/testing/squidguard/squidguard-1.4-vsnprintf.patch
@@ -0,0 +1,44 @@
+diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in
+--- squidGuard-1.4.orig/configure.in 2009-04-26 12:28:49.000000000 +0000
++++ squidGuard-1.4/configure.in 2009-04-26 12:29:35.000000000 +0000
+@@ -421,7 +421,7 @@
+ AC_CHECK_FUNCS(regexec, , AC_MSG_ERROR([No regexec library function.]))
+ AC_CHECK_FUNCS(strdup, , AC_MSG_ERROR([No strdup library function.]))
+ AC_CHECK_FUNCS(strerror, , AC_MSG_ERROR([No strerror library function.]))
+-AC_CHECK_FUNCS(vsprintf, , AC_MSG_ERROR([No vsprintf library function.]))
++AC_CHECK_FUNCS(vsnprintf, , AC_MSG_ERROR([No vsnprintf library function.]))
+ AC_CHECK_FUNCS(sigaction)
+ AC_CHECK_FUNCS(signal)
+
+diff -Nru squidGuard-1.4.orig/src/sgLog.c squidGuard-1.4/src/sgLog.c
+--- squidGuard-1.4.orig/src/sgLog.c 2007-11-16 16:58:32.000000000 +0000
++++ squidGuard-1.4/src/sgLog.c 2009-04-26 12:31:40.000000000 +0000
+@@ -55,7 +55,7 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
+ fprintf(stderr,"overflow in vsprintf (sgLog): %s",strerror(errno));
+ va_end(ap);
+ date = niso(0);
+@@ -87,8 +87,8 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
+- sgLogFatalError("overflow in vsprintf (sgLogError): %s",strerror(errno));
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
++ fprintf(stderr,"overflow in vsprintf (sgLogError): %s",strerror(errno));
+ va_end(ap);
+ sgLog(globalErrorLog,"%s",msg);
+ }
+@@ -104,7 +104,7 @@
+ char msg[MAX_BUF];
+ va_list ap;
+ VA_START(ap, format);
+- if(vsprintf(msg, format, ap) > (MAX_BUF - 1))
++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1))
+ return;
+ va_end(ap);
+ sgLog(globalErrorLog,"%s",msg);
diff --git a/testing/squidguard/squidguard.post-install b/testing/squidguard/squidguard.post-install
new file mode 100644
index 000000000..2620de05f
--- /dev/null
+++ b/testing/squidguard/squidguard.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+mkdir /var/log/squidGuard &>/dev/null
+chown squid.squid /var/log/squidGuard
diff --git a/testing/strigi/APKBUILD b/testing/strigi/APKBUILD
new file mode 100644
index 000000000..e86531cb1
--- /dev/null
+++ b/testing/strigi/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=strigi
+pkgver=0.7.2
+pkgrel=0
+pkgdesc="KDE desktop search software"
+url="http://www.vandenoever.info/software/strigi/"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="qt-dev exiv2-dev bzip2-dev zlib-dev libiconv-dev libxml2-dev"
+makedepends="$depends_dev cmake automoc4"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.vandenoever.info/software/strigi/strigi-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/strigi-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir -p "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ca09ba176cf3ffe9afce4d92f38f9a85 strigi-0.7.2.tar.bz2"
diff --git a/testing/strongswan/APKBUILD b/testing/strongswan/APKBUILD
new file mode 100644
index 000000000..b90a3e218
--- /dev/null
+++ b/testing/strongswan/APKBUILD
@@ -0,0 +1,74 @@
+# Contributor: Jesse Young <jlyo@jlyo.org>
+# Maintainer:
+pkgname=strongswan
+pkgver=4.6.1
+pkgrel=0
+pkgdesc="IPsec-based VPN solution focused on security and ease of use, supporting IKEv1/IKEv2 and MOBIKE"
+url="http://www.strongswan.org/"
+arch="all"
+license="GPL-2 RSA-MD5 RSA-PKCS11 DES"
+depends="iproute2 openssl"
+depends_dev="sqlite-dev openssl-dev curl-dev gmp-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://download.strongswan.org/$pkgname-$pkgver.tar.bz2 adns.patch strongswan.initd"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$srcdir/$pkgname-$pkgver"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -Np1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --with-ipsecdir=/usr/lib/strongswan \
+ --enable-pluto \
+ --enable-sqlite \
+ --enable-smartcard \
+ --enable-cisco-quirks \
+ --enable-openssl \
+ --enable-curl \
+ --enable-sql \
+ --enable-attr-sql \
+ --enable-farp \
+ --enable-dhcp \
+ --enable-eap-sim \
+ --enable-eap-sim-file \
+ --enable-eap-simaka-pseudonym \
+ --enable-eap-simaka-reauth \
+ --enable-eap-identity \
+ --enable-eap-md5 \
+ --disable-eap-gtc \
+ --enable-eap-aka \
+ --enable-eap-aka-3gpp2 \
+ --enable-eap-mschapv2 \
+ --enable-eap-radius \
+ --enable-ha \
+ --disable-mysql \
+ --disable-ldap \
+ --disable-static \
+ --enable-shared || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir/$pkgname.initd" \
+ "$pkgdir/etc/init.d/$pkgname"
+ rm "$pkgdir"/usr/lib/ipsec/plugins/*.la || return 1
+ rm "$pkgdir"/usr/lib/ipsec/*.la || return 1
+}
+
+md5sums="85a28a12ed6f286a5bc9117e3a9386bb strongswan-4.6.1.tar.bz2
+8f02d0e582ac9ac60c28e465b626481d adns.patch
+fb9822512d02f521af8812db22a5175e strongswan.initd"
diff --git a/testing/strongswan/adns.patch b/testing/strongswan/adns.patch
new file mode 100644
index 000000000..52c1852d0
--- /dev/null
+++ b/testing/strongswan/adns.patch
@@ -0,0 +1,10 @@
+--- a/src/pluto/adns.c
++++ b/src/pluto/adns.c
+@@ -179,7 +179,7 @@
+ res_query(dname, class, type, answer, anslen)
+ # define res_nclose(statp) res_close()
+
+-static struct __res_state *statp = &_res;
++#define statp (&(_res))
+
+ #else /* !OLD_RESOLVER */
diff --git a/testing/strongswan/strongswan.initd b/testing/strongswan/strongswan.initd
new file mode 100644
index 000000000..156883f11
--- /dev/null
+++ b/testing/strongswan/strongswan.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting StrongSwan"
+ ipsec start
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping StrongSwan"
+ ipsec stop
+ eend $?
+}
+restart() {
+ ebegin "Restarting StrongSwan"
+ svc_stop
+ sleep 2
+ svc_start
+ eend $?
+}
+
+status() {
+ ebegin "StrongSwan Status (verbose):"
+ ipsec statusall
+ eend $?
+}
diff --git a/testing/supertuxkart/APKBUILD b/testing/supertuxkart/APKBUILD
new file mode 100644
index 000000000..cc47cc6e3
--- /dev/null
+++ b/testing/supertuxkart/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
+pkgname=supertuxkart
+pkgver=0.7
+pkgrel=0
+pkgdesc="Kart racing game"
+url="http://supertuxkart.sourceforge.net"
+arch="x86 x86_64"
+license="GPL"
+depends=
+depends_dev="irrlicht libvorbis-dev libogg-dev openal-soft-dev mesa-dev jpeg-dev gettext-dev"
+makedepends="$depends_dev"
+source="http://downloads.sourceforge.net/project/$pkgname/SuperTuxKart/0.7/$pkgname-$pkgver-src.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --datadir=/usr/share \
+ --bindir=/usr/bin \
+ --with-irrlicht=/usr/include/irrlicht \
+ || return 1
+ # From arch pkgbuild
+ sed -i "s#/usr/local#/usr#" src/io/file_manager.cpp
+ sed -i "s#/games#/bin#" $(grep -r "/games" *)
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+md5sums="2806f271e4d37fee5ad8ca166e1ad489 supertuxkart-0.7-src.tar.bz2"
diff --git a/testing/taglib-extras/APKBUILD b/testing/taglib-extras/APKBUILD
new file mode 100644
index 000000000..3aecb4f93
--- /dev/null
+++ b/testing/taglib-extras/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=taglib-extras
+pkgver=1.0.1
+pkgrel=0
+pkgdesc="extra modules for taglib"
+url="http://amarok.kde.org/"
+arch="all"
+license="GPL"
+depends=
+depends_dev="qt-dev taglib-dev"
+makedepends="$depends_dev cmake"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.kollide.net/~jefferai/taglib-extras-$pkgver.tar.gz"
+
+_builddir="$srcdir"/taglib-extras-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ mkdir "$_builddir"/build
+}
+
+build() {
+ cd "$_builddir"/build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON "$_builddir" || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="e973ca609b18e2c03c147ff9fd9e6eb8 taglib-extras-1.0.1.tar.gz"
diff --git a/testing/tbl/APKBUILD b/testing/tbl/APKBUILD
new file mode 100644
index 000000000..5860c4c3e
--- /dev/null
+++ b/testing/tbl/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=tbl
+pkgver=0.1.5
+pkgrel=0
+pkgdesc="Utility to format tables for troff"
+url="http://tbl.bsd.lv/"
+arch="all"
+license="ISC"
+depends=
+makedepends=
+install=
+subpackages="$pkgname-doc"
+source="http://tbl.bsd.lv/snapshots/tbl-$pkgver.tar.gz
+ tbl-install.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" PREFIX=/usr MANDIR=/usr/share/man install
+}
+
+md5sums="633edde9037b0a01b045b05e655ee7c9 tbl-0.1.5.tar.gz
+e4f29245b659de9814ff1a7a1c98ffb2 tbl-install.patch"
diff --git a/testing/tbl/tbl-install.patch b/testing/tbl/tbl-install.patch
new file mode 100644
index 000000000..72465ea2d
--- /dev/null
+++ b/testing/tbl/tbl-install.patch
@@ -0,0 +1,19 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -64,11 +64,11 @@
+ install -m 0444 tbl-$(VERSION).md5 $(PREFIX)/snapshots/tbl.md5
+
+ install:
+- mkdir -p $(BINDIR)
+- mkdir -p $(MANDIR)/man5
+- $(INSTALL_PROGRAM) tbl $(BINDIR)
+- $(INSTALL_MAN) tbl.5 $(MANDIR)/man5
+- $(INSTALL_MAN) tbl.1 $(MANDIR)/man1
++ mkdir -p $(DESTDIR)$(BINDIR)
++ mkdir -p $(DESTDIR)$(MANDIR)/man5
++ $(INSTALL_PROGRAM) tbl $(DESTDIR)$(BINDIR)
++ $(INSTALL_MAN) tbl.5 $(DESTDIR)$(MANDIR)/man5
++ $(INSTALL_MAN) tbl.1 $(DESTDIR)$(MANDIR)/man1
+
+ main.o: main.c tbl.h
+
diff --git a/testing/thunar-media-tags-plugin/01_port-to-thunarx-2.patch b/testing/thunar-media-tags-plugin/01_port-to-thunarx-2.patch
new file mode 100644
index 000000000..0c170f132
--- /dev/null
+++ b/testing/thunar-media-tags-plugin/01_port-to-thunarx-2.patch
@@ -0,0 +1,98 @@
+Description: Port to thunarx-2
+ Upstream patch for commit 'b805797f9bed98229f036e56c98ec16f40b539aa'
+ slightly updated to include '270924abcab81275dede68d882936c14b238b3ec'
+ (more realistic thunar version, 1.0.1 instead of 0.2.3svn-r20526).
+ .
+ Also slightly updated to patch configure.in instead of configure.in.in
+ (not available in released tarballs).
+Origin: backport, http://git.xfce.org/thunar-plugins/thunar-media-tags-plugin/commit/?h=thunarx-2&id=b805797f9bed98229f036e56c98ec16f40b539aa
+---
+diff --git a/configure.in b/configure.in
+index 0ea7f85..8764561 100644
+--- a/configure.in
++++ b/configure.in
+@@ -65,8 +65,7 @@ dnl ***********************************
+ dnl *** Check for required packages ***
+ dnl ***********************************
+ XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.3])
+-XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.2.3svn-r20526])
+-XDT_CHECK_PACKAGE([THUNARVFS], [thunar-vfs-1], [0.2.3svn-r20526])
++XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
+ XDT_CHECK_PACKAGE([TAGLIB], [taglib], [1.4])
+
+ dnl ***********************************
+diff --git a/thunar-plugin/Makefile.am b/thunar-plugin/Makefile.am
+index a3c2c25..a7bdb58 100644
+--- a/thunar-plugin/Makefile.am
++++ b/thunar-plugin/Makefile.am
+@@ -8,7 +8,7 @@
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ $(PLATFORM_CPPFLAGS)
+
+-extensionsdir = $(libdir)/thunarx-1
++extensionsdir = $(libdir)/thunarx-2
+ extensions_LTLIBRARIES = \
+ thunar-media-tags-plugin.la
+
+@@ -25,7 +25,6 @@
+ $(EXO_CFLAGS) \
+ $(PLATFORM_CFLAGS) \
+ $(THUNARX_CFLAGS) \
+- $(THUNARVFS_CFLAGS) \
+ $(TAGLIB_CFLAGS) \
+ $(TAGLIBC_CFLAGS)
+
+@@ -34,7 +33,6 @@
+ -export-dynamic \
+ -module \
+ $(THUNARX_LIBS) \
+- $(THUNARVFS_LIBS) \
+ $(TAGLIB_LIBS) \
+ $(TAGLIBC_LIBS) \
+ $(PLATFORM_LDFLAGS)
+diff --git a/thunar-plugin/audio-tags-page.c b/thunar-plugin/audio-tags-page.c
+index 099d7ad..7e5dab5 100644
+--- a/thunar-plugin/audio-tags-page.c
++++ b/thunar-plugin/audio-tags-page.c
+@@ -32,7 +32,6 @@
+ #include <taglib/tag_c.h>
+
+ #include <exo/exo.h>
+-#include <thunar-vfs/thunar-vfs.h>
+
+ #include <audio-tags-page.h>
+
+@@ -977,8 +976,8 @@ audio_tags_page_info_activate (GtkAction *action,
+
+ gchar *mimetype;
+
+- ThunarVfsInfo *vfs_info;
+- gchar *filename;
++ GFileInfo *fileinfo;
++ const char *filename;
+ gchar *filesize;
+
+ g_return_val_if_fail (page != NULL || IS_AUDIO_TAGS_PAGE (page), FALSE);
+@@ -1007,9 +1006,9 @@ audio_tags_page_info_activate (GtkAction *action,
+
+ /* Additional information */
+ mimetype = thunarx_file_info_get_mime_type (page->file);
+- vfs_info = thunarx_file_info_get_vfs_info (page->file);
+- filename = vfs_info->display_name;
+- filesize = thunar_vfs_humanize_size (vfs_info->size, NULL, 0);
++ fileinfo = thunarx_file_info_get_file_info (page->file);
++ filename = g_file_info_get_display_name (fileinfo);
++ filesize = g_format_size_for_display (g_file_info_get_size (fileinfo));
+
+ /* Create layout table */
+ table = gtk_table_new (7, 2, FALSE);
+@@ -1121,7 +1120,7 @@ audio_tags_page_info_activate (GtkAction *action,
+ g_free (filesize);
+ g_free (mimetype);
+
+- thunar_vfs_info_unref (vfs_info);
++ g_object_unref (fileinfo);
+
+ return TRUE;
+ }
+
diff --git a/testing/thunar-media-tags-plugin/02_port-to-exo-1.patch b/testing/thunar-media-tags-plugin/02_port-to-exo-1.patch
new file mode 100644
index 000000000..e3ab9b148
--- /dev/null
+++ b/testing/thunar-media-tags-plugin/02_port-to-exo-1.patch
@@ -0,0 +1,175 @@
+Description: Port to exo-1
+ Patch slightly updated to patch configure.in instead of configure.in.in
+ (not available in released tarballs), and to apply cleanly against 0.1.2.
+Origin: backport, http://bugzilla.xfce.org/attachment.cgi?id=2882
+Bug: http://bugzilla.xfce.org/show_bug.cgi?id=6295
+---
+ configure.in | 3 ++-
+ thunar-plugin/audio-tags-page.c | 22 +++++++---------------
+ thunar-plugin/tag-renamer.c | 16 +++-------------
+ 3 files changed, 12 insertions(+), 29 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index ed3099b..c345c5c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -64,7 +64,8 @@ XDT_I18N([@LINGUAS@])
+ dnl ***********************************
+ dnl *** Check for required packages ***
+ dnl ***********************************
+-XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.3])
++XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
++XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])
+ XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
+ XDT_CHECK_PACKAGE([TAGLIB], [taglib], [1.4])
+
+diff --git a/thunar-plugin/audio-tags-page.c b/thunar-plugin/audio-tags-page.c
+index 7e5dab5..40b226f 100644
+--- a/thunar-plugin/audio-tags-page.c
++++ b/thunar-plugin/audio-tags-page.c
+@@ -89,7 +89,6 @@ struct _AudioTagsPage
+ ThunarxPropertyPage __parent__;
+
+ /* Widgets */
+- GtkTooltips *tooltips;
+ GtkWidget *table;
+ GtkWidget *save_button;
+ GtkWidget *info_button;
+@@ -281,10 +280,6 @@ audio_tags_page_init (AudioTagsPage *page)
+
+ gtk_container_set_border_width (GTK_CONTAINER (page), 8);
+
+- /* Allocate the shared tooltips */
+- page->tooltips = gtk_tooltips_new ();
+- exo_gtk_object_ref_sink (GTK_OBJECT (page->tooltips));
+-
+ /* Main container */
+ vbox = gtk_vbox_new (FALSE, 8);
+ gtk_container_add (GTK_CONTAINER (page), vbox);
+@@ -316,7 +311,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Track spin button */
+ spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0);
+ exo_mutual_binding_new (G_OBJECT (adjustment), "value", G_OBJECT (page), "track");
+- gtk_tooltips_set_tip (page->tooltips, spin, _("Enter the track number here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (spin), _("Enter the track number here."));
+ gtk_container_add (GTK_CONTAINER (alignment), spin);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
+ gtk_widget_show (spin);
+@@ -339,7 +334,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Year spin button */
+ spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 0);
+ exo_mutual_binding_new (G_OBJECT (adjustment), "value", G_OBJECT (page), "year");
+- gtk_tooltips_set_tip (page->tooltips, spin, _("Enter the release year here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (spin), _("Enter the release year here."));
+ gtk_container_add (GTK_CONTAINER (alignment), spin);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), spin);
+ gtk_widget_show (spin);
+@@ -354,7 +349,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Artist entry */
+ entry = gtk_entry_new ();
+ exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "artist");
+- gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the name of the artist or author of this file here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the name of the artist or author of this file here."));
+ gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
+ gtk_widget_show (entry);
+@@ -369,7 +364,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Title entry */
+ entry = gtk_entry_new ();
+ exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "title");
+- gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the song title here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the song title here."));
+ gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_widget_show (entry);
+
+@@ -383,7 +378,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Album entry */
+ entry = gtk_entry_new ();
+ exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "album");
+- gtk_tooltips_set_tip (page->tooltips, entry, _("Enter the album/record title here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter the album/record title here."));
+ gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_widget_show (entry);
+
+@@ -397,7 +392,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Comment entry */
+ entry = gtk_entry_new ();
+ exo_mutual_binding_new (G_OBJECT (entry), "text", G_OBJECT (page), "comment");
+- gtk_tooltips_set_tip (page->tooltips, entry, _("Enter your comments here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (entry), _("Enter your comments here."));
+ gtk_table_attach (GTK_TABLE (page->table), entry, 1, 4, 4, 5, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_widget_show (entry);
+
+@@ -411,7 +406,7 @@ audio_tags_page_init (AudioTagsPage *page)
+ /* Genre combo box */
+ combo = gtk_combo_box_entry_new_text ();
+ exo_mutual_binding_new (G_OBJECT (GTK_BIN (combo)->child), "text", G_OBJECT (page), "genre");
+- gtk_tooltips_set_tip (page->tooltips, combo, _("Select or enter the genre of this song here."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (combo), _("Select or enter the genre of this song here."));
+ gtk_table_attach (GTK_TABLE (page->table), combo, 1, 4, 5, 6, GTK_FILL, 0, 0, 0);
+ gtk_widget_show (combo);
+
+@@ -511,9 +506,6 @@ audio_tags_page_finalize (GObject *object)
+ if (G_LIKELY (page->genre != NULL))
+ g_free (page->genre);
+
+- /* Release the tooltips */
+- g_object_unref (G_OBJECT (page->tooltips));
+-
+ (*G_OBJECT_CLASS (audio_tags_page_parent_class)->finalize) (object);
+ }
+
+diff --git a/thunar-plugin/tag-renamer.c b/thunar-plugin/tag-renamer.c
+index acb694e..bdbb17c 100644
+--- a/thunar-plugin/tag-renamer.c
++++ b/thunar-plugin/tag-renamer.c
+@@ -116,9 +116,6 @@ struct _TagRenamer
+ {
+ ThunarxRenamer __parent__;
+
+- /* Widgets */
+- GtkTooltips *tooltips;
+-
+ /* Properties */
+ TagRenamerFormat format;
+ gboolean replace_spaces;
+@@ -209,10 +206,6 @@ tag_renamer_init (TagRenamer *tag_renamer)
+ GEnumClass *klass;
+ gint n;
+
+- /* Allocate shared tooltips */
+- tag_renamer->tooltips = gtk_tooltips_new ();
+- exo_gtk_object_ref_sink (GTK_OBJECT (tag_renamer->tooltips));
+-
+ table = gtk_table_new (2, 3, FALSE);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+@@ -245,14 +238,14 @@ tag_renamer_init (TagRenamer *tag_renamer)
+
+ button = gtk_check_button_new_with_mnemonic (_("_Underscores"));
+ exo_mutual_binding_new (G_OBJECT (button), "active", G_OBJECT (tag_renamer), "replace-spaces");
+- gtk_tooltips_set_tip (tag_renamer->tooltips, button, _("Activating this option will replace all spaces in the target filename "
+- "with underscores."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("Activating this option will replace all spaces in the target filename "
++ "with underscores."));
+ gtk_table_attach (GTK_TABLE (table), button, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
+ gtk_widget_show (button);
+
+ button = gtk_check_button_new_with_mnemonic (_("_Lowercase"));
+ exo_mutual_binding_new (G_OBJECT (button), "active", G_OBJECT (tag_renamer), "lowercase");
+- gtk_tooltips_set_tip (tag_renamer->tooltips, button, _("If you activate this, the resulting filename will only contain lowercase letters."), NULL);
++ gtk_widget_set_tooltip_text (GTK_WIDGET (button), _("If you activate this, the resulting filename will only contain lowercase letters."));
+ gtk_table_attach (GTK_TABLE (table), button, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
+ gtk_widget_show (button);
+
+@@ -272,9 +265,6 @@ tag_renamer_finalize (GObject *object)
+ {
+ TagRenamer *tag_renamer = TAG_RENAMER (object);
+
+- /* release the tooltips */
+- g_object_unref (G_OBJECT (tag_renamer->tooltips));
+-
+ /* Free strings */
+ g_free (tag_renamer->artist);
+ g_free (tag_renamer->title);
+
diff --git a/testing/thunar-media-tags-plugin/03_fix-crash-with-ogg-video-files.patch b/testing/thunar-media-tags-plugin/03_fix-crash-with-ogg-video-files.patch
new file mode 100644
index 000000000..eb50af938
--- /dev/null
+++ b/testing/thunar-media-tags-plugin/03_fix-crash-with-ogg-video-files.patch
@@ -0,0 +1,28 @@
+Description: Call taglib_file_is_valid() for input audio files
+ Check that the file contains valid audio information to determine whether
+ the plugin should act on it or not.
+Origin: other, http://bugzilla.xfce.org/attachment.cgi?id=2879
+Bug: http://bugzilla.xfce.org/show_bug.cgi?id=6297
+---
+ thunar-plugin/media-tags-provider.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/thunar-plugin/media-tags-provider.c b/thunar-plugin/media-tags-provider.c
+index a7604ea..2c31a98 100644
+--- a/thunar-plugin/media-tags-provider.c
++++ b/thunar-plugin/media-tags-provider.c
+@@ -163,10 +163,11 @@ media_tags_get_audio_file_supported (ThunarxFileInfo *info)
+
+ if (G_LIKELY (taglib_file != NULL))
+ {
++ /* Check that the file contains valid audio info */
++ supported = taglib_file_is_valid (taglib_file);
++
+ /* Free the taglib file */
+ taglib_file_free (taglib_file);
+-
+- supported = TRUE;
+ }
+
+ g_free (filename);
+
diff --git a/testing/thunar-media-tags-plugin/04_fix-implicit-dso-linking.patch b/testing/thunar-media-tags-plugin/04_fix-implicit-dso-linking.patch
new file mode 100644
index 000000000..264d7237a
--- /dev/null
+++ b/testing/thunar-media-tags-plugin/04_fix-implicit-dso-linking.patch
@@ -0,0 +1,13 @@
+Description: add missing libs
+Origin: other, http://bugzilla.xfce.org/attachment.cgi?id=3284
+Bug: http://bugzilla.xfce.org/show_bug.cgi?id=6295
+--- thunar-media-tags-plugin-0.1.2.orig/thunar-plugin/Makefile.am
++++ thunar-media-tags-plugin-0.1.2/thunar-plugin/Makefile.am
+@@ -32,6 +32,7 @@
+ -avoid-version \
+ -export-dynamic \
+ -module \
++ $(EXO_LIBS) \
+ $(THUNARX_LIBS) \
+ $(TAGLIB_LIBS) \
+ $(TAGLIBC_LIBS) \
diff --git a/testing/thunar-media-tags-plugin/APKBUILD b/testing/thunar-media-tags-plugin/APKBUILD
new file mode 100644
index 000000000..5a6313345
--- /dev/null
+++ b/testing/thunar-media-tags-plugin/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=thunar-media-tags-plugin
+pkgver=0.1.2
+pkgrel=0
+pkgdesc="Media Tags plugin for the Thunar file manager"
+url="http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin"
+arch="all"
+license="GPLv2+"
+depends=""
+makedepends="thunar-dev xfce4-dev-tools taglib-dev"
+install=""
+subpackages="$pkgname-lang"
+source="http://goodies.xfce.org/releases/thunar-media-tags-plugin/thunar-media-tags-plugin-$pkgver.tar.bz2
+ 01_port-to-thunarx-2.patch
+ 02_port-to-exo-1.patch
+ 03_fix-crash-with-ogg-video-files.patch
+ 04_fix-implicit-dso-linking.patch"
+
+_builddir="$srcdir"/thunar-media-tags-plugin-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ xdt-autogen
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/lib/xfce4 \
+ --disable-static \
+ --sysconfdir=/etc \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/thunarx-2/*.la
+}
+
+md5sums="8a95f0ea4df6f757c1c94eb5442d2ff5 thunar-media-tags-plugin-0.1.2.tar.bz2
+479843c634c516afb405ebdd72f37203 01_port-to-thunarx-2.patch
+5af37349b7d6d1b0180e49c1d86f9d8f 02_port-to-exo-1.patch
+d83ec2e224db216f90e9035b442e1e73 03_fix-crash-with-ogg-video-files.patch
+b6956747e247de938bc0970ba78cd8bf 04_fix-implicit-dso-linking.patch"
diff --git a/testing/thunderbird/0002-Use-C99-math-isfinite.patch b/testing/thunderbird/0002-Use-C99-math-isfinite.patch
new file mode 100644
index 000000000..3d85a6928
--- /dev/null
+++ b/testing/thunderbird/0002-Use-C99-math-isfinite.patch
@@ -0,0 +1,43 @@
+From cdb9db4c1c593dbe22db4f389a62fce034f31f2d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 25 Nov 2011 08:30:51 +0000
+Subject: [PATCH 2/4] Use C99 math isfinite
+
+---
+ js/src/ctypes/CTypes.cpp | 2 +-
+ xpcom/ds/nsMathUtils.h | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp
+index 5c0f886..a3b1ae6 100644
+--- a/js/src/ctypes/CTypes.cpp
++++ b/js/src/ctypes/CTypes.cpp
+@@ -467,7 +467,7 @@ static inline bool FloatIsFinite(jsdouble f) {
+ #ifdef WIN32
+ return _finite(f) != 0;
+ #else
+- return finite(f);
++ return isfinite(f);
+ #endif
+ }
+
+diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
+index 21ffbec..2e80476 100644
+--- a/xpcom/ds/nsMathUtils.h
++++ b/xpcom/ds/nsMathUtils.h
+@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
+ // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
+ return !!_finite(d);
+ #else
+- return finite(d);
++#ifdef _GLIBCXX_CMATH
++ return std::isfinite(d);
++#else
++ return isfinite(d);
++#endif
+ #endif
+ }
+
+--
+1.7.7.4
+
diff --git a/testing/thunderbird/0004-xulrunner-malloc_usable_size.patch b/testing/thunderbird/0004-xulrunner-malloc_usable_size.patch
new file mode 100644
index 000000000..aae416c7d
--- /dev/null
+++ b/testing/thunderbird/0004-xulrunner-malloc_usable_size.patch
@@ -0,0 +1,25 @@
+From a2a15c826a5e1743ba71288543b9e144603fba26 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Fri, 25 Nov 2011 08:40:53 +0000
+Subject: [PATCH 4/4] xulrunner: malloc_usable_size
+
+---
+ memory/mozalloc/mozalloc.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
+index 58e5192..500c651 100644
+--- a/memory/mozalloc/mozalloc.cpp
++++ b/memory/mozalloc/mozalloc.cpp
+@@ -267,7 +267,7 @@ moz_malloc_usable_size(void *ptr)
+ #if defined(XP_MACOSX)
+ return malloc_size(ptr);
+ #elif defined(MOZ_MEMORY)
+- return malloc_usable_size(ptr);
++ return 0;
+ #elif defined(XP_WIN)
+ return _msize(ptr);
+ #else
+--
+1.7.7.4
+
diff --git a/testing/thunderbird/APKBUILD b/testing/thunderbird/APKBUILD
new file mode 100644
index 000000000..ae94b46db
--- /dev/null
+++ b/testing/thunderbird/APKBUILD
@@ -0,0 +1,100 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=thunderbird
+pkgver=8.0
+_pkgver=$pkgver
+_xulver=8.0
+pkgrel=0
+pkgdesc="Mozilla Thunderbird mail/newsgroup client"
+url="http://www.mozilla.org/projects/thunderbird/"
+arch="all"
+license="MPLv1.1 or GPLv2+ or LGPLv2+"
+depends="xulrunner>=${_xulver} zip"
+makedepends="
+ alsa-lib-dev
+ cairo-dev
+ curl-dev
+ dbus-glib-dev
+ gtk+2.0-dev
+ hicolor-icon-theme
+ hunspell-dev
+ libevent-dev
+ libidl-dev
+ libnotify-dev
+ libvpx-dev
+ libx11-dev
+ libxext-dev
+ libxt-dev
+ mesa-dev
+ nspr-dev
+ nss-dev
+ python
+ sqlite-dev
+ startup-notification-dev
+ wireless-tools-dev
+ xulrunner-dev>=${_xulver}
+ yasm
+ "
+install=""
+subpackages=""
+source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${_pkgver}.source.tar.bz2
+ mozconfig
+ thunderbird.desktop
+ xpt.py.patch
+ jemalloc-libs.patch
+ "
+# mozalloc_usable_size.patch
+# finite.patch
+
+_builddir="${srcdir}/comm-release"
+_mozappdir=/usr/lib/thunderbird-$pkgver
+
+prepare() {
+ local i
+
+ cd "$_builddir"
+
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ cp "${srcdir}/mozconfig" .mozconfig || return 1
+ echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
+}
+
+build() {
+ cd "$_builddir"
+
+ # mozilla's buildsystem is on drugs
+ export CFLAGS="$(echo $CFLAGS | sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')"
+ export CXXFLAGS="$CFLAGS -std=gnu++0x"
+
+# export LDFLAGS="-Wl,-rpath,${_mozappdir}"
+ make -j1 -f client.mk build \
+ STRIP="/bin/true" \
+ MOZ_MAKE_FLAGS="$MAKEOPTS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" -f client.mk install || return 1
+
+ for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
+ install -Dm644 other-licenses/branding/thunderbird/mailicon${i/x*/}.png \
+ "$pkgdir/usr/share/icons/hicolor/$i/apps/thunderbird.png"
+ done
+
+ install -Dm644 "$srcdir"/$pkgname.desktop \
+ "$pkgdir"/usr/share/applications/$pkgname.desktop || return 1
+
+ # xulrunner stub launcher has changed to using a symlink overlay...
+ # go figure
+ ln -sf /usr/lib/xulrunner-${_xulver} ${pkgdir}/$_mozappdir/xulrunner
+}
+
+md5sums="332f60036aebdce7dec6ee2b1af4941d thunderbird-8.0.source.tar.bz2
+ca98c2bf1017b33e19dae22fdcef2e73 mozconfig
+af3e5b344d2edf1c7d61bb0a5a96de9a thunderbird.desktop
+c872ba4217937bbbb6d2ab469a3bf95a xpt.py.patch
+7f4d92ea8800a34b3c23569c7993f092 jemalloc-libs.patch"
diff --git a/testing/thunderbird/finite.patch b/testing/thunderbird/finite.patch
new file mode 100644
index 000000000..63927ab82
--- /dev/null
+++ b/testing/thunderbird/finite.patch
@@ -0,0 +1,26 @@
+--- ./mozilla/js/src/ctypes/CTypes.cpp.orig
++++ ./mozilla/js/src/ctypes/CTypes.cpp
+@@ -467,7 +467,7 @@
+ #ifdef WIN32
+ return _finite(f) != 0;
+ #else
+- return finite(f);
++ return isfinite(f);
+ #endif
+ }
+
+--- ./mozilla/xpcom/ds/nsMathUtils.h
++++ ./mozilla/xpcom/ds/nsMathUtils.h
+@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
+ // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
+ return !!_finite(d);
+ #else
+- return finite(d);
++#ifdef _GLIBCXX_CMATH
++ return std::isfinite(d);
++#else
++ return isfinite(d);
++#endif
+ #endif
+ }
+
diff --git a/testing/thunderbird/jemalloc-libs.patch b/testing/thunderbird/jemalloc-libs.patch
new file mode 100644
index 000000000..e7968986b
--- /dev/null
+++ b/testing/thunderbird/jemalloc-libs.patch
@@ -0,0 +1,11 @@
+--- ./mail/app/Makefile.in.orig
++++ ./mail/app/Makefile.in
+@@ -172,8 +172,6 @@
+ RCFLAGS += -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\"
+ endif
+
+-LIBS += $(JEMALLOC_LIBS)
+-
+ include $(topsrcdir)/config/rules.mk
+
+ ifdef MOZILLA_OFFICIAL
diff --git a/testing/thunderbird/mozalloc_usable_size.patch b/testing/thunderbird/mozalloc_usable_size.patch
new file mode 100644
index 000000000..9b6740dce
--- /dev/null
+++ b/testing/thunderbird/mozalloc_usable_size.patch
@@ -0,0 +1,11 @@
+--- ./mozilla/memory/mozalloc/mozalloc.cpp.orig
++++ ./mozilla/memory/mozalloc/mozalloc.cpp
+@@ -266,7 +266,7 @@
+
+ #if defined(XP_MACOSX)
+ return malloc_size(ptr);
+-#elif defined(MOZ_MEMORY)
++#elif defined(MOZ_MEMORY) && !defined(__UCLIBC__)
+ return malloc_usable_size(ptr);
+ #elif defined(XP_WIN)
+ return _msize(ptr);
diff --git a/testing/thunderbird/mozconfig b/testing/thunderbird/mozconfig
new file mode 100644
index 000000000..85ed8a648
--- /dev/null
+++ b/testing/thunderbird/mozconfig
@@ -0,0 +1,40 @@
+mk_add_options MOZ_CO_PROJECT=mail
+ac_add_options --enable-application=mail
+
+ac_add_options --prefix=/usr
+ac_add_options --libdir=/usr/lib
+
+# System libraries
+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 --with-system-libvpx
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-ffi
+ac_add_options --enable-system-cairo
+ac_add_options --enable-system-pixman
+ac_add_options --with-pthreads
+
+# Features
+ac_add_options --enable-official-branding
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-startup-notification
+ac_add_options --enable-gio
+
+ac_add_options --disable-gnomevfs
+ac_add_options --disable-crashreporter
+ac_add_options --disable-updater
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-installer
+
+# Optimization
+ac_add_options --enable-optimize
+
+export MOZILLA_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
diff --git a/testing/thunderbird/thunderbird.desktop b/testing/thunderbird/thunderbird.desktop
new file mode 100644
index 000000000..a626e52ba
--- /dev/null
+++ b/testing/thunderbird/thunderbird.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Version=1.0
+Name=Thunderbird
+Comment=Mail & News Reader
+GenericName=Mail Client & News Reader
+Exec=thunderbird %u
+TryExec=thunderbird
+Icon=thunderbird
+Terminal=false
+Type=Application
+Categories=Network;Email;
+MimeType=message/rfc822;x-scheme-handler/mailto;
+StartupNotify=true
diff --git a/testing/thunderbird/xpt.py.patch b/testing/thunderbird/xpt.py.patch
new file mode 100644
index 000000000..1718e8707
--- /dev/null
+++ b/testing/thunderbird/xpt.py.patch
@@ -0,0 +1,11 @@
+--- ./config/config.mk.orig
++++ ./config/config.mk
+@@ -368,7 +368,7 @@
+ else
+ XPIDL_COMPILE = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/bin/xpidl$(BIN_SUFFIX)
+ endif
+-XPIDL_LINK = $(PYTHON) $(SDK_BIN_DIR)/xpt.py link
++XPIDL_LINK = $(PYTHON) $(LIBXUL_DIST)/sdk/bin/xpt.py link
+
+ INCLUDES = \
+ $(LOCAL_INCLUDES) \
diff --git a/testing/tolua/APKBUILD b/testing/tolua/APKBUILD
new file mode 100644
index 000000000..b7349f681
--- /dev/null
+++ b/testing/tolua/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=tolua
+pkgver=5.1.4
+pkgrel=0
+pkgdesc="Tool to integrace C/C++ code in lua"
+url="http://www.tecgraf.puc-rio.br/~celes/tolua/"
+arch="all"
+license="MIT"
+depends=""
+depends_dev="lua-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://www.tecgraf.puc-rio.br/~celes/tolua/tolua-$pkgver.tar.gz"
+
+_builddir="$srcdir"/tolua-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ sed -i -e '/^CC=/d' \
+ -e 's/^CCPP *=.*/CCPP=$(CXX)/' \
+ -e 's/^CFLAGS *=/CFLAGS+=/' \
+ -e 's/^CPPFLAGS *=/CPPFLAGS+=/' \
+ config || return 1
+ # clean up some stuff that probably not was supposed to be there
+ find \( -name '.*DS_Store' -o -name '._*' \) -delete
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d "$pkgdir"/usr
+ cp -r bin lib include "$pkgdir"/usr/
+}
+
+md5sums="46d67c3b9b4b983368a9ff0baa2139f9 tolua-5.1.4.tar.gz"
diff --git a/testing/tolua/config b/testing/tolua/config
new file mode 100644
index 000000000..cf148eb13
--- /dev/null
+++ b/testing/tolua/config
@@ -0,0 +1,37 @@
+# configuration file for making tolua
+
+# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================
+
+# you need an ANSI C compiler. gcc is a popular one.
+CC?= gcc
+CXX?= g++
+CCPP=$(CXX)
+WARN= -ansi -Wall -g
+
+# on SGI's, cc is ANSI.
+#CC= cc
+#WARN= -ansi -fullwarn
+
+# if your system doesn't have (or need) ranlib, change "ranlib" to "true".
+# on some systems, "ar s" does it.
+RANLIB= ranlib
+#RANLIB= ar s
+#RANLIB= true
+
+# this should work in all unix systems.
+AR= ar rcu
+
+# set lua path
+LUA=/usr/local
+LUAINC=$(LUA)/include
+LUALIB=$(LUA)/lib
+
+# == END OF USER SETTINGS. DO NOT CHANGE ANYTHING BELOW THIS LINE ============
+
+INC= -I$(TOLUA)/include -I$(LUAINC)
+LIB= -L$(TOLUA)/lib -L$(LUALIB)
+
+#CFLAGS= -O2 $(WARN) $(INC)
+#CPPFLAGS= -O2 $(WARN) $(INC)
+CFLAGS+= -g $(WARN) $(INC)
+CPPFLAGS+= -g $(WARN) $(INC)
diff --git a/testing/totem-pl-parser/APKBUILD b/testing/totem-pl-parser/APKBUILD
new file mode 100644
index 000000000..13201e2cc
--- /dev/null
+++ b/testing/totem-pl-parser/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=totem-pl-parser
+pkgver=2.32.1
+pkgrel=3
+pkgdesc="playlist parsing library for totem"
+url="http://projects.gnome.org/totem"
+arch="all"
+license="LGPL"
+depends=
+depends_dev="glib-dev gmime-dev libsoup-dev libxml2-dev"
+makedepends="$depends_dev intltool autoconf automake libtool"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2
+ no-libsoup-gnome.patch"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ autoconf
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+}
+
+md5sums="2cedaab5dee14526ad0be0970155151f totem-pl-parser-2.32.1.tar.bz2
+2f4ec2e4e2f17338c96beb2b91e92cb3 no-libsoup-gnome.patch"
diff --git a/testing/totem-pl-parser/no-libsoup-gnome.patch b/testing/totem-pl-parser/no-libsoup-gnome.patch
new file mode 100644
index 000000000..9f0770bd9
--- /dev/null
+++ b/testing/totem-pl-parser/no-libsoup-gnome.patch
@@ -0,0 +1,31 @@
+Only in b: config.log
+--- a/configure.in
++++ b/configure.in
+@@ -60,7 +60,7 @@
+ AC_SUBST(TOTEM_PL_PARSER_VERSION_MINOR)
+ AC_SUBST(TOTEM_PL_PARSER_VERSION_MICRO)
+
+-pkg_modules="glib-2.0 >= $GLIB_REQS libxml-2.0 gthread-2.0 gio-2.0 >= $GIO_REQS libsoup-gnome-2.4"
++pkg_modules="glib-2.0 >= $GLIB_REQS libxml-2.0 gthread-2.0 gio-2.0 >= $GIO_REQS libsoup-2.4"
+
+ ##################################
+ # Checking libgmime dependency
+--- a/plparse/totem-pl-parser-podcast.c
++++ b/plparse/totem-pl-parser-podcast.c
+@@ -25,7 +25,7 @@
+ #include <glib.h>
+
+ #ifndef TOTEM_PL_PARSER_MINI
+-#include <libsoup/soup-gnome.h>
++#include <libsoup/soup.h>
+ #include "xmlparser.h"
+ #include "totem-pl-parser.h"
+ #include "totemplparser-marshal.h"
+@@ -579,7 +579,6 @@
+ GByteArray *data;
+
+ session = soup_session_sync_new_with_options (
+- SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26,
+ SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER,
+ SOUP_SESSION_USER_AGENT, "iTunes/7.4.1",
+ SOUP_SESSION_ACCEPT_LANGUAGE_AUTO, TRUE,
diff --git a/testing/totem/APKBUILD b/testing/totem/APKBUILD
new file mode 100644
index 000000000..7edde166e
--- /dev/null
+++ b/testing/totem/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=totem
+pkgver=2.32.0
+pkgrel=2
+pkgdesc="media player for gnome"
+url="http://projects.gnome.org/totem"
+arch="all"
+license="GPL"
+depends="gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-plugins-base-gnome gst-plugins-good-gnome gst-ffmpeg"
+depends_dev="gtk+-dev gstreamer-dev gst-plugins-base-dev gconf-dev totem-pl-parser-dev libunique-dev python-dev libsm-dev libice-dev"
+makedepends="$depends_dev gnome-doc-utils intltool"
+install="$pkgname.pre-deinstall $pkgname.post-install $pkgname.post-upgrade"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-mozilla"
+source="ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-scrollkeeper || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+mozilla() {
+ pkgdesc="totem mozilla plugin"
+
+ mkdir -p "$subpkgdir"/usr/lib/mozilla
+ mv "$pkgdir"/usr/lib/mozilla/plugins "$subpkgdir"/usr/lib/mozilla/plugins
+}
+
+md5sums="2e55c3da316648ba860e3f88af2d30ab totem-2.32.0.tar.bz2"
diff --git a/testing/totem/totem.post-install b/testing/totem/totem.post-install
new file mode 100644
index 000000000..87148a8ef
--- /dev/null
+++ b/testing/totem/totem.post-install
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for i in \
+ totem.schemas \
+ totem-handlers.schemas \
+ totem-video-thumbnail.schemas \
+; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/totem/totem.post-upgrade b/testing/totem/totem.post-upgrade
new file mode 100644
index 000000000..87148a8ef
--- /dev/null
+++ b/testing/totem/totem.post-upgrade
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for i in \
+ totem.schemas \
+ totem-handlers.schemas \
+ totem-video-thumbnail.schemas \
+; do
+ echo "Installing GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-install-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/totem/totem.pre-deinstall b/testing/totem/totem.pre-deinstall
new file mode 100644
index 000000000..c495189c7
--- /dev/null
+++ b/testing/totem/totem.pre-deinstall
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+for i in \
+ totem.schemas \
+ totem-handlers.schemas \
+ totem-video-thumbnail.schemas \
+; do
+ echo "Uninstalling GConf2 schema $i."
+ GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
+ /usr/bin/gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/$i >/dev/null
+done
diff --git a/testing/truecrypt/APKBUILD b/testing/truecrypt/APKBUILD
new file mode 100644
index 000000000..2cb716eef
--- /dev/null
+++ b/testing/truecrypt/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=truecrypt
+pkgver=7.1
+pkgrel=1
+pkgdesc="crypto"
+url="http://www.truecrypt.org/"
+arch="all"
+license="AS-IS"
+depends="device-mapper"
+depends_dev=""
+makedepends="nasm fuse-dev wxgtk-dev"
+install=""
+subpackages=""
+source="ftp://ftp.archlinux.org/other/tc/truecrypt-${pkgver}.tar.gz
+ ftp://ftp.archlinux.org/other/tc/pkcs-2.20.tar.gz
+ truecrypt-arch-detection.patch
+ execstack-fix.patch
+ truecrypt.desktop
+ "
+
+_builddir="$srcdir"/truecrypt-7.1-source
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make PKCS11_INC="${srcdir}/pkcs-2.20" VERBOSE=1 \
+ TC_EXTRA_CFLAGS="${CFLAGS}" \
+ TC_EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ TC_EXTRA_LFLAGS="${LDFLAGS} -fno-PIE" \
+ NOSTRIP=1 \
+ || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm755 Main/truecrypt "$pkgdir"/usr/bin/truecrypt || return 1
+ install -Dm644 "$srcdir"/truecrypt.desktop \
+ "$pkgdir"/usr/share/applications/truecrypt.desktop
+}
+
+md5sums="a8268630a870faff07af940f63fb29eb truecrypt-7.1.tar.gz
+ce6a707b79411e82e8e558aa03e764b0 pkcs-2.20.tar.gz
+00ea70fa8437de877b31b027ac2b4060 truecrypt-arch-detection.patch
+78e606e6582dacc3176d59ad4419b6bb execstack-fix.patch
+183b9bf04a943454d4e216130bcbac01 truecrypt.desktop"
diff --git a/testing/truecrypt/execstack-fix.patch b/testing/truecrypt/execstack-fix.patch
new file mode 100644
index 000000000..d72fe0e14
--- /dev/null
+++ b/testing/truecrypt/execstack-fix.patch
@@ -0,0 +1,60 @@
+--- ./Crypto/Aes_hw_cpu.asm.old 2011-06-01 17:12:53.078000001 -0400
++++ ./Crypto/Aes_hw_cpu.asm 2011-06-01 17:12:53.080000002 -0400
+@@ -328,3 +328,12 @@
+
+
+ %endif ; __BITS__ != 16
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- ./Crypto/AesSmall_x86.asm.old 2011-06-01 17:12:53.084000002 -0400
++++ ./Crypto/AesSmall_x86.asm 2011-06-01 17:12:53.086000002 -0400
+@@ -1442,3 +1442,12 @@
+ db v8(0xe1),v8(0x69),v8(0x14),v8(0x63),v8(0x55),v8(0x21),v8(0x0c),v8(0x7d)
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- ./Crypto/Aes_x64.asm.old 2011-06-01 17:12:53.090000002 -0400
++++ ./Crypto/Aes_x64.asm 2011-06-01 17:12:53.092000002 -0400
+@@ -905,3 +905,12 @@
+ %endif
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
+--- ./Crypto/Aes_x86.asm.old 2011-06-01 17:12:53.096000002 -0400
++++ ./Crypto/Aes_x86.asm 2011-06-01 17:12:53.097000002 -0400
+@@ -644,3 +644,12 @@
+ do_exit
+
+ %endif
++ %ifidn __OUTPUT_FORMAT__,elf
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf32
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
++ %ifidn __OUTPUT_FORMAT__,elf64
++ section .note.GNU-stack noalloc noexec nowrite progbits
++ %endif
diff --git a/testing/truecrypt/truecrypt-arch-detection.patch b/testing/truecrypt/truecrypt-arch-detection.patch
new file mode 100644
index 000000000..bc16a2a36
--- /dev/null
+++ b/testing/truecrypt/truecrypt-arch-detection.patch
@@ -0,0 +1,15 @@
+diff -urN truecrypt-7.0a-source/Makefile truecrypt-7.0a-source.fixed/Makefile
+--- truecrypt-7.0a-source/Makefile 2010-09-05 10:32:10.000000000 -0400
++++ truecrypt-7.0a-source.fixed/Makefile 2011-07-05 21:41:50.296437879 -0400
+@@ -120,10 +120,7 @@
+
+ export CPU_ARCH ?= unknown
+
+-ARCH = $(shell uname -p)
+-ifeq "$(ARCH)" "unknown"
+- ARCH = $(shell uname -m)
+-endif
++ARCH = $(shell uname -m)
+
+ ifneq (,$(filter i386 i486 i586 i686 x86,$(ARCH)))
+ CPU_ARCH = x86
diff --git a/testing/truecrypt/truecrypt.desktop b/testing/truecrypt/truecrypt.desktop
new file mode 100644
index 000000000..53626f29f
--- /dev/null
+++ b/testing/truecrypt/truecrypt.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Exec=truecrypt
+Icon=truecrypt
+Comment=On-the-fly encryption
+Terminal=false
+Name=TrueCrypt
+StartupNotify=true
+Categories=System;
diff --git a/testing/tut/APKBUILD b/testing/tut/APKBUILD
new file mode 100644
index 000000000..502a3cead
--- /dev/null
+++ b/testing/tut/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=tut
+pkgver=20090830
+_pkgver=2009-08-30
+pkgrel=0
+pkgdesc="template unit test framework"
+url="http://tut-framework.sourceforge.net/"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://sourceforge.net/projects/tut-framework/files/TUT/TUT-${_pkgver}/TUT-${_pkgver}.tar.gz"
+
+_builddir="$srcdir"/tut-${_pkgver}
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/include
+ cp -R "$_builddir"/tut/ "$pkgdir"/usr/include/tut/
+ cp "$_builddir"/*.h "$pkgdir"/usr/include
+}
+
+md5sums="2f32ef60724aefd1a655d766e4662005 TUT-2009-08-30.tar.gz"
diff --git a/testing/tvheadend/APKBUILD b/testing/tvheadend/APKBUILD
new file mode 100644
index 000000000..d8d81599b
--- /dev/null
+++ b/testing/tvheadend/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=tvheadend-git
+_pkgname=andoma-tvheadend-fdc743f
+pkgver=2.13
+pkgrel=0
+pkgdesc="TV Streaming server for linux"
+url="http://www.lonelycoder.com/hts/tvheadend_overview.html"
+arch="all"
+license="GPL3"
+depends=""
+depends_dev="openssl-dev avahi-dev wget bash findutils"
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages=""
+source="saveas-https://github.com/andoma/tvheadend/tarball/master/$pkgname-$pkgver.tar.gz
+tvheadend-git.initd
+tvheadend-git.confd
+"
+_builddir="$srcdir"/$_pkgname
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --release
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ sed -i 's/\-T//g' support/posix.mk
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m755 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname || return 1
+}
+
+md5sums="97c51df1daca8db241dee8b9c55d0aad tvheadend-git-2.13.tar.gz
+4d6324b1b87890faf846ad95c2f3483c tvheadend-git.initd
+74749f3527418ddfd5671d5d5ad4dca4 tvheadend-git.confd"
diff --git a/testing/tvheadend/tvheadend-git.confd b/testing/tvheadend/tvheadend-git.confd
new file mode 100644
index 000000000..a912932ae
--- /dev/null
+++ b/testing/tvheadend/tvheadend-git.confd
@@ -0,0 +1,2 @@
+TVHBIN="/usr/bin/tvheadend"
+TVHUSER="tvheadend"
diff --git a/testing/tvheadend/tvheadend-git.initd b/testing/tvheadend/tvheadend-git.initd
new file mode 100644
index 000000000..6a50b9f3f
--- /dev/null
+++ b/testing/tvheadend/tvheadend-git.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tvheadend"
+ start-stop-daemon --start \
+ --user ${TVHUSER} \
+ --exec ${TVHBIN} -- -C -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tvheadend"
+ start-stop-daemon --stop --quiet --name tvheadend --signal 2
+ eend $?
+}
diff --git a/testing/tvheadend/tvheadend-git.post-deinstall b/testing/tvheadend/tvheadend-git.post-deinstall
new file mode 100644
index 000000000..b80984d6f
--- /dev/null
+++ b/testing/tvheadend/tvheadend-git.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+deluser hts 2>/dev/null
+exit 0
diff --git a/testing/tvheadend/tvheadend-git.pre-install b/testing/tvheadend/tvheadend-git.pre-install
new file mode 100644
index 000000000..73f865ca4
--- /dev/null
+++ b/testing/tvheadend/tvheadend-git.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+groupadd tvheadend 2>/dev/null
+adduser -H -h /home/tvheadend -g tvheadend -D -s /bin/false tvheadend 2>/dev/null
+gpasswd -a tvheadend video 2>/dev/null
+exit 0
diff --git a/testing/txt2man/APKBUILD b/testing/txt2man/APKBUILD
new file mode 100644
index 000000000..72079b72f
--- /dev/null
+++ b/testing/txt2man/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=txt2man
+pkgver=1.5.6
+pkgrel=0
+pkgdesc="Convert flat ASCII text to man page format"
+url="http://mvertes.free.fr/txt2man/"
+arch="noarch"
+license="GPLv2+"
+depends="gawk"
+makedepends=
+install=""
+subpackages="$pkgname-doc"
+source="http://mvertes.free.fr/download/txt2man-$pkgver.tar.gz
+ fixbashism.patch
+ makefile.patch"
+
+_builddir="$srcdir"/txt2man-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" prefix=/usr mandir=/usr/share/man \
+ install || return 1
+}
+
+md5sums="f301b3dc1872fab1b7740f9f69ff281b txt2man-1.5.6.tar.gz
+586f2e01dde9ef07a2734866797f8646 fixbashism.patch
+311fe2373e54b15eda845467ce68cd72 makefile.patch"
diff --git a/testing/txt2man/fixbashism.patch b/testing/txt2man/fixbashism.patch
new file mode 100644
index 000000000..f31059d88
--- /dev/null
+++ b/testing/txt2man/fixbashism.patch
@@ -0,0 +1,14 @@
+--- ./bookman.orig
++++ ./bookman
+@@ -83,9 +83,9 @@
+ shift $(($OPTIND - 1))
+ date=${date:-$(date +'%d %B %Y')}
+
+-[[ $1 ]] || set -- $(while read; do echo $REPLY; done)
++[ -n "$1" ] || set -- $(while read REPLY; do echo $REPLY; done)
+
+-[[ $outfile ]] && post="$post >$outfile"
++[ -n "$outfile" ] && post="$post >$outfile"
+
+ {
+ # Compute table of content from postscript output.
diff --git a/testing/txt2man/makefile.patch b/testing/txt2man/makefile.patch
new file mode 100644
index 000000000..617d4b0d2
--- /dev/null
+++ b/testing/txt2man/makefile.patch
@@ -0,0 +1,23 @@
+--- ./Makefile.orig
++++ ./Makefile
+@@ -1,5 +1,7 @@
+ # Makefile
+ prefix ?= /usr/local
++bindir ?= $(prefix)/bin
++mandir ?= $(prefix)/share/man
+ version = txt2man-1.5.6
+ BIN = src2man bookman txt2man
+ MAN1 = src2man.1 txt2man.1 bookman.1
+@@ -7,9 +9,9 @@
+ all: $(MAN1)
+
+ install: $(MAN1)
+- mkdir -p $(prefix)/bin $(prefix)/man/man1
+- cp $(BIN) $(prefix)/bin/
+- cp $(MAN1) $(prefix)/man/man1
++ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
++ cp $(BIN) $(DESTDIR)$(bindir)
++ cp $(MAN1) $(DESTDIR)$(mandir)/man1
+
+ clean:
+ rm -f *.1 *.txt *.ps *.pdf *.html
diff --git a/testing/ucspi-tcp/APKBUILD b/testing/ucspi-tcp/APKBUILD
new file mode 100644
index 000000000..4b854eb01
--- /dev/null
+++ b/testing/ucspi-tcp/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+
+pkgname=ucspi-tcp
+pkgver=0.88
+pkgrel=1
+pkgdesc="Easy-to-use command-line tools for building TCP client-server applications."
+url="http://cr.yp.to/ucspi-tcp.html"
+arch="all"
+license="public-domain"
+depends=""
+makedepends=""
+install=
+subpackages=""
+source="http://cr.yp.to/$pkgname/$pkgname-$pkgver.tar.gz
+ ucspi-tcp-0.88.a_record.patch
+ ucspi-tcp-0.88.errno.patch
+ "
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch;
+ do
+ msg "Applying $i"
+ patch -p1 -i $i || return 1
+ done
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ echo "${CC:-"gcc"} ${CFLAGS}" > conf-cc
+ echo "${CC:-"gcc"} ${LDFLAGS}" > conf-ld
+ echo "/usr" > conf-home
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ mkdir -p "$pkgdir"/usr/bin
+ for f in tcpserver tcprules tcprulescheck argv0 recordio tcpclient \
+ *\@ tcpcat mconnect mconnect-io addcr delcr fixcrio \
+ rblsmtpd; do
+ cp $f "$pkgdir"/usr/bin/$f
+ done
+}
+
+md5sums="39b619147db54687c4a583a7a94c9163 ucspi-tcp-0.88.tar.gz
+554ec0eb60f619667efde3fb5325310d ucspi-tcp-0.88.a_record.patch
+759a11fafff188d9580be6498a028095 ucspi-tcp-0.88.errno.patch"
diff --git a/testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch b/testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch
new file mode 100644
index 000000000..903125eaa
--- /dev/null
+++ b/testing/ucspi-tcp/ucspi-tcp-0.88.a_record.patch
@@ -0,0 +1,64 @@
+diff -ruN --exclude conf-* ucspi-tcp-0.88/rblsmtpd.c ucspi-tcp-0.88.fix/rblsmtpd.c
+--- ucspi-tcp-0.88/rblsmtpd.c Sat Mar 18 10:18:42 2000
++++ ucspi-tcp-0.88.fix/rblsmtpd.c Wed Aug 9 16:42:33 2000
+@@ -60,16 +60,54 @@
+
+ void rbl(char *base)
+ {
++ int i;
++ char *altreply = 0;
+ if (decision) return;
+ if (!stralloc_copy(&tmp,&ip_reverse)) nomem();
++ i = str_chr(base, ':');
++ if (base[i]) {
++ base[i] = 0;
++ altreply = base+i+1;
++ }
+ if (!stralloc_cats(&tmp,base)) nomem();
+- if (dns_txt(&text,&tmp) == -1) {
+- flagmustnotbounce = 1;
+- if (flagfailclosed) {
+- if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
+- decision = 2;
++ if (altreply) {
++ if (dns_ip4(&text,&tmp) == -1) {
++ flagmustnotbounce = 1;
++ if (flagfailclosed) {
++ if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
++ decision = 2;
++ }
++ return;
++ }
++ if (text.len) {
++ if(!stralloc_copys(&text, "")) nomem();
++ while(*altreply) {
++ char *x;
++ i = str_chr(altreply, '%');
++ if(!stralloc_catb(&text, altreply, i)) nomem();
++ if(altreply[i] &&
++ altreply[i+1]=='I' &&
++ altreply[i+2]=='P' &&
++ altreply[i+3]=='%') {
++ if(!stralloc_catb(&text, ip_env, str_len(ip_env))) nomem();
++ altreply+=i+4;
++ } else if(altreply[i]) {
++ if(!stralloc_cats(&text, "%")) nomem();
++ altreply+=i+1;
++ } else {
++ altreply+=i;
++ }
++ }
++ }
++ } else {
++ if (dns_txt(&text,&tmp) == -1) {
++ flagmustnotbounce = 1;
++ if (flagfailclosed) {
++ if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
++ decision = 2;
++ }
++ return;
+ }
+- return;
+ }
+ if (text.len)
+ if (flagrblbounce)
diff --git a/testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch b/testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch
new file mode 100644
index 000000000..7654c783a
--- /dev/null
+++ b/testing/ucspi-tcp/ucspi-tcp-0.88.errno.patch
@@ -0,0 +1,12 @@
+diff -u ucspi-tcp-0.88.old/error.h ucspi-tcp-0.88/error.h
+--- ucspi-tcp-0.88.old/error.h 2000-03-18 09:18:20.000000000 -0600
++++ ucspi-tcp-0.88/error.h 2003-01-08 13:39:12.000000000 -0600
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
diff --git a/testing/uget/APKBUILD b/testing/uget/APKBUILD
new file mode 100644
index 000000000..d3eb1092f
--- /dev/null
+++ b/testing/uget/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=uget
+pkgver=1.7.6
+pkgrel=0
+pkgdesc="Download manager using GTK+ and libcurl"
+url="http://urlget.sourceforge.net/"
+arch="all"
+license="LGPLv2+"
+depends=
+depends_dev="gstreamer-dev gtk+-dev curl-dev libnotify-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/project/urlget/uget%20%28developing%29/$pkgver/uget-$pkgver.tar.gz"
+
+_builddir="$srcdir"/uget-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="ca3218d768c74fb16b89513b75409ab2 uget-1.7.6.tar.gz"
diff --git a/testing/unionfs-fuse/APKBUILD b/testing/unionfs-fuse/APKBUILD
new file mode 100644
index 000000000..93e5c00bc
--- /dev/null
+++ b/testing/unionfs-fuse/APKBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Michael Zhou <zhoumichaely@gmail.com>
+pkgname=unionfs-fuse
+pkgver=0.24
+pkgrel=0
+pkgdesc="Union Filesystem in Userspace"
+url="http://podgorny.cz/moin/UnionFsFuse"
+arch="all"
+license="GPL"
+depends=""
+makedepends="fuse-dev libiconv-dev"
+subpackages="${pkgname}-doc"
+source="http://podgorny.cz/unionfs-fuse/releases/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/man/man8/
+ make DESTDIR="$pkgdir" PREFIX=/usr install || return 1
+}
+md5sums="ab00f252c55a9a7252fca13a53260bf5 unionfs-fuse-0.24.tar.bz2"
diff --git a/testing/upstart/APKBUILD b/testing/upstart/APKBUILD
new file mode 100644
index 000000000..4aea05012
--- /dev/null
+++ b/testing/upstart/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=upstart
+pkgver=0.6.7
+pkgrel=1
+pkgdesc="event-based init system"
+url="http://upstart.ubuntu.com"
+arch="all"
+license="GPL"
+depends=
+depends_dev="libnih-dev"
+makedepends="$depends_dev"
+install="$pkgname.post-deinstall $pkgname.post-upgrade"
+subpackages="$pkgname-doc"
+source="http://upstart.ubuntu.com/download/${pkgver%.*}/upstart-${pkgver}.tar.gz"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --localstatedir=/var || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="37740f81b6d12a53072603fadee451c9 upstart-0.6.7.tar.gz"
diff --git a/testing/upstart/upstart.post-deinstall b/testing/upstart/upstart.post-deinstall
new file mode 100644
index 000000000..99b57c463
--- /dev/null
+++ b/testing/upstart/upstart.post-deinstall
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+busybox --install -s
diff --git a/testing/upstart/upstart.post-upgrade b/testing/upstart/upstart.post-upgrade
new file mode 100644
index 000000000..99b57c463
--- /dev/null
+++ b/testing/upstart/upstart.post-upgrade
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+busybox --install -s
diff --git a/testing/usb-modeswitch/APKBUILD b/testing/usb-modeswitch/APKBUILD
new file mode 100644
index 000000000..b237e86c5
--- /dev/null
+++ b/testing/usb-modeswitch/APKBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=usb-modeswitch
+pkgver=1.1.7
+pkgrel=2
+_pkgdata=20110227
+pkgdesc="A mode switching tool for controlling flip flop (multiple device) USB gear"
+url="http://www.draisberghof.de/usb_modeswitch/"
+arch="all"
+license="GPL"
+depends="tcl"
+makedepends="libusb-compat-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://www.draisberghof.de/usb_modeswitch/${pkgname}-${pkgver}.tar.bz2
+ http://www.draisberghof.de/usb_modeswitch/${pkgname}-data-${_pkgdata}.tar.bz2
+ usb_modeswitch.setup
+ Makefile.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ mkdir -p $pkgdir/lib/udev/usb_modeswitch || return 1
+ mkdir -p $pkgdir/etc || return 1
+ mkdir -p $pkgdir/usr/share/man/man1 || return 1
+ make clean || return 1
+ sed -i -e 's/--mode=/-m/' Makefile || return 1
+
+ cd ../${pkgname}-data-${_pkgdata}
+# sed -i -e 's%install -m644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*%cp -R $(PREFIX)/share/usb_modeswitch/* ./usb_modeswitch.d/%' Makefile || return 1
+ sed -i -e 's/--mode=/-m/' Makefile || return 1
+ patch -p1 < ../Makefile.patch
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ # adjusting the tcl script location
+ # mv ${pkgdir}/lib/udev/usb_modeswitch/usb_modeswitch.tcl \
+ # ${pkgdir}/lib/udev/usb_modeswitch.tcl || return 1
+ # rmdir ${pkgdir}/lib/udev/usb_modeswitch || return 1
+ # mv ${pkgdir}/lib/udev/usb_modeswitch.tcl \
+ # ${pkgdir}/lib/udev/usb_modeswitch || return 1
+
+ # installing data
+ cd $srcdir/usb-modeswitch-data-${_pkgdata} || return 1
+ make DESTDIR=$pkgdir install || return 1
+ # installing config
+ cp $srcdir/usb_modeswitch.setup $pkgdir/etc/ || return 1
+}
+
+md5sums="b75e42b7b2d30e9d4cbd5c159f925247 usb-modeswitch-1.1.7.tar.bz2
+2f5e5bfa21a97b705a22f95bec367793 usb-modeswitch-data-20110227.tar.bz2
+9a25756669937ac86774bb55733f09cd usb_modeswitch.setup
+84de2517de202c22801b678f49a07e37 Makefile.patch"
diff --git a/testing/usb-modeswitch/Makefile.patch b/testing/usb-modeswitch/Makefile.patch
new file mode 100644
index 000000000..d7f526aa1
--- /dev/null
+++ b/testing/usb-modeswitch/Makefile.patch
@@ -0,0 +1,16 @@
+--- a/Makefile
++++ b/Makefile
+@@ -21,11 +21,11 @@
+ install -D -m644 40-usb_modeswitch.rules $(RULESDIR)/40-usb_modeswitch.rules
+
+ db-install:
+- install -m644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
++ cp ./usb_modeswitch.d/* $(PREFIX)/share/usb_modeswitch
+
+ db-install-packed:
+ cd ./usb_modeswitch.d; tar -czf ../configPack.tar.gz *
+- install -m644 -t $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
++ install -m644 $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
+ rm -f ./configPack.tar.gz
+
+
diff --git a/testing/usb-modeswitch/usb_modeswitch.setup b/testing/usb-modeswitch/usb_modeswitch.setup
new file mode 100644
index 000000000..a86ef2a60
--- /dev/null
+++ b/testing/usb-modeswitch/usb_modeswitch.setup
@@ -0,0 +1,1696 @@
+# usb_modeswitch.setup
+#
+# Last modified: 2010-04-18
+#
+# Collection of configurations for usb_modeswitch, a mode switching
+# tool for controlling flip flop (multiple mode) USB devices
+#
+# Detailed instructions and a friendly forum on the homepage:
+# http://www.draisberghof.de/usb_modeswitch
+#
+# You may want to check for a newer version of this file at:
+# http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.setup
+
+
+#####################################################################
+# Important! This file is now just a reference! Use the data package!
+#####################################################################
+#
+# If your device is on the "Supported Hardware" list or your USB ID
+# is contained in this file, rather use the latest release of
+# USB_ModeSwitch (automatic handling) and the latest 'database'; see
+# home page!
+#
+####################################################################
+
+
+# In order to activate a device included here, just remove the comment
+# signs (";") from the respective entry.
+#
+# It might be preferable to copy device information to a different
+# file, to avoid possible conflicts by activating multiple entries.
+#
+# The actual entries are further down, after the command reference.
+
+
+# For custom settings:
+# Numbers can be decimal or hexadecimal, MessageStrings MUST be
+# hexadecimal without prepended "0x". Digits 9-16 in the known
+# MessageStrings are arbitrary; I set them to "12345678"
+
+# What it all means (short command line flags appended):
+#
+#
+# * DefaultVendor -v <hex number>
+# * DefaultProduct -p <hex number>
+#
+# This is the ID the USB device shows after having been plugged in.
+# The program needs this; if not found -> no action.
+#
+#
+# * TargetVendor -V <hex number>
+# * TargetProduct -P <hex number>
+#
+# These are the IDs of the USB device after successful mode switching.
+# They are optional, but I recommend to provide them for better analysis.
+# You definitely need them if you enable CheckSuccess (see below)
+#
+#
+# * TargetProductList (file only) <comma separated hex strings>
+#
+# Like TargetProduct, but more than one possibility. Only used in automated
+# config files (in /etc/usb_modeswitch.d).
+#
+#
+# * TargetClass -C <hex number>
+#
+# Some weird devices don't change IDs. They only switch the device class.
+# If the device has the target class -> no action (and vice versa)
+#
+#
+# * MessageEndpoint -m <hex number>
+#
+# A kind of address inside the interface to which the "message"
+# (the sequence that does the actual switching) is directed.
+# Starting from version 0.9.7 the MessageEndpoint is autodetected
+# if not given
+#
+#
+# * MessageContent -M <hex string>
+#
+# A hex string containing the "message" sequence; it will be
+# sent as a USB bulk transfer.
+#
+#
+# * ResponseEndpoint -r <hex number>
+# * NeedResponse <0/1> -n
+#
+# Some devices were reported to require receiving the response of the
+# bulk transfer to do the switching properly. Usually not needed.
+# Starting from version 1.0.0 the ResponseEndpoint is autodetected
+# if not given
+#
+#
+# * DetachStorageOnly <0/1> -d
+#
+# Some devices just need to be detached from the usb-storage
+# driver to initiate the mode switching. Using this feature
+# instead of removing the whole usbstorage module keeps other
+# storage devices working.
+#
+#
+# * HuaweiMode <0/1> -H
+#
+# Some Huawei devices can be switched by a special control
+# message.
+#
+#
+# * SierraMode <0/1> -S
+#
+# Some Sierra devices can be switched by a special control
+# message.
+#
+#
+# * SonyMode <0/1> -O
+#
+# Some Sony-Ericsson devices can be switched by a special control
+# message. This is experimental and might not have a stable result
+#
+#
+# * ResetUSB <0/1> -R
+#
+# Some devices need a rougher treatment. If the switching seems
+# to do something (run udevmonitor), but your system does not reflect
+# it, try this somewhat brutal method to do a reset after switching.
+# Mind that if your device switched OK before, this will probably set
+# it back to storage mode ...
+#
+#
+# * Interface -i <hex number>
+# * Configuration -u <hex number>
+# * AltSetting -a <hex number>
+#
+# More USB parameter to help with tricky devices and for doing lots
+# of cruel experiments ...
+#
+## Note:
+## AltSetting/Configuration changes and ResetUSB are executed after all
+## other steps and can be combined or used on their own (e.g. a reset
+## might have the same effect as a manual replug)
+#
+#
+# * InquireDevice <0|1> -I (disables inquiry)
+#
+# The standard since 1.0.0 is to do a SCSI inquiry on the default device
+# before other actions. This might be a future way to identify a device
+# without ambiguities. If it causes trouble with your device, just disable.
+#
+#
+# * CheckSuccess -s <number>
+#
+# Check continuously if the switch succeeded for max <number> seconds.
+# First, an interface access test: most devices vanish after
+# switching and can't be accessed anymore.
+# Second, a recount of target devices: one more than at the initial
+# count, at the same bus with a higher device number -> device
+# switched fine.
+# It's safe to give a higher value than needed; checking stops as
+# soon as the target device is found
+#
+#
+# * NoDriverLoading <0|1> (no command line parameter)
+#
+# The binary tells the wrapper script NOT to check for and initiate
+# binding of the serial driver after switching.
+# Mostly useful for non-modem devices
+#
+#
+# -> All other entries are just ignored <-
+
+# Additional command line flags:
+#
+# Verbose output -W
+# No output at all -q
+# Other config file -c <file>
+
+# For filling in all this information for an unknown device,
+# see instructions and links on the homepage:
+# http://www.draisberghof.de/usb_modeswitch
+#
+# If you find working codes and configurations, please contribute
+# them!
+
+
+;CheckSuccess=2
+
+#######################################################
+# Option GlobeSurfer Icon (aka "Vodafone EasyBox")
+#
+# The message SHOULD be the same for all Option devices
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x0af0
+;TargetProduct= 0x6600
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+
+#######################################################
+# Option GlobeSurfer Icon 7.2
+#
+# Contributor: The Pharscape Forum
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x0af0
+;TargetProduct= 0x6901
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+
+########################################################
+# Option GlobeTrotter GT MAX 3.6 (aka "T-Mobile Web'n'walk Card Compact II")
+#
+# Contributor: Bernd Holzmüller
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x0af0
+;TargetProduct= 0x6600
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x84
+
+;ResponseNeeded=1
+
+
+########################################################
+# Option GlobeTrotter GT MAX "7.2 Ready"
+#
+# Contributors: Lucas Benedicic, Morgwai Kotarbinski
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x0af0
+;TargetProduct= 0x6701
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+
+########################################################
+# Option GlobeTrotter EXPRESS 7.2 (aka "T-Mobile wnw Express II")
+#
+# Contributor: Fridtjof Busse
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x0af0
+;TargetProduct= 0x6701
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+# Response reading needed according to one (1) report
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x84
+
+;ResponseNeeded=1
+
+
+#######################################################
+# Option GlobeSurfer Icon 7.2, new firmware (HSO driver)
+#
+# Vendor/ProductID don't change when switching, only the device
+# class does. Most new Option devices work with this. Just adapt IDs!
+# HSO driver support is available at Pharscape (www.pharscape.org)
+#
+# Contributor: Paul Hardwick
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0x6911
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000601000000000000000000000000000000"
+
+
+########################################################
+# Option iCON 210
+# PROLiNK PHS100 (various looks)
+# Hyundai Mobile MB-810
+#
+# One report of switching with DetachStorageOnly. Needs at least
+# a second to settle before binding to usbserial
+#
+# Contributor: wahlm, Peter Kraker, Pakdhetimin Sekum
+
+;DefaultVendor= 0x1e0e
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1e0e
+;TargetProduct= 0x9000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="555342431234567800000000000006bd000000020000000000000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x01
+
+;ResponseNeeded=1
+
+
+#######################################################
+# Option iCON 225 HSDPA
+#
+# New Firmware. HSO driver support is available at Pharscape (www.pharscape.org)
+#
+# Contributor: Matti Viljanen
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0x6971
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="555342431223456780100000080000601000000000000000000000000000000"
+
+
+#######################################################
+# Option GlobeTrotter HSUPA Modem (aka "T-Mobile Web'n'walk Card Compact III')
+#
+# New Firmware. HSO driver support is available at Pharscape (www.pharscape.org)
+#
+# Contributor: Gerold Gruber
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0x7011
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243785634120100000080000601000000000000000000000000000000"
+
+
+######################################################
+# Option iCON 401
+#
+# HSO driver
+#
+# Contributor: Vincent Teoh
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0x7401
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243785634120100000080000601000000000000000000000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x81
+
+;ResponseNeeded=1
+
+
+########################################################
+# Vodafone K3760 (made by Option, HSO driver)
+#
+# Contributor: The Solutor
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0x7501
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243785634120100000080000601000000000000000000000000000000"
+
+
+########################################################
+# AT&T USBConnect Quicksilver (made by Option, HSO driver)
+#
+# Contributor: sissie from Bullteam
+
+;DefaultVendor= 0x0af0
+;DefaultProduct= 0xd033
+
+;TargetClass= 0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243785634120100000080000601000000000000000000000000000000"
+
+
+########################################################
+# Huawei E220 (aka "Vodafone EasyBox II", aka "T-Mobile wnw Box Micro")
+# Huawei E230
+# Huawei E270
+# Huawei E870
+# and probably most other Huawei devices (just adapt product ID)
+#
+# Two options: 1. removal of "usb-storage" 2. the special control
+# message found by Miroslav Bobovsky
+#
+# Contributor: Hans Kurent, Denis Sutter, Vincent Teoh
+
+;DefaultVendor= 0x12d1;
+;DefaultProduct= 0x1003
+
+;TargetClass= 0xff
+
+# choose one of these:
+;DetachStorageOnly=1
+;HuaweiMode=1
+
+
+########################################################
+# Huawei E169
+#
+# Contributor: Dale Lane
+
+;DefaultVendor= 0x12d1;
+;DefaultProduct= 0x1001
+
+;TargetClass= 0xff
+
+# choose one of these:
+;DetachStorageOnly=1
+;HuaweiMode=1
+
+
+########################################################
+# Huawei E180
+#
+# Contributor: Tom Dawahare
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1414
+
+;TargetClass= 0xff
+
+# choose one of these:
+;DetachStorageOnly=1
+;HuaweiMode=1
+
+
+########################################################
+# Huawei E630
+#
+# There seem to be modem-only variants around - no storage,
+# no switching
+#
+# Contributor: Joakim Wenrgren
+
+;DefaultVendor= 0x1033
+;DefaultProduct= 0x0035
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x1003
+
+# choose one of these:
+;HuaweiMode=1
+;DetachStorageOnly=1
+
+
+########################################################
+# ZTE MF620 (aka "Onda MH600HS")
+#
+# Probably works with DetachStorageOnly too
+#
+# Contributor: Flávio Moringa
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0001
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x04
+
+;MessageContent="55534243123456780000000000000600000000000000000000000000000000"
+
+
+########################################################
+# ZTE MF622 (aka "Onda MDC502HS"), MF100 and others
+#
+# Contributor: andylog
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0002
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x04
+
+;MessageContent="55534243f8f993882000000080000a85010101180101010101000000000000"
+
+
+########################################################
+# ZTE MF628
+#
+# Captured with "usbmon". Has a micro SD slot which can be
+# activated alternatively
+#
+# Contributor: Alvaro Lopes <alvieboy at alvie dot com>
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+# To modem mode:
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0015
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
+
+# To SD slot mode:
+
+;TargetVendor= 0x05c6
+;TargetProduct= 0x2001
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="55534243123456782000000080000a86010101180101010101000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x07
+
+;ResponseNeeded=1
+
+
+########################################################
+# ZTE MF622 (aka "Onda MDC502HS")
+# ZTE MF626
+# ZTE MF628+ (tested version from Telia / Sweden)
+# ZTE MF633
+# ZTE MF636 (aka "Telstra / BigPond 7.2 Mobile Card")
+# ZTE MF637
+#
+# Contributor: Joakim Wennergren and others
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0031
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
+
+
+########################################################
+# ZTE MF638 (aka "Onda MDC525UP")
+#
+# Contributor: andylog
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0037
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
+
+
+########################################################
+# ZTE AC8710
+# ZTE AC2726
+# and others
+#
+# Many new ZTE devices use this sequence. There are
+# several ID combinations; check your default
+#
+# Contributor: Michael Khurtsiya, Amit Pundir and others
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0xfff5
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0xffff
+
+# No. 2
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0xfff6
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0xfff1
+
+# No. 3
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0xfff5
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0xfff1
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
+
+
+########################################################
+# ZTE AC2710 (EVDO)
+#
+# Contributor: Wasim Baig
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0xfff5
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0xffff
+
+;MessageContent="5553424312345678c00000008000069f010000000000000000000000000000"
+
+# Just for information: try it with the message from the AC8710 ...
+
+
+########################################################
+# ZTE 6535-Z
+#
+# Contributor: David Taillandier
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0052
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
+
+
+########################################################
+# ONDA MT503HS (most likely a ZTE model)
+#
+# Contributor: Lucio Asnaghi a.k.a. kRAkEn/gORe
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0002
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="55534243b0c8dc812000000080000a85010101180101010101000000000000"
+
+
+########################################################
+# ONDA MT505UP (most likely a ZTE model)
+#
+# Contributor: Alex Scortegagna
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0002
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x03
+
+;MessageContent="55534243123456780000010080000a28000000001c00002000000000000000"
+
+
+########################################################
+# Novatel Wireless Ovation MC950D HSUPA
+# Novatel Wireless Merlin XU950D
+# Novatel Wireless Ovation 930D
+#
+# Contributor: Razvan Dragomirescu, Mike Kirk
+
+;DefaultVendor= 0x1410
+;DefaultProduct= 0x5010
+
+;TargetVendor= 0x1410
+;TargetProduct= 0x4400
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x09
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Novatel U727 USB modem
+#
+# Modem only versions (no switching required) are around.
+#
+# Contributor: Chris Thielen
+
+;DefaultVendor= 0x1410
+;DefaultProduct= 0x5010
+
+;TargetVendor= 0x1410
+;TargetProduct= 0x4100
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Novatel MC990D
+#
+# Contributor: Joakim Wennergren
+
+;DefaultVendor= 0x1410
+;DefaultProduct= 0x5020
+
+;Interface= 5
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Novatel U760 USB modem
+#
+# Contributor: Richard Laager
+
+;DefaultVendor= 0x1410
+;DefaultProduct= 0x5030
+
+;TargetVendor= 0x1410
+;TargetProduct= 0x6000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Alcatel One Touch X020 (aka OT-X020, aka MBD-100HU, aka Nuton 3.5G), works with Emobile D11LC
+# Alcatel One Touch X030 (aka OT-X030, aka Nuton NT36HD)
+#
+# Contributor: Aleksandar Samardzic, Marcelo Fernandez
+
+;DefaultVendor= 0x1c9e
+;DefaultProduct= 0x1001
+
+;TargetVendor= 0x1c9e
+;TargetProduct= 0x6061
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
+
+
+########################################################
+# Alcatel X200/X060S
+
+;DefaultVendor= 0x1bbb
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1bbb
+;TargetProduct= 0x0000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
+
+
+########################################################
+# AnyDATA ADU-500A, ADU-510A, ADU-510L, ADU-520A
+#
+# This ID gets an "Option" treatment by newer kernels.
+# Use module option "option_zero_cd=2" with usb-storage.
+# A kernel patch to fix the problem is pending
+#
+# Contributor: Vladimir Poluektov, Gabriel Smolar
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x16d5
+;TargetProduct= 0x6502
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# BandLuxe C120
+#
+# Reportedly needs several switch calls in a certain order. See
+# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=71
+# This might be a case to try the new ResetUSB function
+#
+# Contributor: Alexander Czigler
+
+;DefaultVendor= 0x1a8d
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x1a8d
+;TargetProduct= 0x1002
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456781200000080000603000000020000000000000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x82
+
+;ResponseNeeded=1
+
+
+########################################################
+# Solomon S3Gm-660
+#
+# Same notes apply as with the BandLuxe C120 above
+#
+# Contributor: Alexander Czigler
+
+;DefaultVendor= 0x1dd6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x1dd6
+;TargetProduct= 0x1002
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456781200000080000603000000020000000000000000000000"
+
+# only for reference and 0.x versions
+# ResponseEndpoint=0x82
+
+;ResponseNeeded=1
+
+
+########################################################
+# C-motech D-50 (aka "CDU-680")
+#
+# Interesting notes about the device in the forum post at
+# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=69
+#
+# Contributor: Alexander Czigler
+
+;DefaultVendor= 0x16d8
+;DefaultProduct= 0x6803
+
+;TargetVendor= 0x16d8
+;TargetProduct= 0x680a
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x07
+
+;MessageContent="555342431234567824000000800008ff524445564348470000000000000000"
+
+
+########################################################
+# C-motech CGU-628 (aka "Franklin Wireless CGU-628A" aka "4G Systems XS Stick W12")
+#
+# Contributor: Mathias Picker
+
+;DefaultVendor= 0x16d8
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x16d8
+;TargetProduct= 0x6006
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x09
+
+;MessageContent="55534243d85dd88524000000800008ff524445564348470000000000000000"
+
+
+########################################################
+# Toshiba G450
+#
+# Contributor: Mijail Anton
+
+;DefaultVendor= 0x0930
+;DefaultProduct= 0x0d46
+
+;TargetVendor= 0x0930
+;TargetProduct= 0x0d45
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# UTStarcom UM175 (distributor "Alltel")
+#
+# Contributor: Mark A. Ziesemer
+
+;DefaultVendor= 0x106c
+;DefaultProduct= 0x3b03
+
+;TargetVendor= 0x106c
+;TargetProduct= 0x3715
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="555342431234567824000000800008ff024445564348470000000000000000"
+
+
+########################################################
+# Hummer DTM5731
+#
+# Contributor: "paul"
+
+;DefaultVendor= 0x1ab7
+;DefaultProduct= 0x5700
+
+;TargetVendor= 0x1ab7
+;TargetProduct= 0x5731
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x07
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# A-Link 3GU
+#
+# Contributor: A-Link Europe Ltd.
+
+;DefaultVendor= 0x1e0e
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1e0e
+;TargetProduct= 0x9200
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Sierra Wireless Compass 597
+#
+# Contributor: Vincent Teoh
+
+;DefaultVendor= 0x1199
+;DefaultProduct= 0x0fff
+
+;TargetVendor= 0x1199
+;TargetProduct= 0x0023
+
+;SierraMode=1
+
+
+########################################################
+# Sierra Wireless AirCard 881U (most likely 880U too)
+#
+# Contributor: Vincent Teoh
+
+;DefaultVendor= 0x1199
+;DefaultProduct= 0x0fff
+
+;TargetVendor= 0x1199
+;TargetProduct= 0x6856
+
+;SierraMode=1
+
+
+########################################################
+# Sony Ericsson MD400
+#
+# Special procedure, takes around 25 secs. on the whole
+
+;DefaultVendor= 0x0fce
+;DefaultProduct= 0xd0e1
+
+;TargetClass= 0x02
+
+;SonyMode=1
+;Configuration=2
+
+
+########################################################
+# LG LDU-1900D EV-DO (Rev. A)
+#
+# Recommended init command: ATE0V1&D2&C1S0=0
+#
+# Contributor: Jérôme Oufella
+
+;DefaultVendor= 0x1004
+;DefaultProduct= 0x1000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="55534243123456780000000000000aff554d53434847000000000000000000"
+
+
+########################################################
+# Samsung SGH-Z810 USB (with microSD card)
+#
+# This ID gets a wrong "Option" treatment by newer kernels
+# between 2.6.29 and 2.6.32
+# Use module option "option_zero_cd=2" with usb-storage.
+# A kernel patch to fix the problem is pending
+#
+# Contributor: A Friend
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x04e8
+;TargetProduct= 0x6601
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000616000000000000000000000000000000"
+
+
+########################################################
+# MobiData MBD-200HU
+#
+# Contributor: Stefan Olejnik
+
+;DefaultVendor= 0x1c9e
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1c9e
+;TargetProduct= 0x9000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
+
+
+########################################################
+# ST Mobile Connect HSUPA USB Modem
+#
+# Use /dev/ttyUSB2 for connecting
+#
+# Contributor: Vincent Teoh
+
+;DefaultVendor= 0x1c9e
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1c9e
+;TargetProduct= 0x9063
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
+
+
+########################################################
+# MyWave SW006 Sport Phone/Modem Combination
+#
+# Has a card reader too, working fine
+#
+# Contributor: Aaron Guidazzi
+
+;DefaultVendor= 0x1c9e
+;DefaultProduct= 0x9200
+
+;TargetVendor= 0x1c9e
+;TargetProduct= 0x9202
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x03
+
+;MessageContent="55534243123456780000000000000606f50402527000000000000000000000"
+
+
+########################################################
+# Cricket A600
+#
+# Switches to ACM device. Might need a ResetUSB after switching - or not
+#
+# Contributor: Jeffrey Hoogland
+
+;DefaultVendor= 0x1f28
+;DefaultProduct= 0x0021
+
+;TargetVendor= 0x1f28
+;TargetProduct= 0x0020
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x08
+
+;MessageContent="555342431234567824000000800108df200000000000000000000000000000"
+
+# Afterwards (optional): "usb_modeswitch -v 0x1f28 -p 0x0020 -R"
+
+
+########################################################
+# EpiValley SEC-7089 (featured by Alegro and Starcomms / iZAP)
+#
+# Contributor: Chris Wright
+
+;DefaultVendor= 0x1b7d
+;DefaultProduct= 0x0700
+
+;TargetVendor= 0x1b7d
+;TargetProduct= 0x0001
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x07
+
+;MessageContent="555342431234567824000000800008FF05B112AEE102000000000000000000"
+
+
+########################################################
+# Samsung U209
+#
+# Has a modem and a storage device after switching
+#
+# Contributor: Arif Ahmed
+
+;DefaultVendor= 0x04e8
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x04e8
+;TargetProduct= 0x6601
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243123456780000000000000616000000000000000000000000000000"
+
+
+########################################################
+# Huawei E270+ (HSPA+ modem)
+# Huawei E1762
+# Huawei E1820
+#
+# Contributor: Paranoid Paranoia
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1446
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x14ac
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+
+########################################################
+# Huawei E1550
+# Huawei E1750
+#
+# Contributor: Anders Blomdell, Ahmed Soliman
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1446
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x1001
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+
+########################################################
+# ZTE K3520-Z
+#
+# Contributor: Paul McDermott
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0055
+
+# only for reference
+# MessageEndpoint=0x09
+
+;MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
+
+
+########################################################
+# MobiData MBD-200HU (aka 4G XS Stick W10/W14, aka Micromax MMX 300G,
+# aka ChinaBird CBCPL68)
+#
+# Contributor: Chris
+
+;DefaultVendor= 0x1c9e
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x1c9e
+;TargetProduct= 0x9603
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
+
+
+########################################################
+# D-Link DWM-162-U5, Micromax MMX 300c
+#
+# Contributor: Zhang Le
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x2001
+
+;TargetVendor= 0x1e0e
+;TargetProductList="ce16,cefe"
+
+;MessageContent="55534243e0c26a85000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Novatel MC760 3G
+#
+# Contributor: Matt Roberds
+
+;DefaultVendor= 0x1410
+;DefaultProduct= 0x5031
+
+;TargetVendor= 0x1410
+;TargetProduct= 0x6002
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# ZTE MF110
+#
+# Contributor: Moritz Grosse-Wentrup
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x0053
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0031
+
+;MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
+
+
+########################################################
+# Philips TalkTalk (NXP Semiconductors "Dragonfly")
+#
+
+;DefaultVendor= 0x0471
+;DefaultProduct= 0x1237
+
+;TargetVendor= 0x0471
+;TargetProduct= 0x1234
+
+;MessageContent="5553424312345678000000000000061b000000030000000000000000000000"
+
+
+########################################################
+# HuaXing E600 (NXP Semiconductors "Dragonfly")
+#
+# Contributor: Emfox Zhou
+
+;DefaultVendor= 0x0471
+;DefaultProduct= 0x1237
+
+;TargetVendor= 0x0471
+;TargetProduct= 0x1206
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+;Configuration=2
+
+
+########################################################
+# ZTE K3565
+#
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x2000
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0063
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Motorola 802.11 bg WLAN (TER/GUSB3-E)
+#
+# Contributor: Prashad Prashant
+
+;DefaultVendor= 0x148f
+;DefaultProduct= 0x2578
+
+;TargetVendor= 0x148f
+;TargetProduct= 0x9021
+
+;MessageContent="55534243908ecd89000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Huawei E1612
+#
+# Contributor: Genar Codina
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1446
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x1406
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+
+########################################################
+# Huawei E1690
+# Huawei E1692
+# Huawei E1762
+#
+# Contributor: Carolin Latze and others
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1446
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x140c
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+
+########################################################
+# C-motech CHU-629S
+#
+
+;DefaultVendor= 0x16d8
+;DefaultProduct= 0x700a
+
+;TargetClass=0xff
+
+;MessageContent="55534243123456782400000080000dfe524445564348473d4e444953000000"
+
+
+########################################################
+# Sagem F@ST 9520-35-GLR
+#
+# Contributor: Yaroslav Levandovskiy
+
+;DefaultVendor= 0x1076
+;DefaultProduct= 0x7f40
+
+;TargetVendor= 0x1076
+;TargetProduct= 0x7f00
+
+# Since version 1.0.6 !!
+;GCTMode=1
+
+
+########################################################
+# Nokia CS-15
+#
+# Contributor: Antti Turunen
+
+;DefaultVendor= 0x0421
+;DefaultProduct= 0x0610
+
+;TargetVendor= 0x0421
+;TargetProduct= 0x0612
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Huawei K3765
+#
+# Contributor: Felix Schwarz
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1520
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x1465
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+########################################################
+# Huawei K4505
+#
+# Contributor: Nikolaos Koutsianas
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x1521
+
+;TargetVendor= 0x12d1
+;TargetProduct= 0x1464
+
+;MessageContent="55534243123456780000000000000011060000000000000000000000000000"
+
+
+#########################################
+# Vodafone MD950 (Wisue Technology)
+#
+# Contributor: Bob Williams
+
+;DefaultVendor= 0x0471
+;DefaultProduct= 0x1210
+
+# The report said that giving the target IDs prevented
+# the device from switching. Got to try it out ...
+
+#TargetVendor= 0x1dbc
+#TargetProduct= 0x0005
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Siptune LM-75 ("LinuxModem")
+#
+# Contributor: Antti Turunen
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0xf000
+
+;TargetVendor= 0x05c6
+;TargetProduct= 0x9000
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Zydas ZD1211RW WLAN USB, Sphairon HomeLink 1202 (Variant 1)
+#
+# WLAN devices from Linux kernel
+
+;DefaultVendor= 0x0ace
+;DefaultProduct= 0x2011
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Zydas ZD1211RW WLAN USB, Sphairon HomeLink 1202 (Variant 2)
+#
+# WLAN devices from Linux kernel
+
+;DefaultVendor= 0x0ace
+;DefaultProduct= 0x20ff
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Vertex Wireless 100 Series
+#
+# Contributor: Reinis Danne
+
+;DefaultVendor= 0x05c6
+;DefaultProduct= 0x1000
+
+;TargetVendor= 0x1fe7
+;TargetProduct= 0x0100
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# AVM Fritz!Wlan USB Stick N
+#
+
+;DefaultVendor= 0x057c
+;DefaultProduct= 0x84ff
+
+;TargetVendor= 0x057c
+;TargetProduct= 0x8401
+
+;MessageContent="5553424312345678000000000000061b000000ff0000000000000000000000"
+
+
+########################################################
+# InfoCert Business Key (SmartCard/Reader emulation)
+#
+# Contributor: Bicio
+
+;DefaultVendor= 0x072f
+;DefaultProduct= 0x100d
+
+;TargetVendor= 0x072f
+;TargetProduct= 0x90cc
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x02
+
+;MessageContent="01b0000000000000000000000000000000000000000000000000000000000000"
+
+
+########################################################
+# UTStarcom UM185E (distributor "Alltel")
+#
+# Contributor: Jason Smith
+
+;DefaultVendor= 0x106c
+;DefaultProduct= 0x3b06
+
+;TargetVendor= 0x106c
+;TargetProduct= 0x3717
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x05
+
+;MessageContent="55534243b82e238c24000000800008ff020000000000000000000000000000
+
+
+########################################################
+# ZTE AC581
+#
+# Contributor: Alberto Maurizi
+
+;DefaultVendor= 0x19d2
+;DefaultProduct= 0x0026
+
+;TargetVendor= 0x19d2
+;TargetProduct= 0x0094
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x02
+
+;MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Huawei U7510 / U7517
+#
+# Contributor: Isaac Salgado
+
+;DefaultVendor= 0x12d1
+;DefaultProduct= 0x101e
+
+;TargetClass=0xff
+
+# only for reference and 0.x versions
+# MessageEndpoint=0x01
+
+MessageContent="55534243123456780600000080000601000000000000000000000000000000"
+
+
+########################################################
+# Beceem BCSM250
+#
+# Contributor: Alexander Gordeev
+
+;DefaultVendor= 0x198f
+;DefaultProduct=0xbccd
+
+;TargetVendor= 0x198f
+;TargetProduct= 0x0220
+
+# only for reference and 0.x versions
+# MessageEndpoint=2
+
+MessageContent="55534243f0298d8124000000800006bc626563240000000000000000000000"
+
+
+########################################################
+# LG HDM-2100 (EVDO Rev.A USB modem)
+#
+# Contributor: Jérôme Oufella
+
+;DefaultVendor= 0x1004
+;DefaultProduct=0x607f
+
+;TargetVendor= 0x1004
+;TargetProduct= 0x6114
+
+# only for reference and 0.x versions
+# MessageEndpoint=8
+
+;MessageContent="1201100102000040041014610000010200018006000100001200"
+
+
+########################################################
+# Kyocera W06K CDMA modem
+#
+# Contributor: Ying-Hung Lo
+
+;DefaultVendor= 0x0482
+;DefaultProduct=0x024d
+
+;Configuration=2
+
+
+########################################################
+# Digicom 8E4455
+#
+# Contributor: Alberto Ciampini
+
+;DefaultVendor= 0x1266
+;DefaultProduct=0x1000
+
+;TargetVendor= 0x1266
+;TargetProduct= 0x1009
+
+;NeedResponse=1
+
+# only for reference and 0.x versions
+# MessageEndpoint=1
+
+;MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
+;MessageContent2="5553424387654321000000000000061b000000020000000000000000000000"
+
+
+########################################################
+# Sony Ericsson MD300
+#
+# Contributor: Betavine Project
+
+;DefaultVendor= 0x0fce
+;DefaultProduct=0xd0cf
+
+;TargetClass=0x02
+
+;DetachStorageOnly=1
+;Configuration=3
+
+
+########################################################
+# Franklin Wireless U210
+#
+# Contributor: Adam J. Porter
+
+;DefaultVendor= 0x1fac
+;DefaultProduct=0x0130
+
+;TargetVendor= 0x1fac
+;TargetProduct= 0x0131
+
+;CheckSuccess=20
+
+;MessageContent="555342431234567824000000800108df200000000000000000000000000000"
+
+
diff --git a/testing/usbip/APKBUILD b/testing/usbip/APKBUILD
new file mode 100644
index 000000000..846a62f3c
--- /dev/null
+++ b/testing/usbip/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=usbip
+pkgver=0.1.7
+pkgrel=1
+pkgdesc="A general USB device sharing system over IP network"
+url="http://usbip.sourceforge.net/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="sysfsutils-dev automake autoconf libtool glib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver/src
+build() {
+ cd "$_builddir"
+ ./autogen.sh || return 1
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="d1094b6d4449787864f8be001639232c usbip-0.1.7.tar.gz"
diff --git a/testing/ushare/APKBUILD b/testing/ushare/APKBUILD
new file mode 100644
index 000000000..8c2fb0f84
--- /dev/null
+++ b/testing/ushare/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=ushare
+pkgver=1.1a
+pkgrel=0
+pkgdesc="A free UPnP A/V Media Server for Linux"
+url="http://ushare.geexbox.org"
+arch="all"
+license="GPL2"
+depends=
+depends_dev="pkgconfig libupnp-dev libdlna-dev ffmpeg-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://ushare.geexbox.org/releases/${pkgname}-${pkgver}.tar.bz2
+ upnp-build-fix.patch
+ ushare-config.patch
+ ushare.initd
+ ushare.confd
+ "
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+build() {
+ cd "$_builddir"
+ sed -i -e 's/cat -n/cat/' configure
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/ushare \
+ --enable-dlna \
+ --with-libdlna-dir=/usr/include/libavformat \
+ --disable-nls
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -D -m755 ../ushare.initd "$pkgdir"/etc/init.d/ushare
+ install -D -m755 ../ushare.confd "$pkgdir"/etc/conf.d/ushare
+}
+
+md5sums="5bbcdbf1ff85a9710fa3d4e82ccaa251 ushare-1.1a.tar.bz2
+32c29f9f673e8b3a3d9e7bf5e60febbc upnp-build-fix.patch
+5243475c0cebc5db49296b2f3691085b ushare-config.patch
+57b6ccaba8d17a79c6a651ad5f66cb6d ushare.initd
+28cc24dea30918ea859ed9c974f242d7 ushare.confd"
diff --git a/testing/ushare/upnp-build-fix.patch b/testing/ushare/upnp-build-fix.patch
new file mode 100644
index 000000000..c3ec37a32
--- /dev/null
+++ b/testing/ushare/upnp-build-fix.patch
@@ -0,0 +1,156 @@
+diff -wbBur ushare-1.1a/src/http.c ushare-1.1a.my/src/http.c
+--- ushare-1.1a/src/http.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.c 2010-10-29 11:13:07.000000000 +0000
+@@ -77,8 +77,7 @@
+ info->content_type = ixmlCloneDOMString (content_type);
+ }
+
+-static int
+-http_get_info (const char *filename, struct File_Info *info)
++int http_get_info (const char *filename, struct File_Info *info)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -197,8 +196,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static UpnpWebFileHandle
+-http_open (const char *filename, enum UpnpOpenFileMode mode)
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode)
+ {
+ extern struct ushare_t *ut;
+ struct upnp_entry_t *entry = NULL;
+@@ -251,8 +249,7 @@
+ return ((UpnpWebFileHandle) file);
+ }
+
+-static int
+-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ ssize_t len = -1;
+@@ -286,8 +283,7 @@
+ return len;
+ }
+
+-static int
+-http_write (UpnpWebFileHandle fh __attribute__((unused)),
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
+ char *buf __attribute__((unused)),
+ size_t buflen __attribute__((unused)))
+ {
+@@ -296,8 +292,7 @@
+ return 0;
+ }
+
+-static int
+-http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+ off_t newpos = -1;
+@@ -371,8 +366,7 @@
+ return 0;
+ }
+
+-static int
+-http_close (UpnpWebFileHandle fh)
++int http_close (UpnpWebFileHandle fh)
+ {
+ struct web_file_t *file = (struct web_file_t *) fh;
+
+@@ -402,13 +396,3 @@
+
+ return 0;
+ }
+-
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks =
+- {
+- http_get_info,
+- http_open,
+- http_read,
+- http_write,
+- http_seek,
+- http_close
+- };
+diff -wbBur ushare-1.1a/src/http.h ushare-1.1a.my/src/http.h
+--- ushare-1.1a/src/http.h 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/http.h 2010-10-29 11:13:11.000000000 +0000
+@@ -25,6 +25,13 @@
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
+-struct UpnpVirtualDirCallbacks virtual_dir_callbacks;
++int http_close (UpnpWebFileHandle fh);
++int http_write (UpnpWebFileHandle fh __attribute__((unused)),
++ char *buf __attribute__((unused)),
++ size_t buflen __attribute__((unused)));
++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin);
++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode);
++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen);
++int http_get_info (const char *filename, struct File_Info *info);
+
+ #endif /* _HTTP_H_ */
+diff -wbBur ushare-1.1a/src/ushare.c ushare-1.1a.my/src/ushare.c
+--- ushare-1.1a/src/ushare.c 2007-12-09 13:03:36.000000000 +0000
++++ ushare-1.1a.my/src/ushare.c 2010-10-29 11:17:45.000000000 +0000
+@@ -188,7 +188,7 @@
+ if (strcmp (request->DevUDN + 5, ut->udn))
+ return;
+
+- ip = request->CtrlPtIPAddr.s_addr;
++ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr;
+ ip = ntohl (ip);
+ sprintf (val, "%d.%d.%d.%d",
+ (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF);
+@@ -348,7 +348,47 @@
+
+ UpnpEnableWebserver (TRUE);
+
+- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks);
++ res = UpnpVirtualDir_set_WriteCallback(http_write);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_ReadCallback(http_read);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_OpenCallback(http_open);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_SeekCallback(http_seek);
++ if (res != UPNP_E_SUCCESS)
++ {
++ log_error (_("Cannot set virtual directory callbacks\n"));
++ free (description);
++ return -1;
++ }
++
++ res = UpnpVirtualDir_set_CloseCallback(http_close);
+ if (res != UPNP_E_SUCCESS)
+ {
+ log_error (_("Cannot set virtual directory callbacks\n"));
diff --git a/testing/ushare/ushare-config.patch b/testing/ushare/ushare-config.patch
new file mode 100644
index 000000000..d064db890
--- /dev/null
+++ b/testing/ushare/ushare-config.patch
@@ -0,0 +1,22 @@
+--- ushare-1.1a/scripts/ushare.conf 2007-12-09 07:03:36.000000000 -0600
++++ b/scripts/ushare.conf 2010-11-15 12:09:45.000000000 -0600
+@@ -31,15 +31,15 @@ USHARE_DIR=
+ USHARE_OVERRIDE_ICONV_ERR=
+
+ # Enable Web interface (yes/no)
+-ENABLE_WEB=
++USHARE_ENABLE_WEB=
+
+ # Enable Telnet control interface (yes/no)
+-ENABLE_TELNET=
++USHARE_ENABLE_TELNET=
+
+ # Use XboX 360 compatibility mode (yes/no)
+-ENABLE_XBOX=
++USHARE_ENABLE_XBOX=
+
+ # Use DLNA profile (yes/no)
+ # This is needed for PlayStation3 to work (among other devices)
+-ENABLE_DLNA=
++USHARE_ENABLE_DLNA=
+
diff --git a/testing/ushare/ushare.confd b/testing/ushare/ushare.confd
new file mode 100644
index 000000000..ef7f7c895
--- /dev/null
+++ b/testing/ushare/ushare.confd
@@ -0,0 +1,2 @@
+CONFIGFILE="/etc/ushare/ushare.conf"
+PARAMS="-f $CONFIGFILE"
diff --git a/testing/ushare/ushare.initd b/testing/ushare/ushare.initd
new file mode 100644
index 000000000..8ca03fc47
--- /dev/null
+++ b/testing/ushare/ushare.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use syslog
+}
+
+start() {
+ ebegin "Starting uShare UPnP A/V Media Server"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/ushare.pid --exec /bin/ushare \
+ -- $PARAMS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping uShare UPnP A/V Media Server"
+ start-stop-daemon --stop -quiet --pidfile /var/run/ushare.pid
+ eend $?
+}
diff --git a/testing/v8/APKBUILD b/testing/v8/APKBUILD
new file mode 100644
index 000000000..40ef6e8d8
--- /dev/null
+++ b/testing/v8/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=v8
+pkgver=3.7.7
+pkgrel=1
+pkgdesc="V8 JavaScript/ECMAScript Engine"
+url="http://www.chromium.org/"
+arch="x86 x86_64 arm"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="scons wget"
+install=""
+subpackages="$pkgname-dev"
+source="http://gsdview.appspot.com/chromium-browser-official/v8-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/v8-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+
+ v8_arch=${CARCH}
+ test ${CARCH} = x86 && v8_arch=ia32
+ test ${CARCH} = x86_64 && v8_arch=x64
+
+ msg "building for ${v8_arch}"
+
+ export LINKFLAGS="${LDFLAGS}"
+
+ scons -j$JOBS \
+ library=shared \
+ inspector=on \
+ objectprint=on \
+ console=readline \
+ soname=on \
+ arch=${v8_arch} \
+ || return 1
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/include
+ cp include/* "$pkgdir"/usr/include
+
+ mkdir -p "$pkgdir"/usr/lib
+ install -c -m755 libv8-${pkgver}.so "$pkgdir"/usr/lib/libv8-${pkgver}.so
+ ln -sf libv8-${pkgver}.so "$pkgdir"/usr/lib/libv8.so
+}
+
+md5sums="f49dee4890a3c0c35c0a2c7610c79bdf v8-3.7.7.tar.bz2"
diff --git a/testing/varnish/APKBUILD b/testing/varnish/APKBUILD
new file mode 100644
index 000000000..60dc55243
--- /dev/null
+++ b/testing/varnish/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=varnish
+pkgver=3.0.0
+pkgrel=1
+pkgdesc="High-performance HTTP accelerator"
+url="http://www.varnish-cache.org/"
+arch="all"
+license="BSD"
+depends="gcc"
+depends_dev=
+makedepends="$depends_dev pcre-dev ncurses-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
+source="http://repo.varnish-cache.org/source/varnish-$pkgver.tar.gz
+ varnishd.initd
+ varnishd.confd
+ varnishd.logrotate"
+
+_builddir="$srcdir"/varnish-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm "$pkgdir"/usr/lib/*.la || return 1
+ install -Dm755 "$srcdir"/varnishd.initd "$pkgdir"/etc/init.d/varnishd \
+ || return 1
+ install -Dm644 "$srcdir"/varnishd.confd "$pkgdir"/etc/conf.d/varnishd \
+ || return 1
+ install -Dm644 "$srcdir"/varnishd.logrotate \
+ "$pkgdir"/etc/logrotate.d/varnishd || return 1
+}
+
+libs() {
+ pkgdesc="Libraries for varnish"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib/
+}
+
+md5sums="38387bf31a1574f5cd8dec4f0b7caf20 varnish-3.0.0.tar.gz
+a86ece4df03e2643d4d659fb841e1ea6 varnishd.initd
+78bc033e92dc6153656408f44b1d1df8 varnishd.confd
+a6cb8a43c9465699cf956dc992998225 varnishd.logrotate"
diff --git a/testing/varnish/varnishd.confd b/testing/varnish/varnishd.confd
new file mode 100644
index 000000000..c2eb140db
--- /dev/null
+++ b/testing/varnish/varnishd.confd
@@ -0,0 +1,9 @@
+# /etc/conf.d/varnishd
+
+# options passed to varnish on startup
+# please see the varnishd man page for more options
+VARNISHD_OPTS="-a 127.0.0.1:8080 -b 127.0.0.1:80"
+
+# arguments passed to varnishncsa
+# please see the varnishncsa man page for more options
+VARNISHNCSA_ARGS="-c -a -w /var/log/varnish/access.log"
diff --git a/testing/varnish/varnishd.initd b/testing/varnish/varnishd.initd
new file mode 100755
index 000000000..f65cce712
--- /dev/null
+++ b/testing/varnish/varnishd.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd,v 1.7 2009/08/30 06:28:07 hollow Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting varnish"
+ #allow varnishd to lock logfile to memory
+ ulimit -l 82000
+ start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec /usr/sbin/varnishd -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null
+ eend $?
+
+ if [ "${VARNISHNCSA_ARGS}" != "" ]; then
+ ebegin "Starting varnish logging"
+ start-stop-daemon --quiet --start --pidfile /var/run/varnishncsa.pid --exec /usr/bin/varnishncsa -- -D -P /var/run/varnishncsa.pid ${VARNISHNCSA_ARGS}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping varnish"
+ start-stop-daemon --quiet --stop --pidfile /var/run/varnishd.pid
+ eend $?
+
+ if [ -e /var/run/varnishncsa.pid ]; then
+ ebegin "Stopping varnish logging"
+ start-stop-daemon --quiet --stop --pidfile /var/run/varnishncsa.pid
+ eend $?
+ fi
+}
diff --git a/testing/varnish/varnishd.logrotate b/testing/varnish/varnishd.logrotate
new file mode 100644
index 000000000..62ee60007
--- /dev/null
+++ b/testing/varnish/varnishd.logrotate
@@ -0,0 +1,9 @@
+/var/log/varnish/*.log {
+ weekly
+ rotate 10
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ missingok
+}
diff --git a/testing/virt-manager/APKBUILD b/testing/virt-manager/APKBUILD
new file mode 100644
index 000000000..369214246
--- /dev/null
+++ b/testing/virt-manager/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=virt-manager
+pkgver=0.9.0
+pkgrel=3
+pkgdesc="GUI for managing virtual machines"
+url="http://virt-manager.et.redhat.com/"
+arch="noarch"
+license="GPL"
+depends="gconf gtk-vnc librsvg libvirt libxml2 py-dbus py-gnome-gconf python
+ rarian virtinst vte py-urlgrabber"
+depends_dev="intltool"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-doc"
+source="http://virt-manager.et.redhat.com/download/sources/$pkgname/$pkgname-$pkgver.tar.gz"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums="a10331b467f92f4134a39bf636e04adc virt-manager-0.9.0.tar.gz"
diff --git a/testing/vpnc/APKBUILD b/testing/vpnc/APKBUILD
new file mode 100644
index 000000000..00ed2399e
--- /dev/null
+++ b/testing/vpnc/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=vpnc
+pkgver=0.5.3
+pkgrel=0
+pkgdesc="IPSec VPN client compatible with Cisco equipment"
+url="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+arch="all"
+license="GPLv2+"
+depends=
+makedepends="libgcrypt-dev perl"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-$pkgver.tar.gz
+ vpnc.initd
+ vpnc.confd"
+
+_builddir="$srcdir"/vpnc-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make PREFIX=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make PREFIX=/usr DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir"/vpnc.initd \
+ "$pkgdir"/etc/init.d/vpnc || return 1
+ install -m644 -D "$srcdir"/vpnc.confd \
+ "$pkgdir"/etc/conf.d/vpnc || return 1
+}
+
+md5sums="4378f9551d5b077e1770bbe09995afb3 vpnc-0.5.3.tar.gz
+481ddc83b829de62f459f9b94e0c334b vpnc.initd
+5c9fe863f70cc5262c095012b4bcc163 vpnc.confd"
diff --git a/testing/vpnc/vpnc.confd b/testing/vpnc/vpnc.confd
new file mode 100644
index 000000000..62789bd40
--- /dev/null
+++ b/testing/vpnc/vpnc.confd
@@ -0,0 +1,4 @@
+# If you wish to see the output made by vpnc, for example the password
+# prompt, set this variable to yes
+
+VPNCOUTPUT="no"
diff --git a/testing/vpnc/vpnc.initd b/testing/vpnc/vpnc.initd
new file mode 100644
index 000000000..f5c5dc6e6
--- /dev/null
+++ b/testing/vpnc/vpnc.initd
@@ -0,0 +1,103 @@
+#!/sbin/runscript
+
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/files/vpnc-3.init,v 1.2 2010/08/13 08:39:48 fauli Exp $
+
+VPNDIR="/etc/vpnc"
+VPN="${SVCNAME#*.}"
+if [ -n ${VPN} ] && [ ${SVCNAME} != "vpnc" ]; then
+ mkdir -p /var/run/vpnc
+ VPNPID="/var/run/vpnc/${VPN}.pid"
+else
+ VPNPID="/var/run/vpnc.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+VPNSCRIPTDIR="${VPNDIR}/scripts.d"
+PREUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-preup.sh"
+PREDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-predown.sh"
+POSTUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-postup.sh"
+POSTDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-postdown.sh"
+# We should source this file to avoid problems when init script
+# name differs from the default name
+. /etc/conf.d/vpnc
+
+depend() {
+ need net
+ before netmount
+}
+
+checktundevice() {
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+}
+
+screenoutput() {
+ if [ "${VPNCOUTPUT}" = "yes" ]; then
+ export SCREEN_OUTPUT="/dev/stdout"
+ else
+ export SCREEN_OUTPUT="/dev/null"
+ fi
+}
+
+start() {
+ ebegin "Starting VPNC: ${VPN}"
+
+ checktundevice || return 1
+ screenoutput
+
+ if [ ! -e "${VPNCONF}" ]; then
+ eend 1 "${VPNCONF} does not exist"
+ return 1
+ fi
+
+ local args=""
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --start --pidfile "${VPNPID}" --exec /usr/sbin/vpnc \
+ -- --pid-file "${VPNPID}" "${VPNCONF}" > ${SCREEN_OUTPUT}
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping VPNC: ${VPN}"
+ screenoutput
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --stop --pidfile "${VPNPID}"
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
diff --git a/testing/webalizer/APKBUILD b/testing/webalizer/APKBUILD
new file mode 100644
index 000000000..df1047eb0
--- /dev/null
+++ b/testing/webalizer/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=webalizer
+pkgver=2.23.05
+_pkgver="2.23-05"
+pkgrel=1
+pkgdesc="A web server log file analysis program producing HTML reports"
+url="http://www.webalizer.com/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="db-dev gd-dev libpng-dev zlib-dev bzip2-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="saveas-ftp://ftp.mrunix.net/pub/webalizer/webalizer-$_pkgver-src.tar.bz2/webalizer-$pkgver.tar.bz2"
+_builddir="$srcdir"/$pkgname-$_pkgver
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --datarootdir=/usr/share \
+ --enable-bz2
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="${pkgdir}" install || return 1
+}
+
+md5sums="18cb592434dae81e9bdd8f55f5e28b96 webalizer-2.23.05.tar.bz2"
diff --git a/testing/weechat/APKBUILD b/testing/weechat/APKBUILD
new file mode 100644
index 000000000..6350bbd97
--- /dev/null
+++ b/testing/weechat/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor:
+# Maintainer: Leonardo Arena <rnalrd@alpine.linux.org>
+pkgname=weechat
+pkgver=0.3.6
+pkgrel=0
+pkgdesc="A fast, light, extensible ncurses-based chat client"
+url="http://www.weechat.org"
+arch="all"
+license="GPL3"
+depends=
+depends_dev="cmake libiconv-dev libintl ncurses-dev"
+makedepends="$depends_dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://www.weechat.org/files/src/$pkgname-$pkgver.tar.gz"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ mkdir build
+ cd build
+# ./configure --prefix=/usr \
+# --sysconfdir=/etc \
+# --mandir=/usr/share/man \
+# --infodir=/usr/share/info \
+# --disable-nls
+# make || return 1
+ cmake .. -DPREFIX=/usr
+}
+
+package() {
+ cd "$_builddir"/build
+ make DESTDIR="$pkgdir/" install
+}
+
+md5sums="f130af1f858919fd446561faeaaf555e weechat-0.3.6.tar.gz"
diff --git a/testing/weplab/APKBUILD b/testing/weplab/APKBUILD
new file mode 100644
index 000000000..62e7d99d6
--- /dev/null
+++ b/testing/weplab/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=weplab
+pkgver=0.1.5
+pkgrel=1
+pkgdesc="Analyzing WEP encryption security on wireless networks"
+url="http://weplab.sourceforge.net/"
+arch="all"
+license="GPLv2+"
+depends=
+makedepends="libpcap-dev wireless-tools-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="713870965447b0b8b7341409968846fb weplab-0.1.5.tar.gz"
diff --git a/testing/wine_gecko/APKBUILD b/testing/wine_gecko/APKBUILD
new file mode 100644
index 000000000..6cbaf8b07
--- /dev/null
+++ b/testing/wine_gecko/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=wine_gecko
+pkgver=1.3
+pkgrel=1
+pkgdesc="Wine's built-in replacement for Microsoft's Internet Explorer"
+url="http://wiki.winehq.org/Gecko"
+arch="x86"
+license="MPL"
+depends=""
+makedepends=""
+install=""
+subpackages=""
+source="http://downloads.sourceforge.net/wine/wine_gecko-$pkgver-$CARCH.msi"
+
+_builddir=
+prepare() {
+ mkdir -p "$srcdir"
+}
+
+build() {
+ return 0
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/wine/gecko/
+ cp "$srcdir"/wine_gecko-$pkgver-$CARCH.msi \
+ "$pkgdir"/usr/share/wine/gecko/
+}
+
+md5sums="9e21684bb68d016b837744d53abb2fde wine_gecko-1.3-x86.msi"
diff --git a/testing/wput/APKBUILD b/testing/wput/APKBUILD
new file mode 100644
index 000000000..43a5374bd
--- /dev/null
+++ b/testing/wput/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=wput
+pkgver=0.6.2
+pkgrel=0
+pkgdesc="A command line tool to upload files to FTP site"
+url="http://wput.sourceforge.net/"
+arch=""
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="gnutls-dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tgz
+ $pkgname-destdir.patch"
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --disable-g-switch \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="a14c4c13d91d04d6119bdc977e8a8bdf wput-0.6.2.tgz
+a15127342ed24051108d945e2124f323 wput-destdir.patch"
diff --git a/testing/wxgtk/APKBUILD b/testing/wxgtk/APKBUILD
new file mode 100644
index 000000000..62dbbbde0
--- /dev/null
+++ b/testing/wxgtk/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=wxgtk
+pkgver=2.8.12
+pkgrel=0
+pkgdesc="GTK2 port of the wxWidgets GUI library"
+url="http://www.wxwidgets.org/"
+arch="all"
+license="wxWidgets"
+depends=""
+depends_dev="gtk+2.0-dev zlib-dev tiff-dev libpng-dev jpeg-dev expat-dev
+ libsm-dev"
+makedepends="$depends_dev sdl-dev gst-plugins-base-dev gstreamer-dev gconf-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-lang $pkgname-media wxbase"
+source="http://downloads.sourceforge.net/wxwindows/wxGTK-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/wxGTK-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --with-sdl \
+ --enable-unicode \
+ --enable-no_deps \
+ --enable-shared \
+ --enable-sound \
+ --enable-mediactrl \
+ --disable-rpath \
+ --disable-optimise \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+dev() {
+ default_dev
+ mv "$pkgdir"/usr/lib/wx/config "$subpkgdir"/usr/lib/wx/ || return 1
+ mv "$pkgdir"/usr/bin/wxrc* "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/usr/share/bakefile "$subpkgdir"/usr/share/ || return 1
+}
+
+media() {
+ pkgdesc="Multimedia add-on for the wxWidgets library"
+ mkdir -p "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/lib/libwx_gtk2u_media-*.so.* "$subpkgdir"/usr/lib/
+}
+
+wxbase() {
+ pkgdesc="Non-GUI support classes from the wxWidgets library"
+ mkdir -p "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/usr/lib/libwx_baseu-*.so.* \
+ "$pkgdir"/usr/lib/libwx_baseu_net-*.so.* \
+ "$pkgdir"/usr/lib/libwx_baseu_xml-*.so.* \
+ "$subpkgdir"/usr/lib/
+}
+
+md5sums="08f81ab60647308058f6ce99712b14f8 wxGTK-2.8.12.tar.bz2"
diff --git a/testing/xfburn/APKBUILD b/testing/xfburn/APKBUILD
new file mode 100644
index 000000000..d8e10c670
--- /dev/null
+++ b/testing/xfburn/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xfburn
+pkgver=0.4.3
+pkgrel=0
+pkgdesc="a simple CD/DVD burning tool based on libburnia libraries"
+url="http://goodies.xfce.org/projects/applications/xfburn"
+arch="all"
+license="GPL2"
+depends="desktop-file-utils hicolor-icon-theme"
+makedepends="libburn-dev libisofs-dev libxfcegui4-dev thunar-dev librsvg-dev
+ gst-plugins-base-dev exo-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://archive.xfce.org/src/apps/xfburn/${pkgver%.*}/xfburn-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build ()
+{
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --enable-gstreamer \
+ --enable-thunar-vfs \
+ --enable-dbus
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="147cdc2d909e751125be16103b8dc81f xfburn-0.4.3.tar.bz2"
diff --git a/testing/xfce4-cpugraph-plugin/APKBUILD b/testing/xfce4-cpugraph-plugin/APKBUILD
new file mode 100644
index 000000000..a69bd2668
--- /dev/null
+++ b/testing/xfce4-cpugraph-plugin/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xfce4-cpugraph-plugin
+pkgver=1.0.1
+pkgrel=0
+pkgdesc="CPU monitor for the Xfce panel"
+url="http://goodies.xfce.org/projects/panel-plugins/xfce4-cpugraph-plugin"
+arch="all"
+license="GPLv2+"
+depends=""
+makedepends="libxfcegui4-dev xfce4-panel-dev"
+install=""
+subpackages=""
+source="http://archive.xfce.org/src/panel-plugins/xfce4-cpugraph-plugin/1.0/xfce4-cpugraph-plugin-$pkgver.tar.bz2"
+
+_builddir="$srcdir"/xfce4-cpugraph-plugin-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="ff551087b1f61c47b8746e8687c572aa xfce4-cpugraph-plugin-1.0.1.tar.bz2"
diff --git a/testing/xl2tpd/APKBUILD b/testing/xl2tpd/APKBUILD
new file mode 100644
index 000000000..a548c72fc
--- /dev/null
+++ b/testing/xl2tpd/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=xl2tpd
+pkgver=1.3.0
+pkgrel=0
+pkgdesc="Layer 2 Tunnelling Protocol Daemon (RFC 2661)"
+url="http://www.xelerance.com/services/software/xl2tpd/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="libpcap-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.xelerance.com/wp-content/uploads/software/$pkgname/$pkgname-$pkgver.tar.gz xl2tpd.confd xl2tpd.initd options.l2tp"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make PREFIX=/usr || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make PREFIX=/usr DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 examples/xl2tpd.conf "$pkgdir"/etc/xl2tpd/xl2tpd.conf
+ install -Dm755 "$srcdir"/xl2tpd.initd "$pkgdir"/etc/init.d/xl2tpd
+ install -Dm644 "$srcdir"/xl2tpd.confd "$pkgdir"/etc/conf.d/xl2tpd
+ install -Dm644 "$srcdir"/options.l2tp "$pkgdir"/etc/ppp/options.l2tp
+ install -dm755 "$pkgdir"/var/run/xl2tpd
+}
+
+md5sums="28264284552c442b24cf421755a2bb48 xl2tpd-1.3.0.tar.gz
+0032d104bd2d993b8a514c2f898d1dd9 xl2tpd.confd
+77e4364f4e726549b6e74aec2b1ccd39 xl2tpd.initd
+8f1a2896d08b6353424013cf7247dc7d options.l2tp"
diff --git a/testing/xl2tpd/options.l2tp b/testing/xl2tpd/options.l2tp
new file mode 100644
index 000000000..425a56e08
--- /dev/null
+++ b/testing/xl2tpd/options.l2tp
@@ -0,0 +1,17 @@
+ipcp-accept-local
+ipcp-accept-remote
+ms-dns 192.168.1.1
+ms-dns 192.168.1.3
+ms-wins 192.168.1.2
+ms-wins 192.168.1.4
+noccp
+auth
+crtscts
+idle 1800
+mtu 1410
+mru 1410
+nodefaultroute
+debug
+lock
+proxyarp
+connect-delay 5000
diff --git a/testing/xl2tpd/xl2tpd.confd b/testing/xl2tpd/xl2tpd.confd
new file mode 100644
index 000000000..d89a1f3d6
--- /dev/null
+++ b/testing/xl2tpd/xl2tpd.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/xl2tpd
+
+# Any extra options you want to pass to xl2tpd
+# on start-up should be put here.
+XL2TPD_OPTS=""
diff --git a/testing/xl2tpd/xl2tpd.initd b/testing/xl2tpd/xl2tpd.initd
new file mode 100644
index 000000000..d56e1671e
--- /dev/null
+++ b/testing/xl2tpd/xl2tpd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting xl2tpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/xl2tpd -- ${XL2TPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xl2tpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/xl2tpd.pid
+ result=$?
+ start-stop-daemon --stop --quiet --exec /usr/sbin/xl2tpd-control
+ result=$(( $result + $? ))
+ eend $result
+}
diff --git a/testing/xmlrpc-c/APKBUILD b/testing/xmlrpc-c/APKBUILD
new file mode 100644
index 000000000..b328130a9
--- /dev/null
+++ b/testing/xmlrpc-c/APKBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xmlrpc-c
+pkgver=1.16.35
+pkgrel=1
+pkgdesc="This library provides a modular implementation of XML-RPC for C and C++"
+url="http://xmlrpc-c.sourceforge.net/"
+arch="x86"
+license="custom:xmlrpc-c"
+depends=
+makedepends="libtool curl-dev libxml2-dev zlib-dev"
+subpackages="$pkgname-dev $pkgname-doc xmlrpc-c++:cxx"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tgz
+ xmlrpc-c-curl.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-libxml2-backend \
+ --disable-cgi-server \
+ --disable-abyss-server \
+ --disable-libwww-client \
+ --disable-wininet-client
+ # no parallel builds :-(
+ make -C include &&\
+ make -C lib &&\
+ make -j1 -C src &&\
+ make
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m 644 -D doc/COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+cxx() {
+ pkgdesc="This library provides a modular implementation of XML-RPC for C++"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*++* "$subpkgdir"/usr/lib/
+}
+
+md5sums="eed7ef8078800e4822d753bac9d2fa1c xmlrpc-c-1.16.35.tgz
+101c2224b2338247097f96b03e206261 xmlrpc-c-curl.patch"
diff --git a/testing/xmlrpc-c/xmlrpc-c-curl.patch b/testing/xmlrpc-c/xmlrpc-c-curl.patch
new file mode 100644
index 000000000..bfc114577
--- /dev/null
+++ b/testing/xmlrpc-c/xmlrpc-c-curl.patch
@@ -0,0 +1,36 @@
+diff --git a/lib/curl_transport/curlmulti.c b/lib/curl_transport/curlmulti.c
+index 526a4db..5503b9f 100644
+--- a/lib/curl_transport/curlmulti.c
++++ b/lib/curl_transport/curlmulti.c
+@@ -17,7 +17,6 @@
+ #endif
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ #include <curl/multi.h>
+
+diff --git a/lib/curl_transport/curltransaction.c b/lib/curl_transport/curltransaction.c
+index 37ec02b..8fa4fb2 100644
+--- a/lib/curl_transport/curltransaction.c
++++ b/lib/curl_transport/curltransaction.c
+@@ -15,7 +15,6 @@
+ #include "version.h"
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include "curlversion.h"
+diff --git a/lib/curl_transport/xmlrpc_curl_transport.c b/lib/curl_transport/xmlrpc_curl_transport.c
+index 526381d..9b7b530 100644
+--- a/lib/curl_transport/xmlrpc_curl_transport.c
++++ b/lib/curl_transport/xmlrpc_curl_transport.c
+@@ -83,7 +83,6 @@
+ #include "xmlrpc-c/time_int.h"
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ #include <curl/multi.h>
+
diff --git a/testing/xmlrpc-epi/APKBUILD b/testing/xmlrpc-epi/APKBUILD
new file mode 100644
index 000000000..593dbe171
--- /dev/null
+++ b/testing/xmlrpc-epi/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=xmlrpc-epi
+pkgver=0.54.1
+pkgrel=1
+pkgdesc="versatile xmlrpc and soap implementation"
+url="http://xmlrpc-epi.sourceforge.net/"
+arch="all"
+license="MIT"
+depends=
+depends_dev="expat-dev libiconv-dev"
+makedepends="$depends_dev autoconf automake libtool"
+install=""
+subpackages="$pkgname-dev"
+source="http://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/$pkgver/xmlrpc-epi-$pkgver.tar.gz"
+
+_builddir="$srcdir"/xmlrpc
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+
+ msg "disabling sample build"
+ sed -i 's:src sample:src:g' Makefile.am Makefile.in
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ mkdir "$pkgdir"/usr/include/xmlrpc-epi
+ cp -R "$pkgdir"/usr/include/*.h "$pkgdir"/usr/include/xmlrpc-epi
+}
+
+md5sums="546ce341e7d79691371344449cb9e484 xmlrpc-epi-0.54.1.tar.gz"
diff --git a/testing/xmlto/APKBUILD b/testing/xmlto/APKBUILD
new file mode 100644
index 000000000..f9c4c5eb2
--- /dev/null
+++ b/testing/xmlto/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=xmlto
+pkgver=0.0.23
+pkgrel=1
+pkgdesc="Convert xml to many other formats"
+url="http://cyberelk.net/tim/software/xmlto/"
+arch="all"
+license="GPL"
+depends="libxslt perl-yaml-syck perl-test-pod bash"
+depends_dev=
+makedepends="$depends_dev wget bash docbook-xsl"
+install=""
+subpackages="$pkgname-doc"
+source="https://fedorahosted.org/releases/x/m/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man || return 1
+ make -j1 || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="3001d6bb2bbc2c8f6c2301f05120f074 xmlto-0.0.23.tar.bz2"
diff --git a/testing/xonotic-data/APKBUILD b/testing/xonotic-data/APKBUILD
new file mode 100644
index 000000000..c02400e09
--- /dev/null
+++ b/testing/xonotic-data/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=xonotic-data
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="data files for Xonotic"
+url="http://www.xonotic.org/"
+arch="noarch"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://dl.xonotic.org/xonotic-${pkgver}.zip"
+
+_builddir=${srcdir}/Xonotic
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+}
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/xonotic/
+ mv "$srcdir"/Xonotic/data "$pkgdir"/usr/share/xonotic/
+}
+
+md5sums="cdadb384ccf9cad926bb377312832c2f xonotic-0.5.0.zip"
diff --git a/testing/xonotic/APKBUILD b/testing/xonotic/APKBUILD
new file mode 100644
index 000000000..173abaa8d
--- /dev/null
+++ b/testing/xonotic/APKBUILD
@@ -0,0 +1,71 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer:
+pkgname=xonotic
+pkgver=0.5.0
+pkgrel=0
+pkgdesc="game engine for Xonotic (quake1/nexuiz derivative)"
+url="http://www.xonotic.org/"
+arch="all"
+license="GPL"
+depends="xonotic-data"
+depends_dev="sdl-dev mesa-dev jpeg-dev libvorbis-dev libxpm-dev libxxf86dga-dev libxxf86vm-dev libmodplug-dev libpng-dev alsa-lib-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-glx $pkgname-sdl"
+source="http://dl.xonotic.org/xonotic-${pkgver}-source.zip
+ xonotic-moncontrol.patch"
+
+_builddir="$srcdir"/Xonotic
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+
+ # msg "building Xonotic-patched QuakeC compiler"
+ # make -C source/fteqcc CPUOPTIMIZATIONS="${CFLAGS}"
+
+ msg "building dedicated server"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sv-release
+
+ msg "building GLX client"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 cl-release
+
+ msg "building SDL client"
+ make -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR="/usr/share/xonotic" DP_LINK_TO_LIBJPEG=1 sdl-release
+}
+
+package() {
+ cd "$_builddir"
+
+ mkdir -p "$pkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-dedicated "$pkgdir"/usr/bin/xonotic-dedicated
+}
+
+sdl() {
+ pkgdesc="$pkgdesc (SDL client)"
+
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-sdl "$subpkgdir"/usr/bin/xonotic-sdl
+}
+
+glx() {
+ pkgdesc="$pkgdesc (GLX client)"
+
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/bin
+ install -Dm755 source/darkplaces/darkplaces-glx "$subpkgdir"/usr/bin/xonotic-glx
+}
+
+md5sums="7382f195386b8e51df65e57e6be413e5 xonotic-0.5.0-source.zip
+e7ad5ace0debe34486ff06b4f78b3f27 xonotic-moncontrol.patch"
diff --git a/testing/xonotic/xonotic-moncontrol.patch b/testing/xonotic/xonotic-moncontrol.patch
new file mode 100644
index 000000000..9d8886689
--- /dev/null
+++ b/testing/xonotic/xonotic-moncontrol.patch
@@ -0,0 +1,21 @@
+--- Xonotic.orig/source/darkplaces/sys_shared.c
++++ Xonotic/source/darkplaces/sys_shared.c
+@@ -50,18 +50,8 @@
+ exit(returnvalue);
+ }
+
+-#if defined(__linux__) || defined(__FreeBSD__)
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-int moncontrol(int);
+-#endif
+-
+ void Sys_AllowProfiling(qboolean enable)
+ {
+-#if defined(__linux__) || defined(__FreeBSD__)
+- moncontrol(enable);
+-#endif
+ }
+
+
diff --git a/testing/yaml/APKBUILD b/testing/yaml/APKBUILD
new file mode 100644
index 000000000..f93c31ccf
--- /dev/null
+++ b/testing/yaml/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=yaml
+pkgver=0.1.4
+pkgrel=0
+pkgdesc="YAML 1.1 parser and emitter written in C"
+url="http://pyyaml.org/wiki/LibYAML"
+arch="all"
+license="MIT"
+depends=""
+makedepends=""
+install=""
+subpackages="$pkgname-dev"
+source="http://pyyaml.org/download/libyaml/yaml-$pkgver.tar.gz"
+
+_builddir="$srcdir"/yaml-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="36c852831d02cf90508c29852361d01b yaml-0.1.4.tar.gz"