cp ${WRKSRC}/dist/firefox/components/browser.xpt \
${WRKSRC}/dist/bin/components/browser.xpt
+# Both libjar and filepicker has nsWildCard.cpp. This leads to a
+# linkage error on Darwin.
+.PHONY: rename-nsWildCard
+pre-configure: rename-nsWildCard
+rename-nsWildCard:
+ cp -f ${WRKSRC}/xpfe/components/filepicker/src/nsWildCard.cpp \
+ ${WRKSRC}/xpfe/components/filepicker/src/nsWildCard_filepicker.cpp
+ ${SED} -e 's!nsWildCard!nsWildCard_filepicker!g' -i .orig \
+ ${WRKSRC}/xpfe/components/filepicker/src/Makefile.in
+
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
PLIST_SUBST+= JEMALLOC=
SCRIPTS_ENV+= JEMALLOC=