From 67ac56b15ba4b6dd8ce060308b608d394f48a753 Mon Sep 17 00:00:00 2001 From: Xiangfu Date: Mon, 18 Jun 2012 20:25:54 +0800 Subject: [PATCH] urjtag: compile fine with disable inb outb should be some replace code on inb/outb not just define them as 0 --- urjtag/Makefile | 9 ++++-- urjtag/patches/0001-disable-inb-outb.patch | 34 ++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 urjtag/patches/0001-disable-inb-outb.patch diff --git a/urjtag/Makefile b/urjtag/Makefile index 1cb2bf9..9369ad6 100644 --- a/urjtag/Makefile +++ b/urjtag/Makefile @@ -26,7 +26,7 @@ define Package/urjtag CATEGORY:=Utilities TITLE:=Urjtag URL:=http://urjtag.org/ - DEPENDS:=+libusb-1.0 +libftdi $(INTL_DEPENDS) + DEPENDS:=+libusb +libusb-1.0 +libftdi $(INTL_DEPENDS) +libreadline +libncurses endef TARGET_CFLAGS += $(INTL_CFLAGS) @@ -41,7 +41,12 @@ CONFIGURE_ARGS += --with-libusb --with-libftdi --without-ftd2xx \ define Package/urjtag/install $(INSTALL_DIR) \ $(1)/usr/bin/ \ - $(1)/usr/share/urjtag/ + $(1)/usr/share/urjtag/ \ + $(1)/usr/lib/liburjtag/ + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jtag $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/urjtag/* $(1)/usr/share/urjtag/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liburjtag.so.* $(1)/usr/lib/liburjtag/ endef $(eval $(call BuildPackage,urjtag)) diff --git a/urjtag/patches/0001-disable-inb-outb.patch b/urjtag/patches/0001-disable-inb-outb.patch new file mode 100644 index 0000000..0a1a507 --- /dev/null +++ b/urjtag/patches/0001-disable-inb-outb.patch @@ -0,0 +1,34 @@ +diff --git a/urjtag/src/tap/parport/direct.c b/urjtag/src/tap/parport/direct.c +index 10bea4d..2be15b8 100644 +--- a/urjtag/src/tap/parport/direct.c ++++ b/urjtag/src/tap/parport/direct.c +@@ -37,6 +37,20 @@ + #include + #include "../parport.h" + ++#ifdef __linux__ ++#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) \ ++|| defined(__powerpc__) || defined(__s390__) || defined(__s390x__)\ ++|| defined(__mips__) || defined(__mc68000__) || defined(__sh__) ++ ++#define NO_SYSIO ++ ++#define inb(foo) 0 ++#define outb(foo,bar) 0 ++ ++#endif /* architechtures */ ++#endif /* __linux__ */ ++ ++ + #if defined(HAVE_INPOUTXX) + + static HINSTANCE inpout32_dll_handle = NULL; +@@ -50,7 +64,7 @@ static outfuncPtr Out32; + #define inb(p) (Inp32)(p) + #define outb(d,p) (Out32)(p,d) + +-#elif defined(HAVE_IOPERM) ++#elif defined(HAVE_IOPERM) && !defined(NO_SYSIO) + + #include +