forked from GoyaPtyLtd/BaseElements-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILDING.macOS
349 lines (204 loc) · 10.5 KB
/
BUILDING.macOS
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
=======================================================================
macOS
=======================================================================
On macOS the plugin is built using macOS 10.14.4 and Xcode 10.2.
Execute the following command to make sure that the Xcode Command Line Tools are installed.
xcode-select --install
Download the FileMaker External Plug-In API from
http://www.filemaker.com/support/technologies/
and place the FMWrapper.framework in the ${SRCROOT}/Libraries/macOS directory.
In this guide, ${SRCROOT} is the path to the project root (i.e. BaseElements-Plugin) directory.
=======================================================================
Boost - 1.70_0
=======================================================================
Boost is available from
http://www.boost.org/
and extract the archive. Then
cd boost_1_70_0
./bootstrap.sh
./b2 architecture=x86 address-model=64 link=static runtime-link=static install --prefix=build --with-program_options --with-regex --with-date_time --with-filesystem --with-thread cxxflags="-mmacosx-version-min=10.7 -stdlib=libc++" linkflags="-stdlib=libc++"
Copy the header and library files.
cp -R ./build/include/boost "${SRCROOT}/Headers/"
cp ./build/lib/*.a "${SRCROOT}/Libraries/macOS"
=======================================================================
Jansson - 2.5
=======================================================================
Download the source as a ZIP archive from
https://github.com/GoyaPtyLtd/jansson
and extract the archive. Then
cd jansson-master
autoreconf -i
./configure --prefix="$(pwd)/build" CFLAGS="-mmacosx-version-min=10.7"
make install
Copy the header and library files.
cp ./build/include/jansson.h ./build/include/jansson_config.h "${SRCROOT}/Headers/"
cp ./build/lib/libjansson.a "${SRCROOT}/Libraries/macOS/"
=======================================================================
liboauth - 1.0.3
=======================================================================
Download the source from
http://liboauth.sourceforge.net/
and extract the archive. Then
cd liboauth-1.0.3
./configure CFLAGS="-mmacosx-version-min=10.7"
make
Copy the header and library files.
cp ./src/oauth.h "${SRCROOT}/Headers/"
cp ./src/.libs/liboauth.a "${SRCROOT}/Libraries/macOS"
=======================================================================
mimetic - 0.9.8
=======================================================================
Download the source from
http://www.codesink.org/mimetic_mime_library.html#download
and extract the archive. Then
cd mimetic-0.9.8
Edit the file mimetic/codec/base64.h to replace line 72
*out = NL; ++out;
with
*out = CR; ++out;
*out = LF; ++out;
Then build the library.
./configure CXXFLAGS="-stdlib=libc++ -mmacosx-version-min=10.7" LDFLAGS="-stdlib=libc++" --prefix="$(pwd)/build" && make install
Copy the header and library files.
cp -R ./build/include/mimetic "${SRCROOT}/Headers/"
cp ./build/lib/libmimetic.a "${SRCROOT}/Libraries/macOS/"
Note: If make failed with the following error,
mmfile.cxx:60:14: error: ordered comparison between pointer and zero ('char *' and 'int')
retry after editing mimetic/os/mmfile.cxx to replace line 60
if(m_beg > 0)
with
if(m_beg != nullptr)
=======================================================================
OpenSSL - 1.0.2g
=======================================================================
Download the latest openssl source from
http://www.openssl.org/source/
and extract the archive. Then
cd openssl-1.0.2g
./Configure darwin64-x86_64-cc -mmacosx-version-min=10.7 --prefix="$(pwd)/build"
make install
Copy the header and library files.
cp -R ./build/include/openssl "${SRCROOT}/Headers/"
cp ./build/lib/libcrypto.a ./build/lib/libssl.a "${SRCROOT}/Libraries/macOS/"
=======================================================================
libssh2 - 1.7.0
=======================================================================
Download the source from
http://www.libssh2.org/
and extract the archive. Then
cd libssh2-1.7.0
CFLAGS="-mmacosx-version-min=10.7 -I<path_to_openssl/include>" LDFLAGS="-L<path_to_openssl/lib>" ./configure --with-openssl --with-libz --without-libgcrypt --prefix="$(pwd)/build" -exec-prefix="$(pwd)/build" --disable-shared && make install
(replacing <paths> as appropriate).
Copy the header and library files.
cp -R ./build/include "${SRCROOT}/Headers/libssh2"
cp ./build/lib/libssh2.a "${SRCROOT}/Libraries/macOS"
=======================================================================
libcurl - 7.48
=======================================================================
Note: OpenSSL & libssh2 must be built before building libcurl.
Download the source from
http://curl.haxx.se/download.html
and extract the archive. Then
cd curl-7.48.0
./configure CFLAGS="-mmacosx-version-min=10.7 -I${SRCROOT}/Headers/libssh2" LDFLAGS="-L${SRCROOT}/Libraries/macOS" --disable-dependency-tracking --disable-shared --with-libz --prefix="$(pwd)/build" --with-libssh2
make install
Copy the header and library files.
cp -R ./build/include/curl "${SRCROOT}/Headers/"
cp ./build/lib/libcurl.a "${SRCROOT}/Libraries/macOS"
=======================================================================
duktape - 2.3.0
=======================================================================
Download the source from
http://duktape.org/
and extract the archive and copy and rename the src directory.
cd duktape-2.3.0
cp -R src "${SRCROOT}/Source/duktape"
=======================================================================
libjpeg-turbo - 2.0.2
=======================================================================
Download the source from
http://www.libjpeg-turbo.org/
and extract the archive. Then
cd libjpeg-turbo-master
autoreconf -fiv
./configure --host x86_64-apple-darwin CFLAGS='-mmacosx-version-min=10.7' --without-simd
make install prefix="$(pwd)/build"
Copy the header and library files.
cp -R ./build/include "${SRCROOT}/Headers/libturbojpeg"
cp ./build/lib/libturbojpeg.a "${SRCROOT}/Libraries/macOS"
=======================================================================
Poco 1.9.2
=======================================================================
Download the source from
http://pocoproject.org/download/
and extract the archive. Then
cd poco-1.9.2-all
./configure --config=Darwin64-clang-libc++ --prefix=_build_macos --no-sharedlibs --static --poquito --omit=Data,MongoDB,Crypto,Net,XML,PageCompiler,Redis,Encodings --no-tests --no-samples
make -s -j install
Copy the header and library files.
cp -R ./_build_macos/usr/local/include/Poco "${SRCROOT}/Headers"
cp ./_build_macos/usr/local/lib/libPocoFoundation.a ./_build_macos/usr/local/lib/libPocoZip.a ./_build_macos/usr/local/lib/libPocoJSON.a "${SRCROOT}/Libraries/macOS"
=======================================================================
libxml2 - 2.9.4
=======================================================================
Download the source for libxml2 from
http://xmlsoft.org/downloads.html
and extract the archive. Then
cd libxml2-2.9.4
./configure CFLAGS="-mmacosx-version-min=10.7" --disable-shared --with-threads --without-python --without-zlib --without-lzma --prefix="$(pwd)/build"
make install
Copy the header and library files.
cp -R ./build/include/libxml2 "${SRCROOT}/Headers"
cp ./build/lib/libxml2.a "${SRCROOT}/Libraries/macOS"
=======================================================================
libxslt - 1.1.29
=======================================================================
Download the source from
http://xmlsoft.org/downloads.html
and extract the archive. Then
cd libxslt-1.1.29
./configure CFLAGS="-mmacosx-version-min=10.7" --disable-shared --without-python --without-crypto --prefix="$(pwd)/build"
make install
Copy the header and library files.
cp -R ./build/include/libxslt ./build/include/libexslt "${SRCROOT}/Headers"
cp ./build/lib/libexslt.a ./build/lib/libxslt.a "${SRCROOT}/Libraries/macOS"
=======================================================================
freetype - 2.7
=======================================================================
Download freetype from
https://www.freetype.org/download.html
and extract the archive. Then
cd freetype-2.7
CFLAGS="-mmacosx-version-min=10.7" ./configure --disable-shared --with-png=no --with-bzip2=no --with-harfbuzz=no --with-png=no --with-zlib=no --prefix="$(pwd)/build"
make install
Copy the header and library files.
cp -R ./build/include/freetype2 "${SRCROOT}/Headers"
cp ./build/lib/libfreetype.a "${SRCROOT}/Libraries/macOS"
=======================================================================
fontconfig - 2.12.1
=======================================================================
Download fontconfig from
https://www.freedesktop.org/wiki/Software/fontconfig/
and extract the archive. Then
cd fontconfig-2.12.1
CFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++" ./configure --disable-shared --prefix="$(pwd)/build" FREETYPE_CFLAGS="-I${SRCROOT}/Headers/freetype2" FREETYPE_LIBS="-L${SRCROOT}/Libraries/macOS -lfreetype" LDFLAGS="-L${SRCROOT}/Libraries/macOS"
make install
Copy the header and library files.
cp -R ./build/include/fontconfig "${SRCROOT}/Headers"
cp ./build/lib/libfontconfig.a "${SRCROOT}/Libraries/macOS"
=======================================================================
podofo - 0.9.4
=======================================================================
Download podofo from
http://podofo.sourceforge.net/download.html
and extract the archive. Then
cd podofo-0.9.4
Edit
CMakeLists.txt
to remove references to CMP0033 and the PNG library. Then
CFLAGS="-mmacosx-version-min=10.7" && CPPFLAGS="-mmacosx-version-min=10.7" && cmake -G "Unix Makefiles" -DWANT_FONTCONFIG:BOOL=TRUE -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX="./_build" -DPODOFO_BUILD_STATIC:BOOL=TRUE -DPODOFO_BUILD_SHARED:BOOL=FALSE -DFREETYPE_INCLUDE_DIR="${SRCROOT}/Headers/freetype2" -DFREETYPE_LIBRARY_RELEASE="${SRCROOT}/Libraries/macOS/libfreetype.a" -DFONTCONFIG_INCLUDE_DIR="${SRCROOT}/Headers/fontconfig" -DFONTCONFIG_LIBRARY_RELEASE="${SRCROOT}/Libraries/macOS/libfontconfig.a" -DFONTCONFIG_LIBRARIES="${SRCROOT}/Libraries/macOS" -DPODOFO_BUILD_LIB_ONLY=TRUE -DCMAKE_C_FLAGS="-mmacosx-version-min=10.7 -stdlib=libc++" -DCMAKE_CXX_FLAGS="-mmacosx-version-min=10.7 -stdlib=libc++" ./
make install
Copy the header and library files.
cp -R ./_build/include/podofo "${SRCROOT}/Headers"
cp ./_build/lib/libpodofo.a "${SRCROOT}/Libraries/macOS"
=======================================================================