Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/
Date: Fri, 28 Jan 2022 08:24:16
Message-Id: 1643358241.c0d511652d855d453231c9e301c1516586889131.sam@gentoo
1 commit: c0d511652d855d453231c9e301c1516586889131
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Sun Jan 16 11:13:51 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 28 08:24:01 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0d51165
7
8 media-gfx/freecad: fix patchset
9
10 Split the patchset and use several patches instead of a compressed
11 patch set stored elsewhere. This way, the patches can be handled
12 more easily in case of upstream changes to some of the files.
13
14 Some of the source code files have to be patched in order to use
15 the settings.
16
17 Bug: https://github.com/waebbl/waebbl-gentoo/issues/354
18 Bug: https://github.com/waebbl/waebbl-gentoo/issues/355
19 Closes: https://bugs.gentoo.org/831086
20 Package-Manager: Portage-3.0.30, Repoman-3.0.3
21 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
22 Closes: https://github.com/gentoo/gentoo/pull/23825
23 Signed-off-by: Sam James <sam <AT> gentoo.org>
24
25 media-gfx/freecad/Manifest | 1 -
26 media-gfx/freecad/freecad-9999.ebuild | 30 +++++++++++-------------------
27 2 files changed, 11 insertions(+), 20 deletions(-)
28
29 diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
30 index cf58ec9ff504..fe0489b287e6 100644
31 --- a/media-gfx/freecad/Manifest
32 +++ b/media-gfx/freecad/Manifest
33 @@ -1,3 +1,2 @@
34 DIST freecad-0.19.2-0005-Make-smesh-compile-with-vtk9.patch.xz 5368 BLAKE2B 69bafefd049effe3c31719bb2c23d32e8ba7ad58235c58ac8279ba6c036feaf1b97d5751cf2d68896e7489803103b2d0f92f76e61b3ccc97ef05a95b337ca5c2 SHA512 66585cc13fb3b0b026cf9dbd761c8ba1c1fe4d4f7db2e144ddd97706e02ccd78f4a43ac7cd93ddcae6e73933bf41d4cbd4d94bcdff8804b81378a6d946c7b070
35 DIST freecad-0.19.2.tar.gz 296987961 BLAKE2B 3c21359c71f7ac5a49cc4b4be437dfce02f2af73dfc526a3955547718ee41c461fc787d029a9a77374d58516d7c56fec6982fe6d38ab17fbc30c0a94929136bf SHA512 420f00e696725cbd31c936c47b6ac226d866a17c7b7683ad381b8dd5edaffc7dfb1a3c4238c08e8b4fd34ef0c08d7c244cb7797012e596df1ce0a4f6e3be6b72
36 -DIST freecad-9999-Gentoo-specific-fix-install-locations-of-Ext-and-Mod.patch.xz 4144 BLAKE2B bfd9a0fcd9a6a5fb4c9ef2d5e88e69b869f908142cedf5dd1449b917d90e36187ce6227af99613efedd05eb3218d17e9e6df4430ea0413988340c91c111bbe4e SHA512 5d452eca6bc88fb50ae47a6b6127e39f3d17a60498627920b13273e6afaceaca64e47ade4d1fce18b3bfbcdf4eb13565244ecc575707f1aedf3bb1d6dfc7e89e
37
38 diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
39 index 2852f295c8e1..97ada209ae61 100644
40 --- a/media-gfx/freecad/freecad-9999.ebuild
41 +++ b/media-gfx/freecad/freecad-9999.ebuild
42 @@ -1,4 +1,4 @@
43 -# Copyright 1999-2021 Gentoo Authors
44 +# Copyright 1999-2022 Gentoo Authors
45 # Distributed under the terms of the GNU General Public License v2
46
47 EAPI=8
48 @@ -11,12 +11,10 @@ DESCRIPTION="QT based Computer Aided Design application"
49 HOMEPAGE="https://www.freecadweb.org/ https://github.com/FreeCAD/FreeCAD"
50
51 MY_PN=FreeCAD
52 -MY_PATCH="${P}-Gentoo-specific-fix-install-locations-of-Ext-and-Mod"
53
54 if [[ ${PV} = *9999 ]]; then
55 inherit git-r3
56 EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
57 - SRC_URI="https://raw.githubusercontent.com/waebbl/waebbl-gentoo/master/patches/${MY_PATCH}.patch.xz"
58 S="${WORKDIR}/freecad-${PV}"
59 else
60 MY_PV=$(ver_cut 1-2)
61 @@ -139,11 +137,6 @@ pkg_setup() {
62 [[ -z ${CASROOT} ]] && die "\${CASROOT} not set, plesae run eselect opencascade"
63 }
64
65 -src_unpack() {
66 - git-r3_src_unpack
67 - unpack ${MY_PATCH}.patch.xz
68 -}
69 -
70 src_prepare() {
71 # the upstream provided file doesn't find the coin doc tag file,
72 # but cmake ships a working one, so we use this.
73 @@ -153,13 +146,6 @@ src_prepare() {
74 sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
75
76 cmake_src_prepare
77 -
78 - # Fix line endings on a few files for patching
79 - for f in src/Mod/{Cloud,Inspection,Start/StartPage}/CMakeLists.txt; do
80 - dos2unix -q ${f}
81 - done
82 -
83 - eapply "${WORKDIR}"/${P}-Gentoo-specific-fix-install-locations-of-Ext-and-Mod.patch
84 }
85
86 src_configure() {
87 @@ -210,10 +196,10 @@ src_configure() {
88 -DBUILD_WEB=ON # needed by start workspace
89 -DBUILD_WITH_CONDA=OFF
90
91 - -DCMAKE_INSTALL_DATADIR=share/${PN}/data
92 - -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
93 - -DCMAKE_INSTALL_INCLUDEDIR=include/${PN}
94 - -DCMAKE_INSTALL_LIBDIR=$(get_libdir)/${PN}
95 + -DCMAKE_INSTALL_DATADIR=/usr/share/${PN}/data
96 + -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
97 + -DCMAKE_INSTALL_INCLUDEDIR=/usr/include/${PN}
98 + -DCMAKE_INSTALL_PREFIX=/usr/$(get_libdir)/${PN}
99
100 -DFREECAD_BUILD_DEBIAN=OFF
101
102 @@ -275,6 +261,12 @@ src_install() {
103
104 dobin src/Tools/freecad-thumbnailer
105
106 + if ! use headless; then
107 + dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCAD /usr/bin/freecad
108 + mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources"
109 + fi
110 + dosym -r /usr/$(get_libdir)/${PN}/bin/FreeCADCmd /usr/bin/freecadcmd
111 +
112 python_optimize "${ED}"/usr/share/${PN}/data/Mod/Start/StartPage "${ED}"/usr/$(get_libdir)/${PN}{/Ext,/Mod}/
113 # compile main package in python site-packages as well
114 python_optimize