71 | | depends_lib-append port:qt4-x11 |
| 96 | depends_lib-append \ |
| 97 | port:qt4-x11 \ |
| 98 | port:glib2 \ |
| 99 | port:gtk2 \ |
| 100 | port:pango \ |
| 101 | port:cairo |
| 102 | |
| 103 | configure.args-delete \ |
| 104 | --disable-poppler-glib \ |
| 105 | --disable-gdk |
| 106 | } |
| 107 | |
| 108 | depends_lib-append \ |
| 109 | port:jpeg \ |
| 110 | port:libpng |
| 111 | |
| 112 | configure.args-delete \ |
| 113 | --disable-poppler-qt4 \ |
| 114 | --disable-splash-output |
| 115 | } |
| 116 | |
| 117 | #variant qt4Arthur description {Qt4 bindings to poppler & Arthur output device (Qt4 Paint System)} { |
| 118 | #} |
| 119 | |
| 120 | # There is no source code for a variant qt4Cairo (what about Qt3 ?) |
| 121 | |
| 122 | variant glibSplash description {GLib bindings to poppler & Splash output device} { |
| 123 | depends_lib-append \ |
| 124 | port:gtk2 \ |
| 125 | port:glib2 \ |
| 126 | port:gettext \ |
| 127 | port:libpixman \ |
| 128 | port:jpeg \ |
| 129 | port:libpng \ |
| 130 | port:tiff |
| 131 | |
| 132 | # GDK (GIMP Drawing Kit) is required by the GLib wrapper |
| 133 | # when splash output device is enabled. |
| 134 | # GDK (part of GTK) depends on Pango, Pango depends on Cairo. |
| 135 | |
| 136 | depends_lib-append \ |
| 137 | port:pango \ |
| 138 | port:cairo |
| 139 | |
| 140 | configure.args-delete \ |
| 141 | --disable-poppler-glib \ |
| 142 | --disable-splash-output \ |
| 143 | --disable-gdk |
| 144 | } |
| 145 | |
| 146 | variant glibCairo description {GLib bindings to poppler & Cairo output device} { |
| 147 | pre-fetch { |
| 148 | if { ![variant_isset quartz] |
| 149 | && ![file exists "${prefix}/include/cairo/cairo-xlib.h"]} { |
| 150 | # variant glibCairo requires quartz |
| 151 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 152 | ui_error "The active port \"cairo\" has been built without X11 support." |
| 153 | ui_error "To build Poppler, use the \"+quartz\" variant." |
| 154 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 155 | return -code error |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | depends_lib-append \ |
| 160 | port:cairo \ |
| 161 | port:glib2 \ |
| 162 | port:gettext \ |
| 163 | port:libpixman \ |
| 164 | port:jpeg \ |
| 165 | port:libpng |
| 166 | |
| 167 | if {![variant_isset quartz]} { |
| 168 | depends_lib-append \ |
| 169 | port:gtk2 \ |
| 170 | port:pango \ |
| 171 | port:tiff |
| 173 | |
| 174 | configure.args-delete \ |
| 175 | --disable-poppler-glib \ |
| 176 | --disable-cairo-output |
| 177 | } |
| 178 | |
| 179 | if { ![variant_isset qt3Splash] |
| 180 | && ![variant_isset qt4Splash] |
| 181 | && ![variant_isset glibSplash] |
| 182 | && ![variant_isset glibCairo]} { |
| 183 | |
| 184 | default_variants +glibSplash +glibCairo |
| 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 ) |