mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #181 from nulano/for-5062
Update config for FriBiDi dynamic linking
This commit is contained in:
commit
4d91cd8485
44
config.sh
44
config.sh
|
@ -5,6 +5,7 @@ ARCHIVE_SDIR=pillow-depends-master
|
|||
|
||||
# Package versions for fresh source builds
|
||||
FREETYPE_VERSION=2.10.4
|
||||
HARFBUZZ_VERSION=2.8.0
|
||||
LIBPNG_VERSION=1.6.37
|
||||
ZLIB_VERSION=1.2.11
|
||||
JPEG_VERSION=9d
|
||||
|
@ -17,6 +18,21 @@ LIBWEBP_VERSION=1.2.0
|
|||
BZIP2_VERSION=1.0.8
|
||||
LIBXCB_VERSION=1.14
|
||||
|
||||
# workaround for multibuild bug with .tar.xz
|
||||
function untar {
|
||||
local in_fname=$1
|
||||
if [ -z "$in_fname" ];then echo "in_fname not defined"; exit 1; fi
|
||||
local extension=${in_fname##*.}
|
||||
case $extension in
|
||||
tar) tar -xf $in_fname ;;
|
||||
gz|tgz) tar -zxf $in_fname ;;
|
||||
bz2) tar -jxf $in_fname ;;
|
||||
zip) unzip -qq $in_fname ;;
|
||||
xz) unxz -c $in_fname | tar -xf - ;;
|
||||
*) echo Did not recognize extension $extension; exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function pre_build {
|
||||
# Any stuff that you need to do before you start building the wheels
|
||||
# Runs in the root directory of this repository.
|
||||
|
@ -75,6 +91,16 @@ function pre_build {
|
|||
build_freetype
|
||||
fi
|
||||
|
||||
if [ -z "$IS_MACOS" ]; then
|
||||
export FREETYPE_LIBS=-lfreetype
|
||||
export FREETYPE_CFLAGS=-I/usr/local/include/freetype2/
|
||||
fi
|
||||
build_simple harfbuzz $HARFBUZZ_VERSION https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION tar.xz --with-freetype=yes --with-glib=no
|
||||
if [ -z "$IS_MACOS" ]; then
|
||||
export FREETYPE_LIBS=''
|
||||
export FREETYPE_CFLAGS=''
|
||||
fi
|
||||
|
||||
# Append licenses
|
||||
for filename in dependency_licenses/*; do
|
||||
echo -e "\n\n----\n\n$(basename $filename | cut -f 1 -d '.')\n" | cat >> Pillow/LICENSE
|
||||
|
@ -82,6 +108,17 @@ function pre_build {
|
|||
done
|
||||
}
|
||||
|
||||
function pip_wheel_cmd {
|
||||
local abs_wheelhouse=$1
|
||||
if [ -z "$IS_MACOS" ]; then
|
||||
CFLAGS="$CFLAGS --std=c99" # for Raqm
|
||||
fi
|
||||
pip wheel $(pip_opts) \
|
||||
--global-option build_ext --global-option --enable-raqm \
|
||||
--global-option --vendor-raqm --global-option --vendor-fribidi \
|
||||
-w $abs_wheelhouse --no-deps .
|
||||
}
|
||||
|
||||
function run_tests_in_repo {
|
||||
# Run Pillow tests from within source repo
|
||||
python3 selftest.py
|
||||
|
@ -91,7 +128,12 @@ function run_tests_in_repo {
|
|||
EXP_CODECS="jpg jpg_2000"
|
||||
EXP_CODECS="$EXP_CODECS libtiff zlib"
|
||||
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
|
||||
EXP_FEATURES="transp_webp webp_anim webp_mux"
|
||||
if [ -z "$IS_MACOS" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]]; then
|
||||
EXP_FEATURES="fribidi harfbuzz raqm transp_webp webp_anim webp_mux"
|
||||
else
|
||||
# can't find FriBiDi
|
||||
EXP_FEATURES="transp_webp webp_anim webp_mux"
|
||||
fi
|
||||
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
|
||||
EXP_FEATURES="$EXP_FEATURES xcb"
|
||||
fi
|
||||
|
|
38
dependency_licenses/HARFBUZZ.txt
Normal file
38
dependency_licenses/HARFBUZZ.txt
Normal file
|
@ -0,0 +1,38 @@
|
|||
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
|
||||
For parts of HarfBuzz that are licensed under different licenses see individual
|
||||
files names COPYING in subdirectories where applicable.
|
||||
|
||||
Copyright © 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 Google, Inc.
|
||||
Copyright © 2018,2019,2020 Ebrahim Byagowi
|
||||
Copyright © 2019,2020 Facebook, Inc.
|
||||
Copyright © 2012 Mozilla Foundation
|
||||
Copyright © 2011 Codethink Limited
|
||||
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
|
||||
Copyright © 2009 Keith Stribley
|
||||
Copyright © 2009 Martin Hosken and SIL International
|
||||
Copyright © 2007 Chris Wilson
|
||||
Copyright © 2006 Behdad Esfahbod
|
||||
Copyright © 2005 David Turner
|
||||
Copyright © 2004,2007,2008,2009,2010 Red Hat, Inc.
|
||||
Copyright © 1998-2004 David Turner and Werner Lemberg
|
||||
|
||||
For full copyright notices consult the individual files in the package.
|
||||
|
||||
|
||||
Permission is hereby granted, without written agreement and without
|
||||
license or royalty fees, to use, copy, modify, and distribute this
|
||||
software and its documentation for any purpose, provided that the
|
||||
above copyright notice and the following two paragraphs appear in
|
||||
all copies of this software.
|
||||
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
||||
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
||||
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
|
||||
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
||||
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
||||
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
22
dependency_licenses/RAQM.txt
Normal file
22
dependency_licenses/RAQM.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2015 Information Technology Authority (ITA) <foss@ita.gov.om>
|
||||
Copyright © 2016 Khaled Hosny <khaledhosny@eglug.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
Loading…
Reference in New Issue
Block a user