source: trunk/dports/_resources/port1.0/group/x11font-1.0.tcl @ 102814

Last change on this file since 102814 was 102814, checked in by jmr@…, 7 years ago

x11font portgroup: set 'installs_libs no'

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: x11font-1.0.tcl 102814 2013-02-08 21:55:20Z jmr@macports.org $
2#
3# Copyright (c) 2009 The MacPorts Project
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met:
9#
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15# 3. Neither the name of The MacPorts Project nor the names of its
16#    contributors may be used to endorse or promote products derived from
17#    this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31#
32# Usage:
33# PortGroup       x11font 1.0
34# x11font.setup   portname version fontsubdir
35# where portname is just the name for the port (and should match the
36# distname for simplicity), version is the port's version, and the fontsubdir
37# is the subdirectory of ${prefix}/share/fonts used by this font.
38# This automatically defines name, version, categories, homepage,
39# master_sites, and depends_build as appropriate, and sets up
40# configure.args, post-destroot, post-activate, and post-deactivate.
41#
42
43proc x11font.setup {myportname myportversion myfontsubdir} {
44    global homepage prefix name extract.suffix master_sites x11font_myfontdir
45
46    name             ${myportname}
47    version          ${myportversion}
48    categories       x11 x11-font graphics
49    supported_archs  noarch
50    installs_libs    no
51    homepage         http://www.x.org/
52    master_sites     xorg:individual/font/
53    use_bzip2        yes
54    depends_build    port:pkgconfig bin:bdftopcf:bdftopcf \
55                     port:xorg-font-util bin:gzip:gzip
56    depends_lib      port:fontconfig port:mkfontscale port:mkfontdir
57    set x11font_myfontdir    ${prefix}/share/fonts/${myfontsubdir}
58    configure.args   --with-fontdir=${x11font_myfontdir}
59
60    post-destroot {
61        foreach fontsFile {fonts.alias fonts.dir fonts.list fonts.scale fonts.cache-1} {
62            if {[file exists ${destroot}${x11font_myfontdir}/${fontsFile}]} {
63                delete ${destroot}${x11font_myfontdir}/${fontsFile}
64            }
65        }
66    }
67
68    post-activate {
69        system "mkfontscale ${x11font_myfontdir}"
70        system "mkfontdir ${x11font_myfontdir}"
71        system "fc-cache ${x11font_myfontdir}"
72    }
73
74    post-deactivate {
75        system "mkfontscale ${x11font_myfontdir}"
76        system "mkfontdir ${x11font_myfontdir}"
77        system "fc-cache ${x11font_myfontdir}"
78    }
79
80    livecheck.type      regex
81    livecheck.regex     ${name}-(\[\\d.\]+)${extract.suffix}
82    livecheck.url       http://xorg.freedesktop.org/archive/individual/font/?C=M&O=D
83}
Note: See TracBrowser for help on using the repository browser.