| 98 | |
| 99 | depends_lib-append \ |
| 100 | port:jpeg \ |
| 101 | port:libpng |
| 102 | |
| 103 | configure.args-delete \ |
| 104 | --disable-poppler-qt4 \ |
| 105 | --disable-splash-output |
| 106 | } |
| 107 | |
| 108 | #variant qt4Arthur description {Qt4 bindings to poppler & Arthur output device (Qt4 Paint System)} { |
| 109 | #} |
| 110 | |
| 111 | # There is no source code for a variant qt4Cairo (what about Qt3 ?) |
| 112 | |
| 113 | variant glibSplash description {GLib bindings to poppler & Splash output device} { |
| 114 | depends_lib-append \ |
| 115 | port:gtk2 \ |
| 116 | port:glib2 \ |
| 117 | port:gettext \ |
| 118 | port:libpixman \ |
| 119 | port:jpeg \ |
| 120 | port:libpng \ |
| 121 | port:tiff |
| 122 | |
| 123 | # GDK (GIMP Drawing Kit) is required by the GLib wrapper |
| 124 | # when splash output device is enabled. |
| 125 | # GDK (part of GTK) depends on Pango, Pango depends on Cairo. |
| 126 | |
| 127 | depends_lib-append \ |
| 128 | port:pango \ |
| 129 | port:cairo |
| 130 | |
| 131 | configure.args-delete \ |
| 132 | --disable-poppler-glib \ |
| 133 | --disable-splash-output \ |
| 134 | --disable-gdk |
| 135 | } |
| 136 | |
| 137 | variant glibCairo description {GLib bindings to poppler & Cairo output device} { |
| 138 | pre-fetch { |
| 139 | if { ![variant_isset quartz] |
| 140 | && ![file exists "${prefix}/include/cairo/cairo-xlib.h"]} { |
| 141 | # variant glibCairo requires quartz |
| 142 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 143 | ui_error "The active port \"cairo\" has been built without X11 support." |
| 144 | ui_error "To build Poppler, use the \"+quartz\" variant." |
| 145 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 146 | return -code error |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | depends_lib-append \ |
| 151 | port:cairo \ |
| 152 | port:glib2 \ |
| 153 | port:gettext \ |
| 154 | port:libpixman \ |
| 155 | port:jpeg \ |
| 156 | port:libpng |
| 157 | |
| 158 | if {![variant_isset quartz]} { |
| 159 | depends_lib-append \ |
| 160 | port:gtk2 \ |
| 161 | port:pango \ |
| 162 | port:tiff |
| 163 | } |
| 164 | |
| 165 | configure.args-delete \ |
| 166 | --disable-poppler-glib \ |
| 167 | --disable-cairo-output |
| 168 | } |
| 169 | |
| 170 | variant abiword description {rendering backend/output device, and pdftoabw command line utility} { |
| 171 | depends_lib-append \ |
| 172 | port:libxml2 |
| 173 | |
| 174 | configure.args-delete \ |
| 175 | --disable-abiword-output |
| 176 | } |
| 177 | |
| 178 | if { ![variant_isset qt3Splash] |
| 179 | && ![variant_isset qt4Splash] |
| 180 | && ![variant_isset glibSplash] |
| 181 | && ![variant_isset glibCairo] |
| 182 | && ![variant_isset abiword]} { |
| 183 | |
| 184 | default_variants +glibSplash +glibCairo +abiword |
| 185 | } |
| 186 | |
| 187 | # not testet: |
| 188 | #platform darwin 6 { |
| 189 | # configure.env-append MACOSX_DEPLOYMENT_TARGET=10.2 |
| 190 | #} |
| 191 | |
| 192 | # not testet: |
| 193 | #platform darwin 7 { |
| 194 | # configure.env-append MACOSX_DEPLOYMENT_TARGET=10.3 |
| 195 | #} |
| 196 | |
| 197 | platform darwin 8 { |
| 198 | configure.env-append MACOSX_DEPLOYMENT_TARGET=10.4 |
| 199 | } |
| 200 | |
| 201 | |
| 202 | pre-configure { |
| 203 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 204 | ui_debug "configure options:" |
| 205 | ui_debug "${configure.args}" |
| 206 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 207 | |
| 208 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 209 | ui_debug "port dependencies:" |
| 210 | ui_debug "$depends_lib" |
| 211 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 215 | |
| 216 | |
| 217 | # SOME NOTES TO "gtk test" (see variant "quartz"): |
| 218 | # |
| 219 | # After build of poppler the directory ${worksrcpath}/test |
| 220 | # contains five shell scripts: |
| 221 | # |
| 222 | # (1) gtk-cairo-test |
| 223 | # (2) gtk-splash-test |
| 224 | # (3) pdf_inspector |
| 225 | # (4) pdf-fullrewrite |
| 226 | # (5) perf-test |
| 227 | # |
| 228 | # These shell scripts are wrapper scripts for the identically |
| 229 | # named binaries contained in the directory "test/.libs". |
| 230 | # |
| 231 | # The first three scripts can only be launched on the command line |
| 232 | # in a window of the X Window system. |
| 233 | # |
| 234 | # Usage (change the current directory to ${worksrcpath}/test): |
| 235 | # |
| 236 | #$ ./gtk-cairo-test PDF-FILES... (opens each pdf file in a window) |
| 237 | # |
| 238 | #$ ./gtk-splash-test PDF-FILES... (opens each pdf file in a window) |
| 239 | # |
| 240 | #$ ./pdf_inspector (no arguments, it opens a dialog window) |
| 241 | # |
| 242 | #$ ./pdf-fullrewrite INPUT-FILE OUTPUT-FILE |
| 243 | # |
| 244 | #$ ./perf-test [-preview|-slowpreview] [-loadonly] [-timings] [-text] |
| 245 | # [-resolution NxM] [-recursive] [-page N] [-out out.txt] PDF-FILES... |
| 246 | # |
| 247 | # ("perf-test" is a tool to stress-test poppler rendering and measure |
| 248 | # rendering times for very simplistic performance measuring.) |
| 249 | # |
| 250 | # The wrapper scripts should never be moved out of the build directory, |
| 251 | # otherwise they will not operate correctly. |
| 252 | # Therefore it is not possible to install them in the directory ${prefix}/bin |
| 253 | # |
| 254 | # To use them, you must keep the work directory ( sudo port -k install poppler ) |