4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
26 include ..
/..
/..
/make-rules
/shared-macros.mk
28 COMPONENT_NAME
= mercurial
29 COMPONENT_VERSION
= 4.4.1
30 COMPONENT_PROJECT_URL
= http
://mercurial-scm.org
/
31 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
32 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
33 COMPONENT_ARCHIVE_HASH
= \
34 sha256
:8f2a5512d6cc2ffb08988aef639330a2f0378e4ac3ee0e1fbbdb64d9fff56246
35 COMPONENT_ARCHIVE_URL
= https
://www.mercurial-scm.org
/release
/$(COMPONENT_ARCHIVE
)
36 COMPONENT_BUGDB
= utility
/hg
38 # Mercurial does not yet support Python 3.
41 include $(WS_MAKE_RULES
)/prep.mk
42 include $(WS_MAKE_RULES
)/setup.py.mk
43 include $(WS_MAKE_RULES
)/ips.mk
45 COMPONENT_POST_INSTALL_ACTION
= \
46 (cd
$(PROTO_DIR
)/usr
/bin
; $(MV
) -f hg hg-
$(PYTHON_VERSION
))
48 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/contrib
49 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/doc
51 # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
52 # worked, and using /bin/bash doesn't always work, either. Also skip the
53 # tests which try to check all the code in the userland gate. And finally,
54 # test the bits from the proto area, rather than rebuilding. Given the way the
55 # test suite works, the hg executable must be named "hg".
59 test-devel-warnings.t \
61 test-module-imports.t \
64 # https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/093876.html
67 test-bundle2-exchange.t
69 COMPONENT_PRE_TEST_ACTION
= \
70 (cd
$(BUILD_DIR
); rm -f sh
; ln
-s
/bin
/bash sh
; \
71 printf
"%s\n" $(TEST_BLACKLIST
) > blacklist
); \
72 (cd
$(PROTOUSRBINDIR
); rm -f hg
; ln
-s hg-
$(PYTHON_VERSION
) hg
)
74 COMPONENT_TEST_DIR
= $(COMPONENT_SRC
)/tests
75 COMPONENT_TEST_ENV
= PYTHONPATH
=$(PROTO_DIR
)/$(PYTHON_LIB
)
76 COMPONENT_TEST_ENV
+= TERM
=dumb
77 COMPONENT_TEST_ENV
+= HGTEST_JOBS
=$(or
$(HGTEST_JOBS
),1)
78 COMPONENT_TEST_ENV
+= PATH
=/usr
/gnu
/bin
:/usr
/bin
79 COMPONENT_TEST_ARGS
= .
/run-tests.py \
80 --shell $(BUILD_DIR
)/sh \
81 --with-hg
$(PROTOUSRBINDIR
)/hg \
82 --blacklist
$(BUILD_DIR
)/blacklist
84 ASLR_MODE
= $(ASLR_NOT_APPLICABLE
)
86 # Assuming you have docutils installed, update the manpages patch for a new
87 # mercurial version based on the patches applied to the source and to the
88 # manpage generator. This works either against source that's already been
89 # patched with the older manpages.patch or against a fresh tarball. Eventually
90 # we'll have docutils in the CBE and we'll be able to regenerate the manpages
91 # as part of the build, rather than patching them.
93 # Only build this target if it doesn't already exist, since this recipe is just
94 # for the component maintainer's benefit.
95 patches
/manpages.patch
: $(SOURCE_DIR
)/.unpacked \
96 $(SOURCE_DIR
)/.patched-rst.patch
$(SOURCE_DIR
)/.patched-hgmanpage.patch
97 if
[[ -f
$@
]]; then exit
0; fi
; \
98 if
[[ -f
$(COMPONENT_SRC
)/doc
/hg
.1.~
1~
]]; then \
99 cd
$(COMPONENT_SRC
)/doc
; gmake man || true
; cd ..
/..
; \
100 for f in hg
.1 hgignore
.5 hgrc
.5; do \
101 diff
-u
$(COMPONENT_SRC
)/doc
/$$f.~
1~
$(COMPONENT_SRC
)/doc
/$$f; \
104 for f in hg
.1 hgignore
.5 hgrc
.5; do \
105 cp
-p
$(COMPONENT_SRC
)/doc
/$$f $(COMPONENT_SRC
)/doc
/$$f.orig
; \
107 cd
$(COMPONENT_SRC
)/doc
; gmake man || true
; cd ..
/..
; \
108 for f in hg
.1 hgignore
.5 hgrc
.5; do \
109 diff
-u
$(COMPONENT_SRC
)/doc
/$$f.orig
$(COMPONENT_SRC
)/doc
/$$f; \
113 # Install 64-bit first, so that the 32-bit hg is what's installed.
114 $(INSTALL_32
): $(INSTALL_64
)
117 build
: $(BUILD_32_and_64
)
119 install: $(INSTALL_32_and_64
)
121 test: install $(TEST_32_and_64
)
123 REQUIRED_PACKAGES
+= runtime
/python-27
124 REQUIRED_PACKAGES
+= system
/library