summaryrefslogtreecommitdiff
path: root/app-emacs/ts
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-11 17:46:59 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-11 17:46:59 +0100
commit54654470d999265b5a0010be7190e8a9993b1840 (patch)
treecb6b99a56837c648a69859da9333e5b9a726912d /app-emacs/ts
parent2046683958d0497bec1458741dc867558b69e622 (diff)
gentoo auto-resync : 11:05:2023 - 17:46:59
Diffstat (limited to 'app-emacs/ts')
-rw-r--r--app-emacs/ts/Manifest5
-rw-r--r--app-emacs/ts/files/50ts-gentoo.el1
-rw-r--r--app-emacs/ts/files/ts-0.3-test.patch13
-rw-r--r--app-emacs/ts/metadata.xml23
-rw-r--r--app-emacs/ts/ts-0.3.ebuild39
5 files changed, 81 insertions, 0 deletions
diff --git a/app-emacs/ts/Manifest b/app-emacs/ts/Manifest
new file mode 100644
index 000000000000..4bfe3a5ca106
--- /dev/null
+++ b/app-emacs/ts/Manifest
@@ -0,0 +1,5 @@
+AUX 50ts-gentoo.el 38 BLAKE2B e96c6cf48d1522d89450e11d339c76210c672377208b56951791b83c6ef22b2c872d313084e199dd5d7b533a99106a87dbc7f15b5ee6126f71bf5f2e84165ffa SHA512 5c00bcabe2d7cc03013dc7a54b2c653940c08098ca5646d7c73624cb1ca04376ae9dcf88a7166b1925c69f0c5d192d90f6bd790fdef8ed8c3b0f9d163c987da5
+AUX ts-0.3-test.patch 650 BLAKE2B 174a01b8035a677e2ae742931ac9b9d9f7eadd9a0bd02ffda69867c950239c32e948b952d6a16ffcd4ea423b84b8eec4d20a8000bddc4ef64e072e29fccfa203 SHA512 0276582170693f476c448dc6154b4930a52734ddf8325a903b018f3aca8e7d16ba150d1ef50f61e541ed234b2097c2b9f7d048f74cf058a6c088070c3722e2de
+DIST ts-0.3.tar.gz 50790 BLAKE2B 99708218584764776d6f93565b7da83e266a1ea2588aba614151a9cffaddd69983a0dd897b9a59247e73992b1611dc761f250f189e179d72c36dc417f5f60aa2 SHA512 8e31543ffb69214c2daf3a26b8f2a76c9933e13f699575678c3262b1524da6615d34ec3fe9d30c62c354ba7139e7a96ac5a894850569688e75ba64959bded61c
+EBUILD ts-0.3.ebuild 855 BLAKE2B 75054d6ba86495a1bad1c8badb0a73e0e51c6043dc16afc4168920c9292fcbf7dc42432da4ae56674fcb41b2d25bf784f80d3ff8c5e824aa60765538d17f3b25 SHA512 d9551b5b1ada56b9581bcacaa85b9458e0dc27988f970d6f08c9c51a3b664ebe6bba798e7c54261f1f69568ad0bc3f6159bf4a088d978879febda7ee2f45b7f5
+MISC metadata.xml 1017 BLAKE2B bd37ba7901c48fef2cbfd665f2785a83b4bb2a3c0ff96177f7e6e4248efbc4698347fbce7f14e1ef6f77de3d4d9b0d267bcbef5d1a396f1dfd82a634b2c6ddee SHA512 a3b39642f71c692f2e68e96b96dbe2cf25cb014734c0ade0026a839eb15a2265d69203e76b3c707763f7710de9f93b3df822e1ca141d5ce86c8c3056f8ad5a9b
diff --git a/app-emacs/ts/files/50ts-gentoo.el b/app-emacs/ts/files/50ts-gentoo.el
new file mode 100644
index 000000000000..431f7e90ae73
--- /dev/null
+++ b/app-emacs/ts/files/50ts-gentoo.el
@@ -0,0 +1 @@
+(add-to-list 'load-path "@SITELISP@")
diff --git a/app-emacs/ts/files/ts-0.3-test.patch b/app-emacs/ts/files/ts-0.3-test.patch
new file mode 100644
index 000000000000..0b473d24873f
--- /dev/null
+++ b/app-emacs/ts/files/ts-0.3-test.patch
@@ -0,0 +1,13 @@
+--- a/test/test.el
++++ b/test/test.el
+@@ -259,10 +259,8 @@
+ ;; machine's local timezone affecting results.
+ (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 20 :minute 48 :second 08 :tz-offset "-0400")))
+ ;; Following the pattern in the function:
+- (should (equal (ts-format ts) "2019-07-27 20:48:08 -0400"))
+ (should (equal (ts-format "%Y" ts) "2019"))
+ (should (ts-format "%Y"))
+- (should (equal (ts-format nil ts) "2019-07-27 20:48:08 -0400"))
+ (should (ts-format)))
+ (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 19 :minute 48 :second 08 :tz-offset "-0500")))
+ ;; Following the pattern in the function:
diff --git a/app-emacs/ts/metadata.xml b/app-emacs/ts/metadata.xml
new file mode 100644
index 000000000000..83412a187471
--- /dev/null
+++ b/app-emacs/ts/metadata.xml
@@ -0,0 +1,23 @@
+<?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>
+ <longdescription>
+ ts is a date and time library for Emacs. It aims to be more convenient than
+ patterns like (string-to-number (format-time-string "%Y")) by providing
+ easy accessors, like (ts-year (ts-now)). To improve performance
+ (significantly), formatted date parts are computed lazily rather than when
+ a timestamp object is instantiated, and the computed parts are then cached
+ for later access without recomputing. Behind the scenes, this avoids
+ unnecessary (string-to-number (format-time-string... calls, which are
+ surprisingly expensive.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/alphapapa/ts.el/issues/</bugs-to>
+ <remote-id type="github">alphapapa/ts.el</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-emacs/ts/ts-0.3.ebuild b/app-emacs/ts/ts-0.3.ebuild
new file mode 100644
index 000000000000..4f61deb30b25
--- /dev/null
+++ b/app-emacs/ts/ts-0.3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp
+
+DESCRIPTION="Emacs timestamp and date-time library"
+HOMEPAGE="https://github.com/alphapapa/ts.el"
+
+if [[ ${PV} == *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/alphapapa/ts.el.git"
+else
+ [[ ${PV} == 0.3 ]] && COMMIT=552936017cfdec89f7fc20c254ae6b37c3f22c5b
+ SRC_URI="https://github.com/alphapapa/ts.el/archive/${COMMIT}.tar.gz
+ -> ${P}.tar.gz"
+ S="${WORKDIR}"/ts.el-${COMMIT}
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+RDEPEND="
+ app-emacs/dash
+ app-emacs/s
+"
+BDEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/ts-0.3-test.patch )
+
+DOCS=( README.org notes.org )
+SITEFILE="50${PN}-gentoo.el"
+
+src_test() {
+ LANG=C TZ=/usr/share/zoneinfo/America/Chicago \
+ elisp-test-ert test -l test/test.el
+}