mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 13:38:52 +02:00
sane_backends: add recipe for version 1.0.27.
This commit is contained in:
162
media-gfx/sane_backends/patches/sane_backends-1.0.27.patchset
Normal file
162
media-gfx/sane_backends/patches/sane_backends-1.0.27.patchset
Normal file
@@ -0,0 +1,162 @@
|
||||
From d67857052a8cd9ac0640fe9004ef2e8a1fc3bffb Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 13 Nov 2015 11:26:01 +0000
|
||||
Subject: Fix build
|
||||
|
||||
|
||||
diff --git a/backend/epsonds-jpeg.c b/backend/epsonds-jpeg.c
|
||||
index 62e8bb5..a8bc98f 100644
|
||||
--- a/backend/epsonds-jpeg.c
|
||||
+++ b/backend/epsonds-jpeg.c
|
||||
@@ -15,6 +15,10 @@
|
||||
|
||||
#include "sane/config.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#define _STDLIB_H_
|
||||
+#endif
|
||||
+
|
||||
#include <math.h>
|
||||
|
||||
#include "epsonds.h"
|
||||
@@ -49,8 +53,8 @@ jpeg_term_source(j_decompress_ptr __sane_unused__ cinfo)
|
||||
METHODDEF(boolean)
|
||||
jpeg_fill_input_buffer(j_decompress_ptr cinfo)
|
||||
{
|
||||
- epsonds_src_mgr *src = (epsonds_src_mgr *)cinfo->src;
|
||||
int avail, size;
|
||||
+ epsonds_src_mgr *src = (epsonds_src_mgr *)cinfo->src;
|
||||
|
||||
/* read from the scanner or the ring buffer */
|
||||
|
||||
diff --git a/backend/pixma_bjnp.c b/backend/pixma_bjnp.c
|
||||
index fc4c501..76e058e 100644
|
||||
--- a/backend/pixma_bjnp.c
|
||||
+++ b/backend/pixma_bjnp.c
|
||||
@@ -106,6 +106,10 @@
|
||||
# define SSIZE_MAX LONG_MAX
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef HAVE_IFADDRS_H
|
||||
+#endif
|
||||
+
|
||||
/* static data */
|
||||
static bjnp_device_t device[BJNP_NO_DEVICES];
|
||||
static int bjnp_no_devices = 0;
|
||||
diff --git a/sanei/sanei_thread.c b/sanei/sanei_thread.c
|
||||
index fcf52c1..5a1d63e 100644
|
||||
--- a/sanei/sanei_thread.c
|
||||
+++ b/sanei/sanei_thread.c
|
||||
@@ -484,6 +484,7 @@ SANE_Pid
|
||||
sanei_thread_waitpid( SANE_Pid pid, int *status )
|
||||
{
|
||||
#ifdef USE_PTHREAD
|
||||
+ int rc;
|
||||
int *ls;
|
||||
#else
|
||||
int ls;
|
||||
@@ -496,7 +497,6 @@ sanei_thread_waitpid( SANE_Pid pid, int *status )
|
||||
DBG(2, "sanei_thread_waitpid() - %ld\n",
|
||||
sanei_thread_pid_to_long(pid));
|
||||
#ifdef USE_PTHREAD
|
||||
- int rc;
|
||||
rc = pthread_join( (pthread_t)pid, (void*)&ls );
|
||||
|
||||
if( 0 == rc ) {
|
||||
diff --git a/sanei/sanei_usb.c b/sanei/sanei_usb.c
|
||||
index e4b23dc..e066904 100644
|
||||
--- a/sanei/sanei_usb.c
|
||||
+++ b/sanei/sanei_usb.c
|
||||
@@ -2203,6 +2203,7 @@ sanei_usb_clear_halt (SANE_Int dn)
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
||||
+#ifndef __HAIKU__
|
||||
#ifdef HAVE_LIBUSB_LEGACY
|
||||
int ret;
|
||||
|
||||
@@ -2253,6 +2254,7 @@ sanei_usb_clear_halt (SANE_Int dn)
|
||||
#else /* not HAVE_LIBUSB_LEGACY && not HAVE_LIBUSB */
|
||||
DBG (1, "sanei_usb_clear_halt: libusb support missing\n");
|
||||
#endif /* HAVE_LIBUSB_LEGACY || HAVE_LIBUSB */
|
||||
+#endif
|
||||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
From d13bb9ecdc7e03089e0c963d438031e759d93e3e Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 13 Nov 2015 11:38:32 +0000
|
||||
Subject: Disable IPV6 for pixma_bjnp
|
||||
|
||||
|
||||
diff --git a/backend/pixma_bjnp.c b/backend/pixma_bjnp.c
|
||||
index 76e058e..898b6dd 100644
|
||||
--- a/backend/pixma_bjnp.c
|
||||
+++ b/backend/pixma_bjnp.c
|
||||
@@ -108,6 +108,7 @@
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#undef HAVE_IFADDRS_H
|
||||
+#undef ENABLE_IPV6
|
||||
#endif
|
||||
|
||||
/* static data */
|
||||
--
|
||||
2.12.2
|
||||
|
||||
|
||||
From ca5d8dcfeb1f6915f4490d632c17aa26c4c7eb34 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 16 Nov 2015 11:13:48 +0000
|
||||
Subject: Disable libusb context for Haiku
|
||||
|
||||
|
||||
diff --git a/sanei/sanei_usb.c b/sanei/sanei_usb.c
|
||||
index e066904..75330bd 100644
|
||||
--- a/sanei/sanei_usb.c
|
||||
+++ b/sanei/sanei_usb.c
|
||||
@@ -489,7 +489,12 @@ sanei_usb_init (void)
|
||||
if (!sanei_usb_ctx)
|
||||
{
|
||||
DBG (4, "%s: initializing libusb-1.0\n", __func__);
|
||||
+#ifdef __HAIKU__
|
||||
+ ret = libusb_init (NULL);
|
||||
+ sanei_usb_ctx = -1;
|
||||
+#else
|
||||
ret = libusb_init (&sanei_usb_ctx);
|
||||
+#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
DBG (1,
|
||||
@@ -547,7 +552,11 @@ int i;
|
||||
#ifdef HAVE_LIBUSB
|
||||
if (sanei_usb_ctx)
|
||||
{
|
||||
+#ifdef __HAIKU__
|
||||
+ libusb_exit (NULL);
|
||||
+#else
|
||||
libusb_exit (sanei_usb_ctx);
|
||||
+#endif
|
||||
/* reset libusb-1.0 context */
|
||||
sanei_usb_ctx=NULL;
|
||||
}
|
||||
@@ -871,7 +880,11 @@ static void libusb_scan_devices(void)
|
||||
|
||||
DBG (4, "%s: Looking for libusb-1.0 devices\n", __func__);
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+ ndev = libusb_get_device_list (NULL, &devlist);
|
||||
+#else
|
||||
ndev = libusb_get_device_list (sanei_usb_ctx, &devlist);
|
||||
+#endif
|
||||
if (ndev < 0)
|
||||
{
|
||||
DBG (1,
|
||||
--
|
||||
2.12.2
|
||||
|
||||
Reference in New Issue
Block a user