summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Gjengset2015-10-06 17:22:19 -0400
committerJon Gjengset2015-10-06 17:26:13 -0400
commitdc33e63b8b60f57267cb30b14cf1b6348c4e8c7f (patch)
treea8c12c6abf3fef0747d76e9438702004a263ab17
parentdfb586074508f9b505bcfb8909ff6dde8f066746 (diff)
downloadaur-dc33e63b8b60f57267cb30b14cf1b6348c4e8c7f.tar.gz
Add patches needed to get coz running on Arch.
Submitted upstream as PRs in: - https://github.com/plasma-umass/coz/pull/24 - https://github.com/plasma-umass/coz/pull/23 - https://github.com/plasma-umass/coz/pull/22
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD15
-rw-r--r--no-force-preload.patch13
-rw-r--r--python2.patch10
-rw-r--r--tput.patch28
5 files changed, 70 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 99718b794354..497f33d89024 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,6 +9,12 @@ pkgbase = coz-git
depends = python
depends = clang>=3.1
source = coz-git::git+https://github.com/plasma-umass/coz.git
+ source = python2.patch
+ source = no-force-preload.patch
+ source = tput.patch
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
md5sums = SKIP
pkgname = coz-git
diff --git a/PKGBUILD b/PKGBUILD
index 676f29e4f5b2..76f0859517b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,14 +10,25 @@ depends=('python' 'clang>=3.1')
makedepends=('git')
options=()
install=
-source=('coz-git::git+https://github.com/plasma-umass/coz.git')
-md5sums=('SKIP')
+source=('coz-git::git+https://github.com/plasma-umass/coz.git'
+ 'python2.patch' 'no-force-preload.patch' 'tput.patch')
+md5sums=('SKIP'
+ 'f3ff4dcc098eb00e949b362594918517'
+ 'b7926ac1504babe0b2551983d2d5ed25'
+ 'e14ecdc19cbf244388d6af0a55046083')
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "$srcdir/$pkgname"
+ patch -Np1 < "$srcdir/python2.patch"
+ patch -Np1 < "$srcdir/no-force-preload.patch"
+ patch -Np1 < "$srcdir/tput.patch"
+}
+
build() {
cd "$srcdir/$pkgname"
make
diff --git a/no-force-preload.patch b/no-force-preload.patch
new file mode 100644
index 000000000000..689c17128f34
--- /dev/null
+++ b/no-force-preload.patch
@@ -0,0 +1,13 @@
+diff --git a/coz b/coz
+index 7e9a1ff..6e8b259 100755
+--- a/coz
++++ b/coz
+@@ -39,8 +39,6 @@ def _coz_run(args):
+
+ if 'LD_PRELOAD' in env:
+ env['LD_PRELOAD'] += ':' + coz_runtime
+- else:
+- env['LD_PRELOAD'] = coz_runtime
+
+ if len(args.binary_scope) > 0:
+ env['COZ_BINARY_SCOPE'] = '\t'.join(args.binary_scope)
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 000000000000..eec88ee5ae8a
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,10 @@
+diff --git a/coz b/coz
+index 7e9a1ff..c42dd06 100755
+--- a/coz
++++ b/coz
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+
+ import argparse
+ import copy
diff --git a/tput.patch b/tput.patch
new file mode 100644
index 000000000000..b14996663781
--- /dev/null
+++ b/tput.patch
@@ -0,0 +1,28 @@
+diff --git a/common.mk b/common.mk
+index 643e91d..dcc7b0e 100644
+--- a/common.mk
++++ b/common.mk
+@@ -26,8 +26,8 @@ OTHER_TARGETS := $(filter-out %.so, $(filter-out %.a, $(TARGETS)))
+ MAKEPATH ?= `basename $(PWD)`
+
+ # Log the build path in gray, following by a log message in bold green
+-LOG_PREFIX := "\033[37;0m[$(MAKEPATH)]\033[0m\033[32;1m"
+-LOG_SUFFIX := "\033[0m"
++LOG_PREFIX := "$(shell tput setaf 7)[$(MAKEPATH)]$(shell tput sgr0)$(shell tput setaf 2)"
++LOG_SUFFIX := "$(shell tput sgr0)"
+
+ # Build all targets by default
+ all:: $(TARGETS)
+@@ -77,10 +77,10 @@ bench_inputs:
+ test_inputs:
+
+ bench:: $(OTHER_TARGETS) bench_inputs
+- $(ROOT)/coz run $(COZ_ARGS) --- ./$< $(BENCH_ARGS)
++ coz run $(COZ_ARGS) --- ./$< $(BENCH_ARGS)
+
+ test:: $(OTHER_TARGETS) test_inputs
+- $(ROOT)/coz run $(COZ_ARGS) --- ./$< $(TEST_ARGS)
++ coz run $(COZ_ARGS) --- ./$< $(TEST_ARGS)
+ endif
+
+ # Include dependency rules for all objects