xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-support/fltk/fltk.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunrequire ${BPN}.inc
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunDEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
4*4882a593Smuzhiyun
5*4882a593Smuzhiyuninherit features_check binconfig lib_package gtk-icon-cache mime mime-xdg
6*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunSRC_URI += "file://0003-fluid-CMakeLists.txt-Do-not-export-fluid-target.patch"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunEXTRA_OECMAKE = " \
11*4882a593Smuzhiyun    -DOPTION_BUILD_SHARED_LIBS=ON \
12*4882a593Smuzhiyun    -DOPTION_USE_THREADS=ON \
13*4882a593Smuzhiyun    -DFLTK_BUILD_TEST=OFF \
14*4882a593Smuzhiyun    -DOPTION_USE_XDBE=ON \
15*4882a593Smuzhiyun    -DOPTION_USE_XFT=ON \
16*4882a593Smuzhiyun    -DFLTK_CONFIG_PATH=${libdir}/cmake \
17*4882a593Smuzhiyun"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunPACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
22*4882a593SmuzhiyunPACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
23*4882a593SmuzhiyunPACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
24*4882a593SmuzhiyunPACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
25*4882a593SmuzhiyunPACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor"
26*4882a593Smuzhiyun
27*4882a593Smuzhiyundo_install:append() {
28*4882a593Smuzhiyun    sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/fltk-config
29*4882a593Smuzhiyun}
30*4882a593Smuzhiyun
31*4882a593Smuzhiyunpython populate_packages:prepend () {
32*4882a593Smuzhiyun    if (d.getVar('DEBIAN_NAMES')):
33*4882a593Smuzhiyun        d.setVar('PKG:${BPN}', 'libfltk${PV}')
34*4882a593Smuzhiyun}
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunLEAD_SONAME = "libfltk.so"
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun# .desktop / icons / mime only necessary for fluid app
39*4882a593SmuzhiyunFILES:${PN}-bin += " \
40*4882a593Smuzhiyun    ${datadir}/applications \
41*4882a593Smuzhiyun    ${datadir}/icons \
42*4882a593Smuzhiyun    ${datadir}/mime \
43*4882a593Smuzhiyun"
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun# cmake files
46*4882a593SmuzhiyunFILES:${PN}-dev += "${datadir}/fltk"
47