--- a/components/git/Makefile Sat Apr 02 01:55:18 2016 +0100
+++ b/components/git/Makefile Thu Mar 24 11:12:03 2016 -0700
@@ -18,59 +18,95 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+
#
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= git
-COMPONENT_VERSION= 1.7.9.2
+COMPONENT_VERSION= 2.7.4
COMPONENT_PROJECT_URL= http://git-scm.com/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
COMPONENT_ARCHIVE_HASH= \
- sha256:bd7725fb80f305bf27666e3d26a9b7b79596e2248f2ae2d27e06bc15a501ac75
-COMPONENT_ARCHIVE_URL= http://git-core.googlecode.com/files/$(COMPONENT_ARCHIVE)
+ sha256:dee574defbe05ec7356a0842ddbda51315926f2fa7e39c2539f2c3dcc52e457b
+COMPONENT_ARCHIVE_URL= https://www.kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= utility/git
-TPNO= 8436
+TPNO= 27482
#
# man pages are a separate archive
#
-COMPONENT_ARCHIVE_1 = $(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION).tar.gz
+COMPONENT_SRC_1 = $(COMPONENT_NAME)-manpages-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.xz
COMPONENT_ARCHIVE_HASH_1 = \
- sha256:c653a3678bb5668c280a0d5ba584fdfb0e4272acbbd00901dc2363ea3f58eede
-COMPONENT_ARCHIVE_URL_1 = http://git-core.googlecode.com/files/$(COMPONENT_ARCHIVE_1)
+ sha256:d04fd81ab8aa32efbe54acd27ab5c88ef4ab615313e4cdfa793dd0065899ce25
+COMPONENT_ARCHIVE_URL_1 = https://www.kernel.org/pub/software/scm/git/$(COMPONENT_ARCHIVE_1)
+UNPACK_ARGS_1 = -r $(COMPONENT_SRC_1)
+PKG_PROTO_DIRS += $(COMPONENT_SRC_1)
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
-PYTHON_VERSION = 2.7
+PKG_HARDLINKS += usr/lib/git-core/git
+PKG_HARDLINKS += usr/lib/git-core/git-cvsserver
+PKG_HARDLINKS += usr/lib/git-core/git-gui
+PKG_HARDLINKS += usr/lib/git-core/git-remote-ftps
+PKG_HARDLINKS += usr/lib/git-core/git-shell
+PKG_HARDLINKS += usr/lib/git-core/git-upload-pack
PKG_MACROS += PYVER=$(PYTHON_VERSION)
+CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
+CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib
+
+CONFIGURE_SCRIPT = $(@D)/configure
CONFIGURE_PREFIX = /usr
-CONFIGURE_OPTIONS += --without-openssl
+CONFIGURE_OPTIONS += --sysconfdir=/etc
CONFIGURE_OPTIONS += --libexecdir=/usr/lib
+CONFIGURE_OPTIONS += --with-libpcre
CONFIGURE_OPTIONS += --with-perl=$(PERL)
CONFIGURE_OPTIONS += --with-python=$(PYTHON.$(PYTHON_VERSION))
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS += CPPFLAGS="-I/usr/include/pcre"
# Build fails if environment variable PROFILE is set.
COMPONENT_BUILD_ENV+= PROFILE=
COMPONENT_INSTALL_ENV+= PROFILE=
COMPONENT_TEST_ENV+= PROFILE=
-COMPONENT_BUILD_ENV+= NO_PERL_MAKEMAKER=1
-COMPONENT_INSTALL_ENV+= PERL_LIB=$(shell $(PERL) -MConfig -e 'print "$$Config{installvendorarch}"')
+# We set prefix_SQ empty to make sure that perl's MakeMaker module doesn't grab
+# the value from $prefix (set by configure) and force VENDORPREFIX to $prefix,
+# thereby putting the perl modules in /usr/lib/Git.
+COMPONENT_BUILD_ARGS+= prefix_SQ=
+COMPONENT_INSTALL_ARGS+= prefix_SQ=
COMPONENT_INSTALL_ARGS+= INSTALL="$(INSTALL)"
# get rid of terminal escape codes in test output
COMPONENT_TEST_ENV = TERM=dumb
# many failures; keep going; later versions of git are much cleaner
COMPONENT_TEST_ARGS += -k -i
+# If GITTEST_JOBS is set, then run the jobs in parallel (to that number)
+COMPONENT_TEST_ARGS += $(if $(GITTEST_JOBS),-j$(GITTEST_JOBS),)
COMPONENT_TEST_TARGETS = test
+# Enable tests requiring Apache
+COMPONENT_TEST_TARGETS += LIB_HTTPD_PATH=/usr/apache2/2.4/bin/httpd
+COMPONENT_TEST_TARGETS += LIB_HTTPD_MODULE_PATH=/usr/apache2/2.4/libexec
+# Put each test result in a file; necessary if jobs run in parallel
+COMPONENT_TEST_TARGETS += GIT_TEST_OPTS=--tee
+COMPONENT_TEST_TARGETS += DEFAULT_TEST_TARGET=test-noclean
+# Compile the test results and put that into the test output file instead
+COMPONENT_POST_TEST_ACTION = \
+ (cd $(@D)/t/test-results; for i in *.out; do \
+ echo "*** $${i%.out}.sh ***"; \
+ cat $$i; \
+ done; \
+ cd ..; \
+ $(GMAKE) -s aggregate-results) &> $(BUILD_DIR)/test-$(MACH$(BITS)).out
# This runs configure but configure doesn't generate a Makefile.
# Instead a Makefile comes with git.
@@ -79,15 +115,19 @@
COMPONENT_PRE_CONFIGURE_ACTION = \
($(CLONEY) $(SOURCE_DIR) $(@D))
+COMPONENT_PRE_CONFIGURE_ACTION += ; (cd $(@D); $(GMAKE) configure)
ASLR_MODE = $(ASLR_ENABLE)
-build: $(BUILD_32)
+configure: $(CONFIGURE_64)
+
+build: $(BUILD_64)
-install: $(INSTALL_32) $(BUILD_DIR)/.manpages
+install: $(INSTALL_64) $(BUILD_DIR)/.manpages
-# There are some known issues around I18N.
-test: $(TEST_32)
+test: $(TEST_64)
+
+system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
# These man pages come in a separate archive with no Makefile
# and Solaris likes some of them moved around hence we'll just
@@ -114,7 +154,10 @@
$(TOUCH) $@
+REQUIRED_PACKAGES += crypto/gnupg
REQUIRED_PACKAGES += library/expat
+REQUIRED_PACKAGES += library/pcre
+REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += runtime/perl-512
REQUIRED_PACKAGES += runtime/python-27
@@ -122,3 +165,4 @@
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += web/curl
+REQUIRED_PACKAGES += web/server/apache-24