Skip to content

Commit

Permalink
VLC has become too hard to build "the MacPorts way" on enough supported
Browse files Browse the repository at this point in the history
OS versions and esp. the newer versions. The official build runs on OS X
10.7 (!) and up. It may not take any of its dependencies from MacPorts
but nowadays it can be used as a dependency itself (the embedded libVLC).
This new port implementation installs the app bundle from the distribution
DMG and puts up symlinks to expose the shared libraries and headerfiles
under libexec/vlc3. Part of the headerfiles are installed from the source
tarball; the pkgconfig files are provided by the port.

VLC2: With this change there is no longer a need to impose an OS dependent
hard-wired choice of VLC2 or VLC(3); being able to install VLC2 in
addition to VLC(3) can have an interest (for watching streamed videos).

phonon-backend-vlc : don't depend on libVLC any longer (+vlc2 it still
makes sense to depend on libVLC2).

kde-extra-cmake-modules : upgrade to 5.75.0

phonon-qt5 : upgrade to 4.11.1
  • Loading branch information
RJVB authored and kencu committed Feb 7, 2021
1 parent e237d37 commit ddd6f43
Show file tree
Hide file tree
Showing 35 changed files with 304 additions and 2,326 deletions.
8 changes: 2 additions & 6 deletions audio/phonon-backend-vlc/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if {${subport} eq "${name}-qt5"} {

version 0.10.2.23
}
revision 1

license {LGPL-2.1 LGPL-3}
maintainers {gmail.com:rjvbertin @RJVB} openmaintainer
Expand All @@ -31,18 +32,13 @@ platforms darwin
homepage http://projects.kde.org/projects/kdesupport/phonon/phonon-vlc
distname phonon-backend-vlc-git

if {${os.platform} eq "darwin"} {
if {${os.major} <= 15} {
variant vlc2 description {build against libVLC2} {}
}
}
if {[variant_exists vlc2] && [variant_isset vlc2]} {
depends_lib-append \
path:libexec/vlc2/lib/pkgconfig/libvlc.pc:libVLC2
configure.pkg_config_path-append "${prefix}/libexec/vlc2/lib/pkgconfig"
} else {
depends_lib-append \
path:libexec/vlc3/lib/pkgconfig/libvlc.pc:libVLC
path:libexec/vlc3/lib/pkgconfig/libvlc.pc:VLC
configure.pkg_config_path-append "${prefix}/libexec/vlc3/lib/pkgconfig"
}

Expand Down
88 changes: 34 additions & 54 deletions audio/phonon/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ PortSystem 1.0

name phonon

version 4.10.3
checksums rmd160 7a1934b45a6d54d0803edf0a3cd6d7b5b4ecc1e7 \
sha256 2e8b145669afa0e93833e4064b657677abc9413e4007fa5ddc91397c9bddc295 \
size 336724
revision 0
if {${subport} eq ${name}} {
version 4.10.3
checksums rmd160 7a1934b45a6d54d0803edf0a3cd6d7b5b4ecc1e7 \
sha256 2e8b145669afa0e93833e4064b657677abc9413e4007fa5ddc91397c9bddc295 \
size 336724
revision 0
} else {
# Qt4 support was dropped in 4.11
version 4.11.1
checksums rmd160 035bb6e70e678593cf83673691fb69c8eb0c2248 \
sha256 b4431ea2600df8137a717741ad9ebc7f7ec1649fa3e138541d8f42597144de2d \
size 314732
}

license {LGPL-2.1 LGPL-3}
maintainers {michaelld @michaelld} openmaintainer
description Cross Platform Multimedia API used by KDE4
description Cross Platform Multimedia API used by Qt applications
platforms darwin
homepage https://phonon.kde.org
master_sites kde:stable/${name}/${version}
Expand All @@ -31,11 +39,13 @@ subport ${name}-qt5 {
framework for the application developer. This is the Phonon 4\
transitional library for Qt5 (API compatible with regular Phonon4)

patchfiles-append qt5/patch-support-older-qt5.diff
qt5.depends_component \
qtdeclarative qttools
qttools

depends_build-append path:share/ECM/cmake/ECMConfig.cmake:kde-extra-cmake-modules

depends_build-append port:kde-extra-cmake-modules
configure.args-append -DPHONON_BUILD_PHONON4QT5:BOOL=ON
configure.args-append -DAPPLE_SUPPRESS_X11_WARNING=ON

set LPH libphonon4qt5
post-destroot {
Expand All @@ -49,55 +59,18 @@ subport ${name}-qt5 {
copy ${workpath}/build/demos/simplecapture/simplecapture.app ${demos_dest_dir}
}

# fix library and plugin self-names
system "install_name_tool -id ${prefix}/lib/${LPH}.4.dylib ${destroot}${prefix}/lib/${LPH}.dylib"
system "install_name_tool -id ${prefix}/lib/${LPH}experimental.4.dylib ${destroot}${prefix}/lib/${LPH}experimental.dylib"

# fix use of libphonon4qt5
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${destroot}${prefix}/lib/${LPH}experimental.dylib"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${destroot}${qt_plugins_dir}/designer/phononwidgets.dylib"
system "install_name_tool -id phononwidgets.dylib ${destroot}${qt_plugins_dir}/designer/phononwidgets.dylib"
if {[variant_isset demos]} {
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/simpleplayer.app/Contents/MacOS/simpleplayer"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/metadatareader.app/Contents/MacOS/metadatareader"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/phota.app/Contents/MacOS/phota"
system "install_name_tool -change lib/${LPH}.4.dylib ${prefix}/lib/${LPH}.4.dylib \
${demos_dest_dir}/simplecapture.app/Contents/MacOS/simplecapture"
}
}
}

default_variants +compversion440

# fix use of CMAKE_INSTALL_NAME to be an absolute path
# (RJVB: why is this necessary?)
patchfiles-append patch-cmake_FindPhononInternal.cmake.diff

# fix MODULE names to end in .dylib instead of .so
patchfiles-append patch-cmake_PhononMacros.cmake.diff

variant pulseaudio description "Build Phonon with additional support for PulseAudio" {
depends_lib-append port:pulseaudio
configure.args-append \
-DPULSEAUDIO_INCLUDE_DIR=${prefix}/include \
-DPULSEAUDIO_LIBRARY=${prefix}/lib/libpulse.dylib \
-DPULSEAUDIO_MAINLOOP_LIBRARY=${prefix}/lib/libpulse-mainloop-glib.dylib \
-DWITH_PulseAudio=ON \
-DPHONON_PULSESUPPORT=YES
-DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=OFF
}

if {![variant_isset pulseaudio]} {
configure.args-append \
-DWITH_PulseAudio=OFF \
-DPHONON_PULSESUPPORT=NO \
-DPULSEAUDIO_INCLUDE_DIR= \
-DPULSEAUDIO_LIBRARY= \
-DPULSEAUDIO_MAINLOOP_LIBRARY=
-DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=ON
}

if {${subport} ne "${name}-qt5"} {
Expand All @@ -110,10 +83,21 @@ if {${subport} ne "${name}-qt5"} {
# -- Using CMake automoc builtin
depends_build-append port:automoc

# fix use of CMAKE_INSTALL_NAME to be an absolute path
# (RJVB: why is this necessary?)
patchfiles-append qt4/patch-cmake_FindPhononInternal.cmake.diff
# fix MODULE names to end in .dylib instead of .so
patchfiles-append qt4/patch-cmake_PhononMacros.cmake.diff

variant compversion440 description {Build libraries with compatibility version 4.4.0 for existing Qt4 installs expecting that} {
# fix the library compatibility version to be 4.4.0
patchfiles-append patch-CMakeLists.txt.diff
patchfiles-append qt4/patch-CMakeLists.txt.diff
}
default_variants +compversion440

configure.args-append \
-DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=true \
-DCMAKE_DISABLE_FIND_PACKAGE_QZeitgeist=ON

set LPH libphonon
post-destroot {
Expand Down Expand Up @@ -160,7 +144,7 @@ if {${subport} ne "${name}-qt5"} {
}
}

cmake.out_of_source yes
build.post_args-append -k

post-patch {
set rel_mp_qt_cmake_dir [strsed ${qt_cmake_module_dir} "g@${prefix}/@@"]
Expand All @@ -172,10 +156,6 @@ if {[info exists qt_cmake_defines]} {
configure.args-append \
${qt_cmake_defines}
}
# nb: there is no WITH_QZeitgeist option, keeping it out of nostalgia
configure.args-append \
-DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=true \
-DWITH_QZeitgeist=OFF

configure.ldflags-append -F${qt_frameworks_dir}

Expand Down
38 changes: 0 additions & 38 deletions audio/phonon/files/phonon

This file was deleted.

13 changes: 13 additions & 0 deletions audio/phonon/files/qt5/patch-support-older-qt5.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git phonon/factory.cpp phonon/factory.cpp
index 66449be1ba8f2084a10d0e184fa8bf0a58b9a240..baa1420da9ec8db4becafaebc16118f2cc335c50 100644
--- phonon/factory.cpp
+++ phonon/factory.cpp
@@ -474,7 +474,7 @@ QList<BackendDescriptor> Factory::findBackends()
}

// Apply PHONON_BACKEND override if set.
- const QString backendEnv = qEnvironmentVariable("PHONON_BACKEND");
+ const QString backendEnv = qgetenv("PHONON_BACKEND");
if (backendEnv.isEmpty()) {
return backendList;
}
23 changes: 14 additions & 9 deletions kde/kde-extra-cmake-modules/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,30 @@ set ECM extra-cmake-modules
name kde-${ECM}
subport ${name}-devel {}

set kf5.branch 5.59
set kf5.branch 5.75

if {${subport} eq "${name}-devel"} {
fetch.type git
git.url git://anongit.kde.org/extra-cmake-modules
git.branch 3f51cb1fcd5f7b00b565b9f2ddf7366aeef3c415
# v5.59.0-1-g3f51cb1
version 5.59.0.1
git.url https://invent.kde.org/kde/extra-cmake-modules
git.branch a670c57c193c8632bd6d12bdf1afd237b5d753a3
# v5.75.0-7-ga670c57
version 5.75.0.7
distname ECM-5.1x.git
} else {
version ${kf5.branch}.0
set branch [join [lrange [split ${version} .] 0 1] .]
master_sites http://download.kde.org/stable/frameworks/${branch}/
master_sites https://download.kde.org/stable/frameworks/${branch}/

if {${os.platform} eq "darwin" && ${os.major} <= 13} {
# avoid certificate issues on kde.org
fetch.ignore_sslcert yes
}
distname ${ECM}-${version}
use_xz yes

checksums rmd160 6a477336c39f9866da84095d6e746859b3829b42 \
sha256 1a630b242242ac32d20d14e7ae5645aa28a47676eae0e62ed76af8bc1f56c438 \
size 326980
checksums rmd160 bf31cee9a2387236a89c5e82898bee6e2f63b252 \
sha256 878d47a901056d5303bf37414d787046e1d38fac2bd9f2f5ddd00a9dd6b9f4eb \
size 348904
}

supported_archs noarch
Expand All @@ -42,6 +46,7 @@ long_description Extra CMake Modules, or ECM, aims to augment CMake with addi
platforms darwin
homepage http://projects.kde.org/projects/kdesupport/${ECM}

patch.pre_args -Np1
patchfiles-append patch-BUNDLEDIR.diff

# https://phabricator.kde.org/D5865
Expand Down
10 changes: 5 additions & 5 deletions kde/kde-extra-cmake-modules/files/patch-BUNDLEDIR.diff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git kde-modules/KDEInstallDirs.cmake kde-modules/KDEInstallDirs.cmake
index 5c8783b..f5dfd6d 100644
--- kde-modules/KDEInstallDirs.cmake
+++ kde-modules/KDEInstallDirs.cmake
diff --git a/kde-modules/KDEInstallDirs.cmake b/kde-modules/KDEInstallDirs.cmake
index d739cf1..cafb7ad 100644
--- a/kde-modules/KDEInstallDirs.cmake
+++ b/kde-modules/KDEInstallDirs.cmake
@@ -18,7 +18,7 @@
# deprecated variable name in square brackets):
#
Expand All @@ -11,7 +11,7 @@ index 5c8783b..f5dfd6d 100644
# ``EXECROOTDIR``
# executables and libraries (``<empty>``) [``EXEC_INSTALL_PREFIX``]
# ``BINDIR``
@@ -417,7 +417,7 @@ macro(_define_non_cache varname value)
@@ -409,7 +409,7 @@ macro(_define_non_cache varname value)
endmacro()

if(APPLE)
Expand Down
12 changes: 6 additions & 6 deletions kde/kde-extra-cmake-modules/files/patch-doc-building.diff
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
diff --git docs/CMakeLists.txt docs/CMakeLists.txt
index f17400f..2dd6b8b 100644
--- cmake/orig.FindSphinx.cmake 2015-12-06 15:09:22.000000000 +0100
+++ cmake/FindSphinx.cmake 2015-12-15 13:06:38.000000000 +0100
@@ -56,6 +56,9 @@
diff --git a/cmake/FindSphinx.cmake b/cmake/FindSphinx.cmake
index dc83ec6..7d39969 100644
--- a/cmake/FindSphinx.cmake
+++ b/cmake/FindSphinx.cmake
@@ -35,6 +35,9 @@ find_program(Sphinx_BUILD_EXECUTABLE
sphinx-build
sphinx-build2
sphinx-build3
+ sphinx-build-2.7
+ sphinx-build-3.4
+ sphinx-build-3.5
DOC "Sphinx Documentation Builder (http://sphinx-doc.org/)"
DOC "Sphinx Documentation Builder (https://www.sphinx-doc.org/)"
)

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git kde-modules/KDECompilerSettings.cmake kde-modules/KDECompilerSettings.cmake
index 8f87ecc1970b3523890e0c91d7627dd7ec5fb542..ae2eaffc79273185a196ee00986a017245f3c09e 100644
--- kde-modules/KDECompilerSettings.cmake
+++ kde-modules/KDECompilerSettings.cmake
@@ -219,6 +219,46 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index 63a5ce1..c42fd55 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -210,6 +210,46 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-operator-names")
endif()

Expand Down

0 comments on commit ddd6f43

Please sign in to comment.