Mercurial > vanilla
comparison graphics/wxwidgets/wxwidgets.sh @ 1167:9eb7c3c561fc
graphics/wxwidgets: initial import, closes #2410
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 08 Oct 2019 20:33:00 +0200 |
parents | |
children | 6710613b88b9 |
comparison
equal
deleted
inserted
replaced
1166:72824bb09754 | 1167:9eb7c3c561fc |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 PKGNAME=wxwidgets | |
19 PKGVERSION=3.0.4 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="GPLv20 LGPLv20" | |
22 PKGSUMMARY="toolkit to write native-looking GUI applications" | |
23 PKGDOWNLOAD="https://github.com/wxWidgets/wxWidgets/releases/download/v$PKGVERSION/wxWidgets-$PKGVERSION.tar.bz2" | |
24 PKGOPTIONS="GTK JPEG LZMA OPENGL NOTIFICATIONS PNG QT TIFF XML XPM ZLIB" | |
25 | |
26 : ${CHOST:=$(uname -m)-linux-musl} | |
27 : ${CBUILD:=$(uname -m)-linux-musl} | |
28 : ${CC:=clang} | |
29 : ${CFLAGS:=-O2} | |
30 : ${CXX:=clang++} | |
31 : ${CXXFLAGS:=-O2} | |
32 : ${LDFLAGS:=} | |
33 : ${LIBS:=} | |
34 : ${GTK:=yes} | |
35 : ${JPEG:=yes} | |
36 : ${LZMA:=yes} | |
37 : ${OPENGL:=yes} | |
38 : ${NOTIFICATIONS:=yes} | |
39 : ${PNG:=yes} | |
40 : ${QT:=no} | |
41 : ${TIFF:=yes} | |
42 : ${XML:=yes} # Note: XML support through expat library. | |
43 : ${XPM:=yes} | |
44 : ${ZLIB:=yes} | |
45 | |
46 if [ "$GTK" = "yes" ]; then | |
47 PKGDEPENDS="gtk $PKGDEPENDS" | |
48 with_gtk="--with-gtk=3" | |
49 fi | |
50 | |
51 if [ "$JPEG" = "yes" ]; then | |
52 PKGDEPENDS="libjpeg-turbo $PKGDEPENDS" | |
53 with_jpeg="--with-libjpeg" | |
54 else | |
55 with_jpeg="--without-libjpeg" | |
56 fi | |
57 | |
58 if [ "$LZMA" = "yes" ]; then | |
59 PKGDEPENDS="xz $PKGDEPENDS" | |
60 with_lzma="--with-liblzma" | |
61 else | |
62 with_lzma="--without-liblzma" | |
63 fi | |
64 | |
65 if [ "$NOTIFICATIONS" = "yes" ]; then | |
66 PKGDEPENDS="libnotify $PKGDEPENDS" | |
67 with_notifications="--with-libnotify" | |
68 else | |
69 with_notifications="--without-libnotify" | |
70 fi | |
71 | |
72 if [ "$OPENGL" = "yes" ]; then | |
73 PKGDEPENDS="mesa $PKGDEPENDS" | |
74 with_opengl="--with-opengl" | |
75 else | |
76 with_opengl="--without-opengl" | |
77 fi | |
78 | |
79 if [ "$PNG" = "yes" ]; then | |
80 PKGDEPENDS="libpng $PKGDEPENDS" | |
81 with_png="--with-libpng" | |
82 else | |
83 with_png="--without-libpng" | |
84 fi | |
85 | |
86 if [ "$QT" = "yes" ]; then | |
87 PKGDEPENDS="qtbase $PKGDEPENDS" | |
88 with_qt="--with-qt" | |
89 fi | |
90 | |
91 if [ "$TIFF" = "yes" ]; then | |
92 PKGDEPENDS="libtiff $PKGDEPENDS" | |
93 with_tiff="--with-libtiff" | |
94 else | |
95 with_tiff="--without-libtiff" | |
96 fi | |
97 | |
98 if [ "$XML" = "yes" ]; then | |
99 PKGDEPENDS="expat $PKGDEPENDS" | |
100 with_xml="--with-expat" | |
101 else | |
102 with_xml="--without-expat" | |
103 fi | |
104 | |
105 if [ "$XPM" = "yes" ]; then | |
106 PKGDEPENDS="libxpm $PKGDEPENDS" | |
107 with_xpm="--with-libxpm" | |
108 else | |
109 with_xpm="--without-libxpm" | |
110 fi | |
111 | |
112 if [ "$ZLIB" = "yes" ]; then | |
113 PKGDEPENDS="zlib $PKGDEPENDS" | |
114 with_zlib="--with-zlib" | |
115 else | |
116 with_zlib="--without-zlib" | |
117 fi | |
118 | |
119 build() | |
120 { | |
121 rm -rf wxWidgets-$PKGVERSION | |
122 tar xvf wxWidgets-$PKGVERSION.tar.bz2 | |
123 cd wxWidgets-$PKGVERSION | |
124 | |
125 # --disable-xlocale: does not build (strtol_l). | |
126 # --enable-unicode: this should be default. | |
127 CC="$CC" \ | |
128 CFLAGS="$CFLAGS" \ | |
129 CXX="$CXX" \ | |
130 CXXFLAGS="$CXXFLAGS" \ | |
131 LDFLAGS="$LDFLAGS" \ | |
132 LIBS="$LIBS" \ | |
133 ./configure \ | |
134 --build=$CBUILD \ | |
135 --host=$CHOST \ | |
136 --prefix= \ | |
137 --with-cxx=17 \ | |
138 --disable-xlocale \ | |
139 --enable-unicode \ | |
140 $with_gtk \ | |
141 $with_jpeg \ | |
142 $with_lzma \ | |
143 $with_notifications \ | |
144 $with_opengl \ | |
145 $with_png \ | |
146 $with_qt \ | |
147 $with_tiff \ | |
148 $with_xml \ | |
149 $with_xpm \ | |
150 $with_zlib | |
151 make | |
152 make install DESTDIR=$DESTDIR | |
153 | |
154 cd .. | |
155 rm -rf wxWidgets-$PKGVERSION | |
156 } |