Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2013 21:41:26 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333538 - head/Mk/Uses
Message-ID:  <201311112141.rABLfQG0030190@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Mon Nov 11 21:41:26 2013
New Revision: 333538
URL: http://svnweb.freebsd.org/changeset/ports/333538

Log:
  Copy npapi.mk from the mplayer port and USEify it.
  
  Ports that currently include www/linux-mplayer-plugin/Makefile.npapi should be switched to USES once this is stagified.
  
  Approved by:	bdrewery

Added:
  head/Mk/Uses/npapi.mk
     - copied, changed from r333464, head/www/linux-mplayer-plugin/Makefile.npapi

Copied and modified: head/Mk/Uses/npapi.mk (from r333464, head/www/linux-mplayer-plugin/Makefile.npapi)
==============================================================================
--- head/www/linux-mplayer-plugin/Makefile.npapi	Mon Nov 11 01:14:20 2013	(r333464, copy source)
+++ head/Mk/Uses/npapi.mk	Mon Nov 11 21:41:26 2013	(r333538)
@@ -1,13 +1,12 @@
-#-*- mode: makefile; tab-width: 4; -*
-# ex:ts=4
+# $FreeBSD$
 #
-# New ports collection makefile for:	npapi infrastructure
-# Date created:		27 June 2006
-# Whom:				Andrew Pantyukhin <infofarmer@FreeBSD.org>
+# MAINTAINER:	ports@FreeBSD.org
 #
-# $FreeBSD$
+# Feature:		npapi
+# Usage:		USES=npapi
+# Valid ARGS:		none
 #
-
+# Additional variables that affect npapi behaviour:
 # NPAPI_ID		- Extension id, might be in {12345-...} or dev@org format
 # NPAPI_FILES	- List of files in npapi archive. This is used to produce
 #				  PLIST_FILES. NPAPI_FILES can be generated by npapi-gen, but be
@@ -15,9 +14,6 @@
 #				  need it.
 # NPAPI_DIRS	- List of directories in npapi archive. This is used to produce
 #				  PLIST_DIRS.
-# PORTNAME, PORTVERSION, DISTVERSIONSUFFIX, CATEGORIES, MAINTAINER, COMMENT
-#				- These should all be set manually for port to be functional.
-#				  See ${PORTSDIR}/Mk/bsd.port.mk for details.
 # NPAPI_LIBDIR	- Name of the directory to install plugins in.
 #				  Default: ${PREFIX}/lib/npapi
 # NPAPI_NPAPIDIR
@@ -42,8 +38,6 @@
 #				  last non-regexp one takes precedence, then the last regexp
 #				  one.
 #
-# This Makefile is an alpha-version of the new npapi infrastructure.
-#
 # Npapi's are installed into ${LOCALBASE}/lib/npapi/${NPAPI_ID} by default and
 # links are made to all apps which have the engine (firefox, thunderbird, flock,
 # netscape messenger and navigator at the moment). relink and relink-all targets
@@ -52,6 +46,13 @@
 #
 # npapi ports do not depend on their master applications. You can install an
 # plugin before the app and run relink when the app is present.
+#
+.if !defined(_INCLUDE_USES_NPAPI_MK)
+_INCLUDE_USES_NPAPI_MK=	yes
+
+.if defined(npapi)
+IGNORE=	Incorrect 'USES+= npapi:${npapi_ARGS}' npapi takes no arguments
+.endif
 
 NPAPI_ID?=			${PKGBASE}
 NPAPI_DISTNAME?=	${PORTNAME}
@@ -163,22 +164,22 @@ PLIST_DIRS+=	${NPAPI_DIRS_${dist}:S!^!${
 .endfor
 
 npapi-do-install:
-	@${INSTALL} -d ${_TD_FULL} ${NPAPI_SLDIRS_ALL}
-	@${CP} -p ${NPAPI_FILES:S,^,${NPAPI_WRKSRC}/,} ${_TD_FULL}/
-	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${_TD_FULL}/
-	@${CHMOD} -R a+rX,go-w ${_TD_FULL}/
-	@for _dir in ${NPAPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL}/* $$_dir ${_Q} ; }
-	@${ECHO_CMD} '${INSTALL} -d ${NPAPI_SLDIRS_ALL}' > ${_PI}
-	@${ECHO_CMD} 'for _dir in ${NPAPI_LINKFARMS} ; \
-		{ ${LN} -sf ${NPAPI_FILES:S,^,${_TD_FULL}/,} $$_dir/ ${_Q}; }' >> ${_PI}
-	@${ECHO_CMD} 'for _dir in ${NPAPI_LINKFARMS} ; \
-		{ ${RM} -f ${NPAPI_FILES:S,^,\$_dir/,} ; }' > ${_PD}
-	@${ECHO_CMD} 'rmdir ${NPAPI_DIRS_TRY:S,^,${PREFIX}/,} ${_Q}' >> ${_PD}
+	${INSTALL} -d ${_TD_FULL} ${STAGEDIR}${NPAPI_SLDIRS_ALL}
+	${CP} -p ${NPAPI_FILES:S,^,${NPAPI_WRKSRC}/,} ${_TD_FULL}/
+	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${_TD_FULL}/
+	${CHMOD} -R a+rX,go-w ${_TD_FULL}/
+	for _dir in ${NPAPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL}/* $$_dir ${_Q} ; }
+	${ECHO_CMD} '${INSTALL} -d ${NPAPI_SLDIRS_ALL}' > ${_PI}
+	${ECHO_CMD} 'for _dir in ${NPAPI_LINKFARMS} ; \
+	       { ${LN} -sf ${NPAPI_FILES:S,^,${_TD_FULL}/,} $$_dir/ ${_Q}; }' >> ${_PI}
+	${ECHO_CMD} 'for _dir in ${NPAPI_LINKFARMS} ; \
+	       { ${RM} -f ${NPAPI_FILES:S,^,\$_dir/,} ; }' > ${_PD}
+	${ECHO_CMD} 'rmdir ${NPAPI_DIRS_TRY:S,^,${PREFIX}/,} ${_Q}' >> ${_PD}
 .if ${PKGINSTALL} != ${NPAPI_PKGINSTALL}
-	@${CAT} ${NPAPI_PKGINSTALL} >> ${PKGINSTALL}
+	${CAT} ${NPAPI_PKGINSTALL} >> ${PKGINSTALL}
 .endif
 .if ${PKGDEINSTALL} != ${NPAPI_PKGDEINSTALL}
-	@${CAT} ${NPAPI_PKGDEINSTALL} >> ${PKGDEINSTALL}
+	${CAT} ${NPAPI_PKGDEINSTALL} >> ${PKGDEINSTALL}
 .endif
 
 .if !target(do-install) && !${USE_NPAPI:Membed}
@@ -204,3 +205,5 @@ npapi-plist:	extract
 		${SED} -e "s,^${NPAPI_WRKSRC},%%NPAPI_NPAPIDIR%%," > ${PLIST}
 	@${FIND} -ds ${NPAPI_WRKSRC} -type d -not -name ${DISTNAME} | \
 		${SED} -e "s,^${NPAPI_WRKSRC},@dirrm %%NPAPI_NPAPIDIR%%," >> ${PLIST}
+
+.endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311112141.rABLfQG0030190>