Skip to contentSkip to conversation

package/evilwm: convert to generic-package to fix build

PATCH New Thomas Petazzoni via buildroot 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/evilwm: convert to generic-package to fix build

The ./configure script of evilwm is not an autotools-based configure script, it's an ersatz of configure script that generates a config.mk. Unfortunately, it assumes that the value passed to --host= is the prefix of the cross-compiler, which is not necessarily the case, for example when external toolchains are used in Buildroot.

This causes build failures such as:

make[1]: s390x-buildroot-linux-gnu-gcc: No such file or directory

To fix this issue, we stop using autotools-package and instead implement a basic generic-package whose configure step simply creates config.mk with the right variables.

Fixes:

https://autobuild.buildroot.net/results/25040ce7e94acf8f92c24db895d7dea081de1d7a/

---
 package/evilwm/evilwm.mk | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
package/evilwm/evilwm.mk +13 -4
index 78b531095b..5e86e1a00a 100644
@@ -11,11 +11,20 @@ EVILWM_LICENSE_FILES = README
 
 EVILWM_DEPENDENCIES = xlib_libX11 xlib_libXrandr
 
-define EVILWM_INSTALL_XSESSION_FILE
+define EVILWM_CONFIGURE_CMDS
+	echo "CC = $(TARGET_CC)" > $(@D)/config.mk
+	echo "CFLAGS = $(TARGET_CFLAGS)" >> $(@D)/config.mk
+	echo "LDFLAGS = $(TARGET_LDFLAGS)" >> $(@D)/config.mk
+endef
+
+define EVILWM_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define EVILWM_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
 	$(INSTALL) -m 0755 -D package/evilwm/xsession \
 		$(TARGET_DIR)/root/.xsession
 endef
 
-EVILWM_POST_INSTALL_TARGET_HOOKS += EVILWM_INSTALL_XSESSION_FILE
-
-$(eval $(autotools-package))
+$(eval $(generic-package))
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot