diff options
author | cy <cy@FreeBSD.org> | 2001-12-06 21:33:33 +0800 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2001-12-06 21:33:33 +0800 |
commit | 8695a10c37e4ce9b71859ae2fc390c0c88f1f8eb (patch) | |
tree | 0cddbefa13e8f714a36a124367e4082203f3aa69 /graphics/xsane | |
parent | f6d8f2f33e70f8c7484aa81a83cf3e82142c25e9 (diff) | |
download | freebsd-ports-gnome-8695a10c37e4ce9b71859ae2fc390c0c88f1f8eb.tar.gz freebsd-ports-gnome-8695a10c37e4ce9b71859ae2fc390c0c88f1f8eb.tar.zst freebsd-ports-gnome-8695a10c37e4ce9b71859ae2fc390c0c88f1f8eb.zip |
Upgrade to xsane 0.81.
Temp file handling patches.
Reviewed by: nectar
Approved by: maintainer: Dominik Brettnacher <domi@saargate.de>
Obtained from: Tim Waugh <twaugh@redhat.com>
Diffstat (limited to 'graphics/xsane')
-rw-r--r-- | graphics/xsane/Makefile | 2 | ||||
-rw-r--r-- | graphics/xsane/distinfo | 2 | ||||
-rw-r--r-- | graphics/xsane/files/patch-src::xsane-back-gtk.c | 37 | ||||
-rw-r--r-- | graphics/xsane/files/patch-src::xsane-save.c | 10 | ||||
-rw-r--r-- | graphics/xsane/files/patch-src::xsane-scan.c | 11 |
5 files changed, 60 insertions, 2 deletions
diff --git a/graphics/xsane/Makefile b/graphics/xsane/Makefile index 005be6628da3..1a3881fb2a74 100644 --- a/graphics/xsane/Makefile +++ b/graphics/xsane/Makefile @@ -6,7 +6,7 @@ # PORTNAME= xsane -PORTVERSION= 0.76 +PORTVERSION= 0.81 CATEGORIES= graphics MASTER_SITES= http://www.xsane.org/download/ \ http://gd.tuwien.ac.at/hci/sane/xsane/ \ diff --git a/graphics/xsane/distinfo b/graphics/xsane/distinfo index 37bc38d8709d..f5289d52deaf 100644 --- a/graphics/xsane/distinfo +++ b/graphics/xsane/distinfo @@ -1 +1 @@ -MD5 (xsane-0.76.tar.gz) = 316af9567762af3e8ed0cb6899ee4e80 +MD5 (xsane-0.81.tar.gz) = 1b3431b812dbd2a56414d18a170e1fe6 diff --git a/graphics/xsane/files/patch-src::xsane-back-gtk.c b/graphics/xsane/files/patch-src::xsane-back-gtk.c new file mode 100644 index 000000000000..ea5d1e225d47 --- /dev/null +++ b/graphics/xsane/files/patch-src::xsane-back-gtk.c @@ -0,0 +1,37 @@ +--- src/xsane-back-gtk.c.tmpfile Wed Nov 21 18:43:20 2001 ++++ src/xsane-back-gtk.c Wed Nov 21 18:57:22 2001 +@@ -319,7 +319,6 @@ + { + char tmpbuf[256]; + uid_t uid; +- int rnd; + + uid = getuid(); + snprintf(tmpbuf, sizeof(tmpbuf), "%d-", uid); +@@ -341,12 +340,6 @@ + memcpy(buf + len, "XXXXXX", 6); /* create unique filename */ + len += 6; + buf[len] = '\0'; +- memcpy(buf, mktemp(buf), len); +- +- rnd = random() & 65535; /* add random number */ +- snprintf(tmpbuf, sizeof(tmpbuf), "%05d-", rnd); +- memcpy(buf+len, tmpbuf, strlen(tmpbuf)); +- len += 6; + } + + if (dev_name) +@@ -410,6 +403,13 @@ + + buf[len++] = '\0'; + ++ { ++ int fd = mkstemp (buf); ++ if (fd == -1) ++ return -1; ++ close (fd); ++ } ++ + DBG(DBG_proc, "path = \"%s\"\n", buf); + + return 0; diff --git a/graphics/xsane/files/patch-src::xsane-save.c b/graphics/xsane/files/patch-src::xsane-save.c new file mode 100644 index 000000000000..89350365d871 --- /dev/null +++ b/graphics/xsane/files/patch-src::xsane-save.c @@ -0,0 +1,10 @@ +--- src/xsane-save.c.tmpfile Wed Nov 21 18:47:48 2001 ++++ src/xsane-save.c Wed Nov 21 18:47:56 2001 +@@ -2102,7 +2102,6 @@ + + xsane_read_pnm_header(infile, &image_info); + +- remove(output_filename); + umask((mode_t) preferences.image_umask); /* define image file permissions */ + outfile = fopen(output_filename, "wb"); /* b = binary mode for win32 */ + umask(XSANE_DEFAULT_UMASK); /* define new file permissions */ diff --git a/graphics/xsane/files/patch-src::xsane-scan.c b/graphics/xsane/files/patch-src::xsane-scan.c new file mode 100644 index 000000000000..4f1585270eb3 --- /dev/null +++ b/graphics/xsane/files/patch-src::xsane-scan.c @@ -0,0 +1,11 @@ +--- src/xsane-scan.c.tmpfile Wed Nov 21 18:48:01 2001 ++++ src/xsane-scan.c Wed Nov 21 18:48:08 2001 +@@ -1660,7 +1660,6 @@ + umask((mode_t) preferences.image_umask); /* define image file permissions */ + } + +- remove(xsane.dummy_filename); /* remove existing file */ + xsane.out = fopen(xsane.dummy_filename, "wb"); /* b = binary mode for win32 */ + umask(XSANE_DEFAULT_UMASK); /* define new file permissions */ + + |