# # This file and its contents are supplied under the terms of the # Common Development and Distribution License ("CDDL"), version 1.0. # You may only use this file in accordance with the terms of version # 1.0 of the CDDL. # # A full copy of the text of the CDDL should have accompanied this # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # # # Copyright 2017, 2021 Gary Mills # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # %patch% 01-extdiff.patch %patch% 02-journal.patch %patch% 03-Timout.patch %patch% 04-wait-on-file.patch %include-2% COMPONENT_FMRI = developer/versioning/mercurial COMPONENT_CLASSIFICATION = Development/Source Code Management # This is a standalone application. Since no other Python project depends on # it we just provide single unversioned package. SINGLE_PYTHON_VERSION = yes TEST_STYLE = custom %include-3% # Build and install documentation COMPONENT_POST_BUILD_ACTION += cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) $(GMAKE) doc ; COMPONENT_POST_INSTALL_ACTION += cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) DESTDIR=$(PROTO_DIR) PREFIX=$(USRDIR) install-doc ; # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always # worked, and using /bin/bash doesn't always work, either. Also skip the # tests which try to check all the code in the userland gate. And finally, # test the bits from the proto area, rather than rebuilding. Given the way the # test suite works, the hg executable must be named "hg". TEST_BLACKLIST = \ test-check-code.t \ test-check-config.t \ test-devel-warnings.t \ test-hghave.t \ test-run-tests.t \ test-merge1.t \ test-removeemptydirs.t \ test-update-names.t # https://bz.mercurial-scm.org/show_bug.cgi?id=6402 TEST_BLACKLIST += test-stdio.py # https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/093876.html TEST_BLACKLIST += \ test-ssh-bundle1.t \ test-bundle2-exchange.t # https://bz.mercurial-scm.org/show_bug.cgi?id=6915 TEST_BLACKLIST += test-patchbomb.t # https://bz.mercurial-scm.org/show_bug.cgi?id=6899 TEST_BLACKLIST += test-revlog-mmapindex.t COMPONENT_PRE_TEST_ACTION += \ (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \ printf "%s\n" $(TEST_BLACKLIST) > blacklist); # see tests/README COMPONENT_TEST_DIR = $(@D)/tests COMPONENT_TEST_ENV += TERM=dumb COMPONENT_TEST_ENV += HGTEST_JOBS=$(or $(HGTEST_JOBS),1) COMPONENT_TEST_ENV += PATH=$(PATH.gnu) COMPONENT_TEST_CMD = $(PYTHON) COMPONENT_TEST_ARGS = ./run-tests.py \ --verbose \ --shell $(BUILD_DIR)/sh \ --with-hg $(PROTOUSRBINDIR)/hg \ --blacklist $(BUILD_DIR)/blacklist COMPONENT_TEST_TARGETS = # Random temporary directory COMPONENT_TEST_TRANSFORMS += "-e 's|/tmp/hgtests\.[^ ]\{8\}|\$$(HGTMP)|g'" # Sequential number of test working directory COMPONENT_TEST_TRANSFORMS += "-e 's|\(/child\)[0-9]\{1,\}/|\1X/|g'" # Daemon process PID COMPONENT_TEST_TRANSFORMS += "-e 's/\([Dd]aemon process \)[0-9]\{1,\}/\1\$$(PID)/'"