From nobody Mon Oct 03 02:24:26 2022 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 4Mgl5k34Pqz4f9Hl; Mon, 3 Oct 2022 02:24:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mgl5k2gjKz44Sx; Mon, 3 Oct 2022 02:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664763866; 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=jkHEGZzqMejfWt6JRrHzEDh1IRE30wu87fPk6hSbyME=; b=hpDV2DdFxRTf02DqGWp9KgOU2+5qN48mOMdyCv2YrYltlcnnox2qNpSPv6sHfb/umJzl68 /yLv+OFPSFyieVRLlshcK11t3xcWaoe/5zrC9Vq+WIqYsm3a19SbNHOO1kfIsxVgAVvNhf 3KkqU41CNxfGvIQjlGQLHUnWvJVDL8GMm6JH0+LI/sXzrdS1wobFP+lZPeZd1mZfJ5BqEh +bK5oYFGc2CECgC3GQnw13QKNbKaWdxc12CGLfqNj1SrijaSgXS0Ci9IsqKPjy+b9maTxn fF0fIIKSXThVw8ZWBQOvadnwT0GG1is7MMwbe3bEswfUQHLNVJBbfSrqLw0HXQ== 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 4Mgl5k1nGgz13q1; Mon, 3 Oct 2022 02:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2932OQXw096613; Mon, 3 Oct 2022 02:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2932OQrQ096612; Mon, 3 Oct 2022 02:24:26 GMT (envelope-from git) Date: Mon, 3 Oct 2022 02:24:26 GMT Message-Id: <202210030224.2932OQrQ096612@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: d7205eef7e02 - main - devel/p5-FFI-Platypus-Type-PtrObject: Add p5-FFI-Platypus-Type-PtrObject 0.03 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: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: 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: d7205eef7e029561250a5db8d4482fbfbb826a5a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664763866; 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=jkHEGZzqMejfWt6JRrHzEDh1IRE30wu87fPk6hSbyME=; b=EZo9cVTavyjE+v5BntGEypYPEWgMHssVrP79Kcyt5MbAUQ1U51ZuWQlebb+Yoto+bPAHiX 4qvAeBFrID7n40tppMOCIWByRRKuVwSd+h1FUbPpuVk4/RfXKVZfmhp5qhmVC9IaDQRBd+ J8cF1DweHZc9MUENRJo1mSwrlNkdYQ+iAc0jySJaBdhxU28eUXfKMc4g7ZvbEPPJs3otEu yjJZjm+fukM9dcV8/ObduDtVsZlRjTSQ5O5o2A/7PufY7OaREPMBssCox99NwoBiZm21HJ NzxQiHCm+MEbi06roWHqnIJQTJOGoqytXsZPtjhjaL7y/bWYze5lwnbgarljfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664763866; a=rsa-sha256; cv=none; b=YlSt3yRQXAlsJWRuTzvgx/UxFUvDZ7iIayOTzhK5mIeLBKK8a+iLdBL8ot2Bs23TtewNKa f4lYfdBWo9cXOFmlaObttj+OtPiWp70PFhK4pnBN12U/81vSVRFgwcxtcflvhInUmJAkb8 y4rQ0V5UdCZODWXtAXiiq8Pm8Es5vZgWr0wYnINbuM1482ra2eCRziSofKK47ZJ46rFTKV MnCnnGmT1+ADe5RUNfL+aWRUxJJN59Y+7JDNX2jacN9bD74EpLgipSPBeV0ezyP5cnMEQ/ QC7JyzK2OIEDa1M2mLpAs6iMIKfDjfhHOXxJzgIo6af1J/zEU8IXsUwEC7sXPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=d7205eef7e029561250a5db8d4482fbfbb826a5a commit d7205eef7e029561250a5db8d4482fbfbb826a5a Author: Po-Chuan Hsieh AuthorDate: 2022-10-03 02:10:14 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-10-03 02:10:14 +0000 devel/p5-FFI-Platypus-Type-PtrObject: Add p5-FFI-Platypus-Type-PtrObject 0.03 FFI::Platypus::Type::PtrObject is a helper type for FFI::Platypus that handles type checking for the common pattern where a Perl class is a simple wrapper around an opaque pointer. The class should be implemented as a hash reference, and the pointer itself is expected to be stored on the ptr key. If the caller of the interface (Perl) is responsible for cleaning up the memory, then it normally should be done in the DESTROY method (as above). If you do not pass in the correct type, it will be detected before the C code is called and an exception will be thrown. (otherwise you would probably get a segment violation SEGV). --- devel/Makefile | 1 + devel/p5-FFI-Platypus-Type-PtrObject/Makefile | 26 ++++++++++++++++++++++++++ devel/p5-FFI-Platypus-Type-PtrObject/distinfo | 3 +++ devel/p5-FFI-Platypus-Type-PtrObject/pkg-descr | 10 ++++++++++ devel/p5-FFI-Platypus-Type-PtrObject/pkg-plist | 2 ++ 5 files changed, 42 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 0bf18de42412..177ec1acc79a 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2379,6 +2379,7 @@ SUBDIR += p5-FFI-Platypus SUBDIR += p5-FFI-Platypus-Declare SUBDIR += p5-FFI-Platypus-Type-Enum + SUBDIR += p5-FFI-Platypus-Type-PtrObject SUBDIR += p5-FSA-Rules SUBDIR += p5-Feature-Compat-Try SUBDIR += p5-Fennec-Lite diff --git a/devel/p5-FFI-Platypus-Type-PtrObject/Makefile b/devel/p5-FFI-Platypus-Type-PtrObject/Makefile new file mode 100644 index 000000000000..f2fba86389f9 --- /dev/null +++ b/devel/p5-FFI-Platypus-Type-PtrObject/Makefile @@ -0,0 +1,26 @@ +PORTNAME= FFI-Platypus-Type-PtrObject +PORTVERSION= 0.03 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Platypus custom type for an object wrapped around an opaque pointer +WWW= https://metacpan.org/dist/FFI-Platypus-Type-PtrObject + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-FFI-Platypus>=1.11:devel/p5-FFI-Platypus \ + p5-Ref-Util>=0:devel/p5-Ref-Util +TEST_DEPENDS= p5-Test2-Suite>=0.000060:devel/p5-Test2-Suite \ + p5-Test2-Tools-FFI>=0:devel/p5-Test2-Tools-FFI + +USES= perl5 +USE_PERL5= configure + +NO_ARCH= yes + +.include diff --git a/devel/p5-FFI-Platypus-Type-PtrObject/distinfo b/devel/p5-FFI-Platypus-Type-PtrObject/distinfo new file mode 100644 index 000000000000..95d351a65856 --- /dev/null +++ b/devel/p5-FFI-Platypus-Type-PtrObject/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1663672726 +SHA256 (FFI-Platypus-Type-PtrObject-0.03.tar.gz) = e1e94907ef90b40360a9a6c03d295a13047d4f6c9b56acaf1df2b54d17307f74 +SIZE (FFI-Platypus-Type-PtrObject-0.03.tar.gz) = 17374 diff --git a/devel/p5-FFI-Platypus-Type-PtrObject/pkg-descr b/devel/p5-FFI-Platypus-Type-PtrObject/pkg-descr new file mode 100644 index 000000000000..2eea837446c6 --- /dev/null +++ b/devel/p5-FFI-Platypus-Type-PtrObject/pkg-descr @@ -0,0 +1,10 @@ +FFI::Platypus::Type::PtrObject is a helper type for FFI::Platypus that handles +type checking for the common pattern where a Perl class is a simple wrapper +around an opaque pointer. The class should be implemented as a hash reference, +and the pointer itself is expected to be stored on the ptr key. If the caller of +the interface (Perl) is responsible for cleaning up the memory, then it normally +should be done in the DESTROY method (as above). + +If you do not pass in the correct type, it will be detected before the C code is +called and an exception will be thrown. (otherwise you would probably get a +segment violation SEGV). diff --git a/devel/p5-FFI-Platypus-Type-PtrObject/pkg-plist b/devel/p5-FFI-Platypus-Type-PtrObject/pkg-plist new file mode 100644 index 000000000000..c38e399395e9 --- /dev/null +++ b/devel/p5-FFI-Platypus-Type-PtrObject/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/FFI/Platypus/Type/PtrObject.pm +%%PERL5_MAN3%%/FFI::Platypus::Type::PtrObject.3.gz