Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/freecad/
Date: Tue, 30 Nov 2021 12:50:29
Message-Id: 1638276618.3c966730bf52e6d2169cb8d0a35133e92a13076b.juippis@gentoo
1 commit: 3c966730bf52e6d2169cb8d0a35133e92a13076b
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Sat Nov 20 10:13:34 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 30 12:50:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c966730
7
8 media-gfx/freecad: simplify opencascade logic
9
10 With sci-libs/opencascade:7.4.0 gone from the tree, this patch simplifies
11 the code needed to configure various opencascade related variables to cmake.
12
13 Package-Manager: Portage-3.0.28, Repoman-3.0.3
14 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
15 Closes: https://github.com/gentoo/gentoo/pull/23008
16 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
17
18 ...d-0.19.2-r4.ebuild => freecad-0.19.2-r5.ebuild} | 48 ++++++----------------
19 1 file changed, 13 insertions(+), 35 deletions(-)
20
21 diff --git a/media-gfx/freecad/freecad-0.19.2-r4.ebuild b/media-gfx/freecad/freecad-0.19.2-r5.ebuild
22 similarity index 90%
23 rename from media-gfx/freecad/freecad-0.19.2-r4.ebuild
24 rename to media-gfx/freecad/freecad-0.19.2-r5.ebuild
25 index 24dc6a703399..df0faac7f980 100644
26 --- a/media-gfx/freecad/freecad-0.19.2-r4.ebuild
27 +++ b/media-gfx/freecad/freecad-0.19.2-r5.ebuild
28 @@ -47,7 +47,6 @@ unset module
29
30 RDEPEND="
31 ${PYTHON_DEPS}
32 - >=dev-cpp/eigen-3.3.1:3
33 dev-libs/OpenNI2[opengl(+)]
34 dev-libs/libspnav[X]
35 dev-libs/xerces-c[icu]
36 @@ -79,7 +78,7 @@ RDEPEND="
37 dev-libs/openssl:=
38 net-misc/curl
39 )
40 - fem? ( sci-libs/vtk:=[boost,python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
41 + fem? ( sci-libs/vtk:=[boost(+),python,qt5,rendering,${PYTHON_SINGLE_USEDEP}] )
42 openscad? ( media-gfx/openscad )
43 pcl? ( >=sci-libs/pcl-1.8.1:=[opengl,openni2(+),qt5(+),vtk(+)] )
44 $(python_gen_cond_dep '
45 @@ -94,7 +93,10 @@ RDEPEND="
46 fem? ( dev-python/ply[${PYTHON_USEDEP}] )
47 ')
48 "
49 -DEPEND="${RDEPEND}"
50 +DEPEND="
51 + ${RDEPEND}
52 + >=dev-cpp/eigen-3.3.1:3
53 +"
54 BDEPEND="dev-lang/swig"
55
56 # To get required dependencies:
57 @@ -143,22 +145,6 @@ src_prepare() {
58 # but cmake ships a working one, so we use this.
59 rm "${S}/cMake/FindCoin3D.cmake" || die
60
61 - # Fix OpenCASCADE lookup
62 - local OCC_P=$(best_version sci-libs/opencascade[vtk])
63 - OCC_P=${OCC_P#sci-libs/}
64 - local OCC_PV=${OCC_P#opencascade-}
65 - OCC_PV=$(ver_cut 1-2 ${OCC_PV})
66 - # check for CASROOT needed to ensure occ-7.5 is eselected and profile resourced
67 - if [[ ${OCC_PV} = 7.5 && ${CASROOT} = "/usr" ]]; then
68 - sed -e 's|/usr/include/opencascade|'${CASROOT}'/include/'${OCC_P}'|' \
69 - -e 's|/usr/lib|'${CASROOT}'/'$(get_libdir)'/'${OCC_P}' NO_DEFAULT_PATH|' \
70 - -i cMake/FindOpenCasCade.cmake || die
71 - else
72 - sed -e 's|/usr/include/opencascade|${CASROOT}/include/opencascade|' \
73 - -e 's|/usr/lib|${CASROOT}/'$(get_libdir)' NO_DEFAULT_PATH|' \
74 - -i cMake/FindOpenCasCade.cmake || die
75 - fi
76 -
77 # Fix desktop file
78 sed -e 's/Exec=FreeCAD/Exec=freecad/' -i src/XDGData/org.freecadweb.FreeCAD.desktop || die
79
80 @@ -241,22 +227,14 @@ src_configure() {
81 -DOCCT_CMAKE_FALLBACK=ON # don't use occt-config which isn't included in opencascade for Gentoo
82 )
83
84 - if has_version ">=sci-libs/opencascade-7.5"; then
85 - # bug https://bugs.gentoo.org/788274
86 - local OCC_P=$(best_version sci-libs/opencascade[vtk])
87 - OCC_P=${OCC_P#sci-libs/}
88 - OCC_P=${OCC_P%-r*}
89 - mycmakeargs+=(
90 - -DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P}
91 - -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P}
92 - )
93 - else
94 - # <occ-7.5 uses different layout
95 - mycmakeargs+=(
96 - -DOCC_INCLUDE_DIR="${CASROOT}"/include/opencascade
97 - -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)
98 - )
99 - fi
100 + # bug https://bugs.gentoo.org/788274
101 + local OCC_P=$(best_version sci-libs/opencascade[vtk])
102 + OCC_P=${OCC_P#sci-libs/}
103 + OCC_P=${OCC_P%-r*}
104 + mycmakeargs+=(
105 + -DOCC_INCLUDE_DIR="${CASROOT}"/include/${OCC_P}
106 + -DOCC_LIBRARY_DIR="${CASROOT}"/$(get_libdir)/${OCC_P}
107 + )
108
109 if use debug; then
110 mycmakeargs+=(