Build libheif to support heif-convert of Apple .heic files to .jpg/.png (and enable open by Gimp)
All, If you have ever been stuck with a native iPhone .heic file on Linux it is a pain in the .... However, you can simply rebuild the current source package for 15.4 (or 15.3, etc..): http://download.opensuse.org/source/distribution/leap/15.4/repo/oss/src/libh... using rpmbuild and the "--with x265" option to enable building with libde265-0 and libx265-199 (both from packman) which will build the heif-examples package that provides: /usr/bin/heif-convert /usr/bin/heif-enc /usr/bin/heif-info /usr/bin/heif-thumbnailer You will also need to install the corresponding -devel packages as well along with librav1e0 and rav1e-devel, and libaom3 and libaom-devel. The list of subpackages created using the x265 option are: gdk-pixbuf-loader-libheif heif-examples libheif-devel libheif1 The available gimp-plugin-heif, allows Gimp to open .heic files directly after you have build and installed the updated version. You will also need to create a *.heic *.HEIC file association for whatever desktop you are using in order to enable the rt-click context menu "Open with Gimp". Primary use I have is simply to convert the same .heic files I get sent. After the updated package is installed, it's as simple as: $ heif-convert file.heic file.jpg I hacked a spec together which worked swimmingly, to ask on the packaging list about handing a couple of conflicts only to find the conditional build in the current openSUSE srpm already provided a path. Hopefully this will save some other soul the same grief. -- David C. Rankin, J.D.,P.E.
Hello, On Fri, 12 Aug 2022, David C. Rankin wrote:
All,
If you have ever been stuck with a native iPhone .heic file on Linux it is a pain in the .... However, you can simply rebuild the current source package for 15.4 (or 15.3, etc..):
http://download.opensuse.org/source/distribution/leap/15.4/repo/oss/src/libh...
using rpmbuild and the "--with x265" option to enable building with libde265-0 and libx265-199 (both from packman) which will build the heif-examples package that provides:
/usr/bin/heif-convert /usr/bin/heif-enc /usr/bin/heif-info /usr/bin/heif-thumbnailer
No need to, just grab the '*heif*'-packages from packman, as usual, i.e. switch those to the packman repo. E.g. for 15.3: $ rpm -qplv https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.3/Essential... | cut -d/ -f2- usr/bin/heif-convert usr/bin/heif-enc usr/bin/heif-info usr/bin/heif-thumbnailer usr/share/man/man1/heif-convert.1.gz usr/share/man/man1/heif-enc.1.gz usr/share/man/man1/heif-info.1.gz usr/share/man/man1/heif-thumbnailer.1.gz HTH, -dnh -- Shh! Be vewy quiet, I'm hunting wuntime errors!
On 8/12/22 04:24, David Haller wrote:
No need to, just grab the '*heif*'-packages from packman, as usual, i.e. switch those to the packman repo.
E.g. for 15.3:
$ rpm -qplvhttps://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.3/Essential... | cut -d/ -f2- usr/bin/heif-convert usr/bin/heif-enc usr/bin/heif-info usr/bin/heif-thumbnailer usr/share/man/man1/heif-convert.1.gz usr/share/man/man1/heif-enc.1.gz usr/share/man/man1/heif-info.1.gz usr/share/man/man1/heif-thumbnailer.1.gz
HTH, -dnh
Oh, if it were only that easy for 15.4.... The fly in the ointment is there is no heif-examples package for 15.4 on packman -- :( Seems 15.4 is a bit of a red-headed stepchild from packman's stanpoint. Heck, I even be FreeCAD works on 15.3 :) Now if whoever builds for packman would just kickoff the build -- that would save lots of grief :) -- David C. Rankin, J.D.,P.E.
Hello, On Fri, 12 Aug 2022, David C. Rankin wrote:
On 8/12/22 04:24, David Haller wrote:
No need to, just grab the '*heif*'-packages from packman, as usual, i.e. switch those to the packman repo.
E.g. for 15.3:
$ rpm -qplvhttps://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.3/Essential... | cut -d/ -f2- usr/bin/heif-convert usr/bin/heif-enc usr/bin/heif-info usr/bin/heif-thumbnailer usr/share/man/man1/heif-convert.1.gz usr/share/man/man1/heif-enc.1.gz usr/share/man/man1/heif-info.1.gz usr/share/man/man1/heif-thumbnailer.1.gz
HTH, -dnh
Oh, if it were only that easy for 15.4....
The fly in the ointment is there is no heif-examples package for 15.4 on packman -- :(
Seems 15.4 is a bit of a red-headed stepchild from packman's stanpoint. Heck, I even be FreeCAD works on 15.3 :)
No, rather that specific package, it fails. Seemingly because some settings concerning allowed RPATHs in executables and libs. ==== https://pmbs.links2linux.org/package/live_build_log/Essentials/libheif/openS... ==== [ 44s] ERROR: RPATH "/home/abuild/rpmbuild/BUILD/libheif-1.12.0/build/libheif" on /home/abuild/rpmbuild/BUILDROOT/libheif-1.12.0-pm154.4.1.x86_64/usr/bin/heif-convert is not allowed [ 44s] WARNING: ignoring empty rpath "" in /home/abuild/rpmbuild/BUILDROOT/libheif-1.12.0-pm154.4.1.x86_64/usr/bin/heif-convert [.. analogue for the other programs ..] ====
Now if whoever builds for packman would just kickoff the build -- that would save lots of grief :)
Yeah, it just needs to clean up the rpath. Or rather, not set it in the first place. I created an submit request to fix the build. -dnh -- In fact, it's surprising that any sort of hardware works. When it works, it is just biding its time waiting for a more inconvenient time for it to fail. -- Joe Moore
Hello, On Fri, 12 Aug 2022, David Haller wrote:
On Fri, 12 Aug 2022, David C. Rankin wrote: [..]
Now if whoever builds for packman would just kickoff the build -- that would save lots of grief :)
Yeah, it just needs to clean up the rpath. Or rather, not set it in the first place. I created an submit request to fix the build.
Luigi was so kind to accept my sr quite fast! Packages have been successfully built for 15.3, 15.4 and TW and the examples package for 15.4 should be on it's merry way to the mirrors. (As of now, it's not yet listed at the mentioned mirror nor at https://packman.links2linux.de/package/libheif)... It'll just take a bit ;) HTH, -dnh -- "That young girl is one of the least benightedly unintelligent organic life forms it has been my profound lack of pleasure not to be able to avoid meeting." -- Marvin
Hello, On Fri, 12 Aug 2022, David Haller wrote:
On Fri, 12 Aug 2022, David Haller wrote:
On Fri, 12 Aug 2022, David C. Rankin wrote: [..]
Now if whoever builds for packman would just kickoff the build -- that would save lots of grief :)
Yeah, it just needs to clean up the rpath. Or rather, not set it in the first place. I created an submit request to fix the build.
Luigi was so kind to accept my sr quite fast!
Packages have been successfully built for 15.3, 15.4 and TW and the examples package for 15.4 should be on it's merry way to the mirrors. (As of now, it's not yet listed at the mentioned mirror nor at https://packman.links2linux.de/package/libheif)... It'll just take a bit ;)
$ rpm -qplv https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.4/Essential... | cut -d/ -f2- usr/bin/heif-convert usr/bin/heif-enc usr/bin/heif-info usr/bin/heif-thumbnailer usr/share/man/man1/heif-convert.1.gz usr/share/man/man1/heif-enc.1.gz usr/share/man/man1/heif-info.1.gz usr/share/man/man1/heif-thumbnailer.1.gz Mission accomplished, and thanks Luigi, -dnh -- "Time is that quality of nature which keeps events from happening all at once. Lately it doesn't seem to be working."
On 8/12/22 08:30, David Haller wrote:
Now if whoever builds for packman would just kickoff the build -- that would save lots of grief :) Yeah, it just needs to clean up the rpath. Or rather, not set it in the first place. I created an submit request to fix the build. Luigi was so kind to accept my sr quite fast!
Packages have been successfully built for 15.3, 15.4 and TW and the examples package for 15.4 should be on it's merry way to the mirrors. (As of now, it's not yet listed at the mentioned mirror nor at https://packman.links2linux.de/package/libheif)... It'll just take a bit ;) $ rpm -qplvhttps://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.4/Essential... | cut -d/ -f2- usr/bin/heif-convert usr/bin/heif-enc usr/bin/heif-info usr/bin/heif-thumbnailer usr/share/man/man1/heif-convert.1.gz usr/share/man/man1/heif-enc.1.gz usr/share/man/man1/heif-info.1.gz usr/share/man/man1/heif-thumbnailer.1.gz
Mission accomplished, and thanks Luigi, -dnh
You are a rock-star dnh. Local build of the 15.4 outside of chroot prior to the fix worked without issue. Glad the 15.4 package is working! I probably fought it for 8 hours the first time a client sent a batch of .heic files that needed to be used for demonstrative aids and at that point all I knew was there was nothing for 15.4. Hacking a spec from the Arch PKGBUILD was easy enough, but the common dependencies with Gimp-plugin and Darktable caused me fits because I'm no rpm subpackage wizard -- getting better, but no wizard. I guess this means I can remove the lock on my self-built packages :) Thanks again. -- David C. Rankin, J.D.,P.E.
participants (2)
-
David C. Rankin
-
David Haller