summaryrefslogtreecommitdiff
path: root/x11/openmotif/Makefile
blob: ba4d11c071c681c63666f31ef99ea858bb85e3ac (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
# $NetBSD: Makefile,v 1.6 2001/02/17 17:06:37 wiz Exp $
# FreeBSD: /c/ncvs/ports/x11-toolkits/open-motif/Makefile,v 1.18 2000/10/09 01:40:02 asami Exp 
# OpenBSD: Makefile,v 1.5 2000/10/23 16:08:12 espie Exp 

PKGVER=		2.1.30
DISTNAME=	openmotif${PKGVER}
PKGNAME=	openmotif-${PKGVER}
CATEGORIES=	x11
MASTER_SITES=	ftp://openmotif.opengroup.org/pub/openmotif/R${PKGVER}/tars/ \
		ftp://ftp.opengroup.org/pub/openmotif/R${PKGVER}/tars/ \
		ftp://ftp.kddlabs.co.jp/X11/openmotif/R${PKGVER}/tars/

PATCH_SITES=	ftp://openmotif.opengroup.org/pub/openmotif/R${PKGVER}/fixes/ \
		ftp://ftp.opengroup.org/pub/openmotif/R${PKGVER}/fixes/ \
		ftp://ftp.kddlabs.co.jp/X11/openmotif/R${PKGVER}/fixes/
PATCHFILES=	patch1 patch2 patch3 patch4 patch5
PATCH_DIST_STRIP=-p1

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.opengroup.org/openmotif/
COMMENT=	Open Motif

BROKEN=		"package overwrites and then deletes base system files (makedepend, host.def, etc)"

CONFLICTS+=	lesstif-*
DIST_SUBDIR=	openmotif
WRKSRC=		${WRKDIR}/motif
USE_X11BASE=	yes
ALL_TARGET=	World

post-patch:
# fix sections
	cd ${WRKSRC}/doc/man; for n in man1/*.1 man3/*.3 man4/*.4 man5/*.5 ; \
		do ${SED} 's/user cmd/1/g; s/library call/3/g; s/special file/5/g; s/file formats/5/g;' $$n >$$n.new && ${MV} -f $$n.new $$n; done
	${CP} -f ${WRKSRC}/doc/man/man4/mwmrc.4 ${WRKSRC}/doc/man/man5/mwmrc.5
	cd ${WRKSRC}/config/cf && \
	    for n in site.def Motif.tmpl host.def ; \
		do ${SED} -e 's|%%PREFIX%%|${PREFIX}|g; s|%%X11BASE%%|${X11BASE}|g' $$n > $$n.new && ${MV} -f $$n.new $$n ; \
	    done

do-configure:
	${CP} -f `ls ${X11BASE}/lib/X11/config/* | ${GREP} -v '\(Motif\|cde\|\/site.def\|host.def\)'` ${WRKDIR}/motif/config/cf
	${MKDIR} ${WRKSRC}/imports/x11
	cd ${WRKSRC}/imports/x11 && for i in bin include lib ; do \
	    if [ -f $$i ] ; then ${RM} $$i; fi; \
	    ${LN} -s ${X11BASE}/$$i $$i; \
	done

# tblize the manpages.
post-build:
	for i in man1 man3 man5 ; do cd ${WRKSRC}/doc/man/$$i; \
		for m in *.[135]; do tbl $$m > $$m.new && ${MV} -f $$m.new $$m; done; \
	done

# Install the manpages.
post-install:
	for i in man1 man3 man5 ; do cd ${WRKSRC}/doc/man/$$i; \
	    ${MKDIR} ${PREFIX}/man/$$i; \
	    for m in *.[135]; do ${INSTALL_MAN} $$m ${PREFIX}/man/$$i; done; \
	done

.include <../../mk/bsd.pkg.mk>