Makefile revision 3817
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# CDDL HEADER START
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# The contents of this file are subject to the terms of the
f70a10508f030b097a9b8afe907a06f9a1e2c4d4Tinderbox User# Common Development and Distribution License (the "License").
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# You may not use this file except in compliance with the License.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# or http://www.opensolaris.org/os/licensing.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# See the License for the specific language governing permissions
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# and limitations under the License.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# When distributing Covered Code, include this CDDL HEADER in each
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# If applicable, add the following below this CDDL HEADER, with the
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# information: Portions Copyright [yyyy] [name of copyright owner]
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# CDDL HEADER END
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntinclude ../../make-rules/shared-macros.mk
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_NAME= asciidoc
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_VERSION= 8.6.8
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_PROJECT_URL= http://www.methods.co.nz/asciidoc/
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_ARCHIVE_HASH= \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt sha256:ffb67f59dccaf6f15db72fcd04fdf21a2f9b703d31f94fcd0c49a424a9fcfbc4
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/$(COMPONENT_NAME)/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_BUGDB= utility/asciidoc
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
f9aef05653eeb454c489d5bd2bde6daab774ad4aTinderbox UserTPNO= 14505
f70a10508f030b097a9b8afe907a06f9a1e2c4d4Tinderbox User
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntinclude $(WS_MAKE_RULES)/prep.mk
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntinclude $(WS_MAKE_RULES)/configure.mk
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntinclude $(WS_MAKE_RULES)/ips.mk
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntPATCH_LEVEL = 0
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# AsciiDoc configuration and data files belong in /usr/share, not /etc based
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# on discussion from ARC pre-review.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt#
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCONFIGURE_OPTIONS += --sysconfdir=/usr/share
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# pkgdepend doesn't like the first line of a Python script to be:
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python$(PYTHON_VERSION)'
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt#
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntCOMPONENT_POST_INSTALL_ACTION += \
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt $(PROTOUSRBINDIR64)/asciidoc.py;
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_POST_INSTALL_ACTION += \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt $(GSED) -i -e 's?env python?python$(PYTHON_VERSION)?' \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt $(PROTOUSRBINDIR64)/a2x.py;
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_PRE_CONFIGURE_ACTION = \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt ($(CLONEY) $(SOURCE_DIR) $(@D))
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntASLR_MODE = $(ASLR_ENABLE)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# common targets
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntconfigure: $(CONFIGURE_64)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntbuild: $(BUILD_64)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Huntinstall: $(INSTALL_64)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# Tests require image/graphviz to be installed. Some tests also want to run
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# programs which are not automatically available on Solaris (latex, abc2ly
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# and lilypad), so these tests will output messages of the form:
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# latex2png.py: failed command: latex ...
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# music2png.py: failed command: abc2ly ...
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt# music2png.py: failed command: lilypond ...
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_PRE_TEST_ACTION = \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt (cd $(@D); ln -s asciidoc.py asciidoc)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_TEST_DIR = $(@D)/tests
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_TEST_ENV_CMD =
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_TEST_ENV = export PATH=$(@D):$$PATH;
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntCOMPONENT_TEST_CMD = \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt python$(PYTHON_VERSION) ./asciidocapi.py; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt if [ $$? -eq 0 ] ; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt then print "asciidocapi test passed"; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt else print "asciidocapi test failed"; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt fi; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt python$(PYTHON_VERSION) ./testasciidoc.py update; \
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt python$(PYTHON_VERSION) ./testasciidoc.py run
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntCOMPONENT_TEST_TARGETS =
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntCOMPONENT_POST_TEST_ACTION = \
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt (cd $(@D); rm asciidoc)
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt# The additional asciidoc specific set of transforms to be applied to the
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt# test results to try to normalize them.
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan HuntCOMPONENT_TEST_TRANSFORMS += \
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt '-e "s|/tmp......|/tmpxxxxxx|g" '
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunt
7d2b185f16b165e311e5b451324fe9ab9898dcedEvan Hunttest: $(TEST_64)
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntREQUIRED_PACKAGES += library/libxml2
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntREQUIRED_PACKAGES += library/libxslt
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntREQUIRED_PACKAGES += runtime/python-26
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntREQUIRED_PACKAGES += web/browser/lynx
831f59eb43b56642b00f82e07722836d2f9593abEvan HuntREQUIRED_PACKAGES += web/browser/w3m
831f59eb43b56642b00f82e07722836d2f9593abEvan Hunt