diff options
Diffstat (limited to 'security/py-gpg')
-rw-r--r-- | security/py-gpg/Makefile | 43 | ||||
-rw-r--r-- | security/py-gpg/distinfo | 3 | ||||
-rw-r--r-- | security/py-gpg/files/patch-configure.ac | 19 | ||||
-rw-r--r-- | security/py-gpg/files/patch-pyproject.toml | 13 | ||||
-rw-r--r-- | security/py-gpg/pkg-descr | 3 |
5 files changed, 81 insertions, 0 deletions
diff --git a/security/py-gpg/Makefile b/security/py-gpg/Makefile new file mode 100644 index 000000000000..582cb579dfc2 --- /dev/null +++ b/security/py-gpg/Makefile @@ -0,0 +1,43 @@ +PORTNAME= gpg +PORTVERSION= 2.0.0 +CATEGORIES= security python +MASTER_SITES= GNUPG/gpgmepy +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= gpgmepy-${PORTVERSION} + +MAINTAINER= jhale@FreeBSD.org +COMMENT= Gpgme Python bindings + +LICENSE= LGPL21+ +LICENSE_FILE= ${WRKSRC}/COPYING.LESSER + +BUILD_DEPENDS= swig:devel/swig \ + ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} + +LIB_DEPENDS= libassuan.so:security/libassuan \ + libgpg-error.so:security/libgpg-error \ + libgpgme.so:security/gpgme + +USES= gmake pkgconfig python:3.9+ tar:bzip2 +USE_PYTHON= autoplist pep517 + +GNU_CONFIGURE= yes +CONFIGURE_ENV= BSD_PYTHON="${PYTHON_CMD}" \ + BSD_PYTHON_VERSION="${PYTHON_VER}" +TEST_TARGET= check + +# Link src to the project name defined in pyproject.toml to deal with Python +# conventions. This is done in the project build system, but we're just using +# the configure part of the autotools and letting the FreeBSD python USES do +# the main build. +pre-build: + (cd ${BUILD_WRKSRC} && ${LN} -sf src ${PORTNAME}) + +# Avoid patching the src 'copystamp' target, which tries to copy several files +# to their original location, causing errors. ${BUILD_WRKSRC}/copystamp just +# has to exist for the port 'test' target to function for our purposes. +pre-test: + ${TOUCH} ${BUILD_WRKSRC}/copystamp + +.include <bsd.port.mk> diff --git a/security/py-gpg/distinfo b/security/py-gpg/distinfo new file mode 100644 index 000000000000..c0e4e0940c09 --- /dev/null +++ b/security/py-gpg/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1750492472 +SHA256 (gpgmepy-2.0.0.tar.bz2) = 07e1265648ff51da238c9af7a18b3f1dc7b0c66b4f21a72f27c74b396cd3336d +SIZE (gpgmepy-2.0.0.tar.bz2) = 575963 diff --git a/security/py-gpg/files/patch-configure.ac b/security/py-gpg/files/patch-configure.ac new file mode 100644 index 000000000000..d60e14dfd05d --- /dev/null +++ b/security/py-gpg/files/patch-configure.ac @@ -0,0 +1,19 @@ +The configure script automatically detects all versions of Python and builds +the bindings for each found version. This is a problem when building outside +of a clean environment since the ports system can only build a package for one +Python flavor at a time. The found versions of Python are overridden by +environment variables set in the port Makefile. + +--- configure.ac.orig 2025-06-17 08:21:23 UTC ++++ configure.ac +@@ -326,6 +326,10 @@ else + ], :, m4_if(mym4pythonver,[any],[],[python]mym4pythonver)) + ]) + ++ # Override the automatically found Pythons with the selected version from ports. ++ PYTHONS=$BSD_PYTHON ++ PYTHON_VERSIONS=$BSD_PYTHON_VERSION ++ + # Recover some values lost in the second attempt to find Python. + PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)" + PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)" diff --git a/security/py-gpg/files/patch-pyproject.toml b/security/py-gpg/files/patch-pyproject.toml new file mode 100644 index 000000000000..f2a281e724c2 --- /dev/null +++ b/security/py-gpg/files/patch-pyproject.toml @@ -0,0 +1,13 @@ +Since we don't have a "swig" python package to look for, this breaks the +build. Swig detection, however, is done locally by the ports system and +the configure script. + +--- pyproject.toml.orig 2025-06-17 08:21:23 UTC ++++ pyproject.toml +@@ -59,5 +59,5 @@ content-type = "text/plain" + + [build-system] + # Minimum requirements for the build system to execute. +-requires = ["setuptools", "swig"] ++requires = ["setuptools"] + build-backend = "setuptools.build_meta" diff --git a/security/py-gpg/pkg-descr b/security/py-gpg/pkg-descr new file mode 100644 index 000000000000..331ded45d4d4 --- /dev/null +++ b/security/py-gpg/pkg-descr @@ -0,0 +1,3 @@ +Python bindings for the GpgME library, offering a high-level and curated +interface, as well as an idiomatic interface implemented as a shim, +automatically created using SWIG, on top of the low-level interface. |