Bug 202228 - [proposal] x11/nvidia-driver: Patch for new file hierarchy starting with NVVERION >= 355.006
Summary: [proposal] x11/nvidia-driver: Patch for new file hierarchy starting with NVVE...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-10 19:40 UTC by O. Hartmann
Modified: 2017-01-27 10:31 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
x11/nvidia-driver patchset >= 355.06 (8.93 KB, patch)
2015-08-10 19:40 UTC, O. Hartmann
no flags Details | Diff
x11/nvidia-driver NVVERSION >= 358.09 (9.20 KB, patch)
2015-10-18 09:06 UTC, O. Hartmann
ohartmann: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2015-08-10 19:40:18 UTC
Created attachment 159739 [details]
x11/nvidia-driver patchset >= 355.06

nVidia started a new dir hierarchy introduced with driver BETA 355.06 (aka 355.006), which differs slightly from the previous dir hierarchy.nVidia also introduces a new build structure.

It seems on a sneak look that the patches supplied so far for FreeBSD still apply and I tried to come along with the introduced dir hierarchy via a simple and mechanical patch, see attached.

I intriduced a variable NVSRC in Makefile, which is set to "nvidia", if NVVERSION >= 355.006, and empty else. With that variable, some paths get resembled like ${WRKSRC}/src/${NVSERC}/nvidia_linux.c, for instance, so if the old sources for the driver are used nothing changes, but with the newer driver sources, the new paths get introduced.

I didn't find an elegant solution for the patch files located in files. I simply duplicated the old ones and changes the diff header to accomplish the new directory hierarchy. I thought this might be the most suitable way even if some redundancy has been introduced.

I tested (an run so far successfully) the BETA driver 355.06 on CURRENT (FreeBSD 11.0-CURRENT #51 r286580: Mon Aug 10 16:52:52 CEST 2015 amd64) so far and it seems to be stable.

Could someone test it for 9.X and 10.X?

Regards,
oh
Comment 1 Ultima 2015-09-23 21:51:22 UTC
I was working on a new patch and saw this post. It is mostly usable, however removing all the extra distfiles breaks several slave ports. Also there are some new files that need to be added to plist. I'm almost finished with my patch and Ill post it here with some poudriere build logs once I'm finished.

We really need to get an update through, Its been over a year sense the last one. =/
Comment 2 O. Hartmann 2015-09-24 04:51:30 UTC
My patch is usable "for me" so feel free to invest more elaboration to make it a better usable one. I needed a quick-and-dirty working solution. I'm glad if your work is covering the changes made by nVidia more sophisticated.

I'm also curious about how nVidia will deal with OpenCL libraries in the future - maybe this should be kept in mind when cleaning the port.

Oliver
Comment 3 O. Hartmann 2015-10-18 09:06:39 UTC
Created attachment 162189 [details]
x11/nvidia-driver NVVERSION >= 358.09

This patch adds a replacement for an outdated C type "d_thread_t" which has been introduced in src/nvidia-modeset/nvidia-modeset-freebsd.c.

The patch is against the regular port and according to some comments it breaks ports (not for me).

Regards,

O. Hartmann
Comment 4 Ultima 2015-10-31 14:59:42 UTC
 Added my patch to PR 201340. It cleans up the port and removes about 100 lines of obsolete conditionals, or code that has no effect on the current master/slave ports. Also updated to 355.11.

 The main problem with this patch is the slave ports cannot build with it. There are also a few new files in plist that are not added to your plist.
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2017-01-27 10:20:40 UTC
All mentioned changes are already part of the port's Makefile.