fink / fink-distributions

Package descriptions and patches for Fink
24 stars 38 forks source link

libopenjp2.7-dev needs openjpeg-bin for cmake happiness #1122

Closed nieder closed 8 months ago

nieder commented 8 months ago

Building libheif1 1.17.6

-- Found X265: /opt/sw/include (found version "192") 
-- Found JPEG: /opt/sw/lib/libjpeg.dylib (found version "90") 
CMake Error at /opt/sw/lib/openjpeg-2.4/OpenJPEGTargets.cmake:84 (message):
  The imported target "opj_decompress" references the file

     "/opt/sw/bin/opj_decompress"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/opt/sw/lib/openjpeg-2.4/OpenJPEGTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /opt/sw/lib/openjpeg-2.4/OpenJPEGConfig.cmake:28 (include)
  CMakeLists.txt:170 (find_package)

This is what I have installed:

$ fink list openjp
Scanning package description files..........
Information about 14823 packages read in 3 seconds.
 i   libopenjp2.7                    2.4.0-2                 JPEG2000 with lossless compression
 i   libopenjp2.7-shlibs             2.4.0-2                 JPEG2000 with lossless compression
     libopenjpeg-shlibs              1.3-8                   JPEG2000 with lossless compression
     libopenjpeg1                    1.5.2-2                 JPEG2000 with lossless compression
 i   libopenjpeg1-shlibs             1.5.2-2                 JPEG2000 with lossless compression
     openjpeg-bin                    2.4.0-2                 JPEG2000 with lossless compression

Easy enough to install openjpeg-bin or add a BDep on it in the libheif1 .info. There's a way to change the FATAL_ERROR in the OpenJPEGTargets.cmake file to just be a warning, but I don't remember the exact voodoo. I know I did it for either a KF5 or Qt5 package, but can't find it now.

dmacks commented 8 months ago

Is the robust solution to have libopenjp2.7:Depends:openjpeg-bin ?

nieder commented 8 months ago

Prob in this case, but then you can't remove openjpeg-bin w/out removing libopenjp2.7 as well. So I don't know what will happen if/when we have another openjpeg libN that also provides openjpeg-bin.