1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 16:59:22 +00:00

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>
This commit is contained in:
Ross Burton
2016-01-07 21:13:07 +00:00
committed by Richard Purdie
parent 8f2ab19b25
commit 0d5e41f41d
2 changed files with 26 additions and 20 deletions
@@ -0,0 +1,14 @@
Freetype think that it knows best about where libtool is, and explicitly the
libtool autoconf macros telling it where to find the libtool script. Of course
we prefix the script with the target triplet, so it's wrong. Fix this by
removing the forced assignment, so the configure script's knowledge of where it
put libtool is used.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
--- freetype-2.6/builds/unix/unix-cc.in.orig 2016-01-07 19:21:45.244943479 +0000
+++ freetype-2.6/builds/unix/unix-cc.in 2016-01-07 19:21:50.213112131 +0000
@@ -19,1 +18,1 @@
-LIBTOOL := $(FT_LIBTOOL_DIR)/libtool
+LIBTOOL := $(FT_LIBTOOL_DIR)/@LIBTOOL@
+12 -20
View File
@@ -13,48 +13,40 @@ LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=c017ff17fc6f0794adf93db5559ccd56
SECTION = "libs"
SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2"
SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
file://use-right-libtool.patch"
SRC_URI[md5sum] = "5682890cb0267f6671dd3de6eabd3e69"
SRC_URI[sha256sum] = "8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e"
BINCONFIG = "${bindir}/freetype-config"
inherit autotools-brokensep pkgconfig binconfig-disabled multilib_header
inherit autotools pkgconfig binconfig-disabled multilib_header
LIBTOOL = "${S}/builds/unix/${HOST_SYS}-libtool"
EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"
EXTRA_OEMAKE_class-native = ""
EXTRA_OECONF = "--without-zlib --without-bzip2 CC_BUILD='${BUILD_CC}'"
EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
PACKAGECONFIG ??= ""
PACKAGECONFIG ??= "zlib"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
# This results in a circular dependency so enabling is non-trivial
PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
do_configure() {
cd builds/unix
# Need this because although the autotools infrastructure is in
# builds/unix the configure script get written to ${S}, so we can't
# just use AUTOTOOLS_SCRIPT_PATH.
cd ${S}/builds/unix
libtoolize --force --copy
aclocal -I .
gnu-configize --force
autoconf
cd ${S}
cd ${B}
oe_runconf
}
do_configure_class-native() {
(cd builds/unix && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
do_compile_prepend() {
${BUILD_CC} -o objs/apinames src/tools/apinames.c
}
do_install_append() {
oe_multilib_header freetype2/config/ftconfig.h
}
BBCLASSEXTEND = "native"