summaryrefslogtreecommitdiffstats
path: root/abs/extra
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-10-25 14:58:41 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-10-25 14:58:41 (GMT)
commit8d29737682e67ca7276fae0b1e8e69578ce61428 (patch)
tree4cc01d92c820214a4e5249575eb7f5ccd6c142bb /abs/extra
parentdb8bcbe3926e77c0144204beda14dee25a388d39 (diff)
parent927a8f226e532ba2187e8a9c9292453c3896f571 (diff)
downloadlinhes_pkgbuild-8d29737682e67ca7276fae0b1e8e69578ce61428.zip
linhes_pkgbuild-8d29737682e67ca7276fae0b1e8e69578ce61428.tar.gz
linhes_pkgbuild-8d29737682e67ca7276fae0b1e8e69578ce61428.tar.bz2
Merge branch 'testing'
Diffstat (limited to 'abs/extra')
-rw-r--r--abs/extra/camlp4/PKGBUILD33
-rw-r--r--abs/extra/ffmpeg2.8/PKGBUILD110
-rw-r--r--abs/extra/ffmpeg2.8/__changelog2
-rw-r--r--abs/extra/ffmpeg2.8/ffmpeg-2.8-Resolve-plex-direct-domains.patch37
-rw-r--r--abs/extra/ffmpeg2.8/ffmpeg-2.8-kodi.patch585
-rw-r--r--abs/extra/ffmpeg2.8/ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch48
-rw-r--r--abs/extra/ffmpeg2.8/ffmpeg-Speed_up_wtv_index_creation.patch47
-rw-r--r--abs/extra/glu/PKGBUILD3
-rw-r--r--abs/extra/gnome-vfs/PKGBUILD43
-rw-r--r--abs/extra/gnome-vfs/enable-deprecated.patch57
-rw-r--r--abs/extra/gnome-vfs/gnutls-3.4.0.patch38
-rw-r--r--abs/extra/google-chrome/PKGBUILD4
-rw-r--r--abs/extra/hdf5/PKGBUILD42
-rw-r--r--abs/extra/lablgtk2/PKGBUILD18
-rw-r--r--abs/extra/libebml/PKGBUILD16
-rw-r--r--abs/extra/libglvnd/PKGBUILD5
-rw-r--r--abs/extra/libmatroska/PKGBUILD19
-rw-r--r--abs/extra/llvm/0001-New-MSan-mapping-layout-compiler-rt-part.patch142
-rw-r--r--abs/extra/llvm/0001-New-MSan-mapping-layout-llvm-part.patch115
-rw-r--r--abs/extra/llvm/PKGBUILD129
-rw-r--r--abs/extra/llvm/clang-3.7.0-add-gcc-abi-tag-support.patch1267
-rw-r--r--abs/extra/llvm/clang-tools-extra-3.7.0-install-clang-query.patch9
-rw-r--r--abs/extra/llvm/lldb-3.7.0-avoid-linking-to-libLLVM.patch20
-rw-r--r--abs/extra/llvm/llvm-3.7.0-export-more-symbols.patch11
-rw-r--r--abs/extra/llvm/llvm-3.7.0-link-tools-against-libLLVM.patch440
-rw-r--r--abs/extra/mkvtoolnix/PKGBUILD103
-rw-r--r--abs/extra/mkvtoolnix/mkvtoolnix-gui.install15
-rw-r--r--abs/extra/mkvtoolnix/mkvtoolnix.install15
-rw-r--r--abs/extra/mpd/PKGBUILD18
-rw-r--r--abs/extra/netcdf/PKGBUILD46
-rw-r--r--abs/extra/nvidia-settings/PKGBUILD46
-rw-r--r--abs/extra/nvidia-settings/libxnvctrl_so.patch67
-rw-r--r--[-rwxr-xr-x]abs/extra/openpht/PKGBUILD59
-rw-r--r--abs/extra/openpht/__changelog1
-rw-r--r--abs/extra/openpht/fribidi.patch50
-rwxr-xr-xabs/extra/openpht/plex-ffmpeg-compat.patch29
-rw-r--r--abs/extra/openpht/plexhometheater.desktop10
-rwxr-xr-xabs/extra/openpht/plexhometheater.sh2
-rw-r--r--abs/extra/plex-media-server/MKPKG3
-rw-r--r--abs/extra/plex-media-server/PKGBUILD28
-rw-r--r--abs/extra/plex-media-server/__changelog2
-rw-r--r--abs/extra/plex-media-server/plex-media-server.install40
-rw-r--r--abs/extra/plex-media-server/plex.sysusers2
-rw-r--r--abs/extra/plex-media-server/plexmediaserver.service1
-rw-r--r--abs/extra/roomeqwizard/PKGBUILD38
-rw-r--r--abs/extra/tidy/PKGBUILD42
-rw-r--r--abs/extra/tidyhtml/PKGBUILD42
-rw-r--r--abs/extra/time/PKGBUILD47
-rw-r--r--abs/extra/time/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch72
-rw-r--r--abs/extra/time/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch32
50 files changed, 1657 insertions, 2393 deletions
diff --git a/abs/extra/camlp4/PKGBUILD b/abs/extra/camlp4/PKGBUILD
new file mode 100644
index 0000000..9f66a18
--- /dev/null
+++ b/abs/extra/camlp4/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=camlp4
+pkgver=4.02+6
+pkgrel=1
+pkgdesc='Caml preprocessor and pretty-printer'
+arch=('x86_64' 'i686')
+license=('GPL2')
+url='https://github.com/ocaml/camlp4/releases'
+depends=('ocaml')
+makedepends=('git')
+options=('!makeflags' '!emptydirs' 'staticlibs')
+source=("git://github.com/ocaml/camlp4#tag=$pkgver")
+md5sums=('SKIP')
+
+build() {
+ cd "$pkgname"
+
+ ./configure
+ make all camlp4/META
+}
+
+package() {
+ make -C "$pkgname" \
+ BINDIR="$pkgdir/usr/bin" \
+ LIBDIR="$pkgdir/usr/lib/ocaml" \
+ PKGDIR="$pkgdir/usr/lib/ocaml" \
+ install install-META
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/ffmpeg2.8/PKGBUILD b/abs/extra/ffmpeg2.8/PKGBUILD
new file mode 100644
index 0000000..8e00522
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/PKGBUILD
@@ -0,0 +1,110 @@
+# $Id$
+# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: Paul Mattal <paul@archlinux.org>
+
+pkgname=ffmpeg2.8
+pkgver=2.8.7
+pkgrel=2
+pkgdesc='Complete solution to record, convert and stream audio and video'
+arch=('i686' 'x86_64')
+url='http://ffmpeg.org/'
+license=('GPL3')
+depends=('alsa-lib' 'bzip2' 'fontconfig' 'fribidi' 'gnutls' 'gsm' 'lame'
+ 'libass' 'libbluray' 'libmodplug' 'libsoxr' 'libssh'
+ 'libtheora' 'libva' 'libvdpau' 'libwebp' 'opencore-amr' 'openjpeg'
+ 'opus' 'schroedinger' 'sdl' 'speex' 'v4l-utils' 'xvidcore' 'zlib'
+ 'libdcadec.so' 'libvidstab.so' 'libvorbis.so' 'libvorbisenc.so'
+ 'libvpx.so' 'libx264.so' 'libx265.so')
+makedepends=('hardening-wrapper' 'ladspa' 'libvdpau' 'yasm')
+optdepends=('ladspa: LADSPA filters')
+provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so'
+ 'libavresample.so' 'libavutil.so' 'libpostproc.so' 'libswresample.so'
+ 'libswscale.so')
+source=("http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.bz2"
+ "http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.bz2.asc"
+ 'ffmpeg-2.8-kodi.patch'
+ 'ffmpeg-2.8-Resolve-plex-direct-domains.patch'
+ 'ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch'
+ 'ffmpeg-Speed_up_wtv_index_creation.patch'
+)
+validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
+sha256sums=('8777ce4a335640fdd13680ba423ef6da330ff5071bfbe27cdbb452379167efe5'
+ 'SKIP'
+ 'f89a26cb409bab1ac00106db008eccf72c6390e04d7cde2a63fbb1f2e9fbc669'
+ 'ca7eca1b9476c93efbdea457b64b0e5d925ad437f79168112aae52319d59d155'
+ 'fa78aa79ff861edbb8b6443978a0da60c4241f7a7f3888b242031ba916fa7514'
+ 'd1191e3e3fc980535e4835b5ef9b52fd15a14b58ef56ac6d2710bd589ce94b40'
+)
+
+prepare() {
+ cd ${srcdir}/ffmpeg-${pkgver}
+ patch -Np1 -i ${srcdir}/ffmpeg-2.8-kodi.patch
+ patch -Np1 -i ${srcdir}/ffmpeg-2.8-Resolve-plex-direct-domains.patch
+ patch -Np1 -i ${srcdir}/ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
+ patch -Np1 -i ${srcdir}/ffmpeg-Speed_up_wtv_index_creation.patch
+}
+
+build() {
+ cd ffmpeg-${pkgver}
+
+ ./configure \
+ --prefix='/usr' \
+ --incdir='/usr/include/ffmpeg2.8' \
+ --libdir='/usr/lib/ffmpeg2.8' \
+ --shlibdir='/usr/lib/ffmpeg2.8' \
+ --disable-debug \
+ --disable-static \
+ --disable-stripping \
+ --enable-avisynth \
+ --enable-avresample \
+ --enable-fontconfig \
+ --enable-gnutls \
+ --enable-gpl \
+ --enable-ladspa \
+ --enable-libass \
+ --enable-libbluray \
+ --enable-libdcadec \
+ --enable-libfreetype \
+ --enable-libfribidi \
+ --enable-libgsm \
+ --enable-libmodplug \
+ --enable-libmp3lame \
+ --enable-libopencore_amrnb \
+ --enable-libopencore_amrwb \
+ --enable-libopenjpeg \
+ --enable-libopus \
+ --disable-libpulse \
+ --enable-libschroedinger \
+ --enable-libsoxr \
+ --enable-libspeex \
+ --enable-libssh \
+ --enable-libtheora \
+ --enable-libv4l2 \
+ --enable-libvidstab \
+ --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libwebp \
+ --enable-libx264 \
+ --enable-libx265 \
+ --enable-libxvid \
+ --enable-shared \
+ --enable-version3 \
+ --enable-x11grab
+ make
+}
+
+package() {
+ cd ffmpeg-${pkgver}
+
+ make DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/usr/{bin,share}
+
+ install -dm 755 "${pkgdir}"/etc/ld.so.conf.d
+ echo -e '/usr/lib/\n/usr/lib/ffmpeg2.8/' > "${pkgdir}"/etc/ld.so.conf.d/ffmpeg2.8.conf
+}
+
+# vim: ts=2 sw=2 et:
+
diff --git a/abs/extra/ffmpeg2.8/__changelog b/abs/extra/ffmpeg2.8/__changelog
new file mode 100644
index 0000000..9a019b1
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/__changelog
@@ -0,0 +1,2 @@
+PKGBUILD: remove dep libpulse and disable in configure
+PKGBUILD: add patches from OpenPHT
diff --git a/abs/extra/ffmpeg2.8/ffmpeg-2.8-Resolve-plex-direct-domains.patch b/abs/extra/ffmpeg2.8/ffmpeg-2.8-Resolve-plex-direct-domains.patch
new file mode 100644
index 0000000..7e377ae
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/ffmpeg-2.8-Resolve-plex-direct-domains.patch
@@ -0,0 +1,37 @@
+commit eb2a7e1eb920cd9e44223607978344cf4b95d990
+Author: Jonas Karlman <jonas@kwiboo.se>
+Date: Tue Jun 16 02:47:28 2015 +0200
+
+ Resolve .plex.direct domains
+
+diff --git a/libavformat/tcp.c b/libavformat/tcp.c
+index 3c3f4f5..e543c06 100644
+--- a/libavformat/tcp.c
++++ b/libavformat/tcp.c
+@@ -67,6 +67,8 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
+ int ret;
+ char hostname[1024],proto[1024],path[1024];
+ char portstr[10];
++ size_t len;
++ char *c;
+ s->open_timeout = 5000000;
+
+ av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
+@@ -102,6 +104,17 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
+ snprintf(portstr, sizeof(portstr), "%d", port);
+ if (s->listen)
+ hints.ai_flags |= AI_PASSIVE;
++ len = strlen(hostname);
++ if (len > 12 && !strcmp(hostname + len - 12, ".plex.direct")) {
++ for (c = hostname; *c; c++) {
++ if (*c == '-') {
++ *c = '.';
++ } else if (*c == '.') {
++ *c = '\0';
++ break;
++ }
++ }
++ }
+ if (!hostname[0])
+ ret = getaddrinfo(NULL, portstr, &hints, &ai);
+ else
diff --git a/abs/extra/ffmpeg2.8/ffmpeg-2.8-kodi.patch b/abs/extra/ffmpeg2.8/ffmpeg-2.8-kodi.patch
new file mode 100644
index 0000000..27b2c1b
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/ffmpeg-2.8-kodi.patch
@@ -0,0 +1,585 @@
+From 007ee4796d1621ef6070fdef9aa10ff227ee20b4 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Sun, 11 Sep 2011 19:04:51 +0200
+Subject: [PATCH 01/13] Support raw dvdsub palette as stored on normal dvd's
+
+This is how the palette is stored on dvd's. Currently
+only xbmc passes the palette information to libavcodec
+this way.
+---
+ libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
+index f009824..bbee694 100644
+--- a/libavcodec/dvdsubdec.c
++++ b/libavcodec/dvdsubdec.c
+@@ -64,6 +64,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
+ }
+ }
+
++static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values)
++{
++ uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
++ uint8_t r, g, b;
++ int i, y, cb, cr, a;
++ int r_add, g_add, b_add;
++
++ for (i = num_values; i > 0; i--) {
++ a = *ayvu++;
++ y = *ayvu++;
++ cr = *ayvu++;
++ cb = *ayvu++;
++ YUV_TO_RGB1_CCIR(cb, cr);
++ YUV_TO_RGB2_CCIR(r, g, b, y);
++ *argb++ = (a << 24) | (r << 16) | (g << 8) | b;
++ }
++}
++
+ static int decode_run_2bit(GetBitContext *gb, int *color)
+ {
+ unsigned int v, t;
+@@ -708,6 +726,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
+ parse_ifo_palette(ctx, ctx->ifo_str);
+ if (ctx->palette_str)
+ parse_palette(ctx, ctx->palette_str);
++
++ if (!ctx->has_palette && avctx->extradata_size == 64) {
++ ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16);
++ ctx->has_palette = 1;
++ }
++
+ if (ctx->has_palette) {
+ int i;
+ av_log(avctx, AV_LOG_DEBUG, "palette:");
+
+From 3b001c5375fdcb0fca89c813bf808da35f904323 Mon Sep 17 00:00:00 2001
+From: Cory Fields <theuni-nospam-@xbmc.org>
+Date: Mon, 28 Jun 2010 01:55:31 -0400
+Subject: [PATCH 02/13] if av_read_packet returns AVERROR_IO, we are done.
+ ffmpeg's codecs might or might not handle returning any completed demuxed
+ packets correctly
+
+---
+ libavformat/utils.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 30567fa..8a947d6 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -1329,6 +1329,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
+ if (ret < 0) {
+ if (ret == AVERROR(EAGAIN))
+ return ret;
++ if (ret == AVERROR(EIO))
++ return ret;
+ /* flush the parsers */
+ for (i = 0; i < s->nb_streams; i++) {
+ st = s->streams[i];
+
+From 75902cb6825c581853636147020f1be99aba198c Mon Sep 17 00:00:00 2001
+From: Cory Fields <theuni-nospam-@xbmc.org>
+Date: Mon, 28 Jun 2010 02:10:50 -0400
+Subject: [PATCH 03/13] added: Ticket #7187, TV Teletext support for DVB EBU
+ Teletext streams
+
+---
+ libavcodec/avcodec.h | 4 ++++
+ libavformat/mpegts.c | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index 9d38b59..bc1b1b9 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -532,6 +532,10 @@ enum AVCodecID {
+ AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska
+ AV_CODEC_ID_HDMV_TEXT_SUBTITLE = MKBETAG('B','D','T','X'),
+
++ /* data codecs */
++ AV_CODEC_ID_VBI_DATA= 0x17500,
++ AV_CODEC_ID_VBI_TELETEXT,
++
+ /* other specific kind of codecs (generally used for attachments) */
+ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
+ AV_CODEC_ID_TTF = 0x18000,
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 65824dd..338861e 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -756,6 +756,8 @@ static const StreamType DESC_types[] = {
+ { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
+ { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
++ { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_DATA }, /* VBI Data descriptor */
++ { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */
+ { 0 },
+ };
+
+
+From fabf7216626da8caecf9cb34b188739e530cc8d4 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Sun, 18 Sep 2011 19:16:34 +0200
+Subject: [PATCH 04/13] Don't accept mpegts PMT that isn't current
+
+---
+ libavformat/mpegts.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 338861e..d4168c8 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -585,6 +585,7 @@ typedef struct SectionHeader {
+ uint8_t tid;
+ uint16_t id;
+ uint8_t version;
++ uint8_t current;
+ uint8_t sec_num;
+ uint8_t last_sec_num;
+ } SectionHeader;
+@@ -667,6 +668,7 @@ static int parse_section_header(SectionHeader *h,
+ val = get8(pp, p_end);
+ if (val < 0)
+ return val;
++ h->current = val & 0x1;
+ h->version = (val >> 1) & 0x1f;
+ val = get8(pp, p_end);
+ if (val < 0)
+@@ -2020,6 +2022,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+ return;
+ if (ts->skip_changes)
+ return;
++ if (!h->current)
++ return;
+
+ if (skip_identical(h, tssf))
+ return;
+
+From 4f1d8668a50ebf7cddc03d191c72c36fca2146dc Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Sun, 18 Sep 2011 19:17:23 +0200
+Subject: [PATCH 05/13] Don't reparse PMT unless it's version has changed
+
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index d4168c8..9c6f6dc 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -91,6 +91,7 @@ struct MpegTSFilter {
+ int es_id;
+ int last_cc; /* last cc code (-1 if first packet) */
+ int64_t last_pcr;
++ int last_version; /* last version of data on this pid */
+ enum MpegTSFilterType type;
+ union {
+ MpegTSPESFilter pes_filter;
+@@ -459,6 +460,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
+ filter->es_id = -1;
+ filter->last_cc = -1;
+ filter->last_pcr= -1;
++ filter->last_version = -1;
+
+ return filter;
+ }
+@@ -2024,6 +2026,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
+ return;
+ if (!h->current)
+ return;
++ if (h->version == filter->last_version)
++ return;
++ filter->last_version = h->version;
++ av_dlog(ts->stream, "version=%d\n", filter->last_version);
+
+ if (skip_identical(h, tssf))
+ return;
+
+From 72cf6cb34af9de7e81bffc6a53f7d1f450e5b624 Mon Sep 17 00:00:00 2001
+From: Cory Fields <theuni-nospam-@xbmc.org>
+Date: Fri, 9 Jul 2010 16:43:31 -0400
+Subject: [PATCH 06/13] Read PID timestamps as well as PCR timestamps to find
+ location in mpegts stream
+
+---
+ libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 46 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 9c6f6dc..a4db558 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -2519,6 +2519,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) {
+ av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n");
+ }
+
++static int parse_timestamp(int64_t *ts, const uint8_t *buf)
++{
++ int afc, flags;
++ const uint8_t *p;
++
++ if(!(buf[1] & 0x40)) /* must be a start packet */
++ return -1;
++
++ afc = (buf[3] >> 4) & 3;
++ p = buf + 4;
++ if (afc == 0 || afc == 2) /* invalid or only adaption field */
++ return -1;
++ if (afc == 3)
++ p += p[0] + 1;
++ if (p >= buf + TS_PACKET_SIZE)
++ return -1;
++
++ if (p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01) /* packet_start_code_prefix */
++ return -1;
++
++ flags = p[3] | 0x100; /* stream type */
++ if (!((flags >= 0x1c0 && flags <= 0x1df) ||
++ (flags >= 0x1e0 && flags <= 0x1ef) ||
++ (flags == 0x1bd) || (flags == 0x1fd)))
++ return -1;
++
++ flags = p[7];
++ if ((flags & 0xc0) == 0x80) {
++ *ts = ff_parse_pes_pts(p+9);
++ return 0;
++ } else if ((flags & 0xc0) == 0xc0) {
++ *ts = ff_parse_pes_pts(p+9+5);
++ return 0;
++ }
++ return -1;
++}
++
++
+ static int mpegts_read_header(AVFormatContext *s)
+ {
+ MpegTSContext *ts = s->priv_data;
+@@ -2724,6 +2762,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+ uint8_t buf[TS_PACKET_SIZE];
+ int pcr_l, pcr_pid =
+ ((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid;
++ int pid = ((PESContext*)s->streams[stream_index]->priv_data)->pid;
+ int pos47 = ts->pos47_full % ts->raw_packet_size;
+ pos =
+ ((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) *
+@@ -2745,6 +2784,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
+ *ppos = pos;
+ return timestamp;
+ }
++ if ((pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pid) &&
++ parse_timestamp(&timestamp, buf) == 0) {
++ *ppos = pos;
++ return timestamp;
++ }
+ pos += ts->raw_packet_size;
+ }
+
+@@ -2844,7 +2888,7 @@ AVInputFormat ff_mpegts_demuxer = {
+ .read_header = mpegts_read_header,
+ .read_packet = mpegts_read_packet,
+ .read_close = mpegts_read_close,
+- .read_timestamp = mpegts_get_dts,
++ .read_timestamp = mpegts_get_pcr,
+ .flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+ .priv_class = &mpegts_class,
+ };
+@@ -2856,7 +2900,7 @@ AVInputFormat ff_mpegtsraw_demuxer = {
+ .read_header = mpegts_read_header,
+ .read_packet = mpegts_raw_read_packet,
+ .read_close = mpegts_read_close,
+- .read_timestamp = mpegts_get_dts,
++ .read_timestamp = mpegts_get_pcr,
+ .flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
+ .priv_class = &mpegtsraw_class,
+ };
+
+From ee8a688e4e6f59785180c1e92981ff867f6f5c23 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Sat, 22 Oct 2011 19:01:38 +0200
+Subject: [PATCH 07/13] Get stream durations using read_timestamp
+
+---
+ libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+diff --git a/libavformat/utils.c b/libavformat/utils.c
+index 8a947d6..88786f1 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -2455,6 +2455,41 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
+ #define DURATION_MAX_READ_SIZE 250000LL
+ #define DURATION_MAX_RETRY 6
+
++static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset)
++{
++ AVStream *st;
++ int i, step= 1024;
++ int64_t ts, pos;
++
++ for(i=0;i<ic->nb_streams;i++) {
++ st = ic->streams[i];
++
++ pos = 0;
++ ts = ic->iformat->read_timestamp(ic, i, &pos, DURATION_MAX_READ_SIZE);
++ if (ts == AV_NOPTS_VALUE)
++ continue;
++ if (st->start_time > ts || st->start_time == AV_NOPTS_VALUE)
++ st->start_time = ts;
++
++ pos = avio_size(ic->pb) - 1;
++ do {
++ pos -= step;
++ ts = ic->iformat->read_timestamp(ic, i, &pos, pos + step);
++ step += step;
++ } while (ts == AV_NOPTS_VALUE && pos >= step && step < DURATION_MAX_READ_SIZE);
++
++ if (ts == AV_NOPTS_VALUE)
++ continue;
++
++ if (st->duration < ts - st->start_time || st->duration == AV_NOPTS_VALUE)
++ st->duration = ts - st->start_time;
++ }
++
++ fill_all_stream_timings(ic);
++
++ avio_seek(ic->pb, old_offset, SEEK_SET);
++}
++
+ /* only usable for MPEG-PS streams */
+ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
+ {
+@@ -2605,6 +2640,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
+ * the components */
+ fill_all_stream_timings(ic);
+ ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
++ } else if (ic->iformat->read_timestamp &&
++ file_size && ic->pb->seekable) {
++ /* get accurate estimate from the PTSes */
++ av_estimate_timings_from_pts2(ic, old_offset);
+ } else {
+ /* less precise: use bitrate info */
+ estimate_timings_from_bit_rate(ic);
+
+From a45171f7370c263344805d19181e08a12a65dcdd Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Wed, 8 Dec 2010 14:03:43 +0000
+Subject: [PATCH 08/13] changed: allow 4 second skew between streams in mov
+ before attempting to seek
+
+---
+ libavformat/mov.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavformat/mov.c b/libavformat/mov.c
+index 4ce4e2d..2c364ac 100644
+--- a/libavformat/mov.c
++++ b/libavformat/mov.c
+@@ -4624,8 +4624,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
+ if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
+ (s->pb->seekable &&
+ ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
+- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
+- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
++ ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) ||
++ (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) {
+ sample = current_sample;
+ best_dts = dts;
+ *st = avst;
+
+From c3e8fbd02c2eaba2a5d14d2b6c07fe08746f5947 Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Fri, 26 Nov 2010 20:56:48 +0000
+Subject: [PATCH 09/13] fixed: memleak in mpegts demuxer on some malformed (??)
+ mpegts files with too large pes packets
+
+at-visions sample file brokenStream.mpg
+---
+ libavformat/mpegts.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index a4db558..492d9c7 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -868,6 +868,10 @@ static void reset_pes_packet_state(PESContext *pes)
+
+ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
+ {
++ if(pkt->data) {
++ av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index);
++ av_free_packet(pkt);
++ }
+ av_init_packet(pkt);
+
+ pkt->buf = pes->buffer;
+@@ -2715,6 +2719,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
+
+ pkt->size = -1;
+ ts->pkt = pkt;
++ ts->pkt->data = NULL;
++
+ ret = handle_packets(ts, 0);
+ if (ret < 0) {
+ av_free_packet(ts->pkt);
+
+From eba5c839b7e24f8e6800d3f923d5334c2c9e6b2d Mon Sep 17 00:00:00 2001
+From: Joakim Plate <elupus@ecce.se>
+Date: Mon, 28 Jun 2010 21:26:54 +0000
+Subject: [PATCH 10/13] Speed up mpegts av_find_stream_info
+
+---
+ libavformat/mpegts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
+index 492d9c7..29d58eb 100644
+--- a/libavformat/mpegts.c
++++ b/libavformat/mpegts.c
+@@ -1030,7 +1030,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
+ goto skip;
+
+ /* stream not present in PMT */
+- if (!pes->st) {
++ if (ts->auto_guess && !pes->st) {
+ if (ts->skip_changes)
+ goto skip;
+
+
+From 2372b27243eb7d0932d9885558708ba115596d0b Mon Sep 17 00:00:00 2001
+From: marc <mhocking@ubuntu-desktop.(none)>
+Date: Mon, 18 Feb 2013 17:18:18 +0000
+Subject: [PATCH 11/13] dxva-h264 Fix dxva playback of streams that don't start
+ with an I-Frame (adjusted to 2.7)
+
+---
+ libavcodec/dxva2_h264.c | 8 ++++++++
+ libavcodec/h264.c | 1 +
+ libavcodec/h264.h | 2 ++
+ libavcodec/h264_slice.c | 1 +
+ 4 files changed, 12 insertions(+)
+
+diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
+index 99b80ba..eb5ecd1 100644
+--- a/libavcodec/dxva2_h264.c
++++ b/libavcodec/dxva2_h264.c
+@@ -497,6 +497,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
+
+ if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
+ return -1;
++
++ // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs
++ if (!h->got_first_iframe) {
++ if (!(ctx_pic->pp.wBitFields & (1 << 15)))
++ return -1;
++ h->got_first_iframe = 1;
++ }
++
+ ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f,
+ &ctx_pic->pp, sizeof(ctx_pic->pp),
+ &ctx_pic->qm, sizeof(ctx_pic->qm),
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index 907943e..718b746 100644
+--- a/libavcodec/h264.c
++++ b/libavcodec/h264.c
+@@ -1087,6 +1087,7 @@ void ff_h264_flush_change(H264Context *h)
+
+ h->next_outputed_poc = INT_MIN;
+ h->prev_interlaced_frame = 1;
++ h->got_first_iframe = 0;
+ idr(h);
+
+ h->prev_frame_num = -1;
+diff --git a/libavcodec/h264.h b/libavcodec/h264.h
+index 7356288..907ee5e 100644
+--- a/libavcodec/h264.h
++++ b/libavcodec/h264.h
+@@ -813,6 +813,8 @@ typedef struct H264Context {
+ * slices) anymore */
+ int setup_finished;
+
++ int got_first_iframe;
++
+ // Timestamp stuff
+ int sei_buffering_period_present; ///< Buffering period SEI flag
+ int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs
+diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
+index 8be803b7..939d02b 100644
+--- a/libavcodec/h264_slice.c
++++ b/libavcodec/h264_slice.c
+@@ -1043,6 +1043,7 @@ static int h264_slice_header_init(H264Context *h)
+
+ h->first_field = 0;
+ h->prev_interlaced_frame = 1;
++ h->got_first_iframe = 0;
+
+ init_scan_tables(h);
+ ret = ff_h264_alloc_tables(h);
+
+From 959b88473b6f76fb2245f329ef604d2066b2cb89 Mon Sep 17 00:00:00 2001
+From: wsnipex <wsnipex@a1.net>
+Date: Mon, 16 Feb 2015 09:58:28 +0100
+Subject: [PATCH 12/13] only check for a git rev if the src tree is in a git
+ repo
+
+fixes the version string when building from the kodi depends src tree
+---
+ version.sh | 36 +++++++++++++++++++-----------------
+ 1 file changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/version.sh b/version.sh
+index f9754eb..cc23f80 100755
+--- a/version.sh
++++ b/version.sh
+@@ -2,30 +2,32 @@
+
+ # Usage: version.sh <ffmpeg-root-dir> <output-version.h> <extra-version>
+
++if [ -d $1/.git ]; then # only check for a git rev, if the src tree is in a git repo
+ # check for git short hash
+-if ! test "$revision"; then
++ if ! test "$revision"; then
+ if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then
+ revision=$(cd "$1" && git describe --tags --match N 2> /dev/null)
+ else
+ revision=$(cd "$1" && git describe --tags --always 2> /dev/null)
+ fi
+-fi
++ fi
++
++ # Shallow Git clones (--depth) do not have the N tag:
++ # use 'git-YYYY-MM-DD-hhhhhhh'.
++ test "$revision" || revision=$(cd "$1" &&
++ git log -1 --pretty=format:"git-%cd-%h" --date=short 2> /dev/null)
+
+-# Shallow Git clones (--depth) do not have the N tag:
+-# use 'git-YYYY-MM-DD-hhhhhhh'.
+-test "$revision" || revision=$(cd "$1" &&
+- git log -1 --pretty=format:"git-%cd-%h" --date=short 2> /dev/null)
+-
+-# Snapshots from gitweb are in a directory called ffmpeg-hhhhhhh or
+-# ffmpeg-HEAD-hhhhhhh.
+-if [ -z "$revision" ]; then
+- srcdir=$(cd "$1" && pwd)
+- case "$srcdir" in
+- */ffmpeg-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])
+- git_hash="${srcdir##*-}";;
+- */ffmpeg-HEAD-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])
+- git_hash="${srcdir##*-}";;
+- esac
++ # Snapshots from gitweb are in a directory called ffmpeg-hhhhhhh or
++ # ffmpeg-HEAD-hhhhhhh.
++ if [ -z "$revision" ]; then
++ srcdir=$(cd "$1" && pwd)
++ case "$srcdir" in
++ */ffmpeg-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])
++ git_hash="${srcdir##*-}";;
++ */ffmpeg-HEAD-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])
++ git_hash="${srcdir##*-}";;
++ esac
++ fi
+ fi
+
+ # no revision number found
diff --git a/abs/extra/ffmpeg2.8/ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch b/abs/extra/ffmpeg2.8/ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
new file mode 100644
index 0000000..4cb8dd8
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/ffmpeg-99.0011-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
@@ -0,0 +1,48 @@
+From 84e9a1784bbd3182b68cefa5e5feae8da8b9e184 Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Fri, 5 Jun 2015 22:48:33 +0100
+Subject: [PATCH] mpeg4video: Signal unsupported GMC with more than one warp
+ point
+
+---
+ libavcodec/avcodec.h | 1 +
+ libavcodec/mpeg4videodec.c | 4 ++++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index 8c7c420..e63dc2d 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -2527,6 +2527,7 @@ typedef struct AVCodecContext {
+ #define FF_BUG_DC_CLIP 4096
+ #define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
+ #define FF_BUG_TRUNCATED 16384
++#define FF_BUG_GMC_UNSUPPORTED 32768
+
+ /**
+ * strictly follow the standard (MPEG4, ...).
+diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
+index 9bf33dd..0b5d3b9 100644
+--- a/libavcodec/mpeg4videodec.c
++++ b/libavcodec/mpeg4videodec.c
+@@ -2179,6 +2179,9 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx)
+
+ if (ctx->divx_version >= 0)
+ s->workaround_bugs |= FF_BUG_HPEL_CHROMA;
++
++ if (ctx->num_sprite_warping_points > 1)
++ s->workaround_bugs |= FF_BUG_GMC_UNSUPPORTED;
+ }
+
+ if (s->workaround_bugs & FF_BUG_STD_QPEL) {
+@@ -2203,6 +2206,7 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx)
+ s->workaround_bugs, ctx->lavc_build, ctx->xvid_build,
+ ctx->divx_version, ctx->divx_build, s->divx_packed ? "p" : "");
+
++ avctx->workaround_bugs = s->workaround_bugs;
+ if (CONFIG_MPEG4_DECODER && ctx->xvid_build >= 0 &&
+ s->codec_id == AV_CODEC_ID_MPEG4 &&
+ avctx->idct_algo == FF_IDCT_AUTO) {
+--
+1.9.1
+
diff --git a/abs/extra/ffmpeg2.8/ffmpeg-Speed_up_wtv_index_creation.patch b/abs/extra/ffmpeg2.8/ffmpeg-Speed_up_wtv_index_creation.patch
new file mode 100644
index 0000000..d829898
--- /dev/null
+++ b/abs/extra/ffmpeg2.8/ffmpeg-Speed_up_wtv_index_creation.patch
@@ -0,0 +1,47 @@
+commit 0e7427498cb1131671f6fe9d054245ae7e5a36f5
+Author: popcornmix <popcornmix@gmail.com>
+Date: Tue Mar 25 19:43:07 2014 +0000
+
+ [ffmpeg] Speed up wtv index creation
+
+ The index creation is O(N^2) with number of entries (typically thousands).
+ On a Pi this can take more than 60 seconds to execute for a recording of a few hours.
+
+ By replacing with an O(N) loop, this takes virtually zero time
+
+diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
+index e423370..70898bd 100644
+--- a/libavformat/wtvdec.c
++++ b/libavformat/wtvdec.c
+@@ -980,21 +980,23 @@ static int read_header(AVFormatContext *s)
+ pb = wtvfile_open(s, root, root_size, ff_timeline_table_0_entries_Events_le16);
+ if (pb) {
+ int i;
++ AVIndexEntry *e = wtv->index_entries;
++ AVIndexEntry *e_end = wtv->index_entries + wtv->nb_index_entries - 1;
++ uint64_t last_position = 0;
+ while (1) {
+ uint64_t frame_nb = avio_rl64(pb);
+ uint64_t position = avio_rl64(pb);
++ while (frame_nb > e->size && e <= e_end) {
++ e->pos = last_position;
++ e++;
++ }
+ if (avio_feof(pb))
+ break;
+- for (i = wtv->nb_index_entries - 1; i >= 0; i--) {
+- AVIndexEntry *e = wtv->index_entries + i;
+- if (frame_nb > e->size)
+- break;
+- if (position > e->pos)
+- e->pos = position;
+- }
++ last_position = position;
+ }
++ e_end->pos = last_position;
+ wtvfile_close(pb);
+- st->duration = wtv->index_entries[wtv->nb_index_entries - 1].timestamp;
++ st->duration = e_end->timestamp;
+ }
+ }
+ }
diff --git a/abs/extra/glu/PKGBUILD b/abs/extra/glu/PKGBUILD
index d720ae4..12a1ab6 100644
--- a/abs/extra/glu/PKGBUILD
+++ b/abs/extra/glu/PKGBUILD
@@ -4,13 +4,12 @@
pkgname=glu
pkgver=9.0.0
-pkgrel=2
+pkgrel=4
pkgdesc="Mesa OpenGL Utility library"
arch=('i686' 'x86_64')
url="http://cgit.freedesktop.org/mesa/glu/"
license=('LGPL')
depends=('libgl')
-options=('!libtool')
source=(ftp://ftp.freedesktop.org/pub/mesa/$pkgname/$pkgname-$pkgver.tar.bz2)
sha256sums=('1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12')
diff --git a/abs/extra/gnome-vfs/PKGBUILD b/abs/extra/gnome-vfs/PKGBUILD
index dae1cfe..644d6eb 100644
--- a/abs/extra/gnome-vfs/PKGBUILD
+++ b/abs/extra/gnome-vfs/PKGBUILD
@@ -1,46 +1,59 @@
-# $Id: PKGBUILD 136438 2011-08-29 09:40:33Z ibiru $
+# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnome-vfs
pkgver=2.24.4
-pkgrel=6
+pkgrel=9
pkgdesc="The GNOME Virtual File System"
arch=(i686 x86_64)
license=('LGPL')
depends=('gconf' 'bzip2' 'avahi' 'smbclient' 'gnome-mime-data' 'krb5' 'gnutls' 'libgcrypt')
makedepends=('pkgconfig' 'intltool' 'gtk-doc' 'gnome-common')
-options=('!libtool' '!emptydirs')
+options=('!emptydirs')
url="http://www.gnome.org"
install=gnome-vfs.install
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.24/gnome-vfs-${pkgver}.tar.bz2
+source=(https://download.gnome.org/sources/${pkgname}/2.24/gnome-vfs-${pkgver}.tar.bz2
gnutls-config.patch
- gcrypt-config.patch)
+ gnutls-3.4.0.patch
+ gcrypt-config.patch
+ enable-deprecated.patch)
sha256sums=('62de64b5b804eb04104ff98fcd6a8b7276d510a49fbd9c0feb568f8996444faa'
'66c7cfb12995c0dd94a2caea95c7e3c55981993f05a79c585d60915ff131955d'
- 'c059e218f310da683778919d36e7862f7e763384805f6453d328fbaf507a8114')
+ '5fe5e2e1ad8d8d36deb2d38db621d5b8350aafe3876f722467465c3b3fa304d3'
+ 'c059e218f310da683778919d36e7862f7e763384805f6453d328fbaf507a8114'
+ 'ca2b9dffb1fa202c0d1f0d3648ef37cd8e84657a22d4c6746bb46e9a6cf1ee47')
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+ cd ${pkgname}-${pkgver}
#Fix build with new gnutls
- patch -Np1 -i "${srcdir}/gnutls-config.patch"
+ patch -Np1 -i ../gnutls-config.patch
+ patch -Np1 -i ../gnutls-3.4.0.patch
#fix build with new libgcrypt >= 1.5.0
- patch -Np1 -i "${srcdir}/gcrypt-config.patch"
+ patch -Np1 -i ../gcrypt-config.patch
+ # remove -DG_DISABLE_DEPRECATED
+ patch -Np1 -i ../enable-deprecated.patch
+
+ sed -i -s 's|$(srcdir)/auto-test|auto-test|' test/Makefile.am
+}
+build() {
+ cd ${pkgname}-${pkgver}
libtoolize --force
gtkdocize
aclocal
autoconf
- automake
- ./configure --prefix=/usr --sysconfdir=/etc \
+ automake --add-missing
+ CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure \
+ --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --disable-static \
--libexecdir=/usr/lib/gnome-vfs-2.0 \
- --enable-samba --disable-hal \
- --enable-avahi --disable-howl \
+ --enable-samba --with-samba-includes=/usr/include/samba-4.0 \
+ --disable-hal --enable-avahi --disable-howl \
--disable-openssl --enable-gnutls
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
install -d -m755 "${pkgdir}/usr/share/gconf/schemas"
diff --git a/abs/extra/gnome-vfs/enable-deprecated.patch b/abs/extra/gnome-vfs/enable-deprecated.patch
new file mode 100644
index 0000000..0f249b2
--- /dev/null
+++ b/abs/extra/gnome-vfs/enable-deprecated.patch
@@ -0,0 +1,57 @@
+diff -up gnome-vfs-2.24.4/daemon/Makefile.am.bak gnome-vfs-2.24.4/daemon/Makefile.am
+--- gnome-vfs-2.24.4/daemon/Makefile.am.bak 2010-02-09 13:16:14.000000000 +0100
++++ gnome-vfs-2.24.4/daemon/Makefile.am 2013-03-27 17:01:25.000000000 +0100
+@@ -8,7 +8,6 @@ INCLUDES= \
+ -D_LARGEFILE64_SOURCE \
+ -D_POSIX_PTHREAD_SEMANTICS \
+ -D_REENTRANT \
+- -DG_DISABLE_DEPRECATED \
+ -DGNOME_VFS_PREFIX=\"$(prefix)\" \
+ -DGNOME_VFS_DATADIR=\"$(datadir)\" \
+ -DGNOME_VFS_LIBDIR=\"$(libdir)\" \
+diff -up gnome-vfs-2.24.4/libgnomevfs/Makefile.am.bak gnome-vfs-2.24.4/libgnomevfs/Makefile.am
+--- gnome-vfs-2.24.4/libgnomevfs/Makefile.am.bak 2010-02-09 13:16:14.000000000 +0100
++++ gnome-vfs-2.24.4/libgnomevfs/Makefile.am 2013-03-27 17:01:37.000000000 +0100
+@@ -19,7 +19,6 @@ INCLUDES = \
+ -D_LARGEFILE64_SOURCE \
+ -D_POSIX_PTHREAD_SEMANTICS \
+ -D_REENTRANT \
+- -DG_DISABLE_DEPRECATED \
+ -DGNOME_VFS_PREFIX=\"$(prefix)\" \
+ -DGNOME_VFS_BINDIR=\"$(bindir)\" \
+ -DGNOME_VFS_DATADIR=\"$(datadir)\" \
+diff -up gnome-vfs-2.24.4/modules/Makefile.am.bak gnome-vfs-2.24.4/modules/Makefile.am
+--- gnome-vfs-2.24.4/modules/Makefile.am.bak 2010-02-09 13:16:14.000000000 +0100
++++ gnome-vfs-2.24.4/modules/Makefile.am 2013-03-27 17:01:45.000000000 +0100
+@@ -18,7 +18,6 @@ INCLUDES = \
+ -D_POSIX_PTHREAD_SEMANTICS \
+ -D_REENTRANT \
+ -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" \
+- -DG_DISABLE_DEPRECATED \
+ -DGNOME_VFS_PREFIX=\"$(prefix)\" \
+ -DGNOME_VFS_DATADIR=\"$(datadir)\" \
+ -DGNOME_VFS_LIBDIR=\"$(libdir)\" \
+diff -up gnome-vfs-2.24.4/programs/Makefile.am.bak gnome-vfs-2.24.4/programs/Makefile.am
+--- gnome-vfs-2.24.4/programs/Makefile.am.bak 2010-02-09 13:16:14.000000000 +0100
++++ gnome-vfs-2.24.4/programs/Makefile.am 2013-03-27 17:01:56.000000000 +0100
+@@ -4,8 +4,7 @@ INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_builddir) \
+ $(TEST_CFLAGS) \
+- $(VFS_CFLAGS) \
+- -DG_DISABLE_DEPRECATED
++ $(VFS_CFLAGS)
+
+ libraries = \
+ $(top_builddir)/libgnomevfs/libgnomevfs-2.la \
+diff -up gnome-vfs-2.24.4/test/Makefile.am.bak gnome-vfs-2.24.4/test/Makefile.am
+--- gnome-vfs-2.24.4/test/Makefile.am.bak 2013-03-27 17:01:11.000000000 +0100
++++ gnome-vfs-2.24.4/test/Makefile.am 2013-03-27 17:02:08.000000000 +0100
+@@ -6,7 +6,6 @@ INCLUDES = \
+ -I$(top_builddir)/libgnomevfs \
+ $(TEST_CFLAGS) \
+ $(VFS_CFLAGS) \
+- -DG_DISABLE_DEPRECATED \
+ -DMODULES_PATH=\"$(libdir)/vfs/modules\"
+
+ if OS_WIN32
diff --git a/abs/extra/gnome-vfs/gnutls-3.4.0.patch b/abs/extra/gnome-vfs/gnutls-3.4.0.patch
new file mode 100644
index 0000000..78942f0
--- /dev/null
+++ b/abs/extra/gnome-vfs/gnutls-3.4.0.patch
@@ -0,0 +1,38 @@
+diff -uprw gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-ssl.c gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ssl.c
+--- gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-ssl.c 2010-02-09 14:16:14.000000000 +0200
++++ gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ssl.c 2015-04-14 00:01:51.272451668 +0300
+@@ -314,21 +314,6 @@ gnome_vfs_ssl_create (GnomeVFSSSL **hand
+ #endif
+ }
+
+-#ifdef HAVE_GNUTLS
+-static const int protocol_priority[] = {GNUTLS_TLS1, GNUTLS_SSL3, 0};
+-static const int cipher_priority[] =
+- {GNUTLS_CIPHER_RIJNDAEL_128_CBC, GNUTLS_CIPHER_3DES_CBC,
+- GNUTLS_CIPHER_RIJNDAEL_256_CBC, GNUTLS_CIPHER_ARCFOUR, 0};
+-static const int comp_priority[] =
+- {GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0};
+-static const int kx_priority[] =
+- {GNUTLS_KX_DHE_RSA, GNUTLS_KX_RSA, GNUTLS_KX_DHE_DSS, 0};
+-static const int mac_priority[] =
+- {GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0};
+-
+-#endif
+-
+-
+ /**
+ * gnome_vfs_ssl_create_from_fd:
+ * @handle_return: pointer to a #GnomeVFSSSL struct, which will
+@@ -437,11 +422,7 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS
+ gnutls_transport_set_ptr (ssl->private->tlsstate,
+ GINT_TO_POINTER (fd));
+
+- gnutls_protocol_set_priority (ssl->private->tlsstate, protocol_priority);
+- gnutls_cipher_set_priority (ssl->private->tlsstate, cipher_priority);
+- gnutls_compression_set_priority (ssl->private->tlsstate, comp_priority);
+- gnutls_kx_set_priority (ssl->private->tlsstate, kx_priority);
+- gnutls_mac_set_priority (ssl->private->tlsstate, mac_priority);
++ gnutls_set_default_priority (ssl->private->tlsstate);
+
+ gnutls_cred_set (ssl->private->tlsstate, GNUTLS_CRD_CERTIFICATE,
+ ssl->private->xcred);
diff --git a/abs/extra/google-chrome/PKGBUILD b/abs/extra/google-chrome/PKGBUILD
index 6d76bb9..feafbec 100644
--- a/abs/extra/google-chrome/PKGBUILD
+++ b/abs/extra/google-chrome/PKGBUILD
@@ -5,7 +5,7 @@
# or use: $ curl -s https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/other.xml.gz | gzip -df | awk -F\" '/pkgid/{ sub(".*-","",$4); print $4": "$10 }'
pkgname=google-chrome
-pkgver=50.0.2661.102
+pkgver=54.0.2840.71
pkgrel=1
pkgdesc="An attempt at creating a safer, faster, and more stable browser (Stable Channel)"
arch=('x86_64')
@@ -22,7 +22,7 @@ _channel=stable
source=("google-chrome-${_channel}_${pkgver}_amd64.deb::https://dl.google.com/linux/direct/google-chrome-${_channel}_current_amd64.deb"
"$url/browser/privacy/eula_text.html"
'google-chrome-stable.sh')
-md5sums=('28ea63b729ef8b83bc783ab99cfe8f67'
+md5sums=('9405b4f4ddb6b40b5c5aa260a1566984'
'SKIP'
'99fa93d5e7fb5d622cef0f9621f3ffa3')
diff --git a/abs/extra/hdf5/PKGBUILD b/abs/extra/hdf5/PKGBUILD
new file mode 100644
index 0000000..34ac635
--- /dev/null
+++ b/abs/extra/hdf5/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Tom K <tomk@runbox.com>
+
+pkgname=hdf5
+pkgver=1.10.0
+pkgrel=1
+arch=('i686' 'x86_64')
+pkgdesc="General purpose library and file format for storing scientific data"
+url="http://www.hdfgroup.org/HDF5/"
+license=('custom')
+depends=('zlib' 'sh')
+makedepends=('time')
+source=(ftp://ftp.hdfgroup.org/HDF5/releases/${pkgname}-1.10/${pkgname}-${pkgver}/src/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('5866dbbcd24485f6b206413e73f7205cb3c1196e')
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver/_/-}"
+
+ ./configure --prefix=/usr --disable-static \
+ --enable-hl \
+ --enable-linux-lfs \
+ --enable-build-mode=production \
+ --with-pic \
+ --docdir=/usr/share/doc/hdf5/ \
+ --with-pthread=/usr/lib/ \
+ --disable-sharedlib-rpath
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver/_/-}"
+
+ make -j1 DESTDIR="${pkgdir}" install
+
+ install -d -m755 "$pkgdir/usr/share/licenses/${pkgname}"
+ install -m644 "$srcdir/${pkgname}-${pkgver/_/-}/COPYING" \
+ "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
+}
+
diff --git a/abs/extra/lablgtk2/PKGBUILD b/abs/extra/lablgtk2/PKGBUILD
index c60fc2e..031d54d 100644
--- a/abs/extra/lablgtk2/PKGBUILD
+++ b/abs/extra/lablgtk2/PKGBUILD
@@ -1,20 +1,19 @@
-# $Id: PKGBUILD 148806 2012-02-05 11:51:19Z ibiru $
+# $Id$
#Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgname=lablgtk2
-pkgver=2.14.2
-pkgrel=5
-pkgdesc=" An Objective Caml interface to gtk2"
+pkgver=2.18.3
+pkgrel=2
+pkgdesc="An Objective Caml interface to gtk2"
arch=(i686 x86_64)
license=('LGPL')
url="http://lablgtk.forge.ocamlcore.org/"
depends=('gtk2' 'gtkspell' 'libgnomecanvas' 'librsvg' 'libgnomeui' 'gtksourceview2')
-makedepends=('ocaml')
+makedepends=('ocaml' 'camlp4')
optdepends=('ocaml: for using the tools')
DLAGENTS=('https::/usr/bin/curl -fLC - --insecure --retry 3 --retry-delay 3 -o %o %u')
-source=(https://forge.ocamlcore.org/frs/download.php/561/lablgtk-${pkgver}.tar.gz)
-options=(!makeflags)
-md5sums=('bad77680a72dab8b915cae99d1ec9b1f')
+source=(https://forge.ocamlcore.org/frs/download.php/1479/lablgtk-${pkgver}.tar.gz)
+options=(!makeflags staticlibs)
build() {
cd "${srcdir}/lablgtk-${pkgver}"
@@ -25,6 +24,7 @@ build() {
package() {
cd "${srcdir}/lablgtk-${pkgver}"
- make DESTDIR="${pkgdir}" install
+ make DESTDIR=${pkgdir} old-install
install -m644 META "${pkgdir}/usr/lib/ocaml/lablgtk2/"
}
+md5sums=('bcbad64a28c3dc40f24cc7a4d2f1d0dd')
diff --git a/abs/extra/libebml/PKGBUILD b/abs/extra/libebml/PKGBUILD
index 7302de3..2d4e03f 100644
--- a/abs/extra/libebml/PKGBUILD
+++ b/abs/extra/libebml/PKGBUILD
@@ -1,26 +1,32 @@
-# $Id: PKGBUILD 143796 2011-11-29 12:02:45Z giovanni $
+# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: 03/08/04 <lefungus@altern.org>
pkgname=libebml
-pkgver=1.2.2
+pkgver=1.3.3
pkgrel=2
pkgdesc="Extensible Binary Meta Language library"
arch=('i686' 'x86_64')
url="http://dl.matroska.org/downloads/libebml/"
license=('LGPL')
depends=('gcc-libs')
+provides=('libebml.so')
source=("http://dl.matroska.org/downloads/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('726cc2bd1a525929ff35ff9854c0ebab')
+md5sums=('a8b270482620970d9891958618b54d77')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}/make/linux"
+ cd ${pkgname}-${pkgver}
+ ./configure \
+ --prefix='/usr'
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}/make/linux"
+ cd ${pkgname}-${pkgver}
make prefix="${pkgdir}/usr" install
}
+
+# vim: ts=2 sw=2 et:
diff --git a/abs/extra/libglvnd/PKGBUILD b/abs/extra/libglvnd/PKGBUILD
index f79af81..e9753c8 100644
--- a/abs/extra/libglvnd/PKGBUILD
+++ b/abs/extra/libglvnd/PKGBUILD
@@ -2,8 +2,7 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=libglvnd
-pkgver=0.1.0.20160411
-_commit=5a69af6
+pkgver=0.1.1
pkgrel=1
pkgdesc="The GL Vendor-Neutral Dispatch library"
arch=('i686' 'x86_64')
@@ -11,7 +10,7 @@ url="https://github.com/NVIDIA/libglvnd"
license=('custom:BSD-like')
depends=('libxext')
makedepends=('xorg-server-devel' 'git' 'python2')
-source=("git+https://github.com/NVIDIA/libglvnd.git#commit=$_commit"
+source=("git+https://github.com/NVIDIA/libglvnd.git#tag=v$pkgver"
LICENSE)
sha1sums=('SKIP'
'c88e07f333fcf8dcdbef370b85372b4d88ad8a66')
diff --git a/abs/extra/libmatroska/PKGBUILD b/abs/extra/libmatroska/PKGBUILD
index 963e241..aad2197 100644
--- a/abs/extra/libmatroska/PKGBUILD
+++ b/abs/extra/libmatroska/PKGBUILD
@@ -1,26 +1,33 @@
# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor 03/08/04 <lefungus@altern.org>
pkgname=libmatroska
-pkgver=1.4.1
+pkgver=1.4.4
pkgrel=1
pkgdesc="Matroska library"
arch=('i686' 'x86_64')
url="http://dl.matroska.org/downloads/libmatroska/"
license=('LGPL')
-depends=('libebml')
+depends=('libebml.so')
+provides=('libmatroska.so')
source=("http://dl.matroska.org/downloads/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('f61b2e5086f4bb9d24a43cc8af43a719')
+md5sums=('6a8e4528f713ec33faf4d793e61f883c')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}/make/linux"
+ cd ${pkgname}-${pkgver}
- make sharedlib
+ ./configure \
+ --prefix='/usr' \
+ --disable-static
+ make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}/make/linux"
+ cd ${pkgname}-${pkgver}
make prefix="${pkgdir}/usr" install
}
+
+# vim: ts=2 sw=2 et:
diff --git a/abs/extra/llvm/0001-New-MSan-mapping-layout-compiler-rt-part.patch b/abs/extra/llvm/0001-New-MSan-mapping-layout-compiler-rt-part.patch
deleted file mode 100644
index d5e06a7..0000000
--- a/abs/extra/llvm/0001-New-MSan-mapping-layout-compiler-rt-part.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 0bee2d927c97454e629b0789c7f4e3d509cf4178 Mon Sep 17 00:00:00 2001
-From: Evgeniy Stepanov <eugeni.stepanov@gmail.com>
-Date: Thu, 8 Oct 2015 21:35:34 +0000
-Subject: [PATCH] New MSan mapping layout (compiler-rt part).
-
-This is an implementation of
-https://github.com/google/sanitizers/issues/579
-
-It has a number of advantages over the current mapping:
-* Works for non-PIE executables.
-* Does not require ASLR; as a consequence, debugging MSan programs in
- gdb no longer requires "set disable-randomization off".
-* Supports linux kernels >=4.1.2.
-* The code is marginally faster and smaller.
-
-This is an ABI break. We never really promised ABI stability, but
-this patch includes a courtesy escape hatch: a compile-time macro
-that reverts back to the old mapping layout.
-
-git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249754 91177308-0d34-0410-b5e6-96231b3b80d8
----
- lib/msan/msan.h | 23 ++++++++++++++++++++++
- lib/msan/msan_allocator.cc | 8 +++++++-
- test/msan/mmap.cc | 4 +++-
- test/msan/strlen_of_shadow.cc | 2 +-
- .../TestCases/Posix/decorate_proc_maps.cc | 4 ++--
- 5 files changed, 36 insertions(+), 5 deletions(-)
-
-diff --git a/lib/msan/msan.h b/lib/msan/msan.h
-index 3776fa9..2d77983 100644
---- a/lib/msan/msan.h
-+++ b/lib/msan/msan.h
-@@ -135,6 +135,7 @@ const MappingDesc kMemoryLayout[] = {
-
- #elif SANITIZER_LINUX && SANITIZER_WORDSIZE == 64
-
-+#ifdef MSAN_LINUX_X86_64_OLD_MAPPING
- // Requries PIE binary and ASLR enabled.
- // Main thread stack and DSOs at 0x7f0000000000 (sometimes 0x7e0000000000).
- // Heap at 0x600000000000.
-@@ -146,6 +147,28 @@ const MappingDesc kMemoryLayout[] = {
-
- #define MEM_TO_SHADOW(mem) (((uptr)(mem)) & ~0x400000000000ULL)
- #define SHADOW_TO_ORIGIN(mem) (((uptr)(mem)) + 0x200000000000ULL)
-+#else // MSAN_LINUX_X86_64_OLD_MAPPING
-+// All of the following configurations are supported.
-+// ASLR disabled: main executable and DSOs at 0x555550000000
-+// PIE and ASLR: main executable and DSOs at 0x7f0000000000
-+// non-PIE: main executable below 0x100000000, DSOs at 0x7f0000000000
-+// Heap at 0x700000000000.
-+const MappingDesc kMemoryLayout[] = {
-+ {0x000000000000ULL, 0x010000000000ULL, MappingDesc::APP, "app-1"},
-+ {0x010000000000ULL, 0x100000000000ULL, MappingDesc::SHADOW, "shadow-2"},
-+ {0x100000000000ULL, 0x110000000000ULL, MappingDesc::INVALID, "invalid"},
-+ {0x110000000000ULL, 0x200000000000ULL, MappingDesc::ORIGIN, "origin-2"},
-+ {0x200000000000ULL, 0x300000000000ULL, MappingDesc::SHADOW, "shadow-3"},
-+ {0x300000000000ULL, 0x400000000000ULL, MappingDesc::ORIGIN, "origin-3"},
-+ {0x400000000000ULL, 0x500000000000ULL, MappingDesc::INVALID, "invalid"},
-+ {0x500000000000ULL, 0x510000000000ULL, MappingDesc::SHADOW, "shadow-1"},
-+ {0x510000000000ULL, 0x600000000000ULL, MappingDesc::APP, "app-2"},
-+ {0x600000000000ULL, 0x610000000000ULL, MappingDesc::ORIGIN, "origin-1"},
-+ {0x610000000000ULL, 0x700000000000ULL, MappingDesc::INVALID, "invalid"},
-+ {0x700000000000ULL, 0x800000000000ULL, MappingDesc::APP, "app-3"}};
-+#define MEM_TO_SHADOW(mem) (((uptr)(mem)) ^ 0x500000000000ULL)
-+#define SHADOW_TO_ORIGIN(mem) (((uptr)(mem)) + 0x100000000000ULL)
-+#endif // MSAN_LINUX_X86_64_OLD_MAPPING
-
- #else
- #error "Unsupported platform"
-diff --git a/lib/msan/msan_allocator.cc b/lib/msan/msan_allocator.cc
-index 865a458..b7d3947 100644
---- a/lib/msan/msan_allocator.cc
-+++ b/lib/msan/msan_allocator.cc
-@@ -49,15 +49,21 @@ struct MsanMapUnmapCallback {
- typedef SizeClassAllocator32<0, SANITIZER_MMAP_RANGE_SIZE, sizeof(Metadata),
- SizeClassMap, kRegionSizeLog, ByteMap,
- MsanMapUnmapCallback> PrimaryAllocator;
-+
- #elif defined(__x86_64__)
-+#if SANITIZER_LINUX && !defined(MSAN_LINUX_X86_64_OLD_MAPPING)
-+ static const uptr kAllocatorSpace = 0x700000000000ULL;
-+#else
- static const uptr kAllocatorSpace = 0x600000000000ULL;
-- static const uptr kAllocatorSize = 0x80000000000; // 8T.
-+#endif
-+ static const uptr kAllocatorSize = 0x80000000000; // 8T.
- static const uptr kMetadataSize = sizeof(Metadata);
- static const uptr kMaxAllowedMallocSize = 8UL << 30;
-
- typedef SizeClassAllocator64<kAllocatorSpace, kAllocatorSize, kMetadataSize,
- DefaultSizeClassMap,
- MsanMapUnmapCallback> PrimaryAllocator;
-+
- #elif defined(__powerpc64__)
- static const uptr kAllocatorSpace = 0x300000000000;
- static const uptr kAllocatorSize = 0x020000000000; // 2T
-diff --git a/test/msan/mmap.cc b/test/msan/mmap.cc
-index 250ce34..962836c 100644
---- a/test/msan/mmap.cc
-+++ b/test/msan/mmap.cc
-@@ -15,7 +15,9 @@ bool AddrIsApp(void *p) {
- #if defined(__FreeBSD__) && defined(__x86_64__)
- return addr < 0x010000000000ULL || addr >= 0x600000000000ULL;
- #elif defined(__x86_64__)
-- return addr >= 0x600000000000ULL;
-+ return (addr >= 0x000000000000ULL && addr < 0x010000000000ULL) ||
-+ (addr >= 0x510000000000ULL && addr < 0x600000000000ULL) ||
-+ (addr >= 0x700000000000ULL && addr < 0x800000000000ULL);
- #elif defined(__mips64)
- return addr >= 0x00e000000000ULL;
- #elif defined(__powerpc64__)
-diff --git a/test/msan/strlen_of_shadow.cc b/test/msan/strlen_of_shadow.cc
-index fee9223..0594f00 100644
---- a/test/msan/strlen_of_shadow.cc
-+++ b/test/msan/strlen_of_shadow.cc
-@@ -12,7 +12,7 @@
-
- const char *mem_to_shadow(const char *p) {
- #if defined(__x86_64__)
-- return (char *)((uintptr_t)p & ~0x400000000000ULL);
-+ return (char *)((uintptr_t)p ^ 0x500000000000ULL);
- #elif defined (__mips64)
- return (char *)((uintptr_t)p & ~0x4000000000ULL);
- #elif defined(__powerpc64__)
-diff --git a/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc b/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
-index 8744c3f..36d4df5 100644
---- a/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
-+++ b/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
-@@ -47,8 +47,8 @@ int main(void) {
- // CHECK-asan: rw-p {{.*}} [high shadow]
-
- // CHECK-msan: ---p {{.*}} [invalid]
--// CHECK-msan: rw-p {{.*}} [shadow]
--// CHECK-msan: ---p {{.*}} [origin]
-+// CHECK-msan: rw-p {{.*}} [shadow{{.*}}]
-+// CHECK-msan: ---p {{.*}} [origin{{.*}}]
-
- // CHECK-tsan: rw-p {{.*}} [shadow]
- // CHECK-tsan: rw-p {{.*}} [meta shadow]
---
-2.6.1
-
diff --git a/abs/extra/llvm/0001-New-MSan-mapping-layout-llvm-part.patch b/abs/extra/llvm/0001-New-MSan-mapping-layout-llvm-part.patch
deleted file mode 100644
index 28fe687..0000000
--- a/abs/extra/llvm/0001-New-MSan-mapping-layout-llvm-part.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 2c87d24da09ecd2c14c38a0b4f7a0e3f332b08ee Mon Sep 17 00:00:00 2001
-From: Evgeniy Stepanov <eugeni.stepanov@gmail.com>
-Date: Thu, 8 Oct 2015 21:35:26 +0000
-Subject: [PATCH] New MSan mapping layout (llvm part).
-
-This is an implementation of
-https://github.com/google/sanitizers/issues/579
-
-It has a number of advantages over the current mapping:
-* Works for non-PIE executables.
-* Does not require ASLR; as a consequence, debugging MSan programs in
- gdb no longer requires "set disable-randomization off".
-* Supports linux kernels >=4.1.2.
-* The code is marginally faster and smaller.
-
-This is an ABI break. We never really promised ABI stability, but
-this patch includes a courtesy escape hatch: a compile-time macro
-that reverts back to the old mapping layout.
-
-git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249753 91177308-0d34-0410-b5e6-96231b3b80d8
----
- lib/Transforms/Instrumentation/MemorySanitizer.cpp | 22 +++++++++++++++-------
- .../MemorySanitizer/origin-alignment.ll | 10 ++++++----
- 2 files changed, 21 insertions(+), 11 deletions(-)
-
-diff --git a/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/lib/Transforms/Instrumentation/MemorySanitizer.cpp
-index 9d4c7de..bc6da5a 100644
---- a/lib/Transforms/Instrumentation/MemorySanitizer.cpp
-+++ b/lib/Transforms/Instrumentation/MemorySanitizer.cpp
-@@ -232,10 +232,17 @@ static const MemoryMapParams Linux_I386_MemoryMapParams = {
-
- // x86_64 Linux
- static const MemoryMapParams Linux_X86_64_MemoryMapParams = {
-+#ifdef MSAN_LINUX_X86_64_OLD_MAPPING
- 0x400000000000, // AndMask
- 0, // XorMask (not used)
- 0, // ShadowBase (not used)
- 0x200000000000, // OriginBase
-+#else
-+ 0, // AndMask (not used)
-+ 0x500000000000, // XorMask
-+ 0, // ShadowBase (not used)
-+ 0x100000000000, // OriginBase
-+#endif
- };
-
- // mips64 Linux
-@@ -926,16 +933,17 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
- ///
- /// Offset = (Addr & ~AndMask) ^ XorMask
- Value *getShadowPtrOffset(Value *Addr, IRBuilder<> &IRB) {
-+ Value *OffsetLong = IRB.CreatePointerCast(Addr, MS.IntptrTy);
-+
- uint64_t AndMask = MS.MapParams->AndMask;
-- assert(AndMask != 0 && "AndMask shall be specified");
-- Value *OffsetLong =
-- IRB.CreateAnd(IRB.CreatePointerCast(Addr, MS.IntptrTy),
-- ConstantInt::get(MS.IntptrTy, ~AndMask));
-+ if (AndMask)
-+ OffsetLong =
-+ IRB.CreateAnd(OffsetLong, ConstantInt::get(MS.IntptrTy, ~AndMask));
-
- uint64_t XorMask = MS.MapParams->XorMask;
-- if (XorMask != 0)
-- OffsetLong = IRB.CreateXor(OffsetLong,
-- ConstantInt::get(MS.IntptrTy, XorMask));
-+ if (XorMask)
-+ OffsetLong =
-+ IRB.CreateXor(OffsetLong, ConstantInt::get(MS.IntptrTy, XorMask));
- return OffsetLong;
- }
-
-diff --git a/test/Instrumentation/MemorySanitizer/origin-alignment.ll b/test/Instrumentation/MemorySanitizer/origin-alignment.ll
-index ce0dbfc..562d194 100644
---- a/test/Instrumentation/MemorySanitizer/origin-alignment.ll
-+++ b/test/Instrumentation/MemorySanitizer/origin-alignment.ll
-@@ -24,7 +24,7 @@ entry:
- ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
--; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 and (i64 ptrtoint {{.*}} to i32*), align 8
-+; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 xor (i64 ptrtoint (i8* @a8 to i64), i64 {{.*}}), i64 {{.*}}) to i32*), align 8
- ; CHECK: ret void
-
-
-@@ -39,7 +39,7 @@ entry:
- ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
--; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 and (i64 ptrtoint {{.*}} to i32*), align 4
-+; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 add (i64 xor (i64 ptrtoint (i8* @a4 to i64), i64 {{.*}}), i64 {{.*}}) to i32*), align 4
- ; CHECK: ret void
-
-
-@@ -54,7 +54,8 @@ entry:
- ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
--; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 and (i64 add (i64 and (i64 ptrtoint {{.*}} i64 -4) to i32*), align 4
-+; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 and (i64 add (i64 xor (i64 ptrtoint (i8* @a2 to i64), i64 {{.*}}), i64 {{.*}}), i64 -4) to i32*), align 4
-+
- ; CHECK: ret void
-
-
-@@ -69,5 +70,6 @@ entry:
- ; CHECK-ORIGINS1: [[ORIGIN:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN0:%[01-9a-z]+]] = load {{.*}} @__msan_param_origin_tls
- ; CHECK-ORIGINS2: [[ORIGIN:%[01-9a-z]+]] = call i32 @__msan_chain_origin(i32 [[ORIGIN0]])
--; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 and (i64 add (i64 and (i64 ptrtoint {{.*}} i64 -4) to i32*), align 4
-+; CHECK: store i32 [[ORIGIN]], i32* inttoptr (i64 and (i64 add (i64 xor (i64 ptrtoint (i8* @a1 to i64), i64 {{.*}}), i64 {{.*}}), i64 -4) to i32*), align 4
-+
- ; CHECK: ret void
---
-2.6.1
-
diff --git a/abs/extra/llvm/PKGBUILD b/abs/extra/llvm/PKGBUILD
index 960fa13..f39c8d3 100644
--- a/abs/extra/llvm/PKGBUILD
+++ b/abs/extra/llvm/PKGBUILD
@@ -9,9 +9,8 @@
# Contributor: Roberto Alsina <ralsina@kde.org>
# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lldb' 'clang' 'clang-analyzer'
- 'clang-tools-extra')
-pkgver=3.7.1
+pkgname=('llvm' 'llvm-libs' 'llvm-ocaml' 'lldb' 'clang' 'clang-tools-extra')
+pkgver=3.9.0
pkgrel=1
_ocaml_ver=4.02.3
arch=('i686' 'x86_64')
@@ -27,34 +26,20 @@ source=(http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
http://llvm.org/releases/$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz{,.sig}
http://llvm.org/releases/$pkgver/lldb-$pkgver.src.tar.xz{,.sig}
- llvm-3.7.0-link-tools-against-libLLVM.patch
- llvm-3.7.0-export-more-symbols.patch
- clang-3.7.0-add-gcc-abi-tag-support.patch
- clang-tools-extra-3.7.0-install-clang-query.patch
- lldb-3.7.0-avoid-linking-to-libLLVM.patch
- 0001-New-MSan-mapping-layout-llvm-part.patch
- 0001-New-MSan-mapping-layout-compiler-rt-part.patch
llvm-Config-llvm-config.h)
-sha256sums=('be7794ed0cec42d6c682ca8e3517535b54555a3defabec83554dbc74db545ad5'
+sha256sums=('66c73179da42cee1386371641241f79ded250e117a79f571bbd69e56daa48948'
'SKIP'
- '56e2164c7c2a1772d5ed2a3e57485ff73ff06c97dff12edbeea1acc4412b0674'
+ '7596a7c7d9376d0c89e60028fe1ceb4d3e535e8ea8b89e0eb094e0dcb3183d28'
'SKIP'
- '4a91edaccad1ce984c7c49a4a87db186b7f7b21267b2b03bcf4bd7820715bc6b'
+ '5b7aec46ec8e999ec683c87ad744082e1133781ee4b01905b4bdae5d20785f14'
'SKIP'
- '9d4769e4a927d3824bcb7a9c82b01e307c68588e6de4e7f04ab82d82c5af8181'
+ 'e0e5224fcd5740b61e416c549dd3dcda92f10c524216c1edb5e979e42078a59a'
'SKIP'
- '9a0bc315ef55f44c98cdf92d064df0847f453ed156dd0ef6a87e04f5fd6a0e01'
+ '61280e07411e3f2b4cca0067412b39c16b0a9edd19d304d3fc90249899d12384'
'SKIP'
- 'cf9c8b4d70b4547eda162644658c5c203c3139fcea6c75003b6cd7dc11a8cccc'
- 'a1c9f36b97c639666ab6a1bd647a08a027e93e3d3cfd6f5af9c36e757599ce81'
- '5ed52d54612829402b63bc500bfefae75b3dc444a1524849c26cadf7e0ae4b7d'
- '3abf85430c275ecb8dbb526ecb82b1c9f4b4f782a8a43b5a06d040ec0baba7e7'
- '2d53b6ed4c7620eeade87e7761b98093a0434801ddd599056daed7881141fb01'
- 'c5f4e329143bef36b623ba5daf311b5a73fa99ab05fed4ba506c1c3bc4cf5ee7'
- 'f44e8fe3cef9b6f706d651f443922261e1dcf53bcaabdd0ac7edb1758e4bc44d'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
-validpgpkeys=('11E521D646982372EB577A1F8F0871F202119294'
- 'B6C8F98282B944E3B0D5C2530FC3042E345AD05D')
+validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D'
+ '11E521D646982372EB577A1F8F0871F202119294')
prepare() {
cd "$srcdir/llvm-$pkgver.src"
@@ -69,33 +54,6 @@ prepare() {
mv "$srcdir/lldb-$pkgver.src" tools/lldb
- # Backport LLVM_LINK_LLVM_DYLIB option
- # https://bugs.archlinux.org/task/46392
- patch -Np1 -i ../llvm-3.7.0-link-tools-against-libLLVM.patch
-
- # https://llvm.org/bugs/show_bug.cgi?id=24157
- patch -Np2 -i ../llvm-3.7.0-export-more-symbols.patch
-
- # https://llvm.org/bugs/show_bug.cgi?id=23529
- # http://reviews.llvm.org/D12834
- patch -d tools/clang -Np0 <../clang-3.7.0-add-gcc-abi-tag-support.patch
-
- # https://llvm.org/bugs/show_bug.cgi?id=24046
- # Upstreamed - http://reviews.llvm.org/D13206
- patch -d tools/clang/tools/extra -Np1 <../clang-tools-extra-3.7.0-install-clang-query.patch
-
- # https://llvm.org/bugs/show_bug.cgi?id=24953
- patch -d tools/lldb -Np1 <../lldb-3.7.0-avoid-linking-to-libLLVM.patch
-
- # https://llvm.org/bugs/show_bug.cgi?id=24155
- patch -Np1 -i ../0001-New-MSan-mapping-layout-llvm-part.patch
- patch -d projects/compiler-rt -Np1 <../0001-New-MSan-mapping-layout-compiler-rt-part.patch
-
- # Use Python 2
- find tools/lldb -name Makefile -exec sed -i 's/python-config/python2-config/' {} +
- sed -i 's|/usr/bin/env python|&2|' \
- tools/lldb/scripts/Python/{build-swig-Python,finish-swig-Python-LLDB}.sh
-
mkdir build
}
@@ -131,8 +89,7 @@ build() {
check() {
cd "$srcdir/llvm-$pkgver.src/build"
make check
- make check-clang || warning \
- 'Ignoring Clang test failures caused by name mangling differences'
+ make check-clang
}
package_llvm() {
@@ -147,7 +104,7 @@ package_llvm() {
rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
# The runtime libraries go into llvm-libs
- mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO}.so* "$srcdir"
+ mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO}*.so "$srcdir"
mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
# OCaml bindings go to a separate package
@@ -173,7 +130,7 @@ package_llvm-libs() {
install -d "$pkgdir/usr/lib"
cp -P \
- "$srcdir"/lib{LLVM,LTO}.so* \
+ "$srcdir"/lib{LLVM,LTO}*.so \
"$srcdir"/LLVMgold.so \
"$pkgdir/usr/lib/"
@@ -202,12 +159,15 @@ package_llvm-ocaml() {
package_lldb() {
pkgdesc="Next generation, high-performance debugger"
url="http://lldb.llvm.org/"
- depends=('libedit' 'libxml2' 'python2')
+ depends=('libedit' 'libxml2' 'python2' 'python2-six')
cd "$srcdir/llvm-$pkgver.src"
make -C build/tools/lldb DESTDIR="$pkgdir" install
+ # Remove bundled six library
+ rm "$pkgdir/usr/lib/python2.7/site-packages/six.py"
+
# Compile Python scripts
python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/lldb"
@@ -218,8 +178,12 @@ package_lldb() {
package_clang() {
pkgdesc="C language family frontend for LLVM"
url="http://clang.llvm.org/"
- depends=("llvm-libs=$pkgver-$pkgrel" 'gcc')
- optdepends=('python2: for git-clang-format')
+ depends=("llvm-libs=$pkgver-$pkgrel" 'gcc' 'libxml2')
+ optdepends=('openmp: OpenMP support in clang with -fopenmp'
+ 'python2: for scan-view and git-clang-format')
+ provides=("clang-analyzer=$pkgver")
+ conflicts=('clang-analyzer')
+ replaces=('clang-analyzer')
cd "$srcdir/llvm-$pkgver.src"
@@ -229,58 +193,31 @@ package_clang() {
# Remove documentation sources
rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
+ # Move analyzer scripts out of /usr/libexec
+ mv "$pkgdir"/usr/libexec/{ccc,c++}-analyzer "$pkgdir/usr/lib/clang/"
+ rmdir "$pkgdir/usr/libexec"
+ sed -i 's|libexec|lib/clang|' "$pkgdir/usr/bin/scan-build"
+
# Install Python bindings
install -d "$pkgdir/usr/lib/python2.7/site-packages"
cp -a tools/clang/bindings/python/clang "$pkgdir/usr/lib/python2.7/site-packages/"
- python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/clang"
- python2 -O -m compileall "$pkgdir/usr/lib/python2.7/site-packages/clang"
# Use Python 2
sed -i 's|/usr/bin/env python|&2|' \
+ "$pkgdir/usr/bin/scan-view" \
"$pkgdir/usr/bin/git-clang-format" \
"$pkgdir/usr/share/$pkgname/clang-format-diff.py"
- install -Dm644 tools/clang/LICENSE.TXT \
- "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-package_clang-analyzer() {
- pkgdesc="A source code analysis framework"
- url="http://clang-analyzer.llvm.org/"
- depends=("clang=$pkgver-$pkgrel" 'python2')
-
- cd "$srcdir/llvm-$pkgver.src/tools/clang"
-
- install -d "$pkgdir"/usr/{bin,lib/clang-analyzer}
- for _tool in scan-{build,view}; do
- cp -a tools/$_tool "$pkgdir/usr/lib/clang-analyzer/"
- ln -s /usr/lib/clang-analyzer/$_tool/$_tool "$pkgdir/usr/bin/"
- done
-
- # scan-build looks for clang within the same directory
- ln -s /usr/bin/clang "$pkgdir/usr/lib/clang-analyzer/scan-build/"
-
- # Relocate man page
- install -d "$pkgdir/usr/share/man/man1"
- mv "$pkgdir/usr/lib/clang-analyzer/scan-build/scan-build.1" \
- "$pkgdir/usr/share/man/man1/"
-
- # Use Python 2
- sed -i \
- -e 's|env python$|&2|' \
- -e 's|/usr/bin/python$|&2|' \
- "$pkgdir/usr/lib/clang-analyzer/scan-view/scan-view" \
- "$pkgdir/usr/lib/clang-analyzer/scan-build/set-xcode-analyzer"
-
# Compile Python scripts
- python2 -m compileall "$pkgdir/usr/lib/clang-analyzer"
- python2 -O -m compileall "$pkgdir/usr/lib/clang-analyzer"
+ python2 -m compileall "$pkgdir"
+ python2 -O -m compileall "$pkgdir"
- install -Dm644 LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 tools/clang/LICENSE.TXT \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_clang-tools-extra() {
- pkgdesc="Extra tools built using Clang's tooling APIs"
+ pkgdesc="Extra tools built using clang's tooling APIs"
url="http://clang.llvm.org/"
depends=("clang=$pkgver-$pkgrel")
diff --git a/abs/extra/llvm/clang-3.7.0-add-gcc-abi-tag-support.patch b/abs/extra/llvm/clang-3.7.0-add-gcc-abi-tag-support.patch
deleted file mode 100644
index 9d2dddd..0000000
--- a/abs/extra/llvm/clang-3.7.0-add-gcc-abi-tag-support.patch
+++ /dev/null
@@ -1,1267 +0,0 @@
-Index: docs/ItaniumMangleAbiTags.rst
-===================================================================
---- /dev/null
-+++ docs/ItaniumMangleAbiTags.rst
-@@ -0,0 +1,90 @@
-+========
-+Abi Tags
-+========
-+
-+Introduction
-+============
-+
-+This text tries to describe gcc semantic for mangling "abi_tag" attributes
-+described in https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html
-+
-+There is no guarantee the following rules are correct, complete or make sense
-+in any way as they were determined empirically by experiments with gcc5.
-+
-+Declaration
-+===========
-+
-+Abi tags are declared in an abi_tag attribute and can be applied to a
-+function, variable, class or inline namespace declaration. The attribute takes
-+one or more strings (called tags); the order does not matter.
-+
-+See https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html for
-+details.
-+
-+Tags on an inline namespace are called "implicit tags", all other tags are
-+"explicit tags".
-+
-+Mangling
-+========
-+
-+All tags that are "active" on a <unqualified-name> are emitted after the
-+<unqualified-name>, before <template-args> or <discriminator>, and are part of
-+the same <substitution> the <unqualified-name> is.
-+
-+They are mangled as:
-+
-+ <abi-tags> ::= <abi-tag>* # sort by name
-+ <abi-tag> ::= B <tag source-name>
-+
-+Example:
-+
-+ __attribute__((abi_tag("test")))
-+ void Func();
-+
-+ gets mangled as: _Z4FuncB4testv (prettified as `Func[abi:test]()`)
-+
-+Active tags
-+===========
-+
-+A namespace has never any active tags; for types (class / struct / union /
-+enum) the explicit tags are the active tags.
-+
-+For variables and functions the active tags are the explicit tags plus any
-+"required tags" which are not in the "available tags" set:
-+
-+ derived-tags := (required-tags - available-tags)
-+ active-tags := explicit-tags + derived-tags
-+
-+Required tags for a function
-+============================
-+
-+If a function is used as a local scope for another name, and is part of
-+another function as local scope, it doesn't have any required tags.
-+
-+If a function is used as a local scope for a guard variable name, it doesn't
-+have any required tags.
-+
-+Otherwise the function requires any implicit or explicit tag used in the name
-+for the return type.
-+
-+Required tags for a variable
-+============================
-+
-+A variable requires any implicit or explicit tag used in its type.
-+
-+Available tags
-+==============
-+
-+All tags used in the prefix and in the template arguments for a name are
-+available; for functions also all tags from the <bare-function-type> (which
-+might include the return type for template functions) are available.
-+
-+For <local-name>s all active tags used in the local part (<function-
-+encoding>) are available, but not implicit tags which were not active!
-+
-+Implicit and explicit tags used in the <unqualified-name> for a function (as
-+in the type of a cast operator) are NOT available.
-+
-+Example: a cast operator to std::string (which is
-+std::__cxx11::basic_string<...>) will use 'cxx11' as active tag, as it is
-+required from the return type `std::string` but not available.
-Index: include/clang/Basic/Attr.td
-===================================================================
---- include/clang/Basic/Attr.td
-+++ include/clang/Basic/Attr.td
-@@ -349,6 +349,14 @@
- // Attributes begin here
- //
-
-+def AbiTag : Attr {
-+ let Spellings = [GCC<"abi_tag">];
-+ let Args = [VariadicStringArgument<"Tags">];
-+ let Subjects = SubjectList<[Struct, Var, Function, Namespace], ErrorDiag,
-+ "ExpectedStructClassVariableFunctionMethodOrInlineNamespace">;
-+ let Documentation = [Undocumented];
-+}
-+
- def AddressSpace : TypeAttr {
- let Spellings = [GNU<"address_space">];
- let Args = [IntArgument<"AddressSpace">];
-Index: include/clang/Basic/DiagnosticSemaKinds.td
-===================================================================
---- include/clang/Basic/DiagnosticSemaKinds.td
-+++ include/clang/Basic/DiagnosticSemaKinds.td
-@@ -2434,7 +2434,8 @@
- "Objective-C instance methods|init methods of interface or class extension declarations|"
- "variables, functions and classes|Objective-C protocols|"
- "functions and global variables|structs, unions, and typedefs|structs and typedefs|"
-- "interface or protocol declarations|kernel functions}1">,
-+ "interface or protocol declarations|kernel functions|"
-+ "structs, classes, variables, functions, methods and inline namespaces}1">,
- InGroup<IgnoredAttributes>;
- def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
- def warn_type_attribute_wrong_type : Warning<
-@@ -4144,6 +4145,15 @@
- def err_redefinition_extern_inline : Error<
- "redefinition of a 'extern inline' function %0 is not supported in "
- "%select{C99 mode|C++}1">;
-+def err_attr_abi_tag_only_on_inline_namespace :
-+ Error<"abi_tag attribute only allowed on inline namespaces">;
-+def err_attr_abi_tag_only_on_named_namespace :
-+ Error<"abi_tag attribute only allowed on named namespaces">;
-+def err_abi_tag_on_redeclaration :
-+ Error<"cannot add abi_tag attribute in redeclaration">;
-+def err_new_abi_tag_on_redeclaration :
-+ Error<"abi_tag %0 missing in original declaration">;
-+
-
- def note_deleted_dtor_no_operator_delete : Note<
- "virtual destructor requires an unambiguous, accessible 'operator delete'">;
-Index: include/clang/Sema/AttributeList.h
-===================================================================
---- include/clang/Sema/AttributeList.h
-+++ include/clang/Sema/AttributeList.h
-@@ -855,7 +855,8 @@
- ExpectedStructOrUnionOrTypedef,
- ExpectedStructOrTypedef,
- ExpectedObjectiveCInterfaceOrProtocol,
-- ExpectedKernelFunction
-+ ExpectedKernelFunction,
-+ ExpectedStructClassVariableFunctionMethodOrInlineNamespace
- };
-
- } // end namespace clang
-Index: lib/AST/ItaniumMangle.cpp
-===================================================================
---- lib/AST/ItaniumMangle.cpp
-+++ lib/AST/ItaniumMangle.cpp
-@@ -31,6 +31,7 @@
- #include "llvm/ADT/StringExtras.h"
- #include "llvm/Support/ErrorHandling.h"
- #include "llvm/Support/raw_ostream.h"
-+#include <set>
-
- #define MANGLE_CHECKER 0
-
-@@ -212,6 +212,8 @@
- class CXXNameMangler {
- ItaniumMangleContextImpl &Context;
- raw_ostream &Out;
-+ bool NullOut = false;
-+ bool DisableDerivedAbiTags = false;
-
- /// The "structor" is the top-level declaration being mangled, if
- /// that's not a template specialization; otherwise it's the pattern
-@@ -261,6 +263,167 @@
-
- } FunctionTypeDepth;
-
-+ // abi_tag is a gcc attribute, taking one or more strings called "tags".
-+ //
-+ // the goal is to annotage against which version of a library an object was
-+ // build and to be able to provide backwards compatibility ("dual abi").
-+ //
-+ // for this the emitted mangled names have to be different, while you don't
-+ // want the user to have to use different names in the source.
-+ //
-+ // the abi_tag can be present on Struct, Var and Function declarations as
-+ // "explicit" tag, and on inline Namespace as "implicit" tag. Explicit tags
-+ // are always emitted after the unqualified name, and (implicit) tags on
-+ // namespace are not.
-+ //
-+ // For functions and variables there is a set of "implicitly available"
-+ // tags. These tags are: all tags from the namespace/structs the name is
-+ // embedded in, all tags from any template arguments of the name, and, for
-+ // functions, alls tags used anywhere in the <bare-function-type> (i.e.
-+ // parameters and sometimes the return type).
-+ //
-+ // For functions this is basically the list of all tags from the signature
-+ // without the unqualified name and usually without the return type of the
-+ // function. In `operator Type()` Type is NOT part of that list, as it is
-+ // part of the unqualified name!
-+ //
-+ // Now all tags from the function return type/variable type which are not
-+ // "implicitly available" must be added to the explicit list of tags, and
-+ // are emitted after the unqualified name.
-+ //
-+ // Example:
-+ // namespace std {
-+ // inline namespace __cxx11 __attribute__((__abi_tag__("cxx11"))) { }
-+ // inline namespace __cxx11 {
-+ // struct string { };
-+ // }
-+ // }
-+ //
-+ // std::string foo(); // needs abi tag "cxx11" on foo
-+ // std::string foo(std::string); // does NOT need abi tag "cxx11" on foo
-+ // __attribute__((__abi_tag__("cxx11")))
-+ // std::string foo2(std::string); // emit abi tag "cxx11" on foo anyway
-+ //
-+ // The tags are sorted by name before emitting, and are serialized as
-+ // <abitag> ::= B <"tag" source-name>
-+
-+ typedef SmallVector<StringRef, 4> AbiTagList;
-+
-+ // state to gather all implicit and explicit tags used in a mangled name.
-+ // must always have an instance of this while emitting any name to keep
-+ // track.
-+ //
-+ // TODO(abitags): how to handle substituted names? they should add the tags used in
-+ // the substitution to the list of available tags.
-+ class AbiTagState final {
-+ public:
-+ //! all abi tags used implicitly or explicitly
-+ std::set<StringRef> UsedAbiTags;
-+ //! all explicit abi tags (i.e. not from namespace)
-+ std::set<StringRef> EmittedAbiTags;
-+
-+ AbiTagState* &LinkHead;
-+ AbiTagState *Parent{nullptr};
-+
-+ bool LinkActive{false};
-+
-+ explicit AbiTagState(AbiTagState* &linkHead)
-+ : LinkHead(linkHead) {
-+ Parent = LinkHead;
-+ LinkHead = this;
-+ LinkActive = true;
-+ }
-+
-+ // no copy, no move
-+ AbiTagState(AbiTagState const&) = delete;
-+ AbiTagState& operator=(AbiTagState const&) = delete;
-+
-+ ~AbiTagState() {
-+ pop();
-+ }
-+
-+ void pop() {
-+ if (!LinkActive) return;
-+
-+ assert(LinkHead == this && "abi tag link head must point to us on destruction");
-+ LinkActive = false;
-+ if (Parent) {
-+ Parent->UsedAbiTags.insert(UsedAbiTags.begin(), UsedAbiTags.end());
-+ Parent->EmittedAbiTags.insert(EmittedAbiTags.begin(), EmittedAbiTags.end());
-+ }
-+ LinkHead = Parent;
-+ }
-+
-+ void write(raw_ostream &Out, const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {
-+ ND = cast<NamedDecl>(ND->getCanonicalDecl());
-+
-+ if (dyn_cast<FunctionDecl>(ND) || dyn_cast<VarDecl>(ND)) {
-+ // assert(AdditionalAbiTags && "function and variables need a list of additional abi tags");
-+ } else {
-+ assert(!AdditionalAbiTags && "only function and variables need a list of additional abi tags");
-+ if (const auto* NS = dyn_cast<NamespaceDecl>(ND)) {
-+ if (const auto* AbiTag = NS->getAttr<AbiTagAttr>()) {
-+ for (const auto& Tag: AbiTag->tags()) {
-+ UsedAbiTags.insert(Tag);
-+ }
-+ }
-+ // don't emit abi tags for namespaces
-+ return;
-+ }
-+ }
-+
-+ AbiTagList TagList;
-+ if (const auto* AbiTag = ND->getAttr<AbiTagAttr>()) {
-+ for (const auto& Tag: AbiTag->tags()) {
-+ UsedAbiTags.insert(Tag);
-+ // AbiTag->tags() is sorted and has no duplicates
-+ TagList.push_back(Tag);
-+ }
-+ }
-+
-+ if (AdditionalAbiTags) {
-+ for (const auto& Tag: *AdditionalAbiTags) {
-+ UsedAbiTags.insert(Tag);
-+ if (std::find(TagList.begin(), TagList.end(), Tag) == TagList.end()) {
-+ // don't insert duplicates
-+ TagList.push_back(Tag);
-+ }
-+ }
-+ // AbiTag->tags() are already sorted; only add if we had additional tags
-+ std::sort(TagList.begin(), TagList.end());
-+ }
-+
-+ writeSortedUniqueAbiTags(Out, TagList);
-+ }
-+
-+ protected:
-+ template<typename TagList>
-+ void writeSortedUniqueAbiTags(raw_ostream &Out, TagList const& AbiTags) {
-+ for (const auto& Tag: AbiTags) {
-+ EmittedAbiTags.insert(Tag);
-+ Out << "B";
-+ Out << Tag.size();
-+ Out << Tag;
-+ }
-+ }
-+ } *AbiTags = nullptr;
-+ AbiTagState AbiTagsRoot{AbiTags};
-+
-+ struct TemporaryDisableDerivedAbiTags {
-+ bool& StateRef;
-+ bool OldState;
-+
-+ TemporaryDisableDerivedAbiTags(bool& State, bool Disable = true)
-+ : StateRef(State) {
-+ OldState = StateRef;
-+ StateRef = Disable;
-+ }
-+ TemporaryDisableDerivedAbiTags(TemporaryDisableDerivedAbiTags const&) = delete;
-+ ~TemporaryDisableDerivedAbiTags() {
-+ StateRef = OldState;
-+ }
-+ };
-+
- llvm::DenseMap<uintptr_t, unsigned> Substitutions;
-
- ASTContext &getASTContext() const { return Context.getASTContext(); }
-@@ -283,6 +446,10 @@
- : Context(C), Out(Out_), Structor(getStructor(D)), StructorType(Type),
- SeqID(0) { }
-
-+ CXXNameMangler(CXXNameMangler &Outer, llvm::raw_null_ostream &Out_)
-+ : Context(Outer.Context), Out(Out_), NullOut(true), Structor(Outer.Structor), StructorType(Outer.StructorType),
-+ SeqID(Outer.SeqID) { }
-+
- #if MANGLE_CHECKER
- ~CXXNameMangler() {
- if (Out.str()[0] == '\01')
-@@ -296,18 +463,21 @@
- #endif
- raw_ostream &getStream() { return Out; }
-
-+ void disableDerivedAbiTags() { DisableDerivedAbiTags = true; }
-+
- void mangle(const NamedDecl *D);
- void mangleCallOffset(int64_t NonVirtual, int64_t Virtual);
- void mangleNumber(const llvm::APSInt &I);
- void mangleNumber(int64_t Number);
- void mangleFloat(const llvm::APFloat &F);
-- void mangleFunctionEncoding(const FunctionDecl *FD);
-+ void mangleFunctionEncoding(const FunctionDecl *FD, bool ExcludeUnqualifiedName = false);
- void mangleSeqID(unsigned SeqID);
-- void mangleName(const NamedDecl *ND);
-+ void mangleName(const NamedDecl *ND, bool ExcludeUnqualifiedName = false);
- void mangleType(QualType T);
- void mangleNameOrStandardSubstitution(const NamedDecl *ND);
-
- private:
-+ void writeAbiTags(const NamedDecl *ND, const AbiTagList *AdditionalAbiTags = nullptr);
-
- bool mangleSubstitution(const NamedDecl *ND);
- bool mangleSubstitution(QualType T);
-@@ -334,31 +504,49 @@
- DeclarationName name,
- unsigned KnownArity = UnknownArity);
-
-- void mangleName(const TemplateDecl *TD,
-+ void mangleFunctionEncodingBareType(const FunctionDecl *FD);
-+
-+ void mangleNameWithAbiTags(const NamedDecl *ND,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName);
-+ void mangleTemplateName(const TemplateDecl *TD,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName,
- const TemplateArgument *TemplateArgs,
- unsigned NumTemplateArgs);
-- void mangleUnqualifiedName(const NamedDecl *ND) {
-- mangleUnqualifiedName(ND, ND->getDeclName(), UnknownArity);
-+ void mangleUnqualifiedName(const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {
-+ mangleUnqualifiedName(ND, ND->getDeclName(), UnknownArity, AdditionalAbiTags);
- }
- void mangleUnqualifiedName(const NamedDecl *ND, DeclarationName Name,
-- unsigned KnownArity);
-- void mangleUnscopedName(const NamedDecl *ND);
-- void mangleUnscopedTemplateName(const TemplateDecl *ND);
-- void mangleUnscopedTemplateName(TemplateName);
-+ unsigned KnownArity, const AbiTagList *AdditionalAbiTags);
-+ void mangleUnscopedName(const NamedDecl *ND, const AbiTagList *AdditionalAbiTags);
-+ void mangleUnscopedTemplateName(const TemplateDecl *ND,
-+ const AbiTagList *AdditionalAbiTags);
-+ void mangleUnscopedTemplateName(TemplateName,
-+ const AbiTagList *AdditionalAbiTags);
- void mangleSourceName(const IdentifierInfo *II);
-- void mangleLocalName(const Decl *D);
-+ void mangleLocalName(const Decl *D,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName);
- void mangleBlockForPrefix(const BlockDecl *Block);
- void mangleUnqualifiedBlock(const BlockDecl *Block);
- void mangleLambda(const CXXRecordDecl *Lambda);
- void mangleNestedName(const NamedDecl *ND, const DeclContext *DC,
-- bool NoFunction=false);
-+ const AbiTagList *AdditionalAbiTags,
-+ bool NoFunction,
-+ bool ExcludeUnqualifiedName);
- void mangleNestedName(const TemplateDecl *TD,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName,
- const TemplateArgument *TemplateArgs,
- unsigned NumTemplateArgs);
- void manglePrefix(NestedNameSpecifier *qualifier);
- void manglePrefix(const DeclContext *DC, bool NoFunction=false);
- void manglePrefix(QualType type);
-- void mangleTemplatePrefix(const TemplateDecl *ND, bool NoFunction=false);
-+ void mangleTemplatePrefix(const TemplateDecl *ND,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool NoFunction = false,
-+ bool ExcludeUnqualifiedName = false);
- void mangleTemplatePrefix(TemplateName Template);
- bool mangleUnresolvedTypeOrSimpleId(QualType DestroyedType,
- StringRef Prefix = "");
-@@ -405,6 +593,10 @@
- void mangleTemplateParameter(unsigned Index);
-
- void mangleFunctionParam(const ParmVarDecl *parm);
-+
-+ std::set<StringRef> getTagsFromPrefixAndTemplateArguments(const NamedDecl *ND);
-+ AbiTagList makeAdditionalTagsForFunction(const FunctionDecl *FD);
-+ AbiTagList makeAdditionalTagsForVariable(const VarDecl *VD);
- };
-
- }
-@@ -455,6 +647,11 @@
- return true;
- }
-
-+void CXXNameMangler::writeAbiTags(const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {
-+ assert(AbiTags && "require AbiTagState");
-+ if (AbiTags) AbiTags->write(Out, ND, DisableDerivedAbiTags ? nullptr : AdditionalAbiTags);
-+}
-+
- void CXXNameMangler::mangle(const NamedDecl *D) {
- // <mangled-name> ::= _Z <encoding>
- // ::= <data name>
-@@ -470,14 +667,28 @@
- mangleName(cast<FieldDecl>(D));
- }
-
--void CXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD) {
-- // <encoding> ::= <function name> <bare-function-type>
-- mangleName(FD);
--
-+void CXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD, bool ExcludeUnqualifiedName) {
- // Don't mangle in the type if this isn't a decl we should typically mangle.
-- if (!Context.shouldMangleDeclName(FD))
-+ if (!Context.shouldMangleDeclName(FD)) {
-+ mangleNameWithAbiTags(FD, /* AdditionalAbiTags */ nullptr, ExcludeUnqualifiedName);
- return;
-+ }
-+
-+ // <encoding> ::= <function name> <bare-function-type>
-
-+ if (ExcludeUnqualifiedName)
-+ {
-+ // running makeAdditionalTagsForFunction would loop, don't need it here anyway
-+ mangleNameWithAbiTags(FD, /* AdditionalAbiTags */ nullptr, ExcludeUnqualifiedName);
-+ } else {
-+ AbiTagList AdditionalAbiTags = makeAdditionalTagsForFunction(FD);
-+ mangleNameWithAbiTags(FD, &AdditionalAbiTags, ExcludeUnqualifiedName);
-+ }
-+
-+ mangleFunctionEncodingBareType(FD);
-+}
-+
-+void CXXNameMangler::mangleFunctionEncodingBareType(const FunctionDecl *FD) {
- if (FD->hasAttr<EnableIfAttr>()) {
- FunctionTypeDepthState Saved = FunctionTypeDepth.push();
- Out << "Ua9enable_ifI";
-@@ -581,7 +792,21 @@
- return nullptr;
- }
-
--void CXXNameMangler::mangleName(const NamedDecl *ND) {
-+// must not be run from mangleLocalName for the <entity name> as it would loop otherwise.
-+void CXXNameMangler::mangleName(const NamedDecl *ND, bool ExcludeUnqualifiedName) {
-+ if (!ExcludeUnqualifiedName) {
-+ if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
-+ AbiTagList VariableAdditionalAbiTags = makeAdditionalTagsForVariable(VD);
-+ mangleNameWithAbiTags(VD, &VariableAdditionalAbiTags, ExcludeUnqualifiedName);
-+ return;
-+ }
-+ }
-+ mangleNameWithAbiTags(ND, nullptr, ExcludeUnqualifiedName);
-+}
-+
-+void CXXNameMangler::mangleNameWithAbiTags(const NamedDecl *ND,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName) {
- // <name> ::= <nested-name>
- // ::= <unscoped-name>
- // ::= <unscoped-template-name> <template-args>
-@@ -597,7 +822,7 @@
- while (!DC->isNamespace() && !DC->isTranslationUnit())
- DC = getEffectiveParentContext(DC);
- else if (GetLocalClassDecl(ND)) {
-- mangleLocalName(ND);
-+ mangleLocalName(ND, AdditionalAbiTags, ExcludeUnqualifiedName);
- return;
- }
-
-@@ -607,76 +832,88 @@
- // Check if we have a template.
- const TemplateArgumentList *TemplateArgs = nullptr;
- if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
-- mangleUnscopedTemplateName(TD);
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnscopedTemplateName(TD, AdditionalAbiTags);
- mangleTemplateArgs(*TemplateArgs);
- return;
- }
-
-- mangleUnscopedName(ND);
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnscopedName(ND, AdditionalAbiTags);
- return;
- }
-
- if (isLocalContainerContext(DC)) {
-- mangleLocalName(ND);
-+ mangleLocalName(ND, AdditionalAbiTags, ExcludeUnqualifiedName);
- return;
- }
-
-- mangleNestedName(ND, DC);
-+ mangleNestedName(ND, DC, AdditionalAbiTags, /* NoFunction */ false, ExcludeUnqualifiedName);
- }
--void CXXNameMangler::mangleName(const TemplateDecl *TD,
-- const TemplateArgument *TemplateArgs,
-- unsigned NumTemplateArgs) {
-+
-+void CXXNameMangler::mangleTemplateName(const TemplateDecl *TD,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName,
-+ const TemplateArgument *TemplateArgs,
-+ unsigned NumTemplateArgs) {
- const DeclContext *DC = IgnoreLinkageSpecDecls(getEffectiveDeclContext(TD));
-
- if (DC->isTranslationUnit() || isStdNamespace(DC)) {
-- mangleUnscopedTemplateName(TD);
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnscopedTemplateName(TD, AdditionalAbiTags);
- mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
- } else {
-- mangleNestedName(TD, TemplateArgs, NumTemplateArgs);
-+ mangleNestedName(TD, AdditionalAbiTags, ExcludeUnqualifiedName, TemplateArgs, NumTemplateArgs);
- }
- }
-
--void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND) {
-+void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {
- // <unscoped-name> ::= <unqualified-name>
- // ::= St <unqualified-name> # ::std::
-
- if (isStdNamespace(IgnoreLinkageSpecDecls(getEffectiveDeclContext(ND))))
- Out << "St";
-
-- mangleUnqualifiedName(ND);
-+ mangleUnqualifiedName(ND, AdditionalAbiTags);
- }
-
--void CXXNameMangler::mangleUnscopedTemplateName(const TemplateDecl *ND) {
-+void CXXNameMangler::mangleUnscopedTemplateName(const TemplateDecl *ND,
-+ const AbiTagList *AdditionalAbiTags) {
- // <unscoped-template-name> ::= <unscoped-name>
- // ::= <substitution>
- if (mangleSubstitution(ND))
- return;
-
- // <template-template-param> ::= <template-param>
-- if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND))
-+ if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND)) {
-+ assert(!AdditionalAbiTags && "template template param cannot have abi tags"); // TODO(abitags)
- mangleTemplateParameter(TTP->getIndex());
-- else
-- mangleUnscopedName(ND->getTemplatedDecl());
-+ } else {
-+ mangleUnscopedName(ND->getTemplatedDecl(), AdditionalAbiTags);
-+ }
-
- addSubstitution(ND);
- }
-
--void CXXNameMangler::mangleUnscopedTemplateName(TemplateName Template) {
-+void CXXNameMangler::mangleUnscopedTemplateName(TemplateName Template,
-+ const AbiTagList *AdditionalAbiTags) {
- // <unscoped-template-name> ::= <unscoped-name>
- // ::= <substitution>
- if (TemplateDecl *TD = Template.getAsTemplateDecl())
-- return mangleUnscopedTemplateName(TD);
-+ return mangleUnscopedTemplateName(TD, AdditionalAbiTags);
-
- if (mangleSubstitution(Template))
- return;
-
-+ assert(!AdditionalAbiTags && "dependent template name cannot have abi tags"); // TODO(abitags)
-+
- DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
- assert(Dependent && "Not a dependent template name?");
- if (const IdentifierInfo *Id = Dependent->getIdentifier())
- mangleSourceName(Id);
- else
- mangleOperatorName(Dependent->getOperator(), UnknownArity);
--
-+
- addSubstitution(Template);
- }
-
-@@ -835,14 +1072,16 @@
- else
- Out << "sr";
- mangleSourceName(qualifier->getAsNamespace()->getIdentifier());
-+ writeAbiTags(qualifier->getAsNamespace());
- break;
- case NestedNameSpecifier::NamespaceAlias:
- if (qualifier->getPrefix())
- mangleUnresolvedPrefix(qualifier->getPrefix(),
- /*recursive*/ true);
- else
- Out << "sr";
- mangleSourceName(qualifier->getAsNamespaceAlias()->getIdentifier());
-+ writeAbiTags(qualifier->getAsNamespaceAlias());
- break;
-
- case NestedNameSpecifier::TypeSpec:
-@@ -877,6 +1116,7 @@
- Out << "sr";
-
- mangleSourceName(qualifier->getAsIdentifier());
-+ // an Identifier has no type information, so we can't emit abi tags for it
- break;
- }
-
-@@ -922,7 +1162,8 @@
-
- void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
- DeclarationName Name,
-- unsigned KnownArity) {
-+ unsigned KnownArity,
-+ const AbiTagList *AdditionalAbiTags) {
- unsigned Arity = KnownArity;
- // <unqualified-name> ::= <operator-name>
- // ::= <ctor-dtor-name>
-@@ -941,6 +1182,7 @@
- Out << 'L';
-
- mangleSourceName(II);
-+ writeAbiTags(ND, AdditionalAbiTags);
- break;
- }
-
-@@ -980,6 +1222,7 @@
- assert(FD->getIdentifier() && "Data member name isn't an identifier!");
-
- mangleSourceName(FD->getIdentifier());
-+ // TODO(abitags): not emitting abi tags: internal name anyway
- break;
- }
-
-@@ -1000,6 +1243,9 @@
- assert(D->getDeclName().getAsIdentifierInfo() &&
- "Typedef was not named!");
- mangleSourceName(D->getDeclName().getAsIdentifierInfo());
-+ assert(!AdditionalAbiTags && "Type cannot have additional abi tags");
-+ // explicit abi tags are still possible; take from underlying type, not from typedef.
-+ writeAbiTags(TD, nullptr);
- break;
- }
-
-@@ -1009,6 +1255,7 @@
- // <lambda-sig> ::= <parameter-type>+ # Parameter types or 'v' for 'void'.
- if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(TD)) {
- if (Record->isLambda() && Record->getLambdaManglingNumber()) {
-+ assert(!AdditionalAbiTags && "Lambda type cannot have additional abi tags");
- mangleLambda(Record);
- break;
- }
-@@ -1020,6 +1267,7 @@
- if (UnnamedMangle > 1)
- Out << UnnamedMangle - 2;
- Out << '_';
-+ writeAbiTags(TD, AdditionalAbiTags);
- break;
- }
-
-@@ -1052,6 +1300,7 @@
- // Otherwise, use the complete constructor name. This is relevant if a
- // class with a constructor is declared within a constructor.
- mangleCXXCtorType(Ctor_Complete);
-+ writeAbiTags(ND, AdditionalAbiTags);
- break;
-
- case DeclarationName::CXXDestructorName:
-@@ -1063,6 +1312,7 @@
- // Otherwise, use the complete destructor name. This is relevant if a
- // class with a destructor is declared within a destructor.
- mangleCXXDtorType(Dtor_Complete);
-+ writeAbiTags(ND, AdditionalAbiTags);
- break;
-
- case DeclarationName::CXXOperatorName:
-@@ -1078,6 +1328,7 @@
- case DeclarationName::CXXConversionFunctionName:
- case DeclarationName::CXXLiteralOperatorName:
- mangleOperatorName(Name, Arity);
-+ writeAbiTags(ND, AdditionalAbiTags);
- break;
-
- case DeclarationName::CXXUsingDirective:
-@@ -1094,7 +1345,9 @@
-
- void CXXNameMangler::mangleNestedName(const NamedDecl *ND,
- const DeclContext *DC,
-- bool NoFunction) {
-+ const AbiTagList *AdditionalAbiTags,
-+ bool NoFunction,
-+ bool ExcludeUnqualifiedName) {
- // <nested-name>
- // ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
- // ::= N [<CV-qualifiers>] [<ref-qualifier>] <template-prefix>
-@@ -1114,30 +1367,35 @@
- // Check if we have a template.
- const TemplateArgumentList *TemplateArgs = nullptr;
- if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
-- mangleTemplatePrefix(TD, NoFunction);
-+ mangleTemplatePrefix(TD, AdditionalAbiTags, NoFunction, ExcludeUnqualifiedName);
- mangleTemplateArgs(*TemplateArgs);
- }
- else {
- manglePrefix(DC, NoFunction);
-- mangleUnqualifiedName(ND);
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedName(ND, AdditionalAbiTags);
- }
-
- Out << 'E';
- }
- void CXXNameMangler::mangleNestedName(const TemplateDecl *TD,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName,
- const TemplateArgument *TemplateArgs,
- unsigned NumTemplateArgs) {
- // <nested-name> ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
-
- Out << 'N';
-
-- mangleTemplatePrefix(TD);
-+ mangleTemplatePrefix(TD, AdditionalAbiTags, ExcludeUnqualifiedName);
- mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
-
- Out << 'E';
- }
-
--void CXXNameMangler::mangleLocalName(const Decl *D) {
-+void CXXNameMangler::mangleLocalName(const Decl *D,
-+ const AbiTagList *AdditionalAbiTags,
-+ bool ExcludeUnqualifiedName) {
- // <local-name> := Z <function encoding> E <entity name> [<discriminator>]
- // := Z <function encoding> E s [<discriminator>]
- // <local-name> := Z <function encoding> E d [ <parameter number> ]
-@@ -1149,15 +1407,25 @@
-
- Out << 'Z';
-
-- if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(DC))
-- mangleObjCMethodName(MD);
-- else if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC))
-- mangleBlockForPrefix(BD);
-- else
-- mangleFunctionEncoding(cast<FunctionDecl>(DC));
-+ {
-+ AbiTagState localAbiTags(AbiTags);
-+
-+ if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(DC))
-+ mangleObjCMethodName(MD);
-+ else if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC))
-+ mangleBlockForPrefix(BD);
-+ else
-+ mangleFunctionEncoding(cast<FunctionDecl>(DC));
-+
-+ // implicit abi tags (from namespace) are not available in the following
-+ // entity; reset to actually emitted tags, which are available.
-+ localAbiTags.UsedAbiTags = localAbiTags.EmittedAbiTags;
-+ }
-
- Out << 'E';
-
-+ TemporaryDisableDerivedAbiTags TemporyDisable(DisableDerivedAbiTags, getStructor(dyn_cast<NamedDecl>(D)) != Structor);
-+
- if (RD) {
- // The parameter number is omitted for the last parameter, 0 for the
- // second-to-last parameter, 1 for the third-to-last parameter, etc. The
-@@ -1182,13 +1450,17 @@
- // Mangle the name relative to the closest enclosing function.
- // equality ok because RD derived from ND above
- if (D == RD) {
-- mangleUnqualifiedName(RD);
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedName(RD, AdditionalAbiTags);
- } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
- manglePrefix(getEffectiveDeclContext(BD), true /*NoFunction*/);
-- mangleUnqualifiedBlock(BD);
-+ assert(!AdditionalAbiTags && "Block cannot have additional abi tags");
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedBlock(BD);
- } else {
- const NamedDecl *ND = cast<NamedDecl>(D);
-- mangleNestedName(ND, getEffectiveDeclContext(ND), true /*NoFunction*/);
-+ mangleNestedName(ND, getEffectiveDeclContext(ND),
-+ AdditionalAbiTags, true /*NoFunction*/, ExcludeUnqualifiedName);
- }
- } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
- // Mangle a block in a default parameter; see above explanation for
-@@ -1205,30 +1477,35 @@
- }
- }
-
-- mangleUnqualifiedBlock(BD);
-+ assert(!AdditionalAbiTags && "Block cannot have additional abi tags");
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedBlock(BD);
- } else {
-- mangleUnqualifiedName(cast<NamedDecl>(D));
-- }
--
-- if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
-- unsigned disc;
-- if (Context.getNextDiscriminator(ND, disc)) {
-- if (disc < 10)
-- Out << '_' << disc;
-- else
-- Out << "__" << disc << '_';
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedName(cast<NamedDecl>(D), AdditionalAbiTags);
-+ }
-+
-+ if (!ExcludeUnqualifiedName) {
-+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
-+ unsigned disc;
-+ if (Context.getNextDiscriminator(ND, disc)) {
-+ if (disc < 10)
-+ Out << '_' << disc;
-+ else
-+ Out << "__" << disc << '_';
-+ }
- }
- }
- }
-
- void CXXNameMangler::mangleBlockForPrefix(const BlockDecl *Block) {
- if (GetLocalClassDecl(Block)) {
-- mangleLocalName(Block);
-+ mangleLocalName(Block, /* AdditionalAbiTags */ nullptr, /* ExcludeUnqualifiedName */ false);
- return;
- }
- const DeclContext *DC = getEffectiveDeclContext(Block);
- if (isLocalContainerContext(DC)) {
-- mangleLocalName(Block);
-+ mangleLocalName(Block, /* AdditionalAbiTags */ nullptr, /* ExcludeUnqualifiedName */ false);
- return;
- }
- manglePrefix(getEffectiveDeclContext(Block));
-@@ -1239,10 +1516,11 @@
- if (Decl *Context = Block->getBlockManglingContextDecl()) {
- if ((isa<VarDecl>(Context) || isa<FieldDecl>(Context)) &&
- Context->getDeclContext()->isRecord()) {
-- if (const IdentifierInfo *Name
-- = cast<NamedDecl>(Context)->getIdentifier()) {
-+ const auto *ND = cast<NamedDecl>(Context);
-+ if (const IdentifierInfo *Name = ND->getIdentifier()) {
- mangleSourceName(Name);
-- Out << 'M';
-+ writeAbiTags(ND, /* AdditionalAbiTags */ nullptr);
-+ Out << 'M';
- }
- }
- }
-@@ -1275,7 +1553,7 @@
- if (const IdentifierInfo *Name
- = cast<NamedDecl>(Context)->getIdentifier()) {
- mangleSourceName(Name);
-- Out << 'M';
-+ Out << 'M';
- }
- }
- }
-@@ -1358,11 +1636,11 @@
- // Check if we have a template.
- const TemplateArgumentList *TemplateArgs = nullptr;
- if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
-- mangleTemplatePrefix(TD);
-+ mangleTemplatePrefix(TD, /* AdditionalAbiTags */ nullptr);
- mangleTemplateArgs(*TemplateArgs);
- } else {
- manglePrefix(getEffectiveDeclContext(ND), NoFunction);
-- mangleUnqualifiedName(ND);
-+ mangleUnqualifiedName(ND, /* AdditionalAbiTags */ nullptr);
- }
-
- addSubstitution(ND);
-@@ -1373,27 +1651,30 @@
- // ::= <template-param>
- // ::= <substitution>
- if (TemplateDecl *TD = Template.getAsTemplateDecl())
-- return mangleTemplatePrefix(TD);
-+ return mangleTemplatePrefix(TD, /* AdditionalAbiTags */ nullptr);
-
- if (QualifiedTemplateName *Qualified = Template.getAsQualifiedTemplateName())
- manglePrefix(Qualified->getQualifier());
--
-+
- if (OverloadedTemplateStorage *Overloaded
- = Template.getAsOverloadedTemplate()) {
- mangleUnqualifiedName(nullptr, (*Overloaded->begin())->getDeclName(),
-- UnknownArity);
-+ UnknownArity,
-+ /* AdditionalAbiTags */ nullptr);
- return;
- }
--
-+
- DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
- assert(Dependent && "Unknown template name kind?");
- if (NestedNameSpecifier *Qualifier = Dependent->getQualifier())
- manglePrefix(Qualifier);
-- mangleUnscopedTemplateName(Template);
-+ mangleUnscopedTemplateName(Template, /* AdditionalAbiTags */ nullptr);
- }
-
- void CXXNameMangler::mangleTemplatePrefix(const TemplateDecl *ND,
-- bool NoFunction) {
-+ const AbiTagList *AdditionalAbiTags,
-+ bool NoFunction,
-+ bool ExcludeUnqualifiedName) {
- // <template-prefix> ::= <prefix> <template unqualified-name>
- // ::= <template-param>
- // ::= <substitution>
-@@ -1405,10 +1686,12 @@
-
- // <template-template-param> ::= <template-param>
- if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND)) {
-+ // TODO(abitags): ???
- mangleTemplateParameter(TTP->getIndex());
- } else {
- manglePrefix(getEffectiveDeclContext(ND), NoFunction);
-- mangleUnqualifiedName(ND->getTemplatedDecl());
-+ if (!ExcludeUnqualifiedName)
-+ mangleUnqualifiedName(ND->getTemplatedDecl(), AdditionalAbiTags);
- }
-
- addSubstitution(ND);
-@@ -1452,6 +1735,7 @@
- // <name> ::= <nested-name>
- mangleUnresolvedPrefix(Dependent->getQualifier());
- mangleSourceName(Dependent->getIdentifier());
-+ // writeAbiTags(Dependent);
- break;
- }
-
-@@ -1544,16 +1828,19 @@
-
- case Type::Typedef:
- mangleSourceName(cast<TypedefType>(Ty)->getDecl()->getIdentifier());
-+ writeAbiTags(cast<TypedefType>(Ty)->getDecl());
- break;
-
- case Type::UnresolvedUsing:
- mangleSourceName(
- cast<UnresolvedUsingType>(Ty)->getDecl()->getIdentifier());
-+ writeAbiTags(cast<UnresolvedUsingType>(Ty)->getDecl());
- break;
-
- case Type::Enum:
- case Type::Record:
- mangleSourceName(cast<TagType>(Ty)->getDecl()->getIdentifier());
-+ writeAbiTags(cast<TagType>(Ty)->getDecl());
- break;
-
- case Type::TemplateSpecialization: {
-@@ -1572,6 +1859,7 @@
- goto unresolvedType;
-
- mangleSourceName(TD->getIdentifier());
-+ writeAbiTags(TD);
- break;
- }
-
-@@ -1603,16 +1891,19 @@
- case Type::InjectedClassName:
- mangleSourceName(
- cast<InjectedClassNameType>(Ty)->getDecl()->getIdentifier());
-+ writeAbiTags(cast<InjectedClassNameType>(Ty)->getDecl());
- break;
-
- case Type::DependentName:
- mangleSourceName(cast<DependentNameType>(Ty)->getIdentifier());
-+ // writeAbiTags(cast<DependentNameType>(Ty));
- break;
-
- case Type::DependentTemplateSpecialization: {
- const DependentTemplateSpecializationType *DTST =
- cast<DependentTemplateSpecializationType>(Ty);
- mangleSourceName(DTST->getIdentifier());
-+ // writeAbiTags(DTST);
- mangleTemplateArgs(DTST->getArgs(), DTST->getNumArgs());
- break;
- }
-@@ -2546,7 +2837,11 @@
-
- void CXXNameMangler::mangleType(const TemplateSpecializationType *T) {
- if (TemplateDecl *TD = T->getTemplateName().getAsTemplateDecl()) {
-- mangleName(TD, T->getArgs(), T->getNumArgs());
-+ // types only have explicit abi tags, no addition tags
-+ mangleTemplateName(TD,
-+ /* AdditionalAbiTags */ nullptr,
-+ /* ExcludeUnqualifiedName */ false,
-+ T->getArgs(), T->getNumArgs());
- } else {
- if (mangleSubstitution(QualType(T, 0)))
- return;
-@@ -2593,6 +2888,7 @@
- Out << 'N';
- manglePrefix(T->getQualifier());
- mangleSourceName(T->getIdentifier());
-+ // writeAbiTags(T); // TODO(abitags)
- Out << 'E';
- }
-
-@@ -4020,6 +4316,76 @@
- Substitutions[Ptr] = SeqID++;
- }
-
-+std::set<StringRef> CXXNameMangler::getTagsFromPrefixAndTemplateArguments(const NamedDecl *ND) {
-+ llvm::raw_null_ostream NullOutStream;
-+ CXXNameMangler TrackPrefixAndTemplateArguments(*this, NullOutStream);
-+
-+ if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
-+ TrackPrefixAndTemplateArguments.mangleFunctionEncoding(FD, /* ExcludeUnqualifiedName */ true);
-+ } else {
-+ TrackPrefixAndTemplateArguments.mangleName(ND, /* ExcludeUnqualifiedName */ true);
-+ }
-+
-+ return std::move(TrackPrefixAndTemplateArguments.AbiTagsRoot.UsedAbiTags);
-+}
-+
-+CXXNameMangler::AbiTagList CXXNameMangler::makeAdditionalTagsForFunction(const FunctionDecl *FD) {
-+ // when derived abi tags are disabled there is no need to make any list
-+ if (DisableDerivedAbiTags) return AbiTagList();
-+
-+ std::set<StringRef> ImplicitlyAvailableTags = getTagsFromPrefixAndTemplateArguments(FD);
-+ std::set<StringRef> ReturnTypeTags;
-+
-+ {
-+ llvm::raw_null_ostream NullOutStream;
-+ CXXNameMangler TrackReturnTypeTags(*this, NullOutStream);
-+ TrackReturnTypeTags.disableDerivedAbiTags();
-+
-+ const FunctionProtoType *Proto = cast<FunctionProtoType>(FD->getType()->getAs<FunctionType>());
-+ TrackReturnTypeTags.FunctionTypeDepth.enterResultType();
-+ TrackReturnTypeTags.mangleType(Proto->getReturnType());
-+ TrackReturnTypeTags.FunctionTypeDepth.leaveResultType();
-+
-+ ReturnTypeTags = std::move(TrackReturnTypeTags.AbiTagsRoot.UsedAbiTags);
-+ }
-+
-+ AbiTagList AdditionalAbiTags;
-+
-+ for (const auto& Tag: ReturnTypeTags) {
-+ if (ImplicitlyAvailableTags.count(Tag) == 0)
-+ AdditionalAbiTags.push_back(Tag);
-+ }
-+
-+ return AdditionalAbiTags;
-+}
-+
-+CXXNameMangler::AbiTagList CXXNameMangler::makeAdditionalTagsForVariable(const VarDecl *VD) {
-+ // when derived abi tags are disabled there is no need to make any list
-+ if (DisableDerivedAbiTags) return AbiTagList();
-+
-+ std::set<StringRef> ImplicitlyAvailableTags = getTagsFromPrefixAndTemplateArguments(VD);
-+ std::set<StringRef> VariableTypeTags;
-+
-+ {
-+ llvm::raw_null_ostream NullOutStream;
-+ CXXNameMangler TrackVariableType(*this, NullOutStream);
-+ TrackVariableType.disableDerivedAbiTags();
-+
-+ TrackVariableType.mangleType(VD->getType());
-+
-+ VariableTypeTags = std::move(TrackVariableType.AbiTagsRoot.UsedAbiTags);
-+ }
-+
-+ AbiTagList AdditionalAbiTags;
-+
-+ for (const auto& Tag: VariableTypeTags) {
-+ if (ImplicitlyAvailableTags.count(Tag) == 0)
-+ AdditionalAbiTags.push_back(Tag);
-+ }
-+
-+ return AdditionalAbiTags;
-+}
-+
- //
-
- /// Mangles the name of the declaration D and emits that name to the given
-@@ -4121,6 +4487,7 @@
- // <special-name> ::= GV <object name> # Guard variable for one-time
- // # initialization
- CXXNameMangler Mangler(*this, Out);
-+ Mangler.disableDerivedAbiTags(); // GCC: doesn't emit derived abi tags for guard variables
- Mangler.getStream() << "_ZGV";
- Mangler.mangleName(D);
- }
-Index: lib/Sema/SemaDeclAttr.cpp
-===================================================================
---- lib/Sema/SemaDeclAttr.cpp
-+++ lib/Sema/SemaDeclAttr.cpp
-@@ -4446,6 +4446,66 @@
- Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex()));
- }
-
-+static void handleAbiTagAttr(Sema &S, Decl *D,
-+ const AttributeList &Attr) {
-+ const auto *NS = dyn_cast<NamespaceDecl>(D);
-+
-+ if (!checkAttributeAtLeastNumArgs(S, Attr, NS ? 0 : 1))
-+ return;
-+
-+ SmallVector<std::string, 4> Tags;
-+
-+ for (unsigned I = 0, E = Attr.getNumArgs(); I != E; ++I) {
-+ StringRef Tag;
-+
-+ if (!S.checkStringLiteralArgumentAttr(Attr, I, Tag))
-+ return;
-+
-+ Tags.push_back(Tag);
-+ }
-+
-+ if (NS && !NS->isInline()) {
-+ S.Diag(Attr.getLoc(), diag::err_attr_abi_tag_only_on_inline_namespace);
-+ return;
-+ }
-+ if (NS && NS->isAnonymousNamespace()) {
-+ S.Diag(Attr.getLoc(), diag::err_attr_abi_tag_only_on_named_namespace);
-+ return;
-+ }
-+ if (NS && Attr.getNumArgs() == 0) {
-+ Tags.push_back(NS->getName());
-+ }
-+
-+ // store tags sorted and without duplicates
-+ std::sort(Tags.begin(), Tags.end());
-+ Tags.erase(std::unique(Tags.begin(), Tags.end()), Tags.end());
-+
-+ const auto *CD = D->getCanonicalDecl();
-+ if (CD != D) {
-+ // redeclarations must not add new abi tags, or abi tags in the first place
-+ const auto *OldAbiTagAttr = D->getAttr<AbiTagAttr>();
-+ if (nullptr == OldAbiTagAttr) {
-+ S.Diag(Attr.getLoc(), diag::err_abi_tag_on_redeclaration);
-+ S.Diag(CD->getLocation(), diag::note_previous_definition);
-+ return;
-+ }
-+ for (const auto& NewTag: Tags) {
-+ if (std::find(OldAbiTagAttr->tags_begin(),
-+ OldAbiTagAttr->tags_end(),
-+ NewTag) == OldAbiTagAttr->tags_end()) {
-+ S.Diag(Attr.getLoc(), diag::err_new_abi_tag_on_redeclaration) << NewTag;
-+ S.Diag(OldAbiTagAttr->getLocation(), diag::note_previous_definition);
-+ return;
-+ }
-+ }
-+ return;
-+ }
-+
-+ D->addAttr(::new (S.Context) AbiTagAttr(Attr.getRange(), S.Context,
-+ Tags.data(), Tags.size(),
-+ Attr.getAttributeSpellingListIndex()));
-+}
-+
- static void handleARMInterruptAttr(Sema &S, Decl *D,
- const AttributeList &Attr) {
- // Check the attribute arguments.
-@@ -5360,6 +5420,9 @@
- case AttributeList::AT_Thread:
- handleDeclspecThreadAttr(S, D, Attr);
- break;
-+ case AttributeList::AT_AbiTag:
-+ handleAbiTagAttr(S, D, Attr);
-+ break;
-
- // Thread safety attributes:
- case AttributeList::AT_AssertExclusiveLock:
-Index: test/SemaCXX/attr-abi-tag-syntax.cpp
-===================================================================
---- /dev/null
-+++ test/SemaCXX/attr-abi-tag-syntax.cpp
-@@ -0,0 +1,20 @@
-+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
-+
-+namespace N1 {
-+
-+namespace __attribute__((__abi_tag__)) {} // \
-+ // expected-error {{abi_tag attribute only allowed on inline namespaces}}
-+
-+namespace N __attribute__((__abi_tag__)) {} // \
-+ // expected-error {{abi_tag attribute only allowed on inline namespaces}}
-+
-+}
-+
-+namespace N2 {
-+
-+inline namespace __attribute__((__abi_tag__)) {} // \
-+ // expected-error {{abi_tag attribute only allowed on named namespaces}}
-+
-+inline namespace N __attribute__((__abi_tag__)) {}
-+
-+}
-Index: test/SemaCXX/attr-abi-tag.cpp
-===================================================================
---- /dev/null
-+++ test/SemaCXX/attr-abi-tag.cpp
-@@ -0,0 +1,13 @@
-+// RUN: %clang_cc1 -x c++ -std=c++11 -triple x86_64-unknown-linux -emit-llvm < %s | FileCheck %s
-+
-+// CHECK: @_Z5Func1B6Names1v()
-+inline namespace Names1 __attribute__((__abi_tag__)) {
-+ class C1 {};
-+}
-+C1 Func1() { return C1(); }
-+
-+// CHECK: @_Z5Func2B4Tag1B4Tag2v()
-+inline namespace Names2 __attribute__((__abi_tag__("Tag1", "Tag2"))) {
-+ class C2 {};
-+}
-+C2 Func2() { return C2(); }
diff --git a/abs/extra/llvm/clang-tools-extra-3.7.0-install-clang-query.patch b/abs/extra/llvm/clang-tools-extra-3.7.0-install-clang-query.patch
deleted file mode 100644
index a632baf..0000000
--- a/abs/extra/llvm/clang-tools-extra-3.7.0-install-clang-query.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -upr clang-tools-extra-3.7.0.src.orig/clang-query/tool/CMakeLists.txt clang-tools-extra-3.7.0.src/clang-query/tool/CMakeLists.txt
---- clang-tools-extra-3.7.0.src.orig/clang-query/tool/CMakeLists.txt 2015-06-20 22:28:07.000000000 +0300
-+++ clang-tools-extra-3.7.0.src/clang-query/tool/CMakeLists.txt 2015-09-28 11:51:14.724472237 +0300
-@@ -10,3 +10,5 @@ target_link_libraries(clang-query
- clangQuery
- clangTooling
- )
-+
-+install(TARGETS clang-query RUNTIME DESTINATION bin)
diff --git a/abs/extra/llvm/lldb-3.7.0-avoid-linking-to-libLLVM.patch b/abs/extra/llvm/lldb-3.7.0-avoid-linking-to-libLLVM.patch
deleted file mode 100644
index f4859ed..0000000
--- a/abs/extra/llvm/lldb-3.7.0-avoid-linking-to-libLLVM.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -upr lldb-3.7.0.src.orig/cmake/modules/AddLLDB.cmake lldb-3.7.0.src/cmake/modules/AddLLDB.cmake
---- lldb-3.7.0.src.orig/cmake/modules/AddLLDB.cmake 2015-09-28 11:42:23.439084000 +0300
-+++ lldb-3.7.0.src/cmake/modules/AddLLDB.cmake 2015-09-28 11:43:03.200237733 +0300
-@@ -56,7 +56,7 @@ macro(add_lldb_library name)
- if (PARAM_OBJECT)
- add_library(${name} ${libkind} ${srcs})
- else()
-- llvm_add_library(${name} ${libkind} ${srcs})
-+ llvm_add_library(${name} ${libkind} DISABLE_LLVM_LINK_LLVM_DYLIB ${srcs})
-
- lldb_link_common_libs(${name} "${libkind}")
-
-@@ -93,6 +93,6 @@ macro(add_lldb_library name)
- endmacro(add_lldb_library)
-
- macro(add_lldb_executable name)
-- add_llvm_executable(${name} ${ARGN})
-+ add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
- set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
- endmacro(add_lldb_executable)
diff --git a/abs/extra/llvm/llvm-3.7.0-export-more-symbols.patch b/abs/extra/llvm/llvm-3.7.0-export-more-symbols.patch
deleted file mode 100644
index bc3d141..0000000
--- a/abs/extra/llvm/llvm-3.7.0-export-more-symbols.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/llvm/tools/llvm-shlib/CMakeLists.txt.orig 2015-09-06 12:31:21.765250429 +0300
-+++ src/llvm/tools/llvm-shlib/CMakeLists.txt 2015-09-06 13:17:10.820174432 +0300
-@@ -64,7 +64,7 @@
-
- if (LLVM_DYLIB_EXPORT_ALL)
- add_custom_command(OUTPUT ${LLVM_EXPORTED_SYMBOL_FILE}
-- COMMAND echo \"LLVM*\" > ${LLVM_EXPORTED_SYMBOL_FILE} && echo \"_Z*llvm*\" >> ${LLVM_EXPORTED_SYMBOL_FILE}
-+ COMMAND echo -e \"LLVM*\\n_Z*llvm*\\nConvertUTF*\\ngetNumBytesForUTF8\\nisLegalUTF8*\" > ${LLVM_EXPORTED_SYMBOL_FILE}
- WORKING_DIRECTORY ${LIB_DIR}
- DEPENDS ${LLVM_DYLIB_REQUIRED_EXPORTS}
- COMMENT "Generating combined export list...")
diff --git a/abs/extra/llvm/llvm-3.7.0-link-tools-against-libLLVM.patch b/abs/extra/llvm/llvm-3.7.0-link-tools-against-libLLVM.patch
deleted file mode 100644
index e8c16ca..0000000
--- a/abs/extra/llvm/llvm-3.7.0-link-tools-against-libLLVM.patch
+++ /dev/null
@@ -1,440 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index ac3b978..dd50236 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -342,9 +342,21 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
- option (LLVM_BUILD_EXTERNAL_COMPILER_RT
- "Build compiler-rt as an external project." OFF)
-
--option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" OFF)
--option(LLVM_DYLIB_EXPORT_ALL "Export all symbols from libLLVM.dylib (default is C API only" OFF)
--option(LLVM_DISABLE_LLVM_DYLIB_ATEXIT "Disable llvm-shlib's atexit destructors." ON)
-+# You can configure which libraries from LLVM you want to include in the
-+# shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited
-+# list of LLVM components. All component names handled by llvm-config are valid.
-+if(NOT DEFINED LLVM_DYLIB_COMPONENTS)
-+ set(LLVM_DYLIB_COMPONENTS "all" CACHE STRING
-+ "Semicolon-separated list of components to include in libLLVM, or \"all\".")
-+endif()
-+option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF)
-+option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_LINK_LLVM_DYLIB})
-+option(LLVM_DYLIB_EXPORT_ALL "Export all symbols from libLLVM.dylib (default is C API only" ${LLVM_LINK_LLVM_DYLIB})
-+set(LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT ON)
-+if (LLVM_LINK_LLVM_DYLIB)
-+ set(LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT OFF)
-+endif()
-+option(LLVM_DISABLE_LLVM_DYLIB_ATEXIT "Disable llvm-shlib's atexit destructors." ${LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT})
- if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT)
- set(DISABLE_LLVM_DYLIB_ATEXIT 1)
- endif()
-diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
-index 45f6746..6b6e6e0 100644
---- a/cmake/modules/AddLLVM.cmake
-+++ b/cmake/modules/AddLLVM.cmake
-@@ -41,7 +41,7 @@ function(llvm_update_compile_flags name)
- # Assume that;
- # - LLVM_COMPILE_FLAGS is list.
- # - PROPERTY COMPILE_FLAGS is string.
-- string(REPLACE ";" " " target_compile_flags "${LLVM_COMPILE_FLAGS}")
-+ string(REPLACE ";" " " target_compile_flags " ${LLVM_COMPILE_FLAGS}")
-
- if(update_src_props)
- foreach(fn ${sources})
-@@ -303,6 +303,9 @@ endfunction(set_windows_version_resource_properties)
- # MODULE
- # Target ${name} might not be created on unsupported platforms.
- # Check with "if(TARGET ${name})".
-+# DISABLE_LLVM_LINK_LLVM_DYLIB
-+# Do not link this library to libLLVM, even if
-+# LLVM_LINK_LLVM_DYLIB is enabled.
- # OUTPUT_NAME name
- # Corresponds to OUTPUT_NAME in target properties.
- # DEPENDS targets...
-@@ -316,7 +319,7 @@ endfunction(set_windows_version_resource_properties)
- # )
- function(llvm_add_library name)
- cmake_parse_arguments(ARG
-- "MODULE;SHARED;STATIC"
-+ "MODULE;SHARED;STATIC;DISABLE_LLVM_LINK_LLVM_DYLIB"
- "OUTPUT_NAME"
- "ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS;OBJLIBS"
- ${ARGN})
-@@ -444,10 +447,14 @@ function(llvm_add_library name)
- # property has been set to an empty value.
- get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
-
-- llvm_map_components_to_libnames(llvm_libs
-- ${ARG_LINK_COMPONENTS}
-- ${LLVM_LINK_COMPONENTS}
-- )
-+ if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_STATIC AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
-+ set(llvm_libs LLVM)
-+ else()
-+ llvm_map_components_to_libnames(llvm_libs
-+ ${ARG_LINK_COMPONENTS}
-+ ${LLVM_LINK_COMPONENTS}
-+ )
-+ endif()
-
- if(CMAKE_VERSION VERSION_LESS 2.8.12)
- # Link libs w/o keywords, assuming PUBLIC.
-@@ -562,7 +569,22 @@ endmacro(add_llvm_loadable_module name)
-
-
- macro(add_llvm_executable name)
-- llvm_process_sources( ALL_FILES ${ARGN} )
-+ cmake_parse_arguments(ARG "DISABLE_LLVM_LINK_LLVM_DYLIB" "" "" ${ARGN})
-+ llvm_process_sources( ALL_FILES ${ARG_UNPARSED_ARGUMENTS} )
-+
-+ # Generate objlib
-+ if(LLVM_ENABLE_OBJLIB)
-+ # Generate an obj library for both targets.
-+ set(obj_name "obj.${name}")
-+ add_library(${obj_name} OBJECT EXCLUDE_FROM_ALL
-+ ${ALL_FILES}
-+ )
-+ llvm_update_compile_flags(${obj_name})
-+ set(ALL_FILES "$<TARGET_OBJECTS:${obj_name}>")
-+
-+ set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
-+ endif()
-+
- add_windows_version_resource_file(ALL_FILES ${ALL_FILES})
-
- if( EXCLUDE_FROM_ALL )
-@@ -588,9 +610,13 @@ macro(add_llvm_executable name)
- add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
- endif(LLVM_EXPORTED_SYMBOL_FILE)
-
-+ if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
-+ set(USE_SHARED USE_SHARED)
-+ endif()
-+
- set(EXCLUDE_FROM_ALL OFF)
- set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
-- llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
-+ llvm_config( ${name} ${USE_SHARED} ${LLVM_LINK_COMPONENTS} )
- if( LLVM_COMMON_DEPENDS )
- add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
- endif( LLVM_COMMON_DEPENDS )
-@@ -651,7 +677,7 @@ endmacro(add_llvm_example name)
-
-
- macro(add_llvm_utility name)
-- add_llvm_executable(${name} ${ARGN})
-+ add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
- set_target_properties(${name} PROPERTIES FOLDER "Utils")
- if( LLVM_INSTALL_UTILS )
- install (TARGETS ${name}
-@@ -785,8 +811,13 @@ function(llvm_add_go_executable binary pkgpath)
- set(cppflags "${cppflags} -I${d}")
- endforeach(d)
- set(ldflags "${CMAKE_EXE_LINKER_FLAGS}")
-+ if (LLVM_LINK_LLVM_DYLIB)
-+ set(linkmode "dylib")
-+ else()
-+ set(linkmode "component-libs")
-+ endif()
- add_custom_command(OUTPUT ${binpath}
-- COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}"
-+ COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "go=${GO_EXECUTABLE}" "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}" "linkmode=${linkmode}"
- ${ARG_GOFLAGS} build -o ${binpath} ${pkgpath}
- DEPENDS llvm-config ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX}
- ${llvmlibs} ${ARG_DEPENDS}
-diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake
-index 22ac714..aa68b40 100644
---- a/cmake/modules/LLVM-Config.cmake
-+++ b/cmake/modules/LLVM-Config.cmake
-@@ -31,7 +31,23 @@ endfunction(is_llvm_target_library)
-
-
- macro(llvm_config executable)
-- explicit_llvm_config(${executable} ${ARGN})
-+ cmake_parse_arguments(ARG "USE_SHARED" "" "" ${ARGN})
-+ set(link_components ${ARG_UNPARSED_ARGUMENTS})
-+
-+ if(USE_SHARED)
-+ # If USE_SHARED is specified, then we link against libLLVM,
-+ # but also against the component libraries below. This is
-+ # done in case libLLVM does not contain all of the components
-+ # the target requires.
-+ #
-+ # TODO strip LLVM_DYLIB_COMPONENTS out of link_components.
-+ # To do this, we need special handling for "all", since that
-+ # may imply linking to libraries that are not included in
-+ # libLLVM.
-+ target_link_libraries(${executable} LLVM)
-+ endif()
-+
-+ explicit_llvm_config(${executable} ${link_components})
- endmacro(llvm_config)
-
-
-diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake
-index 85d720e..fcb445a 100644
---- a/cmake/modules/TableGen.cmake
-+++ b/cmake/modules/TableGen.cmake
-@@ -73,6 +73,10 @@ endfunction()
- macro(add_tablegen target project)
- set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
- set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
-+
-+ # FIXME: It leaks to user, callee of add_tablegen.
-+ set(LLVM_ENABLE_OBJLIB ON)
-+
- add_llvm_utility(${target} ${ARGN})
- set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS})
-
-diff --git a/tools/llvm-go/llvm-go.go b/tools/llvm-go/llvm-go.go
-index c5c3fd2..ed79ca6 100644
---- a/tools/llvm-go/llvm-go.go
-+++ b/tools/llvm-go/llvm-go.go
-@@ -24,6 +24,11 @@ import (
- "strings"
- )
-
-+const (
-+ linkmodeComponentLibs = "component-libs"
-+ linkmodeDylib = "dylib"
-+)
-+
- type pkg struct {
- llvmpath, pkgpath string
- }
-@@ -66,11 +71,12 @@ var components = []string{
- func llvmConfig(args ...string) string {
- configpath := os.Getenv("LLVM_CONFIG")
- if configpath == "" {
-- // strip llvm-go, add llvm-config
-- configpath = os.Args[0][:len(os.Args[0])-7] + "llvm-config"
-+ bin, _ := filepath.Split(os.Args[0])
-+ configpath = filepath.Join(bin, "llvm-config")
- }
-
- cmd := exec.Command(configpath, args...)
-+ cmd.Stderr = os.Stderr
- out, err := cmd.Output()
- if err != nil {
- panic(err.Error())
-@@ -78,11 +84,21 @@ func llvmConfig(args ...string) string {
-
- outstr := string(out)
- outstr = strings.TrimSuffix(outstr, "\n")
-- return strings.Replace(outstr, "\n", " ", -1)
-+ outstr = strings.Replace(outstr, "\n", " ", -1)
-+ return outstr
- }
-
--func llvmFlags() compilerFlags {
-- ldflags := llvmConfig(append([]string{"--ldflags", "--libs", "--system-libs"}, components...)...)
-+func llvmFlags(linkmode string) compilerFlags {
-+ ldflags := llvmConfig("--ldflags")
-+ switch linkmode {
-+ case linkmodeComponentLibs:
-+ ldflags += " " + llvmConfig(append([]string{"--libs"}, components...)...)
-+ case linkmodeDylib:
-+ ldflags += " -lLLVM"
-+ default:
-+ panic("invalid linkmode: " + linkmode)
-+ }
-+ ldflags += " " + llvmConfig("--system-libs")
- if runtime.GOOS != "darwin" {
- // OS X doesn't like -rpath with cgo. See:
- // https://code.google.com/p/go/issues/detail?id=7293
-@@ -117,8 +133,8 @@ func printComponents() {
- fmt.Println(strings.Join(components, " "))
- }
-
--func printConfig() {
-- flags := llvmFlags()
-+func printConfig(linkmode string) {
-+ flags := llvmFlags(linkmode)
-
- fmt.Printf(`// +build !byollvm
-
-@@ -137,7 +153,7 @@ type (run_build_sh int)
- `, flags.cpp, flags.cxx, flags.ld)
- }
-
--func runGoWithLLVMEnv(args []string, cc, cxx, gocmd, llgo, cppflags, cxxflags, ldflags string) {
-+func runGoWithLLVMEnv(args []string, cc, cxx, gocmd, llgo, cppflags, cxxflags, ldflags, linkmode string) {
- args = addTag(args, "byollvm")
-
- srcdir := llvmConfig("--src-root")
-@@ -166,7 +182,7 @@ func runGoWithLLVMEnv(args []string, cc, cxx, gocmd, llgo, cppflags, cxxflags, l
- newgopathlist = append(newgopathlist, filepath.SplitList(os.Getenv("GOPATH"))...)
- newgopath := strings.Join(newgopathlist, string(filepath.ListSeparator))
-
-- flags := llvmFlags()
-+ flags := llvmFlags(linkmode)
-
- newenv := []string{
- "CC=" + cc,
-@@ -178,7 +194,7 @@ func runGoWithLLVMEnv(args []string, cc, cxx, gocmd, llgo, cppflags, cxxflags, l
- "PATH=" + newpath,
- }
- if llgo != "" {
-- newenv = append(newenv, "GCCGO=" + llgo)
-+ newenv = append(newenv, "GCCGO="+llgo)
- }
-
- for _, v := range os.Environ() {
-@@ -234,45 +250,44 @@ func main() {
- ldflags := os.Getenv("CGO_LDFLAGS")
- gocmd := "go"
- llgo := ""
-+ linkmode := linkmodeComponentLibs
-+
-+ flags := []struct {
-+ name string
-+ dest *string
-+ }{
-+ {"cc", &cc},
-+ {"cxx", &cxx},
-+ {"go", &gocmd},
-+ {"llgo", &llgo},
-+ {"cppflags", &cppflags},
-+ {"ldflags", &ldflags},
-+ {"linkmode", &linkmode},
-+ }
-
- args := os.Args[1:]
-- DONE: for {
-- switch {
-- case len(args) == 0:
-+LOOP:
-+ for {
-+ if len(args) == 0 {
- usage()
-- case strings.HasPrefix(args[0], "cc="):
-- cc = args[0][3:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "cxx="):
-- cxx = args[0][4:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "go="):
-- gocmd = args[0][3:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "llgo="):
-- llgo = args[0][5:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "cppflags="):
-- cppflags = args[0][9:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "cxxflags="):
-- cxxflags = args[0][9:]
-- args = args[1:]
-- case strings.HasPrefix(args[0], "ldflags="):
-- ldflags = args[0][8:]
-- args = args[1:]
-- default:
-- break DONE
- }
-+ for _, flag := range flags {
-+ if strings.HasPrefix(args[0], flag.name+"=") {
-+ *flag.dest = args[0][len(flag.name)+1:]
-+ args = args[1:]
-+ continue LOOP
-+ }
-+ }
-+ break
- }
-
- switch args[0] {
- case "build", "get", "install", "run", "test":
-- runGoWithLLVMEnv(args, cc, cxx, gocmd, llgo, cppflags, cxxflags, ldflags)
-+ runGoWithLLVMEnv(args, cc, cxx, gocmd, llgo, cppflags, cxxflags, ldflags, linkmode)
- case "print-components":
- printComponents()
- case "print-config":
-- printConfig()
-+ printConfig(linkmode)
- default:
- usage()
- }
-diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
-index 54d71d3..d9bd15f 100644
---- a/tools/llvm-shlib/CMakeLists.txt
-+++ b/tools/llvm-shlib/CMakeLists.txt
-@@ -2,42 +2,6 @@
- # library is enabled by setting LLVM_BUILD_LLVM_DYLIB=yes on the CMake
- # commandline. By default the shared library only exports the LLVM C API.
-
--
--# You can configure which libraries from LLVM you want to include in the shared
--# library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited list of
--# LLVM components. All compoenent names handled by llvm-config are valid.
--
--if(NOT DEFINED LLVM_DYLIB_COMPONENTS)
-- set(LLVM_DYLIB_COMPONENTS
-- ${LLVM_TARGETS_TO_BUILD}
-- Analysis
-- BitReader
-- BitWriter
-- CodeGen
-- Core
-- DebugInfoDWARF
-- DebugInfoPDB
-- ExecutionEngine
-- IPA
-- IPO
-- IRReader
-- InstCombine
-- Instrumentation
-- Interpreter
-- Linker
-- MCDisassembler
-- MCJIT
-- ObjCARCOpts
-- Object
-- ScalarOpts
-- Support
-- Target
-- TransformUtils
-- Vectorize
-- native
-- )
--endif()
--
- add_definitions( -DLLVM_VERSION_INFO=\"${PACKAGE_VERSION}\" )
-
- set(SOURCES
-@@ -46,6 +10,29 @@ set(SOURCES
-
- llvm_map_components_to_libnames(LIB_NAMES ${LLVM_DYLIB_COMPONENTS})
-
-+if(LLVM_LINK_LLVM_DYLIB)
-+ if(NOT LLVM_DYLIB_EXPORT_ALL)
-+ message(FATAL_ERROR "LLVM_DYLIB_EXPORT_ALL must be ON when LLVM_LINK_LLVM_DYLIB is ON")
-+ endif()
-+
-+ # libLLVM.so should not have any dependencies on any other LLVM
-+ # shared libraries. When using the "all" pseudo-component,
-+ # LLVM_AVAILABLE_LIBS is added to the dependencies, which may
-+ # contain shared libraries (e.g. libLTO).
-+ #
-+ # Also exclude libLLVMTableGen for the following reasons:
-+ # - it is only used by internal *-tblgen utilities;
-+ # - it pollutes the global options space.
-+ foreach(lib ${LIB_NAMES})
-+ get_target_property(t ${lib} TYPE)
-+ if("${lib}" STREQUAL "LLVMTableGen")
-+ elseif("x${t}" STREQUAL "xSTATIC_LIBRARY")
-+ list(APPEND FILTERED_LIB_NAMES ${lib})
-+ endif()
-+ endforeach()
-+ set(LIB_NAMES ${FILTERED_LIB_NAMES})
-+endif()
-+
- if(NOT DEFINED LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
-
- if( WIN32 AND NOT CYGWIN )
-@@ -95,7 +82,7 @@ else()
- add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE})
- endif()
-
--add_llvm_library(LLVM SHARED ${SOURCES})
-+add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB ${SOURCES})
-
- list(REMOVE_DUPLICATES LIB_NAMES)
- if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
diff --git a/abs/extra/mkvtoolnix/PKGBUILD b/abs/extra/mkvtoolnix/PKGBUILD
index ef840a1..2a8ff55 100644
--- a/abs/extra/mkvtoolnix/PKGBUILD
+++ b/abs/extra/mkvtoolnix/PKGBUILD
@@ -1,93 +1,60 @@
# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: xduugu <xduugu@gmx.com>
pkgbase=mkvtoolnix
-pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gtk')
-pkgver=7.4.0
-pkgrel=1
+pkgname=('mkvtoolnix-cli' 'mkvtoolnix-gui')
+pkgver=9.1.0
+pkgrel=3
+pkgdesc='Set of tools to create, edit and inspect Matroska files'
arch=('i686' 'x86_64')
+url='https://www.bunkus.org/videotools/mkvtoolnix/'
license=('GPL')
-url="http://www.bunkus.org/videotools/mkvtoolnix/index.html"
-makedepends=('libmatroska' 'flac' 'libvorbis' 'file' 'wxgtk'
- 'boost-libs' 'lzo' 'xdg-utils' 'boost' 'ruby')
-source=("http://www.bunkus.org/videotools/${pkgbase}/sources/${pkgbase}-${pkgver}.tar.xz")
-md5sums=('d107166920ff0d966ac30626f7cda80d')
-
-prepare() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- # Disable automagic curl dep used for online update checking
- sed -i -e '/curl/d' configure.in
- export CURL_CFLAGS="" CURL_LIBS=""
-
- export CFLAGS="${CFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
- export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=3"
-
- # Sets number of threads for a parallel build
- export DRAKETHREADS=4
-
- autoreconf -vfi
-}
+makedepends=('boost' 'boost-libs' 'file' 'flac' 'libebml' 'libmatroska'
+ 'libogg' 'libvorbis' 'qt5-base' 'ruby' 'zlib')
+source=("http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-${pkgver}.tar.xz")
+md5sums=('7eafd6f5a9affd35f9cbf607d8ccf9b3')
build() {
- cd "${srcdir}/${pkgbase}-${pkgver}"
-
- ./configure --prefix=/usr \
- --with-boost-libdir=/usr/lib \
- --disable-gui
- ./drake
+ cd mkvtoolnix-${pkgver}
+ ./configure --prefix='/usr' \
+ --without-curl \
+ --disable-qt
+ ./drake apps:mkvinfo $MAKEFLAGS
mv src/mkvinfo{,-cli}
- ./configure --prefix=/usr \
- --with-boost-libdir=/usr/lib
- ./drake
+ ./configure --prefix='/usr' \
+ --without-curl
+ ./drake $MAKEFLAGS
}
package_mkvtoolnix-cli() {
- pkgdesc="Set of tools to create, edit and inspect Matroska files - CLI version"
- depends=('libmatroska' 'expat' 'flac' 'libvorbis' 'file' 'boost-libs' 'lzo')
- provides=('mkvtoolnix')
- conflicts=('mkvtoolnix')
- replaces=('mkvtoolnix')
+ depends=('boost-libs' 'file' 'flac' 'gcc-libs' 'glibc' 'libogg' 'zlib'
+ 'libebml.so' 'libmatroska.so' 'libvorbis.so')
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd mkvtoolnix-${pkgver}
./drake DESTDIR="${pkgdir}" install
- rm -rf "${pkgdir}"/usr/bin/mkvinfo
- install -Dm755 src/mkvinfo-cli "${pkgdir}"/usr/bin/mkvinfo
-
- rm -rf "${pkgdir}"/usr/bin/mmg
- rm -rf "${pkgdir}"/usr/share/man/de/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/man/ja/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/man/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/man/nl/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/man/uk/man1/mmg.1
- rm -rf "${pkgdir}"/usr/share/applications
- rm -rf "${pkgdir}"/usr/share/icons
- rm -rf "${pkgdir}"/usr/share/mime
+ install -m 755 src/mkvinfo-cli "${pkgdir}"/usr/bin/mkvinfo
+ rm -rf "${pkgdir}"/usr/share/{applications,icons,mime}
+ find "${pkgdir}" -name mkvtoolnix-gui* -delete
}
-package_mkvtoolnix-gtk() {
- pkgdesc="Set of tools to create, edit and inspect Matroska files - wxGTK GUI"
- depends=("mkvtoolnix-cli=${pkgver}" 'wxgtk' 'xdg-utils' 'desktop-file-utils')
- install=mkvtoolnix.install
+package_mkvtoolnix-gui() {
+ depends=('desktop-file-utils' 'hicolor-icon-theme' 'mkvtoolnix-cli'
+ 'qt5-base' 'shared-mime-info' 'xdg-utils')
+ replaces=('mkvtoolnix-gtk')
+ install='mkvtoolnix-gui.install'
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd mkvtoolnix-${pkgver}
./drake DESTDIR="${pkgdir}" install
- rm -rf "${pkgdir}"/usr/bin/mkv*
- install -Dm755 src/mkvinfo "${pkgdir}"/usr/bin/mkvinfo-gtk
- sed -ri 's/^(Exec=mkvinfo)/\1-gtk/' "${pkgdir}"/usr/share/applications/mkvinfo.desktop
-
- rm -rf "${pkgdir}"/usr/share/doc
rm -rf "${pkgdir}"/usr/share/locale
- rm -rf "${pkgdir}"/usr/share/man/de/man1/mkv*
- rm -rf "${pkgdir}"/usr/share/man/ja/man1/mkv*
- rm -rf "${pkgdir}"/usr/share/man/man1/mkv*
- rm -rf "${pkgdir}"/usr/share/man/nl/man1/mkv*
- rm -rf "${pkgdir}"/usr/share/man/zh_CN/man1/mkv*
- rm -rf "${pkgdir}"/usr/share/man/uk/man1/mkv*
+ for t in mkv{extract,info,merge,propedit}; do
+ find "${pkgdir}" -name $t* -delete
+ done
}
+
+# vim: ts=2 sw=2 et:
diff --git a/abs/extra/mkvtoolnix/mkvtoolnix-gui.install b/abs/extra/mkvtoolnix/mkvtoolnix-gui.install
new file mode 100644
index 0000000..ec2cf43
--- /dev/null
+++ b/abs/extra/mkvtoolnix/mkvtoolnix-gui.install
@@ -0,0 +1,15 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database /usr/share/mime &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ post_install
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/abs/extra/mkvtoolnix/mkvtoolnix.install b/abs/extra/mkvtoolnix/mkvtoolnix.install
deleted file mode 100644
index 1481351..0000000
--- a/abs/extra/mkvtoolnix/mkvtoolnix.install
+++ /dev/null
@@ -1,15 +0,0 @@
-post_install() {
- xdg-icon-resource forceupdate --theme hicolor &> /dev/null
- if [ -f usr/bin/update-mime-database ]; then
- update-mime-database usr/share/mime &> /dev/null
- fi
- update-desktop-database -q
-}
-
-post_upgrade() {
- post_install
-}
-
-pre_remove() {
- post_install
-}
diff --git a/abs/extra/mpd/PKGBUILD b/abs/extra/mpd/PKGBUILD
index bb73322..ce19a60 100644
--- a/abs/extra/mpd/PKGBUILD
+++ b/abs/extra/mpd/PKGBUILD
@@ -6,32 +6,40 @@
# Contributor: Ben <ben@benmazer.net>
pkgname=mpd
-pkgver=0.19.9
-pkgrel=3
+pkgver=0.19.15
+pkgrel=2
pkgdesc='Flexible, powerful, server-side application for playing music'
url='http://www.musicpd.org/'
license=('GPL')
arch=('i686' 'x86_64')
depends=('libao' 'ffmpeg' 'libmodplug' 'audiofile' 'libshout' 'libmad' 'curl' 'faad2'
'sqlite' 'libmms' 'wavpack' 'avahi' 'libid3tag' 'yajl' 'libmpdclient'
- 'icu' 'libupnp' 'libnfs')
+ 'icu' 'libupnp' 'libnfs' 'libsamplerate' 'libsoxr' 'smbclient' 'libcdio-paranoia')
makedepends=('boost' 'doxygen')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("http://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig}
'tmpfiles.d'
'conf')
-sha1sums=('6683bee5f132eda318c5a61ec14b2df8d9164d60' 'SKIP'
+sha1sums=('5c32aff6ea3f031de5802a39a222efd7e4b1bafd' 'SKIP'
'f4d5922abb69abb739542d8e93f4dfd748acdad7'
'291fd5cda9f0845834a553017327c4586bd853f6')
backup=('etc/mpd.conf')
install=install
+prepare() {
+ # Temporary; see FS#48372
+ install -d "${srcdir}"/pkg-config
+ ln -s /usr/lib/pkgconfig/libsystemd.pc "${srcdir}"/pkg-config/libsystemd-daemon.pc
+}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ export PKG_CONFIG_PATH="${srcdir}"/pkg-config
./configure \
--prefix=/usr \
--sysconfdir=/etc \
+ --enable-cdio-paranoia \
--enable-libmpdclient \
--disable-jack \
--enable-soundcloud \
@@ -47,7 +55,7 @@ package() {
make DESTDIR="${pkgdir}" install
install -Dm644 ../conf "${pkgdir}"/etc/mpd.conf
install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf
- install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd/playlists
+ install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd{,/playlists}
install -Dm644 "${pkgdir}"/usr/lib/systemd/{system,user}/mpd.service
sed '/\[Service\]/a User=mpd' -i "${pkgdir}"/usr/lib/systemd/system/mpd.service
diff --git a/abs/extra/netcdf/PKGBUILD b/abs/extra/netcdf/PKGBUILD
new file mode 100644
index 0000000..c73dec6
--- /dev/null
+++ b/abs/extra/netcdf/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=netcdf
+pkgver=4.4.1rc1
+pkgrel=1
+pkgdesc="network Common Data Form interface for array-oriented data access and corresponding library"
+arch=("i686" "x86_64")
+url="http://www.unidata.ucar.edu/downloads/netcdf/index.jsp"
+depends=('gcc-libs' 'hdf5' 'curl')
+optdepends=('netcdf-fortran: fortran bindings' 'netcdf-cxx: c++ bindings')
+options=('!makeflags')
+license=('custom')
+#source=("http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-${pkgver}.tar.gz")
+source=("https://github.com/Unidata/netcdf-c/archive/v4.4.1-rc1.tar.gz")
+sha1sums=('7606c16814bf9b33a66815e4109d9ba2df4a4936')
+
+build() {
+# cd "${srcdir}"/${pkgname}-${pkgver}
+ cd "${srcdir}"/netcdf-c-4.4.1-rc1
+# autoreconf -fis
+ ./configure --prefix=/usr --enable-shared --enable-netcdf-4 --enable-dap-netcdf
+ make
+}
+
+# hdf5 tests fail, have not yet been updated to hdf5-1.10.0
+#check() {
+# cd "${srcdir}"/${pkgname}-${pkgver}
+# cd "${srcdir}"/netcdf-c-4.4.1-rc1
+# make check
+#}
+
+package() {
+# cd "${srcdir}"/${pkgname}-${pkgver}
+ cd "${srcdir}"/netcdf-c-4.4.1-rc1
+ install -m755 -d "${pkgdir}"/usr/lib
+ install -m755 -d "${pkgdir}"/usr/share/man
+ make DESTDIR="${pkgdir}" install
+
+# install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/COPYRIGHT \
+# "${pkgdir}"/usr/share/licenses/${pkgname}/COPYRIGHT
+ install -Dm644 "${srcdir}"/netcdf-c-4.4.1-rc1/COPYRIGHT \
+ "${pkgdir}"/usr/share/licenses/${pkgname}/COPYRIGHT
+
+}
diff --git a/abs/extra/nvidia-settings/PKGBUILD b/abs/extra/nvidia-settings/PKGBUILD
index 2330008..28ee5c4 100644
--- a/abs/extra/nvidia-settings/PKGBUILD
+++ b/abs/extra/nvidia-settings/PKGBUILD
@@ -1,30 +1,38 @@
-# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-pkgname=nvidia-settings
-pkgver=364.19
+pkgbase=nvidia-settings
+pkgname=('nvidia-settings' 'libxnvctrl')
+pkgver=370.28
pkgrel=1
pkgdesc="Tool for configuring the NVIDIA graphics driver"
arch=('i686' 'x86_64')
url="https://github.com/NVIDIA/nvidia-settings"
license=('GPL2')
-depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils')
-makedepends=('git' 'inetutils' 'gtk2')
-source=("git+https://github.com/NVIDIA/nvidia-settings#tag=$pkgver")
-sha1sums=('SKIP')
+makedepends=('git' 'inetutils' 'gtk2' 'jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxext')
+options=('staticlibs')
+source=("git+https://github.com/NVIDIA/nvidia-settings#tag=$pkgver"
+ libxnvctrl_so.patch)
+sha1sums=('SKIP'
+ '16619a01e92e565c79ad344be87ad11244ac1762')
prepare() {
export PREFIX=/usr
export NV_USE_BUNDLED_LIBJANSSON=0
+ cd ${pkgbase}
+ patch -p1 < "${srcdir}/libxnvctrl_so.patch"
}
build() {
- cd ${pkgname}
+ cd ${pkgbase}
make
+ make -C src/libXNVCtrl
}
-package() {
- cd ${pkgname}
+package_nvidia-settings() {
+ depends=('jansson' 'gtk3' 'libxv' 'libvdpau' 'nvidia-utils' 'libxnvctrl')
+
+ cd ${pkgbase}
make DESTDIR="${pkgdir}" install
install -D -m644 doc/nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
@@ -33,3 +41,21 @@ package() {
rm "$pkgdir/usr/lib/libnvidia-gtk2.so.$pkgver"
}
+
+package_libxnvctrl() {
+ depends=('libxext')
+ pkgdesc='NVIDIA NV-CONTROL X extension'
+
+ cd ${pkgbase}
+ install -Dm 644 doc/{NV-CONTROL-API.txt,FRAMELOCK.txt} -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm 644 samples/{Makefile,README,*.c,*.h,*.mk} -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+
+ cd src/libXNVCtrl
+ install -Dm 644 *.h -t "${pkgdir}/usr/include/NVCtrl"
+ install -Dm 644 libXNVCtrl.a -t "${pkgdir}/usr/lib"
+ install -Dm 755 libXNVCtrl.so.0.0.0 -t "${pkgdir}/usr/lib"
+ ln -s libXNVCtrl.so.0.0.0 "${pkgdir}/usr/lib/libXNVCtrl.so.0"
+ ln -s libXNVCtrl.so.0 "${pkgdir}/usr/lib/libXNVCtrl.so"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/abs/extra/nvidia-settings/libxnvctrl_so.patch b/abs/extra/nvidia-settings/libxnvctrl_so.patch
new file mode 100644
index 0000000..78cebea
--- /dev/null
+++ b/abs/extra/nvidia-settings/libxnvctrl_so.patch
@@ -0,0 +1,67 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -106,6 +106,8 @@
+ XNVCTRL_DIR ?= libXNVCtrl
+ XNVCTRL_MAKEFILE ?= Makefile
+ XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a
++XNVCTRL_SHARED ?= $(XNVCTRL_DIR)/libXNVCtrl.so.0
++XNVCTRL_LIB ?= $(XNVCTRL_SHARED)
+ XCONFIG_PARSER_DIR ?= XF86Config-parser
+ COMMON_UTILS_DIR ?= common-utils
+ COMMON_UNIX_DIR ?= common-unix
+@@ -280,15 +282,18 @@
+ $(MKDIR) $(BINDIR)
+ $(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<)
+
++$(XNVCTRL_ARCHIVE) $(XNVCTRL_SHARED):
++ $(MAKE) -C $(XNVCTRL_DIR)
++
+ $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS)))
+-$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_ARCHIVE)
++$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_LIB)
+ $(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- -rdynamic -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) $(LIBS)
++ -rdynamic -o $@ $(OBJS) $(XNVCTRL_LIB) $(LIBS)
+
+ $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB)))
+ $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(VERSION_MK)
+ $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK2_LIBS) \
++ $(XNVCTRL_LIB) $(LIBS) $(GTK2_LIBS) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
+ -Wl,-soname -Wl,$(GTK2LIB_SONAME) \
+ $(GTK2_OBJS) $(XCP_OBJS)
+@@ -297,7 +302,7 @@
+ $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
+ $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XCP_OBJS) $(VERSION_MK)
+ $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK3_LIBS) \
++ $(XNVCTRL_LIB) $(LIBS) $(GTK3_LIBS) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
+ -Wl,-soname -Wl,$(GTK3LIB_SONAME) \
+ $(GTK3_OBJS) $(XCP_OBJS)
+--- a/src/libXNVCtrl/Makefile
++++ b/src/libXNVCtrl/Makefile
+@@ -55,10 +55,17 @@
+ .PHONY: clean
+
+ all: $(LIBXNVCTRL)
++all: libXNVCtrl.so
+
+ $(LIBXNVCTRL) : $(OBJS)
+ $(AR) ru $@ $(OBJS)
+
++libXNVCtrl.so: $(OBJS)
++ $(RM) $@ $@.*
++ $(CC) -shared -Wl,-soname=$@.0 -o $@.0.0.0 $(LDFLAGS) $^ -lXext -lX11
++ ln -s $@.0.0.0 $@.0
++ ln -s $@.0 $@
++
+ # define the rule to build each object file
+ $(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
+
+@@ -68,3 +75,4 @@
+ clean:
+ rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \
+ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
++ rm -f libXNVCtrl.so libXNVCtrl.so.*
diff --git a/abs/extra/openpht/PKGBUILD b/abs/extra/openpht/PKGBUILD
index 45c52f7..6ccd7e9 100755..100644
--- a/abs/extra/openpht/PKGBUILD
+++ b/abs/extra/openpht/PKGBUILD
@@ -1,33 +1,38 @@
+# Maintainer: Jeff Keyte <jeff@keyte.me>
+# Contributor: Maxime Gauduin <alucryd@archlinux.org>
+# Contributor: Daniel Wallace <daniel.wallace@gatech.edu>
+
pkgname=openpht
-pkgver=1.5.2.514
-_pkghash=310d4f7e
-pkgrel=2
-pkgdesc='OpenPHT a community driven fork of Plex Home Theater'
+pkgver=1.6.2.123
+_pkghash=e23a7eef
+pkgrel=5
+pkgdesc='OpenPHT is a community driven fork of Plex Home Theater'
arch=('i686' 'x86_64')
-url='https://github.com/RasPlex/OpenPHT'
+url='https://github.com/RasPlex/OpenPHT/'
license=('GPL2')
install="${pkgname}.install"
provides=('plex-home-theater')
#conflicts=('plex-home-theater')
replaces=('plex-home-theater')
-depends=('boost-libs' 'curl' 'ffmpeg-compat' 'glew' 'libcdio' 'libmad'
- 'libmicrohttpd' 'libmpeg2' 'libsamplerate' 'libssh' 'libusb-compat'
- 'libvdpau' 'libxrandr' 'lzo' 'sdl_image' 'sdl_mixer' 'smbclient'
- 'taglib' 'tinyxml' 'yajl')
-makedepends=('boost' 'cmake' 'doxygen' 'git' 'java-environment' 'libcec'
- 'libplist' 'libshairport' 'nasm' 'swig' 'unzip' 'zip')
+depends=('alsa-lib' 'avahi' 'boost-libs' 'curl' 'expat' 'ffmpeg2.8' 'freetype2' 'fribidi'
+ 'gcc-libs' 'glew' 'glibc' 'glu' 'libcdio' 'libgl' 'libjpeg' 'libmad'
+ 'libmicrohttpd' 'libmpeg2' 'libpng' 'libsamplerate' 'llvm-libs'
+ 'libssh' 'libtiff' 'libusb-compat' 'libva' 'libvdpau' 'libx11'
+ 'libxext' 'libxrandr' 'lzo' 'pcre' 'python2' 'sdl' 'sdl_image'
+ 'sdl_mixer' 'sqlite' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'zlib' 'rtmpdump')
+makedepends=('boost' 'cmake' 'doxygen' 'git' 'java-environment' 'shairplay'
+ 'libcec' 'libplist' 'nasm' 'swig' 'unzip' 'zip')
optdepends=('libplist: AirPlay support'
- 'libshairport: AirPlay support'
- 'libcec: Pulse-Eight USB-CEC adapter support')
+ 'libcec: Pulse-Eight USB-CEC adapter support'
+ 'shairplay: Shairplay Support')
source=("https://github.com/RasPlex/OpenPHT/archive/v${pkgver}-${_pkghash}.tar.gz"
- 'plex-ffmpeg-compat.patch'
+ 'plexhometheater.sh'
'plex_lib.conf'
- 'plexhometheater.sh')
-
+ 'fribidi.patch'
+ 'plexhometheater.desktop')
prepare() {
cd OpenPHT-${pkgver}-${_pkghash}
-
- patch -Np1 -i ../plex-ffmpeg-compat.patch
+ patch -Np1 <../fribidi.patch
}
build() {
@@ -38,12 +43,9 @@ build() {
fi
mkdir build && cd build
+ CMAKE_PREFIX_PATH=/usr/lib/ffmpeg2.8:/usr/include/ffmpeg2.8 \
cmake .. \
-DCMAKE_INSTALL_PREFIX='/usr' \
- -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
- -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
- -DCREATE_BUNDLE='FALSE' \
- -DDUMP_SYMBOLS='FALSE' \
-DENABLE_AUTOUPDATE='FALSE' \
-DENABLE_PYTHON='TRUE' \
-DPYTHON_EXEC='/usr/bin/python2' \
@@ -60,16 +62,15 @@ package() {
mv "${pkgdir}"/usr/share/XBMC "${pkgdir}"/usr/share/plexhometheater
rm -rf "${pkgdir}"/usr/bin/*.so
install -Dm 755 "${srcdir}"/plexhometheater.sh "${pkgdir}"/usr/LH/bin/plexhometheater.sh
- install -m 644 ../plex/Resources/plexhometheater.desktop "${pkgdir}"/usr/share/applications/
+ install -m 644 "${srcdir}"/plexhometheater.desktop "${pkgdir}"/usr/share/applications/
install -m 644 ../plex/Resources/plex-icon-256.png "${pkgdir}"/usr/share/pixmaps/plexhometheater.png
# LinHES stuff
- #add in plex_lib.conf
+ # add in plex_lib.conf
install -D -m0744 ${srcdir}/plex_lib.conf ${pkgdir}/etc/gen_lib_xml.d/plex_lib.conf
}
-
-# vim: ts=2 sw=2 et:
-md5sums=('4cefcfc40b4c5bb890cd74e62ca0e1ac'
- '6704244166497db7fa6b3ddd43a0e53b'
+md5sums=('075d697793b32d34c9ac57b94ae14821'
+ 'ad57396d98692dbe8c8d6f2fab707a94'
'c1eedd9f89ee727230833db9ef1e5d29'
- '4ceae60ed2f9e4304eda4f80d407e799')
+ 'a5980579c1b6341a6d06e80d9da2a924'
+ 'e530e2b4d8333863ba1c87862c291ba1')
diff --git a/abs/extra/openpht/__changelog b/abs/extra/openpht/__changelog
index 42c86d8..6daae7f 100644
--- a/abs/extra/openpht/__changelog
+++ b/abs/extra/openpht/__changelog
@@ -1,5 +1,6 @@
copied plex-home-theater to openpht
PKGBUILD - Remove opt dep pulseaudio
+PKGBUILD - Add dep ffmpeg2.8
PKGBUILD - Added plex_lib.conf, this file goes in /etc/gen_lib_xml.d/
PKGBUILD - Install plexhometheater.sh to /usr/LH/bin
openpht.install - add gen_lib_xml.py to post_install and post_remove and post_update
diff --git a/abs/extra/openpht/fribidi.patch b/abs/extra/openpht/fribidi.patch
new file mode 100644
index 0000000..8c939df
--- /dev/null
+++ b/abs/extra/openpht/fribidi.patch
@@ -0,0 +1,50 @@
+diff --git a/plex/CMakeModules/FindFriBiDi.cmake b/plex/CMakeModules/FindFriBiDi.cmake
+--- a/plex/CMakeModules/FindFriBiDi.cmake
++++ b/plex/CMakeModules/FindFriBiDi.cmake
+@@ -9,44 +9,8 @@
+ # also defined, but not for general use are
+ # FRIBIDI_LIBRARY, where to find the FriBiDi library.
+
+-include(CheckSymbolExists)
+-
+-SET(FRIBIDI_FOUND "NO")
+-
+-# Set variable in temp var, otherwise FIND_PATH might fail
+-# unset isn't present in the required version of cmake.
+-FIND_PATH(xFRIBIDI_INCLUDE_DIR fribidi.h
+- PATHS /usr/local/include
+- /usr/include
+- PATH_SUFFIXES fribidi
+- )
+-set(FRIBIDI_INCLUDE_DIR ${xFRIBIDI_INCLUDE_DIR})
+-
+-SET(FRIBIDI_NAMES ${FRIBIDI_NAMES} fribidi libfribidi)
+-FIND_LIBRARY(FRIBIDI_LIBRARY
+- NAMES ${FRIBIDI_NAMES}
+- PATHS /usr/lib /usr/local/lib
+- )
+-
+-IF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
+- SET(CMAKE_REQUIRED_INCLUDES ${FRIBIDI_INCLUDE_DIR})
+- SET(CMAKE_REQUIRED_LIBRARIES ${FRIBIDI_LIBRARY})
+- CHECK_SYMBOL_EXISTS(fribidi_utf8_to_unicode fribidi.h FOUND_fribidi_utf8_to_unicode)
+- CHECK_SYMBOL_EXISTS(fribidi_charset_to_unicode fribidi.h FOUND_fribidi_charset_to_unicode)
+- if(FOUND_fribidi_charset_to_unicode)
+- SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
+- SET(FRIBIDI_FOUND "YES")
+- elseif(FOUND_fribidi_utf8_to_unicode)
+- SET(FRIBIDI_LIBRARIES ${FRIBIDI_LIBRARY})
+- SET(FRIBIDI_FOUND "YES")
+- add_definitions(-DOLD_FRIBIDI)
+- MESSAGE(STATUS "Legacy FriBiDi: ${FRIBIDI_LIBRARY}")
+- else()
+- SET(FRIBIDI_LIBRARIES "NOTFOUND")
+- SET(FRIBIDI_INCLUDE_DIR "NOTFOUND")
+- SET(FRIBIDI_FOUND "NO")
+- endif()
+-ENDIF (FRIBIDI_LIBRARY AND FRIBIDI_INCLUDE_DIR)
++include(FindPkgConfig)
++pkg_check_modules(FRIBIDI fribidi)
+
+ IF (FRIBIDI_FOUND)
+
diff --git a/abs/extra/openpht/plex-ffmpeg-compat.patch b/abs/extra/openpht/plex-ffmpeg-compat.patch
deleted file mode 100755
index 1601500..0000000
--- a/abs/extra/openpht/plex-ffmpeg-compat.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -rupN plex-home-theater.orig/plex/CMakeModules/FindFFmpeg.cmake plex-home-theater/plex/CMakeModules/FindFFmpeg.cmake
---- plex-home-theater.orig/plex/CMakeModules/FindFFmpeg.cmake 2014-09-15 11:46:21.751638700 +0200
-+++ plex-home-theater/plex/CMakeModules/FindFFmpeg.cmake 2014-09-15 11:43:25.678039000 +0200
-@@ -41,7 +41,7 @@ MACRO(FFMPEG_FIND varname shortname head
- /opt/csw/include # Blastwave
- /opt/include
- /usr/freeware/include
-- PATH_SUFFIXES ffmpeg
-+ PATH_SUFFIXES ffmpeg-compat
- DOC "Location of FFMPEG Headers"
- )
-
-@@ -62,7 +62,7 @@ MACRO(FFMPEG_FIND varname shortname head
- /opt/csw/include # Blastwave
- /opt/include
- /usr/freeware/include
-- PATH_SUFFIXES ffmpeg
-+ PATH_SUFFIXES ffmpeg-compat
- DOC "Location of FFMPEG Headers"
- )
- ENDIF(NOT FFMPEG_${varname}_INCLUDE_DIRS)
-@@ -85,6 +85,7 @@ MACRO(FFMPEG_FIND varname shortname head
- /opt/csw/lib
- /opt/lib
- /usr/freeware/lib64
-+ PATH_SUFFIXES ffmpeg-compat
- DOC "Location of FFMPEG Libraries"
- )
-
diff --git a/abs/extra/openpht/plexhometheater.desktop b/abs/extra/openpht/plexhometheater.desktop
new file mode 100644
index 0000000..3bae57f
--- /dev/null
+++ b/abs/extra/openpht/plexhometheater.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=OpenPHT
+Name[en_US]=OpenPHT
+Exec=/usr/bin/plexhometheater.sh
+Icon=plexhometheater
+Comment[en_US]=OpenPHT
+StartupNotify=true
+Categories=AudioVideo
diff --git a/abs/extra/openpht/plexhometheater.sh b/abs/extra/openpht/plexhometheater.sh
index 579bed6..16da77d 100755
--- a/abs/extra/openpht/plexhometheater.sh
+++ b/abs/extra/openpht/plexhometheater.sh
@@ -5,7 +5,7 @@ stop_xss.sh &
#Launch plex
export XBMC_BIN_HOME='/usr/lib/plexhometheater'
export XBMC_HOME='/usr/share/plexhometheater'
-plexhometheater
+exec plexhometheater
#Start Xscreensaver again
killall stop_xss.sh
diff --git a/abs/extra/plex-media-server/MKPKG b/abs/extra/plex-media-server/MKPKG
deleted file mode 100644
index 01a47b4..0000000
--- a/abs/extra/plex-media-server/MKPKG
+++ /dev/null
@@ -1,3 +0,0 @@
-pkgname=('plex-media-server')
-
-# vim: ts=2 sw=2 et:
diff --git a/abs/extra/plex-media-server/PKGBUILD b/abs/extra/plex-media-server/PKGBUILD
index 42f7f3d..5822e7d 100644
--- a/abs/extra/plex-media-server/PKGBUILD
+++ b/abs/extra/plex-media-server/PKGBUILD
@@ -7,8 +7,8 @@
# Contributor: Praekon <praekon@googlemail.com>
pkgname=plex-media-server
-pkgver=0.9.16.6.1993
-_pkgsum=5089475
+pkgver=1.1.4.2757
+_pkgsum=24ffd60
pkgrel=1
pkgdesc='Plex Media Server'
arch=('x86_64')
@@ -17,21 +17,21 @@ license=('custom')
depends=('systemd')
makedepends_i686=('prelink')
makedepends_x86_64=('prelink')
-replaces=('plexmediaserver')
-conflicts=('plexmediaserver' 'plexmediaserver-plexpass')
+provides=('plex-media-server')
+conflicts=('plex-media-server-plexpass')
backup=('etc/conf.d/plexmediaserver')
install='plex-media-server.install'
source=('plexmediaserver.conf.d'
'plexmediaserver.service'
+ 'plex.sysusers'
'terms.txt'
'plexmediascanner.sh')
-#source_arm=("https://downloads.plex.tv/plex-media-server/${pkgver}-${_pkgsum}/PlexMediaServer-${pkgver}-${_pkgsum}-arm.spk")
#source_armv7h=("https://downloads.plex.tv/plex-media-server/${pkgver}-${_pkgsum}/PlexMediaServer-${pkgver}-${_pkgsum}-arm7.spk")
#source_i686=("https://downloads.plex.tv/plex-media-server/${pkgver}-${_pkgsum}/plexmediaserver-${pkgver}-${_pkgsum}.i386.rpm")
source_x86_64=("https://downloads.plex.tv/plex-media-server/${pkgver}-${_pkgsum}/plexmediaserver-${pkgver}-${_pkgsum}.x86_64.rpm")
-#sha256sums_arm=('77792714279505e8b3fda046f841d0ed0c9bcee181678ffff27c49bde9e43e27')
-#sha256sums_armv7h=('e23b3248cc599c8f99213e213df48edef0d44afd5ef1f32404ccd5c8ee84560c')
-#sha256sums_i686=('73cdaa48714c95d9cae7f8411f50b4632e0a6f425ded6bd681d0d5008dea9397')
+#sha256sums_armv7h=('1a7b7610eb7f1857cece6290d3786022cef337cee062ee5b984ec94761bb0c6e')
+#sha256sums_i686=('2d2a71a50b6a95fc91c64c01ea2ec2bba2aedd80068481c441106551ed7eeae9')
+#sha256sums_x86_64=('99821d4795a50e5ce9ceb7947d21c7418b328d014a00b6390e4a2913ed189192')
prepare() {
@@ -48,18 +48,18 @@ package() {
cp -dr --no-preserve='ownership' usr/lib/plexmediaserver "${pkgdir}"/opt/
install -m 644 plexmediaserver.service "${pkgdir}"/usr/lib/systemd/system/
install -m 644 plexmediaserver.conf.d "${pkgdir}"/etc/conf.d/plexmediaserver
+ install -Dm 644 "$srcdir/plex.sysusers" "$pkgdir/usr/lib/sysusers.d/plex.conf"
install -m 755 -D plexmediascanner.sh "${pkgdir}"/usr/LH/bin/plexmediascanner.sh
- #install -dm 755 "${pkgdir}"/var/lib/plex
- #chown 421:421 -R "${pkgdir}"/var/lib/plex
- install -dm 755 "${pkgdir}"/usr/share/licenses/plex-media-server
- install -m 644 terms.txt "${pkgdir}"/usr/share/licenses/plex-media-server/
+ install -dm 755 "${pkgdir}"/usr/share/licenses/${pkgname}
+ install -m 644 terms.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
}
# vim: ts=2 sw=2 et:
md5sums=('dfd6778f5c0d3d64c2c3a71dca02b7cc'
- '34268b981e3b8c833a0e2270429232a6'
+ '3f39ee0e8b1ebb1c7ca714f67fa88641'
+ '97241861f2c0b7c82d1945a6c5de8e35'
'bd703bc750b989a27edd590eb8c8e9d7'
'506ec15815bba749a743780edd2323c8')
-md5sums_x86_64=('20e6e297df95ab96dbb6172055ab7935')
+md5sums_x86_64=('5a5607d8a37c21065e2879bf312efd6c')
diff --git a/abs/extra/plex-media-server/__changelog b/abs/extra/plex-media-server/__changelog
index f410839..e7bd5d2 100644
--- a/abs/extra/plex-media-server/__changelog
+++ b/abs/extra/plex-media-server/__changelog
@@ -1,6 +1,6 @@
+PKGBUILD - remove arch arm and i686 and comment out sources
.install & conf.d - change /var/lib/plex to /data/storage/disk0/media/plex
conf.d - change /tmp to data/storage/disk0/media/plex/tmp
plex-media-server.install - add check for data/storage/disk0/media/plex/tmp and create if needed
plex-media-server.install - add_service.sh in post_install; remove_service.sh in post_remove
-PKGBUILD - move creation of /data/storage/disk0/media/plex to .install
PKGBUILD - add plexmediascanner.sh
diff --git a/abs/extra/plex-media-server/plex-media-server.install b/abs/extra/plex-media-server/plex-media-server.install
index e677521..96a77a7 100644
--- a/abs/extra/plex-media-server/plex-media-server.install
+++ b/abs/extra/plex-media-server/plex-media-server.install
@@ -1,45 +1,17 @@
post_install() {
- if [[ ! -d /data/storage/disk0/media/plex ]]; then
- install -dm 755 /data/storage/disk0/media/plex
- chown 421:421 -R /data/storage/disk0/media/plex
- fi
- if [[ ! -d /data/storage/disk0/media/plex/tmp ]]; then
- install -dm 755 /data/storage/disk0/media/plex/tmp
- chown 421:421 -R /data/storage/disk0/media/plex/tmp
- fi
- if [[ -n $(getent group 421) && $(getent group 421) != $(getent group plex) ]]; then
- echo "GID 421 is already assigned to the $(getent group 421 | cut -d':' -f1) group, cannot create the plex group."
- elif [[ -n $(getent passwd 421) && $(getent passwd 421) != $(getent passwd plex) ]]; then
- echo "UID 421 is already assigned to the $(getent passwd 421 | cut -d':' -f1) user, cannot create the plex user."
- else
- if [[ -n $(getent passwd plex) && $(getent passwd plex) != 'plex:x:421:421:Plex User:/data/storage/disk0/media/plex:/usr/bin/nologin' ]]; then
- echo "The plex user is outdated. It will be removed and recreated."
- if [[ -z $(pidof "Plex Media Server") ]]; then
- userdel plex
- chown 421:421 -R /data/storage/disk0/media/plex
- else
- echo "Unable to update the plex user. Please stop plexmediaserver.service and reinstall the package."
- fi
- fi
- if [[ -z $(getent group plex) ]]; then
- groupadd -g 421 plex
- fi
- if [[ -z $(getent passwd plex) ]]; then
- useradd -c 'Plex User' -u 421 -g plex -d /data/storage/disk0/media/plex -s /usr/bin/nologin plex
- fi
- passwd -l plex > /dev/null
- fi
+ systemd-sysusers plex.conf
+ [[ -d /data/storage/disk0/media/plex ]] || install -dm 750 -o plex -g plex /data/storage/disk0/media/plex
+ [[ -d /data/storage/disk0/media/plex/tmp ]] || install -dm 750 -o plex -g plex /data/storage/disk0/media/plex/tmp
+ [[ -d /data/storage/disk0/media/plex ]] && chown -R plex:plex /data/storage/disk0/media/plex
add_service.sh plexmediaserver
}
post_upgrade() {
- post_install
- if [[ $(vercmp 0.9.11.1.678-1 $2) == '1' ]]; then
- echo "Plex' home is now located in '/var/lib/plex'. You will have to move the 'Plex Media Server' directory located in '/opt/plexmediserver/Library/Application Support' into the new home. Please refer to 'https://support.plex.tv/hc/en-us/articles/201370363-Move-an-Install-to-Another-System' for detailed instructions."
- fi
+ [[ -d /data/storage/disk0/media/plex ]] && chown -R plex:plex /data/storage/disk0/media/plex
}
post_remove() {
remove_service.sh plexmediaserver
}
+
# vim: ts=2 sw=2 et:
diff --git a/abs/extra/plex-media-server/plex.sysusers b/abs/extra/plex-media-server/plex.sysusers
new file mode 100644
index 0000000..e23680f
--- /dev/null
+++ b/abs/extra/plex-media-server/plex.sysusers
@@ -0,0 +1,2 @@
+u plex - "Plex Media Server" /opt/plexmediaserver
+
diff --git a/abs/extra/plex-media-server/plexmediaserver.service b/abs/extra/plex-media-server/plexmediaserver.service
index 9206301..55b3325 100644
--- a/abs/extra/plex-media-server/plexmediaserver.service
+++ b/abs/extra/plex-media-server/plexmediaserver.service
@@ -3,6 +3,7 @@ Description=Plex Media Server
After=network.target
[Service]
+WorkingDirectory=/opt/plexmediaserver
EnvironmentFile=/etc/conf.d/plexmediaserver
ExecStart=/opt/plexmediaserver/Plex\x20Media\x20Server
Type=simple
diff --git a/abs/extra/roomeqwizard/PKGBUILD b/abs/extra/roomeqwizard/PKGBUILD
new file mode 100644
index 0000000..dd42753
--- /dev/null
+++ b/abs/extra/roomeqwizard/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: sekret, mail=$(echo c2VrcmV0QHBvc3Rlby5zZQo= | base64 -d)
+pkgname=roomeqwizard
+pkgver=5.16
+_pkgver=5_16
+pkgrel=1
+pkgdesc="free room acoustics analysis software for measuring and analysing room and loudspeaker responses"
+arch=('any')
+url="http://www.roomeqwizard.com"
+license=('custom')
+depends=('java-environment' 'xdg-utils')
+source=("http://www.roomeqwizard.com/installers/REW_linux_$_pkgver.sh")
+md5sums=('fb9be136c2c552a5c5a8f2dda445a07d')
+
+package() {
+ # install
+ mkdir -p "$pkgdir/opt/REW" \
+ "$pkgdir/usr/bin" \
+ "$pkgdir/usr/share/licenses/$pkgname" \
+ "$pkgdir/usr/share/doc/$pkgname" \
+ "$pkgdir/usr/share/applications/$pkgname"
+ sh REW_linux_$_pkgver.sh -q -dir "$pkgdir/opt/REW"
+ mv "$pkgdir/opt/REW/EULA.html" "$pkgdir/usr/share/licenses/$pkgname/EULA.html"
+ mv "$pkgdir/opt/REW/readme.txt" "$pkgdir/usr/share/doc/$pkgname/readme"
+ mv "$pkgdir/opt/REW/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname/$pkgname.desktop"
+ ln -s "/opt/REW/$pkgname" "$pkgdir/usr/bin/$pkgname"
+
+ # basic cleanup
+ rm -rf "$pkgdir/opt/REW/.install4j/installation.log"
+ rm -rf "$pkgdir/opt/REW/uninstall"
+ rm -rf "$pkgdir/opt/REW/uninstall.png"
+
+ # repair
+ sed "s#$pkgdir##g" -i "$pkgdir/usr/share/applications/$pkgname/$pkgname.desktop"
+ sed "s#$pkgdir##g" -i "$pkgdir/opt/REW/.install4j/response.varfile"
+ sed "s#$pkgdir##g" -i "$pkgdir/opt/REW/.install4j/install.prop"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/abs/extra/tidy/PKGBUILD b/abs/extra/tidy/PKGBUILD
new file mode 100644
index 0000000..352e56f
--- /dev/null
+++ b/abs/extra/tidy/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 230776 2015-02-04 23:00:34Z bluewind $
+# Maintainer:
+# Contributor: eric <eric@archlinux.org>
+# Contributor: Markus Meissner <markus@meissna.de>
+
+pkgname=tidy
+pkgver=5.2.0
+pkgrel=1
+pkgdesc="A tool to tidy down your HTML code to a clean style"
+arch=(i686 x86_64)
+url="http://www.html-tidy.org/"
+license=(custom)
+depends=(glibc)
+makedepends=(cmake libxslt)
+conflicts=(tidyhtml)
+provides=(tidyhtml)
+replaces=(tidyhtml)
+source=("https://github.com/htacg/tidy-html5/archive/$pkgver.tar.gz")
+md5sums=('ffbe6e8471eff90877b4d74bb714e22f')
+
+prepare() {
+ mkdir -p build
+}
+
+build() {
+ cd build
+ cmake ../tidy-html5-$pkgver \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="$pkgdir" install
+
+# Compatibility symlinks until everything is ported
+ ln -s tidybuffio.h "$pkgdir"/usr/include/buffio.h
+ ln -s tidyplatform.h "$pkgdir"/usr/include/platform.h
+
+ install -Dm644 "$srcdir"/$pkgname-html5-$pkgver/README/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/abs/extra/tidyhtml/PKGBUILD b/abs/extra/tidyhtml/PKGBUILD
deleted file mode 100644
index aaca300..0000000
--- a/abs/extra/tidyhtml/PKGBUILD
+++ /dev/null
@@ -1,42 +0,0 @@
-# $Id: PKGBUILD 146404 2012-01-10 21:14:26Z andrea $
-# Maintainer:
-# Contributor: eric <eric@archlinux.org>
-# Contributor: Markus Meissner <markus@meissna.de>
-
-pkgname=tidyhtml
-# obtain pkgver from http://tidy.cvs.sourceforge.net/tidy/tidy/src/version.h?view=markup
-pkgver=1.46
-pkgrel=2
-pkgdesc="A tool to tidy down your HTML code to a clean style"
-arch=('i686' 'x86_64')
-url="http://tidy.sourceforge.net/"
-license=('custom')
-depends=('glibc')
-options=('!libtool')
-source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('3d970d54be83c5ec985687e9976a2832')
-
-mksource() {
- mkdir ${pkgname}-${pkgver}
- cd ${pkgname}-${pkgver}
- cvs -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy login #hit enter for password
- cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy
- cd ..
- tar -cvjf ${pkgname}-${pkgver}.tar.bz2 ${pkgname}-${pkgver}/*
-}
-
-build(){
- cd $srcdir/${pkgname}-${pkgver}/tidy
- source build/gnuauto/setup.sh
-
- ./configure --prefix=/usr
- make
-}
-
-package() {
- cd $srcdir/${pkgname}-${pkgver}/tidy
- make DESTDIR=$pkgdir install
-
- install -Dm644 htmldoc/license.html \
- ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
diff --git a/abs/extra/time/PKGBUILD b/abs/extra/time/PKGBUILD
new file mode 100644
index 0000000..6f08a73
--- /dev/null
+++ b/abs/extra/time/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.us>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=time
+pkgver=1.7
+pkgrel=8
+pkgdesc="Utility for monitoring a program's use of system resources"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/directory/time.html"
+license=('GPL')
+depends=('glibc')
+source=(http://ftp.gnu.org/pub/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
+ time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch)
+sha1sums=('dde0c28c7426960736933f3e763320680356cc6a'
+ 'fff80e05dd41f0a59bb1f49d1c6e581d5e8e92e5'
+ 'b2a909e1d92f7af1bc99a4524ad84d467ed79a06')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # cf https://bugzilla.redhat.com/show_bug.cgi?id=527276
+ patch -Np1 < "$srcdir"/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
+
+ # cf https://bugzilla.redhat.com/show_bug.cgi?id=702826
+ patch -Np1 < "$srcdir"/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
+
+ # rebuild the ancient autoconf setup to fix a variety of build issues
+ # surrounding missing/incorrect includes.
+ autoreconf -fisv
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --infodir=/usr/share/info
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ make exec_prefix="$pkgdir/usr" infodir="$pkgdir/usr/share/info" install
+}
diff --git a/abs/extra/time/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch b/abs/extra/time/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
new file mode 100644
index 0000000..008f46c
--- /dev/null
+++ b/abs/extra/time/time-1.7-Recompute-CPU-usage-at-microsecond-level.patch
@@ -0,0 +1,72 @@
+From 0d743a7d946fe176a07baf2586a6af0e867fd89c Mon Sep 17 00:00:00 2001
+From: H.J. Lu <hongjiu.lu@intel.com>
+Date: Wed, 11 May 2011 16:19:55 +0200
+Subject: [PATCH] Recompute CPU usage at microsecond level
+
+If job finishes quickly, miliseconds arithmetic rounds to zero. If
+that happens, recalculate CPU usage ratio with microsecond accuracy
+to raise chance to get non-zero values.
+---
+ resuse.h | 2 ++
+ time.c | 15 +++++++++++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+diff --git a/resuse.h b/resuse.h
+index 992143f..7a3ee66 100644
+--- a/resuse.h
++++ b/resuse.h
+@@ -33,9 +33,11 @@ struct timeval
+ #if HAVE_SYS_RUSAGE_H
+ /* This rusage structure measures nanoseconds instead of microseconds. */
+ # define TV_MSEC tv_nsec / 1000000
++# define TV_USEC tv_nsec / 1000
+ # include <sys/rusage.h>
+ #else
+ # define TV_MSEC tv_usec / 1000
++# define TV_USEC tv_usec
+ # if HAVE_WAIT3
+ # include <sys/resource.h>
+ # else
+diff --git a/time.c b/time.c
+index 43aec0b..96cfdde 100644
+--- a/time.c
++++ b/time.c
+@@ -326,6 +326,8 @@ summarize (fp, fmt, command, resp)
+ {
+ unsigned long r; /* Elapsed real milliseconds. */
+ unsigned long v; /* Elapsed virtual (CPU) milliseconds. */
++ unsigned long ru; /* Elapsed real microseconds. */
++ unsigned long vu; /* Elapsed virtual (CPU) microseconds. */
+
+ if (verbose)
+ {
+@@ -350,6 +352,17 @@ summarize (fp, fmt, command, resp)
+ v = resp->ru.ru_utime.tv_sec * 1000 + resp->ru.ru_utime.TV_MSEC +
+ resp->ru.ru_stime.tv_sec * 1000 + resp->ru.ru_stime.TV_MSEC;
+
++ if (r == 0 && v == 0)
++ {
++ ru = resp->elapsed.tv_usec;
++ vu = resp->ru.ru_utime.TV_USEC + resp->ru.ru_stime.TV_USEC;
++ }
++ else
++ {
++ ru = 0;
++ vu = 0;
++ }
++
+ while (*fmt)
+ {
+ switch (*fmt)
+@@ -408,6 +421,8 @@ summarize (fp, fmt, command, resp)
+ /* % cpu is (total cpu time)/(elapsed time). */
+ if (r > 0)
+ fprintf (fp, "%lu%%", (v * 100 / r));
++ else if (ru > 0)
++ fprintf (fp, "%lu%%", (vu * 100 / ru));
+ else
+ fprintf (fp, "?%%");
+ break;
+--
+1.7.4.4
+
diff --git a/abs/extra/time/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch b/abs/extra/time/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
new file mode 100644
index 0000000..1f68f9b
--- /dev/null
+++ b/abs/extra/time/time-1.7-ru_maxrss-is-in-kilobytes-on-Linux.patch
@@ -0,0 +1,32 @@
+From ad24a929bdcc15abae14a64ea21b821bcd8cb030 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Wed, 11 May 2011 15:19:11 +0200
+Subject: [PATCH] ru_maxrss is in kilobytes on Linux
+
+Since 2.6.32 Linux returns ru_maxrss in kilobytes. Not in pages.
+
+See http://lists.gnu.org/archive/html/bug-gnu-utils/2008-12/msg00047.html
+for discussion.
+---
+ time.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/time.c b/time.c
+index d15fee4..43aec0b 100644
+--- a/time.c
++++ b/time.c
+@@ -395,7 +395,11 @@ summarize (fp, fmt, command, resp)
+ ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v));
+ break;
+ case 'M': /* Maximum resident set size. */
++#ifdef __linux__
++ fprintf (fp, "%ld", resp->ru.ru_maxrss);
++#else
+ fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss));
++#endif
+ break;
+ case 'O': /* Outputs. */
+ fprintf (fp, "%ld", resp->ru.ru_oublock);
+--
+1.7.4.4
+