Would there be any interest in having Sane or LibUSB in the mingw packages? I have specs and patches for both, however the are some caveats:
sane-backends is set to compile only the "fujitsu" scanner backend, no IPv6, and no saned. This is due to the scanner I am using, and also because the other backends require lots of porting because other backends use UNIX signals and the fujitsu backend does not. Otherwise it compiles and works for me.
libusb-win32 compiles and runs without much modification, however this library has a tendency to BSOD Vista machines. Works fine with Windows XP. This is also only the 0.1.12 library. The 1.0 library is the current release, but since Fedora isn't shipping it and Sane requires 0.1.12 I am using it. Any know if Fedora switching to 1.0? Also, the resulting .exe files generates an auto-requires of "setupapi.dll" and "cfgmgr32.dll" so this is an issue that needs addressing.
As for maintainer-ship, I don't think I would be a good candidate to maintain the packages so I'd be looking for someone to take the specs/patches.
Michael
On Tue, Mar 24, 2009 at 01:30:43PM -0500, Michael Cronenworth wrote:
Would there be any interest in having Sane or LibUSB in the mingw packages? I have specs and patches for both, however the are some caveats:
Yes to both. Hans Niederman (ndim on #fedora-mingw) already took a look at libusb-win32.
[...]
libusb-win32 compiles and runs without much modification, however this library has a tendency to BSOD Vista machines. Works fine with Windows XP. This is also only the 0.1.12 library. The 1.0 library is the current release, but since Fedora isn't shipping it and Sane requires 0.1.12 I am using it. Any know if Fedora switching to 1.0? Also, the resulting .exe files generates an auto-requires of "setupapi.dll" and "cfgmgr32.dll" so this is an issue that needs addressing.
BSOD from userspace??
Probably best to file a bug against the native Fedora package if you want it to be updated.
As for maintainer-ship, I don't think I would be a good candidate to maintain the packages so I'd be looking for someone to take the specs/patches.
Well post any specfiles and patches here. If you do want to make a package then take a look at:
http://fedoraproject.org/wiki/MinGW/New_package
Rich.
-------- Original Message -------- Subject: Re: Interest in Sane or LibUSB From: Richard W.M. Jones rjones@redhat.com To: Fedora MinGW (Windows cross-compiler) project fedora-mingw@lists.fedoraproject.org Date: 03/24/2009 03:34 PM
Yes to both. Hans Niederman (ndim on #fedora-mingw) already took a look at libusb-win32.
Attached. Upstream already has the sane patches. I had to add some #undefs for u_char, u_long, and u_int for Fedora as I was getting conflicts with the winsock(2).h defines. It seems MinGW in Fedora is adding them, but I don't see them in any system header.
BSOD from userspace??
Yes, isn't Vista grand? ;) This is widely reported by Vista users[1] and affects an in-house Vista machine with me.
Probably best to file a bug against the native Fedora package if you want it to be updated.
Since libusb-0.1.x is deprecated, I doubt we'll see fixes for this issue. I'm not sure if all packages relying on libusb in Fedora are ready for libusb-1.0 as it is an ABI change. However, there is a libusb-compat-0.1 package to make the transition easy. I haven't tried compiling libusb-1.0 in MinGW yet though. I haven't found anyone who has so I'm not sure how well it will compile. When more free time comes up I'll attempt a build.
[1] http://www.shaddihasan.com/blog/2008/11/09/lejos-libusb-win32-vista-and-usbh...
%define __strip %{_mingw32_strip} %define __objdump %{_mingw32_objdump} %define _use_internal_dependency_generator 0 %define __find_requires %{_mingw32_findrequires} %define __find_provides %{_mingw32_findprovides}
Name: mingw32-libusb-win32 Version: 0.1.12.1 Release: 1%{?dist} Summary: A library which allows userspace access to USB devices
License: LGPLv2+ Group: System Environment/Libraries URL: http://libusb-win32.sourceforge.net/ Source0: http://download.sourceforge.net/libusb-win32/libusb-win32-src-%%7Bversion%7D... Patch0: mingw32-libusb-win32.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 33 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: autoconf, automake, libtool
%description This package provides a way for applications to access USB devices.
%prep %setup -q -n libusb-win32-src-%{version} %patch0 -p0
chmod -x COPYING_GPL.txt chmod -x COPYING_LGPL.txt
%build host_prefix=%{_mingw32_target} \ make
%install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_mingw32_bindir} mkdir -p $RPM_BUILD_ROOT/%{_mingw32_libdir} mkdir -p $RPM_BUILD_ROOT/%{_mingw32_includedir} mkdir -p $RPM_BUILD_ROOT/%{_mingw32_datadir}/libusb-win32 cp -p inf-wizard.exe install-filter.exe testlibusb.exe testlibusb-win.exe libusb0.dll libusb0.sys $RPM_BUILD_ROOT/%{_mingw32_bindir} cp -p libusb.a libusbd.a $RPM_BUILD_ROOT/%{_mingw32_libdir} cp -p src/usb.h $RPM_BUILD_ROOT/%{_mingw32_includedir} cp -p COPYING_GPL.txt COPYING_LGPL.txt $RPM_BUILD_ROOT/%{_mingw32_datadir}/libusb-win32
%clean rm -rf $RPM_BUILD_ROOT
%files %defattr(-,root,root) %{_mingw32_bindir}/libusb0.dll %{_mingw32_bindir}/libusb0.sys %{_mingw32_bindir}/inf-wizard.exe %{_mingw32_bindir}/install-filter.exe %{_mingw32_bindir}/testlibusb.exe %{_mingw32_bindir}/testlibusb-win.exe %{_mingw32_libdir}/libusb.a %{_mingw32_libdir}/libusbd.a %{_mingw32_includedir}/usb.h %{_mingw32_datadir}/libusb-win32/COPYING_GPL.txt %{_mingw32_datadir}/libusb-win32/COPYING_LGPL.txt
%changelog * Tue Mar 24 2009 Michael Cronenworth mike@cchtml.com - 0.1.12.1-1 - Initial RPM release.
%define __strip %{_mingw32_strip} %define __objdump %{_mingw32_objdump} %define _use_internal_dependency_generator 0 %define __find_requires %{_mingw32_findrequires} %define __find_provides %{_mingw32_findprovides}
Name: mingw32-sane-backends Version: 1.0.19 Release: 1%{?dist} Summary: Scanner access software
License: GPLv2+ and GPLv2+ with exceptions and Public Domain Group: System Environment/Libraries URL: http://www.sane-project.org Source0: ftp://ftp.sane-project.org/pub/sane/sane-backends-%{version}/sane-backends-%{version}.tar.gz Patch0: sane-win32-backend.patch Patch1: sane-win32-frontend.patch Patch2: sane-win32-lib.patch Patch3: sane-win32-sanei.patch Patch4: sane-win32-tools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 33 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils BuildRequires: mingw32-libusb-win32
%description Scanner Access Now Easy (SANE) is a universal scanner interface. The SANE application programming interface (API) provides standardized access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video and still cameras, frame-grabbers, etc.).
%prep %setup -q -n sane-backends-%{version} %patch0 -p0 %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0
chmod -x COPYING
%build export BACKENDS=fujitsu \ %{_mingw32_configure} make %{?_smp_mflags} touch backend/.libs/libsane-fujitsu-1.dll touch backend/.libs/libsane-dll-1.dll
%install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install
# Remove documentation which duplicates that found in the native package. rm -r $RPM_BUILD_ROOT/%{_mingw32_prefix}/doc rm -r $RPM_BUILD_ROOT/%{_mingw32_prefix}/share
# Delete temp files rm -r $RPM_BUILD_ROOT/%{_mingw32_libdir}/bin rm -r $RPM_BUILD_ROOT/%{_mingw32_libdir}/sane
%clean rm -rf $RPM_BUILD_ROOT
%files %defattr(-,root,root) %doc COPYING %{_mingw32_bindir}/libsane-1.dll %{_mingw32_bindir}/gamma4scanimage %{_mingw32_bindir}/sane-config %{_mingw32_bindir}/sane-find-scanner %{_mingw32_bindir}/scanimage %{_mingw32_libdir}/libsane.dll.a %{_mingw32_libdir}/libsane.la %{_mingw32_includedir}/sane/sane.h %{_mingw32_includedir}/sane/saneopts.h %{_mingw32_sysconfdir}/sane.d/dll.conf %{_mingw32_sysconfdir}/sane.d/fujitsu.conf %{_mingw32_sysconfdir}/sane.d/saned.conf
%changelog * Tue Mar 24 2009 Michael Cronenworth mike@cchtml.com - 1.0.19-1 - Initial RPM release.
Michael Cronenworth wrote:
Since libusb-0.1.x is deprecated, I doubt we'll see fixes for this issue. I'm not sure if all packages relying on libusb in Fedora are ready for libusb-1.0 as it is an ABI change. However, there is a libusb-compat-0.1 package to make the transition easy. I haven't tried compiling libusb-1.0 in MinGW yet though. I haven't found anyone who has so I'm not sure how well it will compile. When more free time comes up I'll attempt a build.
Fedora already has a separate libusb1 package with libusb 1.0, used by the new fprint (fingerprint reading) stack.
Kevin Kofler
For libusb-win32, you should probably apply this patch by Romain Liévin: http://svn.tilp.info/cgi-bin/viewcvs.cgi/*checkout*/libticables/trunk/src/wi...
Unfortunately no nice diff file there, just a description of what to change, and the resulting modified .c file: http://svn.tilp.info/cgi-bin/viewcvs.cgi/libticables/trunk/src/win32/usb/res...
Kevin Kofler
-------- Original Message -------- Subject: Re: Interest in Sane or LibUSB From: Kevin Kofler kevin.kofler@chello.at To: fedora-mingw@lists.fedoraproject.org Date: 03/25/2009 11:46 AM
For libusb-win32, you should probably apply this patch by Romain Liévin: http://svn.tilp.info/cgi-bin/viewcvs.cgi/*checkout*/libticables/trunk/src/wi...
Unfortunately no nice diff file there, just a description of what to change, and the resulting modified .c file: http://svn.tilp.info/cgi-bin/viewcvs.cgi/libticables/trunk/src/win32/usb/res...
The diff is attached. It's trivial. It seems to have resolved the BSODs in Vista.