From nobody Thu Sep 05 06:19:18 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wzq2G5Kh3z5VGtf; Thu, 05 Sep 2024 06:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wzq2G2mDpz40MQ; Thu, 5 Sep 2024 06:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725517158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyMgrUIgN4UdydHocDAU27cd4+tVGbD5lX10bVecx50=; b=o3jL32rZ6cWsKMRvEGd4pxedpZc6oLQUWOh72ie15U7vh8+G3X9i//1o1YzsXKVd3MBQ3K c+MkRb+/5i7UX/9wax0HtI1LP27YK678T7LJQxmB2B3Bh8GphGUa3nnyajqUWNaK1gcjnV MnkLv74uytgwaXv0Xy0a24ogXtXWhE0WoQHOk9Ggg4uYywub4vgHABNU1ZVJ84mrMMMsT6 jShj/YzLTMzXe7B2ScuMf943NZTNxIA8beg/U/gzP0vTW6eS/YfVmzEpr6CmTQu+TfUBnw rAKb39Gp9vCchZS/A4I6ffgG4cGf4BNtsAOMk2rjaDpp87yAmbj+w8pQZb+1yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725517158; a=rsa-sha256; cv=none; b=XmX/afTpjtEV4ExGJRk1Nik7/E+Gt+3kDaTpO0TYZ+rfkBY/FRrJSy84kooGDvFkWV48JY wzRgYbdUNPXOhcxiQwdeIOOh3MqnQtHVO2bZQfArw+fQdDnFusmaNGDhiEKBGBG4/NrOYh yhTDJ6SeE30v8grebIawdzyEyF7KkBxgCvAZPvUhkBObf4nnevQu5OTwP9FArqXao7zs26 Bf0JtMuKZ9q/21qZ4jU3zeZHEgvNy+GryBmGd3XUNkX/LQYQIcFYUfp9g8Ad79U6CY10rG TRRjHFN5wOUMEeosBnvJJZHL8LsggJoP9mYfDhOnTudWrR/lFecGsgeX3RUaSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725517158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyMgrUIgN4UdydHocDAU27cd4+tVGbD5lX10bVecx50=; b=fWFynmt9yPBsBKT3WaEJcpu5ZmOGLJ4yQIA6zn2vhbyqbk7rXNReCtbMCTY2QNwapf5ggT DG/RUEIuMa3U/zJgQ2vfAe6RLChzQnFqcbL1FOU3fJRBECn+tHhIWhQp0pnW+BI5lwcojp GP4F4nSf5qKibhtaMg5gkGpujllu7UIuXaQFZ1Jg3GtrBDx3tiHS9GIOjHIn5ryQOcS5UZ qRQVTkkJMqGT/ep6i+mE0zvfWWrZZIwdq5h1RtTEEIlUHPzvzl3C0TPEUk5xYqfc9rTcxU GI10MFnEDTB3mjCkdG5tJ9gU4oloUt2YyyYBtgvmqz5qQBeSq0CUSPNdhojPlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wzq2G2NGYzxCm; Thu, 5 Sep 2024 06:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4856JI39091180; Thu, 5 Sep 2024 06:19:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4856JIEu091177; Thu, 5 Sep 2024 06:19:18 GMT (envelope-from git) Date: Thu, 5 Sep 2024 06:19:18 GMT Message-Id: <202409050619.4856JIEu091177@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: f09e409e1912 - main - devel/p5-Data-Sah-Resolve: Add p5-Data-Sah-Resolve 0.011 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f09e409e1912e56098612f0891c1098d4ab82ea6 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=f09e409e1912e56098612f0891c1098d4ab82ea6 commit f09e409e1912e56098612f0891c1098d4ab82ea6 Author: Po-Chuan Hsieh AuthorDate: 2024-09-05 05:13:45 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-09-05 06:11:16 +0000 devel/p5-Data-Sah-Resolve: Add p5-Data-Sah-Resolve 0.011 Data::Sah::Resolve provides resolve_schema. Sah schemas can be defined in terms of other schemas as base. The resolving process follows the (outermost) base schema until it finds a builtin type as the (innermost) base. It then returns a hash result (a DefHash with v=2) containing the type as well other information like the collected clause sets and others. This routine performs the following steps: 1. Normalize the schema Unless schema_is_normalized option is true, in which case schema is assumed to be normalized already. 2. Check if the schema's type is a builtin type Currently this is done by checking if the module of the name Data::Sah::Type:: is loadable. If it is a builtin type then we are done. 3. Check if the schema's type is the name of another schema This is done by checking if Sah::Schema:: module exists and is loadable. If this is the case then we retrieve the base schema from the $schema variable in the Sah::Schema:: package and repeat the process while accumulating and/or merging the clause sets. 4. If schema's type is neither, we die. --- devel/Makefile | 1 + devel/p5-Data-Sah-Resolve/Makefile | 28 ++++++++++++++++++++++++++++ devel/p5-Data-Sah-Resolve/distinfo | 3 +++ devel/p5-Data-Sah-Resolve/pkg-descr | 20 ++++++++++++++++++++ devel/p5-Data-Sah-Resolve/pkg-plist | 2 ++ 5 files changed, 54 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index eb79957e9953..e0db5a09b286 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2301,6 +2301,7 @@ SUBDIR += p5-Data-Sah-DefaultValue SUBDIR += p5-Data-Sah-Filter SUBDIR += p5-Data-Sah-Normalize + SUBDIR += p5-Data-Sah-Resolve SUBDIR += p5-Data-Section SUBDIR += p5-Data-Section-Simple SUBDIR += p5-Data-Serializable diff --git a/devel/p5-Data-Sah-Resolve/Makefile b/devel/p5-Data-Sah-Resolve/Makefile new file mode 100644 index 000000000000..6a66e72dc007 --- /dev/null +++ b/devel/p5-Data-Sah-Resolve/Makefile @@ -0,0 +1,28 @@ +PORTNAME= Data-Sah-Resolve +PORTVERSION= 0.011 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Resolve Sah schema +WWW= https://metacpan.org/dist/Data-Sah-Resolve + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-Data-ModeMerge>=0:devel/p5-Data-ModeMerge \ + p5-Data-Sah-Normalize>=0.051:devel/p5-Data-Sah-Normalize +TEST_DEPENDS= p5-Data-Dmp>=0.241:devel/p5-Data-Dmp \ + p5-Test-Deep>=0:devel/p5-Test-Deep \ + p5-Test-Exception>=0:devel/p5-Test-Exception \ + p5-Test-Needs>=0:devel/p5-Test-Needs + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include diff --git a/devel/p5-Data-Sah-Resolve/distinfo b/devel/p5-Data-Sah-Resolve/distinfo new file mode 100644 index 000000000000..603e81ed8128 --- /dev/null +++ b/devel/p5-Data-Sah-Resolve/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1724084456 +SHA256 (Data-Sah-Resolve-0.011.tar.gz) = 37e94da1b2178dc85fa7248e0267282cfdbc77c53db308beb4cba90ecc3d5384 +SIZE (Data-Sah-Resolve-0.011.tar.gz) = 20307 diff --git a/devel/p5-Data-Sah-Resolve/pkg-descr b/devel/p5-Data-Sah-Resolve/pkg-descr new file mode 100644 index 000000000000..009d729207e7 --- /dev/null +++ b/devel/p5-Data-Sah-Resolve/pkg-descr @@ -0,0 +1,20 @@ +Data::Sah::Resolve provides resolve_schema. Sah schemas can be defined in terms +of other schemas as base. The resolving process follows the (outermost) base +schema until it finds a builtin type as the (innermost) base. It then returns a +hash result (a DefHash with v=2) containing the type as well other information +like the collected clause sets and others. + +This routine performs the following steps: +1. Normalize the schema + Unless schema_is_normalized option is true, in which case schema is assumed + to be normalized already. +2. Check if the schema's type is a builtin type + Currently this is done by checking if the module of the name + Data::Sah::Type:: is loadable. If it is a builtin type then we are + done. +3. Check if the schema's type is the name of another schema + This is done by checking if Sah::Schema:: module exists and is + loadable. If this is the case then we retrieve the base schema from the + $schema variable in the Sah::Schema:: package and repeat the process + while accumulating and/or merging the clause sets. +4. If schema's type is neither, we die. diff --git a/devel/p5-Data-Sah-Resolve/pkg-plist b/devel/p5-Data-Sah-Resolve/pkg-plist new file mode 100644 index 000000000000..c2fc99d5c41c --- /dev/null +++ b/devel/p5-Data-Sah-Resolve/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Data/Sah/Resolve.pm +%%PERL5_MAN3%%/Data::Sah::Resolve.3.gz