99N/A#
99N/A# CDDL HEADER START
99N/A#
99N/A# The contents of this file are subject to the terms of the
99N/A# Common Development and Distribution License (the "License").
99N/A# You may not use this file except in compliance with the License.
99N/A#
99N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99N/A# or http://www.opensolaris.org/os/licensing.
99N/A# See the License for the specific language governing permissions
99N/A# and limitations under the License.
99N/A#
99N/A# When distributing Covered Code, include this CDDL HEADER in each
99N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
99N/A# If applicable, add the following below this CDDL HEADER, with the
99N/A# fields enclosed by brackets "[]" replaced with your own identifying
99N/A# information: Portions Copyright [yyyy] [name of copyright owner]
99N/A#
99N/A# CDDL HEADER END
99N/A#
3748N/A
99N/A#
5719N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3748N/A#
3748N/A
127N/Ainclude ../../make-rules/shared-macros.mk
99N/A
99N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
99N/A
99N/ACOMPONENT_NAME= mercurial
5719N/ACOMPONENT_VERSION= 3.7.3
618N/ACOMPONENT_PROJECT_URL= http://mercurial.selenic.com/
99N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
99N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
5719N/A sha256:c099c42d74e2d520b61dd372cd996b0fa7605c06617834fd7b13c79b9a9a5b30
99N/ACOMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= utility/hg
99N/A
5719N/ATPNO= 27571
3748N/A
3778N/A# Mercurial does not yet support Python 3.
3778N/APYTHON_VERSIONS = 2.7 2.6
3778N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/setup.py.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
99N/A
783N/ACOMPONENT_POST_INSTALL_ACTION = \
783N/A (cd $(PROTO_DIR)/usr/bin ; $(MV) -f hg hg-$(PYTHON_VERSION))
783N/A
99N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/contrib
99N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/doc
196N/A
3748N/A# Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
3748N/A# worked, and using /bin/bash doesn't always work, either. Also skip the
3748N/A# tests which try to check all the code in the userland gate. And finally,
3748N/A# test the bits from the proto area, rather than rebuilding. Given the way the
3748N/A# test suite works, the hg executable must be named "hg".
5719N/ATEST_BLACKLIST = \
5719N/A test-check-code.t \
5719N/A test-check-config.t \
5719N/A test-hghave.t \
5719N/A test-module-imports.t \
5719N/A test-run-tests.t
3748N/ACOMPONENT_PRE_TEST_ACTION = \
3748N/A (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
5719N/A printf "%s\n" $(TEST_BLACKLIST) > blacklist); \
3748N/A (cd $(PROTOUSRBINDIR); rm -f hg; ln -s hg-$(PYTHON_VERSION) hg)
3748N/A
3748N/ACOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
3748N/ACOMPONENT_TEST_ENV_CMD = $(ENV)
5719N/ACOMPONENT_TEST_ENV = PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB)
5719N/ACOMPONENT_TEST_ENV += TERM=dumb
5719N/ACOMPONENT_TEST_ENV += HGTEST_JOBS=$(or $(HGTEST_JOBS),1)
3748N/ACOMPONENT_TEST_ARGS = ./run-tests.py \
3748N/A --shell $(BUILD_DIR)/sh \
3748N/A --with-hg $(PROTOUSRBINDIR)/hg \
3748N/A --blacklist $(BUILD_DIR)/blacklist
99N/A
2632N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
2632N/A
2632N/A# Assuming you have docutils installed, update the manpages patch for a new
2632N/A# mercurial version based on the patches applied to the source and to the
2632N/A# manpage generator. This works either against source that's already been
2632N/A# patched with the older manpages.patch or against a fresh tarball. Eventually
2632N/A# we'll have docutils in the CBE and we'll be able to regenerate the manpages
2632N/A# as part of the build, rather than patching them.
5719N/A#
5719N/A# Only build this target if it doesn't already exist, since this recipe is just
5719N/A# for the component maintainer's benefit.
5719N/Apatches/manpages.patch: $(SOURCE_DIR)/.unpacked \
5719N/A $(SOURCE_DIR)/.patched-rst.patch $(SOURCE_DIR)/.patched-hgmanpage.patch
5719N/A if [[ -f $@ ]]; then exit 0; fi; \
2632N/A if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \
2632N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
2632N/A for f in hg.1 hgignore.5 hgrc.5; do \
2632N/A diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \
2632N/A done > $@; \
2632N/A else \
2632N/A for f in hg.1 hgignore.5 hgrc.5; do \
2632N/A cp -p $(COMPONENT_SRC)/doc/$$f $(COMPONENT_SRC)/doc/$$f.orig; \
2632N/A done; \
2632N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
2632N/A for f in hg.1 hgignore.5 hgrc.5; do \
2632N/A diff -u $(COMPONENT_SRC)/doc/$$f.orig $(COMPONENT_SRC)/doc/$$f; \
2632N/A done > $@; \
2632N/A fi || true
2632N/A
99N/A# common targets
99N/Abuild: $(BUILD_32)
99N/A
99N/Ainstall: $(INSTALL_32)
99N/A
3748N/Atest: install $(TEST_32)
99N/A
99N/A
3996N/AREQUIRED_PACKAGES += runtime/python-26
3996N/AREQUIRED_PACKAGES += runtime/python-27
3996N/AREQUIRED_PACKAGES += system/library