<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[145427] trunk/dports/multimedia</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/145427">145427</a></dd>
<dt>Author</dt> <dd>ctreleaven@macports.org</dd>
<dt>Date</dt> <dd>2016-02-04 13:21:53 -0800 (Thu, 04 Feb 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>move mythtv-core.27 to mythtv.27; add mythtv-plugins.27 subport; update to 2016Jan22</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsmultimediamythtv27Portfile">trunk/dports/multimedia/mythtv.27/Portfile</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/dports/multimedia/mythtv.27/</li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li>trunk/dports/multimedia/mythtv-core.27/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsmultimediamythtv27Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mythtv.27/Portfile (145426 => 145427)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mythtv-core.27/Portfile        2016-02-04 21:19:00 UTC (rev 145426)
+++ trunk/dports/multimedia/mythtv.27/Portfile        2016-02-04 21:21:53 UTC (rev 145427)
</span><span class="lines">@@ -10,12 +10,11 @@
</span><span class="cx"> # set fullhash 5e18f50da3debb93bfa8850fc86d884d8ed96628
</span><span class="cx"> set majorversion .27
</span><span class="cx"> set minorversion .5
</span><ins>+set lastcommit 20160122
</ins><span class="cx"> github.setup MythTV mythtv ${shorthash}
</span><span class="cx"> checksums rmd160 8095a5d4dee289d1f1a889c369aee4ae9cb2e0f3 \
</span><span class="cx"> sha256 dea36afe5f32fb35e5882a6c103528b9db959a14b75b2dc0fcab19811d81b341
</span><span class="cx">
</span><del>-name mythtv-core${majorversion}
-version 0${majorversion}${minorversion}-Fixes-20151222
</del><span class="cx"> categories multimedia
</span><span class="cx"> platforms darwin
</span><span class="cx"> # i386 unsupported -- https://trac.macports.org/ticket/40337
</span><span class="lines">@@ -23,25 +22,12 @@
</span><span class="cx"> license GPL-2
</span><span class="cx"> maintainers ctreleaven openmaintainer
</span><span class="cx">
</span><del>-description personal video recorder (PVR) and media centre system
-long_description The ultimate Digital Video Recorder and home media \
- center hub. Think of it as a Free and Open Source alternative \
- to Windows Media Center or Tivo.
-
</del><span class="cx"> homepage http://www.mythtv.org/
</span><ins>+universal_variant no
</ins><span class="cx">
</span><del>-set nick mythtv
-set mythtvhomedir ${prefix}/var/mythtvuser
-set mythtvlogdir ${prefix}/var/log/${nick}${majorversion}
-set mythtvrundir ${prefix}/var/run/${nick}${majorversion}
-set mythtvpidfile ${mythtvrundir}/${nick}
-set plistdir ${prefix}/Library/LaunchDaemons
-set plistlabel org.mythtv.mythbackend
-set plistfile org.mythtv.mythbackend.plist
-set mythverstring v0${majorversion}${minorversion}-${shorthash}-MacPorts
-set mythbranch fixes/0${majorversion}
-set applescripts {Myth_Frontend Myth_Filldatabase Myth_Setup Myth_Stop_Start}
-set mysqlver mariadb
</del><ins>+livecheck.version ${majorversion}${minorversion}
+livecheck.regex "archive/v(0.27\[\\.\\d\]?)${extract.suffix}"
+
</ins><span class="cx"> set perlver perl5.22
</span><span class="cx"> set perlbin ${prefix}/bin/${perlver}
</span><span class="cx"> set perlmodver p5.22
</span><span class="lines">@@ -49,393 +35,518 @@
</span><span class="cx"> set pythonbin ${prefix}/bin/${pythonver}
</span><span class="cx"> set pymodver py27
</span><span class="cx">
</span><del>-depends_lib port:bzip2 \
- port:libass \
- port:libcdio \
- port:libdvdcss \
- port:libiconv \
- port:libxml2 \
- port:fftw-3-single \
- port:freetype \
- port:lame \
- port:faac \
- port:x264 \
- path:lib/libssl.dylib:openssl \
- port:qt4-mac \
- port:qt4-mac-${mysqlver}-plugin \
- port:taglib \
- port:zlib \
- port:${pymodver}-mysql \
- port:${pymodver}-lxml \
- port:${pymodver}-urlgrabber \
- port:${perlmodver}-dbd-mysql \
- port:${perlmodver}-http-request-ascgi \
- port:${perlmodver}-lwp-useragent-determined \
- port:${perlmodver}-io-socket-inet6 \
- port:${perlmodver}-datemanip \
- port:${perlmodver}-net-upnp
</del><ins>+subport mythtv-core.${majorversion} {
+        name mythtv-core${majorversion}
+        version 0${majorversion}${minorversion}-Fixes-${lastcommit}
</ins><span class="cx">
</span><del>-depends_build port:yasm port:pkgconfig
</del><ins>+        description personal video recorder (PVR) and media centre system
+        long_description The ultimate Digital Video Recorder and home media \
+                                                center hub. Think of it as a Free and Open Source alternative \
+                                                to Windows Media Center or Tivo.
</ins><span class="cx">
</span><del>-conflicts mythtv-core.25 mythtv-core.26
</del><ins>+        set nick mythtv
+        set mythtvhomedir ${prefix}/var/mythtvuser
+        set mythtvlogdir ${prefix}/var/log/${nick}${majorversion}
+        set mythtvrundir ${prefix}/var/run/${nick}${majorversion}
+        set mythtvpidfile ${mythtvrundir}/${nick}
+        set plistdir ${prefix}/Library/LaunchDaemons
+        set plistlabel org.mythtv.mythbackend
+        set plistfile org.mythtv.mythbackend.plist
+        set mythverstring v0${majorversion}${minorversion}-${shorthash}-MacPorts
+        set mythbranch fixes/0${majorversion}
+        set applescripts {Myth_Frontend Myth_Filldatabase Myth_Setup Myth_Stop_Start}
+        set mysqlver mariadb
</ins><span class="cx">
</span><del>-depends_run port:logrotate
</del><ins>+        depends_lib port:bzip2 \
+                                                port:libass \
+                                                port:libcdio \
+                                                port:libdvdcss \
+                                                port:libiconv \
+                                                port:libxml2 \
+                                                port:fftw-3-single \
+                                                port:freetype \
+                                                port:lame \
+                                                port:faac \
+                                                port:x264 \
+                                                path:lib/libssl.dylib:openssl \
+                                                port:qt4-mac \
+                                                port:qt4-mac-${mysqlver}-plugin \
+                                                port:taglib \
+                                                port:zlib \
+                                                port:${pymodver}-mysql \
+                                                port:${pymodver}-lxml \
+                                                port:${pymodver}-urlgrabber \
+                                                port:${perlmodver}-dbd-mysql \
+                                                port:${perlmodver}-http-request-ascgi \
+                                                port:${perlmodver}-lwp-useragent-determined \
+                                                port:${perlmodver}-io-socket-inet6 \
+                                                port:${perlmodver}-datemanip \
+                                                port:${perlmodver}-net-upnp
</ins><span class="cx">
</span><del>-pre-fetch {
- if {${os.platform} eq "darwin" && ${os.major} < 9} {
- ui_error "${name} ${version} requires Mac OS X 10.5 or greater."
- return -code error "incompatible Mac OS X version"
- }
-}
</del><ins>+        depends_build port:yasm port:pkgconfig
</ins><span class="cx">
</span><del>-# revert rpath linking stuff as it is non-functional in MacPorts
-patchfiles-append patch-rpath_linking.diff
</del><ins>+        conflicts mythtv-core.25 mythtv-core.26
</ins><span class="cx">
</span><del>-post-extract {
- file mkdir ${worksrcpath}/macports
- foreach {applescript} ${applescripts} {
- copy ${filespath}/${applescript}.applescript ${worksrcpath}/macports/${applescript}.applescript
- }
- copy ${filespath}/${plistfile} ${worksrcpath}/macports/${plistfile}
- copy ${filespath}/logrotate.conf ${worksrcpath}/macports/logrotate.conf
- copy ${filespath}/logrotate.mythtv ${worksrcpath}/macports/logrotate.mythtv
- copy ${filespath}/my.cnf ${worksrcpath}/macports/my.cnf
- copy ${filespath}/mythconverg_init.sql ${worksrcpath}/macports/mythconverg_init.sql
-}
</del><ins>+        depends_run port:logrotate
</ins><span class="cx">
</span><del>-post-patch {
- set sedPath ${worksrcpath}/mythtv/
- ui_info "Make Myth utils use MacPorts Perl"
- reinplace -locale C "s|check_cmd perl -e|check_cmd ${perlbin} -e|" \
- ${sedPath}configure
</del><ins>+        pre-fetch {
+                if {${os.platform} eq "darwin" && ${os.major} < 9} {
+                        ui_error "${name} ${version} requires Mac OS X 10.5 or greater."
+                        return -code error "incompatible Mac OS X version"
+                }
+        }
</ins><span class="cx">
</span><del>- reinplace -locale C "s|#!/usr/bin/env perl|#!${perlbin}|" \
- ${sedPath}programs/scripts/internetcontent/topdocumentaryfilm.pl \
- ${sedPath}programs/scripts/internetcontent/twit.tv.pl
</del><ins>+        # revert rpath linking stuff as it is non-functional in MacPorts
+        patchfiles-append patch-rpath_linking.diff
</ins><span class="cx">
</span><del>- reinplace -locale C "s|#!/usr/bin/perl|#!${perlbin}|" \
- ${sedPath}bindings/perl/Makefile.PL \
- ${sedPath}bindings/perl/MythTV.pm \
- ${sedPath}contrib/maintenance/optimize_mythdb.pl \
- ${sedPath}contrib/user_jobs/mythlink.pl \
- ${sedPath}programs/scripts/database/mythconverg_backup.pl \
- ${sedPath}programs/scripts/database/mythconverg_restore.pl
</del><ins>+        post-extract {
+                file mkdir ${worksrcpath}/macports
+                foreach {applescript} ${applescripts} {
+                        copy ${filespath}/${applescript}.applescript ${worksrcpath}/macports/${applescript}.applescript
+                }
+                copy ${filespath}/${plistfile} ${worksrcpath}/macports/${plistfile}
+                copy ${filespath}/logrotate.conf ${worksrcpath}/macports/logrotate.conf
+                copy ${filespath}/logrotate.mythtv ${worksrcpath}/macports/logrotate.mythtv
+                copy ${filespath}/my.cnf ${worksrcpath}/macports/my.cnf
+                copy ${filespath}/mythconverg_init.sql ${worksrcpath}/macports/mythconverg_init.sql
+        }
</ins><span class="cx">
</span><del>- reinplace -locale C "s|/usr/local/bin|${prefix}/lib/${mysqlver}/bin|" \
- ${sedPath}programs/scripts/database/mythconverg_backup.pl \
- ${sedPath}programs/scripts/database/mythconverg_restore.pl
</del><ins>+        post-patch {
+                set sedPath ${worksrcpath}/mythtv/
+                ui_info "Make Myth utils use MacPorts Perl"
+                reinplace -locale C "s|check_cmd perl -e|check_cmd ${perlbin} -e|" \
+                        ${sedPath}configure
</ins><span class="cx">
</span><del>- ui_info "Record Myth version strings"
- reinplace -locale C "s#\${SOURCE_VERSION}#${mythverstring}#g" ${sedPath}version.sh
- reinplace -locale C "s#\${BRANCH}#${mythbranch}#g" ${sedPath}version.sh
</del><ins>+                reinplace -locale C "s|#!/usr/bin/env perl|#!${perlbin}|" \
+                        ${sedPath}programs/scripts/internetcontent/topdocumentaryfilm.pl \
+                        ${sedPath}programs/scripts/internetcontent/twit.tv.pl
</ins><span class="cx">
</span><del>- ui_info "Make Myth scripts use MacPorts Python <<<<"
- # Hack to install Python bindings in ${prefix}/Library/Frameworks/Python.framework/Versions/2.7
- reinplace -locale C "s|\$(ROOT_FLAGS) \$(PREFIX_FLAGS)|\$(ROOT_FLAGS) \--prefix=\"${frameworks_dir}/Python.framework/Versions/2.7\"|" \
- ${sedPath}/bindings/python/Makefile
- reinplace -locale C "s|/usr/local|${prefix}|" ${worksrcpath}/mythtv/bindings/python/MythTV/static.py
- fs-traverse f ${sedPath}/bindings/python/ {
- if [string equal [ file extension ${f} ] ".py" ] {
- reinplace -locale C "s|^#! */usr/bin/env python\$|#!${pythonbin}|" ${f}
- }
- }
- fs-traverse f ${sedPath}/programs/scripts/ {
- if [string equal [ file extension ${f} ] ".py" ] {
- reinplace -locale C "s|^#! */usr/bin/env python\$|#!${pythonbin}|" ${f}
- }
- }
- foreach f [glob -directory ${sedPath}/programs/scripts/hardwareprofile *.py] {
- # fix even though they're currently non-functional on OS X
- reinplace -locale C "s|^#!/usr/bin/python\$|#!${pythonbin}|" ${f}
- }
</del><ins>+                reinplace -locale C "s|#!/usr/bin/perl|#!${perlbin}|" \
+                        ${sedPath}bindings/perl/Makefile.PL \
+                        ${sedPath}bindings/perl/MythTV.pm \
+                        ${sedPath}contrib/maintenance/optimize_mythdb.pl \
+                        ${sedPath}contrib/user_jobs/mythlink.pl \
+                        ${sedPath}programs/scripts/database/mythconverg_backup.pl \
+                        ${sedPath}programs/scripts/database/mythconverg_restore.pl
</ins><span class="cx">
</span><del>- foreach {applescript} ${applescripts} {
- reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/${applescript}.applescript
- reinplace -locale C "s|@APPLICATIONS_DIR@|${applications_dir}|" ${worksrcpath}/macports/${applescript}.applescript
- reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|" ${worksrcpath}/macports/${applescript}.applescript
- reinplace -locale C "s|@MYTHTVPIDFILE@|${mythtvpidfile}|" ${worksrcpath}/macports/${applescript}.applescript
- }
- reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/${plistfile}
- reinplace -locale C "s|@PLISTLABEL@|${plistlabel}|g" ${worksrcpath}/macports/${plistfile}
- reinplace -locale C "s|@PYTHONVER@|${pythonver}|" ${worksrcpath}/macports/${plistfile}
- reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|" ${worksrcpath}/macports/${plistfile}
- reinplace -locale C "s|@MYTHTVPIDFILE@|${mythtvpidfile}|" ${worksrcpath}/macports/${plistfile}
- reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/logrotate.conf
- reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/my.cnf
- reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|g" ${worksrcpath}/macports/logrotate.mythtv
- reinplace -locale C "s|xxxyyyzzz|${mythtvpidfile}|" ${worksrcpath}/mythtv/configure
-}
-# Block various compilers:
-#
-# (shamelessly stolen from Qt4-mac, thanks Michael!)
-# * Some older versions of CLANG do not honor the LIBRARY_PATH
-# environment variables, which is required for compiling
-# this port when using MacPorts. The versions seem to be: MacPorts
-# CLANG 3.0 or earlier, and Apple CLANG 318.0.61 or older (XCode 4.3.3 and prior).
-#
-# See http://code.mythtv.org/trac/ticket/11070
-# Run-time failures experienced with certain versions of Clang. Unable to discern cause.
-# Most recent version of clang seems OK, let's try again
</del><ins>+                reinplace -locale C "s|/usr/local/bin|${prefix}/lib/${mysqlver}/bin|" \
+                        ${sedPath}programs/scripts/database/mythconverg_backup.pl \
+                        ${sedPath}programs/scripts/database/mythconverg_restore.pl
</ins><span class="cx">
</span><del>-compiler.fallback-append apple-gcc-4.2
-compiler.blacklist-append { clang <= 500.2.79 } \
- macports-clang*
</del><ins>+                ui_info "Record Myth version strings"
+                reinplace -locale C "s#\${SOURCE_VERSION}#${mythverstring}#g" ${sedPath}version.sh
+                reinplace -locale C "s#\${BRANCH}#${mythbranch}#g" ${sedPath}version.sh
</ins><span class="cx">
</span><del>-# Clear all MacPorts flags...MythTV is smart enough to set up its own.
-# (ala qt4-mac/Portfile)
-configure.cflags
-configure.cppflags
-configure.cxxflags
-configure.objcflags
-configure.ldflags
</del><ins>+                ui_info "Make Myth scripts use MacPorts Python <<<<"
+                # Hack to install Python bindings in ${prefix}/Library/Frameworks/Python.framework/Versions/2.7
+                reinplace -locale C "s|\$(ROOT_FLAGS) \$(PREFIX_FLAGS)|\$(ROOT_FLAGS) \--prefix=\"${frameworks_dir}/Python.framework/Versions/2.7\"|" \
+                        ${sedPath}/bindings/python/Makefile
+                reinplace -locale C "s|/usr/local|${prefix}|" ${worksrcpath}/mythtv/bindings/python/MythTV/static.py
+                fs-traverse f ${sedPath}/bindings/python/ {
+                        if [string equal [ file extension ${f} ] ".py" ] {
+                                reinplace -locale C "s|^#! */usr/bin/env python\$|#!${pythonbin}|" ${f}
+                        }
+                }
+                fs-traverse f ${sedPath}/programs/scripts/ {
+                        if [string equal [ file extension ${f} ] ".py" ] {
+                                reinplace -locale C "s|^#! */usr/bin/env python\$|#!${pythonbin}|" ${f}
+                        }
+                }
+                foreach f [glob -directory ${sedPath}/programs/scripts/hardwareprofile *.py] {
+                # fix even though they're currently non-functional on OS X
+                        reinplace -locale C "s|^#!/usr/bin/python\$|#!${pythonbin}|" ${f}
+                }
</ins><span class="cx">
</span><del>-configure.universal_cflags
-configure.universal_cppflags
-configure.universal_cxxflags
-configure.universal_ldflags
</del><ins>+                foreach {applescript} ${applescripts} {
+                        reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/${applescript}.applescript
+                        reinplace -locale C "s|@APPLICATIONS_DIR@|${applications_dir}|" ${worksrcpath}/macports/${applescript}.applescript
+                        reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|" ${worksrcpath}/macports/${applescript}.applescript
+                        reinplace -locale C "s|@MYTHTVPIDFILE@|${mythtvpidfile}|" ${worksrcpath}/macports/${applescript}.applescript
+                }
+                reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/${plistfile}
+                reinplace -locale C "s|@PLISTLABEL@|${plistlabel}|g" ${worksrcpath}/macports/${plistfile}
+                reinplace -locale C "s|@PYTHONVER@|${pythonver}|" ${worksrcpath}/macports/${plistfile}
+                reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|" ${worksrcpath}/macports/${plistfile}
+                reinplace -locale C "s|@MYTHTVPIDFILE@|${mythtvpidfile}|" ${worksrcpath}/macports/${plistfile}
+                reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/logrotate.conf
+                reinplace -locale C "s|@PREFIX@|${prefix}|g" ${worksrcpath}/macports/my.cnf
+                reinplace -locale C "s|@MYTHTVLOGDIR@|${mythtvlogdir}|g" ${worksrcpath}/macports/logrotate.mythtv
+                reinplace -locale C "s|xxxyyyzzz|${mythtvpidfile}|" ${worksrcpath}/mythtv/configure
+        }
+        # Block various compilers:
+        #
+        # (shamelessly stolen from Qt4-mac, thanks Michael!)
+        # * Some older versions of CLANG do not honor the LIBRARY_PATH
+        # environment variables, which is required for compiling
+        # this port when using MacPorts. The versions seem to be: MacPorts
+        # CLANG 3.0 or earlier, and Apple CLANG 318.0.61 or older (XCode 4.3.3 and prior).
+        #
+        # See http://code.mythtv.org/trac/ticket/11070
+        # Run-time failures experienced with certain versions of Clang. Unable to discern cause.
+        # Most recent version of clang seems OK, let's try again
</ins><span class="cx">
</span><del>-configure.cc_archflags
-configure.cxx_archflags
-configure.ld_archflags
</del><ins>+        compiler.fallback-append apple-gcc-4.2
+        compiler.blacklist-append { clang <= 500.2.79 } \
+                macports-clang*
</ins><span class="cx">
</span><del>-# make pkg-config act like on Linux, no '-I/opt/local/include' in cflags
-configure.env-append PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include
</del><ins>+        # Clear all MacPorts flags...MythTV is smart enough to set up its own.
+        # (ala qt4-mac/Portfile)
+        configure.cflags
+        configure.cppflags
+        configure.cxxflags
+        configure.objcflags
+        configure.ldflags
</ins><span class="cx">
</span><del>-configure.dir ${worksrcpath}/mythtv
-configure.args --compile-type=release \
- --qmake=${qt_qmake_cmd} \
- --cc=${configure.cc} \
- --cxx=${configure.cxx} \
- --python=${pythonbin} \
- --disable-mythlogserver \
- --disable-ceton \
- --disable-firewire \
- --disable-audio-jack --disable-indev=jack \
- --disable-audio-pulseoutput \
- --disable-libpulse \
- --disable-libvpx --disable-libxvid \
- --disable-qtdbus \
- --disable-sdl \
- --disable-xrandr \
- --disable-xv \
- --enable-libmp3lame \
- --enable-libass \
- --enable-fft \
- --enable-libx264 --enable-libfaac --enable-nonfree
</del><ins>+        configure.universal_cflags
+        configure.universal_cppflags
+        configure.universal_cxxflags
+        configure.universal_ldflags
</ins><span class="cx">
</span><del>-if {${configure.ccache} != "yes"} {
- configure.args-append --disable-ccache
-}
</del><ins>+        configure.cc_archflags
+        configure.cxx_archflags
+        configure.ld_archflags
</ins><span class="cx">
</span><del>-if {${configure.distcc} != "yes"} {
- configure.args-append --disable-distcc
-}
</del><ins>+        # make pkg-config act like on Linux, no '-I/opt/local/include' in cflags
+        configure.env-append PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include
</ins><span class="cx">
</span><del>-build.dir ${worksrcpath}/mythtv
-# make Myth's copy of ffmpeg build verbosely
-build.env-append V=1
</del><ins>+        configure.dir ${worksrcpath}/mythtv
+        configure.args --compile-type=release \
+                                                --qmake=${qt_qmake_cmd} \
+                                                --cc=${configure.cc} \
+                                                --cxx=${configure.cxx} \
+                                                --python=${pythonbin} \
+                                                --disable-mythlogserver \
+                                                --disable-ceton \
+                                                --disable-firewire \
+                                                --disable-audio-jack --disable-indev=jack \
+                                                --disable-audio-pulseoutput \
+                                                --disable-libpulse \
+                                                --disable-libvpx --disable-libxvid \
+                                                --disable-qtdbus \
+                                                --disable-sdl \
+                                                --disable-xrandr \
+                                                --disable-xv \
+                                                --enable-libmp3lame \
+                                                --enable-libass \
+                                                --enable-fft \
+                                                --enable-libx264 --enable-libfaac --enable-nonfree
</ins><span class="cx">
</span><del>-pre-build {
- # workaround broken linker flags, see
- # https://trac.macports.org/ticket/40136
- reinplace -locale C "s|LDFLAGS= |LDFLAGS= -headerpad_max_install_names |" ${worksrcpath}/mythtv/external/FFmpeg/config.mak
</del><ins>+        if {${configure.ccache} != "yes"} {
+                configure.args-append --disable-ccache
+        }
</ins><span class="cx">
</span><del>- ui_info "Build Myth AppleScript helper apps"
- # Compile applescrips
- foreach {applescript} ${applescripts} {
- system "osacompile -x -o ${worksrcpath}/macports/${applescript}.app ${worksrcpath}/macports/${applescript}.applescript"
- }
- # Myth custom icon for a couple of the applets
- copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${worksrcpath}/macports/Myth_Frontend.app/Contents/Resources/applet.icns
- copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${worksrcpath}/macports/Myth_Stop_Start.app/Contents/Resources/applet.icns
-}
</del><ins>+        if {${configure.distcc} != "yes"} {
+                configure.args-append --disable-distcc
+        }
</ins><span class="cx">
</span><del>-# All tests fail with messages like:
-# dyld: Library not loaded: @rpath//opt/local/lib/libmythbase-0.27.0.dylib
-# Referenced from: /opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core-devel/mythtv-core.27/work/mythtv-8b542e20/mythtv/libs/././libmyth/test/test_audioconvert/test_audioconvert
-# Reason: image not found
-# ../programs/scripts/unittests.sh: line 15: 41587 Trace/BPT trap ./$RUNNABLE
-# Need to investigate why rpath not working under MacPorts...
</del><ins>+        build.dir ${worksrcpath}/mythtv
+        # make Myth's copy of ffmpeg build verbosely
+        build.env-append V=1
</ins><span class="cx">
</span><del>-# test.run yes
</del><ins>+        pre-build {
+                # workaround broken linker flags, see
+                # https://trac.macports.org/ticket/40136
+                reinplace -locale C "s|LDFLAGS= |LDFLAGS= -headerpad_max_install_names |" ${worksrcpath}/mythtv/external/FFmpeg/config.mak
</ins><span class="cx">
</span><del>-destroot.destdir INSTALL_ROOT=${destroot}
</del><ins>+                ui_info "Build Myth AppleScript helper apps"
+                # Compile applescrips
+                foreach {applescript} ${applescripts} {
+                        system "osacompile -x -o ${worksrcpath}/macports/${applescript}.app ${worksrcpath}/macports/${applescript}.applescript"
+                }
+                # Myth custom icon for a couple of the applets
+                copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${worksrcpath}/macports/Myth_Frontend.app/Contents/Resources/applet.icns
+                copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${worksrcpath}/macports/Myth_Stop_Start.app/Contents/Resources/applet.icns
+        }
</ins><span class="cx">
</span><del>-post-destroot {
-# make some directories myth will need
- xinstall -d -m 755 ${destroot}${mythtvhomedir}
- xinstall -d -m 777 ${destroot}${mythtvlogdir}
- xinstall -d -m 777 ${destroot}${mythtvlogdir}/old
- xinstall -d -m 755 ${destroot}${prefix}/etc/logrotate.d
- xinstall -d -m 744 ${destroot}${mythtvrundir}
</del><ins>+        # All tests fail with messages like:
+        # dyld: Library not loaded: @rpath//opt/local/lib/libmythbase-0.27.0.dylib
+        # Referenced from: /opt/local/var/macports/build/_Users_craigtreleaven_MacPortsTemp_mythtv-core-devel/mythtv-core.27/work/mythtv-8b542e20/mythtv/libs/././libmyth/test/test_audioconvert/test_audioconvert
+        # Reason: image not found
+        # ../programs/scripts/unittests.sh: line 15: 41587 Trace/BPT trap ./$RUNNABLE
+        # Need to investigate why rpath not working under MacPorts...
</ins><span class="cx">
</span><del>- destroot.keepdirs \
- ${destroot}${mythtvhomedir} \
- ${destroot}${mythtvlogdir} \
- ${destroot}${mythtvlogdir}/old \
- ${destroot}${mythtvrundir}
</del><ins>+        # test.run yes
</ins><span class="cx">
</span><del>-# install logrotate.mythtv
- xinstall -m 400 ${worksrcpath}/macports/logrotate.mythtv ${destroot}${prefix}/etc/logrotate.d
</del><ins>+        destroot.destdir INSTALL_ROOT=${destroot}
</ins><span class="cx">
</span><del>-# install the launchd plist for the backend
- ui_info "Installing startupitem/launchd plist..."
- xinstall -d -m 0755 ${destroot}${plistdir}
- xinstall ${worksrcpath}/macports/${plistfile} ${destroot}${plistdir}
</del><ins>+        post-destroot {
+        # make some directories myth will need
+                xinstall -d -m 755 ${destroot}${mythtvhomedir}
+                xinstall -d -m 777 ${destroot}${mythtvlogdir}
+                xinstall -d -m 777 ${destroot}${mythtvlogdir}/old
+                xinstall -d -m 755 ${destroot}${prefix}/etc/logrotate.d
+                xinstall -d -m 744 ${destroot}${mythtvrundir}
</ins><span class="cx">
</span><del>-# install scripts we want in share/contrib
- ui_info "Installing share/$name/contrib scripts..."
</del><ins>+                destroot.keepdirs \
+                        ${destroot}${mythtvhomedir} \
+                        ${destroot}${mythtvlogdir} \
+                        ${destroot}${mythtvlogdir}/old \
+                        ${destroot}${mythtvrundir}
</ins><span class="cx">
</span><del>- xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/database
- xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/contrib
</del><ins>+        # install logrotate.mythtv
+                xinstall -m 400 ${worksrcpath}/macports/logrotate.mythtv ${destroot}${prefix}/etc/logrotate.d
</ins><span class="cx">
</span><del>- xinstall -m 755 \
- ${configure.dir}/database/mc.sql \
- ${worksrcpath}/macports/mythconverg_init.sql \
- ${worksrcpath}/macports/my.cnf \
- ${destroot}${prefix}/share/${nick}/database
- xinstall -m 755 \
- ${configure.dir}/contrib/maintenance/optimize_mythdb.pl \
- ${configure.dir}/contrib/user_jobs/mythlink.pl \
- ${destroot}${prefix}/share/${nick}/contrib
</del><ins>+        # install the launchd plist for the backend
+                ui_info "Installing startupitem/launchd plist..."
+                xinstall -d -m 0755 ${destroot}${plistdir}
+                xinstall ${worksrcpath}/macports/${plistfile} ${destroot}${plistdir}
</ins><span class="cx">
</span><del>-# install some simple Applescripts to launch common myth apps
- ui_info "Installing Applescript helpers..."
- # compile the Applescripts
- xinstall -m 755 -d ${destroot}${applications_dir}/MythTV
</del><ins>+        # install scripts we want in share/contrib
+                ui_info "Installing share/$name/contrib scripts..."
</ins><span class="cx">
</span><del>- foreach {applescript} ${applescripts} {
- copy ${worksrcpath}/macports/${applescript}.app ${destroot}${applications_dir}/MythTV/${applescript}.app
- }
</del><ins>+                xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/database
+                xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/contrib
</ins><span class="cx">
</span><del>-# Myth custom icon for a couple of the applets
- copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${destroot}${applications_dir}/MythTV/Myth_Frontend.app/Contents/Resources/applet.icns
- copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${destroot}${applications_dir}/MythTV/Myth_Stop_Start.app/Contents/Resources/applet.icns
</del><ins>+                xinstall -m 755 \
+                        ${configure.dir}/database/mc.sql \
+                        ${worksrcpath}/macports/mythconverg_init.sql \
+                        ${worksrcpath}/macports/my.cnf \
+                        ${destroot}${prefix}/share/${nick}/database
+                xinstall -m 755 \
+                        ${configure.dir}/contrib/maintenance/optimize_mythdb.pl \
+                        ${configure.dir}/contrib/user_jobs/mythlink.pl \
+                        ${destroot}${prefix}/share/${nick}/contrib
</ins><span class="cx">
</span><del>-# Fix up library entries in dylibs and executables ...
-# need to loop on arch's if/when build universal ?!?
- set libdir ${prefix}/lib
</del><ins>+        # install some simple Applescripts to launch common myth apps
+                ui_info "Installing Applescript helpers..."
+                # compile the Applescripts
+                xinstall -m 755 -d ${destroot}${applications_dir}/MythTV
</ins><span class="cx">
</span><del>- ui_info "Correcting library entries in dylibs..."
</del><ins>+                foreach {applescript} ${applescripts} {
+                        copy ${worksrcpath}/macports/${applescript}.app ${destroot}${applications_dir}/MythTV/${applescript}.app
+                }
</ins><span class="cx">
</span><del>- foreach {dylib} [glob -types f -tails -directory ${destroot}${libdir} *.dylib] {
- # glob gives us both files and links to files
- if { [file type ${destroot}${libdir}/${dylib}] == "file" } {
- ui_debug "... for ${dylib}"
- system "install_name_tool -id ${libdir}/${dylib} ${destroot}${libdir}/${dylib}"
</del><ins>+        # Myth custom icon for a couple of the applets
+                copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${destroot}${applications_dir}/MythTV/Myth_Frontend.app/Contents/Resources/applet.icns
+                copy -force ${configure.dir}/programs/mythfrontend/mythfrontend.icns ${destroot}${applications_dir}/MythTV/Myth_Stop_Start.app/Contents/Resources/applet.icns
</ins><span class="cx">
</span><del>- set otool [lrange [split [exec otool -L ${destroot}${libdir}/${dylib}] \n] 1 end]
</del><ins>+        # Fix up library entries in dylibs and executables ...
+        # need to loop on arch's if/when build universal ?!?
+                set libdir ${prefix}/lib
</ins><span class="cx">
</span><del>- foreach {otoolentry} ${otool} {
- # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
- # assume anything without a leading slash needs fixing
- set firstchar [string range [string trimleft ${otoolentry}] 0 0]
- if { ${firstchar} != "/" } {
- set lib [lindex ${otoolentry} 0]
- ui_debug " Change ${lib} to ${libdir}/[file tail ${lib}]"
- system "install_name_tool -change \
- ${lib} \
- ${libdir}/[file tail ${lib}] \
- ${destroot}${libdir}/${dylib}"
- }
- }
- }
- }
- set bindir ${prefix}/bin
- ui_info "Correcting library entries in executables..."
</del><ins>+                ui_info "Correcting library entries in dylibs..."
</ins><span class="cx">
</span><del>- foreach {prog} [glob -types f -tails -directory ${destroot}${bindir} *] {
- # glob gives us files and links to files but should be no links in bin dir
- ui_debug "... for ${prog}"
</del><ins>+                foreach {dylib} [glob -types f -tails -directory ${destroot}${libdir} *.dylib] {
+                        # glob gives us both files and links to files
+                        if { [file type ${destroot}${libdir}/${dylib}] == "file" } {
+                                ui_debug "... for ${dylib}"
+                                system "install_name_tool -id ${libdir}/${dylib} ${destroot}${libdir}/${dylib}"
</ins><span class="cx">
</span><del>- set otool [lrange [split [exec otool -L ${destroot}${bindir}/${prog}] \n] 1 end]
</del><ins>+                                set otool [lrange [split [exec otool -L ${destroot}${libdir}/${dylib}] \n] 1 end]
</ins><span class="cx">
</span><del>- foreach {otoolentry} ${otool} {
- # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
- # assume anything without a leading slash needs fixing
- set firstchar [string range [string trimleft ${otoolentry}] 0 0]
- if { ${firstchar} != "/" } {
- set lib [lindex ${otoolentry} 0]
- ui_debug " Change ${lib} to ${libdir}/[file tail ${lib}]"
- system "install_name_tool -change \
- ${lib} \
- ${libdir}/[file tail ${lib}] \
- ${destroot}${bindir}/${prog}"
- }
- }
- }
</del><ins>+                                foreach {otoolentry} ${otool} {
+                                        # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
+                                        # assume anything without a leading slash needs fixing
+                                        set firstchar [string range [string trimleft ${otoolentry}] 0 0]
+                                        if { ${firstchar} != "/" } {
+                                                set lib [lindex ${otoolentry} 0]
+                                                ui_debug " Change ${lib} to ${libdir}/[file tail ${lib}]"
+                                                system "install_name_tool -change \
+                                                        ${lib} \
+                                                        ${libdir}/[file tail ${lib}] \
+                                                        ${destroot}${libdir}/${dylib}"
+                                        }
+                                }
+                        }
+                }
+                set bindir ${prefix}/bin
+                ui_info "Correcting library entries in executables..."
</ins><span class="cx">
</span><del>-# fix lib entries in filters
- set fltdir ${prefix}/lib/mythtv/filters
- set liblist [glob -types f -tails -directory ${destroot}${libdir} -- *.dylib]
- ui_info "Correcting library entries in plugins..."
</del><ins>+                foreach {prog} [glob -types f -tails -directory ${destroot}${bindir} *] {
+                        # glob gives us files and links to files but should be no links in bin dir
+                        ui_debug "... for ${prog}"
</ins><span class="cx">
</span><del>- foreach {flt} [glob -types f -tails -directory ${destroot}${fltdir} *] {
- # glob gives us files and links to files but should be no links in filters dir
- ui_debug "... for ${flt}"
</del><ins>+                        set otool [lrange [split [exec otool -L ${destroot}${bindir}/${prog}] \n] 1 end]
</ins><span class="cx">
</span><del>- set otool [lrange [split [exec otool -L ${destroot}${fltdir}/${flt}] \n] 1 end]
</del><ins>+                        foreach {otoolentry} ${otool} {
+                                # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
+                                # assume anything without a leading slash needs fixing
+                                set firstchar [string range [string trimleft ${otoolentry}] 0 0]
+                                if { ${firstchar} != "/" } {
+                                        set lib [lindex ${otoolentry} 0]
+                                        ui_debug " Change ${lib} to ${libdir}/[file tail ${lib}]"
+                                        system "install_name_tool -change \
+                                                ${lib} \
+                                                ${libdir}/[file tail ${lib}] \
+                                                ${destroot}${bindir}/${prog}"
+                                }
+                        }
+                }
</ins><span class="cx">
</span><del>- foreach {otoolentry} ${otool} {
- # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
- # assume anything without a leading slash needs fixing
- set firstchar [string range [string trimleft ${otoolentry}] 0 0]
- if { ${firstchar} != "/" } {
- set lib [lindex ${otoolentry} 0]
- if { [ lsearch $liblist ${lib} ] > 0 } {
- set goodprefix ${libdir}
- } else {
- set goodprefix ${fltdir}
- }
- ui_debug " Change ${lib} to ${goodprefix}/[file tail ${lib}]"
- system "install_name_tool -change \
- ${lib} \
- ${goodprefix}/[file tail ${lib}] \
- ${destroot}${fltdir}/${flt}"
- }
- }
- }
-}
</del><ins>+        # fix lib entries in filters
+                set fltdir ${prefix}/lib/mythtv/filters
+                set liblist [glob -types f -tails -directory ${destroot}${libdir} -- *.dylib]
+                ui_info "Correcting library entries in plugins..."
</ins><span class="cx">
</span><del>-universal_variant no
</del><ins>+                foreach {flt} [glob -types f -tails -directory ${destroot}${fltdir} *] {
+                        # glob gives us files and links to files but should be no links in filters dir
+                        ui_debug "... for ${flt}"
</ins><span class="cx">
</span><del>-post-activate {
- # make logrotate ready to go
- if {![file exists ${prefix}/etc/logrotate.conf]} {
- file copy ${destroot}logrotate.conf ${prefix}/etc/logrotate.conf
- }
- # delete leftover file, if any
- if [file exists /Library/LaunchDaemons/${plistfile}] {
- file delete -force /Library/LaunchDaemons/${plistfile}
- }
- # The startupitem.install keyword does not exist in MacPorts < 2.1.
- if {![info exists startupitem.install]} {
- set startupitem.install yes
- }
- # If "startupitem.install" is set to "no" in macports.conf then do not link.
- if {${startupitem.install} != "no"} {
- ln -s ${plistdir}/${plistfile} /Library/LaunchDaemons
- }
-}
</del><ins>+                        set otool [lrange [split [exec otool -L ${destroot}${fltdir}/${flt}] \n] 1 end]
</ins><span class="cx">
</span><del>-pre-deactivate {
- file delete -force ${plistdir}/${plistfile}
</del><ins>+                        foreach {otoolentry} ${otool} {
+                                # fix entries like "libmythswscale.dylib" to "${prefix}/lib/libmythswscale.dylib"
+                                # assume anything without a leading slash needs fixing
+                                set firstchar [string range [string trimleft ${otoolentry}] 0 0]
+                                if { ${firstchar} != "/" } {
+                                        set lib [lindex ${otoolentry} 0]
+                                        if { [ lsearch $liblist ${lib} ] > 0 } {
+                                                set goodprefix ${libdir}
+                                        } else {
+                                                set goodprefix ${fltdir}
+                                        }
+                                        ui_debug " Change ${lib} to ${goodprefix}/[file tail ${lib}]"
+                                        system "install_name_tool -change \
+                                                ${lib} \
+                                                ${goodprefix}/[file tail ${lib}] \
+                                                ${destroot}${fltdir}/${flt}"
+                                }
+                        }
+                }
+        }
+
+        post-activate {
+                # make logrotate ready to go
+                if {![file exists ${prefix}/etc/logrotate.conf]} {
+                        file copy ${destroot}logrotate.conf ${prefix}/etc/logrotate.conf
+                }
+                # delete leftover file, if any
+                if [file exists /Library/LaunchDaemons/${plistfile}] {
+                        file delete -force /Library/LaunchDaemons/${plistfile}
+                }
+                # The startupitem.install keyword does not exist in MacPorts < 2.1.
+                if {![info exists startupitem.install]} {
+                        set startupitem.install yes
+                }
+                # If "startupitem.install" is set to "no" in macports.conf then do not link.
+                if {${startupitem.install} != "no"} {
+                        ln -s ${plistdir}/${plistfile} /Library/LaunchDaemons
+                }
+        }
+
+        pre-deactivate {
+                 file delete -force ${plistdir}/${plistfile}
+        }
+
+        notes "############################################################################
+        #
+        # See http://www.mythtv.org/wiki/Myth_for_Mac_with_MacPorts for information
+        # essential to finishing the initial installation of MythTV!
+        #
+        # NB -
+        # For troubleshooting, all Myth-related logs are stored in
+        # ${mythtvlogdir}
+        #
+        # Upgrading after October 16, 2014? Myth's database has changed from MySQL
+        # v5.1 to MariaDB v5.5. You should backup your old database and restore
+        # it to the new version. See the web page above for full details.
+        #
+        ############################################################################"
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-notes "############################################################################
-#
-# See http://www.mythtv.org/wiki/Myth_for_Mac_with_MacPorts for information
-# essential to finishing the initial installation of MythTV!
-#
-# NB -
-# For troubleshooting, all Myth-related logs are stored in
-# ${mythtvlogdir}
-#
-# Upgrading after October 16, 2014? Myth's database has changed from MySQL
-# v5.1 to MariaDB v5.5. You should backup your old database and restore
-# it to the new version. See the web page above for full details.
-#
-############################################################################"
</del><ins>+subport mythtv-plugins.${majorversion} {
+        name mythtv-plugins${majorversion}
+        version 0${majorversion}${minorversion}-Fixes-${lastcommit}
</ins><span class="cx">
</span><del>-livecheck.version ${majorversion}${minorversion}
-livecheck.regex "archive/v(0.27\[\\.\\d\]?)${extract.suffix}"
</del><ins>+        description MythTV plugins for slideshows, music and weather
+        long_description ${description} \
+                                                Each plugin is a variant. The non-default plugins currently do not \
+                                                work on OS X, such as MythNews, MythBrowser and MythNetVision.
+        dist_subdir                        mythtv-core${majorversion}
+
+        post-patch {
+                set sedPath ${worksrcpath}/mythplugins/
+                reinplace -locale C "s|check_cmd perl -e|check_cmd ${perlbin} -e|" \
+                        ${sedPath}configure
+                reinplace -locale C "s|python=\"python\"|python=\"${pythonbin}\"|" \
+                        ${sedPath}configure
+                # do fixups regardless of whether variant is selected or not
+                foreach fixfile [exec find ${sedPath}/mythweather/mythweather/scripts -name "*.p?"] {
+                        reinplace "s;/usr/bin/perl;${perlbin};g" ${fixfile}
+                        reinplace "s;/usr/share/mythtv;${perlbin};g" ${fixfile}
+                }
+        }
+
+        depends_lib port:mythtv-core${majorversion}
+        # NB mythplugins/configure reads ${prefix}/include/mythtv/mythconfig.mak
+        # and sets several values from that, including cc and cxx
+
+        configure.dir ${worksrcpath}/mythplugins
+
+        # make pkg-config act like on Linux, no '-I/opt/local/include' in cflags
+        configure.env-append PKG_CONFIG_SYSTEM_INCLUDE_PATH=${prefix}/include
+
+        configure.args --compile-type=release \
+                                                --qmake=${qt_qmake_cmd} \
+                                                --python=${pythonbin} \
+                                                --disable-mytharchive \
+                                                --disable-mythgame \
+                                                --disable-mythzoneminder \
+                                                --disable-mythbrowser \
+                                                --disable-mythnetvision \
+                                                --disable-mythgallery \
+                                                --disable-mythmusic \
+                                                --disable-mythnews \
+                                                --disable-mythweather
+
+        if {[variant_isset mythnetvision] || [variant_isset mythweather]} {
+        # for both MythNetvision and MythWeather (Canada)
+                depends_lib-append                port:${perlmodver}-perlmagick
+        }
+
+        variant mytharchive description {Create DVDs from recorded shows and any video files available on Myth.} {
+                configure.args-delete        --disable-mytharchive
+                configure.args-append        --enable-mytharchive
+        }
+
+        variant mythbrowser description {WebKit-based browser within Myth.} {
+                configure.args-delete        --disable-mythbrowser
+        #        configure.args-append        --enable-mythbrowser
+        }
+
+        variant mythnetvision description {Find and play internet videos within Myth.} {
+                depends_lib-append                port:${pymodver}-oauth
+                configure.args-delete        --disable-mythnetvision
+        #        configure.args-append        --enable-mythnetvision
+        }
+
+        variant mythgallery description {Myth photo browser and slideshow plugin.} {
+                depends_lib-append                port:libexif \
+                                                                port:dcraw
+                configure.args-delete        --disable-mythgallery
+        #        configure.args-append        --enable-mythgallery
+        }
+
+        variant mythmusic description {Myth plugin to play and manage music files.} {
+                depends_lib-append                port:libvorbis \
+                                                                port:flac \
+                                                                port:taglib
+        #                                                        port:fftw-3 -- included in mythtv-core
+                configure.args-delete        --disable-mythmusic
+        #        configure.args-append        --enable-mythmusic
+        }
+
+        variant mythnews description {Check news sources through RSS feeds with this Myth plugin.} {
+                configure.args-delete        --disable-mythnews
+        #        configure.args-append        --enable-mythnews
+        }
+
+        variant mythweather description {Weather information for your chosen locations via Myth plugin.} {
+                depends_lib-append                port:${perlmodver}-datemanip\
+                                                                port:${perlmodver}-xml-simple \
+                                                                port:${perlmodver}-xml-xpath \
+                                                                port:${perlmodver}-image-size \
+                                                                port:${perlmodver}-datetime-format-iso8601 \
+                                                                port:${perlmodver}-soap-lite \
+                                                                port:${perlmodver}-json
+                configure.args-delete        --disable-mythweather
+        #        configure.args-append        --enable-mythweather
+        }
+
+        default_variants +mythnetvision +mythbrowser +mythnews +mythgallery +mythmusic +mythweather +mytharchive
+
+        build.dir ${worksrcpath}/mythplugins
+
+        destroot.destdir INSTALL_ROOT=${destroot}
+
+}
</ins></span></pre>
</div>
</div>
</body>
</html>