소스 검색

python-imglib: import version 1.1.7 of Python Imaging Library

Signed-off-by: Gergely Kiss <mail.gery@gmail.com>
Tested-by: Gergely Kiss <mail.gery@gmail.com>
Gergely Kiss 10 년 전
부모
커밋
e842d3329d
3개의 변경된 파일131개의 추가작업 그리고 0개의 파일을 삭제
  1. 62
    0
      lang/python-imglib/Makefile
  2. 48
    0
      lang/python-imglib/patches/010-cross-compile.patch
  3. 21
    0
      lang/python-imglib/patches/020-freetype-header-include.patch

+ 62
- 0
lang/python-imglib/Makefile 파일 보기

@@ -0,0 +1,62 @@
1
+#
2
+# Copyright (c) 1997-2009 by Secret Labs AB
3
+# Copyright (c) 1995-2009 by Fredrik Lundh
4
+#
5
+
6
+include $(TOPDIR)/rules.mk
7
+
8
+PKG_NAME:=python-imglib
9
+PKG_VERSION:=1.1.7
10
+PKG_RELEASE:=1
11
+PKG_LICENSE:=CUSTOM
12
+PKG_LICENSE_FILES:=README
13
+
14
+PKG_SOURCE:=Imaging-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://effbot.org/downloads
16
+PKG_MD5SUM:=fc14a54e1ce02a0225be8854bfba478e
17
+
18
+PKG_BUILD_DIR:=$(BUILD_DIR)/Imaging-$(PKG_VERSION)
19
+PKG_BUILD_DEPENDS:=python python-setuptools
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+$(call include_mk, python-package.mk)
23
+
24
+define Package/python-imglib
25
+  SECTION:=language-python
26
+  CATEGORY:=Languages
27
+  SUBMENU:=Python
28
+  TITLE:=Python Imaging Library (PIL)
29
+  MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
30
+  URL:=http://www.pythonware.com/products/pil/
31
+  DEPENDS:=+python +libfreetype +libjpeg +zlib
32
+endef
33
+
34
+define Package/python-imglib/description
35
+ The Python Imaging Library adds image processing capabilities to your
36
+ Python interpreter.
37
+
38
+ This library provides extensive file format support, an efficient
39
+ internal representation, and fairly powerful image processing
40
+ capabilities.
41
+
42
+ The core image library is designed for fast access to data stored in a
43
+ few basic pixel formats. It should provide a solid foundation for a
44
+ general image processing tool.
45
+endef
46
+
47
+define Build/Compile
48
+	$(call Build/Compile/PyMod,., \
49
+		install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
50
+	)
51
+endef
52
+
53
+define Package/python-imglib/install
54
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
55
+	$(INSTALL_DIR) $(1)/usr/bin
56
+	$(CP) \
57
+		$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
58
+		$(1)$(PYTHON_PKG_DIR)/
59
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
60
+endef
61
+
62
+$(eval $(call BuildPackage,python-imglib))

+ 48
- 0
lang/python-imglib/patches/010-cross-compile.patch 파일 보기

@@ -0,0 +1,48 @@
1
+diff -rupN Imaging-1.1.7.orig/setup.py Imaging-1.1.7/setup.py
2
+--- Imaging-1.1.7.orig/setup.py	2009-11-15 17:06:10.000000000 +0100
3
++++ Imaging-1.1.7/setup.py	2014-12-11 01:01:10.857100877 +0100
4
+@@ -34,10 +34,10 @@ def libinclude(root):
5
+ # TIFF_ROOT = libinclude("/opt/tiff")
6
+ 
7
+ TCL_ROOT = None
8
+-JPEG_ROOT = None
9
+-ZLIB_ROOT = None
10
++JPEG_ROOT = os.environ['STAGING_DIR'] + "/usr/lib", os.environ['STAGING_DIR'] + "/usr/include"
11
++ZLIB_ROOT = os.environ['STAGING_DIR'] + "/usr/lib", os.environ['STAGING_DIR'] + "/usr/include"
12
+ TIFF_ROOT = None
13
+-FREETYPE_ROOT = None
14
++FREETYPE_ROOT = os.environ['STAGING_DIR'] + "/usr/lib", os.environ['STAGING_DIR'] + "/usr/include"
15
+ LCMS_ROOT = None
16
+ 
17
+ # FIXME: add mechanism to explicitly *disable* the use of a library
18
+@@ -147,7 +147,6 @@ class pil_build_ext(build_ext):
19
+             add_directory(library_dirs, "/opt/local/lib")
20
+             add_directory(include_dirs, "/opt/local/include")
21
+ 
22
+-        add_directory(library_dirs, "/usr/local/lib")
23
+         # FIXME: check /opt/stuff directories here?
24
+ 
25
+         prefix = sysconfig.get_config_var("prefix")
26
+@@ -199,22 +198,6 @@ class pil_build_ext(build_ext):
27
+             add_directory(include_dirs, include_root)
28
+ 
29
+         #
30
+-        # add standard directories
31
+-
32
+-        # look for tcl specific subdirectory (e.g debian)
33
+-        if _tkinter:
34
+-            tcl_dir = "/usr/include/tcl" + TCL_VERSION
35
+-            if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
36
+-                add_directory(include_dirs, tcl_dir)
37
+-
38
+-        # standard locations
39
+-        add_directory(library_dirs, "/usr/local/lib")
40
+-        add_directory(include_dirs, "/usr/local/include")
41
+-
42
+-        add_directory(library_dirs, "/usr/lib")
43
+-        add_directory(include_dirs, "/usr/include")
44
+-
45
+-        #
46
+         # insert new dirs *before* default libs, to avoid conflicts
47
+         # between Python PYD stub libs and real libraries
48
+ 

+ 21
- 0
lang/python-imglib/patches/020-freetype-header-include.patch 파일 보기

@@ -0,0 +1,21 @@
1
+diff -rupN Imaging-1.1.7.orig/_imagingft.c Imaging-1.1.7/_imagingft.c
2
+--- Imaging-1.1.7.orig/_imagingft.c	2009-11-01 01:44:12.000000000 +0100
3
++++ Imaging-1.1.7/_imagingft.c	2014-12-11 01:05:21.290135484 +0100
4
+@@ -32,7 +32,7 @@
5
+ #include FT_FREETYPE_H
6
+ #else
7
+ /* freetype 2.0 */
8
+-#include <freetype/freetype.h>
9
++#include <freetype2/freetype.h>
10
+ #endif
11
+ 
12
+ #if PY_VERSION_HEX < 0x01060000
13
+@@ -70,7 +70,7 @@ struct {
14
+     const char* message;
15
+ } ft_errors[] =
16
+ 
17
+-#include <freetype/fterrors.h>
18
++#include <freetype2/fterrors.h>
19
+ 
20
+ /* -------------------------------------------------------------------- */
21
+ /* font objects */