components/pixz/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Tue, 29 Mar 2016 08:04:20 -0700
changeset 5670 0a64c2dc45bc
parent 4913 99fb83e21e09
child 5682 94c0ca64c022
permissions -rw-r--r--
22961314 Update pixz to version 1.0.6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     1
#
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     3
#
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     7
#
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
#
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
#
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    20
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    21
#
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    22
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
#
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    24
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
include ../../make-rules/shared-macros.mk
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    26
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    27
COMPONENT_NAME=		pixz
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    28
COMPONENT_VERSION=	1.0.6
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://github.com/vasi/pixz/
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    33
    sha256:c54a406dddc6c2226779aeb4b5d5b5649c1d3787b39794fbae218f7535a1af63
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    34
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)releases/download/v$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    35
COMPONENT_BUGDB=	utility/pixz
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    36
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    37
TPNO=			27449
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1318
diff changeset
    38
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    39
include $(WS_MAKE_RULES)/prep.mk
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    40
include $(WS_MAKE_RULES)/configure.mk
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    41
include $(WS_MAKE_RULES)/ips.mk
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    42
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    43
PKG_PROTO_DIRS += $(BUILD_DIR_64)
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    44
PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    45
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    46
# Needed to make the tests work, now we use configure.mk not justmake.mk.
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    47
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    48
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    49
# Userland default includes -mt which links with libthread which we don't need.
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    50
studio_MT =
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    51
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    52
# pixz's src/Makefile hard-codes some gcc-only flags in pixz_CFLAGS.
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    53
# Here we exclude the gcc-only parts, so we can build with Studio.
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    54
# PTHREAD_CFLAGS is defined in the pixz .../src/Makefile.
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    55
COMPONENT_BUILD_ARGS += CC="$(CC)"
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    56
COMPONENT_BUILD_ARGS += pixz_CFLAGS="$(PTHREAD_CFLAGS)"
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    57
COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    58
COMPONENT_BUILD_ARGS += LDFLAGS="$(CC_BITS)"
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    59
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    60
# Create a small testball to use with the test script.
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    61
COMPONENT_PRE_TEST_ACTION = \
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    62
	(cd $(@D)/src; tar cvf pixz-test-tarball.tar  *.c *.o)
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    63
COMPONENT_PRE_SYSTEM_TEST_ACTION = \
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    64
	(cd $(@D)/src; tar cvf pixz-test-tarball.tar  *.c *.o)
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    65
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    66
COMPONENT_TEST_TRANSFORMS += \
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    67
	'-e "/^real/d" ' \
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    68
	'-e "/^user/d" ' \
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    69
	'-e "/^sys/d" '
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    70
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    71
COMPONENT_TEST_ENV =		PATH=$(GNUBIN):$(PATH)
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    72
COMPONENT_TEST_CMD =		$(SOURCE_DIR)/test.sh
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    73
COMPONENT_TEST_ARGS =		src/pixz-test-tarball.tar pixz.c
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    74
COMPONENT_TEST_TARGETS =
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    75
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    76
COMPONENT_SYSTEM_TEST_ENV =	PATH=$(GNUBIN):$(PATH)
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    77
COMPONENT_SYSTEM_TEST_ENV +=	PIXZ_BIN=/usr/bin/pixz
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    78
COMPONENT_SYSTEM_TEST_CMD =	$(SOURCE_DIR)/test.sh
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    79
COMPONENT_SYSTEM_TEST_ARGS =	src/pixz-test-tarball.tar pixz.c
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    80
COMPONENT_SYSTEM_TEST_TARGETS =
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    81
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    82
ASLR_MODE = $(ASLR_ENABLE)
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    83
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    84
build:		$(BUILD_64)
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    85
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    86
install:	$(BUILD_64)
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    87
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    88
test:		$(TEST_64)
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    89
4913
99fb83e21e09 19841305 Some pixz tests can be hooked up.
Rich Burridge <rich.burridge@oracle.com>
parents: 4339
diff changeset
    90
system-test:    build $(SYSTEM_TEST_64)
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 3817
diff changeset
    91
1318
e26b2e3ea279 PSARC 2012/358 pixz
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    92
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    93
REQUIRED_PACKAGES += compress/xz
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    94
REQUIRED_PACKAGES += library/libarchive
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    95
REQUIRED_PACKAGES += system/library
5670
0a64c2dc45bc 22961314 Update pixz to version 1.0.6
Rich Burridge <rich.burridge@oracle.com>
parents: 4913
diff changeset
    96
REQUIRED_PACKAGES += system/library/math