summaryrefslogtreecommitdiff
path: root/devel/scmgit/Makefile
blob: 2c9c6692459f6df64c61cfebbd1e7061eab8da67 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# $NetBSD: Makefile,v 1.17 2007/09/21 23:13:26 bjs Exp $
#

DISTNAME=	git-1.5.3.2
PKGNAME=	scm${DISTNAME}
CATEGORIES=	devel scm
MASTER_SITES=	http://www.kernel.org/pub/software/scm/git/

MAINTAINER=	pancake@phreaker.net
HOMEPAGE=	http://git.or.cz/
COMMENT=	Tree History Storage Tool

PKG_DESTDIR_SUPPORT=	user-destdir

CONFLICTS+=	git-[0-9]*		# misc/git
BUILD_DEPENDS+=	asciidoc-[0-9]*:../../textproc/asciidoc
BUILD_DEPENDS+=	xmlto-[0-9]*:../../textproc/xmlto

MAKE_ENV+=	HOME=${PREFIX:Q}
USE_LANGUAGES=	c99
USE_TOOLS+=	gmake perl:run sh:run wish:run tar
EXTRACT_USING=	gtar

MAKE_ENV+=	CURLDIR=${BUILDLINK_PREFIX.curl:Q}
MAKE_ENV+=	PERL_PATH=${PERL5:Q}
MAKE_ENV+=	PYTHON_PATH=${PYTHONBIN:Q}
MAKE_ENV+=	SHELL_PATH=${SH:Q}
MAKE_ENV+=	TAR=${TAR:Q}
BUILD_TARGET=	all doc
INSTALL_TARGET=	install install-doc
MAKE_FLAGS+=	mandir=${PREFIX}/${PKGMANDIR}
LDFLAGS=	${COMPILER_RPATH_FLAG}${PREFIX}/lib
LIBS.SunOS+=	-liconv
CFLAGS.NetBSD+=	-D_NETBSD_SOURCE

PERL5_PACKLIST=	auto/Git/.packlist
PERL5_CONFIGURE_DIRS=	${WRKSRC}/perl

.include "../../mk/bsd.prefs.mk"

###
### XXX Do all the BSDs fit this category?
###
.if ${OPSYS} == "NetBSD"
.  include "../../converters/libiconv/builtin.mk"
.  if ${ICONV_TYPE} == "native"
CFLAGS+=	-DOLD_ICONV
.  endif
.endif

.include "../../lang/python/application.mk"

NEEDS_SUBPROCESS_PY!= \
	if ok=`${PYTHONBIN} -c 'import subprocess; print "OK"' 2>/dev/null` \
	&& ${TEST} "$$ok" = "OK"; then echo "no"; else echo "yes"; fi
.if ${NEEDS_SUBPROCESS_PY} == "yes"
PLIST_SUBST+=	IF_NEEDS_SUBPROCESS_PY=""
.else
PLIST_SUBST+=	IF_NEEDS_SUBPROCESS_PY="@comment "
.endif

#.include "../../mk/emacs.mk" # XXX TODO (see patch-ad)

post-install:
	chmod 644 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/git*.1
	chmod 644 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man7/git*.7

.include "../../lang/perl5/module.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"