[Pp]honon & QCA issue in KDE ports

Michael Dickens michaelld at macports.org
Thu Aug 12 13:01:32 PDT 2010


I think adding a couple bits of code to the KDE group file make sense,
and I'm wondering what others think. - MLD

(1) I've encountered 3 KDE ports now that use #include <Phonon...>
instead of #include <phonon...>.  For those of us who use a
case-sensitive file system, installing this port will generate an error
since Qt 4.6.3 (and 4.7.0b's) install them as the latter.  For now, I've
added a quick patch routine to those ports' Portfile to do a
'reinplace'.  A quick internet search of "#include phonon" reveals that
both ways (P and p) are used regularly -- so, I'm tempted to add in this
patch routine to the overall kde group.  Right now, the patch looks
like:

post-extract {
    # change #include ...Phonon... to ...phonon... in all files that
    # contain that header.
    foreach item [exec grep -lr "Phonon" ${workpath}/${distname}] {
        reinplace "/#include/s at Phonon@phonon@" ${item}
    }
}

but I know that if 'grep' finds nothing it will generate an error (which
is undesirable); hence this patch isn't correct for -all- KDE ports,
just those that need it.  I can do a 'fs-traverse' but that seems
wasteful (though it certainly would work & make for concise coding).

(2) Along the same lines, even though the KDE group specifies (for now)
the 'qt4-mac' Port and the specific location of 'qmake', if any other
ports have installed themselves into the Qt4 area (e.g., QCA) then their
info will not be picked up unless

configure.pkg_config_path-append ${qt_dir}/lib/pkgconfig

is added to the Portfile (hard-wiring the library is dangerous, since
most can be installed as library or framework).  Seems like this line is
generic enough to add to the KDE group file.


More information about the macports-dev mailing list