aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-08-27 10:10:30 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-08-27 10:10:30 +0000
commit2b8486a5c333215ecb74f745851d80f1ed1df884 (patch)
tree2356fd9ab57843e14b1c90227fd319ec8d1c49d7
parent39eb9db143e8415db6bbeb403ebc71b6a779362a (diff)
downloadports-2b8486a5c333215ecb74f745851d80f1ed1df884.tar.gz
ports-2b8486a5c333215ecb74f745851d80f1ed1df884.zip
graphics/py-lerc: Add py-lerc 4.0.0
LERC is an open-source image or raster format which supports rapid encoding and decoding for any pixel type (not just RGB or Byte). Users set the maximum compression error per pixel while encoding, so the precision of the original input image is preserved (within user defined error bounds). This port is the Python binding for LERC (Limited Error Raster Compression). WWW: https://esri.github.io/lerc/ WWW: https://github.com/Esri/lerc/tree/master/OtherLanguages/Python
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/py-lerc/Makefile28
-rw-r--r--graphics/py-lerc/distinfo3
-rw-r--r--graphics/py-lerc/files/patch-setup.py13
-rw-r--r--graphics/py-lerc/pkg-descr9
5 files changed, 54 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index f0f352ce062e..fe6b20ecde5f 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -871,6 +871,7 @@
SUBDIR += py-imagesize
SUBDIR += py-img2pdf
SUBDIR += py-leather
+ SUBDIR += py-lerc
SUBDIR += py-mapclassify
SUBDIR += py-mayavi
SUBDIR += py-mcomix
diff --git a/graphics/py-lerc/Makefile b/graphics/py-lerc/Makefile
new file mode 100644
index 000000000000..68b9844fb275
--- /dev/null
+++ b/graphics/py-lerc/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= lerc
+PORTVERSION= 4.0.0
+DISTVERSIONPREFIX= v
+CATEGORIES= graphics python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Python binding for LERC (Limited Error Raster Compression)
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/../../LICENSE
+
+LIB_DEPENDS= libLerc.so:graphics/lerc
+
+USES= python:3.6+
+USE_PYTHON= autoplist concurrent distutils
+
+WRKSRC_SUBDIR= OtherLanguages/Python
+
+GH_ACCOUNT= Esri
+USE_GITHUB= yes
+
+# lib/libLerc.* are not available until configure phase
+post-configure:
+ @${MKDIR} ${WRKSRC}/../../bin/FreeBSD/
+ @${CP} ${LOCALBASE}/lib/libLerc.so.* ${WRKSRC}/../../bin/FreeBSD/
+
+.include <bsd.port.mk>
diff --git a/graphics/py-lerc/distinfo b/graphics/py-lerc/distinfo
new file mode 100644
index 000000000000..dccfa1bda1e1
--- /dev/null
+++ b/graphics/py-lerc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660576692
+SHA256 (Esri-lerc-v4.0.0_GH0.tar.gz) = 91431c2b16d0e3de6cbaea188603359f87caed08259a645fd5a3805784ee30a0
+SIZE (Esri-lerc-v4.0.0_GH0.tar.gz) = 4710408
diff --git a/graphics/py-lerc/files/patch-setup.py b/graphics/py-lerc/files/patch-setup.py
new file mode 100644
index 000000000000..3f9a1926b396
--- /dev/null
+++ b/graphics/py-lerc/files/patch-setup.py
@@ -0,0 +1,13 @@
+--- setup.py.orig 2022-07-15 18:25:29 UTC
++++ setup.py
+@@ -16,8 +16,8 @@ except Exception:
+
+ # Using MANIFEST.in doesn't respect relative paths above the package root.
+ # Instead, inspect the location and copy in the binaries if newer.
+-BINARY_TYPES = ["*.dll", "*.lib", "*.so*", "*.dylib"]
+-PLATFORMS = ["Linux", "MacOS", "windows"]
++BINARY_TYPES = ["*.so*"]
++PLATFORMS = ["FreeBSD"]
+ for platform in PLATFORMS:
+ platform_dir = join("..", "..", "bin", platform)
+ for ext in BINARY_TYPES:
diff --git a/graphics/py-lerc/pkg-descr b/graphics/py-lerc/pkg-descr
new file mode 100644
index 000000000000..f308b5cd40d6
--- /dev/null
+++ b/graphics/py-lerc/pkg-descr
@@ -0,0 +1,9 @@
+LERC is an open-source image or raster format which supports rapid encoding and
+decoding for any pixel type (not just RGB or Byte). Users set the maximum
+compression error per pixel while encoding, so the precision of the original
+input image is preserved (within user defined error bounds).
+
+This port is the Python binding for LERC (Limited Error Raster Compression).
+
+WWW: https://esri.github.io/lerc/
+WWW: https://github.com/Esri/lerc/tree/master/OtherLanguages/Python