Opened 13 years ago

Last modified 12 years ago

#29884 new enhancement

Add USB variant to wine and wine-devel ports

Reported by: singingwolfboy@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc: jyrkiwahlstedt
Port: wine

Description

Apparently there is a set of maintained patches for the Wine project to add USB support, and it would be nice if we could provide a variant that installs these patches. I'm including a patch that should enable this for the wine port: it should be trivial to apply this to the wine-devel port, as well.

Please review and commit it at your leisure!

Attachments (2)

usb.patch (2.8 KB) - added by singingwolfboy@… 13 years ago.
usb2.patch (2.1 KB) - added by singingwolfboy@… 13 years ago.
version 2

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by singingwolfboy@…

Attachment: usb.patch added

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Presumably wine-crossover-games should be considered as well.

I do not wish to have md5 checksums reintroduced into this port; I deliberately removed them before. I also don't wish to change the whitespace of my checksums.

The variant overwrites patch_sites and patchfiles; it should append to them. The wine and wine-devel ports might not have patchfiles today, but they easily could in the future. wine-crossover-games currently does have a patchfile. The use of patch.pre_args -p1 is problematic as well, in that the existing wine-crossover-games patch and any future patch we write will have to conform to -p1. So this part should be in the global part of the portfile, with a comment explaining that it is for the benefit of the USB patches. See the php5 port which does a similar thing for the Suhosin patch.

The pre-patch phase saved munged versions of the patchfiles in distpath. If this munging is really necessary, it should save them somewhere in workpath so they'll be cleaned up automatically. I have a feeling no munging is necessary though.

I'm not comfortable with making this a default variant. If it were suitable for all users to use, wouldn't the wine developers have accepted the patch into their main sources? (Why haven't they?) php5's suhosin variant isn't default for the same reason: if the developers of PHP thought it suitable for everyone to use, they would have included it, and I don't like second-guessing developers about their own software.

I'd rather set the checksums for the patchfiles in the variant, next to where they're used, not in the global part of the portfile. I'd set the patch1/patch2 variables there too; they're not needed outside the variant.

What happens when a new version of these patches is published, e.g. for a new version of wine? Will the filenames change? It looks like they don't, only the directory name changes. In which case we have an unversioned distfile situation and need to use ${version} in dist_subdir. That should also happen globally, not just in the variant. The three wine ports already set dist_subdir, to ensure all their distfiles are saved to the same place, so that line will just have to be modified to include ${version}.

Changed 13 years ago by singingwolfboy@…

Attachment: usb2.patch added

version 2

comment:2 Changed 13 years ago by singingwolfboy@…

All very good points. I've uploaded a new patch that (I believe) addresses all of them. Take a look?

As for why the wine developers haven't added the USB patches to the Wine project: I have no idea, I only learned about this set of patches yesterday.

comment:3 Changed 12 years ago by jmroot (Joshua Root)

Keywords: haspatch added
Note: See TracTickets for help on using tickets.