summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b388059ee02d4d75b40a63194c2fca3921eb0c64 (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
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
# Maintainer: Geyslan G. Bem <geyslan@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgbase="wxwidgets2.8-light"
pkgname=('wxbase2.8-light' 'wxgtk2.8-light' 'wxcommon2.8-light')
pkgver=2.8.12.1
pkgrel=12
pkgdesc="wxWidgets suite for Base and GTK2 toolkits (GNOME/GStreamer free!)"
arch=('i686' 'x86_64')
url="http://wxwidgets.org"
license=('custom:wxWindows')
makedepends=('git' 'bash' 'glu' 'gtk2' 'libsm' 'sdl' 'expat' 'zlib' 'gcc-libs-multilib' 'libjpeg-turbo')

source=("wxwidgets::git+https://github.com/wxWidgets/wxPython.git#tag=wxPy-${pkgver}"
        'wxwidgets-2.8-collision.patch'
        'config-2.8.conf'
        'wx-config-2.8.sh'
        'make-abicheck-non-fatal.patch'
        'wxGTK-2.8.12.1-r2-gcc6.patch'
        'disable-lto-in-configure.patch')
sha1sums=('SKIP'
          '75d2292a0058570aa6071b4bee6eef69e47f1208'
          '1539fb4299a05d32dc739b478986cf3b3017d1b9'
          '4156d992b8fbbdc8e596a7c4e548e90295d3cf95'
          'dfe38650c655395b90bf082b5734c4093508bfa3'
          'f1a3bc30ec8139d97ca239dc1bf6cbc2ceb5c5d9'
          'd4f661d3a1fe324d8d6703b1da677fbbf10d46a7')


# This flag will set a fixed ABI version. That's needed for safesignidentityclient,
# so it can load this lib without warnings
CXXFLAGS="-fabi-version=2"

prepare() {
  patch -d wxwidgets -p1 -i ../wxwidgets-2.8-collision.patch

  # C++ ABI check is too strict and breaks with GCC 5.1
  # https://bugzilla.redhat.com/show_bug.cgi?id=1200611
  patch -d wxwidgets -Np1 -i ../make-abicheck-non-fatal.patch

  # fix gcc6 narrowing error
  # https://bugs.gentoo.org/show_bug.cgi?id=592442
  patch -d wxwidgets -p1 -i ../wxGTK-2.8.12.1-r2-gcc6.patch

  # Turn off LTO when compiling test programs in the "configure" script
  patch -d wxwidgets -p1 -i ../disable-lto-in-configure.patch

  mkdir -p build-{base,gtk}
}

build() {
  cd "${srcdir}/build-base"
  ../wxwidgets/configure \
    --prefix=/usr \
    --libdir=/usr/lib \
    --with-regex='builtin' \
    --enable-unicode \
    --disable-{precomp-headers,gui}
  make
  make -C ../wxwidgets/locale allmo

  cd "${srcdir}/build-gtk"
  ../wxwidgets/configure \
    --prefix=/usr \
    --libdir=/usr/lib \
    --with-gtk='2' \
    --with-lib{jpeg,png,tiff,xpm}='sys' \
    --with-regex='builtin' \
    --with-{opengl,sdl} \
    --enable-{graphics_ctx,unicode} \
    --without-{libnotify,gnomevfs,gnomeprint} \
    --disable-{mediactrl,precomp-headers,webview}
  make
  make -C ../wxwidgets/locale allmo
}

package_wxbase2.8-light() {
  pkgdesc="wxWidgets 2.8 Base (GNOME/GStreamer free!)"
  depends=('wxcommon2.8-light' 'expat' 'zlib' 'gcc-libs-multilib')
  provides=("wxbase2.8=${pkgver}")
  conflicts=('wxbase2.8')
  options=('!emptydirs')

  make -C build-base DESTDIR="${pkgdir}" install

  rm -fr "${pkgdir}/usr/bin/wx-config-2.8"
  rm -fr "${pkgdir}/usr/include"
  rm -fr "${pkgdir}/usr/share/"

  install -Dm644 wxwidgets/docs/licence.txt "${pkgdir}/usr/share/licenses/wxbase2.8-light/LICENSE"
}

package_wxgtk2.8-light() {
  pkgdesc="wxWidgets 2.8 with GTK2 Toolkit (GNOME/GStreamer free!)"
  depends=('wxbase2.8-light' 'gtk2' 'libsm' 'sdl' 'gcc-libs-multilib' 'libjpeg-turbo')
  provides=("wxgtk2.8=${pkgver}")
  conflicts=('wxgtk2.8')
  options=('!emptydirs')

  make -C build-gtk DESTDIR="${pkgdir}" install

  rm -fr "${pkgdir}/usr/bin/"wx-config*
  rm -fr "${pkgdir}/usr/include"
  rm -fr "${pkgdir}/usr/lib/"*baseu*
  rm -fr "${pkgdir}/usr/share"

  install -Dm644 wxwidgets/docs/licence.txt "${pkgdir}/usr/share/licenses/wxgtk2.8-light/LICENSE"
}

package_wxcommon2.8-light() {
  pkgdesc="wxWidgets 2.8 common (GNOME/GStreamer free!)"
  arch=('any')
  depends=('bash')
  provides=("wxcommon2.8=${pkgver}")
  conflicts=('wxcommon2.8')
  options=('!emptydirs')
  backup=('etc/wx/config-2.8')

  make -C build-base DESTDIR="${pkgdir}" install

  rm -fr "${pkgdir}/usr/bin"

  make -C build-gtk DESTDIR="${pkgdir}" install

  rm -fr "${pkgdir}/usr/bin"
  rm -fr "${pkgdir}/usr/lib"

  install -Dm644 wxwidgets/docs/licence.txt "${pkgdir}/usr/share/licenses/wxcommon2.8-light/LICENSE"

  install -Dm644 config-2.8.conf "${pkgdir}/etc/wx/config-2.8"
  install -Dm755 wx-config-2.8.sh "${pkgdir}/usr/bin/wx-config-2.8"
}