aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2009-10-13 19:20:29 +0800
committerstas <stas@FreeBSD.org>2009-10-13 19:20:29 +0800
commit93be3e026e092f7e08f42d41a6896c2350515b5f (patch)
tree88f417b4f4f93567852e81afd92882dbb6a320e3
parent75d6c875b8778894de46734dca1e3bb03fef22e6 (diff)
downloadfreebsd-ports-gnome-93be3e026e092f7e08f42d41a6896c2350515b5f.tar.gz
freebsd-ports-gnome-93be3e026e092f7e08f42d41a6896c2350515b5f.tar.zst
freebsd-ports-gnome-93be3e026e092f7e08f42d41a6896c2350515b5f.zip
- Add port for lcms python bindings.
PR: ports/128522 Requested by: Sergei Golyashov <svvord@spline-studio.ru>
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/lcms-python/Makefile40
-rw-r--r--graphics/lcms-python/distinfo3
-rw-r--r--graphics/lcms-python/files/patch-icc3414
-rw-r--r--graphics/lcms-python/files/patch-python_Makefile.in31
-rw-r--r--graphics/lcms-python/files/patch-python_lcms_wrap.cxx11
-rw-r--r--graphics/lcms-python/pkg-descr12
7 files changed, 112 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index e6c972d07fe0..de93336e9c31 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -391,6 +391,7 @@
SUBDIR += laternamagica
SUBDIR += lcdtest
SUBDIR += lcms
+ SUBDIR += lcms-python
SUBDIR += leafpak
SUBDIR += lensfun
SUBDIR += leptonlib
diff --git a/graphics/lcms-python/Makefile b/graphics/lcms-python/Makefile
new file mode 100644
index 000000000000..789b71c2ece4
--- /dev/null
+++ b/graphics/lcms-python/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: lcms-python
+# Date created: 13/10/2009
+# Whom: stas
+#
+# $FreeBSD$
+#
+
+PORTNAME= lcms
+PORTVERSION= 1.18a
+CATEGORIES= graphics
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/1.18 \
+ http://www.littlecms.com/
+PKGNAMESUFFIX= -python
+
+MAINTAINER= stas@FreeBSD.org
+COMMENT= Light Color Management System (python bindings)
+
+LIB_DEPENDS+= lcms.1:${PORTSDIR}/graphics/lcms
+
+#USE_GNOME= gnomehack lthack
+USE_PYTHON= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-python
+CONFIGURE_ENV= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
+WRKSRC= ${WRKDIR}/lcms-1.18
+PLIST_FILES= ${PYTHON_SITELIBDIR:C,${PREFIX}/?,,}/_lcms.so \
+ ${PYTHON_SITELIBDIR:C,${PREFIX}/?,,}/lcms.py
+
+.include <bsd.port.pre.mk>
+
+do-build:
+ cd ${WRKSRC}/python && ${SETENV} ${MAKE_ENV} ${MAKE} all
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/python/.libs/_lcms.so \
+ ${PYTHON_SITELIBDIR}/_lcms.so
+ ${INSTALL_DATA} ${WRKSRC}/python/lcms.py \
+ ${PYTHON_SITELIBDIR}/lcms.py
+
+.include <bsd.port.post.mk>
diff --git a/graphics/lcms-python/distinfo b/graphics/lcms-python/distinfo
new file mode 100644
index 000000000000..6b84cf5622de
--- /dev/null
+++ b/graphics/lcms-python/distinfo
@@ -0,0 +1,3 @@
+MD5 (lcms-1.18a.tar.gz) = f4abfe1c57ea3f633c2e9d034e74e3e8
+SHA256 (lcms-1.18a.tar.gz) = fe679a33e7074b62e38c458ac2bbf06d688ae47171886a5a611cbf8ec4d88ddf
+SIZE (lcms-1.18a.tar.gz) = 930618
diff --git a/graphics/lcms-python/files/patch-icc34 b/graphics/lcms-python/files/patch-icc34
new file mode 100644
index 000000000000..6d7a4aa9b2e5
--- /dev/null
+++ b/graphics/lcms-python/files/patch-icc34
@@ -0,0 +1,14 @@
+Try to use the int32 and friends on all Unixes -- not just SGI's Irix.
+--- include/icc34.h.in.orig Tue Jul 22 06:10:02 2003
++++ include/icc34.h.in Sun May 23 11:45:09 2004
+@@ -191,8 +191,10 @@
+ typedef icUInt32Number icU16Fixed16Number;
+
+ #else
++#ifdef __unix__
+ #ifdef __sgi
+ #include "sgidefs.h"
++#endif
+
+ typedef __int32_t icSignature;
+
diff --git a/graphics/lcms-python/files/patch-python_Makefile.in b/graphics/lcms-python/files/patch-python_Makefile.in
new file mode 100644
index 000000000000..d3588f5f7381
--- /dev/null
+++ b/graphics/lcms-python/files/patch-python_Makefile.in
@@ -0,0 +1,31 @@
+--- python/Makefile.in.orig 2009-10-13 14:53:14.000000000 +0400
++++ python/Makefile.in 2009-10-13 14:54:04.000000000 +0400
+@@ -56,7 +56,6 @@
+ am__installdirs = "$(DESTDIR)$(pkgdir)" "$(DESTDIR)$(pkgdir)"
+ pkgLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(pkg_LTLIBRARIES)
+-_lcms_la_DEPENDENCIES = $(top_builddir)/src/liblcms.la
+ am__lcms_la_OBJECTS = _lcms_la-lcms_wrap.lo
+ _lcms_la_OBJECTS = $(am__lcms_la_OBJECTS)
+ _lcms_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+@@ -157,7 +156,7 @@
+ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+ PYTHON_PLATFORM = @PYTHON_PLATFORM@
+ PYTHON_PREFIX = @PYTHON_PREFIX@
+-PYTHON_VERSION = @PYTHON_VERSION@
++PYTH_VERSION = @PYTHON_VERSION@
+ RANLIB = @RANLIB@
+ SED = @SED@
+ SET_MAKE = @SET_MAKE@
+@@ -243,9 +242,9 @@
+ _lcms_la_LDFLAGS = -no-undefined -module -avoid-version \
+ -L$(LCMS_PYLIB)/config
+
+-_lcms_la_LIBADD = $(top_builddir)/src/liblcms.la -lpython$(PYTHON_VERSION)
++_lcms_la_LIBADD = -llcms -lpython$(PYTH_VERSION)
+ _lcms_la_SOURCES = lcms_wrap.cxx
+-_lcms_la_CPPFLAGS = -I$(PYTHON_PREFIX)/include/python$(PYTHON_VERSION) \
++_lcms_la_CPPFLAGS = -I$(PYTHON_PREFIX)/include/python$(PYTH_VERSION) \
+ -I$(LCMS_PYINCLUDE) \
+ $(AM_CPPFLAGS)
+
diff --git a/graphics/lcms-python/files/patch-python_lcms_wrap.cxx b/graphics/lcms-python/files/patch-python_lcms_wrap.cxx
new file mode 100644
index 000000000000..d0c5465786fc
--- /dev/null
+++ b/graphics/lcms-python/files/patch-python_lcms_wrap.cxx
@@ -0,0 +1,11 @@
+--- python/lcms_wrap.cxx.orig 2009-10-13 14:48:08.000000000 +0400
++++ python/lcms_wrap.cxx 2009-10-13 14:48:48.000000000 +0400
+@@ -2958,7 +2958,7 @@
+ {
+ if (PyString_Check(obj)) {
+ char *cstr; Py_ssize_t len;
+- PyString_AsStringAndSize(obj, &cstr, &len);
++ PyString_AsStringAndSize(obj, &cstr, (Py_ssize_t *)&len);
+ if (cptr) {
+ if (alloc) {
+ /*
diff --git a/graphics/lcms-python/pkg-descr b/graphics/lcms-python/pkg-descr
new file mode 100644
index 000000000000..87b019aa8e59
--- /dev/null
+++ b/graphics/lcms-python/pkg-descr
@@ -0,0 +1,12 @@
+LCMS is the Little Color Management System, a Color Matching Method
+(CMM) library which implements fast transforms between ICC profiles.
+It is released under LGPL with source code and meant to be portable.
+
+Color management refers to techniques that ensure consistent color
+as images are transferred from scanners or cameras to monitors and
+printers.
+
+WWW: http://www.littlecms.com/
+
+Mikhail Teterin
+mi@aldan.algebra.com