Bug 230767 - [NEW PORT] graphics/libheif: an ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
Summary: [NEW PORT] graphics/libheif: an ISO/IEC 23008-12:2017 HEIF file format decode...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks: 230788
  Show dependency treegraph
 
Reported: 2018-08-20 06:44 UTC by Sebastian Steinmetz
Modified: 2018-08-21 19:34 UTC (History)
1 user (show)

See Also:


Attachments
patch for adding libheif to the ports tree (3.74 KB, patch)
2018-08-20 06:44 UTC, Sebastian Steinmetz
no flags Details | Diff
v2 of the new port (3.85 KB, patch)
2018-08-20 22:38 UTC, Sebastian Steinmetz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Steinmetz 2018-08-20 06:44:17 UTC
Created attachment 196375 [details]
patch for adding libheif to the ports tree

libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.

HEIF is a new image file format employing HEVC (h.265) image coding for the best compression ratios currently possible.

libheif makes use of libde265 for the actual image decoding and x265 for encoding. Alternative codecs for, e.g., AVC and JPEG can be provided as plugins.

In order to support the new image file format HEIF (predominantly used by apple in the more recent iPhones), one might find the libheif useful. Especially when trying to build ImageMagick support for it.

This is a new port to fetch a version from https://github.com/strukturag/libheif and build it on freebsd.
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2018-08-20 18:27:59 UTC
Testbuild in poudriere fails with:

===>  Configuring for libheif-1.3.2
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:7: error: possibly undefined macro: AC_SUBST
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:61: error: possibly undefined macro: AC_DEFINE
autoreconf-2.69: /usr/local/bin/autoconf-2.69 failed with exit status: 1
*** Error code 1

Any idea ?
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2018-08-20 19:08:38 UTC
Aha, it needs USES=pkgconfig
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2018-08-20 19:18:10 UTC
On FreeBSD 10.4i, it fails with:

encoder_fuzzer.cc:84:5: error: use of undeclared identifier 'free'

Probably a compiler version issue.

We can set BROKEN_FreeBSD_10 or you can suggest a fix for this issue ?
Comment 4 Sebastian Steinmetz 2018-08-20 22:37:48 UTC
Hi Kurt, thanks for reviewing this so quickly.

I don't have an idea what the problem would be with the free identifier in encoder_fuzzer.cc. I always though free() would be a normal C keyword to free some memory. Didn't know it could cause the compiler to issue any errors...

But I see some commits agains master branch in the repository which are not yet tagged as a release. Maybe we could try to make a build from the most recent development branch and report compiler issues upstream?

I can't reproduce the prob on my end, the port builds just fine for my FreeBSD 11.1 jail in freenas. Not even complaining about any missing USES=pkgconfig. But I guess it doesn't hurt to add it. Same goes for the BROKEN_FreeBSD_10 setting.

Find attached another patch with the respective changes.
Comment 5 Sebastian Steinmetz 2018-08-20 22:38:39 UTC
Created attachment 196403 [details]
v2 of the new port
Comment 6 Sebastian Steinmetz 2018-08-20 22:51:50 UTC
Just submitted Bug #230788 which upgrades ImageMagick 7 to the most recent version and adds the possibility to process HEIF/HEIC images with the help of libheif. 

So this is a prerequisite.
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-08-21 00:24:37 UTC
A commit references this bug:

Author: pi
Date: Tue Aug 21 00:24:19 UTC 2018
New revision: 477695
URL: https://svnweb.freebsd.org/changeset/ports/477695

Log:
  New port: graphics/libheif

  libheif is an ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.

  HEIF is a new image file format employing HEVC (h.265) image coding for the
  best compression ratios currently possible.

  libheif makes use of libde265 for the actual image decoding and x265 for
  encoding. Alternative codecs for, e.g., AVC and JPEG can be provided as
  plugins.

  WWW: https://github.com/strukturag/libheif

  PR:		230767
  Submitted by:	Sebastian Steinmetz <freebsd-2018@sebastiansteinmetz.ch>

Changes:
  head/graphics/Makefile
  head/graphics/libheif/
  head/graphics/libheif/Makefile
  head/graphics/libheif/distinfo
  head/graphics/libheif/pkg-descr
  head/graphics/libheif/pkg-plist
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2018-08-21 00:25:19 UTC
Committed, thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-08-21 19:34:47 UTC
A commit references this bug:

Author: pi
Date: Tue Aug 21 19:33:59 UTC 2018
New revision: 477754
URL: https://svnweb.freebsd.org/changeset/ports/477754

Log:
  graphics/libheif: unbreak on 10, clean up Makefile

  PR:		230767
  Submitted by:	yuri

Changes:
  head/graphics/libheif/Makefile
  head/graphics/libheif/files/
  head/graphics/libheif/files/patch-libheif__encoder_fuzzer.cc