Changeset 64811


Ignore:
Timestamp:
Mar 16, 2010, 12:17:16 AM (10 years ago)
Author:
jeremyhu@…
Message:

xinit: Update to 1.2.1

Location:
trunk/dports/x11/xinit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/x11/xinit/Portfile

    r60647 r64811  
    44
    55name                xinit
    6 version             1.2.0
     6version             1.2.1
    77categories          x11
    88platforms           darwin
     
    1515master_sites        http://xorg.freedesktop.org/archive/individual/app/
    1616
    17 checksums           md5     fe1696cab2fbed6fa059d0cd1c53ac13 \
    18                     sha1    85a838c2010f27ef6d09d6ec4b1208a66cc8d697 \
    19                     rmd160  c2895db985482c13ef300a037bf2e182aeda1442
     17checksums           md5     56f2d202b3dc10fcd21931a67bb270f7 \
     18                    sha1    baf36374aa1632054816a8281e55e1539459664b \
     19                    rmd160  993b068e4758521ed930bd78069c291b68d88037
    2020
    2121use_bzip2           yes
     
    4343
    4444        xinstall -m 755 ${filespath}/font_cache.sh ${destroot}${prefix}/bin/font_cache
    45         reinplace "s|^X11DIR=.*$|X11DIR=${prefix}|" ${destroot}${prefix}/bin/font_cache
    46         reinplace "s|^X11FONTDIR=.*$|X11FONTDIR=${prefix}/share/fonts|" ${destroot}${prefix}/bin/font_cache
     45        reinplace "s|__PREFIX__|${prefix}|" ${destroot}${prefix}/bin/font_cache
    4746}
  • trunk/dports/x11/xinit/files/font_cache.sh

    r46257 r64811  
    11#!/bin/bash
    2 # Copyright (c) 2008 Apple Inc.
    3 #
    4 # Permission is hereby granted, free of charge, to any person
    5 # obtaining a copy of this software and associated documentation files
    6 # (the "Software"), to deal in the Software without restriction,
    7 # including without limitation the rights to use, copy, modify, merge,
    8 # publish, distribute, sublicense, and/or sell copies of the Software,
    9 # and to permit persons to whom the Software is furnished to do so,
    10 # subject to the following conditions:
    11 #
    12 # The above copyright notice and this permission notice shall be
    13 # included in all copies or substantial portions of the Software.
    14 #
    15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    16 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    17 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    18 # NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
    19 # HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    20 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    22 # DEALINGS IN THE SOFTWARE.
    23 #
    24 # Except as contained in this notice, the name(s) of the above
    25 # copyright holders shall not be used in advertising or otherwise to
    26 # promote the sale, use or other dealings in this Software without
    27 # prior written authorization.
    28 
    29 X11DIR=/usr/X11
    30 X11FONTDIR=${X11DIR}/lib/X11/fonts
     2# Copyright (c) 2008-2010 Apple Inc. All Rights Reserved.
     3#
     4# @APPLE_LICENSE_HEADER_START@
     5#
     6# This file contains Original Code and/or Modifications of Original Code
     7# as defined in and that are subject to the Apple Public Source License
     8# Version 2.0 (the 'License'). You may not use this file except in
     9# compliance with the License. Please obtain a copy of the License at
     10# http://www.opensource.apple.com/apsl/ and read it before using this
     11# file.
     12#
     13# The Original Code and all software distributed under the License are
     14# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
     15# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
     16# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
     17# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
     18# Please see the License for the specific language governing rights and
     19# limitations under the License.
     20#
     21# @APPLE_LICENSE_HEADER_END@
     22
     23X11DIR=__PREFIX__
     24X11FONTDIR=${X11DIR}/share/fonts
     25FC_LOCKFILE=""
    3126
    3227# Are we caching system fonts or user fonts?
     
    188183
    189184    # Finally, update fontconfig's cache
    190     if [[ -x ${X11DIR}/bin/fc-cache ]] ; then
    191         echo "font_cache: Updating FC cache"
    192         if [[ $system == 1 ]] ; then
    193             ${X11DIR}/bin/fc-cache -s \
    194                 $([[ $force == 1 ]] && echo "-f -r") \
    195                 $([[ $verbose == 1 ]] && echo "-v")
    196         else
    197             ${X11DIR}/bin/fc-cache \
    198                 $([[ $force == 1 ]] && echo "-f -r") \
    199                 $([[ $verbose == 1 ]] && echo "-v")
    200         fi
     185    echo "font_cache: Updating FC cache"
     186    if [[ $system == 1 ]] ; then
     187        ${X11DIR}/bin/fc-cache -s \
     188            $([[ $force == 1 ]] && echo "-f -r") \
     189            $([[ $verbose == 1 ]] && echo "-v")
     190    else
     191        ${X11DIR}/bin/fc-cache \
     192            $([[ $force == 1 ]] && echo "-f -r") \
     193            $([[ $verbose == 1 ]] && echo "-v")
    201194    fi
    202195    echo "font_cache: Done"
     
    210203    echo "    -s, --system       : Cache system font dirs instead of user dirs"
    211204    echo "    -v, --verbose      : Verbose Output"
     205}
     206
     207cleanup() {
     208    [[ -r "${FC_LOCKFILE}" ]] && rm -f "${FC_LOCKFILE}"
     209    exit 1
    212210}
    213211
     
    224222done
    225223
     224if [[ $system == 1 ]] ; then
     225    FC_LOCKFILE="${X11DIR}/var/run/font_cache.lock"
     226elif [[ -w "${TMPDIR}" ]] ; then
     227    FC_LOCKFILE="${TMPDIR}/font_cache.lock"
     228elif [[ -w "/tmp" ]] ; then
     229    FC_LOCKFILE="/tmp/font_cache.$UID.lock"
     230else
     231    FC_LOCKFILE="${HOME}/.font_cache.lock"
     232fi
     233
     234if [[ -x /usr/bin/lockfile ]] ; then
     235    if /usr/bin/lockfile -r 0 -l 240 -s 4 -! "${FC_LOCKFILE}" ; then
     236            echo "font_cache is already running." >&2
     237            echo "If you believe this to be erroneous, please remove ${FC_LOCKFILE}." >&2
     238            exit 1
     239    fi
     240else
     241    if [[ -r "${FC_LOCKFILE}" ]] ; then
     242        read OLD_PID < "${FC_LOCKFILE}"
     243        if kill -0 ${OLD_PID} >& /dev/null ; then
     244            echo "font_cache is already running with PID ${OLD_PID}." >&2
     245            echo "If you believe this to be erroneous, please remove ${FC_LOCKFILE}." >&2
     246            exit 1
     247        fi
     248
     249        echo "Removing stale ${FC_LOCKFILE}" >&2
     250        rm -f "${FC_LOCKFILE}"
     251    fi
     252
     253    echo $$ > "${FC_LOCKFILE}"
     254
     255    if [[ ! -r "${FC_LOCKFILE}" ]] ; then
     256        echo "Unable to write to ${FC_LOCKFILE}." >&2
     257        exit 1
     258    fi
     259
     260    # Now make sure we didn't collide mid-air
     261    read OLD_PID < "${FC_LOCKFILE}"
     262    if [[ $$ != ${OLD_PID} ]] ; then
     263        echo "font_cache is already running with PID ${OLD_PID}." >&2
     264        exit 1
     265    fi
     266fi
     267
     268trap cleanup SIGINT SIGQUIT SIGABRT SIGTERM
     269
    226270setup_fontdirs
     271
     272rm -f "${FC_LOCKFILE}"
Note: See TracChangeset for help on using the changeset viewer.