commit:     e5e4341a572221dffbec1dca7f2cdf008c266cf6
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 22:17:13 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 22:24:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e4341a

app-emacs/cask: new package; add version 0.8.8

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emacs/cask/Manifest                          |  1 +
 app-emacs/cask/cask-0.8.8.ebuild                 | 50 ++++++++++++++++++++++++
 app-emacs/cask/files/50cask-gentoo.el            |  1 +
 app-emacs/cask/files/cask-bin-launcher-fix.patch | 24 ++++++++++++
 app-emacs/cask/files/cask-no-bootstrap.patch     | 43 ++++++++++++++++++++
 app-emacs/cask/metadata.xml                      | 13 ++++++
 6 files changed, 132 insertions(+)

diff --git a/app-emacs/cask/Manifest b/app-emacs/cask/Manifest
new file mode 100644
index 000000000000..03f7ea962c9d
--- /dev/null
+++ b/app-emacs/cask/Manifest
@@ -0,0 +1 @@
+DIST cask-0.8.8.tar.gz 348574 BLAKE2B 
9eb2b18b6082a3500642660eebb471bff3bcbb00656a8a3c66bede3cf756e738b1cb8affbdeed97373bbdc0031d093a6ad5c7e4659e14732fbc531a416c78b99
 SHA512 
2708fa431dc17cb5d4fe56f0c73c3089a213d8ff0bca19091ab4ebf26c4e416c0a500a980daa424bf16b54d0e72b004762f5260329189eb4f8e803de38bc0ace

diff --git a/app-emacs/cask/cask-0.8.8.ebuild b/app-emacs/cask/cask-0.8.8.ebuild
new file mode 100644
index 000000000000..40b12d37cde6
--- /dev/null
+++ b/app-emacs/cask/cask-0.8.8.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS=25.1
+
+inherit elisp
+
+DESCRIPTION="Project management for Emacs package development"
+HOMEPAGE="https://github.com/cask/cask/";
+SRC_URI="https://github.com/cask/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="test"  # Most tests fail
+
+RDEPEND="
+       app-emacs/ansi
+       app-emacs/commander
+       app-emacs/epl
+       app-emacs/f
+       app-emacs/package-build
+       app-emacs/s
+       app-emacs/shut-up
+"
+BDEPEND="${RDEPEND}"
+
+DOCS=( README.org cask_small.png )
+PATCHES=(
+       "${FILESDIR}"/${PN}-bin-launcher-fix.patch
+       "${FILESDIR}"/${PN}-no-bootstrap.patch
+)
+
+ELISP_REMOVE="${PN}-bootstrap.el
+       package-build-legacy.el package-recipe-legacy.el"
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+       elisp_src_prepare
+
+       sed "s|@SITELISP@|${EPREFIX}${SITELISP}/${PN}|" -i bin/${PN} || die
+}
+
+src_install() {
+       elisp_src_install
+
+       dobin bin/${PN}
+}

diff --git a/app-emacs/cask/files/50cask-gentoo.el 
b/app-emacs/cask/files/50cask-gentoo.el
new file mode 100644
index 000000000000..431f7e90ae73
--- /dev/null
+++ b/app-emacs/cask/files/50cask-gentoo.el
@@ -0,0 +1 @@
+(add-to-list 'load-path "@SITELISP@")

diff --git a/app-emacs/cask/files/cask-bin-launcher-fix.patch 
b/app-emacs/cask/files/cask-bin-launcher-fix.patch
new file mode 100644
index 000000000000..704d284a13dc
--- /dev/null
+++ b/app-emacs/cask/files/cask-bin-launcher-fix.patch
@@ -0,0 +1,24 @@
+diff --git a/bin/cask b/bin/cask
+index 55d4d86..37a5c9c 100755
+--- a/bin/cask
++++ b/bin/cask
+@@ -39,17 +39,7 @@ case $subcommand in
+       *)
+               WHICH=${WHICH:-which}
+               READLINK=$($WHICH readlink || true)
+-              if [ "$(uname || true)" == "Darwin" ] ; then
+-                      READLINK=
+-              fi
+-              READLINK=${READLINK:-$($WHICH greadlink || true)}
+-              if [ ! -z "$READLINK" ] ; then
+-                      SRCDIR__=$($READLINK -f "$CASK")
+-              else
+-                      SRCDIR__=$(python -c "import os, sys; 
print(os.path.realpath(sys.argv[1]))" "$CASK")
+-              fi
+-              SRCDIR_=$(dirname "$SRCDIR__")
+-              SRCDIR=$(dirname "$SRCDIR_")
+-              "$EMACS" -Q --script "$SRCDIR/cask-cli.el" -- $subcommand "$@"
++              SRCDIR="@SITELISP@"
++              "$EMACS" -q --script "$SRCDIR/cask-cli.el" -- $subcommand "$@"
+               ;;
+ esac

diff --git a/app-emacs/cask/files/cask-no-bootstrap.patch 
b/app-emacs/cask/files/cask-no-bootstrap.patch
new file mode 100644
index 000000000000..c0d691a98b4e
--- /dev/null
+++ b/app-emacs/cask/files/cask-no-bootstrap.patch
@@ -0,0 +1,43 @@
+diff --git a/cask-cli.el b/cask-cli.el
+index f97a28a..eda6d8f 100644
+--- a/cask-cli.el
++++ b/cask-cli.el
+@@ -34,8 +34,7 @@
+       (or load-file-name byte-compile-current-file buffer-file-name)))
+     "Path to Cask root."))
+ 
+-(require 'cask-bootstrap (expand-file-name "cask-bootstrap" cask-directory))
+-(require 'cask (expand-file-name "cask" cask-directory))
++(require 'cask)
+ 
+ (when noninteractive
+   (shut-up-silence-emacs))
+diff --git a/cask.el b/cask.el
+index 7828f49..0bfc7ab 100644
+--- a/cask.el
++++ b/cask.el
+@@ -1,4 +1,4 @@
+-;;; cask.el --- Cask: Project management for package development  -*- 
lexical-binding: t; no-byte-compile: t -*-
++;;; cask.el --- Cask: Project management for package development  -*- 
lexical-binding: t -*-
+ 
+ ;; Copyright (C) 2012-2022 Johan Andersson
+ ;; Copyright (C) 2013 Sebastian Wiesner <[email protected]>
+@@ -45,7 +45,17 @@
+       (:else (buffer-file-name))))
+     "Path to Cask root."))
+ 
+-(require 'cask-bootstrap (expand-file-name "cask-bootstrap" cask-directory))
++(require 'ansi)
++(require 'cl-generic)
++(require 'cl-lib)
++(require 'commander)
++(require 'eieio)
++(require 'epl)
++(require 'f)
++(require 'package-build)
++(require 'package-recipe)
++(require 's)
++(require 'shut-up)
+ 
+ (setq package-build-verbose nil)        ; Make package-build quiet by
+                                         ; not allowing it to print any

diff --git a/app-emacs/cask/metadata.xml b/app-emacs/cask/metadata.xml
new file mode 100644
index 000000000000..02ee634d0baa
--- /dev/null
+++ b/app-emacs/cask/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+
+<pkgmetadata>
+  <maintainer type="project">
+    <email>[email protected]</email>
+    <name>Gentoo GNU Emacs project</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://github.com/cask/cask/issues/</bugs-to>
+    <remote-id type="github">cask/cask</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to