Assuming you have a valid installpath in installurl(5)
or PKG_PATH in your environment, simply install the package shipped with the OS:
$ sudo pkg_add trac
Powered by Trac 1.3.4.dev0
By Edgewall Software
Visit the Trac open source project athttps://trac.edgewall.org/
Copyright © 2003-2019 Edgewall Software. All rights reserved.