summaryrefslogtreecommitdiff
path: root/devel/libFoundation/Makefile
blob: 7056696c80580fa8b99b6191b83689162fc5a92a (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
# $NetBSD: Makefile,v 1.9 2006/05/28 00:26:26 rh Exp $
#

DISTNAME=	libFoundation-1.0.72-r107
PKGNAME=	${DISTNAME:S/-r/./}
PKGREVISION=	2
CATEGORIES=	devel gnustep
MASTER_SITES=	ftp://ftp.opengroupware.org/sources/releases/		\
		http://www.opengroupware.org/sources/releases/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.opengroupware.org/en/devs/thirdparty/libFoundation/
COMMENT=	Library implementing the OpenStep Foundation API

USE_LANGUAGES=	c objc

WRKSRC=		${WRKDIR}/libfoundation

GNU_CONFIGURE=	yes
MAKE_ENV+=	ADDITIONAL_OBJCFLAGS="-I${WRKSRC} -I."
MAKE_ENV+=	FOUNDATION_LIB="fd"
MAKE_ENV+=	INSTALL_DATA=${INSTALL_DATA:Q}

PLIST_SUBST+=	GNUSTEP_HOST_CPU=${GNUSTEP_HOST_CPU:Q}
PLIST_SUBST+=	LIBF_HOST_OS=${LIBF_HOST_OS}

LIBF_HOST_OS=	${GNUSTEP_HOST:C/.*-//}

.include "../../devel/gnustep-objc-lf2/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"

pre-configure:
	${MKDIR} ${WRKSRC}/config/${MACHINE_GNU_ARCH}
	[ -e ${WRKSRC}/config/${MACHINE_GNU_ARCH}/${GNUSTEP_HOST_OS}.h ] || \
	${LN} -s linux.h ${WRKSRC}/config/${MACHINE_GNU_ARCH}/${GNUSTEP_HOST_OS}.h
.if ${GNUSTEP_HOST_OS} != ${LIBF_HOST_OS}
	[ -e ${WRKSRC}/config/${MACHINE_GNU_ARCH}/${LIBF_HOST_OS}.h ] || \
	${LN} -s linux.h ${WRKSRC}/config/${MACHINE_GNU_ARCH}/${LIBF_HOST_OS}.h
.endif

post-configure:
	-${MKDIR} ${WRKSRC}/Foundation/${GNUSTEP_HOST_CPU}
	[ -e ${WRKSRC}/Foundation/${GNUSTEP_HOST_CPU}/${LIBF_HOST_OS} ] || \
	  ${LN} -s							\
	    ${WRKSRC}/Foundation/${LIBF_HOST_OS}	\
	    ${WRKSRC}/Foundation/${GNUSTEP_HOST_CPU}/${LIBF_HOST_OS}

.include "../../mk/bsd.pkg.mk"