fdroidserver: depend on pillow formula

Closes #80457.

Signed-off-by: rui <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Alexander Bayandin 2021-07-02 16:07:43 +01:00 committed by BrewTestBot
parent 22dd3a70de
commit e6cbd4daa0
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
2 changed files with 5 additions and 39 deletions

View File

@ -6,6 +6,7 @@ class Fdroidserver < Formula
url "https://files.pythonhosted.org/packages/16/2c/b301fe0f1dbc40fa00bf16891bf01549c0c99e9eb6eaac7febcea58dd30c/fdroidserver-2.0.3.tar.gz"
sha256 "220ea8dd563229fcb2c3f6d6d7da0c7854b46a08e7b4b8a5be05576c83c72ebf"
license "AGPL-3.0-or-later"
revision 1
bottle do
sha256 cellar: :any, arm64_big_sur: "5a4f935b95b28201b5ffbbf47402958491e3524d411783a2d5d1a9e30c44852c"
@ -16,19 +17,14 @@ class Fdroidserver < Formula
depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "freetype"
depends_on "jpeg"
depends_on "libtiff"
depends_on "numpy"
depends_on "openssl@1.1"
depends_on "pillow"
depends_on "python@3.9"
depends_on "s3cmd"
depends_on "tcl-tk"
depends_on "webp"
uses_from_macos "libxml2"
uses_from_macos "libxslt"
uses_from_macos "zlib"
on_macos do
resource "appnope" do
@ -207,11 +203,6 @@ class Fdroidserver < Formula
sha256 "87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"
end
resource "Pillow" do
url "https://files.pythonhosted.org/packages/dc/c2/72349bb3a995fda8f4a064ee5dc92903b21886f27be4f5f1ed8c7b7174e4/Pillow-8.3.0.tar.gz"
sha256 "803606e206f3e366eea46b1e7ab4dac74cfac770d04de9c35319814e11e47c46"
end
resource "prompt-toolkit" do
url "https://files.pythonhosted.org/packages/88/4b/2c0f9e2b52297bdeede91c8917c51575b125006da5d0485521fa2b1e0b75/prompt_toolkit-3.0.19.tar.gz"
sha256 "08360ee3a3148bdb5163621709ee322ec34fc4375099afa4bbf751e9b7b7fa4f"
@ -333,34 +324,8 @@ class Fdroidserver < Formula
end
def install
bash_completion.install "completion/bash-completion" => "fdroid"
venv = virtualenv_create(libexec, "python3")
resource("Pillow").stage do
inreplace "setup.py" do |s|
s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h"
s.gsub! "xcb.h", "probably_not_a_header_called_this_eh.h"
on_macos do
sdkprefix = MacOS.sdk_path_if_needed ? MacOS.sdk_path : ""
s.gsub! "ZLIB_ROOT = None",
"ZLIB_ROOT = ('#{sdkprefix}/usr/lib', '#{sdkprefix}/usr/include')"
end
on_linux do
zlib = Formula["zlib"].opt_prefix
s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{zlib}/lib', '#{zlib}/include')"
end
s.gsub! "JPEG_ROOT = None",
"JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')"
s.gsub! "FREETYPE_ROOT = None",
"FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', " \
"'#{Formula["freetype"].opt_prefix}/include')"
end
# avoid triggering "helpful" distutils code that doesn't recognize Xcode 7 .tbd stubs
ENV.delete "SDKROOT"
venv.pip_install Pathname.pwd
end
# Fix "ld: file not found: /usr/lib/system/libsystem_darwin.dylib" for lxml
ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra
venv.pip_install resource("lxml")
@ -377,13 +342,14 @@ class Fdroidserver < Formula
venv.pip_install resource("cffi") # or bcrypt fails to build
venv.pip_install resource("wheel") # or kiwisolver fails to build
res = resources.map(&:name).to_set - %w[cffi lxml Pillow ptyprocess wheel]
res = resources.map(&:name).to_set - %w[cffi lxml ptyprocess wheel]
res.each do |r|
venv.pip_install resource(r)
end
venv.pip_install_and_link buildpath
bash_completion.install "completion/bash-completion" => "fdroid"
doc.install "examples"
end

View File

@ -70,7 +70,7 @@
"extra_packages": ["ipykernel"]
},
"fdroidserver": {
"exclude_packages": ["numpy"],
"exclude_packages": ["numpy", "pillow"],
"extra_packages": ["wheel"]
},
"flintrock": {