Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Aug 2022 10:30:47 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2b8486a5c333 - main - graphics/py-lerc: Add py-lerc 4.0.0
Message-ID:  <202208271030.27RAUlpQ047215@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b8486a5c333215ecb74f745851d80f1ed1df884

commit 2b8486a5c333215ecb74f745851d80f1ed1df884
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-08-27 10:10:30 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-08-27 10:10:30 +0000

    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
---
 graphics/Makefile                     |  1 +
 graphics/py-lerc/Makefile             | 28 ++++++++++++++++++++++++++++
 graphics/py-lerc/distinfo             |  3 +++
 graphics/py-lerc/files/patch-setup.py | 13 +++++++++++++
 graphics/py-lerc/pkg-descr            |  9 +++++++++
 5 files changed, 54 insertions(+)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208271030.27RAUlpQ047215>