View | Details | Raw Unified | Return to bug 170236
Collapse All | Expand All

(-)/usr/ports/www/firefox/Makefile.webplugins (-17 / +21 lines)
Lines 14-23 Link Here
14
# Documentation and examples:
14
# Documentation and examples:
15
#
15
#
16
# Makefile.webplugins will create symlinks automatically for each supported
16
# Makefile.webplugins will create symlinks automatically for each supported
17
# applications that supports the webplugins framework.  Also, it will remove
17
# application that supports the webplugins framework.  Also, it will remove
18
# these symlinks when the plug-in port is uninstalled.
18
# these symlinks when the plug-in port is uninstalled.
19
#
19
#
20
# USE_WEBPLUGINS	- Specify a list of application(s) that this plug-in
20
# USE_WEBPLUGINS	- Specify a list of applications that this plug-in
21
# 			  port supports.  For each of these applications, a
21
# 			  port supports.  For each of these applications, a
22
# 			  symlink will be created in
22
# 			  symlink will be created in
23
# 			  lib/browser_plugins/symlinks.  See
23
# 			  lib/browser_plugins/symlinks.  See
Lines 26-38 Link Here
26
#			  Default: USE_WEBPLUGINS=${WEBPLUGINS_APPS_ALL} (all
26
#			  Default: USE_WEBPLUGINS=${WEBPLUGINS_APPS_ALL} (all
27
#			  applications)
27
#			  applications)
28
#
28
#
29
# WEBPLUGINS_NAME	- If your port installs file(s) in ${WEBPLUGINS_DIR},
29
# WEBPLUGINS_NAME	- If your port installs files in ${WEBPLUGINS_DIR},
30
# 			  then you can tweak WEBPLUGINS_NAME to change the
30
# 			  then you can tweak WEBPLUGINS_NAME to change the
31
# 			  name of the directory
31
# 			  name of the directory
32
# 			  (lib/browser_plugins/symlinks/WEBPLUGINS_NAME).
32
# 			  (lib/browser_plugins/symlinks/WEBPLUGINS_NAME).
33
#			  Default: WEBPLUGINS_NAME=${PKGBASE}
33
#			  Default: WEBPLUGINS_NAME=${PKGBASE}
34
#
34
#
35
# WEBPLUGINS_FILES	- The plug-in file(s) that are going to be linked
35
# WEBPLUGINS_FILES	- The plug-in files that are going to be linked
36
#			  in lib/browser_plugins/symlinks/*/. It cannot
36
#			  in lib/browser_plugins/symlinks/*/. It cannot
37
#			  be empty or the port will set IGNORE.
37
#			  be empty or the port will set IGNORE.
38
#
38
#
Lines 40-48 Link Here
40
# 			  found.  Each plug-in file in WEBPLUGINS_FILES
40
# 			  found.  Each plug-in file in WEBPLUGINS_FILES
41
# 			  must be found in WEBPLUGINS_DIR.  If your port
41
# 			  must be found in WEBPLUGINS_DIR.  If your port
42
# 			  does not install in WEBPLUGINS_DIR, but in its own
42
# 			  does not install in WEBPLUGINS_DIR, but in its own
43
# 			  path. You will need to specify that here or
43
# 			  path, you will need to specify that here or
44
# 			  symlinks will be created to non-existent files.
44
# 			  symlinks will be created to non-existent files.
45
#			  Default: WEBPLUGINS_DIR?=${WEBPLUGINS_LIBDIR}/${WEBPLUGINS_NAME}
45
#			  Default: WEBPLUGINS_DIR=${WEBPLUGINS_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGINS_NAME}
46
#
46
#
47
#
47
#
48
# The USE_WEBPLUGINS supports wildcards, native, and linux; so you can do any
48
# The USE_WEBPLUGINS supports wildcards, native, and linux; so you can do any
Lines 53-60 Link Here
53
#	USE_WEBPLUGINS=linux (Supports linux-*)
53
#	USE_WEBPLUGINS=linux (Supports linux-*)
54
#	USE_WEBPLUGINS=opera webkit-gtk2
54
#	USE_WEBPLUGINS=opera webkit-gtk2
55
#
55
#
56
# Example to add in Makefile and pkg-plist if the plug-in file(s) install in
56
# Example to add in Makefile and pkg-plist if the plug-in files are installled
57
# WEBPLUGINS_DIR, and if your port does this manually:
57
# to WEBPLUGINS_DIR, and if your port does this manually:
58
#
58
#
59
#	Makefile:
59
#	Makefile:
60
#	------------------------------------------------------
60
#	------------------------------------------------------
Lines 104-110 Link Here
104
#	------------------------------------------------------
104
#	------------------------------------------------------
105
#	[...]
105
#	[...]
106
# 	USE_WEBPLUGINS=gecko*
106
# 	USE_WEBPLUGINS=gecko*
107
#	WEBPLUGINS_DIR=#{PREFIX}/lib/application
107
#	WEBPLUGINS_DIR=${PREFIX}/lib/application
108
#	WEBPLUGINS_FILES=fooplugin.so fooplugin.xpi
108
#	WEBPLUGINS_FILES=fooplugin.so fooplugin.xpi
109
#
109
#
110
#	.include <bsd.port.pre.mk>
110
#	.include <bsd.port.pre.mk>
Lines 155-161 Link Here
155
155
156
.if !defined(WEBPLUGINS_FILES) || ${WEBPLUGINS_FILES} == "empty" || \
156
.if !defined(WEBPLUGINS_FILES) || ${WEBPLUGINS_FILES} == "empty" || \
157
	${WEBPLUGINS_FILES} == ""
157
	${WEBPLUGINS_FILES} == ""
158
IGNORE=	cannot install: the WEBPLUGINS_FILES is empty, please add plugins file in it and see in www/firefox/Makefile.webplugins for document
158
IGNORE=	can't be installed: WEBPLUGINS_FILES is empty. Please, add plug-in files to it and check www/firefox/Makefile.webplugins for documentation
159
.endif
159
.endif
160
160
161
.for _TEMP_APP__ in ${WEBPLUGINS_APPS_ALL}
161
.for _TEMP_APP__ in ${WEBPLUGINS_APPS_ALL}
Lines 178-205 Link Here
178
WEBPLUGINS_SLDIRS=		${USE_WEBPLUGINS_EXP:S.^.${WEBPLUGINS_SLDIR}/.}
178
WEBPLUGINS_SLDIRS=		${USE_WEBPLUGINS_EXP:S.^.${WEBPLUGINS_SLDIR}/.}
179
WEBPLUGINS_LINKFARMS=	${WEBPLUGINS_APPS} ${WEBPLUGINS_SLDIRS}
179
WEBPLUGINS_LINKFARMS=	${WEBPLUGINS_APPS} ${WEBPLUGINS_SLDIRS}
180
180
181
WEBPLUGINS_LIBDIR=		${PREFIX}/lib/browser_plugins
181
WEBPLUGINS_LIBDIR=		${LOCALBASE}/lib/browser_plugins
182
WEBPLUGINS_SLDIR=		${WEBPLUGINS_LIBDIR}/symlinks
182
WEBPLUGINS_SLDIR=		${WEBPLUGINS_LIBDIR}/symlinks
183
WEBPLUGINS_DIR?=		${WEBPLUGINS_LIBDIR}/${WEBPLUGINS_NAME}
183
WEBPLUGINS_DIR?=		${WEBPLUGINS_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGINS_NAME}
184
184
185
PLIST_SUB+=		WEBPLUGINS_DIR="${WEBPLUGINS_DIR:S,^${PREFIX}/,,}"
185
PLIST_SUB+=		WEBPLUGINS_DIR="${WEBPLUGINS_DIR:S,^${PREFIX}/,,}"
186
186
187
_LNWF=		${WEBPLUGINS_FILES:S,^,${WEBPLUGINS_DIR}/,}
187
_LNWF=		${WEBPLUGINS_FILES:S,^,${WEBPLUGINS_DIR}/,}
188
_Q=	2>/dev/null || true
188
_Q=	2>/dev/null || true
189
_WLD=		${WEBPLUGINS_LIBDIR:S,^${PREFIX},%D,}
189
_WLD=		${WEBPLUGINS_LIBDIR:S,^${LOCALBASE},%D,}
190
_WLF=		${WEBPLUGINS_LINKFARMS:S,${PREFIX},%D,}
190
_WLF=		${WEBPLUGINS_LINKFARMS:S,${LOCALBASE},%D,}
191
_WSD=		${WEBPLUGINS_SLDIR:S,^${PREFIX},%D,}
191
_WSD=		${WEBPLUGINS_SLDIR:S,^${LOCALBASE},%D,}
192
192
193
webplugins-post-install:
193
webplugins-post-install:
194
	@if [ ! -d ${WEBPLUGINS_DIR} ]; then \
194
	@if [ ! -d ${WEBPLUGINS_DIR} ]; then \
195
		${ECHO_CMD}; \
195
		${ECHO_CMD}; \
196
		${ECHO_CMD} "ERROR: The \"${WEBPLUGINS_DIR}\" in WEBPLUGINS_DIR is either a typo or no longer exists. Please make a bug report to ${MAINTAINER} (maintainer)."; \
196
		${ECHO_CMD} "ERROR: \"${WEBPLUGINS_DIR}\" in WEBPLUGINS_DIR is either a typo or no longer exists. Please, file a bug report to ${MAINTAINER} (maintainer)."; \
197
		${ECHO_CMD}; \
197
		${ECHO_CMD}; \
198
	else \
198
	else \
199
		for _f in ${WEBPLUGINS_FILES}; do \
199
		for _f in ${WEBPLUGINS_FILES}; do \
200
			if [ ! -f ${WEBPLUGINS_DIR}/$${_f} ]; then \
200
			if [ ! -f ${WEBPLUGINS_DIR}/$${_f} ]; then \
201
				${ECHO_CMD}; \
201
				${ECHO_CMD}; \
202
				${ECHO_CMD} "ERROR: The \"$${_f}\" in WEBPLUGINS_FILES is either a typo or no longer exists. Please make a bug report to ${MAINTAINER} (maintainer)."; \
202
				${ECHO_CMD} "ERROR: \"$${_f}\" in WEBPLUGINS_FILES is either a typo or no longer exists. Please, file a bug report to ${MAINTAINER} (maintainer)."; \
203
				${ECHO_CMD}; \
203
				${ECHO_CMD}; \
204
			fi; \
204
			fi; \
205
		done; \
205
		done; \
Lines 210-215 Link Here
210
			${LN} -sf $${_l} $${_d}/ ${_Q}; \
210
			${LN} -sf $${_l} $${_d}/ ${_Q}; \
211
		done; \
211
		done; \
212
	done; \
212
	done; \
213
	if [ "${PREFIX}" != "${LOCALBASE}" ]; then \
214
		${ECHO_CMD} "@unexec rmdir ${_WLD} ${_Q}" >> ${TMPPLIST}; \
215
	fi; \
216
	${ECHO_CMD} "@cwd ${LOCALBASE}" >> ${TMPPLIST}; \
213
	for _d in ${_WLF}; do \
217
	for _d in ${_WLF}; do \
214
		${ECHO_CMD} "@exec ${INSTALL} -d $$_d" >> ${TMPPLIST}; \
218
		${ECHO_CMD} "@exec ${INSTALL} -d $$_d" >> ${TMPPLIST}; \
215
		for _l in ${_LNWF}; do \
219
		for _l in ${_LNWF}; do \

Return to bug 170236