c80e152862cc3e3207dc837fde7116bd4c0e4b9dTinderbox User# CDDL HEADER START
8d1b3ceb4d491ce32572f1702f37ed585eede993Evan Hunt# The contents of this file are subject to the terms of the
8d1b3ceb4d491ce32572f1702f37ed585eede993Evan Hunt# Common Development and Distribution License (the "License").
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt# You may not use this file except in compliance with the License.
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# See the License for the specific language governing permissions
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# and limitations under the License.
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
7ec97ae74e42ec21b354fd2d1366313b41d947d6Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
002f1373374a0b72fc0329baa682917929bef168Tony Finch# information: Portions Copyright [yyyy] [name of copyright owner]
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# CDDL HEADER END
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
3a29ce9c08dd31709c73e7187aebda0d360c537bEvan HuntCOMPONENT_PROJECT_URL= http://www.methods.co.nz/asciidoc/
5c78f1f50e53d8e2ed51a187efc2c9a0f43b4b1bMark Andrews sha256:78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323cab4e1f0
f1740da065d4555039fe8bb53beb4153e3f94de3Mark AndrewsCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
ad309e8dfa0601d6053aaa12770a98a6940f89deEvan Hunt# AsciiDoc configuration and data files belong in /usr/share, not /etc based
635e4351b04fd61ca6d853bdac6268c090b55129Mark Andrews# on discussion from ARC pre-review.
fc04365d2f83f197c8a54545dd9cd4ce6a209940Mark AndrewsCONFIGURE_OPTIONS += --sysconfdir=$(USRSHAREDIR)
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews# pkgdepend doesn't like the first line of a Python script to be:
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund Sivaraman# common targets
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# Tests require image/graphviz to be installed. Some tests also want to run
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# programs which are not automatically available on Solaris (latex, abc2ly
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# and lilypad), so these tests will output messages of the form:
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# latex2png.py: failed command: latex ...
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# music2png.py: failed command: abc2ly ...
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# music2png.py: failed command: lilypond ...
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan Hunt then print "asciidocapi test passed"; \
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont else print "asciidocapi test failed"; \
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont python$(PYTHON_VERSION) ./testasciidoc.py update; \
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupont python$(PYTHON_VERSION) ./testasciidoc.py run
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman '-e "/passed/p" ' \
7e1a62eea2e4ba9d6c3fc718e679b965fa514f69Mark Andrews '-e "/^[1-9]: /p" ' \
ec29d217ba3a2bf3e617a7b5b6708ae221bee999Mark Andrews '-e "/^[1-9][0-9]: /p" ' \
ec29d217ba3a2bf3e617a7b5b6708ae221bee999Mark Andrews '-e "/^SOURCE/p" ' \
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews '-e "/^PASSED/p" ' \
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews '-e "/^FAILED/p" ' \
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews '-e "/^TOTAL/p" '
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt then print "asciidocapi test passed"; \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt else print "asciidocapi test failed"; \