18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 |
21 |
22 # |
22 # |
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
24 # |
24 # |
25 |
25 |
26 include ../../make-rules/shared-macros.mk |
26 include ../../make-rules/shared-macros.mk |
27 |
27 |
28 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
28 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin |
29 |
29 |
30 COMPONENT_NAME= mercurial |
30 COMPONENT_NAME= mercurial |
31 COMPONENT_VERSION= 3.4 |
31 COMPONENT_VERSION= 3.7.1 |
32 COMPONENT_PROJECT_URL= http://mercurial.selenic.com/ |
32 COMPONENT_PROJECT_URL= http://mercurial.selenic.com/ |
33 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
33 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
34 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
35 COMPONENT_ARCHIVE_HASH= \ |
35 COMPONENT_ARCHIVE_HASH= \ |
36 sha256:ff1da0545cdd46ebcf473176d55937a22bb55fff51cdff9d4c2f900fc80baf10 |
36 sha256:96d37d1f444a032295e190318b3166e9d05abb55916d2b3adb618a8f16c5cfed |
37 COMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE) |
37 COMPONENT_ARCHIVE_URL= http://www.selenic.com/mercurial/release/$(COMPONENT_ARCHIVE) |
38 COMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc |
38 COMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc |
39 COMPONENT_BUGDB= utility/hg |
39 COMPONENT_BUGDB= utility/hg |
40 |
40 |
41 TPNO= 22534 |
41 TPNO= 26646 |
42 |
42 |
43 # Mercurial does not yet support Python 3. |
43 # Mercurial does not yet support Python 3. |
44 PYTHON_VERSIONS = $(PYTHON2_VERSIONS) |
44 PYTHON_VERSIONS = $(PYTHON2_VERSIONS) |
45 |
45 |
46 include $(WS_MAKE_RULES)/prep.mk |
46 include $(WS_MAKE_RULES)/prep.mk |
56 # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always |
56 # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always |
57 # worked, and using /bin/bash doesn't always work, either. Also skip the |
57 # worked, and using /bin/bash doesn't always work, either. Also skip the |
58 # tests which try to check all the code in the userland gate. And finally, |
58 # tests which try to check all the code in the userland gate. And finally, |
59 # test the bits from the proto area, rather than rebuilding. Given the way the |
59 # test the bits from the proto area, rather than rebuilding. Given the way the |
60 # test suite works, the hg executable must be named "hg". |
60 # test suite works, the hg executable must be named "hg". |
|
61 TEST_BLACKLIST = \ |
|
62 test-check-code.t \ |
|
63 test-check-config.t \ |
|
64 test-hghave.t \ |
|
65 test-module-imports.t \ |
|
66 test-run-tests.t |
61 COMPONENT_PRE_TEST_ACTION = \ |
67 COMPONENT_PRE_TEST_ACTION = \ |
62 (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \ |
68 (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \ |
63 echo "test-check-code-hg.t\ntest-module-imports.t" > blacklist); \ |
69 printf "%s\n" $(TEST_BLACKLIST) > blacklist); \ |
64 (cd $(PROTOUSRBINDIR); rm -f hg; ln -s hg-$(PYTHON_VERSION) hg) |
70 (cd $(PROTOUSRBINDIR); rm -f hg; ln -s hg-$(PYTHON_VERSION) hg) |
65 |
71 |
66 COMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests |
72 COMPONENT_TEST_DIR = $(COMPONENT_SRC)/tests |
67 COMPONENT_TEST_ENV = PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) TERM=dumb |
73 COMPONENT_TEST_ENV = PYTHONPATH=$(PROTO_DIR)/$(PYTHON_LIB) |
|
74 COMPONENT_TEST_ENV += TERM=dumb |
|
75 COMPONENT_TEST_ENV += HGTEST_JOBS=$(or $(HGTEST_JOBS),1) |
68 COMPONENT_TEST_ARGS = ./run-tests.py \ |
76 COMPONENT_TEST_ARGS = ./run-tests.py \ |
69 --shell $(BUILD_DIR)/sh \ |
77 --shell $(BUILD_DIR)/sh \ |
70 --with-hg $(PROTOUSRBINDIR)/hg \ |
78 --with-hg $(PROTOUSRBINDIR)/hg \ |
71 --blacklist $(BUILD_DIR)/blacklist |
79 --blacklist $(BUILD_DIR)/blacklist |
72 |
80 |
76 # mercurial version based on the patches applied to the source and to the |
84 # mercurial version based on the patches applied to the source and to the |
77 # manpage generator. This works either against source that's already been |
85 # manpage generator. This works either against source that's already been |
78 # patched with the older manpages.patch or against a fresh tarball. Eventually |
86 # patched with the older manpages.patch or against a fresh tarball. Eventually |
79 # we'll have docutils in the CBE and we'll be able to regenerate the manpages |
87 # we'll have docutils in the CBE and we'll be able to regenerate the manpages |
80 # as part of the build, rather than patching them. |
88 # as part of the build, rather than patching them. |
81 patches/manpages.patch: |
89 # |
|
90 # Only build this target if it doesn't already exist, since this recipe is just |
|
91 # for the component maintainer's benefit. |
|
92 patches/manpages.patch: $(SOURCE_DIR)/.unpacked \ |
|
93 $(SOURCE_DIR)/.patched-rst.patch $(SOURCE_DIR)/.patched-hgmanpage.patch |
|
94 if [[ -f $@ ]]; then exit 0; fi; \ |
82 if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \ |
95 if [[ -f $(COMPONENT_SRC)/doc/hg.1.~1~ ]]; then \ |
83 cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \ |
96 cd $(COMPONENT_SRC)/doc; gmake man || true; cd ../..; \ |
84 for f in hg.1 hgignore.5 hgrc.5; do \ |
97 for f in hg.1 hgignore.5 hgrc.5; do \ |
85 diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \ |
98 diff -u $(COMPONENT_SRC)/doc/$$f.~1~ $(COMPONENT_SRC)/doc/$$f; \ |
86 done > $@; \ |
99 done > $@; \ |