Page MenuHomeFreeBSD

audio/virtual_oss_bluetooth: New port
ClosedPublic

Authored by christos on Mon, Sep 8, 4:01 PM.
Tags
None
Referenced Files
F131314888: D52426.id161724.diff
Mon, Oct 6, 8:33 PM
Unknown Object (File)
Thu, Oct 2, 1:44 PM
Unknown Object (File)
Thu, Oct 2, 8:09 AM
Unknown Object (File)
Wed, Oct 1, 3:46 PM
Unknown Object (File)
Wed, Oct 1, 5:14 AM
Unknown Object (File)
Wed, Oct 1, 4:07 AM
Unknown Object (File)
Tue, Sep 30, 8:51 PM
Unknown Object (File)
Tue, Sep 30, 3:57 PM
Subscribers
None

Details

Summary

src commit FILLME ("virtual_oss: Port to base") includes the bluetooth
backend, however the backend also has a HAVE_LIBAV ifdef, which, if set,
enables libav support, which depends on multimedia/gstreamer1-libav.
While we could build the non-libav parts from base and the libav ones as
a port, we instead build the whole backend as a port to avoid
unnecessary complexity. The reason for that being that building from
base would install the backend in /usr/lib/virtual_oss/voss_bt.so, and
the port would install _another_ voss_bt.so, but this time in
/usr/local/lib/virtual_oss/voss_bt.so, which would create conflicts.

The port simply builds the files from src, which is not ideal, as this
means that the src repo needs to be present in the system in order for
the port to build, but this way we can avoid version mismatches and
ifdef hell as the project progresses.

Note that this is an extension for the base system virtual_oss, and not
audio/virtual_oss.

Sponsored by: The FreeBSD Foundation

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66901
Build 63784: arc lint + arc unit

Event Timeline

christos created this revision.

Only issue is that it installs in /usr/local/lib/virtual_oss, whereas we (might) want it to install under /usr/lib/virtual_oss, which is where the bluetooth backend is installed when built from /usr/src.

christos retitled this revision from virtual_oss_libav: New port to audio/virtual_oss_libav: New port.Mon, Sep 8, 4:15 PM

Only issue is that it installs in /usr/local/lib/virtual_oss, whereas we (might) want it to install under /usr/lib/virtual_oss, which is where the bluetooth backend is installed when built from /usr/src.

This is correct from the Ports side of things - we try to make all ports to install files under ${LOCALBASE}. The exception is maybe kmods, which go into /boot/ and Linuxulator ports, which use /compat/linux/ as PREFIX.

Is this a problem to have voss_bt.so installed under ${LOCALBASE}?

audio/virtual_oss_libav/Makefile
22 ↗(On Diff #161722)

I think this can be made a part of MAKE_ENV too?

Only issue is that it installs in /usr/local/lib/virtual_oss, whereas we (might) want it to install under /usr/lib/virtual_oss, which is where the bluetooth backend is installed when built from /usr/src.

This is correct from the Ports side of things - we try to make all ports to install files under ${LOCALBASE}. The exception is maybe kmods, which go into /boot/ and Linuxulator ports, which use /compat/linux/ as PREFIX.

Is this a problem to have voss_bt.so installed under ${LOCALBASE}?

It would be a problem because the base install will install /usr/lib/virtual_oss/voss_bt.so, and with the port we'll also have /usr/local/lib/virtual_oss/voss_bt.so. I do not really like the hackiness, but I think it might be better to just install it in /usr/lib/virtual_oss/voss_bt.so to not complicate things. Is this done by just setting PREFIX=/usr?

Set HAVE_LIBAV in MAKE_ENV.

Re-sort audio/Makefile after renaming in D52365.

Packages can't overwrite files belonging to other packages. If I understand it correctly, using PREFIX=/usr would create a conflict.

Maybe the correct solution here would be first try loading the library from LOCALBASE and then fall back to /usr/lib?

Packages can't overwrite files belonging to other packages. If I understand it correctly, using PREFIX=/usr would create a conflict.

Maybe the correct solution here would be first try loading the library from LOCALBASE and then fall back to /usr/lib?

I guess an alternative could be to just build the whole bluetooth backend as a port in the first place, and have HAVE_LIBAV as an option.
@fuz What do you think about this?

christos retitled this revision from audio/virtual_oss_libav: New port to audio/virtual_oss_bluetooth: New port.Mon, Sep 8, 5:39 PM
christos edited the summary of this revision. (Show Details)

Scratch that. Build the whole thing as a port, it is significantly simpler and
cleaner this way.

audio/virtual_oss_bluetooth/Makefile
26

Actually, no need for += there.

audio/virtual_oss_bluetooth/Makefile
26

That applies to the other ports as well?

audio/virtual_oss_bluetooth/Makefile
26

Yes. += is only needed for master/slave ports, that is if this Makefile gets .included from some other Makefile.

christos marked an inline comment as done.

Address Gleb's comment. Keep += in LIBAV_MAKE_ENV though.

Keep += in LIBAV_MAKE_ENV though.

Out of curiosity, why? It is just a Makefile variable and it isn't set anywhere before, so you're appending to an undefined var.

Remove += from LIBAV_MAKE_ENV as well. I thought this inherits MAKE_ENV
hence why the +=. My bad.

This revision is now accepted and ready to land.Tue, Sep 30, 3:35 PM
This revision was automatically updated to reflect the committed changes.