From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A8121158099 for ; Tue, 21 Nov 2023 15:05:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C5B042BC041; Tue, 21 Nov 2023 15:05:42 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 448F02BC041 for ; Tue, 21 Nov 2023 15:05:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8AD2B335D8A for ; Tue, 21 Nov 2023 15:05:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CA97913B0 for ; Tue, 21 Nov 2023 15:05:38 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1700535474.e43fd4312cbd8f0decbe83f31a4d87699b4be710.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: dev-libs/qschematic/, dev-libs/qschematic/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-libs/qschematic/Manifest dev-libs/qschematic/files/qschematic-1.5.0-gentoo-cmake-option.patch dev-libs/qschematic/metadata.xml dev-libs/qschematic/qschematic-1.5.0.ebuild X-VCS-Directories: dev-libs/qschematic/files/ dev-libs/qschematic/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: e43fd4312cbd8f0decbe83f31a4d87699b4be710 X-VCS-Branch: master Date: Tue, 21 Nov 2023 15:05:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e96d955c-2a2a-4f4f-8964-8670f178b0df X-Archives-Hash: 3ec6380e869839b08c5149d877cf127e commit: e43fd4312cbd8f0decbe83f31a4d87699b4be710 Author: Huang Rui gmail com> AuthorDate: Tue Nov 21 02:57:54 2023 +0000 Commit: David Roman gmail com> CommitDate: Tue Nov 21 02:57:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e43fd431 dev-libs/qschematic: new package, add 1.5.0 Signed-off-by: Huang Rui gmail.com> dev-libs/qschematic/Manifest | 1 + .../qschematic-1.5.0-gentoo-cmake-option.patch | 128 +++++++++++++++++++++ dev-libs/qschematic/metadata.xml | 31 +++++ dev-libs/qschematic/qschematic-1.5.0.ebuild | 67 +++++++++++ 4 files changed, 227 insertions(+) diff --git a/dev-libs/qschematic/Manifest b/dev-libs/qschematic/Manifest new file mode 100644 index 0000000000..97fbdad4b5 --- /dev/null +++ b/dev-libs/qschematic/Manifest @@ -0,0 +1 @@ +DIST qschematic-1.5.0.tar.gz 1509508 BLAKE2B b2850e0b31e1d44f750488b94d47beaf606981d77bfbb070b44beb235c531bf190d1e3edcafb214737dc376d74d5e08405a8b3844c9746f9dce9731484685ca8 SHA512 a5ad0a5068c0bed1307c89134814c68192e4af19067d221d27086585f93360307a1293ee7c63021b21c0348f3859a18d6dcd50b3e2e0fe19fd32bf4928942cd4 diff --git a/dev-libs/qschematic/files/qschematic-1.5.0-gentoo-cmake-option.patch b/dev-libs/qschematic/files/qschematic-1.5.0-gentoo-cmake-option.patch new file mode 100644 index 0000000000..229b93a727 --- /dev/null +++ b/dev-libs/qschematic/files/qschematic-1.5.0-gentoo-cmake-option.patch @@ -0,0 +1,128 @@ +From 9beb6fcc19a27bd7a280420bdac8a95b650316ed Mon Sep 17 00:00:00 2001 +From: Huang Rui +Date: Tue, 21 Nov 2023 10:25:53 +0800 +Subject: [PATCH] build: add build options for gentoo + +Signed-off-by: Huang Rui +--- + CMakeLists.txt | 2 ++ + demo/CMakeLists.txt | 2 ++ + qschematic/CMakeLists.txt | 10 ++++++---- + qschematic/external.cmake | 2 ++ + qschematic/qschematic-config.cmake.in | 3 +++ + 5 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a265d7e523f..bfe5cfe8d8bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,6 +11,8 @@ project( + # User options + option(QSCHEMATIC_BUILD_DEMO "Whether to build the demo project" ON) + option(QSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD "Whether to pull the GPDS dependency via FetchContent" ON) ++option(QSCHEMATIC_BUILD_QT6 "Whether to build with QT6" ON) ++option(QSCHEMATIC_BUILD_STATIC "Whether to build static library" ON) + + # User settings + set(QSCHEMATIC_DEPENDENCY_GPDS_TARGET "gpds::gpds-static" CACHE STRING "The CMake target of the GPDS library to use") +diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt +index 6c315c2894b2..db206dd156ac 100644 +--- a/demo/CMakeLists.txt ++++ b/demo/CMakeLists.txt +@@ -2,11 +2,13 @@ + include(../qschematic/external.cmake) + + # Qt ++if (QSCHEMATIC_BUILD_QT6) + find_package( + Qt6 + COMPONENTS + PrintSupport + ) ++endif() + if (NOT Qt6_FOUND) + find_package( + Qt5 +diff --git a/qschematic/CMakeLists.txt b/qschematic/CMakeLists.txt +index ec56b33ad264..6b4d353127bc 100644 +--- a/qschematic/CMakeLists.txt ++++ b/qschematic/CMakeLists.txt +@@ -150,7 +150,6 @@ setup_target_common(${TARGET_SHARED}) + ################################################################################ + # Static library # + ################################################################################ +- + add_library(${TARGET_STATIC} STATIC) + setup_target_common(${TARGET_STATIC}) + +@@ -160,7 +159,6 @@ target_compile_definitions( + QSCHEMATIC_STATIC_DEFINE + ) + +- + ################################################################################ + # Install # + ################################################################################ +@@ -171,10 +169,14 @@ include(CMakePackageConfigHelpers) + set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/qschematic) + + # Targets ++if (QSCHEMATIC_BUILD_STATIC) ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${TARGET_STATIC} ${TARGET_SHARED}) ++else() ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${TARGET_SHARED}) ++endif() + install( + TARGETS +- ${TARGET_STATIC} +- ${TARGET_SHARED} ++ ${INSTALL_TARGETS} + EXPORT qschematic-targets + FILE_SET + HEADERS +diff --git a/qschematic/external.cmake b/qschematic/external.cmake +index 80aae6c29b94..7e57f0852ac5 100644 +--- a/qschematic/external.cmake ++++ b/qschematic/external.cmake +@@ -35,6 +35,7 @@ endif() + ######################################################################################################################## + + # Try to find Qt6 ++if (QSCHEMATIC_BUILD_QT6) + find_package( + Qt6 + COMPONENTS +@@ -42,6 +43,7 @@ find_package( + Gui + Widgets + ) ++endif() + + # If Qt6 was not found, fallback to Qt5 + # Require minimum Qt 5.15 for versionless cmake targets. This can be relaxed down to Qt 5.6 (?) if needed by modifying +diff --git a/qschematic/qschematic-config.cmake.in b/qschematic/qschematic-config.cmake.in +index 7452408bcd09..5b2a14a4c9c2 100644 +--- a/qschematic/qschematic-config.cmake.in ++++ b/qschematic/qschematic-config.cmake.in +@@ -6,8 +6,10 @@ include(CMakeFindDependencyMacro) + + set(QSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD @QSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD@) + set(QSCHEMATIC_DEPENDENCY_GPDS_MINIMUM_VERSION @QSCHEMATIC_DEPENDENCY_GPDS_MINIMUM_VERSION@) ++set(QSCHEMATIC_BUILD_QT6 @QSCHEMATIC_BUILD_QT6@) + + # Qt ++if (QSCHEMATIC_BUILD_QT6) + find_dependency( + Qt6 + COMPONENTS +@@ -15,6 +17,7 @@ find_dependency( + Gui + Widgets + ) ++endif() + if (NOT Qt6_FOUND) + find_dependency( + Qt5 5.15 +-- +2.42.1 + diff --git a/dev-libs/qschematic/metadata.xml b/dev-libs/qschematic/metadata.xml new file mode 100644 index 0000000000..a7e051e5ce --- /dev/null +++ b/dev-libs/qschematic/metadata.xml @@ -0,0 +1,31 @@ + + + + + vowstar@gmail.com + Huang Rui + + + Build with Qt6 support + + + simulton/QSchematic + https://github.com/simulton/QSchematic/issues + https://github.com/simulton/QSchematic/releases + + + QSchematic is a library to draw diagrams and schematics with Qt. It uses + Qt's graphics view framework. + The library provides base classes for objects such as nodes and wires + and implements logic to move objects around while keeping the wires + connected, generating netlists and so on. A typical application would + include this library and subclass the Item class to implement custom + items. + + + QSchematic 是一个基于 Qt 的图形视图框架的绘制图表和原理图的库。 + 该库为节点和连线等对象提供基类,并实现在保持连线连接的同时移动对象的逻 + 辑、生成网表等。典型的应用程序包含此库,并允许继承 Item 类以实现自定义 + 项。 + + diff --git a/dev-libs/qschematic/qschematic-1.5.0.ebuild b/dev-libs/qschematic/qschematic-1.5.0.ebuild new file mode 100644 index 0000000000..39c94b151e --- /dev/null +++ b/dev-libs/qschematic/qschematic-1.5.0.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +MY_PN="QSchematic" + +inherit cmake + +DESCRIPTION="Library for creating flowcharts and engineering diagrams" +HOMEPAGE="https://github.com/simulton/QSchematic" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/simulton/QSchematic/${MY_PN}.git" +else + SRC_URI="https://github.com/simulton/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" + S="${WORKDIR}/${MY_PN}-${PV}" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="examples qt6 static-libs test wayland +X" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + examples? ( static-libs ) + test? ( static-libs ) +" +RDEPEND=" + !qt6? ( + >=dev-qt/qtcore-5.15:5= + >=dev-qt/qtgui-5.15:5=[jpeg,png,wayland?,X?] + >=dev-qt/qtsvg-5.15:5 + >=dev-qt/qtwidgets-5.15:5[png,X?] + ) + qt6? ( + >=dev-qt/qtbase-6.5:6=[gui,wayland?,widgets,X?] + >=dev-qt/qtimageformats-6.5:6 + >=dev-qt/qtsvg-6.5:6 + ) + >=dev-libs/gpds-1.6.0[static-libs?] +" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-1.5.0-gentoo-cmake-option.patch" +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DQSCHEMATIC_DEPENDENCY_GPDS_TARGET:STRING="gpds::gpds-shared" + -DQSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD=OFF + -DQSCHEMATIC_BUILD_DEMO=$(usex examples) + -DQSCHEMATIC_BUILD_QT6=$(usex qt6) + -DQSCHEMATIC_BUILD_STATIC=$(usex static-libs) + ) + + cmake_src_configure +}