Hi, I need some help while porting xz to openwrt. This is actually my first package to port.
Xz is a command line tool and library for lzma compression. I took the bzip2 Makefile as a template. This is what I have so far: ------------------------------------------------------------------------------------- include $(TOPDIR)/rules.mk PKG_NAME:=xz PKG_VERSION:=4.999.9beta PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://tukaani.org/xz PKG_MD5SUM:=f2073579b6da2fe35d453adee1aaf1b2 include $(INCLUDE_DIR)/package.mk define Package/xz SECTION:=utils CATEGORY:=Utilities DEPENDS:= TITLE:=xz utils URL:=http://tukaani.org/ endef define Build/Configure $(call Build/Configure/Default, \ CFLAGS="$(TARGET_CFLAGS) -std=c99" ) endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,la,so*} $(1)/usr/lib/ endef define Package/xz/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ endef $(eval $(call BuildPackage,xz)) ------------------------------------------------------------------------------------- There are several problems I'm working on. Mainly of course, that it does not work. It looks like as configure do not work properly. When building I get: ../../libtool: line 46: -c: command not found And this is what libtool on line 46 tells: AS=mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit- at-a-time -fhonour-copts -msoft-float It neither look like the correct assembler nor it is valid shell code. Another problem is, that configure fails to check for a C99 compatible compiler. Therefore I added this CFLAGS="$(TARGET_CFLAGS) -std=c99" to the configure flags. But when looking at configure.ac I can find AC_PROG_CC_C99. It works correctly on my host machine which adds -std=gnu99 to the compiler flags. Any ideas? Tommi _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
