# Installing diff file for lwgl3



## jardows (Jul 21, 2022)

I am attempting to install lwgl3 as defined in https://reviews.freebsd.org/D31119. It seems I am doing something wrong in applying the .diff file to the port directory. I'm trying to follow the instructions from https://docs.freebsd.org/en/books/porters-handbook/slow-porting/#slow-patch, but am really confused on how to do this. I am very unfamiliar with using patch and .diff files, so a basic list of instructions would be helpful.


----------



## jbo (Jul 21, 2022)

General instructions to apply a patch/diff to your ports tree (not specific to games/lwgl3):

Obtain the raw patch file. In case of the phabricator review you linked, hit the "Download Raw Diff" button/option on the right side.
Navigate to the top-level of your ports tree (e.g. /usr/ports).
Create a text file with the contents of the raw patch file.
Run `git apply <patch_file>`
Profit
After applying the patch as per the steps outline above, you'd proceed with compiling & installing the port as usual.

Depending on your needs (and assuming your ports tree is a git repository), you'd want to create a new branch and apply the patch there. Optionally, commit the changes after applying the patch so you can "keep working" on your ongoing efforts. But based on your post I assume that this is maybe a step too far (for now - everybody has to learn).

If you encounter any issues, errors or other problems, please provide more specific information regarding what you did and the error messages or problem(s) you're encountering.

When it comes to games/lwgl3 specific stuff (which is most likely not the case based on your initial post) I'll gladly refer you to Alexander88207.


----------



## Jose (Jul 21, 2022)

That port is for a LWJGL3 fork that appears to have gone stale. The changes in that fork are extensive, and some are questionable. The submitter claims "The lwjgl devs don’t want to support targets that they do not have CI for, although many people have offered CI runners for then running FreeBSD they still seem to have no interest." Bit I found an open pull request that has been updated by the lead developer for the LWJGL project. To be fair, those updates happened some months after review D31119 was opened.

I took a crack at compiling that incomplete pull request, and discovered it is quite incomplete. Just one of the things that is missing is a 700-line Kotlin file. I don't see how that project can claim to be "lightweight" anymore.


----------

