epkowa/Makefile000644 000423 000000 00000007356 11126262454 014260 0ustar00luigiwheel000000 000000 # New ports collection makefile for: epkowa # Date created: Dec.23, 2008 # Whom: luigi@FreeBSD.org # # Maintainers: Luigi Rizzo # $FreeBSD: $ # # This port builds the sane-epkowa driver for SANE. # # Version 2.11.0 is the last that works without patches, and it is # enough to detect the NX400 scanner. # Version 2.15.0 builds with the attached patches, but then has various # failures at runtime that I am still tracking. This goes for both the # sane backend and the iscan frontend. # # For reference, the standard SANE backends are accessible through cvs as # cvs co -z3 -d:pserver:anonymous@cvs.alioth.debian.org:/cvsroot/sane co sane-backends # # The source for this program is accessible at # # http://www.avasys.jp/lx-bin2/linux_e/spc/DL1.do#download # # The download interface requests to fill a form, and returns the most # recent version of the software. However, the license is GPL-like, and the # documentation coming with the code (README, non-free/AVASYSPL.en.txt) # explicitly mentions that source redistribution is allowed. # # Earlier versions of the code are available at the following addresses: # http://linux.avasys.jp/drivers/iscan/2.15.0/iscan_2.15.0-3.tar.gz # http://lx1.avasys.jp/iscan/2.7.0/iscan-2.7.0-1.c2.tar.gz # http://lx1.avasys.jp/iscan/2.8.0/iscan-2.8.0-1.c2.tar.gz # -- unknown URL for version 2.9.0 # http://lx1.avasys.jp/iscan/2.10.0/iscan_2.10.0-1.tar.gz # http://lx1.avasys.jp/iscan/2.11.0/iscan_2.11.0-1.tar.gz # http://lx1.avasys.jp/iscan/2.12.0/iscan_2.12.0-4.tar.gz # --- version 2.13 never released # http://lx1.avasys.jp/iscan/2.14.0/iscan_2.14.0-3.tar.gz # http://lx1.avasys.jp/iscan/2.15.0/iscan_2.15.0-3.tar.gz # # Version 2.7.0 to 2.11.0 build on FreeBSD without any patch, # newer versions require changes similar to those in this port. PORTNAME= epkowa PORTVERSION= 2.11.0 CATEGORIES= graphics MASTER_SITES= http://lx1.avasys.jp/iscan/${PORTVERSION}/ DISTFILES= iscan_${PORTVERSION}-1${EXTRACT_SUFX} # use the following two lines for 2.15.0 # MASTER_SITES= http://linux.avasys.jp/drivers/iscan/${PORTVERSION}/ # # DISTFILES= iscan_${PORTVERSION}-3${EXTRACT_SUFX} # following two for 2.11.0 WRKSRC=${WRKDIR}/iscan-${PORTVERSION} EXTRACT_SUFX= .tar.gz MAINTAINER= luigi@FreeBSD.org COMMENT= epkowa sane driver for FreeBSD MAN5= sane-epkowa.5 # We use LIB_DEPENDS, but the dependency is also at build time LIB_DEPENDS+= ltdl:${PORTSDIR}/devel/libltdl15 LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb LIB_DEPENDS+= getline:${PORTSDIR}/devel/libgetline #BUILD_DEPENDS+= ${LOCALBASE}/lib/libltdl.so:${PORTSDIR}/devel/libltdl15 # The original uses gmake and ./configure # Also pass appropriate flags to configure to use FreeBSD locations. USE_GMAKE= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --prefix=/usr/local LDFLAGS="-L/usr/local/lib -lgetline" CPPFLAGS=-I/usr/local/include .include .if $(PORTVERSION) != "2.15.0" do-patch: # nothing to do do-build: ( cd ${WRKSRC}/libltdl ; gmake ) ( cd ${WRKSRC}/sanei ; gmake ) ( cd ${WRKSRC}/backend ; gmake ) ( cd ${WRKSRC}/doc ; gmake ) .else .warning new version, not working yet # The non-free library does not link with FreeBSD unless you remove # versioned symbols. post-patch: ( cd ${WRKSRC}/non-free; cp -p libesmod-i386.so x.so; \ objcopy -R .gnu.version x.so libesmod-i386.so ) # only build the backend part do-build: ( cd ${WRKSRC}/backend ; gmake ) ( cd ${WRKSRC}/doc ; gmake ) .endif do-install: @${INSTALL_MAN} ${WRKSRC}/doc/sane-epkowa.5 ${PREFIX}/man/man5 @${INSTALL_DATA} ${WRKSRC}/backend/.libs/libsane-epkowa.so.1 \ ${PREFIX}/lib/sane/ @(cd ${PREFIX}/lib/sane; ${LN} -s libsane-epkowa.so.1 libsane-epkowa.so ) @echo "usb /dev/uscanner0" > ${PREFIX}/etc/sane.d/epkowa.conf @echo "epkowa" >> ${PREFIX}/etc/sane.d/dll.conf .include epkowa/pkg-descr000644 000423 000000 00000000061 11125120344 014372 0ustar00luigiwheel000000 000000 A SANE scanner driver for various Epson scanners epkowa/distinfo000644 000423 000000 00000000310 11125251200 014323 0ustar00luigiwheel000000 000000 MD5 (iscan_2.11.0-1.tar.gz) = 76991cb47dc8ff1269e47d4bce3d41b5 SHA256 (iscan_2.11.0-1.tar.gz) = ae0a72647acfa4cedc320e280014d3cdf8d61c0f4e2a7e941697cf2f36bed0a8 SIZE (iscan_2.11.0-1.tar.gz) = 1458880 epkowa/pkg-plist000644 000423 000000 00000000206 11126262454 014440 0ustar00luigiwheel000000 000000 etc/sane.d/epkowa.conf lib/sane/libsane-epkowa.so lib/sane/libsane-epkowa.so.1 @unexec sed -I -e '/^epkowa$/d' %D/etc/sane.d/dll.conf epkowa/files/patch-01000644 000423 000000 00000007236 11124666247 015165 0ustar00luigiwheel000000 000000 diff -ubwr ../iscan-2.15.0.orig/backend/backend.h ./backend/backend.h --- ../iscan-2.15.0.orig/backend/backend.h 2008-12-08 02:11:49.000000000 +0100 +++ ./backend/backend.h 2008-12-25 11:32:46.000000000 +0100 @@ -74,6 +74,7 @@ #include #endif +#include /* snprintf */ #include diff -ubwr ../iscan-2.15.0.orig/backend/channel-net.c ./backend/channel-net.c --- ../iscan-2.15.0.orig/backend/channel-net.c 2008-12-08 02:11:49.000000000 +0100 +++ ./backend/channel-net.c 2008-12-25 11:35:29.000000000 +0100 @@ -75,6 +75,7 @@ #include "channel.h" #include +#include /* INADDR_LOOPBACK on FreeBSD */ #include #include #include diff -ubwr ../iscan-2.15.0.orig/backend/defines.h ./backend/defines.h --- ../iscan-2.15.0.orig/backend/defines.h 2008-12-08 02:11:49.000000000 +0100 +++ ./backend/defines.h 2008-12-25 11:33:07.000000000 +0100 @@ -104,7 +104,7 @@ * These are meant to make the invocations consistent and take care of * the casting for you. */ -#include +//#include #include #define t_alloca(sz,t) ((t *) alloca ((sz) * sizeof (t))) diff -ubwr ../iscan-2.15.0.orig/backend/epkowa.h ./backend/epkowa.h --- ../iscan-2.15.0.orig/backend/epkowa.h 2008-12-08 02:11:49.000000000 +0100 +++ ./backend/epkowa.h 2008-12-25 11:34:09.000000000 +0100 @@ -274,6 +274,7 @@ typedef struct Epson_Scanner Epson_Scanner; #include /* for u_char */ +#include /* for u_char */ typedef struct { diff -ubwr ../iscan-2.15.0.orig/backend/net-obj.c ./backend/net-obj.c --- ../iscan-2.15.0.orig/backend/net-obj.c 2008-12-08 02:11:49.000000000 +0100 +++ ./backend/net-obj.c 2008-12-25 11:34:47.000000000 +0100 @@ -73,6 +73,7 @@ #include #include #include +#include /* SIGHUP on FreeBSD */ #include #include "defines.h" diff -ubwr ../iscan-2.15.0.orig/lib/basic-imgstream.cc ./lib/basic-imgstream.cc --- ../iscan-2.15.0.orig/lib/basic-imgstream.cc 2008-12-08 02:11:49.000000000 +0100 +++ ./lib/basic-imgstream.cc 2008-12-25 11:31:39.000000000 +0100 @@ -34,7 +34,7 @@ #include "basic-imgstream.hh" #include -#include +//#include namespace iscan { @@ -175,6 +175,7 @@ const char *path = NULL; +#if 0 if ((path = lt_dlgetsearchpath ()) && 0 != argz_add_sep (&pathz, &length, path, delimiter)) { @@ -195,6 +196,10 @@ { is_pathz_ok = false; } +#else +is_pathz_ok = false; +#define argz_next(a,b,c) NULL +#endif } if (is_pathz_ok) @@ -204,7 +209,7 @@ && (dir_name = argz_next (pathz, length, dir_name))) { struct dirent **match = NULL; - int count = scandir (dir_name, &match, selector, reversionsort); + int count = scandir (dir_name, &match, (int (*)(dirent*))selector, reversionsort); for (int i = 0; !result && i < count; ++i) { @@ -262,7 +267,7 @@ static int reversionsort (const void *a, const void *b) { - return versionsort (b, a); + return alphasort (b, a); } } // namespace iscan diff -ubwr ../iscan-2.15.0.orig/non-free/Makefile.in ./non-free/Makefile.in --- ../iscan-2.15.0.orig/non-free/Makefile.in 2008-12-08 02:12:08.000000000 +0100 +++ ./non-free/Makefile.in 2008-12-25 11:36:04.000000000 +0100 @@ -404,7 +404,7 @@ checksum: $(srcdir)/checksums.md5 @(cd $(