From nobody Sun Apr 21 03:05:18 2024 X-Original-To: dev-commits-ports-branches@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 4VMYCf2v0cz5HGvQ; Sun, 21 Apr 2024 03:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VMYCf19Y5z4CjM; Sun, 21 Apr 2024 03:05:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713668718; 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=GSxdkJt9B4yPIWHbALMwYQaNiDZZeSQLuKMEdSzY6JU=; b=k31JFmWzuo/vpJ/obO/Mvmmpn+wW1YdMcRloIV86w2o2uYevx1fht7Evj1JRnAAPq5920i ZBjkh+8YYCtNCFt9s78Ua+MYivOKSGt4mrmOB3jnsaGZarvYZkQnHouzObgWrb8ieD9Hug /3UX2uRIGYrcQF9G1qOM4r2cLZHXu7rDoDct3VrPAoyAB7+OY3CDaksf1DKoppalJqc8re adVT/7blfZ4uBCw70iJ1FDyLsk35n4n7FoTMxqRloGbeI3As2bV1ZTOI5SS0cczYE853Yv 9RS59uTFUHmuobvzqLQju672Hok9r32kRpmz/AhUNBvQTEw0z3e/F8HH3NOq8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713668718; a=rsa-sha256; cv=none; b=N9Ru8ngtmw+algL8YzOqP7TnjbwT6YVfgYnAKPIzmxS7HMPs68yxfmkuw82QiGEsOi19Qi htxNYFwBNkfPxbiCKrsWD40ykiTf1GIaNX3AAqy0Vuy2dTlKZZgjR8MlEKzEdzE3I3a+gd O7/xH0Oc/l8/BUDSyfMe+dbkL98shGSL51z9w7A1cTU8n4Hw1NxQS0uGk1O7tJuxzuPqcF Wt/h355VJsRUa028IbfUti7SymZu4613gSyDXqROl8LsCALo4bORbs6j8cFR24z+aCEJIP C8QFFR7bWLGeteX8h+RqVNBfZWHnUfNLEKOFIkmDDyYfer0W0LQ+QrfJQN9bYA== 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=1713668718; 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=GSxdkJt9B4yPIWHbALMwYQaNiDZZeSQLuKMEdSzY6JU=; b=KL6Sd3f+I6Nn7MD27e8vcDGXsKISIXQEqcMwwTLBa9giIMe4ealqTawtg0wyj08P10ffzD Y7EOQVIgs2NhBpUWtLe1CTe4tOked9LKdZmzM9zboa5r4JNnJo+fS63vVbRYAR9IjEnp+I CokzlP5dxQWnF81bur3YBginy93GJZ0+JJDBMTtEpad+k9Z1zITeJcdhu7Tx6lJ2IQwy8N hHD7HFSCtieync+KhJL6z6p7cpWHtamugBli30WxEMY04gXobTOT/iUWBDugDOJT7yDynm jCECHClc87ysXUmd0Y65VYw0F6g1zchCHUigqQZdBRoG9LLPLGJkG3tPHiJk/g== 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 4VMYCf0n9Jz13v3; Sun, 21 Apr 2024 03:05:18 +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 43L35I5t098142; Sun, 21 Apr 2024 03:05:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43L35I0X098139; Sun, 21 Apr 2024 03:05:18 GMT (envelope-from git) Date: Sun, 21 Apr 2024 03:05:18 GMT Message-Id: <202404210305.43L35I0X098139@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Yuri Victorovich Subject: git: dae0e175cc78 - 2024Q2 - misc/py-onnx: Link with bundled protobuf-22.3 to prevent run-time failures List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@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/2024Q2 X-Git-Reftype: branch X-Git-Commit: dae0e175cc783015d03f348d2b39634699f9550d Auto-Submitted: auto-generated The branch 2024Q2 has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=dae0e175cc783015d03f348d2b39634699f9550d commit dae0e175cc783015d03f348d2b39634699f9550d Author: Yuri Victorovich AuthorDate: 2024-04-21 02:59:18 +0000 Commit: Yuri Victorovich CommitDate: 2024-04-21 03:05:11 +0000 misc/py-onnx: Link with bundled protobuf-22.3 to prevent run-time failures (cherry picked from commit a78b560136addb37b700c950ddceea25fb2da9b8) --- 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)