1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
Index: configure.in
===================================================================
--- configure.in (revision 373)
+++ configure.in (working copy)
@@ -63,7 +63,7 @@
AC_SUBST(DBUS_LIBS)
# Check for libpng 1.2 or higher
-PKG_CHECK_MODULES(LIBPNG, [libpng >= 1.2])
+PKG_CHECK_MODULES(LIBPNG, [ libpng >= 1.2 ])
AC_SUBST(LIBPNG_CFLAGS)
AC_SUBST(LIBPNG_LIBS)
@@ -435,28 +434,7 @@
AM_CONDITIONAL(HAVE_POPPLER_GLIB, test "$have_poppler" = "yes")
test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, [], [Define if we have poppler])
-
##################################################################
-# check for libpng
-##################################################################
-
-LIBPNG_REQUIRED=1.2
-
-AC_ARG_ENABLE(png, AC_HELP_STRING([--disable-png],[Disable PNG data extractor]),,[enable_png=yes])
-if test "x$enable_png" = "xyes"; then
- PKG_CHECK_MODULES(LIBPNG, [
- libpng >= $LIBPNG_REQUIRED],
- [have_libpng=yes] , [have_libpng=no])
- AC_SUBST(LIBPNG_CFLAGS)
- AC_SUBST(LIBPNG_LIBS)
-else
- have_libpng="no (disabled)"
-fi
-AM_CONDITIONAL(HAVE_LIBPNG, test "$have_libpng" = "yes")
-test "$have_libpng" = "yes" && AC_DEFINE(HAVE_LIBPNG, [], [Define if we have libpng])
-
-
-##################################################################
# check for libexif
##################################################################
@@ -562,7 +540,7 @@
Metadata extractors:
pdf: $have_poppler
- png: $have_libpng
+ png: yes
exif (jpeg): $have_libexif
gsf: $have_libgsf
video files: $videos_are_handled ($videos_handler)
Index: src/tracker-extract/tracker-extract.c
===================================================================
--- src/tracker-extract/tracker-extract.c (revision 373)
+++ src/tracker-extract/tracker-extract.c (working copy)
@@ -61,9 +61,7 @@
#ifdef HAVE_VORBIS
void tracker_extract_vorbis (gchar *, GHashTable *);
#endif
-#ifdef HAVE_LIBPNG
void tracker_extract_png (gchar *, GHashTable *);
-#endif
#ifdef HAVE_LIBEXIF
void tracker_extract_exif (gchar *, GHashTable *);
#endif
@@ -123,9 +121,7 @@
#endif
/* Image extractors */
-#ifdef HAVE_LIBPNG
{ "image/png", tracker_extract_png },
-#endif
#ifdef HAVE_LIBEXIF
{ "image/jpeg", tracker_extract_exif },
#endif
Index: src/tracker-extract/tracker-extract-png.c
===================================================================
--- src/tracker-extract/tracker-extract-png.c (revision 373)
+++ src/tracker-extract/tracker-extract-png.c (working copy)
@@ -20,8 +20,6 @@
#include "config.h"
-#ifdef HAVE_LIBPNG
-
#include <stdio.h>
#include <glib.h>
#include <png.h>
@@ -32,13 +30,13 @@
} tagmap[] = {
{ "Author" , "Image:Creator"},
{ "Creator" , "Image:Creator"},
- { "Description" , "Image:Description"},
- { "Comment", "Image:Comments"},
- { "Copyright", "File:Copyright"},
- { "Creation Time", "Image:Date"},
- { "Title", "Image:Title"},
- { "Software", "Image:Software"},
- { "Disclaimer", "File:License"},
+ { "Description" , "Image:Description"},
+ { "Comment", "Image:Comments"},
+ { "Copyright", "File:Copyright"},
+ { "Creation Time", "Image:Date"},
+ { "Title", "Image:Title"},
+ { "Software", "Image:Software"},
+ { "Disclaimer", "File:License"},
{ NULL, NULL},
};
@@ -93,14 +91,10 @@
}
}
}
- }
+ }
png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
fclose (png);
}
}
-
-#else
-#warning "Not building PNG metadata extractor."
-#endif /* HAVE_LIBPNG */
|