summaryrefslogtreecommitdiff
path: root/x11/xloadimage/Makefile
blob: 24478cd45ae5fed3fa0e01c4978c5260748ab9e4 (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
59
60
61
62
63
64
65
66
67
68
69
# New ports collection makefile for:    xloadimage
# Date created:         9 January 1994
# Whom:                 jmz
#
# $FreeBSD$
#

PORTNAME=	xloadimage
PORTVERSION=	4.1.16
PORTREVISION=	9
CATEGORIES=	x11 graphics
MASTER_SITES=	ftp://ftp.x.org/R5contrib/
DISTNAME=	${PORTNAME}.${VERSION}

PATCH_SITES=	${MASTER_SITE_DEBIAN_POOL}
PATCHFILES=	${PORTNAME}_${VERSION}-${REVISION}${PATCHREV}.diff.gz
PATCH_DIST_STRIP=	-p1

MAINTAINER=	ports@FreeBSD.org
COMMENT=	X11 Image Loading Utility

LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg \
		png.6:${PORTSDIR}/graphics/png \
		tiff.4:${PORTSDIR}/graphics/tiff

EXTRA_PATCHES=	${WRKSRC}/debian/patches/*.dpatch

PATCH_STRIP=	-p1
VERSION=	${PORTVERSION:R}
REVISION=	${PORTVERSION:E}
PATCHREV=	.2

USE_XORG=	x11
GNU_CONFIGURE=	yes

LDFLAGS+=	-L${LOCALBASE}/lib
CPPFLAGS+=	-I${LOCALBASE}/include

MAN1=		xloadimage.1 uufilter.1
MLINKS=		xloadimage.1 xsetbg.1 \
		xloadimage.1 xview.1

post-patch:
	@${CHMOD} a+rx ${WRKSRC}/configure
	@${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
		${WRKSRC}/png.c
	@${REINPLACE_CMD} -e 's|TIFFHeader|TIFFHeaderClassic|g' \
		${WRKSRC}/tiff.c
	@cd ${WRKSRC}; ${MV} xloadimage.man xloadimage.man.old; \
		${SED} -e s:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: \
		       -e s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc: \
		< xloadimage.man.old > xloadimage.man

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/xloadimage ${PREFIX}/bin
	@cd ${PREFIX}/bin && \
		${LN} -sf xloadimage xsetbg && \
		${LN} -sf xloadimage xview
	${INSTALL_PROGRAM} ${WRKSRC}/uufilter ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${PREFIX}/man/man1/xloadimage.1
	${INSTALL_MAN} ${WRKSRC}/uufilter.man ${PREFIX}/man/man1/uufilter.1
	${MKDIR} ${PREFIX}/share/examples/xloadimage
	${INSTALL_DATA} ${WRKSRC}/xloadimagerc \
		${PREFIX}/share/examples/xloadimage/xloadimagerc

post-install:
	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.mk>