From nobody Sat May 07 15:30:48 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 7DC851ABCFFC; Sat, 7 May 2022 15:30:48 +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 4KwWbr37fTz3pfj; Sat, 7 May 2022 15:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651937448; 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=fHEpDM7MWho1sX1ooL1Hi9TzrKCFxvJOuAAZLQwfxUA=; b=RETdhpusjiVNYk15US/8OlN02dvENIic+tfZSMYHasUL2n7Ju8BiXPaGUeMf6Y1jWTu1+b WW+ORUX3Rnxvcp45wuZzTuI9Ms5UI4bPCUb6MqEQFcYbMT66etzzqbiuM1M/hADfEg/Qgb Wh5bv7jxWO8npSM+SyD/nzskZ8++ReJwqy14s7BH1GuKqT+rFzbZvkMPzLOIcI0uLXkIta b15sip+eIuXrRLcaRJumkJUTlhFj6GEKaQf3gROluO2VjpKlwF7dBkKHGujwiX7e6RgZEK v7kuqlGqiuEOzJzydAqOMvXeYj3RPPrXv04XcCpF1MBGBzJcxdFFK297J9YpgQ== 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 4BF961303F; Sat, 7 May 2022 15:30:48 +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 247FUmWx083181; Sat, 7 May 2022 15:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 247FUmLS083180; Sat, 7 May 2022 15:30:48 GMT (envelope-from git) Date: Sat, 7 May 2022 15:30:48 GMT Message-Id: <202205071530.247FUmLS083180@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Christoph Moench-Tegeder Subject: git: 4f80881f6058 - main - cad/kicad: attempt to fix 3D-Viewer by using bundled GLEW 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: cmt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f80881f60588b2d02541647ceb7d635928faac9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651937448; 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=fHEpDM7MWho1sX1ooL1Hi9TzrKCFxvJOuAAZLQwfxUA=; b=pk9DuWCyWD81QxR29pv4qpytytn+oLIWzoghCGhoqGE1C2tF9X57/xFA3CFKRLfOvKVV6W rMRYnUp7yHcr17Ny6wMZ0wWxAHiE6rTb53Z9O9e9+egEKD2SvWoZ57lgMInAMOGrc/qmFg vw9uBGbvddY2ih3flcGkPrVSYYUKtDsi11bb8DKD1H0mnoqJAodHojg4jAQiRwl84+HANU eTVwfPdzJOWqge/pmn46tVpwomhP6gg3l/GN89KxdPJjds18Qo1wFI4OUZO9b+JgTGogWW vQ/vdpCfGi4Hw5Hn5pe6o7+GJBuITpA5G8IvS4PwsyPSIXEB6bZSivvp2SVHyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651937448; a=rsa-sha256; cv=none; b=EOPkA5QgyxsTgvAILvvFJNjglgaAPj/btgTZ4MYJTXLeKSur5MV3IO0gZun1szU1E31PDj e7ZnxVXBoHNR5qv/envGBSqczsXPuPhtgScy25fMdVtTrcqJMl9XRXehztZWVK78I2iFZb UNWHJoHhbTrMf5HxLPIcRxtujuYMN+0utGB/yUG/X3UhRxNPwDuedkbgmuWjUm0t9cMd7M zqXOHOC042DNDHCs6LHxOa1JldVOQooPAcZDr53m40VoKpkmfFatGIN8PWdY1G4G147Ovq 0SZ2pwm0+sJ0jDipduWIQ6DxA0JvXTA8ZMbB2hkFaGyeHPM7ioGGNiyQF51yRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=4f80881f60588b2d02541647ceb7d635928faac9 commit 4f80881f60588b2d02541647ceb7d635928faac9 Author: Christoph Moench-Tegeder AuthorDate: 2022-05-07 15:29:23 +0000 Commit: Christoph Moench-Tegeder CommitDate: 2022-05-07 15:29:23 +0000 cad/kicad: attempt to fix 3D-Viewer by using bundled GLEW The 3D-Viewer (e.g. from the Footprint Editor) may fail to start with an "Unknown error" message. Investigation indicates that kicad really needs it's bundles libGLEW, using the system one was a mistake. While here, fix a possible nullpointer dereference in the 3D cache destructor - this is only relevant when the 3D viewer fails unexpectedly, but then it is quite annoying during debugging. PR: 262802 Reported by: Tomasz "CeDeROM" CEDRO --- cad/kicad/Makefile | 5 +++-- cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp | 12 ++++++++++++ cad/kicad/files/patch-thirdparty_glew_CMakeLists.txt | 10 ++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/cad/kicad/Makefile b/cad/kicad/Makefile index 5ef818579d2a..028c5aa600fc 100644 --- a/cad/kicad/Makefile +++ b/cad/kicad/Makefile @@ -2,6 +2,7 @@ PORTNAME= kicad PORTVERSION= 6.0.5 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= cad MASTER_SITES= https://gitlab.com/${PORTNAME}/code/${PORTNAME}/-/archive/${DISTVERSION}/ @@ -30,7 +31,7 @@ USES= cmake:noninja compiler:c++11-lib desktop-file-utils gl \ SHEBANG_FILES= pcbnew/python/plugins/touch_slider_wizard.py USE_XORG= ice x11 xext -USE_GL= gl glew glu glut +USE_GL= gl glu glut USE_WX= 3.1 WX_COMPS= python:lib wx USE_GNOME= atk cairo gdkpixbuf2 gtk30 pango @@ -41,7 +42,7 @@ CMAKE_ARGS= -DwxWidgets_CONFIG_EXECUTABLE=${WX_CONFIG} \ -DKICAD_SCRIPTING_WXPYTHON=ON \ -DKICAD_USE_OCC=ON \ -DKICAD_USE_EGL=ON \ - -DKICAD_USE_BUNDLED_GLEW=OFF \ + -DKICAD_USE_BUNDLED_GLEW=ON \ -DOCC_INCLUDE_DIR=${LOCALBASE}/include/OpenCASCADE USE_LDCONFIG= yes diff --git a/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp b/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp new file mode 100644 index 000000000000..d33fb5620970 --- /dev/null +++ b/cad/kicad/files/patch-3d-viewer_3d__cache_3d__cache.cpp @@ -0,0 +1,12 @@ +--- 3d-viewer/3d_cache/3d_cache.cpp.orig 2022-05-06 18:57:13 +0200 ++++ 3d-viewer/3d_cache/3d_cache.cpp +@@ -199,7 +199,8 @@ + FlushCache(); + + // We'll delete ".3dc" cache files older than this many days +- int clearCacheInterval = commonSettings->m_System.clear_3d_cache_interval; ++ int clearCacheInterval = 0; ++ if(commonSettings) clearCacheInterval = commonSettings->m_System.clear_3d_cache_interval; + + // An interval of zero means the user doesn't want to ever clear the cache + diff --git a/cad/kicad/files/patch-thirdparty_glew_CMakeLists.txt b/cad/kicad/files/patch-thirdparty_glew_CMakeLists.txt new file mode 100644 index 000000000000..18c5a496dd6c --- /dev/null +++ b/cad/kicad/files/patch-thirdparty_glew_CMakeLists.txt @@ -0,0 +1,10 @@ +--- thirdparty/glew/CMakeLists.txt.orig 2022-05-07 15:44:23 +0200 ++++ thirdparty/glew/CMakeLists.txt +@@ -5,6 +5,7 @@ + # The actual include directories will be added to the global include paths as + # system headers + target_include_directories( glew PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" ) ++target_include_directories( glew SYSTEM PRIVATE "${CMAKE_INSTALL_PREFIX}/include" ) + + # Definitions for compiling GLEW staticly for EGL (extracted from the main GLEW CMakeLists.txt file) + add_definitions( -DGLEW_STATIC )