1 # Copyright 2009-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
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/_/-}"
16 IUSE="opencascade test"
17 RESTRICT="!test? ( test )"
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
25 media-libs/libglvnd[X]
28 opencascade? ( sci-libs/opencascade:= )"
31 test? ( dev-cpp/gtest )"
35 dev-qt/qttools:6[linguist]"
41 -DUNBUNDLE_MUPARSER=ON
43 -DUSE_OPENCASCADE=$(usex opencascade 1 0)
44 -DBUILD_TESTS=$(usex test ON OFF)
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
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."