[92891] branches/mld-qt-481/dports/audio/phonon

michaelld at macports.org michaelld at macports.org
Thu May 10 06:29:20 PDT 2012


Revision: 92891
          https://trac.macports.org/changeset/92891
Author:   michaelld at macports.org
Date:     2012-05-10 06:29:19 -0700 (Thu, 10 May 2012)
Log Message:
-----------
phonon : update to 4.6.0; use default CMake build.

Modified Paths:
--------------
    branches/mld-qt-481/dports/audio/phonon/Portfile

Removed Paths:
-------------
    branches/mld-qt-481/dports/audio/phonon/files/

Modified: branches/mld-qt-481/dports/audio/phonon/Portfile
===================================================================
--- branches/mld-qt-481/dports/audio/phonon/Portfile	2012-05-10 10:14:22 UTC (rev 92890)
+++ branches/mld-qt-481/dports/audio/phonon/Portfile	2012-05-10 13:29:19 UTC (rev 92891)
@@ -3,169 +3,59 @@
 
 PortSystem          1.0
 PortGroup           qt4 1.0
+PortGroup           cmake 1.0
 
 name                phonon
-version             4.4.2
-revision            3
+version             4.6.0
 categories          audio kde kde4
 license             {LGPL-2.1 LGPL-3}
-maintainers         nomaintainer
+maintainers         michaelld nomaintainer
 description         Cross Platform Multimedia API used by KDE4
 long_description    Cross Platform Multimedia API used by KDE4
 platforms           darwin
 homepage            http://phonon.kde.org
-master_sites        kde:stable/${name}/${version}/
-use_bzip2           yes
+master_sites        kde:stable/${name}/${version}/src
+use_xz              yes
 distname            phonon-${version}
-checksums           md5 d9eab28383783261254f1cef3b92a3fa \
-                    sha1 c329d924fb75a89a9de8a4d799ff4dcd7ee3302e \
-                    rmd160 aa37903f166904dd09401541df8fc268a2858606
+checksums           md5     bbe0c1c62ed14c31479c4c1a6cf1e173 \
+                    sha1    d8dbc188b58c6dd9c6a73d3742a25291e647bb95 \
+                    rmd160  4b6037744c519613f0e39065a92d6742305e1366
 
 depends_build-append  port:automoc
 
-# after extracting both qt4-mac (latest) and phonon, do:
-# $ cd `port dir phonon`/phonon*/qt7
-# $ for tf in `ls -1`; do \
-# > diff -u ${tf} `port dir qt4-mac`/work/qt-*/src/3rdparty/phonon/qt7/${tf};
-# > done > `port dir phonon`/files/patch-qt7.diff
-patchfiles            patch-qt7.diff
+configure.args-append   \
+    ${qt_cmake_defines} \
+    -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=true
 
-set PHONON_MAJOR_VERSION [lindex [split ${version} "."] 0]
-set PHONON_MINOR_VERSION [lindex [split ${version} "."] 1]
-set PHONON_PATCH_VERSION [lindex [split ${version} "."] 2]
+post-destroot {
 
-set PHONON_BUILD_DIR ${worksrcpath}/build
+    # fix plugin name
 
-post-patch {
-    # fix phonon/audiodataoutput.cpp to not use the moc file
-    reinplace "/audiodataoutput\.moc/d" \
-        ${worksrcpath}/phonon/audiodataoutput.cpp
+    move ${destroot}${qt_plugins_dir}/designer/libphononwidgets.so \
+        ${destroot}${qt_plugins_dir}/designer/libphononwidgets.dylib
 
-    # install qt 4.7.0 QMake files into phonon source
-    system "cd ${filespath}/qmake && tar cf - . | \
-        (cd ${worksrcpath}; tar xf -)"
+    # fix library and plugin self-names
 
-    # create the 'phononnamespace.h' file
-    system "cd ${worksrcpath}/phonon && \
-        sed -e 's, at PHONON_LIB_MAJOR_VERSION@,${PHONON_MAJOR_VERSION},g' \
-            -e 's, at PHONON_LIB_MINOR_VERSION@,${PHONON_MINOR_VERSION},g' \
-            -e 's, at PHONON_LIB_PATCH_VERSION@,${PHONON_PATCH_VERSION},g' \
-            phononnamespace.h.in > phononnamespace.h"
-
-    # create the 'phonon.pc' files (release and debug)
-    system "cd ${worksrcpath} && \
-        mkdir -p ${PHONON_BUILD_DIR}/lib/pkgconfig && \
-        sed -e 's, at PHONON_LIB_MAJOR_VERSION@,${PHONON_MAJOR_VERSION},g' \
-            -e 's, at PHONON_LIB_MINOR_VERSION@,${PHONON_MINOR_VERSION},g' \
-            -e 's, at PHONON_LIB_PATCH_VERSION@,${PHONON_PATCH_VERSION},g' \
-            -e 's, at QT_MOC_CMD@,${qt_moc_cmd},g' \
-            -e 's, at QT_UIC_CMD@,${qt_uic_cmd},g' \
-            -e 's, at QT_LIBS_DIR@,${qt_libs_dir},g' \
-            -e 's, at QT_INCLUDES_DIR@,${qt_includes_dir},g' \
-            -e 's, at PHONON_PREFIX@,${prefix},g' < phonon_debug.pc.in > \
-            ${PHONON_BUILD_DIR}/lib/pkgconfig/phonon_debug.pc"
-    system "cd ${PHONON_BUILD_DIR}/lib/pkgconfig && \
-        sed -e 's,_debug,,g' \
-            -e 's,debug,release,g' \
-            -e 's,Debug,Release,g' \
-            phonon_debug.pc > phonon.pc"
-
-    # create the 'headers.pri' and 'phonon' files
-    set public_headers [exec find ${worksrcpath}/phonon \
-                                 -name "*.h" -maxdepth 1 -mindepth 1 | \
-                             sed -e "s@${worksrcpath}/@@g" | \
-                             grep -v "_p"]
-    set private_headers [exec find ${worksrcpath}/phonon \
-                                 -name "*.h" -maxdepth 1 -mindepth 1 | \
-                             sed -e "s@${worksrcpath}/@@g" | \
-                             grep "_p"]
-    set class_headers [exec find ${worksrcpath}/includes/phonon \
-                               -name "\[A-Z\]*" | \
-                           sed -e "s@${worksrcpath}/includes/@@g"]
-
-    # create 'phonon' file first
-    set INCLUDE_HEADERS ""
-    foreach header ${public_headers} {
-        set INCLUDE_HEADERS "${INCLUDE_HEADERS}\#include \"${header}\"@"
+    foreach fixfile { lib/libphonon.dylib \
+                      lib/libphononexperimental.dylib  } {
+        system "install_name_tool -id ${prefix}/${fixfile} ${destroot}${prefix}/${fixfile}"
     }
-    system "cd ${worksrcpath} && \
-              sed -e 's, at INCLUDE_HEADERS@,${INCLUDE_HEADERS},' phonon.in | \
-              tr '@' '\\n' > includes/phonon/phonon"
-    unset INCLUDE_HEADERS
 
-    # add new phonon to list of headers
-    lappend public_headers "includes/phonon/phonon"
+    # fix use of libphonon
 
-    # create 'headers.pri' file second
-    set PUBLIC_HEADERS ""
-    foreach header ${public_headers} {
-        lappend PUBLIC_HEADERS "../${header}"
+    foreach fixfile { lib/libphononexperimental.dylib \
+                      share/qt4/plugins/designer/libphononwidgets.dylib } {
+        system "install_name_tool -change lib/libphonon.4.dylib ${prefix}/lib/libphonon.4.dylib ${destroot}${prefix}/${fixfile}"
     }
-    set CLASS_HEADERS ""
-    foreach header ${class_headers} {
-        lappend CLASS_HEADERS "../includes/${header}"
-    }
-    set PRIVATE_HEADERS ""
-    foreach header ${private_headers} {
-        lappend PRIVATE_HEADERS "../${header}"
-    }
-    system "cd ${worksrcpath} && \
-              sed -e 's, at PHONON_PUBLIC_HEADERS@,${PUBLIC_HEADERS},' \
-                  -e 's, at PHONON_CLASS_HEADERS@,${CLASS_HEADERS},' \
-                  -e 's, at PHONON_PRIVATE_HEADERS@,${PRIVATE_HEADERS},' \
-                headers.pri.in > includes/phonon/headers.pri"
-    unset PUBLIC_HEADERS
-    unset CLASS_HEADERS
-    unset PRIVATE_HEADERS
-}
 
-pre-configure {
-    # set arch type(s); done is a stage to make sure the 'options
-    # qt_arch_types' is evaluated -after- +universal (if selected).
-    configure.pre_args-append CONFIG+="${qt_arch_types}"
+    # move odd cmake directory into the cmake module's directory
 
-    # set build type
-    set build_type "release"
-    if {[variant_isset debug]} {
-        set build_type "debug_and_release build_all"
-    }
-    configure.pre_args-append CONFIG+=\"${build_type}\"
-}
-
-# set up to use the installed QMake files
-configure.cmd       ${qt_qmake_cmd}
-configure.pre_args  \
-    CONFIG+="phonon phonon-backend" \
-    PHONON_MAJOR_VERSION=${PHONON_MAJOR_VERSION} \
-    PHONON_MINOR_VERSION=${PHONON_MINOR_VERSION} \
-    PHONON_PATCH_VERSION=${PHONON_PATCH_VERSION} \
-    WORKSRCPATH=${worksrcpath} \
-    LOCAL_BUILD_TREE=${PHONON_BUILD_DIR}
-configure.args      "-o Makefile phonon.pro"
-configure.universal_args
-
-# allow ccache, if specified by the user
-pre-build {
-    if {[tbool configure.ccache]} {
-        build.post_args "CCACHE=ccache"
-    }
-}
-
-# Install cmake files (taken from port 'kdelibs4'). To use this file,
-# include '-DCMAKE_MODULE_PATH=...' in configure.args during the
-# initial 'configure' stage (which uses CMake), to the full path of
-# where the CMake files are installed.
-post-destroot {
     xinstall -m 755 -d ${destroot}${qt_cmake_module_dir}
-    xinstall -m 644 -W ${filespath} \
-        FindPhonon.cmake \
+    move ${destroot}${prefix}/lib/cmake/phonon \
         ${destroot}${qt_cmake_module_dir}
+
 }
 
-universal_variant   yes
-
-variant debug description "Build release and debug versions" {}
-
 livecheck.type		regex
 livecheck.url		http://www.gtlib.gatech.edu/pub/kde/stable/${name}/
 livecheck.regex		"\(\\d+(?:\\.\\d+)*)\/"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120510/edcc0d5f/attachment-0001.html>


More information about the macports-changes mailing list