From nobody Sun Apr 21 03:02:41 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 4VMY8d4jHhz5HGVd; Sun, 21 Apr 2024 03:02:41 +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 4VMY8d3tQJz4B1t; Sun, 21 Apr 2024 03:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713668561; 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=qAd/ELqVhP8MO1X0DJeO/agXlDx+6WP8d5Js4KpTYEA=; b=BhV8Xs7yw0kh0ZOcavAea5gQgO/msoHZnAvwwBLrtyktVCsncOP5uX2we7hOW88wfXkTz5 6horx5uwDR2NUv5LFl7wYpacmU37l28UJZCqjR+I3Zc+mHztg6hM3Fqd1CFcAdgPtK0eB5 fW7og2/C1qvTJDx6QjC/xgK2grTeIMWgdmx9uWtWWGlHsHfY6i9CUJ75kb0W6L5d2M3dMU RfiGyg5K8OYuG2h1P+asq/4cUcn6vcFJdZQFKHxvhbGoY5c1az51a+DqExiYlF3OaWDeQ6 q7zOxnxXvt4u51uGWUQO3GQP3bBh9uZ+0H+WooijuNVT8aIOujbV1k56dgHqWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713668561; a=rsa-sha256; cv=none; b=rT6KEeCdVLa7sdPGsD6zvOtZg89zTt4XZ2yLGmj0gzeY0CZE1yl3Y/ZgxeGpF2scF2ovLU xq5ij8/mgbmcI01lg8TTkUDBwMgXqKt9aqw6d6x251LCyVbEZ0tliGZqdl0dp5+Z9pxhN8 1fvjTKOh4+4GoaYzZOJFY2Xd3sXTuKnCW5C0BMspLNURhv7sciJ5/vxNDs4UXqmD1YPQE3 mM30C5750ANpReNnAQU6RYaXyG1nncJZkAucpsFBPj6ZSxM0qEC6RXHvDrXOKgw+c12QVC oubVHQ/oohFsCG92Qi37ZS5O6Sx+ZoWWfFZ8GKvnXONUW5QpOBhCvofWOanGqA== 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=1713668561; 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=qAd/ELqVhP8MO1X0DJeO/agXlDx+6WP8d5Js4KpTYEA=; b=oT27mChSAKMRzmqHXbnYr6iDBQR9hjMMWwjyBSHY7jYq4LejfMu5fGD4bQG0OQA1WnJxsD DeY/iquYg81KFIFiOvxszU5RG/x9Bxd6uKUqAUcAw9TLyoVbLRUP/8EVeWClGef6YyVzTb yY/coEzKDAbuoQxloWGhGN7pByNpa9i/ZFIFV1/iORaaJcJmMvpnjXXwByrxZqn3xGYaEd 8qskffMib4yzwjys5JxYxa1x0PIXcyLcVL/1MlRlONftbrkQJzUwaX1OXRy3PB44mau5N+ oK9VrqsBnbEpokYCHRaX6wn+OBsJ/h3VcP476VPMnLxGL+wghzPjn55ZZOptHw== 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 4VMY8d3Rj6z13fv; Sun, 21 Apr 2024 03:02:41 +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 43L32fCj097262; Sun, 21 Apr 2024 03:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43L32fbo097259; Sun, 21 Apr 2024 03:02:41 GMT (envelope-from git) Date: Sun, 21 Apr 2024 03:02:41 GMT Message-Id: <202404210302.43L32fbo097259@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: a78b560136ad - main - misc/py-onnx: Link with bundled protobuf-22.3 to prevent run-time failures 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: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a78b560136addb37b700c950ddceea25fb2da9b8 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a78b560136addb37b700c950ddceea25fb2da9b8 commit a78b560136addb37b700c950ddceea25fb2da9b8 Author: Yuri Victorovich AuthorDate: 2024-04-21 02:59:18 +0000 Commit: Yuri Victorovich CommitDate: 2024-04-21 03:02:37 +0000 misc/py-onnx: Link with bundled protobuf-22.3 to prevent run-time failures --- misc/py-onnx/Makefile | 24 +++++++++++++++++++++--- misc/py-onnx/distinfo | 10 +++++++--- misc/py-onnx/files/patch-CMakeLists.txt | 10 +++++++++- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/misc/py-onnx/Makefile b/misc/py-onnx/Makefile index f39307b4743f..1ad4f7d9cbb5 100644 --- a/misc/py-onnx/Makefile +++ b/misc/py-onnx/Makefile @@ -1,8 +1,16 @@ PORTNAME= onnx DISTVERSION= 1.16.0 +PORTREVISION= 1 CATEGORIES= misc # machine-learning -MASTER_SITES= PYPI +MASTER_SITES= PYPI \ + https://github.com/abseil/abseil-cpp/archive/refs/tags/:abseil \ + https://github.com/protocolbuffers/protobuf/releases/download/v22.3/:protobuf # use downloaded protobuf-22.3 PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} \ + 20230125.3.tar.gz:abseil \ + protobuf-22.3.tar.gz:protobuf # use downloaded protobuf-22.3 +DIST_SUBDIR= onnx +EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} MAINTAINER= yuri@FreeBSD.org COMMENT= Open Neural Network eXchange @@ -18,8 +26,8 @@ BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}pytest-runner>=0:devel/py-pytest-runner@${PY_FLAVOR} \ ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} -LIB_DEPENDS= libabsl_base.so:devel/abseil \ - libprotobuf.so:devel/protobuf +#LIB_DEPENDS= libabsl_base.so:devel/abseil \ + libprotobuf.so:devel/protobuf # disable packaged protobuf RUN_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.2.1:devel/py-typing-extensions@${PY_FLAVOR} @@ -32,11 +40,21 @@ CXXFLAGS+= -Dstat64=stat SHEBANG_FILES= tools/protoc-gen-mypy.sh.in +CONFLICTS_BUILD= protobuf # use downloaded protobuf-22.3 + TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} TEST_WRKSRC= ${WRKSRC}/onnx/test BINARY_ALIAS= python=${PYTHON_CMD} +post-patch: # replace protobuf-24+ with protobuf-lite-22.3 + @${REINPLACE_CMD} \ + -e ' \ + s|set(ProtobufURL https://github.com/protocolbuffers/protobuf/releases/download/v22.3/|set(ProtobufURL file://${DISTDIR}/${DIST_SUBDIR}/|; \ + s|set(AbseilURL https://github.com/abseil/abseil-cpp/archive/refs/tags/|set(AbseilURL file://${DISTDIR}/${DIST_SUBDIR}/| \ + ' \ + ${WRKSRC}/CMakeLists.txt + post-install: @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/onnx/onnx_cpp2py_export*.so diff --git a/misc/py-onnx/distinfo b/misc/py-onnx/distinfo index 1e6ebb954add..2289ca153cfb 100644 --- a/misc/py-onnx/distinfo +++ b/misc/py-onnx/distinfo @@ -1,3 +1,7 @@ -TIMESTAMP = 1713580433 -SHA256 (onnx-1.16.0.tar.gz) = 237c6987c6c59d9f44b6136f5819af79574f8d96a760a1fa843bede11f3822f7 -SIZE (onnx-1.16.0.tar.gz) = 12303017 +TIMESTAMP = 1713648416 +SHA256 (onnx/onnx-1.16.0.tar.gz) = 237c6987c6c59d9f44b6136f5819af79574f8d96a760a1fa843bede11f3822f7 +SIZE (onnx/onnx-1.16.0.tar.gz) = 12303017 +SHA256 (onnx/20230125.3.tar.gz) = 5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36 +SIZE (onnx/20230125.3.tar.gz) = 2119655 +SHA256 (onnx/protobuf-22.3.tar.gz) = 4101e11ef41afa91cac1bd95483cb781626781ae1a331501ed8379f2d82ca9bc +SIZE (onnx/protobuf-22.3.tar.gz) = 4919899 diff --git a/misc/py-onnx/files/patch-CMakeLists.txt b/misc/py-onnx/files/patch-CMakeLists.txt index c658385d91e3..21f7bfc0b494 100644 --- a/misc/py-onnx/files/patch-CMakeLists.txt +++ b/misc/py-onnx/files/patch-CMakeLists.txt @@ -1,6 +1,8 @@ +- use downloaded protobuf-22.3 + --- CMakeLists.txt.orig 2024-03-05 00:46:58 UTC +++ CMakeLists.txt -@@ -19,7 +19,7 @@ option(ONNX_USE_PROTOBUF_SHARED_LIBS "Build ONNX using +@@ -19,12 +19,12 @@ option(ONNX_USE_PROTOBUF_SHARED_LIBS "Build ONNX using option(ONNX_BUILD_BENCHMARKS "Build ONNX micro-benchmarks" OFF) option(ONNX_USE_PROTOBUF_SHARED_LIBS "Build ONNX using protobuf shared library. Sets PROTOBUF_USE_DLLS CMAKE Flag and Protobuf_USE_STATIC_LIBS. " OFF) @@ -9,3 +11,9 @@ option(ONNX_GEN_PB_TYPE_STUBS "Generate protobuf python type stubs" ON) option(ONNX_WERROR "Build with Werror" OFF) option(ONNX_COVERAGE "Build with coverage instrumentation" OFF) + option(ONNX_BUILD_TESTS "Build ONNX C++ APIs Tests" OFF) +-option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." OFF) ++option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." ON) # workaround for the failure, see https://github.com/onnx/optimizer/issues/38#issuecomment-817058821 + option(ONNX_DISABLE_EXCEPTIONS "Disable exception handling." OFF) + option(ONNX_DISABLE_STATIC_REGISTRATION "Disable static registration for onnx operator schemas." OFF) + option(ONNX_USE_UNITY_BUILD "Enable Unity (Jumbo) build for" OFF)