Advertisement
Elppans

PKGBUILKD_wine-staging-ivb_without-libcl_winhlp32-Workaround

Feb 18th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.86 KB | None | 0 0
  1. # $Id$
  2. # Maintainer: Giancarlo Razzolini <grazzolini@gmail.com>
  3. # Contributor: Felix Yan <felixonmars@archlinux.org>
  4. # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
  5. # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
  6. # Contributor: Eduardo Romero <eduardo@archlinux.org>
  7. # Contributor: Giovanni Scafora <giovanni@archlinux.org>
  8.  
  9. pkgname=wine-staging-ivb
  10. pkgver=1.9.20
  11. pkgrel=1
  12.  
  13. _pkgbasever=${pkgver/rc/-rc}
  14.  
  15. source=("${pkgname}-${pkgver}.tar.gz::https://github.com/wine-compholio/wine-patched/archive/staging-$_pkgbasever.tar.gz"
  16. 30-win32-aliases.conf
  17. patch-$pkgver-ivb.patch
  18. patch_temp_constants.patch)
  19. sha512sums=('4fb7c18f4c1451c94eb9ea7239da45b40781f4e044266b651bf3079ee0605dc27599fab72cf9259e31c59c89f161596c6d65513165125f560a50800e3f946a72'
  20. '6e54ece7ec7022b3c9d94ad64bdf1017338da16c618966e8baf398e6f18f80f7b0576edf1d1da47ed77b96d577e4cbb2bb0156b0b11c183a0accf22654b0a2bb'
  21. '42af4c34688119e38df40802d1450a7623749ea268ea25400ad6acddba11c55c4a3efc3a658bfcf071595e3ac7d45b9885b7efbd0eaebd22cb7ac1f7cc601529'
  22. '54e7927ea07137f2383734f65147ae18366a65a17c1970af06b13d5597f501ade3b2b435311bfae1759070895473f09382d75676e8b774c52ce540bc06cf5461')
  23.  
  24. pkgdesc="A compatibility layer for running Windows programs - Staging branch: indexed vertex blending - https://bugs.winehq.org/show_bug.cgi?id=39057"
  25. url="http://www.wine-staging.com"
  26. arch=(i686 x86_64)
  27. options=(staticlibs)
  28. license=(LGPL)
  29.  
  30. _depends=(
  31. attr lib32-attr
  32. fontconfig lib32-fontconfig
  33. lcms2 lib32-lcms2
  34. libxml2 lib32-libxml2
  35. libxcursor lib32-libxcursor
  36. libxrandr lib32-libxrandr
  37. libxdamage lib32-libxdamage
  38. libxi lib32-libxi
  39. gettext lib32-gettext
  40. freetype2 lib32-freetype2
  41. glu lib32-glu
  42. libsm lib32-libsm
  43. gcc-libs lib32-gcc-libs
  44. libpcap lib32-libpcap
  45. desktop-file-utils
  46. )
  47.  
  48. makedepends=(autoconf ncurses bison perl fontforge flex
  49. 'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2'
  50. giflib lib32-giflib
  51. libpng lib32-libpng
  52. gnutls lib32-gnutls
  53. libxinerama lib32-libxinerama
  54. libxcomposite lib32-libxcomposite
  55. libxmu lib32-libxmu
  56. libxxf86vm lib32-libxxf86vm
  57. libldap lib32-libldap
  58. mpg123 lib32-mpg123
  59. openal lib32-openal
  60. v4l-utils lib32-v4l-utils
  61. alsa-lib lib32-alsa-lib
  62. libxcomposite lib32-libxcomposite
  63. mesa lib32-mesa
  64. mesa-libgl lib32-mesa-libgl
  65. libxslt lib32-libxslt
  66. libpulse lib32-libpulse
  67. libva lib32-libva
  68. gtk3 lib32-gtk3
  69. gst-plugins-base-libs lib32-gst-plugins-base-libs
  70. samba
  71. opencl-headers
  72. )
  73.  
  74. optdepends=(
  75. giflib lib32-giflib
  76. libpng lib32-libpng
  77. libldap lib32-libldap
  78. gnutls lib32-gnutls
  79. mpg123 lib32-mpg123
  80. openal lib32-openal
  81. v4l-utils lib32-v4l-utils
  82. libpulse lib32-libpulse
  83. alsa-plugins lib32-alsa-plugins
  84. alsa-lib lib32-alsa-lib
  85. libjpeg-turbo lib32-libjpeg-turbo
  86. libxcomposite lib32-libxcomposite
  87. libxinerama lib32-libxinerama
  88. ncurses lib32-ncurses
  89. libxslt lib32-libxslt
  90. libva lib32-libva
  91. gtk3 lib32-gtk3
  92. gst-plugins-base-libs lib32-gst-plugins-base-libs
  93. vulkan-icd-loader lib32-vulkan-icd-loader
  94. cups
  95. samba dosbox
  96. )
  97.  
  98. if [[ $CARCH == i686 ]]; then
  99. # Strip lib32 etc. on i686
  100. _depends=(${_depends[@]/*32-*/})
  101. makedepends=(${makedepends[@]/*32-*/} ${_depends[@]})
  102. makedepends=(${makedepends[@]/*-multilib*/})
  103. optdepends=(${optdepends[@]/*32-*/})
  104. provides=("wine=$pkgver")
  105. conflicts=('wine' 'wine-ivb')
  106. else
  107. makedepends=(${makedepends[@]} ${_depends[@]})
  108. provides=("wine=$pkgver" "wine-wow64=$pkgver")
  109. conflicts=('wine' 'wine-ivb' 'wine-staging' 'wine-wow64')
  110. fi
  111.  
  112. prepare() {
  113.  
  114. # https://bugs.winehq.org/show_bug.cgi?id=42132
  115. echo -e '$ git diff
  116. diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l
  117. index 8f6945ca98..ff8a4832d3 100644
  118. --- a/programs/winhlp32/macro.lex.l
  119. +++ b/programs/winhlp32/macro.lex.l
  120. @@ -20,7 +20,7 @@
  121. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  122. */
  123. %}
  124. -%option noinput nounput never-interactive 8bit
  125. +%option noinput nounput noyywrap never-interactive 8bit
  126. %x quote
  127. %{
  128. #include "config.h"
  129. @@ -367,7 +367,3 @@ WINHELP_WINDOW* MACRO_CurrentWindow(void)
  130. {
  131. return lex_data ? lex_data->window : Globals.active_win;
  132. }
  133. -
  134. -#ifndef yywrap
  135. -int yywrap(void) { return 1; }
  136. -#endif' | tee > $srcdir/0001-winhlp32-Workaround-a-bug-in-Flex.patch
  137.  
  138. # Allow ccache to work
  139. mv wine-patched-staging-$_pkgbasever $pkgname
  140.  
  141. sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i $pkgname/configure*
  142.  
  143. # Get rid of old build dirs
  144. rm -rf $pkgname-{32,64}-build
  145. mkdir $pkgname-32-build
  146.  
  147. # Apply the ivb patches
  148. cd $pkgname
  149. patch -Np1 -i "$srcdir/patch-$pkgver-ivb.patch"
  150. patch -Np1 -i "$srcdir/patch_temp_constants.patch"
  151. patch -Np1 -i "$srcdir/0001-winhlp32-Workaround-a-bug-in-Flex.patch"
  152. }
  153.  
  154. build() {
  155. cd "$srcdir"
  156.  
  157. if [[ $CARCH == x86_64 ]]; then
  158. msg2 "Building Wine-64..."
  159.  
  160. mkdir $pkgname-64-build
  161. cd "$srcdir/$pkgname-64-build"
  162. ../$pkgname/configure \
  163. --prefix=/usr \
  164. --libdir=/usr/lib \
  165. --with-x \
  166. --with-gstreamer \
  167. --enable-win64 \
  168. --with-xattr
  169.  
  170. make
  171.  
  172. _wine32opts=(
  173. --libdir=/usr/lib32
  174. --with-wine64="$srcdir/$pkgname-64-build"
  175. )
  176.  
  177. export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  178. fi
  179.  
  180. msg2 "Building Wine-32..."
  181. cd "$srcdir/$pkgname-32-build"
  182. ../$pkgname/configure \
  183. --prefix=/usr \
  184. --with-x \
  185. --with-gstreamer \
  186. --with-xattr \
  187. "${_wine32opts[@]}"
  188.  
  189. make
  190. }
  191.  
  192. package() {
  193. depends=(${_depends[@]})
  194.  
  195. msg2 "Packaging Wine-32..."
  196. cd "$srcdir/$pkgname-32-build"
  197.  
  198. if [[ $CARCH == i686 ]]; then
  199. make prefix="$pkgdir/usr" install
  200. else
  201. make prefix="$pkgdir/usr" \
  202. libdir="$pkgdir/usr/lib32" \
  203. dlldir="$pkgdir/usr/lib32/wine" install
  204.  
  205. msg2 "Packaging Wine-64..."
  206. cd "$srcdir/$pkgname-64-build"
  207. make prefix="$pkgdir/usr" \
  208. libdir="$pkgdir/usr/lib" \
  209. dlldir="$pkgdir/usr/lib/wine" install
  210. fi
  211.  
  212. # Font aliasing settings for Win32 applications
  213. install -d "$pkgdir"/etc/fonts/conf.{avail,d}
  214. install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail"
  215. ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf"
  216. }
  217.  
  218. # vim:set ts=8 sts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement