aboutsummaryrefslogtreecommitdiff
path: root/sysutils/lcdproc/Makefile
blob: 15b1d5a4663f9c73b75cb671f655b2db66e22103 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Created by: pat
# $FreeBSD$

PORTNAME=	lcdproc
PORTVERSION=	0.5.6
CATEGORIES=	sysutils
MASTER_SITES=	SF

MAINTAINER=	bsdfan@nurfuerspam.de
COMMENT=	Client/server suite for LCD devices

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

ONLY_FOR_ARCHS=	i386 amd64

USE_AUTOTOOLS=	autoconf automake aclocal
GNU_CONFIGURE=	yes
USE_RC_SUBR=	LCDd lcdproc lcdexec
USES=		pkgconfig

CONFIGURE_ARGS=	--enable-drivers="${LCDPROC_DRIVERS}" \
		--disable-dependency-tracking \
		--disable-libusb-1-0 \
		--disable-doxygen

SUB_FILES=	pkg-message

MAN1=		lcdexec.1 lcdproc.1
MAN5=		lcdproc-config.5
MAN8=		LCDd.8

OPTIONS_DEFINE=	USB FTDI HID FREETYPE PNG SERDISP
USB_DESC=	USB support
FTDI_DESC=	Build drivers using libftdi (requires USB)
HID_DESC=	Build drivers using libhid (requires USB)
SERDISP_DESC=	Build drivers using serdisplib
OPTIONS_DEFAULT=USB FREETYPE
NO_OPTIONS_SORT=yes

# Empty args to aclocal required!
ACLOCAL_ARGS=

LCDPROC_DRIVERS=bayrad \
		CFontz \
		CFontzPacket \
		CwLnx \
		curses \
		ea65 \
		EyeboxOne \
		glcd \
		glk \
		hd44780 \
		icp_a106 \
		lb216 \
		lcdm001 \
		lcterm \
		MD8800 \
		ms6931 \
		mtc_s16209x \
		MtxOrb \
		NoritakeVFD \
		pyramid \
		SureElec \
		sdeclcd \
		sed1330 \
		sed1520 \
		serialPOS \
		serialVFD \
		sli \
		stv5730 \
		t6963 \
		text \
		tyan \
		vlsys_m428

NO_STAGE=	yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MUSB}
CONFIGURE_ARGS+=	--with-libusb=/usr
PLIST_SUB+=		USB=""
LCDPROC_DRIVERS+=IOWarrior \
		picolcd \
		shuttleVFD

. if ${PORT_OPTIONS:MFTDI}
LIB_DEPENDS+=		ftdi:${PORTSDIR}/devel/libftdi
PLIST_SUB+=		FTDI=""
LCDPROC_DRIVERS+=i2500vfd \
		lis \
		ula200
. else
CONFIGURE_ARGS+=	--disable-libftdi
PLIST_SUB+=		FTDI="@comment "
. endif

. if ${PORT_OPTIONS:MHID}
LIB_DEPENDS+=		hid:${PORTSDIR}/devel/libhid
PLIST_SUB+=		HID=""
LCDPROC_DRIVERS+=mdm166a
. else
CONFIGURE_ARGS+=	--disable-libhid
PLIST_SUB+=		HID="@comment "
. endif

.else
CONFIGURE_ARGS+=	--without-libusb --disable-libftdi --disable-libhid
PLIST_SUB+=		USB="@comment " FTDI="@comment " HID="@comment "
.endif

.if ${PORT_OPTIONS:MFREETYPE}
LIB_DEPENDS+=		freetype:${PORTSDIR}/print/freetype2
.else
CONFIGURE_ARGS+=	--disable-freetype
.endif

.if ${PORT_OPTIONS:MPNG}
LIB_DEPENDS+=		png15:${PORTSDIR}/graphics/png
.else
CONFIGURE_ARGS+=	--disable-libpng
.endif

.if ${PORT_OPTIONS:MSERDISP}
LIB_DEPENDS+=		serdisp:${PORTSDIR}/devel/serdisplib
CFLAGS+=		-I${LOCALBASE}/include
LDFLAGS+=		-L${LOCALBASE}/lib
CPPFLAGS+=		-I${LOCALBASE}/include
.endif

post-patch:
	@${REINPLACE_CMD} -e 's!server/drivers!${PREFIX}/lib/lcdproc!' ${WRKSRC}/LCDd.conf

post-install:
	${INSTALL_DATA} ${WRKSRC}/LCDd.conf ${PREFIX}/etc/LCDd.conf.sample
	${INSTALL_DATA} ${WRKSRC}/clients/lcdproc/lcdproc.conf ${PREFIX}/etc/lcdproc.conf.sample
	${INSTALL_DATA} ${WRKSRC}/clients/lcdexec/lcdexec.conf ${PREFIX}/etc/lcdexec.conf.sample
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>