summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qt5.inc
blob: 711ad45ee133fc09535c02f57d825f62df7d62d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright (C) 2012 O.S. Systems Software LTDA.

inherit qmake5_base

# Qt5 is dependent on icu for localization
ICU = "icu "
ICU_powerpc = "pango"

DEPENDS += "virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}"

require qt5_arch.inc

QT_MODULE ?= "${BPN}"

QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
QT_DISTRO_FLAGS_linuxstdbase = "-sm"

# Some can be used only for certain QT_MODULEs, so define them here, 
# but add them to QT_CONFIG_FLAGS e.g. in qtbase.inc
QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite"
QT_GLFLAGS ?= ""
QT_XML ?= "-xmlpatterns"
QT_WEBKIT ?= "-webkit"
QT_PHONON ?= "-phonon"
QT_DBUS ?= "-qdbus"
QT_MULTIMEDIA ?= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', '-pulseaudio', '-no-pulseaudio', d)}"
QT_MODULE_FLAGS ?= ""
QT_NAS ?= "-no-nas-sound"
QT_NIS ?= "-no-nis"
QT_CUPS ?= "-no-cups"
QT_STL ?= "-stl"
QT_SYSTEM_LIBS ?= "-system-libjpeg -system-libpng -system-zlib"
QT_TESTS ?= "-nomake tests"
QT_EXAMPLES ?= "-nomake examples"
QT_DEMOS ?= "-nomake demos"

QT_CONFIG_FLAGS += " \
    -release \
    -reduce-relocations \
    -shared \
    -silent \
    -glib \
    -no-pch \
    -no-rpath \
    -pkg-config \
    ${QT_SYSTEM_LIBS} \
    ${QT_NIS} \
    ${QT_CUPS} \
    ${QT_SQL_DRIVER_FLAGS} \
    ${QT_DISTRO_FLAGS} \
    ${QT_MODULE_FLAGS} \
    ${QT_GLFLAGS} \
    ${QT_TESTS} \
    ${QT_EXAMPLES} \
    ${QT_DEMOS} \
"

SEPB = "${WORKDIR}/build"
B = "${SEPB}"

do_configure() {
    set_arch
    set_endian

    # Avoid problems with the linkers, since we want the linker to be g++
    unset LD

    # Similar logic is in autotools.bbclass
    if [ -d ${B} -a "${S}" != "${B}" ] ; then
        # Existing separate build directory, exists, remove
        rm -rf "${B}/*"
    fi
}

do_compile() {
    unset CFLAGS CXXFLAGS AR

    oe_runmake ${EXTRA_ENV}
}

do_install() {
    oe_runmake install INSTALL_ROOT=${D}
}

PACKAGES =. "${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-tools ${PN}-plugins ${PN}-mkspecs "
FILES_${PN}-tools-dbg = " \
    ${bindir}/${QT_DIR_NAME}/.debug \
    ${bindir}/.debug \
"
FILES_${PN}-plugins-dbg = " \
    ${libdir}/${QT_DIR_NAME}/plugins/*/.debug/* \
    ${libdir}/plugins/*/.debug/* \
"
FILES_${PN}-tools = " \
    ${bindir}/${QT_DIR_NAME}/* \
    ${bindir}/* \
"
FILES_${PN}-plugins = " \
    ${libdir}/${QT_DIR_NAME}/plugins/*/*${SOLIBSDEV} \
    ${libdir}/plugins/*/*${SOLIBSDEV} \
"
FILES_${PN}-mkspecs += "\
    ${libdir}/${QT_DIR_NAME}/mkspecs \
    ${libdir}/mkspecs \
"
FILES_${PN} += " \
    ${libdir}/${QT_DIR_NAME}/lib*${SOLIBS} \
    ${libdir}/lib*${SOLIBS} \
"
FILES_${PN}-dev += " \
    ${libdir}/${QT_DIR_NAME}/pkgconfig \
    ${libdir}/${QT_DIR_NAME}/cmake/* \
    ${libdir}/${QT_DIR_NAME}/*.prl \
    ${libdir}/${QT_DIR_NAME}/*.la \
    ${datadir}/${QT_DIR_NAME}/* \
    ${includedir}/${QT_DIR_NAME}/* \
    ${libdir}/pkgconfig \
    ${libdir}/cmake/* \
    ${libdir}/*.prl \
    ${libdir}/*.la \
    ${datadir}/* \
    ${includedir}/* \
"
FILES_${PN}-dbg += " \
    ${libdir}/${QT_DIR_NAME}/.debug \
    ${libdir}/${QT_DIR_NAME}/lib*${SOLIBSDEV} \
    ${libdir}/.debug \
    ${libdir}/lib*${SOLIBSDEV} \
"
FILES_${PN}-staticdev += " \
    ${libdir}/${QT_DIR_NAME}/*.a \
    ${libdir}/*.a \
"