11class Podofo < Formula
22 desc "Library to work with the PDF file format"
33 homepage "https://github.com/podofo/podofo"
4- url "https://github.com/podofo/podofo/archive/refs/tags/0.10.4 .tar.gz"
5- sha256 "6b1b13cdfb2ba5e8bbc549df507023dd4873bc946211bc6942183b8496986904 "
4+ url "https://github.com/podofo/podofo/archive/refs/tags/1.0.0 .tar.gz"
5+ sha256 "e44276d927838034b51c4c79001e7ae5c3fef90b6844824004c77f160c1a22ea "
66 license all_of : [ "LGPL-2.0-only" , "GPL-2.0-only" ]
77 head "https://github.com/podofo/podofo.git" , branch : "master"
88
@@ -12,13 +12,13 @@ class Podofo < Formula
1212 end
1313
1414 bottle do
15- sha256 cellar : :any , arm64_sequoia : "7c435c43229584af3a6dacf57822271969610de7507f61397b457afb83145d13 "
16- sha256 cellar : :any , arm64_sonoma : "021956f2a96a9661ce424e048a17c70f4e01a117eccdcf161e8d770122ec5fdf "
17- sha256 cellar : :any , arm64_ventura : "6efa2ab68a3d25d65c43adf0ff70d5ecfd3c2d2c132f7ab491225842992335a7 "
18- sha256 cellar : :any , sonoma : "5de8cfae5cf79354203b9a6a4138d0aeee038feb186430f9d2bc1a3b94329d75 "
19- sha256 cellar : :any , ventura : "8d58c3e164bce391cf4fe8ad987b2d81a79bf2f4f40dde4f0c9b1137ebaa9a4a "
20- sha256 cellar : :any_skip_relocation , arm64_linux : "8f46f50ea998e67693cbb46550684b3845902f6c985765ade57e21e207173f45 "
21- sha256 cellar : :any_skip_relocation , x86_64_linux : "b850c51ef8df89ab04d0c37364bf7e20a91d7f30c7be86c474141be7add8be52 "
15+ sha256 cellar : :any , arm64_sequoia : "746fab5e13fff37b542e22aa312460ef0a7f682d0753451860f10b749543ad08 "
16+ sha256 cellar : :any , arm64_sonoma : "f8c140ea8d95f9c79d1d8b0c779e2f8a42a668f2b9a1405d3c964b7bf7904abf "
17+ sha256 cellar : :any , arm64_ventura : "8cf0efc5f48abb1287f0c51f8fba04507fea0243a3b0e079ce584e96254a5f3e "
18+ sha256 cellar : :any , sonoma : "3f2dbdff549ecf6aebc768cd6acd3364d9451b1d6bb3a26d7f8feb381b52a164 "
19+ sha256 cellar : :any , ventura : "4985f589d79001c1a6fbcf4783f77cfcc0902fa93dd42b7ee5827d046df820be "
20+ sha256 cellar : :any_skip_relocation , arm64_linux : "558bd4ab20e1971706cf525638d2706166d3ae9e5fa2b6338f8c38f168621a53 "
21+ sha256 cellar : :any_skip_relocation , x86_64_linux : "1fbc9e09e5bee79e8fefd31fa9bfed573bb22e2241c3eb4dac467fcbbf76b6a0 "
2222 end
2323
2424 depends_on "cmake" => :build
@@ -35,15 +35,28 @@ class Podofo < Formula
3535 uses_from_macos "libxml2"
3636 uses_from_macos "zlib"
3737
38+ on_ventura :or_older do
39+ depends_on "llvm"
40+
41+ fails_with :clang do
42+ cause "error: 'to_chars' is unavailable: introduced in macOS 13.3"
43+ end
44+ end
45+
3846 def install
47+ if OS . mac? && MacOS . version <= :ventura
48+ ENV . llvm_clang
49+ # When using Homebrew's superenv shims, we need to use HOMEBREW_LIBRARY_PATHS
50+ # rather than LDFLAGS for libc++ in order to correctly link to LLVM's libc++.
51+ ENV . prepend_path "HOMEBREW_LIBRARY_PATHS" , Formula [ "llvm" ] . opt_lib /"c++"
52+ # Workaround for error: call to 'from_chars' is ambiguous
53+ inreplace "src/podofo/private/charconv_compat.h" , "#define WANT_FROM_CHARS" , ""
54+ end
55+
3956 args = %W[
4057 -DCMAKE_INSTALL_NAME_DIR=#{ opt_lib }
4158 -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON
42- -DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON
43- -DCMAKE_DISABLE_FIND_PACKAGE_LUA=ON
44- -DPODOFO_BUILD_TOOLS=TRUE
45- -DFREETYPE_INCLUDE_DIR_FT2BUILD=#{ Formula [ "freetype" ] . opt_include } /freetype2
46- -DFREETYPE_INCLUDE_DIR_FTHEADER=#{ Formula [ "freetype" ] . opt_include } /freetype2/config/
59+ -DPODOFO_BUILD_UNSUPPORTED_TOOLS=TRUE
4760 ]
4861 system "cmake" , "-S" , "." , "-B" , "build" , *args , *std_cmake_args
4962 system "cmake" , "--build" , "build"
0 commit comments