blob: 82007c4cf4e5f803aebfb417df8f07f6d2ed372e [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001require ${BPN}.inc
2
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003DEPENDS = "alsa-lib zlib jpeg libpng libxext libxft"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05004
Andrew Geissler82c905d2020-04-13 13:39:40 -05005inherit features_check binconfig lib_package gtk-icon-cache mime mime-xdg
Brad Bishop316dfdd2018-06-25 12:45:53 -04006REQUIRED_DISTRO_FEATURES = "x11"
7
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05008SRC_URI += "file://0003-fluid-CMakeLists.txt-Do-not-export-fluid-target.patch"
9
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010EXTRA_OECMAKE = " \
11 -DOPTION_BUILD_SHARED_LIBS=ON \
12 -DOPTION_USE_THREADS=ON \
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070013 -DFLTK_BUILD_TEST=OFF \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014 -DOPTION_USE_XDBE=ON \
15 -DOPTION_USE_XFT=ON \
16 -DFLTK_CONFIG_PATH=${libdir}/cmake \
17"
18
19PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
20
Brad Bishop316dfdd2018-06-25 12:45:53 -040021PACKAGECONFIG[cairo] = "-DOPTION_CAIRO=ON,-DOPTION_CAIRO=OFF,cairo"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
23PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
24PACKAGECONFIG[xfixes] = "-DOPTION_USE_XFIXES=ON,-DOPTION_USE_XFIXES=OFF,libxfixes"
25PACKAGECONFIG[xcursor] = "-DOPTION_USE_XCURSOR=ON,-DOPTION_USE_XCURSOR=OFF,libxcursor"
26
Patrick Williams213cb262021-08-07 19:21:33 -050027do_install:append() {
Andrew Geissler87f5cff2022-09-30 13:13:31 -050028 sed -i -e 's,${TMPDIR},,g' ${D}${bindir}/fltk-config
29 sed -i -e 's,${TMPDIR},,g' ${D}${datadir}/fltk/UseFLTK.cmake
30 sed -i -e 's,${TMPDIR},,g' ${D}${datadir}/fltk/FLTK-Targets.cmake
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031}
32
Patrick Williams213cb262021-08-07 19:21:33 -050033python populate_packages:prepend () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034 if (d.getVar('DEBIAN_NAMES')):
Patrick Williams213cb262021-08-07 19:21:33 -050035 d.setVar('PKG:${BPN}', 'libfltk${PV}')
Brad Bishop6e60e8b2018-02-01 10:27:11 -050036}
37
38LEAD_SONAME = "libfltk.so"
39
Brad Bishop316dfdd2018-06-25 12:45:53 -040040# .desktop / icons / mime only necessary for fluid app
Patrick Williams213cb262021-08-07 19:21:33 -050041FILES:${PN}-bin += " \
Brad Bishop316dfdd2018-06-25 12:45:53 -040042 ${datadir}/applications \
43 ${datadir}/icons \
44 ${datadir}/mime \
45"
46
47# cmake files
Patrick Williams213cb262021-08-07 19:21:33 -050048FILES:${PN}-dev += "${datadir}/fltk"