On Tue, Feb 24, 2026 at 3:51 PM Markus Graf <[email protected]> wrote:
>
> I have spend the last week porting this to FreeBSD.  Changes to
> USearch, javacpp and dtlvnative to work on FreeBSD have been
> accepted
> upstream.  Now I want to bring it into ports.

It sounds like you did an impressive work.

>
> Testing
>
> I have build the Makefiles so tests run in do-build: and
> BUILD_DEPENDS
> contain, in one case, junit.
>
> When I but these into TEST_DEPENDS and do-test: "poudriere
> testport"
> will not run them.

That's right, poudriere testport does not do that (yet). But you can make Ports
framework run tests as part of the build by defining WITH_TESTING=yes or
WITH_TESTING_PORTS=your/port1 your/port2
in make.conf. In Poudriere context this config is located in
/usr/local/etc/poudriere.d

> If I make do-install: depend on test poudriere complains about the
> dependencies not being in BUILD_DEPENS, so I could leave the tests
> in
> do-build:.  One of the reasons I want this in ports and not .so
> files
> in jars from maven is that I know the tests have run on FreeBSD.
>
> Should I just leave tests in do-build: and BUILD_DEPENDS?

Put tests under the do-test target and its dependencies under TEST_DEPENDS.
Do not force users to always run tests during the build - currently this is an
optional feature and is guarded behind WITH_TESTING knob.

> Stubs
>
> JavaCPP requires OSGi and slf5j.  I do not want to pull these in
> for a
> library/buildtool.  To get it to work without these dependencies I
> create stubs by ECHO_CMD to Java files.
>
> What is the canonical way of going about this?  An extra
> stubs.jar?

I'm not a Java expert, so not sure what's being talked about here.
But there is a BINARY_ALIAS knob that can be used to create
stub executables, you might find it useful.

> Should I not do stubbing?
>
> Should I put the stubs eg. in the files directory instead?  If so
> what
> is the canonical way of using these from the Makefile?

What's the problem in properly wiring in those dependencies?
Are they heavyweight or not ported yet?

> I have no experience submitting ports so any extra advice is
> welcome

I suspect your patch would be lengthy, so I'd recommend you to
put your ports onto our Phabricator [1] or make a pull request
on GitHub [2]. Get me (@arrowd) on the hook and I will provide
a review.

[1] https://reviews.freebsd.org/
[2] https://github.com/freebsd/freebsd-ports

Reply via email to