aboutsummaryrefslogtreecommitdiffstats
path: root/net/hawknl-devel/Makefile
blob: 7423c5610a40277c26d968e8e485456a8018a8e8 (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
# New ports collection makefile for:    hawknl
# Date created:     2006-03-04
# Whom:         Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#

PORTNAME=   hawknl
PORTVERSION=    1.70
CATEGORIES= net devel
MASTER_SITES=   http://www.hawksoft.com/download/files/
PKGNAMESUFFIX=  -devel
DISTNAME=   HawkNL17b1src
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= acm@FreeBSD.org
COMMENT=    Portable networking library (devel)

CONFLICTS=  hawknl-[0-9]*

USE_ZIP=    yes
USE_DOS2UNIX=   yes
USE_GMAKE=  yes
MAKEFILE=   makefile.linux
USE_LDCONFIG=   yes

LDFLAGS=    -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CPPFLAGS=   -I${LOCALBASE}/include
MAKE_ENV=   LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"

WRKSRC= ${WRKDIR}/HawkNL1.70

OPTIONS=    OPTIMIZATION    "Enable optimization"   off

.include <bsd.port.pre.mk>

.if ${ARCH} == amd64 || ${ARCH} == ia64
BROKEN=     does not compile on ${ARCH}
.endif

.if defined(WITH_OPTIMIZATION)
CFLAGS+=    -funroll-all-loops -ffast-math -fomit-frame-pointer -D_GNU_SOURCE -D_REENTRANT
.endif

post-patch:
    ${REINPLACE_CMD} -e 's|make -f|${GMAKE} -f|g' ${WRKSRC}/${MAKEFILE}
    ${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' ${WRKSRC}/src/nlinternal.h ${WRKSRC}/src/htinternal.h

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for FILE in readme.txt NLchanges.txt
    @${INSTALL_DATA} ${WRKSRC}/src/${FILE} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>