[MacPorts] #50094: new ports: kf5-{libkomparediff2,kompare}
MacPorts
noreply at macports.org
Sun Dec 20 13:51:53 PST 2015
#50094: new ports: kf5-{libkomparediff2,kompare}
--------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: submission | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
--------------------------+--------------------------------
Comment (by rjvbertin@…):
OK, I have managed to create support for a legagy prefix in the KDE4
PortGroup (the kde4.include_prefix bit should already have been
committed?!) :
{{{
# Install the kdelibs headerfiles in their own directory to prevent
clashes with KF5 headers
set kde4.include_prefix KDE4
set kde4.include_dirs ${prefix}/include/${kde4.include_prefix}
set kde4.legacy_prefix ${prefix}/libexec/kde4-legacy
# Certain ports will need to be installed in "KF5 compatibility mode" if
they are to co-exist
# with their KF5 counterparts. Call `kde4.use_legacy_prefix` to activate
this mode, *before*
# the configure step is executed and taking care not to undo the effects
proc kde4.use_legacy_prefix {} {
global prefix
global kde4.legacy_prefix
configure.pre_args-replace \
-DCMAKE_INSTALL_PREFIX=${prefix}
-DCMAKE_INSTALL_PREFIX=${kde4.legacy_prefix}
configure.args-replace \
-DCMAKE_INSTALL_RPATH=${prefix}/lib
-DCMAKE_INSTALL_RPATH="${prefix}/lib\;${kde4.legacy_prefix}/lib"
}
# Call kde4.restore_from_legacy_prefix from the post-destroot phase of a
port that uses
# KF5 compatibility mode. That mode is very indiscriminate, installing
everything into the
# legacy_prefix initially. Most things will actually have to be moved back
out into the
# regular prefix. This procedure automates what can be automated, but may
also overshoot
# its goal.
# This procedure is bound to evolve.
proc kde4.restore_from_legacy_prefix {} {
global destroot
global prefix
global kde4.legacy_prefix
if {[file exists ${destroot}${kde4.legacy_prefix}/lib/kde4]} {
# move back the kparts to where they should be
file rename ${destroot}${kde4.legacy_prefix}/lib/kde4
${destroot}${prefix}/lib/kde4
}
if {[file exists ${destroot}${kde4.legacy_prefix}/share]} {
# move back the share directory to where it should be;
# first delete the share directory that was created for us and
should be empty:
file delete -force ${destroot}${prefix}/share
file rename ${destroot}${kde4.legacy_prefix}/share
${destroot}${prefix}/share
}
}
}}}
With this, I can now install almost all of libkomparediff2 and kompare
(KDE4 versions), except of course for the HTML handbook and the icons. See
the updated diffs for the respective Portfiles.
Marko, can you double-check the PortGroup from my macstrop repo and commit
it for me please?
--
Ticket URL: <https://trac.macports.org/ticket/50094#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list