diff options
author | hololeap <hololeap@protonmail.com> | 2023-10-02 23:07:49 -0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-23 04:09:40 +0100 |
commit | ff05c5dc7f861447b3ce17fd5416bb7010c89c0b (patch) | |
tree | 384d68a11d9363fdd479349053948878335a3a6c /dev-haskell/hjsmin | |
parent | dev-haskell/hinotify: add 0.4.1 (diff) | |
download | gentoo-ff05c5dc7f861447b3ce17fd5416bb7010c89c0b.tar.gz gentoo-ff05c5dc7f861447b3ce17fd5416bb7010c89c0b.tar.bz2 gentoo-ff05c5dc7f861447b3ce17fd5416bb7010c89c0b.zip |
dev-haskell/hjsmin: add 0.2.1
Signed-off-by: hololeap <hololeap@protonmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/hjsmin')
-rw-r--r-- | dev-haskell/hjsmin/Manifest | 1 | ||||
-rw-r--r-- | dev-haskell/hjsmin/files/hjsmin-0.2.0.4-fix-tests.patch | 29 | ||||
-rw-r--r-- | dev-haskell/hjsmin/hjsmin-0.2.1.ebuild | 45 | ||||
-rw-r--r-- | dev-haskell/hjsmin/metadata.xml | 7 |
4 files changed, 77 insertions, 5 deletions
diff --git a/dev-haskell/hjsmin/Manifest b/dev-haskell/hjsmin/Manifest index feb053f4b3dd..0f0f75ea03d4 100644 --- a/dev-haskell/hjsmin/Manifest +++ b/dev-haskell/hjsmin/Manifest @@ -1 +1,2 @@ DIST hjsmin-0.2.0.4.tar.gz 5233 BLAKE2B 839cc956a7dad0b958a12f9e9ca45dfeb2c64ef35f6e746747a01d1bba771edc229b9822c9274a67c1fa483da64f94e500644b77b9d90283e1feb56975d0badb SHA512 11534fd3f351cb1b73e9f166ee42737eb31c10f8f49b2b8d593f9a5a07d08d6b070f71204ec41257d02f38b0dc1172f48bd95d59b553b9f602b90018a795b07c +DIST hjsmin-0.2.1.tar.gz 5197 BLAKE2B 88bca64c36728370f11635499d0ff240db43a495e8c2871bb706096995a0ceeb4c0553dd9a95cffde4b97c22a9f63704fc65a12c52a30dde211b056abdb6ca29 SHA512 ccc7ac765c99986e15e35f7e7ceef96b4551dbcccef2a62ad8625a8e4ab51edd0afe87368d6066062dd3749e827dd84af1a1ba1d272934481a77763f1d4d793e diff --git a/dev-haskell/hjsmin/files/hjsmin-0.2.0.4-fix-tests.patch b/dev-haskell/hjsmin/files/hjsmin-0.2.0.4-fix-tests.patch new file mode 100644 index 000000000000..ce994c7588f1 --- /dev/null +++ b/dev-haskell/hjsmin/files/hjsmin-0.2.0.4-fix-tests.patch @@ -0,0 +1,29 @@ +From 9605b913e6aed7fa3d40aa9925975b506d3a0eb0 Mon Sep 17 00:00:00 2001 +From: hololeap <hololeap@users.noreply.github.com> +Date: Wed, 1 Mar 2023 14:13:58 -0700 +Subject: [PATCH] Fix tests + +Tests assume a 'dist-newstyle' directory (e.g. cabal-v2) when we +actually have a 'dist' directory. + +Signed-off-by: hololeap <hololeap@users.noreply.github.com> +--- + test/test-cli.hs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-cli.hs b/test/test-cli.hs +index a97e1b7..7691587 100644 +--- a/test/test-cli.hs ++++ b/test/test-cli.hs +@@ -18,7 +18,7 @@ main = do + IO.hSetBuffering IO.stderr LineBuffering + + cwd <- getCurrentDirectory +- topdir <- canonicalizePath $ cwd </> "dist-newstyle" ++ topdir <- canonicalizePath $ cwd </> "dist" + + -- Set an environment variable for all the exectuables we want to test. + setExecutableEnvVar "HJSMIN" topdir "hjsmin" +-- +2.39.2 + diff --git a/dev-haskell/hjsmin/hjsmin-0.2.1.ebuild b/dev-haskell/hjsmin/hjsmin-0.2.1.ebuild new file mode 100644 index 000000000000..d34c0a0ac0e8 --- /dev/null +++ b/dev-haskell/hjsmin/hjsmin-0.2.1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# ebuild generated by hackport 0.8.4.0.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="Haskell implementation of a javascript minifier" +HOMEPAGE="https://github.com/erikd/hjsmin" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +PATCHES=( + "${FILESDIR}/${PN}-0.2.0.4-fix-tests.patch" +) + +CABAL_CHDEPS=( + 'text >= 2' 'text >= 1.2.5.0' +) + +RDEPEND=">=dev-haskell/language-javascript-0.6:=[profile?] <dev-haskell/language-javascript-0.8:=[profile?] + >=dev-haskell/optparse-applicative-0.7:=[profile?] + >=dev-haskell/text-1.2.5.0:=[profile?] + >=dev-lang/ghc-9.2.4:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-3.6.3.0 + test? ( dev-haskell/extra ) +" + +src_prepare() { + # Tests need exec permissions on these files + local files=( + "test/cli/minimal-input/run" + "test/cli/empty-input/run" + ) + chmod -v +x "${files[@]}" + + haskell-cabal_src_prepare +} diff --git a/dev-haskell/hjsmin/metadata.xml b/dev-haskell/hjsmin/metadata.xml index f9a7be27c0e1..3ae810a2ce4b 100644 --- a/dev-haskell/hjsmin/metadata.xml +++ b/dev-haskell/hjsmin/metadata.xml @@ -5,11 +5,8 @@ <email>haskell@gentoo.org</email> <name>Gentoo Haskell</name> </maintainer> - <longdescription> - Reduces size of javascript files by stripping out extraneous whitespace and - other syntactic elements, without changing the semantics. - </longdescription> <upstream> - <remote-id type="github">alanz/hjsmin</remote-id> + <remote-id type="hackage">hjsmin</remote-id> + <remote-id type="github">erikd/hjsmin</remote-id> </upstream> </pkgmetadata> |