Possible to install multiple versions of the same package?

If you wanted a lot of faff, download the package and all its dependencies. Manually extract to another location (i.e /opt/myapp) and either:
  1. Work out which environment variables are required to workaround default hard-coded paths to /usr/local (gdb break on getenv helps)
  2. Use sed to substitute /usr/local for /opt/myapp or /opt///app (same length) in every single file
You can find a script that does this (and a little more for Xorg) here.
 
Or if you want to still faff but in a different way, you could build the software (and all dependencies) from the port, changing the LOCALBASE / PREFIX env variables to your custom directory.

Since IMO pkg regressed a little in the move to pkg-ng and bizarrely isn't provided in the base install, it will need to build this too which is a little unreasonably large.
 
Ports that are free from conflict include these:

Code:
% pkg iinfo electron openjdk python3
electron28-28.3.3
openjdk11-11.0.23+9.1
openjdk17-17.0.11+9.1
openjdk22-22+36.1
openjdk8-8.412.08.1
python3-3_4
python310-3.10.14_2
python311-3.11.9_1
python39-3.9.19
%

That's not really an answer, because openjdk11 is not the same as openjdk17 … and so on.

It's possible to have multiple versions of Electron.
 
Thank you for the replies.

What I ended up doing was creating a new port of our library and altering the name of the created libs. Then creating a package to install.
So I ended up with:

Package mylib installing libmylib.so and mylib2 installing libmylib2.so etc.
 
Back
Top