[96917] trunk/dports/multimedia
pixilla at macports.org
pixilla at macports.org
Tue Aug 21 08:29:31 PDT 2012
Revision: 96917
https://trac.macports.org/changeset/96917
Author: pixilla at macports.org
Date: 2012-08-21 08:29:27 -0700 (Tue, 21 Aug 2012)
Log Message:
-----------
multimedia/mythtv-core.25:
- New port mythtv-core.25.
Added Paths:
-----------
trunk/dports/multimedia/mythtv-core.25/
trunk/dports/multimedia/mythtv-core.25/Portfile
trunk/dports/multimedia/mythtv-core.25/files/
trunk/dports/multimedia/mythtv-core.25/files/Myth_Filldatabase.applescript
trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend.applescript
trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend_Logging.applescript
trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript
trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript
trunk/dports/multimedia/mythtv-core.25/files/org.mythtv.mythbackend.plist
trunk/dports/multimedia/mythtv-core.25/files/patch-bindings-python-mythtv-utility.diff
trunk/dports/multimedia/mythtv-core.25/files/patch-greedyh.asm.diff
trunk/dports/multimedia/mythtv-core.25/files/patch-util-osx-objC.diff
Added: trunk/dports/multimedia/mythtv-core.25/Portfile
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/Portfile (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/Portfile 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,302 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup github 1.0
+PortGroup qt4 1.0
+
+set shorthash 46cab935
+# set fullhash 46cab93562429cd19029402a2387f63a72aeb898
+set majorversion .25
+set minorversion .2
+github.setup MythTV mythtv ${shorthash}
+name mythtv-core${majorversion}
+version 0${majorversion}${minorversion}-Fixes-20120731
+categories multimedia
+platforms darwin
+license GPL-2
+maintainers cogeco.ca:ctreleaven openmaintainer
+
+description MythTV - Open source digital video recorder
+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. With its plugin architecture, \
+ it has been extended from a mere TV viewing application into a \
+ full home media center suite, capable of managing your personal \
+ photo, video, and music collections, as well as keep you up to \
+ date with the weather, a ZoneMinder home security system, and \
+ more.
+
+homepage http://www.mythtv.org/
+checksums rmd160 b8c21681d02085f6b541e307a9e4c2a7ee0fe6e9 \
+ sha256 a829b7abc0c3860700427b3a73be44ac0c8a0b3d10d56992c7214f59a7b0b61d
+
+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_Frontend_Logging Myth_Filldatabase Myth_Setup Myth_Stop_Start}
+set mysqlver mysql5
+set perlver perl5.12
+set perlbin ${prefix}/bin/${perlver}
+set perlmodver p5.12
+set pythonver python2.6
+set pythonbin ${prefix}/bin/${pythonver}
+set pymodver py26
+
+depends_lib port:libdvdcss \
+ port:libsdl \
+ port:freetype \
+ port:lame \
+ port:x264 \
+ port:qt4-mac-${mysqlver}-plugin \
+ 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}-net-upnp
+
+depends_build port:yasm
+
+patchfiles patch-bindings-python-mythtv-utility.diff \
+ patch-greedyh.asm.diff \
+ patch-util-osx-objC.diff
+
+post-extract {
+ file mkdir ${worksrcpath}/macports
+ foreach {applescript} ${applescripts} {
+ copy ${filespath}/${applescript}.applescript ${worksrcpath}/macports/${applescript}.applescript
+ }
+ copy ${filespath}/${plistfile} ${worksrcpath}/macports/${plistfile}
+}
+
+post-patch {
+ set sedPath ${worksrcpath}/mythtv/
+ ui_info "Make Myth utils use MacPorts Perl"
+ reinplace -locale C "s|#!/usr/bin/perl|#!${perlbin}|" \
+ ${sedPath}bindings/perl/Makefile.PL \
+ ${sedPath}bindings/perl/MythTV.pm \
+ ${sedPath}programs/scripts/internetcontent/topdocumentaryfilm.pl \
+ ${sedPath}programs/scripts/internetcontent/twit.tv.pl \
+ ${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
+
+ 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
+
+ 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
+
+ ui_info "Install Myth Python stuff to ${prefix}"
+ reinplace -locale C "s|/usr/local|${prefix}|" ${worksrcpath}/mythtv/bindings/python/MythTV/static.py
+
+ 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|xxxyyyzzz|${mythtvpidfile}|" ${worksrcpath}/mythtv/configure
+}
+
+configure.dir ${worksrcpath}/mythtv
+configure.args --compile-type=release \
+ --runprefix=${prefix} \
+ --cc=${configure.cc} \
+ --cxx=${configure.cxx} \
+ --extra-ldflags='-F/System/Library/Frameworks' \
+ --python=${pythonbin} \
+ --disable-distcc \
+ --disable-firewire \
+ --disable-audio-jack --disable-indev=jack \
+ --enable-libmp3lame --enable-libx264
+
+build.dir ${worksrcpath}/mythtv
+
+pre-build {
+ 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
+}
+
+destroot.destdir INSTALL_ROOT=${destroot}
+
+post-destroot {
+# 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}
+
+# install scripts we want in share/contrib
+ ui_info "Installing share/$name/contrib scripts..."
+
+ xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/database
+ xinstall -d -m 755 ${destroot}${prefix}/share/${nick}/contrib
+
+ xinstall -m 755 \
+ ${configure.dir}/database/mc.sql \
+ ${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/
+
+# 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
+
+ foreach {applescript} ${applescripts} {
+ copy ${worksrcpath}/macports/${applescript}.app ${destroot}${applications_dir}/MythTV/${applescript}.app
+ }
+
+# 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
+
+# make other directories myth will need
+ xinstall -d -m 755 ${destroot}${mythtvhomedir}
+ xinstall -d -m 755 ${destroot}${mythtvlogdir}
+ xinstall -d -m 755 ${destroot}${mythtvrundir}
+
+ destroot.keepdirs \
+ ${destroot}${mythtvhomedir} \
+ ${destroot}${mythtvlogdir} \
+ ${destroot}${mythtvrundir}
+
+# Fix up library entries in dylibs and executables ...
+# need to loop on arch's if/when build universal ?!?
+ set libdir ${prefix}/lib
+
+ ui_info "Correcting library entries in dylibs..."
+
+ 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}"
+
+ set otool [lrange [split [exec otool -L ${destroot}${libdir}/${dylib}] \n] 1 end]
+
+ 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..."
+
+ 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}"
+
+ set otool [lrange [split [exec otool -L ${destroot}${bindir}/${prog}] \n] 1 end]
+
+ 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}"
+ }
+ }
+ }
+
+# 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..."
+
+ 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}"
+
+ set otool [lrange [split [exec otool -L ${destroot}${fltdir}/${flt}] \n] 1 end]
+
+ 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}"
+ }
+ }
+ }
+}
+
+universal_variant no
+
+post-activate {
+
+ # 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 installation of MythTV!
+#
+# NB -
+# For troubleshooting, all Myth-related logs are stored in
+# ${mythtvlogdir}
+#
+############################################################################"
Property changes on: trunk/dports/multimedia/mythtv-core.25/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/multimedia/mythtv-core.25/files/Myth_Filldatabase.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Filldatabase.applescript (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Filldatabase.applescript 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,47 @@
+(* Applescript to run 'Unix' version of mythfilldatabase
+For use with MacPorts install of Myth
+Author: Craig Treleaven, ctreleaven at cogeco.ca
+Myth Version: 0.25.0
+Modified: 2012May17
+
+*)
+property MFDappPath : "@PREFIX@/bin/mythfilldatabase"
+property MFDlogArg : "--logpath @MYTHTVLOGDIR@"
+property MFDlogLevel : "warning" -- single string
+property MFDverboseLevel : {"general"} -- a list, can be multiple strings
+
+set welcome to "In a 'production' system, mythfilldatabase is run automatically by mythbackend at the times suggested by the listings source, usually daily.
+
+ This applescript program allows you to run mythfilldatabase 'manually'; perhaps when Myth is first set up or if there are problems with the automatic runs.
+
+"
+
+try
+ set Clicked to display dialog welcome with title "Run mythfilldatabase" buttons {"Cancel", "Options", "Start Run"} default button "Start Run"
+on error
+ set Clicked to false
+end try
+
+set CmdList to {MFDappPath, MFDlogArg, "--loglevel " & MFDlogLevel, "--verbose " & joinlist(MFDverboseLevel, ",")}
+set Cmd to (joinlist(CmdList, " "))
+--display alert button returned of Clicked
+
+if Clicked is not false then
+ if button returned of Clicked = "Start Run" then
+ do shell script Cmd -- run it!
+ else if button returned of Clicked = "Options" then
+ display alert "Options"
+ -- let user select verbose and loglevel options
+ end if
+end if
+
+-- -- -- -- -- -- -- --
+-- Handlers
+to joinlist(aList, delimiter)
+ set retVal to ""
+ set prevDelimiter to AppleScript's text item delimiters
+ set AppleScript's text item delimiters to delimiter
+ set retVal to aList as string
+ set AppleScript's text item delimiters to prevDelimiter
+ return retVal
+end joinlist
Added: trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend.applescript (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend.applescript 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,27 @@
+(* Applescript to run 'Unix' version of mythfronted
+For use with MacPorts install of Myth
+Author: Craig Treleaven, ctreleaven at cogeco.ca
+Version: 0.25.0
+Modified: 2012May15
+
+*)
+property MFEappPath : "@PREFIX@/bin/mythfrontend"
+property MFElogArg : "--logpath @MYTHTVLOGDIR@"
+property MFElogLevel : "info" -- single string
+property MFEverboseLevel : {"none", "general"} -- a list, can be multiple strings
+
+set CmdList to {MFEappPath, MFElogArg, "--loglevel " & MFElogLevel, "--verbose " & joinlist(MFEverboseLevel, ",")}
+set Cmd to (joinlist(CmdList, " "))
+
+do shell script Cmd & " &" -- run it!
+
+-- -- -- -- -- -- -- --
+-- Handlers
+to joinlist(aList, delimiter)
+ set retVal to ""
+ set prevDelimiter to AppleScript's text item delimiters
+ set AppleScript's text item delimiters to delimiter
+ set retVal to aList as string
+ set AppleScript's text item delimiters to prevDelimiter
+ return retVal
+end joinlist
Added: trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend_Logging.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend_Logging.applescript (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Frontend_Logging.applescript 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,59 @@
+(* Applescript to select verbosity level of Myth Frontend
+For use with MacPorts install of Myth
+Author: Craig Treleaven, ctreleaven at cogeco.ca
+Myth Version: 0.25.2
+Modified: 2012MAug10 - script path in compiled app
+
+*)
+
+set MFEscriptPath to "@APPLICATIONS_DIR@/MythTV/Myth_Frontend.app/Contents/Resources/Scripts/main.scpt"
+set MFEscript to load script MFEscriptPath
+--display dialog (MFEverboseLevel of MFEscript)
+
+set verbose_list to {"none", "all", "most", "audio", "channel", "database", "decode", "file", "frame", "general", "gpuvideo", "gui", "libav", "network", "osd", "playback", "process", "schedule", "system", "timestamp", "upnp", "vbi"}
+set level_list to {"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"}
+
+--special: all, most
+set verbose_selected to choose from list verbose_list with title "Verbose setting" with prompt "Choose one or more areas for focused logging. General is the default" default items "general" with multiple selections allowed
+
+if (count of verbose_selected) > 1 then
+ if verbose_selected contains "all" then
+ set verbose_selected to {"all"}
+ else if verbose_selected contains "most" then
+ set verbose_selected to {"most"}
+ end if
+end if
+
+if verbose_selected is not false then
+ set (MFEverboseLevel of MFEscript) to verbose_selected
+ store script MFEscript in POSIX file MFEscriptPath with replacing
+end if
+
+set level_selected to choose from list level_list with title "Logging depth" with prompt "choose how extensively to log. Info is the Myth default; I find warning adequate." default items "warning" without multiple selections allowed
+
+if level_selected is not false then
+ set (MFElogLevel of MFEscript) to level_selected
+ store script MFEscript in POSIX file MFEscriptPath with replacing
+end if
+
+set theParams to "--verbose " & joinlist(verbose_selected, ",") & " --loglevel " & level_selected
+display dialog ("From now on, Myth_Fontend will start the frontend using: " & theParams)
+
+-- -- -- -- -- -- -- --
+-- Handlers
+to joinlist(aList, delimiter)
+ set retVal to ""
+ set prevDelimiter to AppleScript's text item delimiters
+ set AppleScript's text item delimiters to delimiter
+ set retVal to aList as string
+ set AppleScript's text item delimiters to prevDelimiter
+ return retVal
+end joinlist
+
+(*
+Log levels
+"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"
+defaults to info
+Full list of verbose options
+{"none", "all", "most", "audio", "channel", "chanscan", "commflag", "database", "decode", "dsmcc", "dvbcam", "eit", "file", "frame", "general", "gpu", "gpuaudio", "gpuvideo", "gui", "idle", "jobqueue", "libav", "media", "mheg", "network", "osd", "playback", "process", "record", "refcount", "rplxqueue", "schedule", "siparser", "socket", "system", "timestamp", "upnp", "vbi", "xmltv"}
+*)
Added: trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,47 @@
+(* Applescript to run 'Unix' version of mythtv-setup
+For use with MacPorts install of Myth
+Author: Craig Treleaven, ctreleaven at cogeco.ca
+Myth Version: 0.25.0
+Modified: 2012May17
+
+*)
+property MSUappPath : "@PREFIX@/bin/mythtv-setup"
+property MSUlogArg : "--logpath @MYTHTVLOGDIR@"
+property MSUlogLevel : "info" -- single string
+property MSUverboseLevel : {"general"} -- a list, can be multiple strings
+
+set welcome to "Initial setup of Myth is done through the mythtv-setup program.
+
+This includes defining where recordings and other media are stored, tuners and sources of listings data and scanning for available channels, etc.
+
+"
+--Should test if mythbackend is running and warn user...
+
+try
+ set Clicked to display dialog welcome with title ¬
+ "Run mythtv-setup" buttons {"Cancel", "Start"} default button "Start"
+on error
+ set Clicked to false
+end try
+
+set CmdList to {MSUappPath, MSUlogArg, "--loglevel " & MSUlogLevel, "--verbose " & joinlist(MSUverboseLevel, ",")}
+set Cmd to (joinlist(CmdList, " "))
+--display alert button returned of Clicked
+
+if Clicked is not false then
+ if button returned of Clicked = "Start" then
+ --display alert Cmd
+ do shell script Cmd -- run it!
+ end if
+end if
+
+-- -- -- -- -- -- -- --
+-- Handlers
+to joinlist(aList, delimiter)
+ set retVal to ""
+ set prevDelimiter to AppleScript's text item delimiters
+ set AppleScript's text item delimiters to delimiter
+ set retVal to aList as string
+ set AppleScript's text item delimiters to prevDelimiter
+ return retVal
+end joinlist
Added: trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,55 @@
+(* Applescript to stop/start Myth background apps
+For use with MacPorts install of Myth
+Author: Craig Treleaven, ctreleaven at cogeco.ca
+Version: 0.25.1
+Modified: 2012Jul11
+
+NB - if mbe is running, we only stop it if it was launched under launchd
+*)
+set mysqld to " not running on this machine. Is it on another machine on your network?"
+set mythbackend to ""
+set mythbackendButton to "Donno"
+--set mythmaintenance to " stopped."
+set newline to "
+"
+set indent to space & space & space & space
+set myResult to ""
+
+repeat until (myResult contains "Close")
+ set processes to do shell script "ps -Ac"
+ if the processes contains "mysqld" then
+ set mysqld to " running."
+ end if
+
+ if the processes contains "mythbackend" then
+ set mythbackend to " running."
+ set mythbackendButton to "Stop MythBackend"
+ try
+ do shell script "mythshutdown --check"
+ on error
+ set mythbackend to " running but busy with something. Are you sure you want to shut down now?"
+ end try
+ else
+ set mythbackend to " not running."
+ set mythbackendButton to "Start MythBackend"
+ end if
+
+ set myResult to display dialog "Simple tool to start and stop some Myth's background processes" & newline & newline & "Currently... " & ¬
+ newline & newline & indent & "MySQL is" & mysqld & ¬
+ newline & indent & "MythBackend is" & mythbackend & newline ¬
+ with icon note with title ¬
+ "Stop/Start Myth-related programs" buttons {mythbackendButton, "Close"} ¬
+ default button "Close" -- cancel button "Close"
+ set myResult to button returned of myResult
+ if myResult contains "Start MythBackend" then
+ do shell script "sudo launchctl load -w /Library/LaunchDaemons/org.mythtv.mythbackend.plist" with administrator privileges
+ else if myResult contains "Stop MythBackend" then
+ if ((do shell script "sudo launchctl list" with administrator privileges) contains "mythbackend") then
+ do shell script "sudo launchctl unload -w /Library/LaunchDaemons/org.mythtv.mythbackend.plist" with administrator privileges
+ -- there is a longish delay while myth closes down.
+ else
+ display alert " MythBackend appears not to have been started in the normal fashion. Unable to shut down." message "Was mythbackend started directly from a command line session?" as warning
+ end if
+ set myResult to "Close"
+ end if
+end repeat
Added: trunk/dports/multimedia/mythtv-core.25/files/org.mythtv.mythbackend.plist
===================================================================
(Binary files differ)
Property changes on: trunk/dports/multimedia/mythtv-core.25/files/org.mythtv.mythbackend.plist
___________________________________________________________________
Added: svn:mime-type
+ application/xml
Added: trunk/dports/multimedia/mythtv-core.25/files/patch-bindings-python-mythtv-utility.diff
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/patch-bindings-python-mythtv-utility.diff (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/patch-bindings-python-mythtv-utility.diff 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,294 @@
+--- mythtv/bindings/python/MythTV/utility.py.orig 2012-05-21 07:35:19.000000000 -0400
++++ mythtv/bindings/python/MythTV/utility.py 2012-05-21 07:33:57.000000000 -0400
+@@ -1,11 +1,11 @@
+ # -*- coding: utf-8 -*-
+ """Provides decorator classes for assorted functions"""
+
+-from logging import MythLog
+-from exceptions import MythDBError, MythError
++from MythTV.logging import MythLog
++from MythTV.exceptions import MythDBError, MythError
+
+ from cStringIO import StringIO
+-from select import select, poll, POLLHUP, POLLIN, POLLOUT
++from select import select
+ from time import time, mktime, sleep
+ from datetime import datetime as _pydatetime
+ from datetime import tzinfo as _pytzinfo
+@@ -927,66 +927,8 @@
+ except socket.error:
+ return False
+
+-class DequeBuffer( object ):
+- """
+- This is a chunked buffer, storing a sequence of buffer objects in a
+- deque, allowing for FIFO operations outside the limited 64K system
+- buffer, and the efficient freeing of memory without needing to rewrite
+- a large contiguous buffer object.
+- """
+- class _Buffer( object ):
+- """
+- This subclass contains a buffer object and a read/write lock, as
+- well as independent read and write positions.
+- """
+- __slots__ = ['buffer', 'lock', 'blocksize', 'EOF', 'rpos', 'wpos']
+- def __init__(self, size=2**18):
+- self.buffer = StringIO()
+- self.lock = Lock()
+- self.blocksize = size
+- self.EOF = False
+- self.rpos = 0
+- self.wpos = 0
+-
+- def __del__(self):
+- self.buffer.close()
+-
+- def read(self, nbytes):
+- with self.lock:
+- self.buffer.seek(self.rpos)
+- buff = self.buffer.read(nbytes)
+- self.rpos = self.buffer.tell()
+- if self.rpos == self.blocksize:
+- self.EOF = True
+- return buff
+-
+- def write(self, data):
+- with self.lock:
+- nbytes = self.blocksize-self.wpos
+- if nbytes < len(data):
+- data = data[:nbytes]
+- else:
+- nbytes = len(data)
+- self.buffer.seek(self.wpos)
+- self.buffer.write(data)
+- self.wpos += nbytes
+- return nbytes
+-
+- def rollback(self, nbytes):
+- with self.lock:
+- self.EOF = False
+- if self.rpos < nbytes:
+- nbytes -= self.rpos
+- self.rpos = 0
+- return nbytes
+- else:
+- self.rpos -= nbytes
+- return 0
+-
+- def close(self):
+- with self.lock:
+- self.buffer.close()
+-
++try:
++ from select import poll, POLLHUP, POLLIN, POLLOUT
+ class _PollingThread( Thread ):
+ """
+ This polling thread listens on selected pipes, and automatically reads
+@@ -998,13 +940,14 @@
+ args=(), kwargs={}):
+ self.inputqueue = Queue()
+ self.idletime = time()
+- super(DequeBuffer._PollingThread, self).__init__(group,
++ super(_PollingThread, self).__init__(group,
+ target, name, args, kwargs)
+ def add_pipe(self, buff, pipe, mode):
+ self.inputqueue.put((buff, pipe, mode))
+ def run(self):
+ poller = poll()
+ fds = {}
++ events = []
+ while True:
+ while not self.inputqueue.empty():
+ # loop though the queue and add new pipes to the
+@@ -1055,6 +998,141 @@
+ sleep(0.1)
+ else:
+ self.idletime = time()
++except ImportError:
++ from select import kqueue, kevent, KQ_FILTER_READ, KQ_FILTER_WRITE, \
++ KQ_EV_ADD, KQ_EV_DELETE, KQ_EV_EOF
++ class _PollingThread( Thread ):
++ """
++ This polling thread listens on selected pipes, and automatically reads
++ and writes data between the buffer and those pipes. This will self
++ terminate when there are no more pipes defined, and will need to be
++ restarted.
++ """
++ def __init__(self, group=None, target=None, name=None,
++ args=(), kwargs={}):
++ self.inputqueue = Queue()
++ self.idletime = time()
++ super(_PollingThread, self).__init__(group,
++ target, name, args, kwargs)
++ def add_pipe(self, buff, pipe, mode):
++ self.inputqueue.put((buff, pipe, mode))
++ def run(self):
++ poller = kqueue()
++ fds = {}
++ events = []
++ while True:
++ while not self.inputqueue.empty():
++ # loop through the queue and gather new pipes to add the
++ # kernel queue
++ buff, pipe, mode = self.inputqueue.get()
++ if 'r' in mode:
++ events.append(kevent(pipe, KQ_FILTER_READ, KQ_EV_ADD))
++ elif 'w' in mode:
++ events.append(kevent(pipe, KQ_FILTER_WRITE, KQ_EV_ADD))
++ else:
++ continue
++ fds[pipe.fileno()] = (weakref.ref(buff), pipe)
++
++ if len(events) == 0:
++ events = None
++ events = poller.control(events, 16, 0.1)
++
++ for i in range(len(events)):
++ # loop through response and handle events
++ event = events.pop()
++ buff, pipe = fds[event.ident]
++
++ if buff() is None:
++ # buffer object has closed out from underneath us
++ # pipe will be automatically removed from kqueue
++ pipe.close()
++ del fds[event.ident]
++ continue
++
++ if (abs(event.filter) & abs(KQ_FILTER_READ)) and event.data:
++ # new data has come in, push into the buffer
++ buff().write(pipe.read(event.data))
++
++ if (abs(event.filter) & abs(KQ_FILTER_WRITE)) and event.data:
++ # space is available to write data
++ pipe.write(buff().read(\
++ min(buff()._nbytes, event.data, 2**16)))
++
++ if abs(event.flags) & abs(KQ_EV_EOF):
++ # pipe has been closed and all IO has been processed
++ # pipe will be automatically removed from kqueue
++ buff().close()
++ pipe.close()
++ del fds[event.ident]
++
++ if len(fds) == 0:
++ # no pipes referenced
++ if self.idletime + 20 < time():
++ # idle timeout reached, terminate
++ break
++ sleep(0.1)
++ else:
++ self.idletime = time()
++
++class DequeBuffer( object ):
++ """
++ This is a chunked buffer, storing a sequence of buffer objects in a
++ deque, allowing for FIFO operations outside the limited 64K system
++ buffer, and the efficient freeing of memory without needing to rewrite
++ a large contiguous buffer object.
++ """
++ class _Buffer( object ):
++ """
++ This subclass contains a buffer object and a read/write lock, as
++ well as independent read and write positions.
++ """
++ __slots__ = ['buffer', 'lock', 'blocksize', 'EOF', 'rpos', 'wpos']
++ def __init__(self, size=2**18):
++ self.buffer = StringIO()
++ self.lock = Lock()
++ self.blocksize = size
++ self.EOF = False
++ self.rpos = 0
++ self.wpos = 0
++
++ def __del__(self):
++ self.buffer.close()
++
++ def read(self, nbytes):
++ with self.lock:
++ self.buffer.seek(self.rpos)
++ buff = self.buffer.read(nbytes)
++ self.rpos = self.buffer.tell()
++ if self.rpos == self.blocksize:
++ self.EOF = True
++ return buff
++
++ def write(self, data):
++ with self.lock:
++ nbytes = self.blocksize-self.wpos
++ if nbytes < len(data):
++ data = data[:nbytes]
++ else:
++ nbytes = len(data)
++ self.buffer.seek(self.wpos)
++ self.buffer.write(data)
++ self.wpos += nbytes
++ return nbytes
++
++ def rollback(self, nbytes):
++ with self.lock:
++ self.EOF = False
++ if self.rpos < nbytes:
++ nbytes -= self.rpos
++ self.rpos = 0
++ return nbytes
++ else:
++ self.rpos -= nbytes
++ return 0
++
++ def close(self):
++ with self.lock:
++ self.buffer.close()
+
+ _pollingthread = None
+
+@@ -1102,7 +1180,7 @@
+ else:
+ # end of data or request reached, return
+ break
+- self._nbytes += data.tell()
++ self._nbytes -= data.tell()
+ return data.getvalue()
+
+ def write(self, data):
+@@ -1187,9 +1265,39 @@
+
+ if (cls._pollingthread is None) or not cls._pollingthread.isAlive():
+ # create new thread, and set it to not block shutdown
+- cls._pollingthread = cls._PollingThread()
++ cls._pollingthread = _PollingThread()
+ cls._pollingthread.daemon = True
+ cls._pollingthread.start()
+ cls._pollingthread.add_pipe(buffer, pipe, mode)
+
++class QuickProperty( object ):
++ def __init__(self, maskedvar, default=None, handler=None):
++ self.varname = maskedvar
++ self.default = default
++ if handler is None:
++ handler = lambda x: x
++ self.handler = handler
++
++ def __get__(self, inst, owner):
++ if inst is None:
++ return self
++ if hasattr(inst, self.varname):
++ return getattr(inst, self.varname)
++ return self.default
++
++ def __set__(self, inst, value):
++ try:
++ value = self.handler(value)
++ except:
++ pass
++ else:
++ setattr(inst, self.varname, value)
++
++ def __call__(self, handler):
++ self.handler = handler
++ return self
+
++ def isDefault(self, inst):
++ if hasattr(inst, self.varname):
++ return False
++ return True
Added: trunk/dports/multimedia/mythtv-core.25/files/patch-greedyh.asm.diff
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/patch-greedyh.asm.diff (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/patch-greedyh.asm.diff 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,19 @@
+See http://code.mythtv.org/trac/ticket/10762
+By Gary Buhrmaster
+--- mythtv/filters/greedyhdeint/greedyh.asm
++++ mythtv/filters/greedyhdeint/greedyh.asm
+@@ -26,10 +26,10 @@ static const int64_t __attribute__((__used__)) UVMask = 0xff00ff00ff00ff00
+ static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull; // to avoid shifting chroma to luma
+ static const int64_t __attribute__((__used__)) QW256 = 0x0100010001000100ull; // 4 256's
+
+-static int64_t MaxComb;
+-static int64_t MotionThreshold;
+-static int64_t MotionSense;
+-static int64_t QW256B;
++static int64_t __attribute__((__used__)) MaxComb;
++static int64_t __attribute__((__used__)) MotionThreshold;
++static int64_t __attribute__((__used__)) MotionSense;
++static int64_t __attribute__((__used__)) QW256B;
+
+ #endif
+
Added: trunk/dports/multimedia/mythtv-core.25/files/patch-util-osx-objC.diff
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/patch-util-osx-objC.diff (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/patch-util-osx-objC.diff 2012-08-21 15:29:27 UTC (rev 96917)
@@ -0,0 +1,33 @@
+From 12a3eac312d06257ba1dca771ee710eacda6ce1e Mon Sep 17 00:00:00 2001
+From: Jean-Yves Avenard <jyavenard at mythtv.org>
+Date: Thu, 14 Jun 2012 19:29:01 +0000
+Subject: Fix compilation with clang/clang++ - configure: we can't use CFLAGS for compiling C++ code, especially as CFLAGS would include -std=c99 which makes no sense for C++ - util-osx-cocoa.mm was compiled as a C++ file, not an objective-C++ file, gcc was forgiving about the error, clang++ isn't
+
+---
+diff --git mythtv/libs/libmythui/libmythui.pro mythtv/libs/libmythui/libmythui.pro
+index 72d5482..4560bb2 100644
+--- mythtv/libs/libmythui/libmythui.pro
++++ mythtv/libs/libmythui/libmythui.pro
+@@ -95,16 +95,12 @@ using_x11 {
+ }
+
+ macx {
+- QMAKE_EXT_CPP += .mm
+- QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
+- HEADERS += screensaver-osx.h DisplayResOSX.h util-osx.h util-osx-cocoa.h
+- SOURCES += screensaver-osx.cpp DisplayResOSX.cpp util-osx.cpp util-osx-cocoa.mm
+-
+- QMAKE_CXXFLAGS += -F/System/Library/Frameworks/CoreServices.framework/Frameworks
+- QMAKE_CXXFLAGS += -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+- QMAKE_CXXFLAGS += -F/System/Library/Frameworks/Carbon.framework/Frameworks
+- QMAKE_CXXFLAGS += -F/System/Library/Frameworks/Cocoa.framework/Frameworks
+- LIBS += -framework Carbon -framework Cocoa -framework IOKit
++ HEADERS += screensaver-osx.h DisplayResOSX.h util-osx.h
++ SOURCES += screensaver-osx.cpp DisplayResOSX.cpp util-osx.cpp
++ QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_CXXFLAGS
++ OBJECTIVE_HEADERS += util-osx-cocoa.h
++ OBJECTIVE_SOURCES += util-osx-cocoa.mm
++ LIBS += -framework Carbon -framework Cocoa -framework IOKit
+
+ using_appleremote {
+ HEADERS += AppleRemote.h AppleRemoteListener.h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120821/7fce78e6/attachment-0001.html>
More information about the macports-changes
mailing list