app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / sci-electronics / librepcb / librepcb-1.2.0.ebuild
blob9ac74c9d417e9d76cbbcee701a252b2aa22df6d0
1 # Copyright 2009-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit cmake xdg
8 DESCRIPTION="Free EDA software to develop printed circuit boards"
9 HOMEPAGE="https://librepcb.org/"
10 SRC_URI="https://download.librepcb.org/releases/${PV}/${P}-source.zip"
11 S="${WORKDIR}/${PN}-${PV/_/-}"
13 LICENSE="GPL-3+"
14 SLOT="0"
15 KEYWORDS="~amd64"
16 IUSE="opencascade test"
17 RESTRICT="!test? ( test )"
19 RDEPEND="
20         dev-cpp/muParser:=
21         >=dev-libs/quazip-1.3-r2:=[qt6(+)]
22         dev-qt/qtbase:6[concurrent,gui,network,opengl,sql,sqlite,ssl,widgets]
23         dev-qt/qtdeclarative:6
24         dev-qt/qtsvg:6
25         media-libs/libglvnd[X]
26         sys-libs/zlib
27         virtual/glu
28         opencascade? ( sci-libs/opencascade:= )"
30 DEPEND="${RDEPEND}
31         test? ( dev-cpp/gtest )"
33 BDEPEND="
34         app-arch/unzip
35         dev-qt/qttools:6[linguist]"
37 src_configure() {
38         local mycmakeargs=(
39                 -DQT_MAJOR_VERSION=6
40                 -DUNBUNDLE_GTEST=ON
41                 -DUNBUNDLE_MUPARSER=ON
42                 -DUNBUNDLE_QUAZIP=ON
43                 -DUSE_OPENCASCADE=$(usex opencascade 1 0)
44                 -DBUILD_TESTS=$(usex test ON OFF)
45         )
46         cmake_src_configure
49 src_test() {
50         local -x QT_QPA_PLATFORM=offscreen
51         cd "${BUILD_DIR}"/tests/unittests || die
52         # https://github.com/LibrePCB/LibrePCB/issues/516
53         ./librepcb-unittests --gtest_filter=-SystemInfoTest.testGetUsername:CategoryTreeModelTest.testSort:BoardPlaneFragmentsBuilderTest.testFragments:BoardGerberExportTest.test
56 pkg_postinst() {
57         xdg_pkg_postinst
59         ewarn
60         ewarn "LibrePCB builds might not be exactly reproducible with e.g. -march={native,haswell,...}."
61         ewarn "This can cause minor issues, see for example:"
62         ewarn "https://github.com/LibrePCB/LibrePCB/issues/516"
63         ewarn "For a completely reproducible build use: -march=x86-64."
64         ewarn