[98186] trunk/dports/multimedia/mythtv-core.25
pixilla at macports.org
pixilla at macports.org
Thu Sep 27 15:02:08 PDT 2012
Revision: 98186
http://trac.macports.org//changeset/98186
Author: pixilla at macports.org
Date: 2012-09-27 15:02:07 -0700 (Thu, 27 Sep 2012)
Log Message:
-----------
multimedia/mythtv-core.25:
- Update to version 0.25.2-Fixes-20120918.
- Blacklist llvm-gcc-4.2, macports-llvm-gcc-4.2, macports-clang-3.1, dragonegg-3.0 and dragonegg-3.1. Closes 35934.
- Specify libpng and p5.12-datemanip dependencies.
- Handle libdvdnav build conflict.
- logrotate to manage myth log files.
- Fix patching of internet content scripts.
- Unambiguous qmake.
- Respect distcc and ccache settings.
- Fix directory permissions.
- Force working themepainter for mythtv-setup.
Modified Paths:
--------------
trunk/dports/multimedia/mythtv-core.25/Portfile
trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript
trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript
Added Paths:
-----------
trunk/dports/multimedia/mythtv-core.25/files/logrotate.mythtv
Modified: trunk/dports/multimedia/mythtv-core.25/Portfile
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/Portfile 2012-09-27 21:57:07 UTC (rev 98185)
+++ trunk/dports/multimedia/mythtv-core.25/Portfile 2012-09-27 22:02:07 UTC (rev 98186)
@@ -4,15 +4,15 @@
PortSystem 1.0
PortGroup github 1.0
PortGroup qt4 1.0
+PortGroup conflicts_build 1.0
-set shorthash 46cab935
-# set fullhash 46cab93562429cd19029402a2387f63a72aeb898
+set shorthash 099533da
+# set fullhash 099533dacc0faef47aadfbe7b45ab93ff57f5125
set majorversion .25
set minorversion .2
-github.setup MythTV mythtv ${shorthash} v
+github.setup MythTV mythtv ${shorthash}
name mythtv-core${majorversion}
-version 0${majorversion}${minorversion}-Fixes-20120731
-revision 1
+version 0${majorversion}${minorversion}-Fixes-20120918
categories multimedia
platforms darwin
license GPL-2
@@ -29,8 +29,8 @@
more.
homepage http://www.mythtv.org/
-checksums rmd160 b8c21681d02085f6b541e307a9e4c2a7ee0fe6e9 \
- sha256 a829b7abc0c3860700427b3a73be44ac0c8a0b3d10d56992c7214f59a7b0b61d
+checksums rmd160 b68e1bbe4364dc2d4fbba49c412aee644455053f \
+ sha256 79cb7a1c2242c8b0c1a9e349117b85b58a7205e0a3ef1e49b2fa1a5ef72b21c6
set nick mythtv
set mythtvhomedir ${prefix}/var/mythtvuser
@@ -57,6 +57,7 @@
port:lame \
port:x264 \
port:qt4-mac-${mysqlver}-plugin \
+ port:libpng \
port:${pymodver}-mysql \
port:${pymodver}-lxml \
port:${pymodver}-urlgrabber \
@@ -64,25 +65,27 @@
port:${perlmodver}-http-request-ascgi \
port:${perlmodver}-lwp-useragent-determined \
port:${perlmodver}-io-socket-inet6 \
+ port:${perlmodver}-datemanip \
port:${perlmodver}-net-upnp
-depends_build port:yasm
+depends_build port:yasm port:pkgconfig
+conflicts_build libdvdnav
+
+depends_run port:logrotate
+
patchfiles patch-bindings-python-mythtv-utility.diff \
patch-greedyh.asm.diff \
patch-util-osx-objC.diff
-# http://trac.macports.org/ticket/35934
-compiler.blacklist macports-clang-3.1 llvm-gcc-4.2
+# Run time failures with XCode 4.4.x and 4.5.0
+# See https://trac.macports.org/ticket/35934
+compiler.blacklist llvm-gcc-4.2 macports-llvm-gcc-4.2 macports-clang-3.1 \
+ dragonegg-3.0 dragonegg-3.1
compiler.fallback-append macports-clang-3.0
if {[vercmp $xcodeversion 4.4] >= 0} {
- compiler.blacklist-append clang
-}
-
-# TODO: This should be done by base
-# https://trac.macports.org/ticket/32542
-if {${configure.compiler} == "macports-clang-3.0"} {
- depends_build-append port:macports-clang-3.0
+ depends_build-append port:clang-3.0
+ configure.compiler=macports-clang-3.0
depends_skip_archcheck-append macports-clang-3.0
}
@@ -92,16 +95,19 @@
copy ${filespath}/${applescript}.applescript ${worksrcpath}/macports/${applescript}.applescript
}
copy ${filespath}/${plistfile} ${worksrcpath}/macports/${plistfile}
+ copy ${filespath}/logrotate.mythtv ${worksrcpath}/macports/logrotate.mythtv
}
post-patch {
set sedPath ${worksrcpath}/mythtv/
ui_info "Make Myth utils use MacPorts Perl"
+ reinplace -locale C "s|#!/usr/bin/env perl|#!${perlbin}|" \
+ ${sedPath}programs/scripts/internetcontent/topdocumentaryfilm.pl \
+ ${sedPath}programs/scripts/internetcontent/twit.tv.pl
+
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 \
@@ -129,6 +135,7 @@
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|@MYTHTVLOGDIR@|${mythtvlogdir}|g" ${worksrcpath}/macports/logrotate.mythtv
reinplace -locale C "s|xxxyyyzzz|${mythtvpidfile}|" ${worksrcpath}/mythtv/configure
}
@@ -137,6 +144,7 @@
--runprefix=${prefix} \
--cc=${configure.cc} \
--cxx=${configure.cxx} \
+ --qmake=${qt_qmake_cmd} \
--extra-ldflags='-F/System/Library/Frameworks' \
--python=${pythonbin} \
--disable-distcc \
@@ -144,6 +152,14 @@
--disable-audio-jack --disable-indev=jack \
--enable-libmp3lame --enable-libx264
+if {${configure.ccache} != "yes"} {
+ configure.args-append --disable-ccache
+}
+
+if {${configure.distcc} != "yes"} {
+ configure.args-append --disable-distcc
+}
+
build.dir ${worksrcpath}/mythtv
pre-build {
@@ -160,6 +176,22 @@
destroot.destdir INSTALL_ROOT=${destroot}
post-destroot {
+# make some directories myth will need
+ xinstall -d -m 666 ${destroot}${mythtvhomedir}
+ xinstall -d -m 666 ${destroot}${mythtvlogdir}
+ xinstall -d -m 666 ${destroot}${mythtvlogdir}/old
+ xinstall -d -m 666 ${destroot}${prefix}/etc/logrotate.d
+ xinstall -d -m 644 ${destroot}${mythtvrundir}
+
+ destroot.keepdirs \
+ ${destroot}${mythtvhomedir} \
+ ${destroot}${mythtvlogdir} \
+ ${destroot}${mythtvlogdir}/old \
+ ${destroot}${mythtvrundir}
+
+# install logrotate.mythtv
+ xinstall -m 400 ${worksrcpath}/macports/logrotate.mythtv ${destroot}${prefix}/etc/logrotate.d/
+
# install the launchd plist for the backend
ui_info "Installing startupitem/launchd plist..."
xinstall -d -m 0755 ${destroot}${plistdir}
@@ -192,16 +224,6 @@
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
@@ -290,7 +312,10 @@
universal_variant no
post-activate {
-
+ # 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
Modified: trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript 2012-09-27 21:57:07 UTC (rev 98185)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Setup.applescript 2012-09-27 22:02:07 UTC (rev 98186)
@@ -3,10 +3,11 @@
Author: Craig Treleaven, ctreleaven at cogeco.ca
Myth Version: 0.25.0
Modified: 2012May17
+ 2012Sep08 Force working themepainter
*)
property MSUappPath : "@PREFIX@/bin/mythtv-setup"
-property MSUlogArg : "--logpath @MYTHTVLOGDIR@"
+property MSUlogArg : "-O ThemePainter=qt --logpath @MYTHTVLOGDIR@"
property MSUlogLevel : "info" -- single string
property MSUverboseLevel : {"general"} -- a list, can be multiple strings
Modified: trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript 2012-09-27 21:57:07 UTC (rev 98185)
+++ trunk/dports/multimedia/mythtv-core.25/files/Myth_Stop_Start.applescript 2012-09-27 22:02:07 UTC (rev 98186)
@@ -1,21 +1,31 @@
(* 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
+Version: 0.25.2
+Modified: 2012Jul11 - new
+ 2012Sep21 - log rotation
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 rotatorStatus to ""
+set logrotButton to ""
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")
+ if (do shell script "sudo launchctl list" with administrator privileges) contains ".logrotate" then
+ set rotatorStatus to "runs daily"
+ set logrotButton to "Disable log rotation"
+ else
+ set rotatorStatus to "is not scheduled"
+ set logrotButton to "Schedule log rotation"
+ end if
+
set processes to do shell script "ps -Ac"
if the processes contains "mysqld" then
set mysqld to " running."
@@ -34,11 +44,13 @@
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"} ¬
+ set myResult to display dialog newline & "Simple tool to start and stop Myth's background processes" & \xC2
+ newline & newline & newline & "Currently... " & \xC2
+ newline & newline & indent & "Log rotation " & rotatorStatus & \xC2
+ newline & newline & indent & "MySQL is" & mysqld & \xC2
+ newline & newline & indent & "MythBackend is" & mythbackend & newline & newline \xC2
+ with icon note with title \xC2
+ "Stop/Start Myth-related programs" buttons {logrotButton, mythbackendButton, "Close"} \xC2
default button "Close" -- cancel button "Close"
set myResult to button returned of myResult
if myResult contains "Start MythBackend" then
@@ -51,5 +63,20 @@
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"
+ else if myResult contains "Schedule log rotation" then
+ --check for existence of
+ if (FileExists("@PREFIX@/etc/logrotate.conf") and \xC2
+ FileExists("@PREFIX@/etc/logrotate.d/logrotate.mythtv")) then
+ do shell script "sudo launchctl load -w /Library/LaunchDaemons/org.macports.logrotate.plist" with administrator privileges
+ else
+ display dialog "logrotate is not configured. Please see http://www.mythtv.org/wiki/MacPorts for instructions." buttons {"Close"}
+ set myResult to "Close"
+ end if
+ else if myResult contains "Disable log rotation" then
+ do shell script "sudo launchctl unload -w /Library/LaunchDaemons/org.macports.logrotate.plist" with administrator privileges
end if
end repeat
+
+on FileExists(theFile) -- (String) as Boolean
+ tell application "System Events" to return (exists file theFile)
+end FileExists
Added: trunk/dports/multimedia/mythtv-core.25/files/logrotate.mythtv
===================================================================
--- trunk/dports/multimedia/mythtv-core.25/files/logrotate.mythtv (rev 0)
+++ trunk/dports/multimedia/mythtv-core.25/files/logrotate.mythtv 2012-09-27 22:02:07 UTC (rev 98186)
@@ -0,0 +1,49 @@
+# ${prefix}/etc/logrotate.d/logrotate.mythtv
+# 2012Sep20 Craig Treleaven
+# MacPorts logrotate port -- set up for MythTV
+#
+# based on http://www.mythtv.org/wiki/Logrotate_-_all_applications
+
+# Common settings
+su root admin
+missingok
+ifempty
+nocreate
+nocompress
+sharedscripts
+olddir @MYTHTVLOGDIR@/old
+
+
+# programs that may run for extended periods
+ at MYTHTVLOGDIR@/mythbackend*.log @MYTHTVLOGDIR@/mythfrontend*.log @MYTHTVLOGDIR@/mythjobqueue*.log @MYTHTVLOGDIR@/mythwelcome*.log @MYTHTVLOGDIR@/mythmediaserver*.log @MYTHTVLOGDIR@/mythlcdserver*.log {
+ weekly
+ rotate 8
+ lastaction
+ killall -HUP mythbackend
+ killall -HUP mythfrontend
+ killall -HUP mythjobqueue
+ killall -HUP mythwelcome
+ killall -HUP mythmediaserver
+ killall -HUP mythlcdserver
+ find @MYTHTVLOGDIR@ -type f -mtime +20 -delete
+ find @MYTHTVLOGDIR@/old -type f -mtime +30 -delete
+ endscript
+}
+
+# tranient programs
+# these won't be running and writing to a log that needs rotating
+ at MYTHTVLOGDIR@/mythfilldatabase*.log @MYTHTVLOGDIR@/mythcommflag*.log @MYTHTVLOGDIR@/mythmetadatalookup*.log @MYTHTVLOGDIR@/mythtranscode*.log @MYTHTVLOGDIR@/mythtv-setup*.log @MYTHTVLOGDIR@/mythutil*.log {
+ weekly
+ rotate 0
+}
+
+# VERY transient
+# many, many previews
+ at MYTHTVLOGDIR@/mythpreviewgen*.log {
+ daily
+ rotate 0
+ lastaction
+ find @MYTHTVLOGDIR@ -name 'mythpreviewgen*' -type f -mtime +6 -delete
+ find @MYTHTVLOGDIR@/old -name 'mythpreviewgen*' -type f -mtime +6 -delete
+ endscript
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120927/1c1c12cc/attachment.html>
More information about the macports-changes
mailing list