Makefile revision 3533
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#
3746N/A# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
99N/A#
5479N/Ainclude ../../make-rules/shared-macros.mk
3746N/A
5680N/APATH=/usr/bin:/usr/gnu/bin:/usr/sbin
127N/A
99N/ACOMPONENT_NAME= mercurial
5680N/ACOMPONENT_VERSION= 3.0.2
99N/ACOMPONENT_PROJECT_URL= http://mercurial.selenic.com/
99N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5479N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
618N/ACOMPONENT_ARCHIVE_HASH= \
844N/A sha256:ed387cc0e9754ec59bd4a390639b5a4ea11698ae4413243f8b4a2d6d48b3b7d6
5479N/ACOMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE)
99N/ACOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc
3533N/ACOMPONENT_BUGDB= utility/hg
1258N/A
99N/A# Fails to build: not Python 3 ready.
5479N/APYTHON_VERSIONS = 2.7 2.6
3746N/A
3746N/Ainclude $(WS_TOP)/make-rules/prep.mk
4982N/Ainclude $(WS_TOP)/make-rules/setup.py.mk
2818N/Ainclude $(WS_TOP)/make-rules/ips.mk
5680N/A
5680N/ACOMPONENT_POST_INSTALL_ACTION = \
5680N/A (cd $(PROTO_DIR)/usr/bin ; $(MV) -f hg hg-$(PYTHON_VERSION))
5680N/A
99N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/contrib
783N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/doc
783N/A
783N/A# Set mod time of patched file from patch. Use this to ensure that the .py
99N/A# file consistently gets the same timestamp.
99N/A$(SOURCE_DIR)/.https_proxy.patched: GPATCH_FLAGS += -Z
196N/A
3353N/A# Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
3353N/A# worked, and using /bin/bash doesn't always work, either. Also skip the
3353N/A# tests which try to check all the code in the userland gate. And finally,
3353N/A# test the bits from the proto area, rather than rebuilding. Given the way the
3353N/A# test suite works, the hg executable must be named "hg".
5479N/ACOMPONENT_PRE_TEST_ACTION = \
5479N/A (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
5479N/A echo "test-check-code-hg.t\ntest-module-imports.t" > blacklist); \
5479N/A (cd $(PROTOUSRBINDIR); ln -s hg-$(PYTHON_VERSION) hg)
5479N/A
5479N/ACOMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests
3353N/ACOMPONENT_TEST_ENV = PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) TERM=dumb
3353N/ACOMPONENT_TEST_ARGS = ./run-tests.py \
5479N/A --shell $(BUILD_DIR)/sh \
3596N/A --with-hg $(PROTOUSRBINDIR)/hg \
3353N/A --blacklist $(BUILD_DIR)/blacklist
3353N/A
5479N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
5479N/A
5479N/A# Assuming you have docutils installed, update the manpages patch for a new
3353N/A# mercurial version based on the patches applied to the source and to the
3353N/A# manpage generator. This works either against source that's already been
3353N/A# patched with the older manpages.patch or against a fresh tarball. Eventually
3353N/A# we'll have docutils in the CBE and we'll be able to regenerate the manpages
3353N/A# as part of the build, rather than patching them.
1938N/Apatches/manpages.patch:
1938N/A if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \
2302N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
2302N/A for f in hg.1 hgignore.5 hgrc.5; do \
2302N/A diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \
2302N/A done > $@; \
2302N/A else \
2302N/A for f in hg.1 hgignore.5 hgrc.5; do \
5479N/A cp -p $(COMPONENT_SRC)/doc/$$f $(COMPONENT_SRC)/doc/$$f.orig; \
5479N/A done; \
5479N/A cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \
5479N/A for f in hg.1 hgignore.5 hgrc.5; do \
5479N/A diff -u $(COMPONENT_SRC)/doc/$$f.orig $(COMPONENT_SRC)/doc/$$f; \
5479N/A done > $@; \
2302N/A fi || true
2302N/A
2302N/A# common targets
2302N/Abuild: $(BUILD_32)
2302N/A
2302N/Ainstall: $(INSTALL_32)
2302N/A
2302N/Atest: install $(TEST_32)
2302N/A
2302N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
2302N/A
2302N/Ainclude $(WS_TOP)/make-rules/depend.mk
2302N/A