prboom: re-add big endian fixup
authorPeter Korsgaard <jacmet@sunsite.dk>
Thu, 14 Oct 2010 19:40:47 +0000 (21:40 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 14 Oct 2010 19:40:47 +0000 (21:40 +0200)
Seems I misread configure.ac, the endianness detection is only used when
not cross compiling.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/games/prboom/prboom.mk

index a8c7f6548b5632e8e9018121d044cb340b81c800..3a50fd502f667c67120c1ad110689921483c9dfc 100644 (file)
@@ -19,6 +19,16 @@ PRBOOM_CONF_OPT = \
                --disable-sdltest \
                --disable-gl
 
+# endianness detection isn't used when cross compiling
+define PRBOOM_BIG_ENDIAN_FIXUP
+       $(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \
+               $(PRBOOM_DIR)/config.h
+endef
+
+ifeq ($(BR2_ENDIAN),"BIG")
+PRBOOM_POST_CONFIGURE_HOOKS += PRBOOM_BIG_ENDIAN_FIXUP
+endif
+
 define PRBOOM_INSTALL_TARGET_CMDS
        $(INSTALL) -D $(@D)/src/prboom $(TARGET_DIR)/usr/games/prboom
        $(INSTALL) -D $(@D)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server