conda-forge / openimageio-feedstock

A conda-smithy repository for openimageio.
BSD 3-Clause "New" or "Revised" License
5 stars 9 forks source link

Enabling jpeg2000 codec #76

Open lashgar opened 1 year ago

lashgar commented 1 year ago

Is it possible to enable jpeg2000 codec by default for this project?

I made a patch for this (on top of the current tip 5822550dd8396b7f10ec9221acf2332bc0c48665)

diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml
index 867e010..5bd6bdb 100644
--- a/.ci_support/linux_64_python3.9.____cpython.yaml
+++ b/.ci_support/linux_64_python3.9.____cpython.yaml
@@ -9,7 +9,7 @@ channel_targets:
 cxx_compiler:
 - gxx
 cxx_compiler_version:
-- '10'
+- '7'
 docker_image:
 - quay.io/condaforge/linux-anvil-cos7-x86_64
 ffmpeg:
@@ -26,6 +26,10 @@ libwebp:
 - '1'
 openexr:
 - '3.1'
+libraw:
+- '<0.20'
+openjpeg:
+- '>=2.3,<2.5'
 pin_run_as_build:
   boost:
     max_pin: x.x.x
@@ -35,6 +39,11 @@ pin_run_as_build:
     max_pin: x.x
   libtiff:
     max_pin: x
+  libraw:
+    max_pin: x.x
+  openjpeg:
+    min_pin: x.x
+    max_pin: x.x
   python:
     min_pin: x.x
     max_pin: x.x
diff --git a/recipe/build.sh b/recipe/build.sh
index f5eb006..80c5b9b 100755
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -14,5 +14,6 @@ cmake $SRC_DIR \
          -DCMAKE_INSTALL_LIBDIR=lib \
          -DCMAKE_BUILD_TYPE=Release \
          -DPYTHON_VERSION=$PY_VER \
+         -DOpenJPEG_ROOT=$PREFIX

 make all -j${CPU_COUNT}
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 751d26d..8dc8149 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -12,7 +12,7 @@ source:
   sha256: {{ sha256 }}

 build:
-  number: 2
+  number: 102
   skip: true  # [win]
   run_exports:
     - {{ pin_subpackage(name, max_pin='x.x') }}
@@ -29,6 +29,7 @@ requirements:
     - ffmpeg
     - giflib
     - jpeg
+    - openjpeg
     - libpng
     - libtiff
     - libwebp
@@ -66,6 +67,7 @@ outputs:
         - ffmpeg
         - giflib
         - jpeg
+        - openjpeg
         - libpng
         - libtiff
         - libwebp
vvzen commented 1 year ago

hey @lashgar , I don't think anyone actually maintains this repository anymore. It looked abandonware the last time I asked around and tried to add support for ARM (https://github.com/conda-forge/openimageio-feedstock/pull/65).

wolfv commented 8 months ago

hey @lashgar not sure if you are still interested, but I would be happy to merge a PR to add this!

lashgar commented 8 months ago

@wolfv , I am not using this anymore, but I think it is a good addition to the project anyways.