summaryrefslogtreecommitdiffstats
path: root/japanese/mozilla-jlp/Makefile
blob: ba8974d2fbe6bd9c0946cc693467077e932b372c (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# New ports collection makefile for:	ja-mozilla-jlp
# Date created:		02 Jul 2000
# Whom:			Yoichi ASAI <yatt@luna2.org>
#
# $FreeBSD$
#

PORTNAME=	mozilla
PORTVERSION=	1.3.1
PORTREVISION?=	1
PORTEPOCH=	1
CATEGORIES=	japanese www
MASTER_SITES=	http://plaza25.mbn.or.jp/~snip/jlp/
#MASTER_SITE_SUBDIR=	jlpmoz
PKGNAMESUFFIX=	-jlp
DISTNAME=	${PORTNAME}${PORTVERSION}-jajppack-tm0.2.1
EXTRACT_SUFX=	.xpi

MAINTAINER=	yatt@luna2.org
COMMENT=	Mozilla Japanese Language Pack (JLP)

BUILD_DEPENDS=	${X11BASE}/lib/${MOZILLA}/regxpcom:${PORTSDIR}/www/${MOZILLA}
RUN_DEPENDS=	${MOZILLA}:${PORTSDIR}/www/${MOZILLA} \
		${PKG_DBDIR}/ja-alias-fonts-1.0:${PORTSDIR}/japanese/alias-fonts

WRKSRC=		${WRKDIR}/bin

USE_X_PREFIX=	yes
USE_ZIP=	yes
EXTRACT_BEFORE_ARGS=	-qo

MOZILLA=	mozilla
PLIST_SUB=	MOZILLA=${MOZILLA}

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 450002
LOCALENAME=	ja_JP.eucJP
.elif ${OSVERSION} >= 400020
LOCALENAME=	ja_JP.EUC
.else
LOCALENAME=	ja_JP.EUC
LIBXPG4=	LD_PRELOAD=/usr/lib/libxpg4.so.2; export LD_PRELOAD
.endif

post-extract:
	${MKDIR} ${WRKSRC}/defaults/pref
	${CP} ${FILESDIR}/unix.js ${WRKSRC}/defaults/pref

do-build:
	${SED} -e "s^%%PREFIX%%^${PREFIX}^g" \
	       -e "s^%%LOCALBASE%%^${LOCALBASE}^g" \
	       -e "s^%%LOCALENAME%%^${LOCALENAME}^g" \
	       -e "s^%%LIBXPG4%%^${LIBXPG4}^g" \
	       -e "s^%%MOZILLA%%^${MOZILLA}^g" \
	${FILESDIR}/mozilla.sh > ${WRKDIR}/${MOZILLA}

do-install:
	(cd ${PREFIX}/lib/${MOZILLA}/chrome; \
	${MV} -f chrome.rdf chrome.rdf.orig; \
	${MV} -f installed-chrome.txt installed-chrome.txt.orig)
	(cd ${PREFIX}/lib/${MOZILLA}/defaults/pref; \
	${MV} -f unix.js unix.js.orig)
	(cd ${PREFIX}/lib/${MOZILLA}/components; \
	${MV} -f xpti.dat ../xpti.dat.orig)
	${MV} -f ${PREFIX}/bin/${MOZILLA} ${PREFIX}/bin/${MOZILLA}.orig
	${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA} ${PREFIX}/bin
	(cd ${WRKDIR}/sp; ${TAR} -cf - *) | \
	${TAR} -xf - -C ${PREFIX}/lib/${MOZILLA}/searchplugins
	(cd ${WRKDIR}/sp_nomac; ${TAR} -cf - *) | \
	${TAR} -xf - -C ${PREFIX}/lib/${MOZILLA}/searchplugins
	(cd ${WRKSRC}; ${TAR} -cf - chrome defaults) | \
	${TAR} -xf - -C ${PREFIX}/lib/${MOZILLA}
	(cd ${PREFIX}/lib/${MOZILLA}/chrome; \
	${CP} installed-chrome.txt.orig installed-chrome.txt; \
	${CAT} ${FILESDIR}/installed-chrome.txt >> installed-chrome.txt)
	(cd ${PREFIX}/lib/${MOZILLA}; \
	${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \
	${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regchrome)
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud