dev47apps / droidcam-linux-client

GNU/Linux/nix client for DroidCam
http://www.dev47apps.com
GNU General Public License v2.0
1.08k stars 174 forks source link

Initial support for FreeBSD #263

Closed LS-FCEFyN closed 11 months ago

LS-FCEFyN commented 11 months ago

I did some modifications to some files, namely:

connection.c decoder.c settings.c usb.c

For those files above I added the necessary includes

All the installation and uninstallation scripts had their first line modified from

!/bin/bash

to

!/usr/bin/env bash

Since in FreeBSD bash is third-party software and thus is located at /usr/local/bin/bash not /bin/bash

I reckon that using:

!/usr/bin/env bash

Might not be the best way to achieve "portability" due to some problems see this, but those problems did not arise in my machine, neither on Arch, Debian, FreeBSD nor NomadBSD (a FreeBSD "distro"). If problems do arise in any other distros the line could be modified to be:

!/usr/bin/env -S bash

Or FreeBSD users could just make a symbolic link and keep the original line from your install scripts.

Naturally the Makefile was also modified.

The Readme.md was also modified to have instructions on how to build the package on FreeBSD.

LS-FCEFyN commented 11 months ago

It's worth noting that at this point droidcam's own v4l2loopback-dc is not implemented.

aramg commented 11 months ago

Yeah this looks good, and will also close #189.

#!/usr/bin/env bash is fine, thats a common pattern

v4l2loopback-dc being missing is fine, its an old fork and is likely to be dropped eventually.

Just some whitespace nitpicks

  1. I see 2 trailing whitespaces EOL, in Makefile and the README, could we clear those up
  2. Could we align the variable assignments in the FreeBSD ifeq scope so the = signs are in the same column
  3. Could we add a newline after each new ## heading in the README
LS-FCEFyN commented 11 months ago

Sorry it took me this long to get back at you, everything should be in order now.

aramg commented 11 months ago

Thanks, the changes have been added to the main repo