Advertisement
davidva

wine-silverlight

Dec 12th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.08 KB | None | 0 0
  1. pkgname=wine-silverlight
  2. pkgver=1.7.32
  3. pkgrel=1
  4. pkgdesc="WINE patched for windows NPAPI plugin compatibility"
  5. url="http://www.winehq.com"
  6. license=('LGPL2.1')
  7. arch=('x86_64' 'i686')
  8. options=(staticlibs !ccache)
  9. install=wine-silverlight.install
  10.  
  11. source=(http://prdownloads.sourceforge.net/wine/wine-${pkgver}.tar.bz2
  12. "https://github.com/wine-compholio/wine-staging/archive/v${pkgver}.tar.gz"
  13. "30-win32-aliases.conf"
  14. ".SRCINFO")
  15.  
  16. md5sums=('2e428f64daba676c3580e464f5fcbc5c'
  17. '083215a8217e32e96aacfdffb8279ffd'
  18. '1ff4e467f59409272088d92173a0f801'
  19. 'SKIP')
  20.  
  21. depends=('fontconfig'
  22. 'libxcursor'
  23. 'libxrandr'
  24. 'libxdamage'
  25. 'libxi'
  26. 'gettext'
  27. 'freetype2'
  28. 'glu'
  29. 'libsm'
  30. 'gcc-libs'
  31. 'attr'
  32. 'desktop-file-utils')
  33.  
  34. makedepends=('libgl'
  35. 'autoconf'
  36. 'ncurses'
  37. 'bison'
  38. 'perl'
  39. 'fontforge'
  40. 'flex'
  41. 'prelink'
  42. 'gcc>=4.5.0-2'
  43. 'giflib'
  44. 'libpng'
  45. 'gnutls'
  46. 'libxinerama'
  47. 'libxcomposite'
  48. 'libxmu'
  49. 'libxxf86vm'
  50. 'libxml2'
  51. 'libldap'
  52. 'lcms'
  53. 'mpg123'
  54. 'openal'
  55. 'v4l-utils'
  56. 'alsa-lib'
  57. 'mesa'
  58. 'libcl'
  59. 'opencl-headers'
  60. 'pulseaudio'
  61. 'samba')
  62.  
  63. optdepends=('giflib'
  64. 'libpng'
  65. 'libldap'
  66. 'gnutls'
  67. 'lcms'
  68. 'libxml2'
  69. 'mpg123'
  70. 'openal'
  71. 'v4l-utils'
  72. 'libpulse'
  73. 'alsa-plugins'
  74. 'alsa-lib'
  75. 'libjpeg-turbo'
  76. 'libxcomposite'
  77. 'libxinerama'
  78. 'libncurses'
  79. 'libcl'
  80. 'pulseaudio'
  81. 'oss'
  82. 'cups'
  83. 'samba'
  84. 'libtxc_dxtn')
  85.  
  86. if [[ $CARCH == x86_64 ]]; then
  87.  
  88. depends=('lib32-fontconfig'
  89. 'lib32-libxcursor'
  90. 'lib32-libxrandr'
  91. 'lib32-libxdamage'
  92. 'lib32-libxi'
  93. 'lib32-gettext'
  94. 'lib32-glu'
  95. 'lib32-libsm'
  96. 'lib32-gcc-libs'
  97. 'lib32-attr'
  98. 'desktop-file-utils')
  99.  
  100. makedepends=('autoconf'
  101. 'ncurses'
  102. 'bison'
  103. 'perl'
  104. 'fontforge'
  105. 'flex'
  106. 'prelink'
  107. 'gcc-multilib>=4.5.0-2'
  108. 'lib32-giflib'
  109. 'lib32-libpng'
  110. 'lib32-gnutls'
  111. 'lib32-libxinerama'
  112. 'lib32-libxcomposite'
  113. 'lib32-libxmu'
  114. 'lib32-libxxf86vm'
  115. 'lib32-libxml2'
  116. 'lib32-libldap'
  117. 'lib32-lcms'
  118. 'lib32-mpg123'
  119. 'lib32-openal'
  120. 'lib32-v4l-utils'
  121. 'lib32-alsa-lib'
  122. 'lib32-mesa'
  123. 'lib32-libgl'
  124. 'lib32-libcl'
  125. 'attr'
  126. 'samba'
  127. 'pulseaudio'
  128. 'opencl-headers')
  129.  
  130. optdepends=('lib32-giflib'
  131. 'lib32-libpng'
  132. 'lib32-libldap'
  133. 'lib32-gnutls'
  134. 'lib32-lcms'
  135. 'lib32-libxml2'
  136. 'lib32-mpg123'
  137. 'lib32-openal'
  138. 'lib32-v4l-utils'
  139. 'lib32-libpulse'
  140. 'lib32-alsa-plugins'
  141. 'lib32-alsa-lib'
  142. 'lib32-libjpeg-turbo'
  143. 'lib32-libxcomposite'
  144. 'lib32-ncurses'
  145. 'lib32-libcl'
  146. 'oss'
  147. 'cups'
  148. 'samba'
  149. 'lib32-libtxc_dxtn')
  150. fi
  151.  
  152. makedepends+=('git')
  153.  
  154. _upname="wine-${pkgver}"
  155.  
  156. # Uncomment the line below if you want wine installed to /opt/wine-silverlight instead of replacing wine
  157. #customprefix=1
  158.  
  159. if [[ $customprefix != 1 ]]; then
  160. _prefix="/usr"
  161. _sysconf="/etc"
  162. conflicts=('wine' 'wine-compholio')
  163. provides=('wine=${pkgver}' 'wine-compholio=${pkgver}')
  164. else
  165. # change _prefix if you don't want to use the default custom prefix of /opt/wine-silverlight
  166. _prefix="/opt/$pkgname"
  167. _sysconf="$_prefix/etc"
  168. conflicts=('wine-compholio')
  169. provides=('wine-compholio=${pkgver}')
  170. fi
  171.  
  172. prepare() {
  173. cd "$srcdir"
  174.  
  175. # Get rid of old build dirs
  176. rm -rf $pkgname-{32,64}-build
  177. mkdir $pkgname-32-build
  178.  
  179. # These additional CPPFLAGS solve FS#27662 and FS#34195
  180. export CFLAGS="$CFLAGS -DHAVE_ATTR_XATTR_H=1"
  181. export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
  182.  
  183. #export MAKEFLAGS="-j4"
  184.  
  185. cd "$srcdir"/"${_upname}"
  186.  
  187. # use upstream Makefile to apply patches and to call make_requests / autoreconf
  188. make -C "$srcdir/wine-staging-${pkgver}/patches/" DESTDIR="$srcdir/${_upname}" install
  189. }
  190.  
  191. build() {
  192. cd "$srcdir"
  193.  
  194. if [[ $CARCH == x86_64 ]]; then
  195.  
  196. msg2 "Building Wine-64..."
  197. mkdir $pkgname-64-build
  198. cd "$srcdir/$pkgname-64-build"
  199. ../$_upname/configure \
  200. --prefix=$_prefix \
  201. --sysconfdir=$_sysconf \
  202. --libdir=$_prefix/lib \
  203. --with-x \
  204. --with-xattr \
  205. --without-gstreamer \
  206. --enable-win64 \
  207. --disable-tests
  208. # Gstreamer was disabled for FS#33655
  209. make
  210.  
  211. _wine32opts=(
  212. --libdir=/$_prefix/lib32
  213. --with-wine64="$srcdir/$pkgname-64-build"
  214. )
  215.  
  216. export PKG_CONFIG_PATH="$_prefix/lib32/pkgconfig"
  217. fi
  218.  
  219. msg2 "Building Wine-32..."
  220. cd "$srcdir/$pkgname-32-build"
  221. ../$_upname/configure \
  222. --prefix=$_prefix \
  223. --sysconfdir=$_sysconf \
  224. --with-x \
  225. --with-xattr \
  226. --without-gstreamer \
  227. --disable-tests \
  228. "${_wine32opts[@]}"
  229.  
  230. # These additional flags solve FS#23277
  231. make CFLAGS+="-mstackrealign -mincoming-stack-boundary=2" CXXFLAGS+="-mstackrealign -mincoming-stack-boundary=2"
  232. }
  233.  
  234. package() {
  235. msg2 "Packaging Wine-32..."
  236. cd "$srcdir/$pkgname-32-build"
  237.  
  238. if [[ $CARCH == i686 ]]; then
  239. make prefix="$pkgdir/$_prefix" install
  240. else
  241. make prefix="$pkgdir/$_prefix" \
  242. libdir="$pkgdir/$_prefix/lib32" \
  243. dlldir="$pkgdir/$_prefix/lib32/wine" install
  244.  
  245. msg2 "Packaging Wine-64..."
  246. cd "$srcdir/$pkgname-64-build"
  247. make prefix="$pkgdir/$_prefix" \
  248. libdir="$pkgdir/$_prefix/lib" \
  249. dlldir="$pkgdir/$_prefix/lib/wine" install
  250. fi
  251.  
  252. # Font aliasing settings for Win32 applications
  253. if [[ $customprefix != 1 ]]; then
  254. install -d "$pkgdir"/etc/fonts/conf.{avail,d}
  255. install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail"
  256. ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf"
  257. fi
  258.  
  259. # Provide symlinks in /opt/wine-compholio/bin
  260.  
  261. if [[ "$_prefix" != "/opt/wine-compholio" ]]; then
  262. mkdir -p "$pkgdir/opt/wine-compholio/bin"
  263. for _file in $(ls "$pkgdir/$_prefix/bin"); do \
  264. ln -s "$_prefix/bin/$_file" "$pkgdir/opt/wine-compholio/bin/$_file"; \
  265. done
  266. fi
  267.  
  268. }
  269. # vim:set ts=2 sw=2 tw=0 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement