| 66 | |
| 67 | if { [variant_isset glibCairo] |
| 68 | && ![variant_isset quartz] |
| 69 | && ![file exists "${prefix}/include/cairo/cairo-xlib.h"]} { |
| 70 | # variant glibCairo requires quartz |
| 71 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 72 | ui_error "The active port \"cairo\" has been built without X11 support." |
| 73 | ui_error "To build Poppler, use the \"+quartz\" variant." |
| 74 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 75 | return -code error |
| 76 | } |
| 77 | |
| 78 | if { [variant_isset qt4Splash] |
| 79 | && ![variant_isset quartz] |
| 80 | && ![file exists "${prefix}/lib/libQtCore.dylib"] |
| 81 | && [file exists "${prefix}/Library/Frameworks/QtCore.framework/QtCore"]} { |
| 82 | # variant qt4Splash requires quartz |
| 83 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 84 | ui_error "Variant \"+qt4Splash\" requires variant \"+quartz\"," |
| 85 | ui_error "because port \"qt4-mac\" is active" |
| 86 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 87 | return -code error |
| 88 | } |
| 89 | |
| 90 | if { [variant_isset qt4Splash] |
| 91 | && ![variant_isset x11] |
| 92 | && [file exists "${prefix}/lib/libQtCore.dylib"] |
| 93 | && ![file exists "${prefix}/Library/Frameworks/QtCore.framework/QtCore"]} { |
| 94 | # variant qt4Splash requires x11 |
| 95 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 96 | ui_error "Variant \"+qt4Splash\" requires variant \"+x11\"," |
| 97 | ui_error "because port \"qt4-x11\" is active" |
| 98 | ui_error "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
| 99 | return -code error |
| 100 | } |
71 | | depends_lib-append port:qt4-x11 |
| 131 | depends_lib-append \ |
| 132 | port:qt4-x11 \ |
| 133 | port:glib2 \ |
| 134 | port:gtk2 \ |
| 135 | port:pango \ |
| 136 | port:cairo |
| 137 | |
| 138 | configure.args-delete \ |
| 139 | --disable-poppler-glib \ |
| 140 | --disable-gdk |
| 141 | } |
| 142 | |
| 143 | depends_lib-append \ |
| 144 | port:jpeg \ |
| 145 | port:libpng |
| 146 | |
| 147 | configure.args-delete \ |
| 148 | --disable-poppler-qt4 \ |
| 149 | --disable-splash-output |
| 150 | } |
| 151 | |
| 152 | #variant qt4Arthur description {Qt4 bindings to poppler & Arthur output device (Qt4 Paint System)} { |
| 153 | #} |
| 154 | |
| 155 | # There is no source code for a variant qt4Cairo (what about Qt3 ?) |
| 156 | |
| 157 | variant glibSplash description {GLib bindings to poppler & Splash output device} { |
| 158 | depends_lib-append \ |
| 159 | port:gtk2 \ |
| 160 | port:glib2 \ |
| 161 | port:gettext \ |
| 162 | port:libpixman \ |
| 163 | port:jpeg \ |
| 164 | port:libpng \ |
| 165 | port:tiff |
| 166 | |
| 167 | # GDK (GIMP Drawing Kit) is required by the GLib wrapper |
| 168 | # when splash output device is enabled. |
| 169 | # GDK (part of GTK) depends on Pango, Pango depends on Cairo. |
| 170 | |
| 171 | depends_lib-append \ |
| 172 | port:pango \ |
| 173 | port:cairo |
| 174 | |
| 175 | configure.args-delete \ |
| 176 | --disable-poppler-glib \ |
| 177 | --disable-splash-output \ |
| 178 | --disable-gdk |
| 179 | } |
| 180 | |
| 181 | variant glibCairo description {GLib bindings to poppler & Cairo output device} { |
| 182 | depends_lib-append \ |
| 183 | port:cairo \ |
| 184 | port:glib2 \ |
| 185 | port:gettext \ |
| 186 | port:libpixman \ |
| 187 | port:jpeg \ |
| 188 | port:libpng |
| 189 | |
| 190 | if {![variant_isset quartz]} { |
| 191 | depends_lib-append \ |
| 192 | port:gtk2 \ |
| 193 | port:pango \ |
| 194 | port:tiff |
75 | | test.run yes |
76 | | test.dir ${worksrcpath}/test |
77 | | test.target all |
| 210 | # not testet: |
| 211 | #platform darwin 6 { |
| 212 | # configure.env-append MACOSX_DEPLOYMENT_TARGET=10.2 |
| 213 | #} |
| 214 | |
| 215 | # not testet: |
| 216 | #platform darwin 7 { |
| 217 | # configure.env-append MACOSX_DEPLOYMENT_TARGET=10.3 |
| 218 | #} |
| 219 | |
| 220 | platform darwin 8 { |
| 221 | configure.env-append MACOSX_DEPLOYMENT_TARGET=10.4 |
| 222 | } |
| 223 | |
| 224 | |
| 225 | pre-configure { |
| 226 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 227 | ui_debug "configure options:" |
| 228 | ui_debug "${configure.args}" |
| 229 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 230 | |
| 231 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 232 | ui_debug "port dependencies:" |
| 233 | ui_debug "$depends_lib" |
| 234 | ui_debug "+++++++++++++++++++++++++++++++++++" |
| 235 | } |
| 236 | |
| 237 | |
| 238 | |
| 240 | # SOME NOTES TO "gtk test" (see variant "quartz"): |
| 241 | # |
| 242 | # After build of poppler the directory ${worksrcpath}/test |
| 243 | # contains five shell scripts: |
| 244 | # |
| 245 | # (1) gtk-cairo-test |
| 246 | # (2) gtk-splash-test |
| 247 | # (3) pdf_inspector |
| 248 | # (4) pdf-fullrewrite |
| 249 | # (5) perf-test |
| 250 | # |
| 251 | # These shell scripts are wrapper scripts for the identically |
| 252 | # named binaries contained in the directory "test/.libs". |
| 253 | # |
| 254 | # The first three scripts can only be launched on the command line |
| 255 | # in a window of the X Window system. |
| 256 | # |
| 257 | # Usage (change the current directory to ${worksrcpath}/test): |
| 258 | # |
| 259 | #$ ./gtk-cairo-test PDF-FILES... (opens each pdf file in a window) |
| 260 | # |
| 261 | #$ ./gtk-splash-test PDF-FILES... (opens each pdf file in a window) |
| 262 | # |
| 263 | #$ ./pdf_inspector (no arguments, it opens a dialog window) |
| 264 | # |
| 265 | #$ ./pdf-fullrewrite INPUT-FILE OUTPUT-FILE |
| 266 | # |
| 267 | #$ ./perf-test [-preview|-slowpreview] [-loadonly] [-timings] [-text] |
| 268 | # [-resolution NxM] [-recursive] [-page N] [-out out.txt] PDF-FILES... |
| 269 | # |
| 270 | # ("perf-test" is a tool to stress-test poppler rendering and measure |
| 271 | # rendering times for very simplistic performance measuring.) |
| 272 | # |
| 273 | # The wrapper scripts should never be moved out of the build directory, |
| 274 | # otherwise they will not operate correctly. |
| 275 | # Therefore it is not possible to install them in the directory ${prefix}/bin |
| 276 | # |
| 277 | # To use them, you must keep the work directory ( sudo port -k install poppler ) |