https://bugzilla.rpmfusion.org/show_bug.cgi?id=6508

--- Comment #15 from Kate Hsuan <[email protected]> ---
(In reply to Hans de Goede from comment #13)
> On another note, about my hack to make linking icamerasrc work on non IPU6
> equiped systems:
> 
> %post
> /usr/bin/udevadm control --reload
> /usr/bin/udevadm trigger /sys/devices/pci0000:00/0000:00:05.0
> # Make sure /run/libcamhal.so points to something on systems without an IPU6
> # so that linking with -lcamhal works
> if [ ! -L /run/libcamhal.so ]; then
>   /bin/ln -sf %{_libdir}/ipu6/libcamhal.so /run/libcamhal.so
> fi
> 
> This only works on the first install, which should be ok for mock, but not
> for doing local builds (after a reboot) on systems without an IPU6.
> 
> So I'm thinking that it would be better to patch
> /usr/lib64/pkgconfig/libcamhal.pc to change:
> 
> libdir=${prefix}/lib64
> 
> to:
> 
> libdir=${prefix}/lib64/ipu6

sounds good. That makes it easier to build icamerasrc.

> 
> To simply tell the linker to search there for libcamhal.so then we don't
> need the %post hack at all.
> 
> You can use sed for this outside the for loop in %install, since we only
> have one .pc file to patch. The 2 .so files offer the same symbols and
> soname, so we just need to point to any 1 of the 2 to make the linker happy
> when it is creating the icamerasrc gst plugin .so file.
> 
> And then at runtime the /run symlink will be used to get the right
> libcamhal.so (and on systems without an IPU6 the gst plugin will fail to
> link and thus be ignored by gstreamer which is fine on such systems).
> 
> So I think drop the hack from %post and add something like this to %install
> after the "done" of the for loop:
> 
> # Make sure libcamhal.so can be found when building code on systems without
> an IPU6
> sed -i -e "s|}/lib64|}/lib64/ipu6|"
> %{buildroot}%{_libdir}/pkgconfig/libcamhal.pc

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
rpmfusion-developers mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to