Skip to content

Commit

Permalink
mythtv-core.28: add fonts used by certain themes
Browse files Browse the repository at this point in the history
Dejavu Sans is used in various themes.  Liberation Sans is used in
MythCentre.  Note that Myth uses Qt's font-handling, not X11 facilities.
Therefore need to link fonts into share/mythtv/fonts.
  • Loading branch information
ctreleaven committed Feb 13, 2017
1 parent 2c790c4 commit 5169551
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 13 additions & 4 deletions multimedia/mythtv.28/Portfile
Expand Up @@ -10,9 +10,9 @@ set shorthash 03f44039
set majorversion .28
set minorversion .1
set lastcommit 20170201
set corerev 0
set corerev 1
set pluginsrev 0
set metarev 0
set metarev 1
github.setup MythTV mythtv ${shorthash}
checksums rmd160 0f98af89040fc0666f36a0c26b473d1c4f83b243 \
sha256 30bb2a7ed310417840a380a21d387a0c19fad42e8fa04b48db61ccaf0d987711
Expand Down Expand Up @@ -102,7 +102,9 @@ if {$subport eq "mythtv-core${majorversion}"} {

conflicts mythtv-core.25 mythtv-core.26 mythtv-core.27

depends_run port:logrotate
depends_run port:logrotate \
port:liberation-fonts \
port:dejavu-fonts

require_active_variants \
qt5-mysql-plugin mariadb55 mysql56
Expand Down Expand Up @@ -468,7 +470,9 @@ if {$subport eq "mythtv-core${majorversion}"} {
}

universal_variant no


set fontdir ${prefix}/share/mythtv/fonts

post-activate {
# make logrotate ready to go
if {![file exists ${prefix}/etc/logrotate.conf]} {
Expand All @@ -485,10 +489,15 @@ if {$subport eq "mythtv-core${majorversion}"} {
notes-append "
Installation of the startup item was prohibited due to a setting."
}
ui_debug "Make fonts available to Myth"
system -W ${fontdir} "ln -sfv ${prefix}/share/fonts/dejavu-fonts/DejaVuSans*.ttf ."
system -W ${fontdir} "ln -sfv ${prefix}/share/fonts/liberation-fonts/LiberationSans*.ttf ."
}

pre-deactivate {
file delete -force ${plistdir}/${plistfile}
file delete -force ${fontdir}/DejaVuSans*.ttf
file delete -force ${fontdir}/LiberationSans*.ttf
}

notes "############################################################################
Expand Down
5 changes: 5 additions & 0 deletions multimedia/mythtv.28/files/postinstall
Expand Up @@ -30,4 +30,9 @@ if [ ! -d "/opt/local/var/db/mariadb/mythconverg" ] ; then
echo Add time zone support tables
$DB_BIN/mysql_tzinfo_to_sql /usr/share/zoneinfo | $DB_BIN/mysql -u root mysql
fi

echo Make fonts available to Myth
ln -sfv @PREFIX@/share/fonts/dejavu-fonts/DejaVuSans*.ttf @PREFIX@/share/mythtv/fonts
ln -sfv @PREFIX@/share/fonts/liberation-fonts/LiberationSans*.ttf @PREFIX@/share/mythtv/fonts

echo $0 Finished

0 comments on commit 5169551

Please sign in to comment.