1SUMMARY = "F Virtual Window Manager "
2HOMEPAGE = "http://www.fvwm.org/"
3SECTION = "x11/wm"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://COPYING;md5=f8204787357db6ea518dcc9b6cf08388"
6
7DEPENDS = " \
8    bison-native \
9    flex-native \
10    freetype-native \
11    gettext-native \
12    libxslt-native \
13    fontconfig \
14    libice \
15    libpng \
16    librsvg \
17    libsm \
18    libxau \
19    libxcb \
20    libxcursor \
21    libxdmcp \
22    libxext \
23    libxfixes \
24    libxft \
25    libxinerama \
26    libxml2 \
27    libxrender \
28    libxt \
29    virtual/libx11 \
30    xrandr \
31    zlib \
32"
33
34SRC_URI = " \
35    git://github.com/fvwmorg/fvwm.git;protocol=https;branch=master \
36    file://0001-Fix-compilation-for-disabled-gnome.patch \
37    file://0001-configure-Do-not-require-support-for-implicit-ints.patch \
38    file://0002-acinclude.m4-Add-missing-unistd.h-to-AM_SAFETY_CHECK.patch \
39    file://0003-configure-Further-defang-the-Werror-check.patch \
40"
41
42SRCREV = "7baf540e56fb1a3e91752acba872a88543529d46"
43
44S = "${WORKDIR}/git"
45
46inherit autotools gettext update-alternatives pkgconfig python3native perlnative features_check
47# depends on virtual/libx11
48REQUIRED_DISTRO_FEATURES = "x11"
49
50ALTERNATIVE:${PN} = "x-window-manager"
51ALTERNATIVE_TARGET[x-window-manager] = "${bindir}/fvwm"
52ALTERNATIVE_PRIORITY[x-window-manager] = "20"
53
54EXTRA_OECONF = " \
55    --disable-bidi \
56    --disable-fontconfigtest \
57    --disable-htmldoc \
58    --disable-imlibtest \
59    --disable-nls \
60    --disable-perllib \
61    --disable-rsvg \
62    --disable-shape \
63    --disable-sm \
64    --disable-xfttest \
65    --with-imlib-exec-prefix=/nonexistent \
66    --with-imlib-prefix=/nonexistent \
67    --without-ncurses-library \
68    --without-readline-library \
69    --without-rplay-library \
70    --without-stroke-library \
71    --without-termcap-library \
72    --without-xpm-library \
73    ac_cv_func_mkstemp=no \
74    has_safety_mkstemp=yes \
75"
76
77# show the exact commands in the log file
78EXTRA_OEMAKE = " \
79    V=1 \
80"
81# clang treats them as errors by default now starting with 15.0+
82CFLAGS += "-Wno-error=int-conversion -Wno-error=implicit-int"
83
84do_install:append() {
85    install -d -m 0755 ${D}/${sysconfdir}/xdg/fvwm
86    # You can install the config file here
87
88    install -d -m 0755 ${D}/${datadir}/fvwm
89    touch ${D}/${datadir}/fvwm/ConfigFvwmDefaults
90    sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${bindir}/fvwm-*
91    sed -i -e 's:${STAGING_BINDIR_NATIVE}/perl-native/perl:${USRBINPATH}/env perl:g' ${D}${libexecdir}/fvwm/*/Fvwm*
92    sed -i -e 's:${STAGING_BINDIR_NATIVE}/python3-native/python3:${USRBINPATH}/env python3:g' ${D}${bindir}/fvwm-menu-desktop
93}
94
95# the only needed packages (note: locale packages are automatically generated
96# as well)
97PACKAGES = " \
98    ${PN} \
99    ${PN}-extra \
100    ${PN}-doc \
101    ${PN}-dbg \
102"
103
104# minimal set of binaries
105FILES:${PN} = " \
106    ${bindir}/fvwm \
107    ${bindir}/fvwm-root \
108    ${datadir}/fvwm/ConfigFvwmDefaults \
109"
110
111FILES:${PN}-extra = " \
112    ${bindir} \
113    ${libexecdir} \
114    ${sysconfdir}/xdg/fvwm \
115"
116FILES:${PN}-doc = " \
117    ${mandir} \
118    ${datadir}/fvwm \
119"
120RDEPENDS:${PN} = " \
121    xuser-account \
122"
123RDEPENDS:${PN}-extra += "\
124    perl \
125    python3-core \
126"
127