Best practice to install a locally built newer version of an application than exists in ports tree?

I installed an application "hledger" as found in /usr/ports/finance/hs-hledger. The version available in ports tree is 1.25.

I wanted some additional functionality so I downloaded the source code ( haskell ) and built executable locally using the haskell cabal build tool. This locally built executable works fine.

How should I now replace the default ports tree pkg?

I did
Code:
 pkg delete hledger
to start. What next?

I think just do:
Code:
 pkg add /path/to/my/hledger

Other options:
Copy executable to /usr/local/bin/ ?
Symlink executable to /usr/local/bin/ ?
Somehow employ poudriere in the process?
 
Update the port so it builds the new version. Then, if it works correctly, create a PR and add your patches. Then everyone befits.

 
I use poudriere with an overlay dir. Here's a good example: https://github.com/patmaddox/home/t...c44c4db77b15/ports/ports-mgmt/poudriere-devel

There's a bug in poudriere when building images. Someone fixed it in a PR. I have no idea when / if it will be officially released. So, I copied the port definition and updated the GH_ACCOUNT and GH_TAGNAME to point to the commit that has the fix that I need.

Now when I poudriere bulk -o local it builds my version of poudriere rather than the official ports version.
 
I install such things to /opt/cvsversions/{lib|bin} and then adjust $PATH, $LD_LIBRARY_PATH, $PKGCONFIG etc. when I want to use those versions.
Or you can use softlinks if there is no conflict. When you delete /opt/XXX... there are only hanging softlinks in /usr/local...
 
Back
Top