[MacPorts] #16056: poppler -- new version -- more variants

MacPorts noreply at macports.org
Sat Aug 2 15:17:41 PDT 2008


#16056: poppler -- new version -- more variants
--------------------------------------+-------------------------------------
  Reporter:  jens.traube at t-online.de  |       Owner:  macports-tickets at lists.macosforge.org
      Type:  enhancement              |      Status:  reopened                             
  Priority:  Normal                   |   Milestone:  Port Enhancements                    
 Component:  ports                    |     Version:  1.6.0                                
Resolution:                           |    Keywords:  pdf, qt4                             
--------------------------------------+-------------------------------------
Comment (by ryandesign at macports.org):

 On the one hand I would like to accept Jens's changes because he's clearly
 invested a lot of time into making this work. I also know the dependency
 on qt4-mac is extremely heavy, limiting the number of people with the
 patience and resources to test and improve this. We could commit the
 changes now, then make subsequent commits to improve it bit by bit to make
 it more "MacPorts-like", e.g. in the ways described below.

 ----

 Like Randall, I have some reservations about Portfile.diff, which I'm
 reading today for the first time. For example, these lines should be
 removed:

 {{{
 #   Variant "qt4" completes the maximal installation of poppler.
 #   This variant cannot be used together with any of the variants
 #   "qt3Splash", "qt4Splash", "glibSplash", "glibCairo", and "abiword".
 #   These variants are each for a minimal installation of poppler.

     if { [variant_isset qt4] && ($A || $B || $C || $D || $E) } then {
         ui_error
 "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
         ui_error "variant \"qt4\" cannot be used together with any of the
 variants"
         ui_error "\"qt3Splash\", \"qt4Splash\", \"glibSplash\",
 \"glibCairo\", and \"abiword\""
         ui_error
 "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
         return -code 1
     }
 }}}

 The same effect can be achieved by changing this line:

 {{{
 variant qt4 {
 }}}

 To this:

 {{{
 variant qt4 conflicts qt3Splash qt4Splash glibSplash glibCairo abiword {
 }}}

 ----

 From this comment, I gather that using the "quartz" variant requires that
 you use the "glibCairo" variant?

 {{{
 #   variant "quartz" is only necessary if your active port "cairo"
 #   has been build without "X Window" support (variant "no_x11")
 }}}

 If so, it should be marked as such:

 {{{
 variant quartz conflicts x11 requires glibCairo description { Support for
 the native Mac OS X interface } {
 }}}

 ----

 This part is not good:

 {{{
 # Poppler with variants +glibSplash +glibCairo +abiword (+qt3Splash)
 # is the same as Poppler without any variant.
 }}}

 This would be a case when you should use the `default_variants` command.
 Make it so that if the user does not select any variants, the variants
 +glibSplash +glibCairo and +abiword get selected:

 {{{
 if {![variant_isset qt3Splash] && ![variant_isset qt4Splash] &&
 ![variant_isset glibSplash] && ![variant_isset glibCairo] &&
 ![variant_isset abiword] && ![variant_isset quartz]} {
     default_variants +glibSplash +glibCairo +abiword
 }
 }}}

 ----

 Then you can get rid of the global `pre-fetch` block and the
 `cairoWithX11` procedure, and replace the glibCairo variant placeholder
 with this:

 {{{
 variant glibCairo description {GLib bindings to poppler & Cairo output
 device} {
     pre-fetch {
         if {![variant_isset quartz] && ![file exists
 "${prefix}/include/cairo/cairo-xlib.h"]} {
             ui_error
 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
             ui_error "The active port \"cairo\" has been built without X11
 support."
             ui_error "To build Poppler, use the \"+quartz\" variant."
             ui_error
 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
             return -code error
         }
     }
 }
 }}}

 All of the above begin to make the port more "normal", and I think it's
 this kind of thing Randall was talking about when he said the port felt
 over-engineered.

 ----

 Of course, `optionToAppend` and `optionToDelete` are big sticking points
 too. Why is it necessary to use these instead of `configure.args-append`
 and `configure.args-delete`? Same goes for `dependencyToAppend`. Why not
 use `depends_lib-append`?

 ----

 I would remove this bit because it is not necessary:

 {{{
 platform darwin 9 {
     configure.env-append MACOSX_DEPLOYMENT_TARGET=10.5
 }
 }}}

 On Mac OS X 10.5, `MACOSX_DEPLOYMENT_TARGET` is already set to `10.5` by
 Apple. In contrast, on Mac OS X 10.4, 10.3 and 10.2, it is necessary to
 set `MACOSX_DEPLOYMENT_TARGET` because the default value there is `10.1`.

 ----

 This is a comparatively unimportant stylistic nit-pick, but I would use
 underscore_separated_words instead of camelCaseWords; I haven't seen camel
 case used elsewhere in MacPorts.

-- 
Ticket URL: <http://trac.macports.org/ticket/16056#comment:12>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list