aboutsummaryrefslogtreecommitdiff
path: root/comms/hamlib/Makefile
blob: ad32795a5665cffdefbea8a797092b57b00c8d68 (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
# New ports collection makefile for:	hamlib
# Date created:			30 April 2003
# Whom:				Sebastian Yepes <esn@x123.info>
#
# $FreeBSD$
#

PORTNAME=	hamlib
PORTVERSION=	1.2.11
PORTREVISION=	1
CATEGORIES=	comms hamradio
MASTER_SITES=	SF
DISTNAME=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	db@FreeBSD.org
COMMENT=	Shared libraries for Amateur Radio Equipment Control Applications

BUILD_DEPENDS=	swig:${PORTSDIR}/devel/swig13

USE_GNOME=	pkgconfig gnomehack libxml2
USE_PERL5=	yes
USE_TCL=	yes
USE_PYTHON=	yes
USE_AUTOTOOLS=	autoconf:267 libtool:22
USE_LDCONFIG=	yes
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS=	--with-perl-binding --with-python=${PYTHON_CMD} \
		--enable-tcl-binding --with-tcl=${TCL_LIBDIR} \
		--with-python-binding --without-with-rigmatrix
PLIST_SUB=	VER=${PORTVERSION} TCL_VER=${TCL_VER}

MAN1=		rigctl.1 rigmem.1 rigswr.1 rotctl.1 rigsmtr.1
MAN8=		rpc.rigd.8 rpc.rotd.8 rigctld.8 rotctld.8

post-patch:
	${REINPLACE_CMD} -e 's|%%PYTHON_SITELIBDIR%%|${PYTHON_SITELIBDIR}|g' \
		-e 's|%%TCL_LIBDIR%%|${TCL_LIBDIR}/hamlib|g' \
		${WRKSRC}/bindings/Makefile.in
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
		${WRKSRC}/src/Makefile.in
post-build:
	${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' \
		${WRKSRC}/bindings/Hamlib-pl.mk

post-install:
.if	!defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for d in ${WRKSRC}/AUTHORS ${WRKSRC}/COPYING ${WRKSRC}/COPYING.LIB \
	${WRKSRC}/ChangeLog ${WRKSRC}/INSTALL ${WRKSRC}/LICENSE \
	${WRKSRC}/NEWS ${WRKSRC}/PLAN ${WRKSRC}/README \
	${WRKSRC}/README.betatester ${WRKSRC}/README.win32 \
	${WRKSRC}/THANKS
	${INSTALL_DATA} ${WRKSRC}/${d} ${DOCSDIR}
.endfor
	@${ECHO}
	@${ECHO} "docs installed in ${DOCSDIR}"
	@${ECHO}
.endif

.include <bsd.port.mk>