Add FreeBSD support #42

wants to merge 5 commits into


None yet

2 participants

gonzoua commented Sep 28, 2016

evdev support has been added to FreeBSD recently, so tslib now can be used there. This pull requests contains following changes:

  • Add fbutils support for FreeBSD framebuffer
  • Add autoconf conditional to switch between fbutils implementations
  • Remove explicit -ldl for tsllib, it's handled by libtool/autoconf
  • Make path to input.h header depend on target OS
  • Access c_line field of struct termios only on Linux
  • Remove unused includes from several files
  • Make printing struct timeval cross-platform

input-raw plugin and executables were tested on both Linux and FreeBSD and found no regression.
Unfortunately I don't have hardware to test galaxy-raw and touchkit-raw plugins.

merge commented Nov 18, 2016

Hi @gonzoua There's no need to have the hardware for the hardware-plugins. I can't test it, but this is great!
I want to schedule this for tslib 1.3. I plan to do a 1.3-rc release not too long after 1.2 and this would be a good addition there.

@merge merge self-assigned this Nov 18, 2016
merge commented Nov 21, 2016

which of your branches is appropriate to merge for freebsd support? freebsd or freebsd-support-pr?

gonzoua commented Nov 21, 2016

Hi @kergoth

Thanks for merging this pull request. freebsd-support-pr is the branch with cleaned-up version.

gonzoua commented Nov 21, 2016

I resolved conflict with upstream master so the branch now can be merged automatically

gonzoua added some commits Sep 27, 2016
@gonzoua gonzoua Fix printing struct timeval on FreeBSD
Do not use format that assumes the type of tv_sec and tv_usec,
instead use %jd and cast those fields to intmax_t
@gonzoua gonzoua Remove unused headers 7e7695b
@gonzoua gonzoua Fix path to input.h on FreeBSD 86a2eb5
@gonzoua gonzoua Set c_line only on Linux 98d70b0
@gonzoua gonzoua Add fbutils support for FreeBSD
- Rename fbutils.c to fbutils-linux.c to indicate that it's
    OS-specific code
- Add fbutils-freebsd.c that implements fbutils API for
    FreeBSD's framebuffer
- Add autoconf conditional to compile either of fbutils
    implementation based on target OS
merge commented Nov 25, 2016

sorry, your pull request doesn't apply anymore. I know you put work into it to update it. I'm no so sure about FreeBSD support right now. I think we got more Linux-dependent with my latest additions, and your fbutils seems like quite some code duplication (without going into details, I might be wrong too).

In general, FreeBSD would be nice to have if it'd be a little "cheaper". But I have the feeling it's more work now.

gonzoua commented Nov 25, 2016

Most of the newly introduced conflicts/incompatibilities are easy to solve. I'll look into it and I will try to reduce code duplication in fbutils


merge commented Dec 23, 2016

i took one more of your changes and added some more include paths.

It seems that there's mainly fbutils to take care of, if you want freebsd.

merge commented Feb 22, 2017

I applied your fbutils-bsd addition anyways, in a slightly updated way. I hope that's fine with you. Thanks again!

@merge merge closed this Feb 22, 2017
gonzoua commented Feb 22, 2017

Thanks a lot Martin. I apologize for dropping the ball on this one. I will check what's there left to merge/fix, and open new pull request when code is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment