summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-03-06 10:42:44 +0000
committerMatthew Smith <matthew@gentoo.org>2022-03-06 10:52:45 +0000
commit3585429bec7f527b0c180879a3c6e86c6f8edf0f (patch)
tree4cc7567a13c37f00eedc98c1a7ad5716f1aaf81f /app-emacs
parentdev-java/bcmail: Stabilize 1.69-r1 amd64, #834143 (diff)
downloadgentoo-3585429bec7f527b0c180879a3c6e86c6f8edf0f.tar.gz
gentoo-3585429bec7f527b0c180879a3c6e86c6f8edf0f.tar.bz2
gentoo-3585429bec7f527b0c180879a3c6e86c6f8edf0f.zip
app-emacs/buttercup: init at 1.24
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'app-emacs')
-rw-r--r--app-emacs/buttercup/Manifest1
-rw-r--r--app-emacs/buttercup/buttercup-1.24.ebuild38
-rw-r--r--app-emacs/buttercup/files/50buttercup-gentoo.el2
-rw-r--r--app-emacs/buttercup/files/buttercup-1.24-properties-equal.patch44
-rw-r--r--app-emacs/buttercup/metadata.xml12
5 files changed, 97 insertions, 0 deletions
diff --git a/app-emacs/buttercup/Manifest b/app-emacs/buttercup/Manifest
new file mode 100644
index 000000000000..07dbcd1e884b
--- /dev/null
+++ b/app-emacs/buttercup/Manifest
@@ -0,0 +1 @@
+DIST buttercup-1.24.tar.gz 85337 BLAKE2B fb40d0899f68aff5f2fdb989b2c0e42005e6667ecfe8a4ca806ddb4139f497f0eed5328ba6407136b757a0f13bc6ec5ee488792da3de1e84edba394a781c410c SHA512 0a436f5e5bcf386a3675ef281ac6c9f0125917058de88a5557d879004bbf7cd4298086aa3fb86f2bd807f46c166b0fb02e248cc485878891293147656525f8ca
diff --git a/app-emacs/buttercup/buttercup-1.24.ebuild b/app-emacs/buttercup/buttercup-1.24.ebuild
new file mode 100644
index 000000000000..dd3441cae617
--- /dev/null
+++ b/app-emacs/buttercup/buttercup-1.24.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS="24.3"
+
+inherit elisp
+
+DESCRIPTION="Behaviour-driven Elisp testing"
+HOMEPAGE="https://github.com/jorgenschaefer/emacs-buttercup"
+SRC_URI="https://github.com/jorgenschaefer/emacs-buttercup/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/emacs-buttercup-${PV}
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# https://github.com/jorgenschaefer/emacs-buttercup/pull/210
+PATCHES=( "${FILESDIR}"/${PN}-1.24-properties-equal.patch )
+
+DOCS=( docs/{running,writing}-tests.md )
+SITEFILE="50${PN}-gentoo.el"
+
+src_compile() {
+ elisp_src_compile
+ elisp-make-autoload-file
+}
+
+src_test() {
+ ${EMACS} ${EMACSFLAGS} -L . -l buttercup \
+ -f buttercup-run-discover || die "tests failed"
+}
+
+src_install() {
+ elisp_src_install
+ dobin bin/${PN}
+}
diff --git a/app-emacs/buttercup/files/50buttercup-gentoo.el b/app-emacs/buttercup/files/50buttercup-gentoo.el
new file mode 100644
index 000000000000..102ffcd8d3b9
--- /dev/null
+++ b/app-emacs/buttercup/files/50buttercup-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "@SITELISP@/buttercup-autoloads" nil t)
diff --git a/app-emacs/buttercup/files/buttercup-1.24-properties-equal.patch b/app-emacs/buttercup/files/buttercup-1.24-properties-equal.patch
new file mode 100644
index 000000000000..2af36a3560cd
--- /dev/null
+++ b/app-emacs/buttercup/files/buttercup-1.24-properties-equal.patch
@@ -0,0 +1,44 @@
+From 108d2298cc34d906b196178ad955e3dc139e1779 Mon Sep 17 00:00:00 2001
+From: Philipp Stephani <phst@google.com>
+Date: Mon, 6 Dec 2021 15:39:53 +0100
+Subject: [PATCH] Fix property comparisons in unit tests.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Before Emacs 29, ‘equal-including-properties’ should not be used to compare
+propertized strings due to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6581.
+ERT provides a replacement ‘ert-equal-including-properties’.
+---
+ tests/test-buttercup.el | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
+index bda3e6f..4b73b78 100644
+--- a/tests/test-buttercup.el
++++ b/tests/test-buttercup.el
+@@ -1,6 +1,6 @@
+ ;;; buttercup-test.el --- Tests for buttercup.el -*-lexical-binding:t-*-
+
+-;; Copyright (C) 2015 Jorgen Schaefer <contact@jorgenschaefer.de>
++;; Copyright (C) 2015, 2021 Jorgen Schaefer <contact@jorgenschaefer.de>
+
+ ;; This program is free software; you can redistribute it and/or
+ ;; modify it under the terms of the GNU General Public License
+@@ -27,6 +27,7 @@
+ (require 'autoload)
+ (require 'ansi-color)
+ (require 'ert)
++(require 'ert-x)
+ (require 'cl-lib)
+ (require 'imenu)
+
+@@ -1117,7 +1118,7 @@ text properties using `ansi-color-apply'."
+ ;;;;;;;;;;;;;
+ ;;; Reporters
+ (buttercup-define-matcher-for-binary-function
+- :to-equal-including-properties equal-including-properties)
++ :to-equal-including-properties ert-equal-including-properties)
+
+ (describe "The batch reporters"
+ :var (print-buffer)
diff --git a/app-emacs/buttercup/metadata.xml b/app-emacs/buttercup/metadata.xml
new file mode 100644
index 000000000000..e62cdf68a9cb
--- /dev/null
+++ b/app-emacs/buttercup/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">jorgenschaefer/emacs-buttercup</remote-id>
+ </upstream>
+ <stabilize-allarches/>
+</pkgmetadata>