152N/A#
152N/A# CDDL HEADER START
152N/A#
152N/A# The contents of this file are subject to the terms of the
152N/A# Common Development and Distribution License (the "License").
152N/A# You may not use this file except in compliance with the License.
152N/A#
152N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
152N/A# or http://www.opensolaris.org/os/licensing.
152N/A# See the License for the specific language governing permissions
152N/A# and limitations under the License.
152N/A#
152N/A# When distributing Covered Code, include this CDDL HEADER in each
152N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
152N/A# If applicable, add the following below this CDDL HEADER, with the
152N/A# fields enclosed by brackets "[]" replaced with your own identifying
152N/A# information: Portions Copyright [yyyy] [name of copyright owner]
152N/A#
152N/A# CDDL HEADER END
152N/A#
5718N/A
152N/A#
5718N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
5718N/A#
5718N/A
152N/Ainclude ../../make-rules/shared-macros.mk
152N/A
152N/ACOMPONENT_NAME= git
5718N/ACOMPONENT_VERSION= 2.7.4
618N/ACOMPONENT_PROJECT_URL= http://git-scm.com/
152N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5718N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
844N/ACOMPONENT_ARCHIVE_HASH= \
5718N/A sha256:dee574defbe05ec7356a0842ddbda51315926f2fa7e39c2539f2c3dcc52e457b
5718N/ACOMPONENT_ARCHIVE_URL= https://www.kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= utility/git
1273N/A
5718N/ATPNO= 27482
3661N/A
152N/A#
152N/A# man pages are a separate archive
152N/A#
5718N/ACOMPONENT_SRC_1 = $(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION)
5718N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.xz
844N/ACOMPONENT_ARCHIVE_HASH_1 = \
5718N/A sha256:d04fd81ab8aa32efbe54acd27ab5c88ef4ab615313e4cdfa793dd0065899ce25
5718N/ACOMPONENT_ARCHIVE_URL_1 = https://www.kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE_1)
152N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
152N/A
5718N/APKG_HARDLINKS += usr/lib/git-core/git
5718N/APKG_HARDLINKS += usr/lib/git-core/git-cvsserver
5718N/APKG_HARDLINKS += usr/lib/git-core/git-gui
5718N/APKG_HARDLINKS += usr/lib/git-core/git-remote-ftps
5718N/APKG_HARDLINKS += usr/lib/git-core/git-shell
5718N/APKG_HARDLINKS += usr/lib/git-core/git-upload-pack
3983N/A
3983N/APKG_MACROS += PYVER=$(PYTHON_VERSION)
3983N/A
5718N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
5718N/ACONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
5718N/A
5718N/ACONFIGURE_SCRIPT = $(@D)/configure
152N/ACONFIGURE_PREFIX = /usr
5718N/ACONFIGURE_OPTIONS += --sysconfdir=/etc
152N/ACONFIGURE_OPTIONS += --libexecdir=/usr/lib
5718N/ACONFIGURE_OPTIONS += --with-libpcre
277N/ACONFIGURE_OPTIONS += --with-perl=$(PERL)
3983N/ACONFIGURE_OPTIONS += --with-python=$(PYTHON.$(PYTHON_VERSION))
152N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
5718N/ACONFIGURE_OPTIONS += CPPFLAGS="-I/usr/include/pcre"
152N/A
4242N/A# Build fails if environment variable PROFILE is set.
4242N/ACOMPONENT_BUILD_ENV+= PROFILE=
4242N/ACOMPONENT_INSTALL_ENV+= PROFILE=
4242N/ACOMPONENT_TEST_ENV+= PROFILE=
4242N/A
5718N/A# We set prefix_SQ empty to make sure that perl's MakeMaker module doesn't grab
5718N/A# the value from $prefix (set by configure) and force VENDORPREFIX to $prefix,
5718N/A# thereby putting the perl modules in /usr/lib/Git.
5718N/ACOMPONENT_BUILD_ARGS+= prefix_SQ=
5718N/ACOMPONENT_INSTALL_ARGS+= prefix_SQ=
683N/ACOMPONENT_INSTALL_ARGS+= INSTALL="$(INSTALL)"
152N/A
4242N/A# get rid of terminal escape codes in test output
4242N/ACOMPONENT_TEST_ENV = TERM=dumb
4242N/A# many failures; keep going; later versions of git are much cleaner
4242N/ACOMPONENT_TEST_ARGS += -k -i
5718N/A# If GITTEST_JOBS is set, then run the jobs in parallel (to that number)
5718N/ACOMPONENT_TEST_ARGS += $(if $(GITTEST_JOBS),-j$(GITTEST_JOBS),)
181N/ACOMPONENT_TEST_TARGETS = test
5718N/A# Enable tests requiring Apache
5718N/ACOMPONENT_TEST_TARGETS += LIB_HTTPD_PATH=/usr/apache2/2.4/bin/httpd
5718N/ACOMPONENT_TEST_TARGETS += LIB_HTTPD_MODULE_PATH=/usr/apache2/2.4/libexec
5718N/A# Put each test result in a file; necessary if jobs run in parallel
5718N/ACOMPONENT_TEST_TARGETS += GIT_TEST_OPTS=--tee
5718N/ACOMPONENT_TEST_TARGETS += DEFAULT_TEST_TARGET=test-noclean
5718N/A# Compile the test results and put that into the test output file instead
5718N/ACOMPONENT_POST_TEST_ACTION = \
5718N/A (cd $(@D)/t/test-results; for i in *.out; do \
5718N/A echo "*** $${i%.out}.sh ***"; \
5718N/A cat $$i; \
5718N/A done; \
5718N/A cd ..; \
5718N/A $(GMAKE) -s aggregate-results) &> $(BUILD_DIR)/test-$(MACH$(BITS)).out
181N/A
152N/A# This runs configure but configure doesn't generate a Makefile.
760N/A# Instead a Makefile comes with git.
152N/A# Anyways viewpathing doesn't work.
152N/A# Therefore we need cloney to copy a set of files to build.
760N/A
152N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
152N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
5718N/ACOMPONENT_PRE_CONFIGURE_ACTION += ; (cd $(@D); $(GMAKE) configure)
152N/A
4242N/AASLR_MODE = $(ASLR_ENABLE)
4242N/A
5718N/Aconfigure: $(CONFIGURE_64)
5718N/A
5718N/Abuild: $(BUILD_64)
152N/A
5718N/Ainstall: $(INSTALL_64) $(BUILD_DIR)/.manpages
181N/A
5718N/Atest: $(TEST_64)
5718N/A
5718N/Asystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
152N/A
760N/A# These man pages come in a separate archive with no Makefile
152N/A# and Solaris likes some of them moved around hence we'll just
152N/A# do it manually here.
760N/A
760N/A$(BUILD_DIR)/.manpages:
152N/A cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1)
760N/A $(MKDIR) $(PROTOUSRSHAREMAN1DIR)
760N/A $(MKDIR) $(PROTOUSRSHAREMAN4DIR)
760N/A $(MKDIR) $(PROTOUSRSHAREMAN5DIR)
760N/A cd $(BUILD_DIR) ; for manfile in man*/* ; \
152N/A do \
760N/A filename=`basename $$manfile`; \
760N/A fname=$${filename%.*}; \
760N/A ext=$${filename##*.}; \
760N/A newext=1; \
760N/A if [ $$ext = 5 ]; then newext=4; fi; \
760N/A if [ $$ext = 7 ]; then newext=5; fi; \
760N/A $(GSED) -e 's/\\m\[blue\]//g' -e 's/\\m\[\]//g' \
760N/A -e 's/"5"/"4"/' -e 's/(5)/(4)/g' \
760N/A -e 's/"7"/"5"/' -e 's/(7)/(5)/g' $$manfile > \
760N/A $(PROTOUSRSHAREMANDIR)/man$$newext/$$fname.$$newext; \
152N/A done
181N/A $(TOUCH) $@
152N/A
152N/A
5718N/AREQUIRED_PACKAGES += crypto/gnupg
3996N/AREQUIRED_PACKAGES += library/expat
5718N/AREQUIRED_PACKAGES += library/pcre
5718N/AREQUIRED_PACKAGES += library/security/openssl
3996N/AREQUIRED_PACKAGES += library/zlib
3996N/AREQUIRED_PACKAGES += runtime/perl-512
3996N/AREQUIRED_PACKAGES += runtime/python-27
3996N/AREQUIRED_PACKAGES += shell/bash
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += web/curl
5718N/AREQUIRED_PACKAGES += web/server/apache-24