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-2016 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=2.10.0
  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 archiver/gnu-tar"
  38 
  39 DEPENDS_IPS="runtime/python-27 \
  40              web/curl \
  41              library/security/openssl@1.0.2 \
  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 # Explicitly call out python version to make future python version bumps
  50 # smoother.
  51 CONFIGURE_OPTS="--without-tcltk
  52     --with-python=/usr/bin/python2.7
  53     --with-curl=/usr
  54     --with-openssl=/usr"
  55 
  56 save_function configure32 configure32_orig
  57 configure32() {
  58     make_param configure
  59     configure32_orig
  60 }
  61 
  62 save_function configure64 configure64_orig
  63 configure64() {
  64     make_param configure
  65     configure64_orig
  66 }
  67 
  68 install_man() {
  69     logmsg "Fetching and installing pre-built man pages"
  70     if [[ ! -f ${TMPDIR}/${PROG}-manpages-${VER}.tar.gz ]]; then
  71         pushd $TMPDIR > /dev/null
  72         get_resource $PROG/${PROG}-manpages-${VER}.tar.gz || \
  73             logerr "--- Failed to fetch tarball"
  74         popd > /dev/null
  75     fi
  76     logcmd mkdir -p ${DESTDIR}${PREFIX}/share/man
  77     pushd ${DESTDIR}${PREFIX}/share/man > /dev/null
  78     extract_archive ${TMPDIR}/${PROG}-manpages-${VER}.tar.gz || \
  79         logerr "--- Error extracting archive"
  80     popd > /dev/null
  81 }
  82 
  83 init
  84 download_source $PROG $PROG $VER
  85 patch_source
  86 prep_build
  87 build
  88 make_isa_stub
  89 install_man
  90 make_package
  91 clean_up