[BACK]Return to hacks.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / cairo

Annotation of pkgsrc/graphics/cairo/hacks.mk, Revision 1.2.4.1

1.2.4.1 ! tron        1: # $NetBSD$
1.1       minskim     2:
                      3: .if !defined(CAIRO_HACKS_MK)
                      4: CAIRO_HACKS_MK=        defined
                      5:
                      6: ###
                      7: ### A workaround for MacPorts Ticket #31469
                      8: ### https://trac.macports.org/ticket/31469
                      9: ###
                     10: .if ${OPSYS} == "Darwin" && !empty(PKGSRC_COMPILER:Mgcc)
                     11: _BAD_GCC_BUILD!=       ${CC} --version | (${GREP} -c 'i686-apple-darwin11-llvm-gcc-4\.2\ .*build\ 5658' || ${TRUE})
1.2       minskim    12: .  if ${_BAD_GCC_BUILD} == "1" && exists(/usr/bin/gcc-4.2)
1.1       minskim    13: PKG_HACKS+=    llvm-link
                     14: CONFIGURE_ENV+=        ac_cv_prog_CC=gcc-4.2
                     15: .  endif
                     16: .endif
                     17:
1.2.4.1 ! tron       18: #
        !            19: # Workaround for "the pixman problem" with netbsd-5 native X. The
        !            20: # problem is that if the order of rpath options isn't right when
        !            21: # linking client programs (right being /usr/pkg before /usr/X11R7),
        !            22: # the native pixman library gets pulled in instead of the pkgsrc one,
        !            23: # and then the link fails with undefined symbols from cairo; these are
        !            24: # symbols that are present only in the newer pkgsrc pixman. The
        !            25: # problem with rpath options and ordering is complicated by there
        !            26: # being multiple ways of writing them (-R, -Wl,-rpath, etc.) and as
        !            27: # many packages just blat out flags from various sources they don't
        !            28: # necessarily match or come out in the right order.
        !            29: #
        !            30: # Some cases of "the pixman problem" were solved with one set of
        !            31: # changes a month ago or so, but other packages still fail for the
        !            32: # reasons cited. In the absence of a wrappers-based general solution
        !            33: # to keep the order correct, most or all remaining instances can be
        !            34: # solved by explicitly adding the necessary pixman lib to the link
        !            35: # line instead of pulling it in via cairo's dependency on it. Or at
        !            36: # least, this fixes the build. It should also make the right things
        !            37: # happen during library search (I think) but that's less clear. I hate
        !            38: # ELF.
        !            39: #
        !            40: # The best way to explicitly add pixman to the link line is to hack it
        !            41: # into cairo's .pc file. This is what we do here.
        !            42: #
        !            43: # Note that this hack is also required for 5.99 earlier than whatever
        !            44: # point the necessary updates to X were applied. I'm assuming this is
        !            45: # old enough that nobody's going to care.
        !            46: #
        !            47: .if !empty(MACHINE_PLATFORM:MNetBSD-5.*) && \
        !            48:     empty(MACHINE_PLATFORM:MNetBSD-5.99.*)
        !            49: SUBST_CLASSES+=                pixman
        !            50: SUBST_STAGE.pixman=    post-build
        !            51: SUBST_MESSAGE.pixman=  Hacking pixman into cairo.pc for the "pixman problem".
        !            52: SUBST_FILES.pixman=    src/cairo.pc
        !            53: SUBST_SED.pixman=      -e '/^Libs:/s/-lcairo/-lcairo -lpixman-1/'
        !            54: .endif
        !            55:
1.1       minskim    56: .endif # CAIRO_HACKS_MK

CVSweb <webmaster@jp.NetBSD.org>