commit:     3585429bec7f527b0c180879a3c6e86c6f8edf0f
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  6 10:42:44 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Sun Mar  6 10:52:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3585429b

app-emacs/buttercup: init at 1.24

Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 app-emacs/buttercup/Manifest                       |  1 +
 app-emacs/buttercup/buttercup-1.24.ebuild          | 38 +++++++++++++++++++
 app-emacs/buttercup/files/50buttercup-gentoo.el    |  2 +
 .../files/buttercup-1.24-properties-equal.patch    | 44 ++++++++++++++++++++++
 app-emacs/buttercup/metadata.xml                   | 12 ++++++
 5 files changed, 97 insertions(+)

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 <p...@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 <cont...@jorgenschaefer.de>
++;; Copyright (C) 2015, 2021  Jorgen Schaefer <cont...@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-em...@gentoo.org</email>
+    <name>Gentoo GNU Emacs project</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">jorgenschaefer/emacs-buttercup</remote-id>
+  </upstream>
+  <stabilize-allarches/>
+</pkgmetadata>

Reply via email to