1 #!/usr/bin/bash
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
8 # with the License.
9 #
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
14 #
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2012 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 # Copyright (c) 2014 by Delphix. All rights reserved.
27 #
28 # Load support functions
29 . ../../lib/functions.sh
30
31 PROG=git
32 VER=1.8.4
33 PKG=developer/versioning/git
34 SUMMARY="$PROG - a free and open source, distributed version control system"
35 DESC="$SUMMARY"
36
37 BUILD_DEPENDS_IPS="compatibility/ucb developer/build/autoconf"
38
39 DEPENDS_IPS="runtime/python-26 \
40 web/curl \
41 library/security/openssl@1.0.1 \
42 library/zlib"
43
44 TAR=gtar
45
46 # For inet_ntop which isn't detected properly in the configure script
47 LDFLAGS="-lnsl"
48 CFLAGS64="$CFLAGS64 -I/usr/include/amd64"
49 CONFIGURE_OPTS="--without-tcltk
50 --with-python=/usr/bin/python
51 --with-curl=/usr
52 --with-openssl=/usr"
53
54 save_function configure32 configure32_orig
55 configure32() {
56 make_param configure
57 configure32_orig
58 }
59
60 save_function configure64 configure64_orig
61 configure64() {
62 make_param configure
63 configure64_orig
64 }
65
66 install_man() {
67 logmsg "Fetching and installing pre-built man pages"
68 if [[ ! -f ${TMPDIR}/${PROG}-manpages-${VER}.tar.gz ]]; then
69 pushd $TMPDIR > /dev/null
70 get_resource $PROG/${PROG}-manpages-${VER}.tar.gz || \
71 logerr "--- Failed to fetch tarball"
72 popd > /dev/null
73 fi
74 logcmd mkdir -p ${DESTDIR}${PREFIX}/share/man
75 pushd ${DESTDIR}${PREFIX}/share/man > /dev/null
76 extract_archive ${TMPDIR}/${PROG}-manpages-${VER}.tar.gz || \
77 logerr "--- Error extracting archive"
78 popd > /dev/null
79 }
80
81 init
82 download_source $PROG $PROG $VER
83 patch_source
84 prep_build
85 build
86 make_isa_stub
87 install_man
88 make_package
89 clean_up