blob: 98a0b0e3e02ffae700bac6052dd0ddde4c3d6528 (
plain)
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
|
#!/bin/bash
#
# build libevent for MacOSX
#
# exit on error
set -e
ME=`basename $0`
DIR="$( cd "$( dirname "$0" )" && pwd )"
DEST_DIR="${DIR}/../prebuilt/darwin-i386/gnu"
if [ ! -f src/arabica.cpp ]; then
echo
echo "Cannot find src/arabica.cpp"
echo "Run script from within arabica directory:"
echo "arabica $ ../../${ME}"
echo
exit
fi
if [ -f Makefile ]; then
make clean
fi
./configure \
CFLAGS="-g -mmacosx-version-min=10.6 -arch x86_64" \
CXXFLAGS="-g -mmacosx-version-min=10.6 -arch x86_64" \
LDFLAGS="-g -mmacosx-version-min=10.6 -arch x86_64" \
--with-libxml2=${SYSROOT}/usr \
--with-parser=libxml2 \
--with-tests=no \
--with-boost=/opt/local/include \
--disable-shared \
--disable-dependency-tracking \
--with-pic \
--prefix=${DEST_DIR}
make
cp ./src/.libs/libarabica.a ./libarabica_d.x86_64.a
make install # once for headers
rm ${DEST_DIR}/lib/libarabica*
make clean
./configure \
CFLAGS="-mmacosx-version-min=10.6 -arch x86_64" \
CXXFLAGS="-mmacosx-version-min=10.6 -arch x86_64" \
LDFLAGS="-mmacosx-version-min=10.6 -arch x86_64" \
--with-libxml2=${SYSROOT}/usr \
--with-parser=libxml2 \
--with-tests=no \
--with-boost=/opt/local/include \
--disable-shared \
--disable-dependency-tracking \
--with-pic
make
cp ./src/.libs/libarabica.a ./libarabica.x86_64.a
make clean
./configure \
CFLAGS="-g -mmacosx-version-min=10.6 -arch i386" \
CXXFLAGS="-g -mmacosx-version-min=10.6 -arch i386" \
LDFLAGS="-g -mmacosx-version-min=10.6 -arch i386" \
--with-libxml2=${SYSROOT}/usr \
--with-parser=libxml2 \
--with-tests=no \
--with-boost=/opt/local/include \
--disable-shared \
--disable-dependency-tracking \
--with-pic
make
cp ./src/.libs/libarabica.a ./libarabica_d.i386.a
make clean
./configure \
CFLAGS="-mmacosx-version-min=10.6 -arch i386" \
CXXFLAGS="-mmacosx-version-min=10.6 -arch i386" \
LDFLAGS="-mmacosx-version-min=10.6 -arch i386" \
--with-libxml2=${SYSROOT}/usr \
--with-parser=libxml2 \
--with-tests=no \
--with-boost=/opt/local/include \
--disable-shared \
--disable-dependency-tracking \
--with-pic
make
cp ./src/.libs/libarabica.a ./libarabica.i386.a
make clean
lipo -create ./libarabica.i386.a ./libarabica.x86_64.a -output ${DEST_DIR}/lib/libarabica.a
lipo -create ./libarabica_d.i386.a ./libarabica_d.x86_64.a -output ${DEST_DIR}/lib/libarabica_d.a
|