diff options
author | Ross Burton <ross.burton@intel.com> | 2016-01-07 21:13:07 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-11 23:26:30 +0000 |
commit | 0d5e41f41d28b6a7ce7468145fc86c59ecb424f9 (patch) | |
tree | 7e2fe10c794a69e8df3718294df327ae79ec4566 /meta | |
parent | 8f2ab19b25d3cade519e2f4c1e437c1597cec09d (diff) | |
download | poky-0d5e41f41d28b6a7ce7468145fc86c59ecb424f9.tar.gz |
freetype: enable out-of-tree builds, and use host zlib
Add a few ${S} and ${B} to make out of tree builds work, and stop using
autotools-brokensep. Annoyingly we still need to use a custom do_configure so
add a comment explaining why so someone else doesn't spend 30 minutes trying to
make it work.
Whilst here add a small patch so we don't need to tell the build where libtool
is, and remove class-native do_configure as it doesn't appear to be required
anymore.
At this point I started to get carried away.
The do_compile_prepend is redundant now that configure is being told what
compiler to use for build tools, so remove that.
Instead of using the integrated zlib fork, add a PACKAGECONFIG to use the zlib
we build and enable that by default. Also add a disabled PACKAGECONFIG for
bzip2 support.
(From OE-Core rev: 80b53d9366455f5e9f654fee53c685aa8fd365e7)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/freetype/freetype/use-right-libtool.patch | 14 | ||||
-rw-r--r-- | meta/recipes-graphics/freetype/freetype_2.6.bb | 32 |
2 files changed, 26 insertions, 20 deletions
diff --git a/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch b/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch new file mode 100644 index 0000000000..20838813dc --- /dev/null +++ b/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Freetype think that it knows best about where libtool is, and explicitly the | ||
2 | libtool autoconf macros telling it where to find the libtool script. Of course | ||
3 | we prefix the script with the target triplet, so it's wrong. Fix this by | ||
4 | removing the forced assignment, so the configure script's knowledge of where it | ||
5 | put libtool is used. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
9 | |||
10 | --- freetype-2.6/builds/unix/unix-cc.in.orig 2016-01-07 19:21:45.244943479 +0000 | ||
11 | +++ freetype-2.6/builds/unix/unix-cc.in 2016-01-07 19:21:50.213112131 +0000 | ||
12 | @@ -19,1 +18,1 @@ | ||
13 | -LIBTOOL := $(FT_LIBTOOL_DIR)/libtool | ||
14 | +LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@ | ||
diff --git a/meta/recipes-graphics/freetype/freetype_2.6.bb b/meta/recipes-graphics/freetype/freetype_2.6.bb index 70599c67a9..17ab1c87a7 100644 --- a/meta/recipes-graphics/freetype/freetype_2.6.bb +++ b/meta/recipes-graphics/freetype/freetype_2.6.bb | |||
@@ -13,48 +13,40 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=c017ff17fc6f0794adf93db5559ccd56 | |||
13 | 13 | ||
14 | SECTION = "libs" | 14 | SECTION = "libs" |
15 | 15 | ||
16 | SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2" | 16 | SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \ |
17 | file://use-right-libtool.patch" | ||
17 | SRC_URI[md5sum] = "5682890cb0267f6671dd3de6eabd3e69" | 18 | SRC_URI[md5sum] = "5682890cb0267f6671dd3de6eabd3e69" |
18 | SRC_URI[sha256sum] = "8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e" | 19 | SRC_URI[sha256sum] = "8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e" |
19 | 20 | ||
20 | BINCONFIG = "${bindir}/freetype-config" | 21 | BINCONFIG = "${bindir}/freetype-config" |
21 | 22 | ||
22 | inherit autotools-brokensep pkgconfig binconfig-disabled multilib_header | 23 | inherit autotools pkgconfig binconfig-disabled multilib_header |
23 | 24 | ||
24 | LIBTOOL = "${S}/builds/unix/${HOST_SYS}-libtool" | 25 | EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'" |
25 | EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'" | ||
26 | EXTRA_OEMAKE_class-native = "" | ||
27 | EXTRA_OECONF = "--without-zlib --without-bzip2 CC_BUILD='${BUILD_CC}'" | ||
28 | TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64" | 26 | TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64" |
29 | 27 | ||
30 | 28 | PACKAGECONFIG ??= "zlib" | |
31 | PACKAGECONFIG ??= "" | 29 | PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2" |
30 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" | ||
32 | PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng" | 31 | PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng" |
33 | # This results in a circular dependency so enabling is non-trivial | 32 | # This results in a circular dependency so enabling is non-trivial |
34 | PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz" | 33 | PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz" |
35 | 34 | ||
36 | do_configure() { | 35 | do_configure() { |
37 | cd builds/unix | 36 | # Need this because although the autotools infrastructure is in |
37 | # builds/unix the configure script get written to ${S}, so we can't | ||
38 | # just use AUTOTOOLS_SCRIPT_PATH. | ||
39 | cd ${S}/builds/unix | ||
38 | libtoolize --force --copy | 40 | libtoolize --force --copy |
39 | aclocal -I . | 41 | aclocal -I . |
40 | gnu-configize --force | 42 | gnu-configize --force |
41 | autoconf | 43 | autoconf |
42 | cd ${S} | 44 | cd ${B} |
43 | oe_runconf | ||
44 | } | ||
45 | |||
46 | do_configure_class-native() { | ||
47 | (cd builds/unix && gnu-configize) || die "failure running gnu-configize" | ||
48 | oe_runconf | 45 | oe_runconf |
49 | } | 46 | } |
50 | 47 | ||
51 | do_compile_prepend() { | ||
52 | ${BUILD_CC} -o objs/apinames src/tools/apinames.c | ||
53 | } | ||
54 | |||
55 | do_install_append() { | 48 | do_install_append() { |
56 | oe_multilib_header freetype2/config/ftconfig.h | 49 | oe_multilib_header freetype2/config/ftconfig.h |
57 | } | 50 | } |
58 | 51 | ||
59 | BBCLASSEXTEND = "native" | 52 | BBCLASSEXTEND = "native" |
60 | |||