-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor patches for easier porting and packaging #895
base: master
Are you sure you want to change the base?
Conversation
With GNU Make (which FreeBSD's bedtools recipe uses), using either Is there a reason why FreeBSD's recipe cannot use one of these two forms? (Presumably there is a default rule in bsd.port.mk that you could override by providing your own If FreeBSD's recipe explicitly contained the |
I already have these static patches embedded in the FreeBSD port and pkgsrc package, but moving them upstream potentially makes all package recipes cleaner. Do you have concerns about using ?= or /bin/sh or PREFIX instead of prefix? |
Just added one more patch to silence unused result warnings for sam_hrd_write(). |
BTW, I won't be offended if you don't use all of my patches. If you're worried about breaking builds from other users, then pick out what you're comfortable with and sleep on the others. It's not a big deal to keep a few patches in the FreeBSD port and/or pkgsrc package, but we routinely try to push all the portable ones upstream. Otherwise the patch set grows out of control. |
Obviously any decision is up to Aaron, but IMHO the downsides include: changing lowercase Your port can avoid needing these patches by setting MAKE_ARGS = CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" prefix="${PREFIX}" etc… There is plenty of precedent for this in other FreeBSD ports. Have you considered using |
If others have established scripts sending in lower-case env variables or make args, then I would scrap the PREFIX patch. It's very rare in my experience to see lower-case make or env variables, though. I'm not aware of any downside to using ?= instead of = in cases like this. Using MAKE_ARGS as you suggested is essentially just another kind of patch. The goal is to minimize any extra code in the package "recipe" if the upstream sources and build system can be safely modified to make it unnecessary. Also, the down side of MAKE_ARGS or sed commands vs a static patch is that they can fail silently during upgrades, leading to regressions that have to be hunted down. Static patches break when the target file changes, immediately notifying the package maintainer that it needs to be reexamined. Regarding divergence of htslib, yeah I can see that as a valid concern. Better yet, is there a reason to continue bundling it? It's currently two point releases behind and it would be nice if bedtools users could benefit from automatic htslib upgrades independent of bedtools releases. |
In fact the convention established by autoconf for directory variables like Using (Seriously: grep your ports tree for |
Here are a few minor patches to ease porting to other platforms and package managers.
Many package managers provide standard variables like CXX, CXXFLAGS, PREFIX, etc., so using ?= in the Makefiles makes patches unnecessary.
Also, /bin/sh on FreeBSD (based on Almquist shell) works fine with the existing code.
Thanks for the awesome tool!