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.8.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
:48a45f5cde9104fbc2daf310d710d4ebf286d879b89fa327d24b005434b0fa21
35 COMPONENT_ARCHIVE_URL
= https
://www.mercurial-scm.org
/release
/$(COMPONENT_ARCHIVE
)
36 COMPONENT_SIG_URL
= https
://www.mercurial-scm.org
/release
/$(COMPONENT_ARCHIVE
).asc
37 COMPONENT_BUGDB
= utility
/hg
39 # Mercurial does not yet support Python 3.
42 include $(WS_MAKE_RULES
)/prep.mk
43 include $(WS_MAKE_RULES
)/setup.py.mk
44 include $(WS_MAKE_RULES
)/ips.mk
46 COMPONENT_POST_INSTALL_ACTION
= \
47 (cd
$(PROTO_DIR
)/usr
/bin
; $(MV
) -f hg hg-
$(PYTHON_VERSION
))
49 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/contrib
50 PKG_PROTO_DIRS
+= $(COMPONENT_SRC
)/doc
52 # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
53 # worked, and using /bin/bash doesn't always work, either. Also skip the
54 # tests which try to check all the code in the userland gate. And finally,
55 # test the bits from the proto area, rather than rebuilding. Given the way the
56 # test suite works, the hg executable must be named "hg".
60 test-devel-warnings.t \
62 test-module-imports.t \
65 # https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/093876.html
68 test-bundle2-exchange.t
70 COMPONENT_PRE_TEST_ACTION
= \
71 (cd
$(BUILD_DIR
); rm -f sh
; ln
-s
/bin
/bash sh
; \
72 printf
"%s\n" $(TEST_BLACKLIST
) > blacklist
); \
73 (cd
$(PROTOUSRBINDIR
); rm -f hg
; ln
-s hg-
$(PYTHON_VERSION
) hg
)
75 COMPONENT_TEST_DIR
= $(COMPONENT_SRC
)/tests
76 COMPONENT_TEST_ENV
= PYTHONPATH
=$(PROTO_DIR
)/$(PYTHON_LIB
)
77 COMPONENT_TEST_ENV
+= TERM
=dumb
78 COMPONENT_TEST_ENV
+= HGTEST_JOBS
=$(or
$(HGTEST_JOBS
),1)
79 COMPONENT_TEST_ENV
+= PATH
=/usr
/gnu
/bin
:/usr
/bin
80 COMPONENT_TEST_ARGS
= .
/run-tests.py \
81 --shell $(BUILD_DIR
)/sh \
82 --with-hg
$(PROTOUSRBINDIR
)/hg \
83 --blacklist
$(BUILD_DIR
)/blacklist
85 ASLR_MODE
= $(ASLR_NOT_APPLICABLE
)
87 # Assuming you have docutils installed, update the manpages patch for a new
88 # mercurial version based on the patches applied to the source and to the
89 # manpage generator. This works either against source that's already been
90 # patched with the older manpages.patch or against a fresh tarball. Eventually
91 # we'll have docutils in the CBE and we'll be able to regenerate the manpages
92 # as part of the build, rather than patching them.
94 # Only build this target if it doesn't already exist, since this recipe is just
95 # for the component maintainer's benefit.
96 patches
/manpages.patch
: $(SOURCE_DIR
)/.unpacked \
97 $(SOURCE_DIR
)/.patched-rst.patch
$(SOURCE_DIR
)/.patched-hgmanpage.patch
98 if
[[ -f
$@
]]; then exit
0; fi
; \
99 if
[[ -f
$(COMPONENT_SRC
)/doc
/hg
.1.~
1~
]]; then \
100 cd
$(COMPONENT_SRC
)/doc
; gmake man || true
; cd ..
/..
; \
101 for f in hg
.1 hgignore
.5 hgrc
.5; do \
102 diff
-u
$(COMPONENT_SRC
)/doc
/$$f.~
1~
$(COMPONENT_SRC
)/doc
/$$f; \
105 for f in hg
.1 hgignore
.5 hgrc
.5; do \
106 cp
-p
$(COMPONENT_SRC
)/doc
/$$f $(COMPONENT_SRC
)/doc
/$$f.orig
; \
108 cd
$(COMPONENT_SRC
)/doc
; gmake man || true
; cd ..
/..
; \
109 for f in hg
.1 hgignore
.5 hgrc
.5; do \
110 diff
-u
$(COMPONENT_SRC
)/doc
/$$f.orig
$(COMPONENT_SRC
)/doc
/$$f; \
117 install: $(INSTALL_64
)
119 test: install $(TEST_64
)
121 REQUIRED_PACKAGES
+= runtime
/python-27
122 REQUIRED_PACKAGES
+= system
/library