Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.3/glfw: add openbsd support #336

Merged
merged 5 commits into from
Oct 23, 2021
Merged

v3.3/glfw: add openbsd support #336

merged 5 commits into from
Oct 23, 2021

Conversation

ilylily
Copy link
Contributor

@ilylily ilylily commented Oct 21, 2021

partially fixes #288

simple adaptations to add openbsd support. this makes fyne.io/fyne/v2/cmd/fyne_demo/ run on my OpenBSD-current machine. i don't have a netbsd system available, but hopefully this makes it clear which 8-ish changes a netbsd user would need to make to support that too

partially fixes #288
change freebsd specific code to be more general
add openbsd specific build tags where necessary
@hajimehoshi
Copy link
Member

Nice! This looks good to me but I'd like to defer this to other reviewers.

Can we support NetBSD in the same way?

@ilylily
Copy link
Contributor Author

ilylily commented Oct 22, 2021

netbsd support seems blocked by missing support in go-gl/glow and godbus/dbus. but yes, a very similar set of changes will work for netbsd once those support it

@hajimehoshi
Copy link
Member

If there is no objection, I'll merge this.

Copy link
Member

@dmitshur dmitshur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. One minor comment/question.

v3.3/glfw/build.go Outdated Show resolved Hide resolved
since pkg-config gets CFLAGS for glfw3, we don't need to explicitly
specify the openbsd x11 include path
v3.3/glfw/build.go Outdated Show resolved Hide resolved
@hajimehoshi
Copy link
Member

I realized that pkg-config for glfw3 seems weird (#313). We don't have to need this for *BSD. I'd like to wait for #313 solved.

Copy link
Collaborator

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work in this. I'm very interested in giving it a go running Fyne on OpenBSD :)

Can we please get the install instructions in the README updated for OpenBSD (possibly NetBSD also if that starts working)? I realise that FreeBSD isn't there but that might be outside the work of this PR, I guess?

@hajimehoshi
Copy link
Member

@ilylily would it be possible to have this change with pkg-config not for glfw3 but for necessary dependencies? Depending external glfw3 seems weird. (Then we have to address this for FreeBSD separately)

simply include standard X11 paths so that the included glfw source
compiles on openbsd
removes the need to explicitly specify standard X11 directories
@hajimehoshi
Copy link
Member

Thanks for the fix. I left a comment.

sort bsd pkg-config lines for readability
Copy link
Member

@hajimehoshi hajimehoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hajimehoshi hajimehoshi merged commit 6ad59d9 into go-gl:master Oct 23, 2021
@hajimehoshi
Copy link
Member

Note that we should address #313 later. I hope we can use the same way as OpenBSD.

@Jacalz
Copy link
Collaborator

Jacalz commented Oct 23, 2021

As I said earlier, I also think we should update the README with installation instructions for OpenBSD.

@hajimehoshi
Copy link
Member

As I said earlier, I also think we should update the README with installation instructions for OpenBSD.

Oh sorry I missed that.

@ilylily Could you create a PR to update README? Thanks,

hajimehoshi pushed a commit that referenced this pull request Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can go-gl/glfw support other UNIX systems like NetBSD?
4 participants