aboutsummaryrefslogtreecommitdiffstats
path: root/misc/goblin/Makefile
blob: 90e1e6ef03f8e23f15a8af17626c2c41a616d7ab (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
# ex:ts=8
# Ports collection makefile for:    goblin
# Date created:         Mar 3, 2002
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   goblin
PORTVERSION=    2.6.1
CATEGORIES= misc
MASTER_SITES=   http://www.math.uni-augsburg.de/opt/goblin.docs/
DISTNAME=   ${PORTNAME}.${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    A Graph Object Library for Network Programming Problems

LIB_DEPENDS=    tk83.1:${PORTSDIR}/x11-toolkits/tk83

USE_REINPLACE=  yes
USE_GMAKE=  yes
MAKE_ENV=   LDFLAGS="${LDFLAGS}"
PLIST_SUB+= VERSION=${PORTVERSION:R}

CFLAGS+=    -I${LOCALBASE}/include/tcl8.3 -I${LOCALBASE}/include/tk8.3 \
        -I${X11BASE}/include ${PTHREAD_CFLAGS}
LDFLAGS=    -L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS}

post-patch:
    @${REINPLACE_CMD} -e \
        's|g++ -c .* -Iinclude|$$(CXX) -c $$(CXXFLAGS) -Iinclude|g ; \
         s|g++ -lm|$$(CXX) -lm $$(LDFLAGS)|g ; \
         s|8\.3|83|g ; \
         s|/usr/include|$$(PREFIX)/include|g ; \
         s|/usr/lib|$$(PREFIX)/lib|g ; \
         s|/usr/bin|$$(PREFIX)/bin|g ; \
         s|-lpthread||g' ${WRKSRC}/Makefile
    @${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
        's|malloc\.h|stdlib.h|g'

.include <bsd.port.mk>