Created attachment 183185 [details] Move SM 1.7 headers When installed Spidermonkey 1.7's headers will be picked up by software using other spidermonkey versions. This is because the build will first look in ${LOCALBASE}/include before looking into the spidermonkey specific subdir for the headers. In my case sysutils/polkit, see the linked bugs. To fix this, move the headers to there own subdir in ${LOCALBASE}/include, and fix the users of spidermonkey 1.7 to look into this dir.
Grab
Created attachment 183235 [details] [patch] alternate patch - put js cflags first (workaround for polkit only) Here's a patch I had. It's a simple patch - puts the javascript cflags before the other flags.
I prefer my spidermonkey17 patch. As it fixes the root of the problem, this way not only is polkit fixed. Other software that uses spidermonkey headers won't potential have the same issue.
Comment on attachment 183235 [details] [patch] alternate patch - put js cflags first (workaround for polkit only) (In reply to Koop Mast from comment #3) Agreed your patch is a better long term solution than my quick fix which just gets polkit building.
A commit references this bug: Author: kwm Date: Sun Jul 30 14:34:28 UTC 2017 New revision: 446936 URL: https://svnweb.freebsd.org/changeset/ports/446936 Log: Move spidermonkey17's headers out of LOCALBASE and in there own subdir. [1] This fixes build issues with other spidermonkey using ports when SM 1.7 is installed, due to SM 1.7's headers being found first. [2] Update SM 1.7 users to take this change into account. PR: 219761 [1], 214724 [2], 202246 [2] Approved by: maintainer timeout (nearly 2 months) Changes: head/lang/p5-JavaScript-SpiderMonkey/Makefile head/lang/p5-JavaScript-SpiderMonkey/files/patch-Makefile.PL head/lang/spidermonkey17/Makefile head/net/mediatomb/Makefile head/www/elinks/Makefile