summaryrefslogtreecommitdiff
path: root/devel/pwlib/Makefile
blob: 97ed9104a5d94401826037f3b6927bd679c6e77d (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
# $NetBSD: Makefile,v 1.29 2004/10/03 00:13:32 tv Exp $
#

DISTNAME=		pwlib_1.4.4
PKGNAME=		pwlib-1.4.4
PKGREVISION=		4
CATEGORIES=		devel
MASTER_SITES=		http://www.openh323.org/bin/
COUNTRY_MIRRORS=	at us1 us2 ru de cz
.for COUNTRY in ${COUNTRY_MIRRORS}
MASTER_SITES+=		ftp://www.${COUNTRY}.openh323.org/bin/
.endfor

MAINTAINER=		tech-pkg@NetBSD.org
HOMEPAGE=		http://www.openh323.org/
COMMENT=		Portable Windows Libary

BUILD_DEPENDS=		bison-[0-9]*:../../devel/bison

WRKSRC=			${WRKDIR}/pwlib
USE_BUILDLINK3=		yes
USE_PKGINSTALL=		yes
USE_GNU_TOOLS+=		make
USE_LIBTOOL=		yes

PTHREAD_OPTS+=		require

MAKE_ENV+=		PWLIBDIR="${WRKSRC}"
MAKE_ENV+=		CC="${CC}"
MAKE_ENV+=		CPLUS="${CXX}"
ALL_TARGET=		opt

FILES_SUBST+=		LIBTOOL="${LIBTOOL}"
FILES_SUBST+=		PTHREADS_PREFIX="${BUILDLINK_PREFIX.pthread}"

post-patch:
	${_PKG_SILENT}cd ${WRKSRC}/make;				\
	for f in unix.mak lib.mak common.mak; do			\
		${SED} ${FILES_SUBST_SED} $$f > $$f.sed;		\
		${MV} -f $$f.sed $$f;						\
	done
	${LN} -sf ${WRKDIR} ${WRKSRC}/share

do-install:
	${_PKG_SILENT}cd ${WRKSRC}/src/ptlib/unix && ${MAKE_ENV} ${GMAKE} install
	${_PKG_SILENT}cd ${WRKSRC}/tools/asnparser && ${MAKE_ENV} ${GMAKE} install
	${INSTALL_DATA_DIR} ${PREFIX}/include/ptclib
	${INSTALL_DATA_DIR} ${PREFIX}/include/ptlib/unix/ptlib
	cd ${WRKSRC}/include;						\
	for f in `${FIND} . -type f -print | ${GREP} -v '/CVS/'`; do	\
		${INSTALL_DATA} $$f ${PREFIX}/include/`${DIRNAME} $$f`;	\
	done
	${INSTALL_DATA_DIR} ${PREFIX}/share/pwlib/make
	cd ${WRKSRC}/make;						\
	for f in *.mak; do		\
		${INSTALL_DATA} $$f ${PREFIX}/share/pwlib/make;		\
	done

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"