This repository has been archived by the owner on Jan 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwine-stable.spec
4310 lines (3613 loc) · 129 KB
/
wine-stable.spec
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Compiling the preloader fails with hardening enabled
%undefine _hardened_build
%global no64bit 0
%global winegecko 2.47
%global winemono 4.7.1
%global staging 0
# Gallium-Nine for DX9 support
%bcond_without d3dnine
%global d3dnine_version 4.2
# DXVK for DX10, DX11 support
%bcond_without dxvk
# VkD3D for DX12 support
%bcond_without vkd3d
# FAudio free XAudio implementation
%bcond_without faudio
# Patches from staging: winepulse, ntdll-UserSharedData, fonts
%bcond_without staging_patch
# FFMPEG
%bcond_with ffmpeg
# binfmt macros for RHEL
%if 0%{?rhel} == 7
%global _binfmtdir /usr/lib/binfmt.d
%global binfmt_apply() \
/usr/lib/systemd/systemd-binfmt %{?*} >/dev/null 2>&1 || : \
%{nil}
%endif
Name: wine-stable
Version: 4.2
Release: 3%{?dist}
Summary: A compatibility layer for windows applications
Group: Applications/Emulators
License: LGPLv2+
URL: https://www.winehq.org/
Provides: wine = %{version}-%{release}
Source0: wine-%{version}.tar.xz
%if 0%{with staging_patch}
Source11: wine-staging-%{version}.tar.gz
%endif
%if 0%{with d3dnine}
Source12: wine-d3d9-patches-wine-d3d9-%{d3dnine_version}.tar.gz
%endif
Source1: wine.init
Source2: wine.systemd
Source3: wine-README-Fedora
Source4: wine-32.conf
Source5: wine-64.conf
# desktop files
Source100: wine-notepad.desktop
Source101: wine-regedit.desktop
Source102: wine-uninstaller.desktop
Source103: wine-winecfg.desktop
Source104: wine-winefile.desktop
Source105: wine-winemine.desktop
Source106: wine-winhelp.desktop
Source107: wine-wineboot.desktop
Source108: wine-wordpad.desktop
Source109: wine-oleview.desktop
# build fixes
# wine bugs
# desktop dir
Source200: wine.menu
Source201: wine.directory
# mime types
Source300: wine-mime-msi.desktop
# smooth tahoma (#693180)
# disable embedded bitmaps
Source501: wine-tahoma.conf
# and provide a readme
Source502: wine-README-tahoma
Patch511: wine-cjk.patch
Patch512: wine-amd_ags.patch
%if 0%{with faudio}
Patch514: wine-faudio.patch
Patch515: wine-faudio-xact.patch
Patch516: wine-faudio-fix.patch
%endif
%if 0%{with d3dnine}
%if 0%{with dxvk}
# dxvk dlls redirects
Patch519: wine-dxvk.patch
Patch520: wine-dxvk-helper.patch
%endif
%endif
%if !%{?no64bit}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
%else
ExclusiveArch: %{ix86} %{arm}
%endif
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc
BuildRequires: git
BuildRequires: autoconf
BuildRequires: desktop-file-utils
BuildRequires: alsa-lib-devel
BuildRequires: audiofile-devel
BuildRequires: freeglut-devel
BuildRequires: lcms2-devel
BuildRequires: libieee1284-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: librsvg2
BuildRequires: librsvg2-devel
BuildRequires: libstdc++-devel
BuildRequires: libusb-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: ncurses-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: ocl-icd-devel
BuildRequires: opencl-headers
%endif
BuildRequires: openldap-devel
BuildRequires: perl-generators
BuildRequires: unixODBC-devel
BuildRequires: sane-backends-devel
BuildRequires: systemd-devel
BuildRequires: zlib-devel
BuildRequires: fontforge freetype-devel
BuildRequires: libgphoto2-devel
BuildRequires: isdn4k-utils-devel
BuildRequires: libpcap-devel
# modular x
BuildRequires: libX11-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel mesa-libOSMesa-devel
BuildRequires: libXxf86dga-devel libXxf86vm-devel
BuildRequires: libXrandr-devel libXrender-devel
BuildRequires: libXext-devel
BuildRequires: libXinerama-devel
BuildRequires: libXcomposite-devel
BuildRequires: fontconfig-devel
BuildRequires: giflib-devel
BuildRequires: cups-devel
BuildRequires: libXmu-devel
BuildRequires: libXi-devel
BuildRequires: libXcursor-devel
BuildRequires: dbus-devel
BuildRequires: gnutls-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: gsm-devel
BuildRequires: libv4l-devel
BuildRequires: fontpackages-devel
BuildRequires: libtiff-devel
BuildRequires: gettext-devel
BuildRequires: chrpath
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
%if 0%{?fedora} > 24 || 0%{?rhel} >= 7
BuildRequires: mpg123-devel
%endif
BuildRequires: SDL2-devel
BuildRequires: vulkan-devel
BuildRequires: openal-soft-devel
BuildRequires: mesa-libd3d-devel
# Silverlight DRM-stuff needs XATTR enabled.
BuildRequires: gtk3-devel
BuildRequires: libattr-devel
BuildRequires: libva-devel
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
BuildRequires: icoutils
%endif
%if 0%{with ffmpeg}
BuildRequires: ffmpeg-devel
Requires: ffmpeg-libs
%endif
%if 0%{with vkd3d}
BuildRequires: libvkd3d-devel
BuildRequires: libvkd3d-utils-devel
Requires: libvkd3d
%endif
%if 0%{with dxvk}
BuildRequires: libdxvk-devel
Requires: libdxvk
%endif
%if 0%{with faudio}
BuildRequires: libfaudio-devel
Requires: libfaudio
%endif
Requires: wine-stable-common = %{version}-%{release}
Requires: wine-stable-desktop = %{version}-%{release}
Requires: wine-stable-fonts = %{version}-%{release}
# x86-32 parts
%ifarch %{ix86} x86_64
%if 0%{?fedora} || 0%{?rhel}
Requires: wine-stable-core(x86-32) = %{version}-%{release}
Requires: wine-stable-capi(x86-32) = %{version}-%{release}
Requires: wine-stable-cms(x86-32) = %{version}-%{release}
Requires: wine-stable-ldap(x86-32) = %{version}-%{release}
Requires: wine-stable-twain(x86-32) = %{version}-%{release}
Requires: wine-stable-pulseaudio(x86-32) = %{version}-%{release}
%if 0%{?fedora} >= 10 || 0%{?rhel}
Requires: wine-stable-openal(x86-32) = %{version}-%{release}
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: wine-stable-opencl(x86-32) = %{version}-%{release}
%endif
%if 0%{?fedora} >= 17
Requires: mingw32-wine-gecko >= %winegecko
Requires: wine-mono >= %winemono
%endif
# wait for rhbz#968860 to require arch-specific samba-winbind-clients
Requires: /usr/bin/ntlm_auth
Requires: mesa-dri-drivers(x86-32)
%endif
%endif
# x86-64 parts
%ifarch x86_64
Requires: wine-stable-core(x86-64) = %{version}-%{release}
Requires: wine-stable-capi(x86-64) = %{version}-%{release}
Requires: wine-stable-cms(x86-64) = %{version}-%{release}
Requires: wine-stable-ldap(x86-64) = %{version}-%{release}
Requires: wine-stable-twain(x86-64) = %{version}-%{release}
Requires: wine-stable-pulseaudio(x86-64) = %{version}-%{release}
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
Requires: wine-stable-openal(x86-64) = %{version}-%{release}
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: wine-stable-opencl(x86-64) = %{version}-%{release}
%endif
%if 0%{?fedora} >= 17
Requires: mingw64-wine-gecko >= %winegecko
Requires: wine-mono >= %winemono
%endif
Requires: mesa-dri-drivers(x86-64)
%endif
# ARM parts
%ifarch %{arm} aarch64
Requires: wine-stable-core = %{version}-%{release}
Requires: wine-stable-capi = %{version}-%{release}
Requires: wine-stable-cms = %{version}-%{release}
Requires: wine-ldap = %{version}-%{release}
Requires: wine-stable-twain = %{version}-%{release}
Requires: wine-stable-pulseaudio = %{version}-%{release}
Requires: wine-stable-openal = %{version}-%{release}
%if 0%{?fedora}
Requires: wine-opencl = %{version}-%{release}
%endif
Requires: mesa-dri-drivers
Requires: samba-winbind-clients
%endif
# aarch64 parts
%ifarch aarch64
Requires: wine-stable-core(aarch-64) = %{version}-%{release}
Requires: wine-stable-capi(aarch-64) = %{version}-%{release}
Requires: wine-stable-cms(aarch-64) = %{version}-%{release}
Requires: wine-stable-ldap(aarch-64) = %{version}-%{release}
Requires: wine-stable-twain(aarch-64) = %{version}-%{release}
Requires: wine-stable-pulseaudio(aarch-64) = %{version}-%{release}
Requires: wine-stable-openal(aarch-64) = %{version}-%{release}
Requires: wine-stable-opencl(aarch-64) = %{version}-%{release}
Requires: mingw64-wine-gecko >= %winegecko
Requires: mesa-dri-drivers(aarch-64)
%endif
%description
Wine as a compatibility layer for UNIX to run Windows applications. This
package includes a program loader, which allows unmodified Windows
3.x/9x/NT binaries to run on x86 and x86_64 Unixes. Wine can use native system
.dll files if they are available.
In Fedora wine is a meta-package which will install everything needed for wine
to work smoothly. Smaller setups can be achieved by installing some of the
wine-* sub packages.
%package core
Summary: Wine core package
Group: Applications/Emulators
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires(posttrans): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# require -filesystem
Requires: wine-stable-filesystem = %{version}-%{release}
%ifarch %{ix86}
# CUPS support uses dlopen - rhbz#1367537
Requires: cups-libs(x86-32)
Requires: freetype(x86-32)
#Requires: nss-mdns(x86-32)
Requires: gnutls(x86-32)
Requires: libXcomposite(x86-32)
Requires: libXcursor(x86-32)
Requires: libXinerama(x86-32)
Requires: libXrandr(x86-32)
Requires: libXrender(x86-32)
#dlopen in windowscodesc (fixes rhbz#1085075)
Requires: libpng(x86-32)
Requires: libpcap(x86-32)
Requires: mesa-libOSMesa(x86-32)
Requires: libv4l(x86-32)
Requires: unixODBC(x86-32)
Requires: SDL2(x86-32)
Requires: vulkan(x86-32)
Requires: libva(x86-32)
%endif
%ifarch x86_64
# CUPS support uses dlopen - rhbz#1367537
Requires: cups-libs(x86-64)
Requires: freetype(x86-64)
Requires: nss-mdns(x86-64)
Requires: gnutls(x86-64)
Requires: libXcomposite(x86-64)
Requires: libXcursor(x86-64)
Requires: libXinerama(x86-64)
Requires: libXrandr(x86-64)
Requires: libXrender(x86-64)
#dlopen in windowscodesc (fixes rhbz#1085075)
Requires: libpng(x86-64)
Requires: libpcap(x86-64)
Requires: mesa-libOSMesa(x86-64)
Requires: libv4l(x86-64)
Requires: unixODBC(x86-64)
Requires: SDL2(x86-64)
Requires: vulkan(x86-64)
Requires: libva(x86-64)
%endif
%ifarch %{arm} aarch64
# CUPS support uses dlopen - rhbz#1367537
Requires: cups-libs
Requires: freetype
Requires: nss-mdns
Requires: gnutls
Requires: libXrender
Requires: libXcursor
#dlopen in windowscodesc (fixes rhbz#1085075)
Requires: libpng
Requires: libpcap
Requires: mesa-libOSMesa
Requires: libv4l
Requires: unixODBC
Requires: SDL2
Requires: vulkan
%if 0%{?compholio}
Requires: libva
%endif
%endif
# removed as of 1.7.35
Obsoletes: wine-wow < 1.7.35
Provides: wine-wow = %{version}-%{release}
Provides: wine-core = %{version}-%{release}
%description core
Wine core package includes the basic wine stuff needed by all other packages.
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
%package systemd
Summary: Systemd config for the wine binfmt handler
Group: Applications/Emulators
Requires: systemd >= 23
BuildArch: noarch
Requires(post): systemd
Requires(postun): systemd
Obsoletes: wine-sysvinit < %{version}-%{release}
%description systemd
Register the wine binary handler for windows executables via systemd binfmt
handling. See man binfmt.d for further information.
%endif
%if 0%{?rhel} == 6
%package sysvinit
Summary: SysV initscript for the wine binfmt handler
Group: Applications/Emulators
BuildArch: noarch
%description sysvinit
Register the wine binary handler for windows executables via SysV init files.
%endif
%package filesystem
Summary: Filesystem directories for wine
Group: Applications/Emulators
Provides: wine-filesystem = %{version}-%{release}
BuildArch: noarch
%description filesystem
Filesystem directories and basic configuration for wine.
%package common
Summary: Common files
Group: Applications/Emulators
Requires: wine-stable-core = %{version}-%{release}
Provides: wine-common = %{version}-%{release}
BuildArch: noarch
%description common
Common wine files and scripts.
%package desktop
Summary: Desktop integration features for wine
Group: Applications/Emulators
Requires(post): /sbin/chkconfig, /sbin/service,
Requires(post): desktop-file-utils >= 0.8
Requires(preun): /sbin/chkconfig, /sbin/service
Requires(postun): desktop-file-utils >= 0.8
Requires: wine-stable-core = %{version}-%{release}
Requires: wine-stable-common = %{version}-%{release}
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
Requires: wine-stable-systemd = %{version}-%{release}
%endif
%if 0%{?rhel} == 6
Requires: wine-sysvinit = %{version}-%{release}
%endif
Requires: hicolor-icon-theme
BuildArch: noarch
%description desktop
Desktop integration features for wine, including mime-types and a binary format
handler service.
%package fonts
Summary: Wine font files
Group: Applications/Emulators
BuildArch: noarch
# arial-fonts are available with compholio-patchset, only.
Requires: wine-stable-arial-fonts = %{version}-%{release}
Requires: wine-stable-courier-fonts = %{version}-%{release}
Requires: wine-stable-fixedsys-fonts = %{version}-%{release}
Requires: wine-stable-small-fonts = %{version}-%{release}
Requires: wine-stable-system-fonts = %{version}-%{release}
Requires: wine-stable-marlett-fonts = %{version}-%{release}
Requires: wine-stable-ms-sans-serif-fonts = %{version}-%{release}
Requires: wine-stable-tahoma-fonts = %{version}-%{release}
# times-new-roman-fonts are available with compholio-patchset, only.
Requires: wine-stable-times-new-roman-fonts = %{version}-%{release}
Requires: wine-stable-symbol-fonts = %{version}-%{release}
Requires: wine-stable-wingdings-fonts = %{version}-%{release}
# intermediate fix for #593140
Requires: liberation-sans-fonts liberation-serif-fonts liberation-mono-fonts
%if 0%{?fedora} > 12
Requires: liberation-narrow-fonts
%endif
%description fonts
%{summary}
%package arial-fonts
Summary: Wine Arial font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description arial-fonts
%{summary}
%package courier-fonts
Summary: Wine Courier font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description courier-fonts
%{summary}
%package fixedsys-fonts
Summary: Wine Fixedsys font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description fixedsys-fonts
%{summary}
%package small-fonts
Summary: Wine Small font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description small-fonts
%{summary}
%package system-fonts
Summary: Wine System font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description system-fonts
%{summary}
%package marlett-fonts
Summary: Wine Marlett font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description marlett-fonts
%{summary}
%package ms-sans-serif-fonts
Summary: Wine MS Sans Serif font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description ms-sans-serif-fonts
%{summary}
# rhbz#693180
# http://lists.fedoraproject.org/pipermail/devel/2012-June/168153.html
%package tahoma-fonts
Summary: Wine Tahoma font family
Group: User Interface/X
BuildArch: noarch
Requires: wine-stable-filesystem = %{version}-%{release}
%description tahoma-fonts
%{summary}
Please note: If you want system integration for wine tahoma fonts install the
wine-tahoma-fonts-system package.
%package tahoma-fonts-system
Summary: Wine Tahoma font family system integration
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-stable-tahoma-fonts = %{version}-%{release}
%description tahoma-fonts-system
%{summary}
%package times-new-roman-fonts
Summary: Wine Times New Roman font family
Group: User Interface/X
BuildArch: noarch
Requires: wine-stable-filesystem = %{version}-%{release}
%description times-new-roman-fonts
%{summary}
Please note: If you want system integration for wine times new roman fonts install the
wine-times-new-roman-fonts-system package.
%package times-new-roman-fonts-system
Summary: Wine Times New Roman font family system integration
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-stable-times-new-roman-fonts = %{version}-%{release}
%description times-new-roman-fonts-system
%{summary}
%package symbol-fonts
Summary: Wine Symbol font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description symbol-fonts
%{summary}
%package wingdings-fonts
Summary: Wine Wingdings font family
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description wingdings-fonts
%{summary}
Please note: If you want system integration for wine wingdings fonts install the
wine-wingdings-fonts-system package.
%package wingdings-fonts-system
Summary: Wine Wingdings font family system integration
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-stable-wingdings-fonts = %{version}-%{release}
%description wingdings-fonts-system
%{summary}
%package ldap
Summary: LDAP support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%description ldap
LDAP support for wine
%package cms
Summary: Color Management for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%description cms
Color Management for wine
%package twain
Summary: Twain support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%ifarch %{ix86}
Requires: sane-backends-libs(x86-32)
%endif
%ifarch x86_64
Requires: sane-backends-libs(x86-64)
%endif
%ifarch %{arm} aarch64
Requires: sane-backends-libs
%endif
%description twain
Twain support for wine
%package capi
Summary: ISDN support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%ifarch x86_64
Requires: isdn4k-utils(x86-64)
%endif
%ifarch %{ix86}
Requires: isdn4k-utils(x86-32)
%endif
%ifarch %{arm} aarch64
Requires: isdn4k-utils
%endif
%description capi
ISDN support for wine
%package devel
Summary: Wine development environment
Group: System Environment/Libraries
Provides: wine-devel
Requires: wine-stable-core = %{version}-%{release}
%description devel
Header, include files and library definition files for developing applications
with the Wine Windows(TM) emulation libraries.
%package pulseaudio
Summary: Pulseaudio support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
# midi output
Requires: wine-stable-alsa%{?_isa} = %{version}-%{release}
%description pulseaudio
This package adds a pulseaudio driver for wine.
%package alsa
Summary: Alsa support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%description alsa
This package adds an alsa driver for wine.
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
%package openal
Summary: Openal support for wine
Group: System Environment/Libraries
Requires: wine-stable-core = %{version}-%{release}
%description openal
This package adds an openal driver for wine.
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
%package opencl
Summary: OpenCL support for wine
Requires: wine-stable-core = %{version}-%{release}
%Description opencl
This package adds the opencl driver for wine.
%endif
%prep
%setup -q -n wine-%{version}
%patch511 -p1 -b.cjk
%patch512 -p1 -b.amd
%if 0%{with faudio}
%patch514 -p1 -b.faudio
%patch515 -p1 -b.fxact
%patch516 -p1 -b.ffix
%endif
%if 0%{with d3dnine}
# apply wine d3d9 patches
tar xzf %{SOURCE12}
patch -p1 <wine-d3d9-patches-wine-d3d9-%{d3dnine_version}/d3d9-helper.patch
patch -p1 <wine-d3d9-patches-wine-d3d9-%{d3dnine_version}/wine-d3d9.patch
rm -rf wine-d3d9-patches-wine-d3d9-%{version}
%if 0%{with dxvk}
%patch519 -p1 -b.dxvk
%patch520 -p1 -b.dxvk
%endif
%endif
%if 0%{with staging_patch}
tar xzf %{SOURCE11}
pushd wine-staging-%{version}/patches
./patchinstall.sh DESTDIR=../.. winepulse-PulseAudio_Support ntdll-User_Shared_Data fonts-Missing_Fonts
popd
%endif
autoreconf
tools/make_requests
%build
# disable fortify as it breaks wine
# http://bugs.winehq.org/show_bug.cgi?id=24606
# http://bugs.winehq.org/show_bug.cgi?id=25073
%if 0%{?fedora} < 26
export CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error"
%else
# https://bugzilla.redhat.com/show_bug.cgi?id=1406093
export TEMP_CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-O2/-O1/'`"
export CFLAGS="`echo $TEMP_CFLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error"
%endif
%if 0%{?rhel}
export CFLAGS="`echo $CFLAGS` -I/usr/include/ffmpeg"
%endif
%configure \
--sysconfdir=%{_sysconfdir}/wine \
--x-includes=%{_includedir} --x-libraries=%{_libdir} \
--without-hal --with-dbus \
--with-x \
%if 0%{with d3dnine}
--with-d3d9-nine \
%endif
%if 0%{with faudio}
--with-faudio \
%else
--with-openal \
%endif
%if 0%{with vkd3d}
--with-vkd3d \
%endif
%ifarch %{arm}
--with-float-abi=hard \
%endif
%ifarch x86_64 aarch64
--enable-win64 \
%endif
%{?staging: --with-xattr --with-va} \
--disable-tests
make %{?_smp_mflags} TARGETFLAGS=""
%install
%makeinstall \
includedir=%{buildroot}%{_includedir} \
sysconfdir=%{buildroot}%{_sysconfdir}/wine \
dlldir=%{buildroot}%{_libdir}/wine \
LDCONFIG=/bin/true \
UPDATE_DESKTOP_DATABASE=/bin/true
# setup for alternatives usage
%ifarch x86_64 aarch64
mv %{buildroot}%{_bindir}/wineserver %{buildroot}%{_bindir}/wineserver64
%endif
%ifarch %{ix86} %{arm}
mv %{buildroot}%{_bindir}/wine %{buildroot}%{_bindir}/wine32
mv %{buildroot}%{_bindir}/wineserver %{buildroot}%{_bindir}/wineserver32
%endif
%ifnarch %{arm} aarch64 x86_64
mv %{buildroot}%{_bindir}/wine-preloader %{buildroot}%{_bindir}/wine32-preloader
%endif
touch %{buildroot}%{_bindir}/wine
%ifnarch %{arm}
touch %{buildroot}%{_bindir}/wine-preloader
%endif
touch %{buildroot}%{_bindir}/wineserver
# remove rpath
chrpath --delete %{buildroot}%{_bindir}/wmc
chrpath --delete %{buildroot}%{_bindir}/wrc
%ifarch x86_64 aarch64
chrpath --delete %{buildroot}%{_bindir}/wine64
chrpath --delete %{buildroot}%{_bindir}/wineserver64
%else
chrpath --delete %{buildroot}%{_bindir}/wine32
chrpath --delete %{buildroot}%{_bindir}/wineserver32
%endif
mkdir -p %{buildroot}%{_sysconfdir}/wine
# Allow users to launch Windows programs by just clicking on the .exe file...
%if 0%{?rhel} < 7
mkdir -p %{buildroot}%{_initrddir}
install -p -c -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/wine
%endif
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
mkdir -p %{buildroot}%{_binfmtdir}
install -p -c -m 644 %{SOURCE2} %{buildroot}%{_binfmtdir}/wine.conf
%endif
# add wine dir to desktop
mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
install -p -m 644 %{SOURCE200} \
%{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/wine.menu
mkdir -p %{buildroot}%{_datadir}/desktop-directories
install -p -m 644 %{SOURCE201} \
%{buildroot}%{_datadir}/desktop-directories/Wine.directory
# add gecko dir
mkdir -p %{buildroot}%{_datadir}/wine/gecko
# add mono dir
mkdir -p %{buildroot}%{_datadir}/wine/mono
# extract and install icons
%if 0%{?fedora} > 10
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
# This replacement masks a composite program icon .SVG down
# so that only its full-size scalable icon is visible
PROGRAM_ICONFIX='s/height="272"/height="256"/;'\
's/width="632"/width="256"\n'\
' x="368"\n'\
' y="8"\n'\
' viewBox="368, 8, 256, 256"/;'
# This icon file is still in the legacy format
install -p -m 644 dlls/user32/resources/oic_winlogo.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wine.svg
sed -i -e '3s/368/64/' %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wine.svg
# The rest come from programs/, and contain larger scalable icons
# with a new layout that requires the PROGRAM_ICONFIX sed adjustment
install -p -m 644 programs/notepad/notepad.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/notepad.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/notepad.svg
install -p -m 644 programs/regedit/regedit.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/regedit.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/regedit.svg
install -p -m 644 programs/msiexec/msiexec.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/msiexec.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/msiexec.svg
install -p -m 644 programs/winecfg/winecfg.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winecfg.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winecfg.svg
install -p -m 644 programs/winefile/winefile.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winefile.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winefile.svg
install -p -m 644 programs/winemine/winemine.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winemine.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winemine.svg
install -p -m 644 programs/winhlp32/winhelp.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winhelp.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/winhelp.svg
install -p -m 644 programs/wordpad/wordpad.svg \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wordpad.svg
sed -i -e "$PROGRAM_ICONFIX" %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/wordpad.svg
%endif
# install desktop files
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE100}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE101}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE102}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE103}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE104}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE105}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE106}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE107}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE108}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE109}
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
--delete-original \
%{buildroot}%{_datadir}/applications/wine.desktop
#mime-types
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE300}
cp -p %{SOURCE3} README-FEDORA
cp -p %{SOURCE502} README-tahoma
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
%ifarch %{ix86} %{arm}
install -p -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/ld.so.conf.d/
%endif
%ifarch x86_64 aarch64
install -p -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/ld.so.conf.d/
%endif
# install Tahoma font for system package
install -p -m 0755 -d %{buildroot}/%{_datadir}/fonts/wine-tahoma-fonts
pushd %{buildroot}/%{_datadir}/fonts/wine-tahoma-fonts
ln -s ../../wine/fonts/tahoma.ttf tahoma.ttf
ln -s ../../wine/fonts/tahomabd.ttf tahomabd.ttf
popd
# add config and readme for tahoma
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
%{buildroot}%{_fontconfig_confdir}
install -p -m 0644 %{SOURCE501} %{buildroot}%{_fontconfig_templatedir}/20-wine-tahoma-nobitmaps.conf
ln -s %{_fontconfig_templatedir}/20-wine-tahoma-nobitmaps.conf \
%{buildroot}%{_fontconfig_confdir}/20-wine-tahoma-nobitmaps.conf
# install Times New Roman font for system package
install -p -m 0755 -d %{buildroot}/%{_datadir}/fonts/wine-times-new-roman-fonts
pushd %{buildroot}/%{_datadir}/fonts/wine-times-new-roman-fonts
ln -s ../../wine/fonts/times.ttf times.ttf
popd
# install Wingdings font for system package
install -p -m 0755 -d %{buildroot}/%{_datadir}/fonts/wine-wingdings-fonts
pushd %{buildroot}/%{_datadir}/fonts/wine-wingdings-fonts