Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1574560
 поиск   регистрация   авторизация 
 
Группа :: Графика
Пакет: sane

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: sane-1.0.17.lock.patch


diff -urN sane-backends-1.0.17/backend/Makefile.in sane-backends-1.0.17-lock/backend/Makefile.in
--- sane-backends-1.0.17/backend/Makefile.in	2005-12-18 16:32:31 +0300
+++ sane-backends-1.0.17-lock/backend/Makefile.in	2006-02-18 11:16:22 +0300
@@ -18,7 +18,7 @@
 sysconfdir = @sysconfdir@
 sharedstatedir = @sharedstatedir@
 localstatedir = @localstatedir@
-localstatesanedir = $(localstatedir)/lock/sane
+locksanedir = @locksanedir@
 libdir = @libdir@
 libsanedir = $(libdir)/sane
 infodir = @infodir@
@@ -250,10 +250,10 @@
 	 done
 
 install-lockpath:
-	$(MKDIR) -m 775 -g $(LOCKPATH_GROUP) $(DESTDIR)$(localstatesanedir)
+	$(MKDIR) -m 775 -g $(LOCKPATH_GROUP) $(DESTDIR)$(locksanedir)
 
 uninstall:
-	rm -rf $(libsanedir) $(configdir) $(localstatesanedir)
+	rm -rf $(libsanedir) $(configdir) $(locksanedir)
 	rm -f $(libdir)/libsane.*
 	-for dir in $(FIRMWARE_DIRS) ; do \
 	   rmdir $(datadir)/sane/$${dir} ; \
diff -urN sane-backends-1.0.17/configure.in sane-backends-1.0.17-lock/configure.in
--- sane-backends-1.0.17/configure.in	2005-12-18 16:15:15 +0300
+++ sane-backends-1.0.17-lock/configure.in	2006-02-18 11:21:00 +0300
@@ -304,14 +304,18 @@
   AC_SUBST(LIBTOOL_LINK_EXTRA)
 fi
 
+dnl Check for lock dir
+
+AC_ARG_WITH(lockdir, AC_HELP_STRING([--with-lockdir=<dir>],[Set lock dir for SANE to <dir>]),[locksanedir=$withval],[locksanedir=${localstatedir}/lock/sane])
+AC_SUBST(locksanedir)
+
 dnl ***********************************************************************
 dnl enable/disable backends and features based on previous tests and user's
 dnl choice
 dnl ***********************************************************************
-
 CPPFLAGS="${CPPFLAGS} -DPATH_SANE_CONFIG_DIR=\$(configdir) \
 	  -DPATH_SANE_DATA_DIR=\$(datadir) \
-	  -DPATH_SANE_LOCK_DIR=\$(localstatedir) \
+	  -DPATH_SANE_LOCK_DIR=\$(locksanedir) \
 	  -DV_MAJOR=${V_MAJOR} -DV_MINOR=${V_MINOR}"
 
 if test "${ac_cv_header_sys_socket_h}" = "no"; then
@@ -536,7 +540,7 @@
 echo "Manpages:      `eval eval echo ${mandir}`"
 echo "Documentation: `eval eval echo ${docdir}`"
 if eval "test x$INSTALL_LOCKPATH = xinstall-lockpath" ; then
-  echo "Lockfiles:     `eval eval echo ${localstatedir}/lock/sane`"
+  echo "Lockfiles:     `eval eval echo ${locksanedir}`"
 else
   echo "Lockfiles:     Feature is disabled!"
 fi
diff -urN sane-backends-1.0.17/include/sane/sanei_access.h sane-backends-1.0.17-lock/include/sane/sanei_access.h
--- sane-backends-1.0.17/include/sane/sanei_access.h	2005-04-01 18:01:30 +0400
+++ sane-backends-1.0.17-lock/include/sane/sanei_access.h	2006-02-18 11:06:50 +0300
@@ -67,11 +67,11 @@
 /** Set a lock.
  *
  * The function tries to open/create exclusively a lock file in 
- * $PATH_SANE_LOCK_DIR/lock/sane.
+ * $PATH_SANE_LOCK_DIR.
  * If the file could be created successfully, the function fills in the
  * process ID.
  * The complete filename of the lockfile is created as follows:
- * $PATH_SANE_LOCK_DIR/lock/LCK..<devicename>
+ * $PATH_SANE_LOCK_DIR/LCK..<devicename>
  * If the lock could not be set, the function tries it until the timeout
  * period has been elapsed.
  *
diff -urN sane-backends-1.0.17/sanei/sanei_access.c sane-backends-1.0.17-lock/sanei/sanei_access.c
--- sane-backends-1.0.17/sanei/sanei_access.c	2005-12-07 21:38:41 +0300
+++ sane-backends-1.0.17-lock/sanei/sanei_access.c	2006-02-18 11:03:08 +0300
@@ -133,7 +133,7 @@
 {
 	char *p;
 
-	strcpy( fn, STRINGIFY(PATH_SANE_LOCK_DIR)"/lock/sane/LCK.." );
+	strcpy( fn, STRINGIFY(PATH_SANE_LOCK_DIR)"/LCK.." );
 	p = &fn[strlen(fn)];
 
 	strcat( fn, devname );
--- /home/lav/RPM/BUILD/sane-backends-1.0.17-lock/sanei/Makefile.in	2005-10-29 18:40:35 +0400
+++ sane/sanei/Makefile.in	2006-02-18 12:22:16 +0300
@@ -18,6 +18,7 @@
 sysconfdir = @sysconfdir@
 sharedstatedir = @sharedstatedir@
 localstatedir = @localstatedir@
+locksanedir = @locksanedir@
 libdir = @libdir@
 infodir = @infodir@
 mandir = @mandir@
 
design & coding: Vladimir Lettiev aka crux © 2004-2005