summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/haskell-mode-make-check.patch35
-rw-r--r--gnu/packages/patches/haskell-mode-unused-variables.patch44
-rw-r--r--gnu/packages/patches/rust-1.19-mrustc.patch28
3 files changed, 107 insertions, 0 deletions
diff --git a/gnu/packages/patches/haskell-mode-make-check.patch b/gnu/packages/patches/haskell-mode-make-check.patch
new file mode 100644
index 0000000000..a4d4d525f2
--- /dev/null
+++ b/gnu/packages/patches/haskell-mode-make-check.patch
@@ -0,0 +1,35 @@
+Copied from upstream repository.
+Hunk #2 is removed since it cannot be applied and it is not needed.
+
+From 7cead7137bf54851c1b7df5a3854351296d21276 Mon Sep 17 00:00:00 2001
+From: Vasantha Ganesh K <[email protected]>
+Date: Thu, 22 Jun 2017 23:38:40 +0530
+Subject: [PATCH] removed `check-conventions' from make
+
+---
+ Makefile | 7 +-
+ tests/haskell-code-conventions.el | 165 ------------------------------
+ 2 files changed, 1 insertion(+), 171 deletions(-)
+ delete mode 100644 tests/haskell-code-conventions.el
+
+diff --git a/Makefile b/Makefile
+index b2c89d6..aa907c5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -79,12 +79,7 @@ build-$(EMACS_VERSION)/build-flag : build-$(EMACS_VERSION) $(patsubst %.el,build
+ check-%: tests/%-tests.el
+ $(BATCH) -l "$<" -f ert-run-tests-batch-and-exit;
+
+-check: compile $(AUTOLOADS) check-ert check-conventions
+-
+-check-conventions :
+- $(BATCH) -l tests/haskell-code-conventions.el \
+- -f haskell-check-conventions-batch-and-exit
+- @echo "conventions are okay"
++check: compile $(AUTOLOADS) check-ert
+
+ check-ert: $(ELCHECKS)
+ $(BATCH) --eval "(when (= emacs-major-version 24) \
+--
+2.18.0
+
diff --git a/gnu/packages/patches/haskell-mode-unused-variables.patch b/gnu/packages/patches/haskell-mode-unused-variables.patch
new file mode 100644
index 0000000000..b175fae28c
--- /dev/null
+++ b/gnu/packages/patches/haskell-mode-unused-variables.patch
@@ -0,0 +1,44 @@
+Copied verbatim from upstream repository.
+
+From cee22450ee30e79952f594796721dc6b17798ee6 Mon Sep 17 00:00:00 2001
+From: Sascha Wilde <[email protected]>
+Date: Fri, 23 Sep 2016 15:35:59 +0200
+Subject: [PATCH] Removed unused lexical variables.
+
+---
+ haskell-lexeme.el | 3 +--
+ haskell-process.el | 4 +---
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/haskell-lexeme.el b/haskell-lexeme.el
+index 4256a79..b832560 100644
+--- a/haskell-lexeme.el
++++ b/haskell-lexeme.el
+@@ -138,8 +138,7 @@ When match is successful, match-data will contain:
+ (match-text 2) - whole qualified identifier
+ (match-text 3) - unqualified part of identifier
+ (match-text 4) - closing backtick"
+- (let ((begin (point))
+- (match-data-old (match-data))
++ (let ((match-data-old (match-data))
+ first-backtick-start
+ last-backtick-start
+ qid-start
+diff --git a/haskell-process.el b/haskell-process.el
+index b4efba2..4f3f859 100644
+--- a/haskell-process.el
++++ b/haskell-process.el
+@@ -160,9 +160,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
+ (defun haskell-process-log (msg)
+ "Effective append MSG to the process log (if enabled)."
+ (when haskell-process-log
+- (let* ((append-to (get-buffer-create "*haskell-process-log*"))
+- (windows (get-buffer-window-list append-to t t))
+- move-point-in-windows)
++ (let* ((append-to (get-buffer-create "*haskell-process-log*")))
+ (with-current-buffer append-to
+ ;; point should follow insertion so that it stays at the end
+ ;; of the buffer
+--
+2.18.0
+
diff --git a/gnu/packages/patches/rust-1.19-mrustc.patch b/gnu/packages/patches/rust-1.19-mrustc.patch
new file mode 100644
index 0000000000..261162172e
--- /dev/null
+++ b/gnu/packages/patches/rust-1.19-mrustc.patch
@@ -0,0 +1,28 @@
+See https://github.com/thepowersgang/mrustc/archive/v0.8.0.tar.gz
+
+--- rustc-1.19.0-src-orig/src/libcore/intrinsics.rs
++++ rustc-1.19.0-src/src/libcore/intrinsics.rs
+@@ -678,5 +678,9 @@
+ pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
+
++ /// Obtain the length of a slice pointer
++ #[cfg(rust_compiler="mrustc")]
++ pub fn mrustc_slice_len<T>(pointer: *const [T]) -> usize;
++
+ /// Gets a static string slice containing the name of a type.
+ pub fn type_name<T: ?Sized>() -> &'static str;
+
+--- rustc-1.19.0-src-orig/src/libcore/slice/mod.rs
++++ rustc-1.19.0-src/src/libcore/slice/mod.rs
+@@ -413,6 +413,8 @@
+ #[inline]
+ fn len(&self) -> usize {
+- unsafe {
+- mem::transmute::<&[T], Repr<T>>(self).len
+- }
++ #[cfg(not(rust_compiler="mrustc"))]
++ let rv = unsafe { mem::transmute::<&[T], Repr<T>>(self).len };
++ #[cfg(rust_compiler="mrustc")]
++ let rv = unsafe { ::intrinsics::mrustc_slice_len(self) };
++ rv
+ }