Skip to content

Commit 5586a10

Browse files
BrewTestBotdaeho-ro
authored andcommitted
podofo 1.0.0
1 parent 984d3b3 commit 5586a10

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

Formula/p/podofo.rb

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class 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

@@ -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

Comments
 (0)