summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-07-21 15:45:41 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-07-29 13:09:09 +0100
commit4154db3fe7285384f5baaf83287e92780ea3159c (patch)
treedaa946b0b66cd57d51a7d441b4d2a0fd0ba28e4e /meta/recipes-devtools
parent6d891358c5fba47dd63642e87edefd247d7f9e68 (diff)
downloadpoky-4154db3fe7285384f5baaf83287e92780ea3159c.tar.gz
python-imaging: add PACKAGECONFIG for lcms
* it's autodetected from sysroot * add PACKAGECONFIG to make it deterministic (From OE-Core rev: c11aaac4952320f565bd65ec5f601c50763408a7) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch65
-rw-r--r--meta/recipes-devtools/python/python-imaging_1.1.7.bb10
2 files changed, 74 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch b/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
new file mode 100644
index 0000000000..4960ed4661
--- /dev/null
+++ b/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
@@ -0,0 +1,65 @@
1At least lcms wasn't deterministicly detected from sysroot.
2
3This will allow to export LCMS_ENABLED=False when lcms isn't in PACKAGECONFIG.
4
5Upstream-Status: Inappropriate [configuration]
6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8
9diff -uNr Imaging-1.1.7.orig/setup.py Imaging-1.1.7/setup.py
10--- Imaging-1.1.7.orig/setup.py 2013-07-22 10:17:02.081457075 +0200
11+++ Imaging-1.1.7/setup.py 2013-07-22 13:10:09.029707492 +0200
12@@ -39,6 +39,12 @@
13 TIFF_ROOT = None
14 FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
15 LCMS_ROOT = None
16+TCL_ENABLED = os.getenv('TCL_ENABLED', "True")
17+JPEG_ENABLED = os.getenv('JPEG_ENABLED', "True")
18+ZLIB_ENABLED = os.getenv('ZLIB_ENABLED', "True")
19+TIFF_ENABLED = os.getenv('TIFF_ENABLED', "True")
20+FREETYPE_ENABLED = os.getenv('FREETYPE_ENABLED', "True")
21+LCMS_ENABLED = os.getenv('LCMS_ENABLED', "True")
22
23 # FIXME: add mechanism to explicitly *disable* the use of a library
24
25@@ -220,22 +226,22 @@
26 zlib = jpeg = tiff = freetype = tcl = tk = lcms = None
27 feature = feature()
28
29- if find_include_file(self, "zlib.h"):
30+ if ZLIB_ENABLED == 'True' and find_include_file(self, "zlib.h"):
31 if find_library_file(self, "z"):
32 feature.zlib = "z"
33 elif sys.platform == "win32" and find_library_file(self, "zlib"):
34 feature.zlib = "zlib" # alternative name
35
36- if find_include_file(self, "jpeglib.h"):
37+ if JPEG_ENABLED == 'True' and find_include_file(self, "jpeglib.h"):
38 if find_library_file(self, "jpeg"):
39 feature.jpeg = "jpeg"
40 elif sys.platform == "win32" and find_library_file(self, "libjpeg"):
41 feature.jpeg = "libjpeg" # alternative name
42
43- if find_library_file(self, "tiff"):
44+ if TIFF_ENABLED == 'True' and find_library_file(self, "tiff"):
45 feature.tiff = "tiff"
46
47- if find_library_file(self, "freetype"):
48+ if FREETYPE_ENABLED == 'True' and find_library_file(self, "freetype"):
49 # look for freetype2 include files
50 freetype_version = 0
51 for dir in self.compiler.include_dirs:
52@@ -256,11 +262,11 @@
53 if dir:
54 add_directory(self.compiler.include_dirs, dir, 0)
55
56- if find_include_file(self, "lcms.h"):
57+ if LCMS_ENABLED == 'True' and find_include_file(self, "lcms.h"):
58 if find_library_file(self, "lcms"):
59 feature.lcms = "lcms"
60
61- if _tkinter and find_include_file(self, "tk.h"):
62+ if TCL_ENABLED == 'True' and _tkinter and find_include_file(self, "tk.h"):
63 # the library names may vary somewhat (e.g. tcl84 or tcl8.4)
64 version = TCL_VERSION[0] + TCL_VERSION[2]
65 if find_library_file(self, "tcl" + version):
diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
index de0e975127..e100358d08 100644
--- a/meta/recipes-devtools/python/python-imaging_1.1.7.bb
+++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
@@ -7,23 +7,31 @@ SRCNAME = "Imaging"
7PR = "r5" 7PR = "r5"
8 8
9SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \ 9SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
10 file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch" 10 file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch \
11 file://allow.to.disable.some.features.patch"
11 12
12SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e" 13SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e"
13SRC_URI[sha256sum] = "895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211" 14SRC_URI[sha256sum] = "895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211"
14S = "${WORKDIR}/${SRCNAME}-${PV}" 15S = "${WORKDIR}/${SRCNAME}-${PV}"
15 16
17# There isn't enable/disable option, and lcms is in meta-oe, at least make it explicit when enabled
18# setup.py already has FIXME: add mechanism to explicitly *disable* the use of a library
19PACKAGECONFIG ??= ""
20PACKAGECONFIG[lcms] = ",,lcms"
21
16inherit distutils 22inherit distutils
17 23
18do_compile() { 24do_compile() {
19 export STAGING_LIBDIR=${STAGING_LIBDIR} 25 export STAGING_LIBDIR=${STAGING_LIBDIR}
20 export STAGING_INCDIR=${STAGING_INCDIR} 26 export STAGING_INCDIR=${STAGING_INCDIR}
27 export LCMS_ENABLED=${@base_contains('PACKAGECONFIG', 'lcms', 'True', 'False', d)}
21 distutils_do_compile 28 distutils_do_compile
22} 29}
23 30
24do_install() { 31do_install() {
25 export STAGING_LIBDIR=${STAGING_LIBDIR} 32 export STAGING_LIBDIR=${STAGING_LIBDIR}
26 export STAGING_INCDIR=${STAGING_INCDIR} 33 export STAGING_INCDIR=${STAGING_INCDIR}
34 export LCMS_ENABLED=${@base_contains('PACKAGECONFIG', 'lcms', 'True', 'False', d)}
27 distutils_do_install 35 distutils_do_install
28 install -d ${D}${datadir}/doc/${BPN}/html/ 36 install -d ${D}${datadir}/doc/${BPN}/html/
29 install -m 0644 ${S}/README ${D}${datadir}/doc/${BPN}/ 37 install -m 0644 ${S}/README ${D}${datadir}/doc/${BPN}/