From nobody Mon May 27 18:54:45 2024 X-Original-To: dev-commits-ports-all@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 4Vp4ZZ2Bwnz5Lk6Q; Mon, 27 May 2024 18:54:46 +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 4Vp4ZZ08Jxz4dLm; Mon, 27 May 2024 18:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716836086; 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=gTYwOPI/1FXl0u7Kf521BQkfhUPq85XCnvGARzsNIiQ=; b=GyYKogjDuMzCq1Yxa+TJ9cYwFe0FlTsltixLnrrsGVcvD7EGu9RrmjaZJvICpm6e4DxO6Z sL/Cj7NK2NR3sH/gsuJSPwAXRMKWXnqKTbvCqYdlOElVztc4Fmw90JWK1RvIpzMY1txwnA Wu0cGb0yKcCdV5fEmFICWKz9vRxvEVdPfC/UY5CThxsvMnt02wUpaJ0p/mJ3AZmdIVslml NHO5WzS7wz4PBHIleFODE0TeAqgndUrvU+6uwVzA04YQFF/oO/Xam9cSCPsgCcgK/UqJWt 7c4h4hRRAnKXI7K+l4xHut5Wip0qkFOIwOiYz5EXujGxMD/eRstfOIOTNhY2XA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716836086; a=rsa-sha256; cv=none; b=L8D+efPQzxzvOlYv6gkIaTVZ5Kjv88Yj6IxIinv0nZbozM3cNjPwlGw+5nL/LjxSyA64V7 XtFXLs0B4Cooo9YrxPWbpl2sPF/kNuWzVWIab6p95CdxFHCtnFEHjAfLqoLRzMcIBvidaZ PI63/njRy3l3o99tNTionjoGAZ9niaYeLAWeZx+WZFierdJYwO3Nq6b0qpvWQxAAEJBP0F bGenA4fYcBJ7ginBz+quSTFbvsNb8VnkeLker/QC0M5Jvrj6iEfrqPXhlx7u8dzQNuX1oB efnNIzOtm7TE6wMZwXDC/RmhuvkvVZAB7GAqbeYuLRPrLU/S2woez+7TCdJTig== 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=1716836086; 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=gTYwOPI/1FXl0u7Kf521BQkfhUPq85XCnvGARzsNIiQ=; b=TCPN3HWPK9eSP0xeYw8yG4xaFEg/ugXhhNJ9BZLljTJgvBfT1N4d6sEU02S9WKhucbgDd3 0a125vmGxjHTIvmZ+SQuXuWGzrc5RAdj3621svvebnzrUDCOADZc3qUoCV2cmAx6CeSvk+ yISsPxU53SNnLEmawhZuVW0EQ3nBcEmBIjeLZlVpE0M7/bMyiLQ55b12WDNo366IoPql1s 27hhz/cWzTx2oaLZgNhzNqW/JlsJ30yBHNQdCJJqb8IK86pDcMNGIgTztUDjXw2olG18bC 9QFJIW6oReWUROL9CQfNDZqv0PhLV1QaBMcsAfbY9FTGmz4qAht/kBP6lFXq8w== 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 4Vp4ZY6t42zwhn; Mon, 27 May 2024 18:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44RIsjFK048023; Mon, 27 May 2024 18:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44RIsjkE048020; Mon, 27 May 2024 18:54:45 GMT (envelope-from git) Date: Mon, 27 May 2024 18:54:45 GMT Message-Id: <202405271854.44RIsjkE048020@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 698eadbe278c - main - devel/shedskin: New port: Restricted Python-to-C++ compiler List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 698eadbe278c0e8c50da6082994e16bb4910a398 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=698eadbe278c0e8c50da6082994e16bb4910a398 commit 698eadbe278c0e8c50da6082994e16bb4910a398 Author: Yuri Victorovich AuthorDate: 2024-05-27 18:54:01 +0000 Commit: Yuri Victorovich CommitDate: 2024-05-27 18:54:42 +0000 devel/shedskin: New port: Restricted Python-to-C++ compiler --- devel/Makefile | 1 + devel/shedskin/Makefile | 35 ++++++++++++++++++++++ devel/shedskin/distinfo | 3 ++ .../files/patch-shedskin_lib_os_____init____.cpp | 19 ++++++++++++ devel/shedskin/pkg-descr | 4 +++ 5 files changed, 62 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index e88694af9821..5750ddd2ea2f 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -7839,6 +7839,7 @@ SUBDIR += shadered SUBDIR += shapelib SUBDIR += shards + SUBDIR += shedskin SUBDIR += shell-toolbox SUBDIR += shflags SUBDIR += shfmt diff --git a/devel/shedskin/Makefile b/devel/shedskin/Makefile new file mode 100644 index 000000000000..fe59996f5694 --- /dev/null +++ b/devel/shedskin/Makefile @@ -0,0 +1,35 @@ +PORTNAME= shed-skin +DISTVERSION= 0.9.8 +CATEGORIES= devel python +MASTER_SITES= PYPI +DISTNAME= ${PORTNAME:S/-/_/g}-${PORTVERSION} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Restricted Python-to-C++ compiler +WWW= https://shedskin.github.io/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>0:devel/py-poetry-core@${PY_FLAVOR} +RUN_DEPENDS= boehm-gc>0:devel/boehm-gc \ + pcre>0:devel/pcre + +USES= python +USE_PYTHON= pep517 autoplist + +NO_ARCH= yes + +post-extract: + @${RM} ${WRKSRC}/tests/test_ops_assignment/test_ops_assignment.py.orig + +post-patch: + # the fouth regex below is a workaround for https://github.com/shedskin/shedskin/issues/470 + @${REINPLACE_CMD} -e ' \ + s|^CC=.*|CC=${CXX}|; \ + s|^CCFLAGS=|CCFLAGS?=-I${PREFIX}/include |; \ + s|^LFLAGS=|LFLAGS=-L${PREFIX}/lib |; \ + s|^CCFLAGS.*|& -I$$(SHEDSKIN_LIBDIR)|; \ + ' ${WRKSRC}/shedskin/resources/flags/FLAGS + +.include diff --git a/devel/shedskin/distinfo b/devel/shedskin/distinfo new file mode 100644 index 000000000000..b375f34fc64d --- /dev/null +++ b/devel/shedskin/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1716797518 +SHA256 (shed_skin-0.9.8.tar.gz) = 2367ab06a29122d79cd2091b306711743a0b08836ee6291775ad049914670779 +SIZE (shed_skin-0.9.8.tar.gz) = 18176411 diff --git a/devel/shedskin/files/patch-shedskin_lib_os_____init____.cpp b/devel/shedskin/files/patch-shedskin_lib_os_____init____.cpp new file mode 100644 index 000000000000..79bade3dc93c --- /dev/null +++ b/devel/shedskin/files/patch-shedskin_lib_os_____init____.cpp @@ -0,0 +1,19 @@ +--- shedskin/lib/os/__init__.cpp.orig 2023-12-24 21:56:45 UTC ++++ shedskin/lib/os/__init__.cpp +@@ -27,7 +27,7 @@ + #include + #include + +-#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + #include + #endif + +@@ -42,6 +42,7 @@ + #ifdef __FreeBSD__ + #include + #include ++extern char **environ; + #endif + + #ifdef __APPLE__ diff --git a/devel/shedskin/pkg-descr b/devel/shedskin/pkg-descr new file mode 100644 index 000000000000..40b82a6bf358 --- /dev/null +++ b/devel/shedskin/pkg-descr @@ -0,0 +1,4 @@ +Shed Skin is a transpiler, that can translate pure, but implicitly statically +typed Python 3 programs into optimized C++. It can generate stand-alone +programs or extension modules that can be imported and used in larger Python +programs.