-
Notifications
You must be signed in to change notification settings - Fork 5
/
INSTALL.mingw
156 lines (138 loc) · 6.36 KB
/
INSTALL.mingw
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
# Here are some rough notes that might help you create a pidgin-otr Win32
# build on a Linux system with mingw32. These have been tested on Ubuntu
# 14.04. In theory, you can just pipe this file to bash.
# You may want a clean mingw32 environment first:
# sudo apt-get purge mingw32 mingw32-runtime mingw32-binutils
# sudo rm -rf /usr/i586-mingw32msvc
sudo apt-get install mingw32 nsis
mkdir pidgin-otr-win32
cd pidgin-otr-win32
wget -c http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz \
http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.3.tar.gz \
ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.20.tar.gz \
https://otr.cypherpunks.ca/gpg-error-1.20-mingw.diff \
ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.5.tar.gz \
https://otr.cypherpunks.ca/gcrypt-1.6.5-mingw.diff \
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip \
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.12/pidgin-2.10.12.tar.bz2 \
http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.12/pidgin-2.10.12-win32-bin.zip \
https://otr.cypherpunks.ca/nsisunz.zip \
https://otr.cypherpunks.ca/libotr-4.1.1.tar.gz
# The above files have the following SHA256 values:
diff <(sha256sum libiconv-1.14.tar.gz \
gettext-0.19.3.tar.gz \
libgpg-error-1.20.tar.gz \
gpg-error-1.20-mingw.diff \
libgcrypt-1.6.5.tar.gz \
gcrypt-1.6.5-mingw.diff \
gtk+-bundle_2.24.10-20120208_win32.zip \
pidgin-2.10.12.tar.bz2 \
pidgin-2.10.12-win32-bin.zip \
nsisunz.zip \
libotr-4.1.1.tar.gz) - <<EOD || exit 1
72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613 libiconv-1.14.tar.gz
93952d505a3d3b1ec10c69d340c7d438b1f9c332710d583981c0608be3eeb3f6 gettext-0.19.3.tar.gz
ccd00b4b115de3d2cd7f789f86d668b99bb2fe505d7a7edcff851ddd904ecd05 libgpg-error-1.20.tar.gz
77e6ba99e10325b20d004c5b3290cdb21dbaddcbd54db893f44ed90216636c40 gpg-error-1.20-mingw.diff
202bf109ccf2d614565c849f3e5687b94cde972167b35261e094252367627bc6 libgcrypt-1.6.5.tar.gz
39311996df4aa735bd391262eb646bf53f4dad4eb259f512f8810377d63f6f7d gcrypt-1.6.5-mingw.diff
f5ce173f50690c2dc7fa91b9b5c80c7422cde3ee23610b53e0929557dd8ee67e gtk+-bundle_2.24.10-20120208_win32.zip
2c7523f0fefe89749c03b2b738ab9f7bd186da435be4762f1487eee31e77ffdd pidgin-2.10.12.tar.bz2
f1da4bb54d09a083e2130e60d874767c081923eb498e4a43d6418d25a4857ee8 pidgin-2.10.12-win32-bin.zip
599029776df526def921ea178a6f66325b6f719772c38318e349a5c92a03afe9 nsisunz.zip
8b3b182424251067a952fb4e6c7b95a21e644fbb27fbd5f8af2b2ed87ca419f5 libotr-4.1.1.tar.gz
EOD
# Packages and their build instructions in the order they should be built.
# Good luck!
# libiconv-1.14:
tar xzvvf libiconv-1.14.tar.gz
cd libiconv-1.14
CFLAGS="-g -O2 -fwrapv -fno-strict-overflow"
LDFLAGS="-pie"
export CFLAGS LDFLAGS
./configure --enable-static --disable-shared --with-pic --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
make || exit 1
sudo make install || exit 1
cd ..
# gettext-0.19.3:
tar xzvvf gettext-0.19.3.tar.gz
cd gettext-0.19.3
CFLAGS="-g -O2 -fwrapv -fno-strict-overflow"
LDFLAGS="-pie"
export CFLAGS LDFLAGS
./configure --enable-static --disable-shared --with-pic --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
make || exit 1
sudo make install || exit 1
cd ..
# libgpg-error-1.20:
tar xzvvf libgpg-error-1.20.tar.gz
cd libgpg-error-1.20
CFLAGS="-g -O2 -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 -fno-strict-overflow"
LDFLAGS="-pie"
export CFLAGS LDFLAGS
patch -p0 < ../gpg-error-1.20-mingw.diff
./configure --enable-static --disable-shared --with-pic --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
cp src/syscfg/lock-obj-pub.mingw32.h src/syscfg/lock-obj-pub.mingw32msvc.h
make || exit 1
sudo make install || exit 1
cd ..
# libgcrypt-1.6.5:
tar xzvvf libgcrypt-1.6.5.tar.gz
cd libgcrypt-1.6.5
CFLAGS="-g -O2 -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 -fno-strict-overflow"
LDFLAGS="-pie"
export CFLAGS LDFLAGS
patch -p1 < ../gcrypt-1.6.5-mingw.diff
w32root=/usr/i586-mingw32msvc ./autogen.sh --build-w32
make || exit 1
sudo make install || exit 1
cd ..
# nsis:
# Locate the "nsisunz" plugin (a google search for "nsisunz.zip" should be sufficient)
# Extract the DLL to /usr/share/nsis/Plugins
# (yes it's a DLL extension, but it will still work for GNU/Linux nsis)
unzip nsisunz.zip
sudo cp nsisunz/Release/nsisunz.dll /usr/share/nsis/Plugins/
# libotr-4.1.1:
tar xzvvf libotr-4.1.1.tar.gz
cd libotr-4.1.1
unset CFLAGS
unset LDFLAGS
./bootstrap
./configure --with-pic --host=i586-mingw32msvc \
--prefix=/usr/i586-mingw32msvc \
--enable-static --disable-shared \
--with-libgcrypt-prefix=/usr/i586-mingw32msvc
make || exit 1
sudo make install || exit 1
cd ..
# pidgin-otr:
# In Makefile.mingw, specify the location of PIDGIN_HEADERS, PURPLE_HEADERS,
# GTK_WIN32_BUNDLE, and PIDGIN_WIN32_LIBS
# Ensure either pkg-config will correctly resolve all the dependencies for
# glib-2.0 and gtk+-2.0. There is a README in the GTK+ bundle about this, or
# uncomment (and perhaps revise) the hardcoded list of includes for GTK_HDRS
sudo mkdir -p /usr/i586-mingw32msvc/misc/gtk_bundle
sudo unzip -d /usr/i586-mingw32msvc/misc/gtk_bundle gtk+-bundle_2.24.10-20120208_win32.zip
unzip pidgin-2.10.12-win32-bin.zip
sudo mkdir -p /usr/i586-mingw32msvc/misc/pidgin_dlls
sudo mv pidgin-2.10.12-win32bin/*.dll /usr/i586-mingw32msvc/misc/pidgin_dlls/
tar xjvvf pidgin-2.10.12.tar.bz2
sudo mv pidgin-2.10.12/libpurple /usr/i586-mingw32msvc/include/
sudo mv pidgin-2.10.12/pidgin /usr/i586-mingw32msvc/include/
cd ..
# Build pidgin-otr plugin
make LIBOTRSRCDIR=pidgin-otr-win32/libotr-4.1.1 -f Makefile.mingw || exit 1
# This should build the nsis installer
rm -rf win32_export
make LIBOTRSRCDIR=pidgin-otr-win32/libotr-4.1.1 -f Makefile.mingw installer || exit 1
mv pidgin-otr-win32/packaging/windows/pidgin-otr-4.0.2.exe .
# This should build the zipfile
make LIBOTRSRCDIR=pidgin-otr-win32/libotr-4.1.1 -f Makefile.mingw zip || exit 1
# The pidgin-otr plugin will be created in the current working directory;
# inspect it with unzip:
#
# unzip -l pidgin-otr-4.0.2.zip
#
# The installer will be moved (as above) into the current working
# directory as well.