Advertisement
ManuTheNerd

mingw-w64-fltk PKGBUILD

Feb 13th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. pkgname=mingw-w64-fltk
  2. _pkgname=fltk
  3. pkgdesc="Graphical user interface toolkit for X (mingw-w64)"
  4. pkgver=1.3.5
  5. pkgrel=1
  6. arch=('any')
  7. license=('custom:LGPL')
  8. url="http://www.fltk.org/"
  9. depends=('mingw-w64-libjpeg' 'mingw-w64-libpng' 'mingw-w64-zlib' 'mingw-w64-crt'
  10.          'bash')
  11. makedepends=('mingw-w64-gcc' 'mingw-w64-configure')
  12. source=(http://fltk.org/pub/fltk/$pkgver/fltk-$pkgver-source.tar.gz
  13.         subdirs.patch)
  14. md5sums=('e85017defd5a03ae82e634311db87bbf'
  15.          '42d65739702f35bfe40ae15d59c77c66')
  16. options=('!docs' '!strip' '!buildflags' 'staticlibs')
  17.  
  18. prepare() {
  19.   cd $_pkgname-$pkgver
  20.   patch -p1 -i ../subdirs.patch
  21.   sed -i 's/class Fl_XFont_On_Demand/class FL_EXPORT Fl_XFont_On_Demand/' FL/x.H
  22.   sed -i 's/x-fluid.desktop/fluid.desktop/' -i fluid/Makefile
  23. }
  24.  
  25. build() {
  26.   cd $_pkgname-$pkgver
  27.   sed -i -e 's/$(LINKFLTK)/$(LINKSHARED)/' \
  28.          -e 's/$(LINKFLTKIMG)/$(LINKSHARED)/' test/Makefile
  29.   for _arch in x86_64-w64-mingw32 i686-w64-mingw32; do
  30.     cp -a "$srcdir/$_pkgname-$pkgver" "$srcdir/build-$_arch"
  31.     cd "$srcdir/build-$_arch"
  32.     local LDFLAGS="$(unset LDFLAGS; source mingw-env $_arch && echo "$LDFLAGS")"
  33.     DSOFLAGS="$LDFLAGS" \
  34.         "$_arch"-configure --prefix=/usr/"$_arch" --enable-threads \
  35.         --enable-xft --enable-shared .
  36.     make
  37.   done
  38. }
  39.  
  40. package() {
  41.   for _arch in x86_64-w64-mingw32 i686-w64-mingw32; do
  42.     cd "$srcdir/build-$_arch"
  43.     make DESTDIR="$pkgdir" install
  44.     chmod 0644 "$pkgdir/usr/$_arch/lib"/*.a
  45.     install -d "$pkgdir/usr/bin"
  46.     ln -sf "../$_arch/bin/fltk-config" "$pkgdir/usr/bin/$_arch-fltk-config"
  47.   done
  48.  
  49.   cd "$srcdir/$_pkgname-$pkgver"
  50.   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement