diff options
author | sanpei <sanpei@FreeBSD.org> | 2010-12-03 23:55:07 +0800 |
---|---|---|
committer | sanpei <sanpei@FreeBSD.org> | 2010-12-03 23:55:07 +0800 |
commit | c03ee9625dcdee109dbacbe76d259000e0a1bc26 (patch) | |
tree | 85e4cb7271e9f62c50fc7c1310baba9a7e14b1f2 /graphics/zphoto | |
parent | fa579b7b5d54f89ba8f7afb8f50a49ecfbe2950d (diff) | |
download | freebsd-ports-gnome-c03ee9625dcdee109dbacbe76d259000e0a1bc26.tar.gz freebsd-ports-gnome-c03ee9625dcdee109dbacbe76d259000e0a1bc26.tar.zst freebsd-ports-gnome-c03ee9625dcdee109dbacbe76d259000e0a1bc26.zip |
- fix for amd64.
- add support suffix "jpeg".
Diffstat (limited to 'graphics/zphoto')
-rw-r--r-- | graphics/zphoto/Makefile | 2 | ||||
-rw-r--r-- | graphics/zphoto/files/patch-exif.c | 144 | ||||
-rw-r--r-- | graphics/zphoto/files/patch-util.c | 11 |
3 files changed, 156 insertions, 1 deletions
diff --git a/graphics/zphoto/Makefile b/graphics/zphoto/Makefile index ce85c54d045e..2ee0a7b0d7f6 100644 --- a/graphics/zphoto/Makefile +++ b/graphics/zphoto/Makefile @@ -7,7 +7,7 @@ PORTNAME= zphoto PORTVERSION= 1.2 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= graphics www MASTER_SITES= http://namazu.org/~satoru/zphoto/ MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/graphics/zphoto/files/patch-exif.c b/graphics/zphoto/files/patch-exif.c new file mode 100644 index 000000000000..6963c63ed522 --- /dev/null +++ b/graphics/zphoto/files/patch-exif.c @@ -0,0 +1,144 @@ +--- exif.c.orig 2004-06-07 18:58:04.000000000 +0900 ++++ exif.c 2010-12-03 21:25:38.562390923 +0900 +@@ -33,11 +33,11 @@ + HEADER_OFFSET2 = 8 + }; + +-#define SWAP_ENDIAN_LONG(val) ((unsigned long) ( \ +- (((unsigned long) (val) & (unsigned long) 0x000000ffU) << 24) | \ +- (((unsigned long) (val) & (unsigned long) 0x0000ff00U) << 8) | \ +- (((unsigned long) (val) & (unsigned long) 0x00ff0000U) >> 8) | \ +- (((unsigned long) (val) & (unsigned long) 0xff000000U) >> 24))) ++#define SWAP_ENDIAN_LONG(val) ((unsigned int) ( \ ++ (((unsigned int) (val) & (unsigned int) 0x000000ffU) << 24) | \ ++ (((unsigned int) (val) & (unsigned int) 0x0000ff00U) << 8) | \ ++ (((unsigned int) (val) & (unsigned int) 0x00ff0000U) >> 8) | \ ++ (((unsigned int) (val) & (unsigned int) 0xff000000U) >> 24))) + + #define SWAP_ENDIAN_SHORT(val) ((unsigned short) ( \ + (((unsigned short) (val) & (unsigned short) 0x00ff) << 8) | \ +@@ -46,14 +46,14 @@ + static int + is_little_endian () + { +- static long retval = -1; ++ static int retval = -1; + + if (retval == -1) { +- long n = 1; ++ int n = 1; + char *p = (char *)&n; + char x[] = {1, 0, 0, 0}; + +- assert(sizeof(long) == 4); ++ assert(sizeof(int) == 4); + if (memcmp(p, x, 4) == 0) { + retval = 1; + } else { +@@ -63,8 +63,8 @@ + return retval; + } + +-static unsigned long +-ulong_from_le (unsigned long x) ++static unsigned int ++uint_from_le (unsigned int x) + { + if (is_little_endian()) { + return x; +@@ -83,8 +83,8 @@ + } + } + +-static unsigned long +-ulong_from_be (unsigned long x) ++static unsigned int ++uint_from_be (unsigned int x) + { + if (is_little_endian()) { + return SWAP_ENDIAN_LONG(x); +@@ -115,7 +115,7 @@ + + + static int +-efseek (FILE *stream, long offset, int whence) ++efseek (FILE *stream, int offset, int whence) + { + int x = fseek(stream, offset, whence); + if (x != 0) +@@ -142,16 +142,16 @@ + typedef void (*TraverseFunc) (FILE *fp, + unsigned short tag, + unsigned short type, +- unsigned long size, +- unsigned long value, ++ unsigned int size, ++ unsigned int value, + void *data); + + static void + get_special_offset (FILE *fp, + unsigned short tag, + unsigned short type, +- unsigned long size, +- unsigned long value, ++ unsigned int size, ++ unsigned int value, + void *data) + { + if (tag == 0x8769) { +@@ -163,12 +163,12 @@ + get_time (FILE *fp, + unsigned short tag, + unsigned short type, +- unsigned long size, +- unsigned long value, ++ unsigned int size, ++ unsigned int value, + void *data) + { + if (tag == 0x9003) { +- long curpos; ++ int curpos; + char buf[BUFSIZ]; + struct tm t; + +@@ -204,16 +204,16 @@ + return ushort_from_be(x); + } + +-static unsigned long +-read_ulong (FILE *fp, int le_exif_p) ++static unsigned int ++read_uint (FILE *fp, int le_exif_p) + { +- unsigned long x; ++ unsigned int x; + +- efread(&x, sizeof(unsigned long), 1, fp); ++ efread(&x, sizeof(unsigned int), 1, fp); + if (le_exif_p) +- return ulong_from_le(x); ++ return uint_from_le(x); + else +- return ulong_from_be(x); ++ return uint_from_be(x); + } + + static int +@@ -225,12 +225,12 @@ + n = read_ushort(fp, le_exif_p); + for (i = 0; i < n; i++) { + unsigned short tag, type; +- unsigned long size, value; ++ unsigned int size, value; + + tag = read_ushort(fp, le_exif_p); + type = read_ushort(fp, le_exif_p); +- size = read_ulong(fp, le_exif_p); +- value = read_ulong(fp, le_exif_p); ++ size = read_uint(fp, le_exif_p); ++ value = read_uint(fp, le_exif_p); + + func(fp, tag, type, size, value, data); + } diff --git a/graphics/zphoto/files/patch-util.c b/graphics/zphoto/files/patch-util.c new file mode 100644 index 000000000000..9a3ea02f4a9d --- /dev/null +++ b/graphics/zphoto/files/patch-util.c @@ -0,0 +1,11 @@ +--- util.c.orig 2010-12-04 00:36:16.000000000 +0900 ++++ util.c 2010-12-04 00:36:52.000000000 +0900 +@@ -389,7 +389,7 @@ + zphoto_get_image_suffixes (void) + { + static char *empty[] = { NULL }; +- static char *suffixes[] = { "jpg", "png", "gif", "bmp", NULL }; ++ static char *suffixes[] = { "jpeg", "jpg", "png", "gif", "bmp", NULL }; + + if (zphoto_support_image_p()) { + return suffixes; |