summaryrefslogtreecommitdiff
path: root/multimedia/mplayer-plugin-firefox/Makefile.common
blob: add1dd37f07263fb131be915c1bf23f2987b0a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# $NetBSD: Makefile.common,v 1.12 2006/03/04 21:30:15 jlam Exp $
#

DISTNAME=		mplayerplug-in-2.70
PKGNAME=		mplayer-plugin-${BROWSER}-2.70
CATEGORIES=		multimedia
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=mplayerplug-in/}

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://mplayerplug-in.sourceforge.net/
COMMENT=		Mplayer plug-in for ${BROWSER}

DEPENDS+=		mplayer>=0.92:../../multimedia/mplayer

WRKSRC=			${WRKDIR}/mplayerplug-in
GNU_CONFIGURE=		yes
USE_TOOLS+=		gmake pkg-config
USE_LANGUAGES+=		c++

FILESDIR=	${.CURDIR}/../../multimedia/mplayer-plugin-firefox/files
PATCHDIR=	${.CURDIR}/../../multimedia/mplayer-plugin-firefox/patches
DISTINFO_FILE=	${.CURDIR}/../../multimedia/mplayer-plugin-firefox/distinfo
PLIST_SRC=	${.CURDIR}/../../multimedia/mplayer-plugin-firefox/PLIST
DESCR_SRC=	${.CURDIR}/../../multimedia/mplayer-plugin-firefox/DESCR

PLIST_SUBST+=	BROWSER=${BROWSER:Q}

post-extract:
.for f in nspr xpcom plugin
	@${SED} \
		-e "s|@PREFIX@|${PREFIX}|g"			\
		-e "s|@LIBDIR@|${PREFIX}/lib/${BROWSER}|g"	\
		-e "s|@INCDIR@|${PREFIX}/include/${BROWSER}|g"	\
		-e "s|@X11BASELIB@|${X11BASE}/lib|g"		\
		${FILESDIR}/mozilla-${f}.pc.in > ${WRKSRC}/mozilla-${f}.pc
.endfor

post-wrapper:
	@${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig
	@${CP} ${WRKSRC}/*.pc ${BUILDLINK_DIR}/lib/pkgconfig

SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	post-patch
SUBST_FILES.conf=	Source/plugin-setup.cpp
SUBST_SED.conf=		-e "s|/etc/|${PKG_SYSCONFDIR}/|g"
SUBST_MESSAGE.conf=	"Fixing harcoded paths."

EGDIR=		${PREFIX}/share/examples/mplayer-plugin-${BROWSER}
CONF_FILES=	# empty
.for f in conf types
CONF_FILES+=	${EGDIR}/mplayerplug-in.${f} \
		${PKG_SYSCONFDIR}/mplayerplug-in.${f}
.endfor

do-install:
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/mplayerplug-in.conf ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/mplayerplug-in.types ${EGDIR}
.if !exists(${PREFIX}/lib/${BROWSER}/plugins)
	${INSTALL_DATA_DIR} ${PREFIX}/lib/${BROWSER}/plugins
.endif
	${INSTALL_LIB} ${WRKSRC}/mplayerplug-in.so	\
		${PREFIX}/lib/${BROWSER}/plugins
	${INSTALL_DATA} ${WRKSRC}/mplayerplug-in.xpt	\
		${PREFIX}/lib/${BROWSER}/plugins

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/x11.buildlink3.mk"