1 |
commit: 728417f0a8ce57a6daaa448100a101d107c25b6d |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Sat Apr 2 08:22:04 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 12:57:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=728417f0 |
7 |
|
8 |
media-gfx/freecad: fix build of 0.19.4 with Qt 5.15.3 |
9 |
|
10 |
Backport changes from HEAD FindPySide2Tools.cmake to correctly |
11 |
find the path for uic and rcc binaries. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/836433 |
14 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/24861 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
...19.4-backport-correctly-find-PySide2Tools.patch | 106 +++++++++++++++++++++ |
19 |
media-gfx/freecad/freecad-0.19.4.ebuild | 1 + |
20 |
2 files changed, 107 insertions(+) |
21 |
|
22 |
diff --git a/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch |
23 |
new file mode 100644 |
24 |
index 000000000000..b297727033db |
25 |
--- /dev/null |
26 |
+++ b/media-gfx/freecad/files/freecad-0.19.4-backport-correctly-find-PySide2Tools.patch |
27 |
@@ -0,0 +1,106 @@ |
28 |
+From https://github.com/FreeCAD/FreeCAD/tree/6b062b25e118fc6d260d8caff6cf46fafd6cfa0f |
29 |
+From: Bernd Waibel <waebbl-gentoo@××××××.net> |
30 |
+Date: Sat, 2 Apr 2022 09:30:09 +0200 |
31 |
+Subject: [PATCH] backport correctly find PySide2Tools |
32 |
+ |
33 |
+Backported from current HEAD |
34 |
+ |
35 |
+Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
36 |
+--- a/cMake/FindPySide2Tools.cmake |
37 |
++++ b/cMake/FindPySide2Tools.cmake |
38 |
+@@ -23,7 +23,7 @@ endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
39 |
+ # Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option |
40 |
+ # We test Qt5Core version to act accordingly |
41 |
+ |
42 |
+-FIND_PACKAGE(Qt5Core) |
43 |
++FIND_PACKAGE(Qt5 COMPONENTS Core) |
44 |
+ |
45 |
+ IF(Qt5Core_VERSION VERSION_LESS 5.14) |
46 |
+ # Legacy (< 5.14) |
47 |
+@@ -33,13 +33,20 @@ IF(Qt5Core_VERSION VERSION_LESS 5.14) |
48 |
+ set(RCCOPTIONS "") |
49 |
+ ELSE(Qt5Core_VERSION VERSION_LESS 5.14) |
50 |
+ # New (>= 5.14) |
51 |
+- FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic pyside2-uic) |
52 |
+- set(UICOPTIONS "--generator=python") |
53 |
+- FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc pyside2-rcc) |
54 |
+- set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") |
55 |
++ if (TARGET Qt::uic) |
56 |
++ get_property(PYSIDE2UICBINARY TARGET Qt::uic PROPERTY LOCATION) |
57 |
++ set(UICOPTIONS "--generator=python") |
58 |
++ endif() |
59 |
++ if (TARGET Qt::rcc) |
60 |
++ get_property(PYSIDE2RCCBINARY TARGET Qt::rcc PROPERTY LOCATION) |
61 |
++ set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") |
62 |
++ endif() |
63 |
+ ENDIF(Qt5Core_VERSION VERSION_LESS 5.14) |
64 |
+ |
65 |
+ MACRO(PYSIDE_WRAP_UI outfiles) |
66 |
++ if (NOT PYSIDE2UICBINARY) |
67 |
++ message(FATAL_ERROR "Qt uic is required for generating ${ARGN}") |
68 |
++ endif() |
69 |
+ FOREACH(it ${ARGN}) |
70 |
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) |
71 |
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) |
72 |
+@@ -58,7 +65,7 @@ MACRO(PYSIDE_WRAP_UI outfiles) |
73 |
+ # we follow the tool command with in-place sed. |
74 |
+ ADD_CUSTOM_COMMAND(OUTPUT ${outfile} |
75 |
+ COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}" |
76 |
+- COMMAND sed -i "/^# /d" "${outfile}" |
77 |
++ COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}" |
78 |
+ MAIN_DEPENDENCY "${infile}" |
79 |
+ ) |
80 |
+ endif() |
81 |
+@@ -67,6 +74,9 @@ MACRO(PYSIDE_WRAP_UI outfiles) |
82 |
+ ENDMACRO (PYSIDE_WRAP_UI) |
83 |
+ |
84 |
+ MACRO(PYSIDE_WRAP_RC outfiles) |
85 |
++ if (NOT PYSIDE2RCCBINARY) |
86 |
++ message(FATAL_ERROR "Qt rcc is required for generating ${ARGN}") |
87 |
++ endif() |
88 |
+ FOREACH(it ${ARGN}) |
89 |
+ GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) |
90 |
+ GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) |
91 |
+@@ -85,7 +95,7 @@ MACRO(PYSIDE_WRAP_RC outfiles) |
92 |
+ # we follow the tool command with in-place sed. |
93 |
+ ADD_CUSTOM_COMMAND(OUTPUT "${outfile}" |
94 |
+ COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" |
95 |
+- COMMAND sed -i "/^# /d" "${outfile}" |
96 |
++ COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}" |
97 |
+ MAIN_DEPENDENCY "${infile}" |
98 |
+ ) |
99 |
+ endif() |
100 |
+@@ -93,20 +103,17 @@ MACRO(PYSIDE_WRAP_RC outfiles) |
101 |
+ ENDFOREACH(it) |
102 |
+ ENDMACRO (PYSIDE_WRAP_RC) |
103 |
+ |
104 |
+-IF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY}) |
105 |
+- set(PYSIDE2_TOOLS_FOUND TRUE) |
106 |
+-ENDIF(EXISTS ${PYSIDE2UICBINARY} AND EXISTS ${PYSIDE2RCCBINARY}) |
107 |
+- |
108 |
+ if(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY) |
109 |
++ set(PYSIDE2_TOOLS_FOUND TRUE) |
110 |
++ if (NOT PySide2Tools_FIND_QUIETLY) |
111 |
++ message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}") |
112 |
++ endif (NOT PySide2Tools_FIND_QUIETLY) |
113 |
++else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY) |
114 |
++ if(PySide2Tools_FIND_REQUIRED) |
115 |
++ message(FATAL_ERROR "PySide2 tools could not be found, but are required.") |
116 |
++ else(PySide2Tools_FIND_REQUIRED) |
117 |
+ if (NOT PySide2Tools_FIND_QUIETLY) |
118 |
+- message(STATUS "Found PySide2 tools: ${PYSIDE2UICBINARY}, ${PYSIDE2RCCBINARY}") |
119 |
++ message(STATUS "PySide2 tools: not found.") |
120 |
+ endif (NOT PySide2Tools_FIND_QUIETLY) |
121 |
+-else(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY) |
122 |
+- if(PySide2Tools_FIND_REQUIRED) |
123 |
+- message(FATAL_ERROR "PySide2 tools could not be found, but are required.") |
124 |
+- else(PySide2Tools_FIND_REQUIRED) |
125 |
+- if (NOT PySide2Tools_FIND_QUIETLY) |
126 |
+- message(STATUS "PySide2 tools: not found.") |
127 |
+- endif (NOT PySide2Tools_FIND_QUIETLY) |
128 |
+- endif(PySide2Tools_FIND_REQUIRED) |
129 |
++ endif(PySide2Tools_FIND_REQUIRED) |
130 |
+ endif(PYSIDE2RCCBINARY AND PYSIDE2UICBINARY) |
131 |
+-- |
132 |
+2.35.1 |
133 |
+ |
134 |
|
135 |
diff --git a/media-gfx/freecad/freecad-0.19.4.ebuild b/media-gfx/freecad/freecad-0.19.4.ebuild |
136 |
index cab7693eaacd..270ba00b2832 100644 |
137 |
--- a/media-gfx/freecad/freecad-0.19.4.ebuild |
138 |
+++ b/media-gfx/freecad/freecad-0.19.4.ebuild |
139 |
@@ -125,6 +125,7 @@ REQUIRED_USE=" |
140 |
|
141 |
PATCHES=( |
142 |
"${FILESDIR}"/${P}-Gentoo-specific-don-t-check-vcs.patch |
143 |
+ "${FILESDIR}"/${P}-backport-correctly-find-PySide2Tools.patch |
144 |
"${FILESDIR}"/${PN}-0.19.1-0001-Gentoo-specific-Remove-ccache-usage.patch |
145 |
"${WORKDIR}"/${PN}-0.19.2-0005-Make-smesh-compile-with-vtk9.patch |
146 |
"${FILESDIR}"/${PN}-0.19.2-0006-add-boost-serialization-to-find_package.patch |