aboutsummaryrefslogtreecommitdiff
path: root/www/nspluginwrapper-devel/Makefile
blob: 5d5fdf636f3fb857c19e6d047b1da63b29ba6267 (plain) (blame)
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
# New ports collection makefile for: nspluginwrapper
# Date created:         30 March 2007
# Whom:                 Dave Grochowski
#
# $FreeBSD$
#

PORTNAME=	nspluginwrapper
PORTVERSION=	0.9.91.3
CATEGORIES=	www linux emulators
MASTER_SITES=	http://gwenole.beauchesne.info/projects/nspluginwrapper/files/
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${RPMFILE}
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	malus.x@gmail.com
COMMENT=	A compatibility plugin for Netscape 4 (NPAPI) plugins

EXTRACT_DEPENDS=	rpm2cpio:${PORTSDIR}/archivers/rpm

RPMFILE=	${PORTNAME}-i386-${PORTVERSION}-1.x86_64.rpm

ONLY_FOR_ARCHS=	i386 amd64

USE_BZIP2=	yes
USE_LINUX=	yes
USE_XLIB=	yes
USE_GNOME=	glib20 gtk20 pkgconfig

CFLAGS+=	-std=c99

USE_LDCONFIG=	yes
USE_GMAKE=	yes
HAS_CONFIGURE=	yes

CONFIGURE_ARGS=	--prefix=${PREFIX} --target-os=linux --target-cpu=i386 \
		--x11=${X11BASE} --with-cc=${CC} --with-cxx=${CXX}

LIBDIR=		${PREFIX}/lib/${PORTNAME}

PLIST_SUB=	LIBDIR="${LIBDIR:C/^${PREFIX}\///}" ARCH="${ARCH}"

# We must manually extract, modify, and install the Linux version of npviewer.
post-extract:
	cd ${WRKSRC} &&	rpm2cpio ${DISTDIR}/${RPMFILE} | ${CPIO} -id
	${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
		${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer
	${RM} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer.bak

post-patch:
	@${REINPLACE_CMD} -e 's,x86_64,amd64,g' ${WRKSRC}/configure

post-install:
	${MKDIR} ${LIBDIR}/i386/linux
	${INSTALL_SCRIPT} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/* \
	     ${LIBDIR}/i386/linux/
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>