-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwine-wayland.spec
3477 lines (3247 loc) · 138 KB
/
wine-wayland.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
%global debug_package %{nil}
# Compiling the preloader fails with hardening enabled
%undefine _hardened_build
#%%define _smp_mflags -j1
%global no64bit 0
%global winegecko 2.47.2
%global winemono 6.2.0
%global _default_patch_fuzz 2
%ifarch %{ix86}
%global winepedir i386-windows
%global winesodir i386-unix
%endif
%ifarch x86_64
%global winepedir x86_64-windows
%global winesodir x86_64-unix
%endif
%ifarch %{arm}
%global winepedir arm-windows
%global winesodir arm-unix
%endif
%ifarch aarch64
%global winepedir aarch64-windows
%global winesodir aarch64-unix
%endif
# wine-wayland related
%global gitdate 20210828
%global commit 61270cce427ea5101b446b151c3bda536b90797a
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global version 6.15
%global release 1
# build with wine-staging patches, see: https://github.com/wine-staging/wine-staging
%if 0%{?fedora}
%global wine_staging 1
%endif
# 0%%{?fedora}
# 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-wayland
Version: %{version}
Release: 0.%{release}.%{gitdate}.git%{shortcommit}%{?dist}
Summary: A compatibility layer for windows applications
License: LGPLv2+
URL: https://gitlab.collabora.com/alf/wine/-/tree/wayland
Source0: https://gitlab.collabora.com/alf/wine/-/archive/wayland/wine-wayland-%{version}-git%{shortcommit}.tar.gz
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
# AppData files
Source150: wine.appdata.xml
# 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
%if 0%{?wine_staging}
# wine-staging patches
# pulseaudio-patch is covered by that patch-set, too.
Source900: https://github.com/wine-staging/wine-staging/archive/v%{version}.tar.gz#/wine-staging-%{version}.tar.gz
# fysnc, futex2 and childwindow patches
# https://github.com/Frogging-Family/wine-tkg-git/tree/master/wine-tkg-git/wine-tkg-patches/proton
Patch900: fsync-unix-staging.patch
Patch901: fsync-staging-no_alloc_handle.patch
Patch902: fsync_futex2.patch
# https://bugs.winehq.org/show_bug.cgi?id=45277
Patch903: 0010-winex11.drv-Use-XPresentPixmap-instead-of-XCopyArea-.patch
Patch904: wine-6.15-fix-for-BZ51596.patch
%endif
%if !%{?no64bit}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
%else
ExclusiveArch: %{ix86} %{arm}
%endif
BuildRequires: bison
BuildRequires: flex
%ifarch aarch64
BuildRequires: clang >= 5.0
%else
BuildRequires: gcc
%endif
BuildRequires: mingw32-gcc
BuildRequires: mingw64-gcc
BuildRequires: autoconf
BuildRequires: make
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
%if 0%{?fedora}
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
%if 0%{?fedora} && 0%{?fedora} <= 30
BuildRequires: isdn4k-utils-devel
%endif
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
BuildRequires: mpg123-devel
%endif
BuildRequires: SDL2-devel
BuildRequires: libvkd3d-devel
BuildRequires: libvkd3d-shader-devel
BuildRequires: vulkan-devel
BuildRequires: libFAudio-devel
BuildRequires: libappstream-glib
# wayland
BuildRequires: wayland-devel
BuildRequires: libxkbcommon-devel
BuildRequires: egl-wayland-devel
# end wayland
# Silverlight DRM-stuff needs XATTR enabled.
%if 0%{?wine_staging}
BuildRequires: gtk3-devel
BuildRequires: libattr-devel
BuildRequires: libva-devel
%endif
# 0%%{?wine_staging}
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
BuildRequires: openal-soft-devel
BuildRequires: icoutils
%endif
Requires: wine-common = %{version}-%{release}
Requires: wine-desktop = %{version}-%{release}
Requires: wine-fonts = %{version}-%{release}
# x86-32 parts
%ifarch %{ix86} x86_64
%if 0%{?fedora} || 0%{?rhel} <= 6
Requires: wine-core(x86-32) = %{version}-%{release}
Requires: wine-capi(x86-32) = %{version}-%{release}
Requires: wine-cms(x86-32) = %{version}-%{release}
Requires: wine-ldap(x86-32) = %{version}-%{release}
Requires: wine-twain(x86-32) = %{version}-%{release}
Requires: wine-pulseaudio(x86-32) = %{version}-%{release}
%if 0%{?fedora} >= 10 || 0%{?rhel} == 6
Requires: wine-openal(x86-32) = %{version}-%{release}
%endif
%if 0%{?fedora}
Requires: wine-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
%if 0%{?fedora} >= 33
Recommends: wine-dxvk(x86-32)
Recommends: dosbox-staging
%endif
Recommends: gstreamer1-plugins-good(x86-32)
%endif
# x86-64 parts
%ifarch x86_64
Requires: wine-core(x86-64) = %{version}-%{release}
Requires: wine-capi(x86-64) = %{version}-%{release}
Requires: wine-cms(x86-64) = %{version}-%{release}
Requires: wine-ldap(x86-64) = %{version}-%{release}
Requires: wine-twain(x86-64) = %{version}-%{release}
Requires: wine-pulseaudio(x86-64) = %{version}-%{release}
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
Requires: wine-openal(x86-64) = %{version}-%{release}
%endif
%if 0%{?fedora}
Requires: wine-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)
%if 0%{?fedora} >= 33
Recommends: wine-dxvk(x86-64)
Recommends: dosbox-staging
%endif
Recommends: gstreamer1-plugins-good(x86-64)
%endif
# ARM parts
%ifarch %{arm} aarch64
Requires: wine-core = %{version}-%{release}
Requires: wine-capi = %{version}-%{release}
Requires: wine-cms = %{version}-%{release}
Requires: wine-ldap = %{version}-%{release}
Requires: wine-twain = %{version}-%{release}
Requires: wine-pulseaudio = %{version}-%{release}
Requires: wine-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-core(aarch-64) = %{version}-%{release}
Requires: wine-capi(aarch-64) = %{version}-%{release}
Requires: wine-cms(aarch-64) = %{version}-%{release}
Requires: wine-ldap(aarch-64) = %{version}-%{release}
Requires: wine-twain(aarch-64) = %{version}-%{release}
Requires: wine-pulseaudio(aarch-64) = %{version}-%{release}
Requires: wine-openal(aarch-64) = %{version}-%{release}
Requires: wine-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 -n wine-core
Summary: Wine core package
Requires(postun): /sbin/ldconfig
Requires(posttrans): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# require -filesystem
Requires: wine-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) if nss-mdns(x86-64))
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-loader(x86-32)
%if 0%{?wine_staging}
Requires: libva(x86-32)
%endif
%endif
%ifarch x86_64
# CUPS support uses dlopen - rhbz#1367537
Requires: cups-libs(x86-64)
Requires: freetype(x86-64)
Requires: (nss-mdns(x86-64) if nss-mdns(x86-32))
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-loader(x86-64)
%if 0%{?wine_staging}
Requires: libva(x86-64)
%endif
%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-loader
%if 0%{?wine_staging}
Requires: libva
%endif
%endif
# removed as of 1.7.35
Obsoletes: wine-wow < 1.7.35
Provides: wine-wow = %{version}-%{release}
%description -n wine-core
Wine core package includes the basic wine stuff needed by all other packages.
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
%package -n wine-systemd
Summary: Systemd config for the wine binfmt handler
Requires: systemd >= 23
BuildArch: noarch
Requires(post): systemd
Requires(postun): systemd
Obsoletes: wine-sysvinit < %{version}-%{release}
%description -n wine-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 -n wine-sysvinit
Summary: SysV initscript for the wine binfmt handler
BuildArch: noarch
Requires(post): /sbin/chkconfig, /sbin/service
Requires(preun): /sbin/chkconfig, /sbin/service
%description -n wine-sysvinit
Register the wine binary handler for windows executables via SysV init files.
%endif
%package -n wine-filesystem
Summary: Filesystem directories for wine
BuildArch: noarch
%description -n wine-filesystem
Filesystem directories and basic configuration for wine.
%package -n wine-common
Summary: Common files
Requires: wine-core = %{version}-%{release}
BuildArch: noarch
%description -n wine-common
Common wine files and scripts.
%package -n wine-desktop
Summary: Desktop integration features for wine
Requires(post): desktop-file-utils >= 0.8
Requires(postun): desktop-file-utils >= 0.8
Requires: wine-core = %{version}-%{release}
Requires: wine-common = %{version}-%{release}
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
Requires: wine-systemd = %{version}-%{release}
%endif
%if 0%{?rhel} == 6
Requires: wine-sysvinit = %{version}-%{release}
%endif
Requires: hicolor-icon-theme
BuildArch: noarch
%description -n wine-desktop
Desktop integration features for wine, including mime-types and a binary format
handler service.
%package -n wine-fonts
Summary: Wine font files
BuildArch: noarch
# arial-fonts are available with wine-staging patchset, only.
%if 0%{?wine_staging}
Requires: wine-arial-fonts = %{version}-%{release}
%else
# 0%%{?wine_staging}
Obsoletes: wine-arial-fonts <= %{version}-%{release}
%endif
# 0%%{?wine_staging}
Requires: wine-courier-fonts = %{version}-%{release}
Requires: wine-fixedsys-fonts = %{version}-%{release}
Requires: wine-small-fonts = %{version}-%{release}
Requires: wine-system-fonts = %{version}-%{release}
Requires: wine-marlett-fonts = %{version}-%{release}
Requires: wine-ms-sans-serif-fonts = %{version}-%{release}
Requires: wine-tahoma-fonts = %{version}-%{release}
# times-new-roman-fonts are available with wine_staging-patchset, only.
%if 0%{?wine_staging}
Requires: wine-times-new-roman-fonts = %{version}-%{release}
%else
# 0%%{?wine_staging}
Obsoletes: wine-times-new-roman-fonts <= %{version}-%{release}
Obsoletes: wine-times-new-roman-fonts-system <= %{version}-%{release}
%endif
# 0%%{?wine_staging}
Requires: wine-symbol-fonts = %{version}-%{release}
Requires: wine-webdings-fonts = %{version}-%{release}
Requires: wine-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 -n wine-fonts
%{summary}
%if 0%{?wine_staging}
%package -n wine-arial-fonts
Summary: Wine Arial font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-arial-fonts
%{summary}
%endif
# 0%%{?wine_staging}
%package -n wine-courier-fonts
Summary: Wine Courier font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-courier-fonts
%{summary}
%package -n wine-fixedsys-fonts
Summary: Wine Fixedsys font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-fixedsys-fonts
%{summary}
%package -n wine-small-fonts
Summary: Wine Small font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-small-fonts
%{summary}
%package -n wine-system-fonts
Summary: Wine System font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-system-fonts
%{summary}
%package -n wine-marlett-fonts
Summary: Wine Marlett font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-marlett-fonts
%{summary}
%package -n wine-ms-sans-serif-fonts
Summary: Wine MS Sans Serif font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-ms-sans-serif-fonts
%{summary}
# rhbz#693180
# http://lists.fedoraproject.org/pipermail/devel/2012-June/168153.html
%package -n wine-tahoma-fonts
Summary: Wine Tahoma font family
BuildArch: noarch
Requires: wine-filesystem = %{version}-%{release}
%description -n wine-tahoma-fonts
%{summary}
Please note: If you want system integration for wine tahoma fonts install the
wine-tahoma-fonts-system package.
%package -n wine-tahoma-fonts-system
Summary: Wine Tahoma font family system integration
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-tahoma-fonts = %{version}-%{release}
%description -n wine-tahoma-fonts-system
%{summary}
%if 0%{?wine_staging}
%package -n wine-times-new-roman-fonts
Summary: Wine Times New Roman font family
BuildArch: noarch
Requires: wine-filesystem = %{version}-%{release}
%description -n wine-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 -n wine-times-new-roman-fonts-system
Summary: Wine Times New Roman font family system integration
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-times-new-roman-fonts = %{version}-%{release}
%description -n wine-times-new-roman-fonts-system
%{summary}
%endif
%package -n wine-symbol-fonts
Summary: Wine Symbol font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-symbol-fonts
%{summary}
%package -n wine-webdings-fonts
Summary: Wine Webdings font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-webdings-fonts
%{summary}
%package -n wine-wingdings-fonts
Summary: Wine Wingdings font family
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n wine-wingdings-fonts
%{summary}
Please note: If you want system integration for wine wingdings fonts install the
wine-wingdings-fonts-system package.
%package -n wine-wingdings-fonts-system
Summary: Wine Wingdings font family system integration
BuildArch: noarch
Requires: fontpackages-filesystem
Requires: wine-wingdings-fonts = %{version}-%{release}
%description -n wine-wingdings-fonts-system
%{summary}
%package -n wine-ldap
Summary: LDAP support for wine
Requires: wine-core = %{version}-%{release}
%description -n wine-ldap
LDAP support for wine
%package -n wine-cms
Summary: Color Management for wine
Requires: wine-core = %{version}-%{release}
%description -n wine-cms
Color Management for wine
%package -n wine-twain
Summary: Twain support for wine
Requires: wine-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 -n wine-twain
Twain support for wine
%package -n wine-capi
Summary: ISDN support for wine
Requires: wine-core = %{version}-%{release}
%if 0%{?fedora} <= 30
%ifarch x86_64
Requires: isdn4k-utils(x86-64)
%endif
%ifarch %{ix86}
Requires: isdn4k-utils(x86-32)
%endif
%ifarch %{arm} aarch64
Requires: isdn4k-utils
%endif
%endif
%description -n wine-capi
ISDN support for wine
%package -n wine-devel
Summary: Wine development environment
Requires: wine-core = %{version}-%{release}
%description -n wine-devel
Header, include files and library definition files for developing applications
with the Wine Windows(TM) emulation libraries.
%package -n wine-pulseaudio
Summary: Pulseaudio support for wine
Requires: wine-core = %{version}-%{release}
# midi output
Requires: wine-alsa%{?_isa} = %{version}-%{release}
%description -n wine-pulseaudio
This package adds a pulseaudio driver for wine.
%package -n wine-alsa
Summary: Alsa support for wine
Requires: wine-core = %{version}-%{release}
%description -n wine-alsa
This package adds an alsa driver for wine.
%if 0%{?fedora} >= 10 || 0%{?rhel} >= 6
%package -n wine-openal
Summary: Openal support for wine
Requires: wine-core = %{version}-%{release}
%description -n wine-openal
This package adds an openal driver for wine.
%endif
%if 0%{?fedora}
%package -n wine-opencl
Summary: OpenCL support for wine
Requires: wine-core = %{version}-%{release}
%description -n wine-opencl
This package adds the opencl driver for wine.
%endif
%prep
%setup -q -n %{name}
%patch511 -p1 -b.cjk
%if 0%{?wine_staging}
# setup and apply wine-staging patches
gzip -dc %{SOURCE900} | tar -xf - --strip-components=1
patches/patchinstall.sh DESTDIR="`pwd`" --all
#%%patch900 -p1
#%%patch901 -p1
#%%patch902 -p1
#%%patch903 -p1
%patch904 -p1
# fix parallelized build
sed -i -e 's!^loader server: libs/port libs/wine tools.*!& include!' Makefile.in
autoreconf -vfi
%endif
# 0%%{?wine_staging}
%build
# This package uses top level ASM constructs which are incompatible with LTO.
# Top level ASMs are often used to implement symbol versioning. gcc-10
# introduces a new mechanism for symbol versioning which works with LTO.
# Converting packages to use that mechanism instead of toplevel ASMs is
# recommended.
# Disable LTO
%define _lto_cflags %{nil}
# disable fortify as it breaks wine
# http://bugs.winehq.org/show_bug.cgi?id=24606
# http://bugs.winehq.org/show_bug.cgi?id=25073
export CFLAGS="`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//'` -Wno-error"
%ifarch aarch64
%if 0%{?fedora} >= 33
%global toolchain clang
%else
# ARM64 now requires clang
# https://source.winehq.org/git/wine.git/commit/8fb8cc03c3edb599dd98f369e14a08f899cbff95
export CC="/usr/bin/clang"
# Fedora's default compiler flags now conflict with what clang supports
# https://bugzilla.redhat.com/show_bug.cgi?id=1658311
export CFLAGS="`echo $CFLAGS | sed -e 's/-fstack-clash-protection//'`"
%endif
%endif
%configure \
--sysconfdir=%{_sysconfdir}/wine \
--x-includes=%{_includedir} --x-libraries=%{_libdir} \
--without-hal --with-dbus \
--with-x \
--with-wayland \
%ifarch %{arm}
--with-float-abi=hard \
%endif
%ifarch x86_64 aarch64
--enable-win64 \
%endif
%{?wine_staging: --with-xattr} \
--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
# do not ship typelibs in 32-bit packages
# https://www.winehq.org/pipermail/wine-devel/2020-June/167283.html
rm %{buildroot}%{_includedir}/wine/windows/*.tlb
%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
mv %{buildroot}%{_libdir}/wine/%{winepedir}/dxgi.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-dxgi.dll
mv %{buildroot}%{_libdir}/wine/%{winesodir}/dxgi.dll.so %{buildroot}%{_libdir}/wine/%{winesodir}/wine-dxgi.dll.so
mv %{buildroot}%{_libdir}/wine/%{winepedir}/d3d9.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-d3d9.dll
mv %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-d3d10.dll
mv %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10_1.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-d3d10_1.dll
mv %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10core.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-d3d10core.dll
mv %{buildroot}%{_libdir}/wine/%{winepedir}/d3d11.dll %{buildroot}%{_libdir}/wine/%{winepedir}/wine-d3d11.dll
touch %{buildroot}%{_libdir}/wine/%{winepedir}/dxgi.dll
touch %{buildroot}%{_libdir}/wine/%{winesodir}/dxgi.dll.so
touch %{buildroot}%{_libdir}/wine/%{winepedir}/d3d9.dll
touch %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10.dll
touch %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10_1.dll
touch %{buildroot}%{_libdir}/wine/%{winepedir}/d3d10core.dll
touch %{buildroot}%{_libdir}/wine/%{winepedir}/d3d11.dll
# 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"/;'
MAIN_ICONFIX='s/height="272"/height="256"/;'\
's/width="632"/width="256"\n'\
' x="8"\n'\
' y="8"\n'\
' viewBox="8, 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 "$MAIN_ICONFIX" %{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