<pre style='margin:0'>
Marius Schamschula (Schamschula) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/f28ef919eb76ee7a897b86e07643464901db0bc0">https://github.com/macports/macports-ports/commit/f28ef919eb76ee7a897b86e07643464901db0bc0</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit f28ef919eb76ee7a897b86e07643464901db0bc0
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Mon Apr 26 08:57:09 2021 -0400
<span style='display:block; white-space:pre;color:#404040;'> opencv4: portfile cleanup: move pkgconfig patching to proc
</span><span style='display:block; white-space:pre;color:#404040;'> * Move pkgconfig back to segregated location, to avoid conflicts with other opencvX ports
</span>---
graphics/opencv4/Portfile | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/opencv4/Portfile b/graphics/opencv4/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 8d2477d1e9b..626ca837f25 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/opencv4/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/opencv4/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -8,7 +8,7 @@ PortGroup github 1.0
</span> # Note: Dependent ports, like gmic, may need a rev-bump when updating opencv4
github.setup opencv opencv 4.5.2
name opencv4
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories graphics science
platforms darwin
license BSD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -539,11 +539,35 @@ proc opencv_soft_link_binaries {p_bin_main_dir p_bin_port_dir p_destroot p_prefi
</span> return 0
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+proc opencv_fix_pkgconfig {p_destroot p_prefix p_subport p_parent_subport_name} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${p_subport} eq ${p_parent_subport_name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgconfig_file \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "${p_destroot}${p_prefix}/lib/${p_parent_subport_name}/pkgconfig/opencv4.pc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "opencv_fix_pkgconfig: fixing pkgconfig file ${pkgconfig_file}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Fix paths
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|\$\{exec_prefix\}\/||g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${pkgconfig_file}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|\$\{prefix\}\/||g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${pkgconfig_file}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc opencv_post_destroot {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global prefix
</span> global destroot
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global prefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global subport
</span> global parent_subport_name
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ opencv_fix_pkgconfig \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${prefix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${subport} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${parent_subport_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set bin_main_dir \
"${destroot}${prefix}/bin"
set bin_port_dir \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -592,17 +616,6 @@ post-extract {
</span> post-destroot {
ui_debug "${subport}: phase post-destroot running"
opencv_post_destroot
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${name} eq ${subport}} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Move opencv4.pc to standard location
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -d ${destroot}${prefix}/lib/pkgconfig
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${destroot}${prefix}/lib/opencv4/pkgconfig/opencv4.pc \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/lib/pkgconfig/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # Fix paths in opencv4.pc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|\$\{exec_prefix\}\/||g" ${destroot}${prefix}/lib/pkgconfig/opencv4.pc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|\$\{prefix\}\/||g" ${destroot}${prefix}/lib/pkgconfig/opencv4.pc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> }
if {[string match "py*" ${subport}]} {
</pre><pre style='margin:0'>
</pre>