File: win-lib-install.sh

package info (click to toggle)
jigdo 0.8.2-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,916 kB
  • sloc: cpp: 19,178; ansic: 3,982; sh: 1,283; makefile: 530; awk: 400
file content (157 lines) | stat: -rw-r--r-- 4,069 bytes parent folder | download | duplicates (4)
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
#! /bin/sh

# This script will download all necessary libraries to compile jigdo
# and jigdo-file under Windows, or to cross-compile it for
# Windows under Linux. The links are bound to become outdated over
# time, please send updates to the jigdo-user list.

date=050707
# Dest dir. WARNING, the dir will be deleted at the beginning of this
# script! Subdirs called lib, bin, ... will be created.
inst=~/samba/gtkwin-$date

# Should I attempt to grab libs for graphics etc.?
GET_GRAPHICS=0

# Dir for downloaded software tarballs
dl=~/samba/gtkwin-$date-dl

# Sourceforge mirror
sf=netcologne.dl.sourceforge.net

if test -f ~/.jigdo-win-lib-install; then
  . ~/.jigdo-win-lib-install
fi
#______________________________________________________________________

cmd() {
    echo "$@"
    "$@"
}

cmd rm -rf "$inst/"*
cmd mkdir -p "$inst"
cmd mkdir -p "$dl"
cd "$inst"

get() {
    file="$dl/`basename $1`"
    if test -f "$file"; then
        echo "$file"
    else
        cmd wget -nc --directory-prefix="$dl" "$1"
    fi
}

buntar() {
    echo buntar "$@"
    for f; do
	bzip2 -cd "$f" | tar -xf -
    done
}

unzip() {
    cmd /usr/bin/unzip -q -o "$@"
}
#______________________________________________________________________

# GTK+ for Windows
# http://www.gimp.org/~tml/gimp/win32/downloads.html

if [ $GET_GRAPHICS = 1 ] ; then

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/glib-2.6.5.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/glib-dev-2.6.5.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/gtk+-2.6.8.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/gtk+-dev-2.6.8.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/pango-1.8.0.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/pango-dev-1.8.0.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/atk-1.9.0.zip
    unzip "$file"

    get ftp://ftp.gtk.org/pub/gtk/v2.6/win32/atk-dev-1.9.0.zip
    unzip "$file"

    #______________________________________________________________________

    # Various dependencies
    # http://www.gimp.org/~tml/gimp/win32/downloads.html

    get http://$sf/sourceforge/gnuwin32/libpng-1.2.8-lib.zip
    unzip "$file"
    get http://$sf/sourceforge/gnuwin32/libpng-1.2.8-bin.zip
    unzip "$file"

    get http://www.gimp.org/~tml/gimp/win32/pkgconfig-0.15.zip
    unzip "$file"

    get http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip
    unzip "$file"

    get http://www.gimp.org/~tml/gimp/win32/gettext-runtime-0.13.1.zip
    unzip "$file"
fi

#get http://www.zlib.net/zlib122-dll.zip
#unzip "$file"
#cmd mv zlib1.dll bin/
#cp lib/zdll.lib lib/libz.a # allows -lz to be used for linking

get http://$sf/sourceforge/gnuwin32/bzip2-1.0.3-lib.zip
unzip "$file"
get http://$sf/sourceforge/gnuwin32/bzip2-1.0.3-bin.zip
unzip "$file"

get http://$sf/sourceforge/gnuwin32/zlib-1.2.3-lib.zip
unzip "$file"
get http://$sf/sourceforge/gnuwin32/zlib-1.2.3-bin.zip
unzip "$file"

#______________________________________________________________________

# Still missing, but not strictly needed ATM:
# - libdb

# http://curl.haxx.se/download.html
#get http://curl.haxx.se/download/curl-7.13.0-win32-ssl-devel-mingw32.zip
#unzip "$file"
#cmd mv libcurl.a libcurldll.a lib/
#cmd mv curl.exe libcurl.dll bin/

#unzip ~/samba/curl-7.14.0-win32-ssl-devel-mingw32msbitfields-ra050711.zip

# Needs zlibwapi.dll
#get http://curl.haxx.se/download/libcurl-7.14.0-win32-msvc.zip
#unzip "$file"
#cmd mv libcurl.lib lib/
#cmd mv libcurl.dll bin/

# OpenSSL for curl
# http://curl.haxx.se/download.html

# This one only has the DLL:
#get http://curl.haxx.se/download/openssl-0.9.7e-win32-bin.zip
#unzip "$file"
#cmd mv libeay32.dll libssl32.dll openssl.exe bin/

# This one also has the developer libs, headers etc.
get http://$sf/sourceforge/gnuwin32/openssl-0.9.7c-lib.zip
unzip "$file"
get http://$sf/sourceforge/gnuwin32/openssl-0.9.7c-bin.zip
unzip "$file"

# Cross-compile:
# sh go --with-libcurl='-lcurl -lssl -lcrypto -lzdll -lwinmm'
# make X=-DCURL_STATICLIB