Hello, this patch upgrades libinklevel to 0.8.0rc2 for better printer support (in my case, the Canon MP530 :-). It also fixes the default location for usb printers to /dev/lpx instead of /dev/usb/lpx. Tested with uClibc 0.9.30.1 on an Asus WL-500gP with a recent trunk. One thing I am not sure about is whether I correctly removed the check for ieee1384 in the configure file without breaking build with parallel port support enabled.
Regards, Jonas Gorski -- Index: libs/libinklevel/patches/003-fix_usb_device_location.patch =================================================================== --- libs/libinklevel/patches/003-fix_usb_device_location.patch (revision 0) +++ libs/libinklevel/patches/003-fix_usb_device_location.patch (revision 0) @@ -0,0 +1,20 @@ +--- a/linux.c ++++ b/linux.c +@@ -83,7 +83,7 @@ int get_device_id(const int port, const + if (port == USB || port == CUSTOM_USB) { + + if (port == USB) { +- sprintf(device_file1, "/dev/usb/lp%d", portnumber); ++ sprintf(device_file1, "/dev/lp%d", portnumber); + sprintf(device_file2, "/dev/usblp%d", portnumber); + fd = open(device_file1, O_RDONLY); + if (fd == -1) { +@@ -143,7 +143,7 @@ int open_printer_device(const int port, + int fd; + + if (port == USB) { +- sprintf(device_file1, "/dev/usb/lp%d", portnumber); ++ sprintf(device_file1, "/dev/lp%d", portnumber); + sprintf(device_file2, "/dev/usblp%d", portnumber); + #ifdef WITH_PARPORT + } else if (port == PARPORT) { Index: libs/libinklevel/patches/001-makefile.patch =================================================================== --- libs/libinklevel/patches/001-makefile.patch (revision 15423) +++ libs/libinklevel/patches/001-makefile.patch (working copy) @@ -1,21 +0,0 @@ ---- libinklevel-0.7.3.orig/Makefile 2008-12-10 17:09:05.052017664 +0100 -+++ libinklevel-0.7.3/Makefile 2008-12-10 19:40:44.904051107 +0100 -@@ -1,7 +1,7 @@ --DESTDIR = --PREFIX = /usr/local --CFLAGS += -Wall -O2 -fPIC -DPIC -I. --CC = gcc -+#DESTDIR = -+PREFIX = /usr -+#CFLAGS += -Wall -O2 -fPIC -DPIC -I. -+#CC = gcc - - all: libinklevel.so.4.0.7.3 - -@@ -36,5 +36,5 @@ libinklevel.so.4.0.7.3: canon.o d4lib.o - linux.o util.o - $(CC) $(CFLAGS) -shared -Wl,-soname,libinklevel.so.4 \ - -o libinklevel.so.4.0.7.3 canon.o d4lib.o epson_new.o \ -- hp_new.o libinklevel.o linux.o util.o -lc -lieee1284 -+ hp_new.o libinklevel.o linux.o util.o $(LIBS) - Index: libs/libinklevel/patches/001-configure.patch =================================================================== --- libs/libinklevel/patches/001-configure.patch (revision 0) +++ libs/libinklevel/patches/001-configure.patch (revision 0) @@ -0,0 +1,247 @@ +--- a/configure ++++ b/configure +@@ -12028,7 +12028,7 @@ fi + ## Check for optional header files + + +-for ac_header in ifaddrs.h ieee1284.h ++for ac_header in ifaddrs.h + do + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +@@ -13648,235 +13648,6 @@ case $host in + cat >>confdefs.h <<_ACEOF + #define HOST_OS LINUX + _ACEOF +- +- +-for ac_header in ieee1284.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-else +- { { $as_echo "$as_me:$LINENO: error: ( required header file ieee1284.h missing)" >&5 +-$as_echo "$as_me: error: ( required header file ieee1284.h missing)" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +-done +- +- +-{ $as_echo "$as_me:$LINENO: checking for ieee1284_open in -lieee1284" >&5 +-$as_echo_n "checking for ieee1284_open in -lieee1284... " >&6; } +-if test "${ac_cv_lib_ieee1284_ieee1284_open+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lieee1284 $LIBS" +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char ieee1284_open (); +-int +-main () +-{ +-return ieee1284_open (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_lib_ieee1284_ieee1284_open=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_ieee1284_ieee1284_open=no +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee1284_ieee1284_open" >&5 +-$as_echo "$ac_cv_lib_ieee1284_ieee1284_open" >&6; } +-if test "x$ac_cv_lib_ieee1284_ieee1284_open" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBIEEE1284 1 +-_ACEOF +- +- LIBS="-lieee1284 $LIBS" +- +-else +- { { $as_echo "$as_me:$LINENO: error: Library not found" >&5 +-$as_echo "$as_me: error: Library not found" >&2;} +- { (exit 1); exit 1; }; } +-fi + ;; + + *-*-solaris2.*) Index: libs/libinklevel/Makefile =================================================================== --- libs/libinklevel/Makefile (revision 15423) +++ libs/libinklevel/Makefile (working copy) @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libinklevel -PKG_VERSION:=0.7.3 +PKG_VERSION:=0.8.0rc2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=...@sf/libinklevel -PKG_MD5SUM:=c7ccefec29d1d218d1aae240f6044fe1 +PKG_MD5SUM:=91ef91dd5c6338789ad5ae85134d7d0a include $(INCLUDE_DIR)/package.mk _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel