pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/hs-bower-json
Module Name: pkgsrc
Committed By: pho
Date: Wed Feb 23 16:09:43 UTC 2022
Added Files:
pkgsrc/www/hs-bower-json: DESCR Makefile PLIST buildlink3.mk distinfo
pkgsrc/www/hs-bower-json/patches:
patch-src_Web_Bower_PackageMeta_Internal.hs
Log Message:
www/hs-bower-json: import hs-bower-json-1.0.0.1
Bower is a package manager for the web (see http://bower.io). This package
provides a data type and ToJSON/FromJSON instances for Bower's package
manifest file, bower.json.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/www/hs-bower-json/DESCR \
pkgsrc/www/hs-bower-json/Makefile pkgsrc/www/hs-bower-json/PLIST \
pkgsrc/www/hs-bower-json/buildlink3.mk pkgsrc/www/hs-bower-json/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/www/hs-bower-json/patches/patch-src_Web_Bower_PackageMeta_Internal.hs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/www/hs-bower-json/DESCR
diff -u /dev/null pkgsrc/www/hs-bower-json/DESCR:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/DESCR Wed Feb 23 16:09:43 2022
@@ -0,0 +1,3 @@
+Bower is a package manager for the web (see http://bower.io). This package
+provides a data type and ToJSON/FromJSON instances for Bower's package
+manifest file, bower.json.
Index: pkgsrc/www/hs-bower-json/Makefile
diff -u /dev/null pkgsrc/www/hs-bower-json/Makefile:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/Makefile Wed Feb 23 16:09:43 2022
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2022/02/23 16:09:43 pho Exp $
+
+DISTNAME= bower-json-1.0.0.1
+CATEGORIES= www
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= Components of paths
+LICENSE= modified-bsd
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../converters/hs-aeson-better-errors/buildlink3.mk"
+.include "../../math/hs-scientific/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.include "../../mk/haskell.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/hs-bower-json/PLIST
diff -u /dev/null pkgsrc/www/hs-bower-json/PLIST:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/PLIST Wed Feb 23 16:09:43 2022
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2022/02/23 16:09:43 pho Exp $
+lib/bower-json-${PKGVERSION}/${HS_VERSION}/package-description
+lib/bower-json-${PKGVERSION}/${HS_VERSION}/package-id
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta/Internal.dyn_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta/Internal.hi
+lib/${HS_PLATFORM}/${HS_PKGID}/Web/Bower/PackageMeta/Internal.p_hi
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}.a
+lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
+lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/LICENSE
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/Web-Bower-PackageMeta.html
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/bower-json.haddock
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/doc-index.html
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/haddock-bundle.min.js
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/index.html
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/linuwial.css
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/meta.json
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/quick-jump.css
+share/doc/${HS_PLATFORM}/bower-json-${PKGVERSION}/html/synopsis.png
Index: pkgsrc/www/hs-bower-json/buildlink3.mk
diff -u /dev/null pkgsrc/www/hs-bower-json/buildlink3.mk:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/buildlink3.mk Wed Feb 23 16:09:43 2022
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2022/02/23 16:09:43 pho Exp $
+
+BUILDLINK_TREE+= hs-bower-json
+
+.if !defined(HS_BOWER_JSON_BUILDLINK3_MK)
+HS_BOWER_JSON_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.hs-bower-json+= hs-bower-json>=1.0.0
+BUILDLINK_ABI_DEPENDS.hs-bower-json+= hs-bower-json>=1.0.0.1
+BUILDLINK_PKGSRCDIR.hs-bower-json?= ../../www/hs-bower-json
+
+.include "../../converters/hs-aeson/buildlink3.mk"
+.include "../../converters/hs-aeson-better-errors/buildlink3.mk"
+.include "../../math/hs-scientific/buildlink3.mk"
+.include "../../devel/hs-unordered-containers/buildlink3.mk"
+.include "../../devel/hs-vector/buildlink3.mk"
+.endif # HS_BOWER_JSON_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -hs-bower-json
Index: pkgsrc/www/hs-bower-json/distinfo
diff -u /dev/null pkgsrc/www/hs-bower-json/distinfo:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/distinfo Wed Feb 23 16:09:43 2022
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2022/02/23 16:09:43 pho Exp $
+
+BLAKE2s (bower-json-1.0.0.1.tar.gz) = bd8a3e94a160cbfcd959c1b3c026b660472af241a40790d466d8f718f0733e99
+SHA512 (bower-json-1.0.0.1.tar.gz) = 809a3b7b2653dc23e9704ab38ae446663a23edf071a72134de0da24dfeeaa8e714e565ba6429949bb4507e49e24cbeaaba1547a517b8fff6f35be619fb121928
+Size (bower-json-1.0.0.1.tar.gz) = 6721 bytes
+SHA1 (patch-src_Web_Bower_PackageMeta_Internal.hs) = 7f1eb26db7c12649556e8183b5ed734d01c77096
Index: pkgsrc/www/hs-bower-json/patches/patch-src_Web_Bower_PackageMeta_Internal.hs
diff -u /dev/null pkgsrc/www/hs-bower-json/patches/patch-src_Web_Bower_PackageMeta_Internal.hs:1.1
--- /dev/null Wed Feb 23 16:09:43 2022
+++ pkgsrc/www/hs-bower-json/patches/patch-src_Web_Bower_PackageMeta_Internal.hs Wed Feb 23 16:09:43 2022
@@ -0,0 +1,52 @@
+$NetBSD: patch-src_Web_Bower_PackageMeta_Internal.hs,v 1.1 2022/02/23 16:09:43 pho Exp $
+
+Fix build with aeson-2.0
+
+--- src/Web/Bower/PackageMeta/Internal.hs.orig 2016-12-25 00:06:09.000000000 +0000
++++ src/Web/Bower/PackageMeta/Internal.hs
+@@ -29,6 +29,7 @@ import qualified Data.ByteString.Lazy as
+ import Data.Aeson ((.=))
+ import qualified Data.Aeson as A
+ import qualified Data.Aeson.Types as Aeson
++import qualified Data.Aeson.Key as Key
+ import Data.Aeson.BetterErrors (Parse, ParseError, asText, asString, asBool, eachInArray, eachInObjectWithKey, withText, key, keyMay, keyOrDefault, toAesonParser', toAesonParser, displayError,
parse)
+
+ ---------------------
+@@ -222,7 +223,7 @@ asPackageMeta =
+
+ asAssocListOf :: (Text -> a) -> Parse BowerError [(PackageName, a)]
+ asAssocListOf g =
+- eachInObjectWithKey parsePackageName (g <$> asText)
++ eachInObjectWithKey (parsePackageName . Key.toText) (g <$> asText)
+
+ parseModuleType :: Text -> Either BowerError ModuleType
+ parseModuleType str =
+@@ -301,8 +302,8 @@ instance A.ToJSON PackageMeta where
+ ]
+
+ where
+- assoc :: A.ToJSON a => Text -> [(PackageName, a)] -> [Aeson.Pair]
+- assoc = maybeArrayAssocPair runPackageName
++ assoc :: A.ToJSON a => Aeson.Key -> [(PackageName, a)] -> [Aeson.Pair]
++ assoc = maybeArrayAssocPair (Key.fromText . runPackageName)
+
+ instance A.ToJSON PackageName where
+ toJSON = A.toJSON . runPackageName
+@@ -329,14 +330,14 @@ instance A.ToJSON Version where
+ instance A.ToJSON VersionRange where
+ toJSON = A.toJSON . runVersionRange
+
+-maybePair :: A.ToJSON a => Text -> Maybe a -> [Aeson.Pair]
++maybePair :: A.ToJSON a => Aeson.Key -> Maybe a -> [Aeson.Pair]
+ maybePair k = maybe [] (\val -> [k .= val])
+
+-maybeArrayPair :: A.ToJSON a => Text -> [a] -> [Aeson.Pair]
++maybeArrayPair :: A.ToJSON a => Aeson.Key -> [a] -> [Aeson.Pair]
+ maybeArrayPair _ [] = []
+ maybeArrayPair k xs = [k .= xs]
+
+-maybeArrayAssocPair :: A.ToJSON b => (a -> Text) -> Text -> [(a,b)] -> [Aeson.Pair]
++maybeArrayAssocPair :: A.ToJSON b => (a -> Aeson.Key) -> Aeson.Key -> [(a,b)] -> [Aeson.Pair]
+ maybeArrayAssocPair _ _ [] = []
+ maybeArrayAssocPair f k xs = [k .= A.object (map (\(k', v) -> f k' .= v) xs)]
+
Home |
Main Index |
Thread Index |
Old Index