summaryrefslogtreecommitdiff
path: root/x11/lesstif/Makefile.common
blob: af1c04127248a54c97408e3d9b67d3ca4ad712f5 (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
# $NetBSD: Makefile.common,v 1.10 2001/06/30 19:08:21 jlam Exp $

DISTNAME=		lesstif-${LESSTIF_VERSION}
LESSTIF_VERSION=	0.92.32
CATEGORIES=		x11
MASTER_SITES=		ftp://ftp.hungry.com/pub/hungry/lesstif/srcdist/ \
			ftp://ftp.unicamp.br/pub/X11/lesstif/srcdist/ \
			ftp://ftp.kddlabs.co.jp/X11/lesstif/srcdist/ \
			ftp://linux.mathematik.tu-darmstadt.de/pub/linux/mirrors/misc/lesstif/srcdist/ \
			http://gd.tuwien.ac.at/hci/lesstif/srcdist/ \
			http://www.damtp.cam.ac.uk/mirror/ftp.hungry.com/pub/hungry/lesstif/srcdist/

MAINTAINER=		jlam@netbsd.org
HOMEPAGE=		http://www.lesstif.org/

CONFLICTS+=		openmotif-[0-9]*

BUILD_DEPENDS+=		autoconf-2.13:../../devel/autoconf
BUILD_DEPENDS+=		automake-1.4:../../devel/automake

USE_BUILDLINK_ONLY=	# defined
USE_X11BASE=		# defined
USE_GMAKE=		# defined
USE_LIBTOOL=		# defined
LIBTOOL_OVERRIDE=	${WRKSRC}/libtool
LIBTOOL_OVERRIDE+=	${WRKSRC}/Xbae/libtool
LIBTOOL_OVERRIDE+=	${WRKSRC}/Xlt/libtool
LIBTOOL_OVERRIDE+=	${WRKSRC}/test/libtool

GNU_CONFIGURE=		# defined
CONFIGURE_ARGS+=	--enable-production --disable-debug --disable-verbose
CONFIGURE_ARGS+=	--enable-editres --enable-xdnd

# The following forces the build process to use sed as the HTML-to-text
# converter.
#
CONFIGURE_ENV+=		LYNX_CMD=${WRKDIR}/nonexecutable
CONFIGURE_ENV+=		LINKS_CMD=${WRKDIR}/nonexecutable

DISTINFO_FILE=		${.CURDIR}/../../x11/lesstif/distinfo
PATCHDIR=		${.CURDIR}/../../x11/lesstif/patches

post-extract:
	cd ${WRKSRC}/lib/config; ${MV} -f host.def LessTif.def

# Change references to {Core,Object,Shell}.3 to X{Core,Object,Shell}.3 to
# avoid manpage conflicts with other packages.
#
post-patch:
	cd ${WRKSRC}/doc/lessdox/widgets;				\
	for name in Core Object Shell; do				\
		${MV} -f $${name}.3 X$${name}.3;			\
		files=`${GREP} -l "[[:blank:]]$${name} (3)" *.3`;	\
		for file in $${files}; do				\
			${MV} -f $${file} $${file}.presubst;		\
			${SED} -e "s|\([[:blank:]]\)$${name} (3)|\1X$${name} (3)|g" \
				$${file}.presubst > $${file};		\
			${RM} -f $${file}.presubst;			\
		done;							\
		${MV} -f Makefile.am Makefile.am.presubst;		\
		${SED} -e "s|\([[:space:]]\)$${name}.3|\1X$${name}.3|g"	\
			Makefile.am.presubst > Makefile.am;		\
		${RM} -f Makefile.am.presubst;				\
	done

pre-configure:
	${TOUCH} ${WRKDIR}/nonexecutable
	${CHMOD} a-x ${WRKDIR}/nonexecutable
	for dir in . lib/Xbae lib/Xlt test ; do				\
		cd ${WRKSRC}/$${dir};					\
		${LOCALBASE}/bin/libtoolize --force;			\
		${LOCALBASE}/bin/aclocal;				\
		${LOCALBASE}/bin/autoheader; 				\
		${LOCALBASE}/bin/automake -a --foreign -i;		\
		${LOCALBASE}/bin/autoconf;				\
	done