-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
Copy pathlibmspub.rb
92 lines (80 loc) · 3.5 KB
/
libmspub.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class Libmspub < Formula
desc "Interpret and import Microsoft Publisher content"
homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
url "https://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.4.tar.xz"
sha256 "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba"
license "MPL-2.0"
revision 16
livecheck do
url "https://dev-www.libreoffice.org/src/"
regex(/href=["']?libmspub[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 cellar: :any, arm64_sequoia: "fbb1cb9b4966d79fa289f9f9cb09726c37b46557378d89381d7b51d9f3177016"
sha256 cellar: :any, arm64_sonoma: "8cb2377b7d0cfa029bc64851ccc621c7e75f28fd9d96ecdd87b46c043ef5fdcf"
sha256 cellar: :any, arm64_ventura: "a17bfc0422565de7fade8199f23c2a97c1daf0834a34b113f11b83777c7138b7"
sha256 cellar: :any, arm64_monterey: "58d3b2c548f8d38cda3ade55681f0b41d045b33d36614f4eeb38e28ca0b2d763"
sha256 cellar: :any, sonoma: "0e8a7db8b068af6009973bcf3a077c13f6107e1d0e9b0b92e109ad38429b0396"
sha256 cellar: :any, ventura: "45ddab4bd14a6f2a5b8f0814cb10eb58328076d076e0444177f063a4c634d222"
sha256 cellar: :any, monterey: "d792d2c08761c3e13de216ae3a4e8b516cd1a4d749c4397b9dc284901475c477"
sha256 cellar: :any_skip_relocation, x86_64_linux: "18293c8d8717b1fcf2388ee6eb6278295cc02c4e4b92335dbfe2ec9828479245"
end
depends_on "boost" => :build
depends_on "libwpg" => :build
depends_on "pkg-config" => :build
depends_on "icu4c@75"
depends_on "librevenge"
depends_on "libwpd"
# Fix for missing include needed to build with recent GCC. Remove in the next release.
# Commit ref: https://git.libreoffice.org/libmspub/+/698bed839c9129fa7a90ca1b5a33bf777bc028d1%5E%21
on_linux do
patch :DATA
end
def install
# icu4c 75+ needs C++17
ENV.append "CXXFLAGS", "-std=gnu++17"
system "./configure", "--disable-silent-rules",
"--disable-static",
"--disable-tests",
"--disable-werror",
"--without-docs",
*std_configure_args
system "make", "install"
end
test do
(testpath/"test.cpp").write <<~EOS
#include <librevenge-stream/librevenge-stream.h>
#include <libmspub/MSPUBDocument.h>
int main() {
librevenge::RVNGStringStream docStream(0, 0);
libmspub::MSPUBDocument::isSupported(&docStream);
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-o", "test", "-lrevenge-stream-0.0",
"-I#{Formula["librevenge"].include}/librevenge-0.0",
"-lmspub-0.1", "-I#{include}/libmspub-0.1",
"-L#{lib}", "-L#{Formula["librevenge"].lib}"
system "./test"
end
end
__END__
From 698bed839c9129fa7a90ca1b5a33bf777bc028d1 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <[email protected]>
Date: Tue, 11 Jun 2019 12:15:28 +0200
Subject: [PATCH] missing include
Change-Id: I3c5c085f55223688cdc7b972f7c7981411881263
Reviewed-on: https://gerrit.libreoffice.org/73814
Reviewed-by: Michael Stahl <[email protected]>
Tested-by: Michael Stahl <[email protected]>
---
diff --git a/src/lib/MSPUBMetaData.h b/src/lib/MSPUBMetaData.h
index 9167f4f..27bdd4f 100644
--- a/src/lib/MSPUBMetaData.h
+++ b/src/lib/MSPUBMetaData.h
@@ -13,6 +13,7 @@
#include <map>
#include <utility>
#include <vector>
+#include <stdint.h>
#include <librevenge/librevenge.h>