summaryrefslogtreecommitdiff
path: root/graphics/ida
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2005-09-13 15:01:09 +0000
committerVolker Stolz <vs@FreeBSD.org>2005-09-13 15:01:09 +0000
commitac404f4857327c0e72e5b7ea9b32fc27cc873edf (patch)
tree4ad454e1256e3f2d8c625d6c9b1e09d0dc84fa33 /graphics/ida
parentfix a small typo (diff)
- Also build 'exiftran'
- Handle presence of libexif gracefully PR: ports/84304 Approved by: maintainer
Notes
Notes: svn path=/head/; revision=142601
Diffstat (limited to 'graphics/ida')
-rw-r--r--graphics/ida/Makefile15
-rw-r--r--graphics/ida/files/patch-exiftran.c21
2 files changed, 34 insertions, 2 deletions
diff --git a/graphics/ida/Makefile b/graphics/ida/Makefile
index cf6c520ff655..b7f09375be23 100644
--- a/graphics/ida/Makefile
+++ b/graphics/ida/Makefile
@@ -14,6 +14,8 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= anrays@gmail.com
COMMENT= Small and fast motif-based image viewer and editor
+OPTIONS= LIBEXIF "Build with libexif" on
+
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
tiff.4:${PORTSDIR}/graphics/tiff \
@@ -30,18 +32,27 @@ MAKEFILE= ${WRKSRC}/GNUmakefile
MAN1= ida.1
PORTDOCS= README TODO INSTALL
-PLIST_FILES= bin/ida lib/X11/app-defaults/Ida
+PLIST_FILES= bin/exiftran bin/ida lib/X11/app-defaults/Ida
.include <bsd.port.pre.mk>
+pre-fetch:
+.if exists(${LOCALBASE}/lib/libexif.so)
+WITH_LIBEXIF= yes
+.endif
+.if defined(WITH_LIBEXIF)
+LIB_DEPENDS+= exif.12:${PORTSDIR}/graphics/libexif
+.endif
+
post-patch:
.if ${OSVERSION} < 500000
@${REINPLACE_CMD} -e 's|PRId32|"d"|g' -e 's|PRIx32|"x"|g' \
${WRKSRC}/tiff.c ${WRKSRC}/xwd.c
.endif
-.if !defined(NOPORTDOCS)
post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/exiftran ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for a in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
diff --git a/graphics/ida/files/patch-exiftran.c b/graphics/ida/files/patch-exiftran.c
new file mode 100644
index 000000000000..dff100845a8a
--- /dev/null
+++ b/graphics/ida/files/patch-exiftran.c
@@ -0,0 +1,21 @@
+--- exiftran.c.orig Tue Dec 23 19:40:41 2003
++++ exiftran.c Tue Aug 2 11:38:18 2005
+@@ -22,7 +22,8 @@
+ #ifdef HAVE_LIBEXIF
+ static void dump_exif(FILE *out, ExifData *ed)
+ {
+- const char *title, *value;
++ const char *title;
++ char value[1024];
+ ExifEntry *ee;
+ int tag,i;
+
+@@ -35,7 +36,7 @@
+ ee = exif_content_get_entry (ed->ifd[i], tag);
+ if (NULL == ee)
+ continue;
+- value = exif_entry_get_value(ee);
++ exif_entry_get_value(ee, value, sizeof(value));
+ fprintf(out," 0x%04x %-30s %s\n", tag, title, value);
+ }
+ }