#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= yasm
COMPONENT_VERSION= 1.3.0
COMPONENT_PROJECT_URL= http://yasm.tortall.net/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= \
sha256:3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
COMPONENT_ARCHIVE_URL= http://www.tortall.net/projects/$(COMPONENT_NAME)/releases/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= utility/yasm
TPNO= 23620
# We're i386-only
ifeq ($(MACH), sparc)
PUBLISH_STAMP=
endif
# Enable ASLR for this component
ASLR_MODE = $(ASLR_ENABLE)
PYTHON_VERSIONS= 2.7
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
# Adjust all the source files in all the Makefile.inc files to generate
# shared libraries rather than a library archive.
# Note that the version number (in the shared-libraries.patch file) should be
# bumped anytime upstream makes an incompatible change (that we're aware of).
COMPONENT_PRE_CONFIGURE_ACTION = \
$(CLONEY) $(SOURCE_DIR) $(@D) ; \
mlist=`/usr/bin/find $(SOURCE_DIR) -name 'Makefile.inc'` ; \
for f in $$mlist ; do \
$(GSED) -i -e 's|libyasm_a_SOURCES|libyasm_la_SOURCES|g' \
-e 's|LDADD = libyasm.a|LDADD = libyasm.la|g' \
$$f ; \
done ; \
(cd $(@D) ; \
libtoolize --automake --copy ; \
aclocal -I m4 ; \
autoheader ; \
automake --add-missing --copy ; \
autoconf)
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
CONFIGURE_ENV += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
CONFIGURE_OPTIONS += --enable-python
CONFIGURE_OPTIONS += --disable-python-bindings
# Needed for "gmake test" to work successfully.
# If SHELLOPTS is exported (as it is by the userland makefiles),
# then all shell options get exported to child invocations of bash,
# which results in test failures due to nounset and xtrace being
# set unexpectedly, and errors such as "$1: unbound variable" and
# diffs failing due to script tracing in output files.
unexport SHELLOPTS
sparc:
@echo "Not available."
configure_sparc: sparc
build_sparc: sparc
install_sparc: sparc
test_sparc: sparc
configure_i386: $(CONFIGURE_32_and_64)
build_i386: $(BUILD_32_and_64)
install_i386: $(INSTALL_32_and_64)
test_i386: $(TEST_32_and_64)
# common targets. we're i386-only so we have to
# be slightly tricky.
configure: configure_$(MACH)
build: build_$(MACH)
install: install_$(MACH)
test: test_$(MACH)
# Required for man pages.
REQUIRED_PACKAGES += developer/documentation-tool/xmlto
REQUIRED_PACKAGES += system/library