commit
76df7c4df5
2 changed files with 70 additions and 75 deletions
|
@ -7,18 +7,17 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=pillow
|
PKG_NAME:=pillow
|
||||||
PKG_VERSION:=3.3.1
|
PKG_VERSION:=5.3.0
|
||||||
PKG_RELEASE=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=Pillow-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/P/Pillow
|
||||||
|
PKG_HASH:=2ea3517cd5779843de8a759c2349a3cd8d3893e03ab47053b66d5ec6f8bc4f93
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/Pillow-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_LICENSE:=CUSTOM
|
PKG_LICENSE:=CUSTOM
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_URL:=https://github.com/python-pillow/Pillow.git
|
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
PKG_SOURCE_VERSION:=aab33141f381d5577cdef9033b7fdff79122a10c
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
|
||||||
PKG_MIRROR_HASH:=e7c36bcf89614337d9abc4d07780da0b346a745be7a9aa55b398fa427549273c
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include ../python-package.mk
|
include ../python-package.mk
|
||||||
|
|
||||||
|
@ -42,12 +41,9 @@ endef
|
||||||
|
|
||||||
define Package/pillow/install
|
define Package/pillow/install
|
||||||
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
|
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
|
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
|
||||||
$(1)$(PYTHON_PKG_DIR)/
|
$(1)$(PYTHON_PKG_DIR)/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/LICENSE $(1)$(PYTHON_PKG_DIR)/PIL/
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,pillow))
|
$(eval $(call BuildPackage,pillow))
|
||||||
|
|
|
@ -1,27 +1,29 @@
|
||||||
diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
--- pillow-3.3.1.orig/setup.py 2016-08-22 17:45:05.000000000 +0200
|
index 15d81e4..ee6dba6 100755
|
||||||
+++ pillow-3.3.1/setup.py 2016-08-22 18:09:51.947745155 +0200
|
--- a/setup.py
|
||||||
@@ -111,12 +111,12 @@ except (ImportError, OSError):
|
+++ b/setup.py
|
||||||
|
@@ -136,12 +136,12 @@ except (ImportError, OSError):
|
||||||
|
|
||||||
NAME = 'Pillow'
|
NAME = 'Pillow'
|
||||||
PILLOW_VERSION = '3.3.1'
|
PILLOW_VERSION = get_version()
|
||||||
-JPEG_ROOT = None
|
-JPEG_ROOT = None
|
||||||
+JPEG_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
|
+JPEG_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
|
||||||
JPEG2K_ROOT = None
|
JPEG2K_ROOT = None
|
||||||
-ZLIB_ROOT = None
|
-ZLIB_ROOT = None
|
||||||
+ZLIB_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
|
+ZLIB_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
|
||||||
IMAGEQUANT_ROOT = None
|
IMAGEQUANT_ROOT = None
|
||||||
-TIFF_ROOT = None
|
-TIFF_ROOT = None
|
||||||
-FREETYPE_ROOT = None
|
-FREETYPE_ROOT = None
|
||||||
+TIFF_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
|
+TIFF_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
|
||||||
+FREETYPE_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
|
+FREETYPE_ROOT = os.path.join(os.environ['STAGING_DIR'], "/usr/lib")
|
||||||
LCMS_ROOT = None
|
LCMS_ROOT = None
|
||||||
|
|
||||||
|
|
||||||
@@ -221,161 +221,6 @@ class pil_build_ext(build_ext):
|
@@ -289,159 +289,6 @@ class pil_build_ext(build_ext):
|
||||||
|
_add_directory(library_dirs, os.path.join(prefix, "lib"))
|
||||||
_add_directory(include_dirs, os.path.join(prefix, "include"))
|
_add_directory(include_dirs, os.path.join(prefix, "include"))
|
||||||
|
|
||||||
#
|
- #
|
||||||
- # add platform directories
|
- # add platform directories
|
||||||
-
|
-
|
||||||
- if self.disable_platform_guessing:
|
- if self.disable_platform_guessing:
|
||||||
|
@ -48,7 +50,7 @@ diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
|
||||||
- try:
|
- try:
|
||||||
- prefix = subprocess.check_output(['brew', '--prefix']).strip(
|
- prefix = subprocess.check_output(['brew', '--prefix']).strip(
|
||||||
- ).decode('latin1')
|
- ).decode('latin1')
|
||||||
- except:
|
- except Exception:
|
||||||
- # Homebrew not installed
|
- # Homebrew not installed
|
||||||
- prefix = None
|
- prefix = None
|
||||||
-
|
-
|
||||||
|
@ -73,61 +75,59 @@ diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
|
||||||
-
|
-
|
||||||
- elif sys.platform.startswith("linux"):
|
- elif sys.platform.startswith("linux"):
|
||||||
- arch_tp = (plat.processor(), plat.architecture()[0])
|
- arch_tp = (plat.processor(), plat.architecture()[0])
|
||||||
- if arch_tp == ("x86_64", "32bit"):
|
- # This should be correct on debian derivatives.
|
||||||
- # 32-bit build on 64-bit machine.
|
- if os.path.exists('/etc/debian_version'):
|
||||||
|
- # If this doesn't work, don't just silently patch
|
||||||
|
- # downstream because it's going to break when people
|
||||||
|
- # try to build pillow from source instead of
|
||||||
|
- # installing from the system packages.
|
||||||
|
- self.add_multiarch_paths()
|
||||||
|
-
|
||||||
|
- elif arch_tp == ("x86_64", "32bit"):
|
||||||
|
- # Special Case: 32-bit build on 64-bit machine.
|
||||||
- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
|
- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
|
||||||
- else:
|
- else:
|
||||||
|
- libdirs = {
|
||||||
|
- 'x86_64': ["/lib64", "/usr/lib64",
|
||||||
|
- "/usr/lib/x86_64-linux-gnu"],
|
||||||
|
- '64bit': ["/lib64", "/usr/lib64",
|
||||||
|
- "/usr/lib/x86_64-linux-gnu"],
|
||||||
|
- 'i386': ["/usr/lib/i386-linux-gnu"],
|
||||||
|
- 'i686': ["/usr/lib/i386-linux-gnu"],
|
||||||
|
- '32bit': ["/usr/lib/i386-linux-gnu"],
|
||||||
|
- 'aarch64': ["/usr/lib64", "/usr/lib/aarch64-linux-gnu"],
|
||||||
|
- 'arm': ["/usr/lib/arm-linux-gnueabi"],
|
||||||
|
- 'armv71': ["/usr/lib/arm-linux-gnueabi"],
|
||||||
|
- 'armv7l': ["/usr/lib"],
|
||||||
|
- 'ppc64': ["/usr/lib64", "/usr/lib/ppc64-linux-gnu",
|
||||||
|
- "/usr/lib/powerpc64-linux-gnu"],
|
||||||
|
- 'ppc64le': ["/usr/lib64"],
|
||||||
|
- 'ppc': ["/usr/lib/ppc-linux-gnu",
|
||||||
|
- "/usr/lib/powerpc-linux-gnu"],
|
||||||
|
- 's390x': ["/usr/lib64", "/usr/lib/s390x-linux-gnu"],
|
||||||
|
- 's390': ["/usr/lib/s390-linux-gnu"],
|
||||||
|
- }
|
||||||
|
-
|
||||||
- for platform_ in arch_tp:
|
- for platform_ in arch_tp:
|
||||||
-
|
- dirs = libdirs.get(platform_, None)
|
||||||
- if not platform_:
|
- if not dirs:
|
||||||
- continue
|
- continue
|
||||||
|
- for path in dirs:
|
||||||
|
- _add_directory(library_dirs, path)
|
||||||
|
- break
|
||||||
-
|
-
|
||||||
- if platform_ in ["x86_64", "64bit"]:
|
|
||||||
- _add_directory(library_dirs, "/lib64")
|
|
||||||
- _add_directory(library_dirs, "/usr/lib64")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/x86_64-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["i386", "i686", "32bit"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["aarch64"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib64")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/aarch64-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["arm", "armv7l"]:
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/arm-linux-gnueabi")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["ppc64"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib64")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/ppc64-linux-gnu")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/powerpc64-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["ppc"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/powerpc-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["s390x"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib64")
|
|
||||||
- _add_directory(library_dirs,
|
|
||||||
- "/usr/lib/s390x-linux-gnu")
|
|
||||||
- break
|
|
||||||
- elif platform_ in ["s390"]:
|
|
||||||
- _add_directory(library_dirs, "/usr/lib/s390-linux-gnu")
|
|
||||||
- break
|
|
||||||
- else:
|
- else:
|
||||||
- raise ValueError(
|
- raise ValueError(
|
||||||
- "Unable to identify Linux platform: `%s`" % platform_)
|
- "Unable to identify Linux platform: `%s`" % platform_)
|
||||||
-
|
-
|
||||||
- # XXX Kludge. Above /\ we brute force support multiarch. Here we
|
- # termux support for android.
|
||||||
- # try Barry's more general approach. Afterward, something should
|
- # system libraries (zlib) are installed in /system/lib
|
||||||
- # work ;-)
|
- # headers are at $PREFIX/include
|
||||||
- self.add_multiarch_paths()
|
- # user libs are at $PREFIX/lib
|
||||||
|
- if os.environ.get('ANDROID_ROOT', None):
|
||||||
|
- _add_directory(library_dirs,
|
||||||
|
- os.path.join(os.environ['ANDROID_ROOT'],
|
||||||
|
- 'lib'))
|
||||||
-
|
-
|
||||||
- elif sys.platform.startswith("gnu"):
|
- elif sys.platform.startswith("gnu"):
|
||||||
- self.add_multiarch_paths()
|
- self.add_multiarch_paths()
|
||||||
|
@ -164,8 +164,8 @@ diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
|
||||||
- best_path = None
|
- best_path = None
|
||||||
- for name in os.listdir(program_files):
|
- for name in os.listdir(program_files):
|
||||||
- if name.startswith('OpenJPEG '):
|
- if name.startswith('OpenJPEG '):
|
||||||
- version = tuple([int(x) for x in name[9:].strip().split(
|
- version = tuple(int(x) for x in
|
||||||
- '.')])
|
- name[9:].strip().split('.'))
|
||||||
- if version > best_version:
|
- if version > best_version:
|
||||||
- best_version = version
|
- best_version = version
|
||||||
- best_path = os.path.join(program_files, name)
|
- best_path = os.path.join(program_files, name)
|
||||||
|
@ -176,7 +176,6 @@ diff -rupN pillow-3.3.1.orig/setup.py pillow-3.3.1/setup.py
|
||||||
- _add_directory(include_dirs,
|
- _add_directory(include_dirs,
|
||||||
- os.path.join(best_path, 'include'))
|
- os.path.join(best_path, 'include'))
|
||||||
-
|
-
|
||||||
- #
|
#
|
||||||
# insert new dirs *before* default libs, to avoid conflicts
|
# insert new dirs *before* default libs, to avoid conflicts
|
||||||
# between Python PYD stub libs and real libraries
|
# between Python PYD stub libs and real libraries
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue