Advertisement
Guest User

Untitled

a guest
Aug 11th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.79 KB | None | 0 0
  1. pkgname=mingw-w64-wxmsw
  2. epoch=1
  3. pkgver=3.0.1
  4. pkgrel=2
  5. pkgdesc="Win32 implementation of wxWidgets API for GUI (mingw-w64)"
  6. arch=(any)
  7. url="http://wxwidgets.org"
  8. license=("custom:wxWindows")
  9. makedepends=(mingw-w64-gcc)
  10. depends=(mingw-w64-crt mingw-w64-libpng mingw-w64-libjpeg-turbo mingw-w64-libtiff)
  11. options=(staticlibs !strip !buildflags)
  12. conflicts=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static)
  13. provides=(mingw-w64-wxmsw2.9 mingw-w64-wxmsw-static)
  14. replaces=(mingw-w64-wxmsw2.9)
  15. source=("http://downloads.sourceforge.net/wxwindows/wxWidgets-${pkgver}.tar.bz2")
  16. sha1sums=('73e58521d6871c9f4d1e7974c6e3a81629fddcf8')
  17.  
  18. _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
  19.  
  20. build() {
  21.     # monolithic shared builds
  22.     for _arch in ${_architectures}; do
  23.         unset LDFLAGS
  24.         mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-shared-${_arch}"
  25.         cd "${srcdir}/${pkgname}-${pkgver}-build-shared-${_arch}"
  26.         "${srcdir}"/wxWidgets-$pkgver/configure \
  27.             --prefix=/usr/${_arch} \
  28.             --build=$CHOST \
  29.             --host=${_arch} \
  30.             --with-msw \
  31.             --with-opengl \
  32.             --disable-mslu \
  33.             --enable-unicode \
  34.             --enable-shared \
  35.             --enable-monolithic \
  36.             --enable-stl \
  37.             --with-regex=builtin \
  38.             --disable-precomp-headers \
  39.             --enable-graphics_ctx \
  40.             --enable-webview \
  41.             --enable-mediactrl \
  42.             --with-libpng=sys \
  43.             --with-libxpm=builtin \
  44.             --with-libjpeg=sys \
  45.             --with-libtiff=sys
  46.         make
  47.     done
  48.  
  49.     # static builds
  50.     for _arch in ${_architectures}; do
  51.         unset LDFLAGS
  52.         mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-static-${_arch}"
  53.         cd "${srcdir}/${pkgname}-${pkgver}-build-static-${_arch}"
  54.         "${srcdir}"/wxWidgets-$pkgver/configure \
  55.             --prefix=/usr/${_arch} \
  56.             --build=$CHOST \
  57.             --host=${_arch} \
  58.             --with-msw \
  59.             --with-opengl \
  60.             --disable-mslu \
  61.             --enable-unicode \
  62.             --disable-shared \
  63.             --enable-stl \
  64.             --with-regex=builtin \
  65.             --disable-precomp-headers \
  66.             --enable-graphics_ctx \
  67.             --enable-webview \
  68.             --enable-mediactrl \
  69.             --with-libpng=sys \
  70.             --with-libxpm=builtin \
  71.             --with-libjpeg=sys \
  72.             --with-libtiff=sys
  73.         make
  74.     done
  75. }
  76.  
  77. package() {
  78.     mkdir -p "$pkgdir/usr/bin"
  79.     for _arch in ${_architectures}; do
  80.         for _build in "shared" "static"; do
  81.             cd "${srcdir}/${pkgname}-${pkgver}-build-${_build}-${_arch}"
  82.             make DESTDIR="$pkgdir" install
  83.         done
  84.         mv "$pkgdir/usr/${_arch}/lib/"*.dll "$pkgdir/usr/${_arch}/bin"
  85.         find "$pkgdir/usr/${_arch}" -name '*.exe' | xargs -rtl1 rm
  86.         find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded
  87.         find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g
  88.         ln -s "/usr/${_arch}/lib/wx/config/${_arch}-msw-unicode-${pkgver%.*}" "$pkgdir/usr/bin/${_arch}-wx-config"
  89.         rm "$pkgdir/usr/${_arch}/bin/wxrc-3.0"
  90.         rm -r "$pkgdir/usr/${_arch}/share"
  91.     done
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement