1#! /bin/sh 2 3############################################################################# 4## 5## Copyright (C) 2016 The Qt Company Ltd. 6## Contact: https://www.qt.io/licensing/ 7## 8## This file is the build configuration utility of the Qt Toolkit. 9## 10## $QT_BEGIN_LICENSE:LGPL$ 11## Commercial License Usage 12## Licensees holding valid commercial Qt licenses may use this file in 13## accordance with the commercial license agreement provided with the 14## Software or, alternatively, in accordance with the terms contained in 15## a written agreement between you and The Qt Company. For licensing terms 16## and conditions see https://www.qt.io/terms-conditions. For further 17## information use the contact form at https://www.qt.io/contact-us. 18## 19## GNU Lesser General Public License Usage 20## Alternatively, this file may be used under the terms of the GNU Lesser 21## General Public License version 3 as published by the Free Software 22## Foundation and appearing in the file LICENSE.LGPL3 included in the 23## packaging of this file. Please review the following information to 24## ensure the GNU Lesser General Public License version 3 requirements 25## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 26## 27## GNU General Public License Usage 28## Alternatively, this file may be used under the terms of the GNU 29## General Public License version 2.0 or (at your option) the GNU General 30## Public license version 3 or any later version approved by the KDE Free 31## Qt Foundation. The licenses are as published by the Free Software 32## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 33## included in the packaging of this file. Please review the following 34## information to ensure the GNU General Public License requirements will 35## be met: https://www.gnu.org/licenses/gpl-2.0.html and 36## https://www.gnu.org/licenses/gpl-3.0.html. 37## 38## $QT_END_LICENSE$ 39## 40############################################################################# 41 42# This is a small script to copy the required files from a freetype tarball 43# into 3rdparty/freetype/ . Documentation, tests, demos etc. are not imported. 44 45if [ $# -ne 2 ]; then 46 echo "Usage: $0 freetype_tarball_dir/ \$QTDIR/src/3rdparty/freetype/" 47 exit 1 48fi 49 50FT_DIR=$1 51TARGET_DIR=$2 52 53if [ ! -d "$FT_DIR" -o ! -r "$FT_DIR" -o ! -d "$TARGET_DIR" -o ! -w "$TARGET_DIR" ]; then 54 echo "Either the freetype source dir or the target dir do not exist," 55 echo "are not directories or have the wrong permissions." 56 exit 2 57fi 58 59# with 1 argument, copies FT_DIR/$1 to TARGET_DIR/$1 60# with 2 arguments, copies FT_DIR/$1 to TARGET_DIR/$2 61copy_file_or_dir() { 62 if [ $# -lt 1 -o $# -gt 2 ]; then 63 echo "Wrong number of arguments to copy_file_or_dir" 64 exit 3 65 fi 66 67 SOURCE_FILE=$1 68 if [ -n "$2" ]; then 69 DEST_FILE=$2 70 else 71 DEST_FILE=$1 72 fi 73 74 mkdir -p "$TARGET_DIR/$(dirname "$SOURCE_FILE")" 75 cp -R "$FT_DIR/$SOURCE_FILE" "$TARGET_DIR/$DEST_FILE" 76} 77 78FILES=" 79 README 80 builds/unix/ftsystem.c 81 docs/CHANGES 82 docs/CUSTOMIZE 83 docs/DEBUG 84 docs/PROBLEMS 85 docs/TODO 86 docs/FTL.TXT 87 docs/GPLv2.TXT 88 docs/LICENSE.TXT 89 include/ 90 src/ 91" 92 93for i in $FILES; do 94 copy_file_or_dir "$i" 95done 96