author | Huie-Ying Lee <huieying.lee@oracle.com> |
Tue, 20 Sep 2016 12:05:25 -0700 | |
branch | s11u3-sru |
changeset 6937 | 1366743d2272 |
parent 6358 | 3b2a73b969a9 |
permissions | -rw-r--r-- |
2651 | 1 |
# |
2 |
# CDDL HEADER START |
|
3 |
# |
|
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. |
|
7 |
# |
|
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. |
|
12 |
# |
|
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] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
21 |
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. |
2651 | 22 |
# |
23 |
include ../../make-rules/shared-macros.mk |
|
24 |
||
25 |
COMPONENT_NAME= libarchive |
|
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
26 |
COMPONENT_VERSION= 3.2.1 |
2651 | 27 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
28 |
COMPONENT_PROJECT_URL= http://www.libarchive.org/ |
2651 | 29 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
30 |
COMPONENT_ARCHIVE_HASH= \ |
|
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
31 |
sha256:72ee1a4e3fd534525f13a0ba1aa7b05b203d186e0c6072a8a4738649d0b3cfd2 |
2651 | 32 |
COMPONENT_ARCHIVE_URL= \ |
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
33 |
$(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE) |
2651 | 34 |
COMPONENT_BUGDB= library/libarchive |
35 |
||
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
36 |
TPNO= 29683 |
3661
47545fb8aed4
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents:
2651
diff
changeset
|
37 |
|
3996
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
38 |
include $(WS_MAKE_RULES)/prep.mk |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
39 |
include $(WS_MAKE_RULES)/configure.mk |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
40 |
include $(WS_MAKE_RULES)/ips.mk |
2651 | 41 |
|
42 |
# Userland default includes -mt which links with libthread which we don't need. |
|
43 |
studio_MT = |
|
44 |
||
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
45 |
CONFIGURE_OPTIONS += --disable-static |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
46 |
CONFIGURE_OPTIONS += --enable-shared |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
47 |
CONFIGURE_OPTIONS += --enable-largefile |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
48 |
# We prefer openssl over nettle. |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
49 |
CONFIGURE_OPTIONS += --without-nettle |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
50 |
CONFIGURE_OPTIONS += --with-openssl |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
51 |
CONFIGURE_OPTIONS += --with-pic |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
52 |
CONFIGURE_OPTIONS += --with-xml2 |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
53 |
CONFIGURE_OPTIONS += --with-zlib |
4993
efe17d59c020
20368257 Add Nettle to Userland
dongszha <dongsheng.zhang@oracle.com>
parents:
3996
diff
changeset
|
54 |
|
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
55 |
# We still have an older version of xz that doesn't support this. |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
56 |
CONFIGURE_OPTIONS += "ac_cv_lzma_has_mt=no" |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
57 |
|
2651 | 58 |
# libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then |
59 |
# appends CFLAGS to that. Reset the former here so we can build with Studio. |
|
60 |
COMPONENT_BUILD_ARGS += COMMON_CFLAGS='' |
|
61 |
COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)" |
|
62 |
COMPONENT_TEST_ARGS += COMMON_CFLAGS='' |
|
63 |
COMPONENT_TEST_ARGS += CFLAGS="$(CFLAGS)" |
|
64 |
||
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
65 |
# Get correct libarchive.so from the proto area. |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
66 |
TEST_LIBPATH.32 = $(PROTOUSRLIBDIR) |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
67 |
TEST_LIBPATH.64 = $(PROTOUSRLIBDIR64) |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
68 |
COMPONENT_TEST_ENV += LD_LIBRARY_PATH=$(TEST_LIBPATH.$(BITS)) |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
69 |
|
2651 | 70 |
# We need GNU awk for the following to work; hence the PATH tweak. |
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
71 |
# We then convert BSD-style section numbers in the libarchive man pages to |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
72 |
# Solaris-style section numbers. |
2651 | 73 |
COMPONENT_PREP_ACTION = \ |
6164
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
74 |
cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
75 |
cd $(@D)/libarchive ; \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
76 |
find . -name "*\.[35]" | xargs $(GSED) -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
77 |
find . -name "*\.[35]" | xargs $(GSED) -i \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
78 |
-e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
79 |
-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \ |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
80 |
-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/'; |
66436ccdbe51
23300035 problem in LIBRARY/LIBARCHIVE
Rich Burridge <rich.burridge@oracle.com>
parents:
4993
diff
changeset
|
81 |
|
2651 | 82 |
PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man |
83 |
||
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
84 |
# Needed for "gmake test" to work successfully. |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
85 |
# If SHELLOPTS is exported (as it is by the userland makefiles), |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
86 |
# then all shell options get exported to child invocations of bash, |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
87 |
# which results in test failures due to nounset and xtrace being |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
88 |
# set unexpectedly, and errors such as "$1: unbound variable" and |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
89 |
# diffs failing due to script tracing in output files. |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
90 |
unexport SHELLOPTS |
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
91 |
|
2651 | 92 |
build: $(BUILD_32_and_64) |
93 |
||
94 |
install: $(INSTALL_32_and_64) |
|
95 |
||
6358
3b2a73b969a9
23640205 Update libarchive to version 3.2.1
Rich Burridge <rich.burridge@oracle.com>
parents:
6164
diff
changeset
|
96 |
test: install $(TEST_32_and_64) |
2651 | 97 |
|
3996
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
98 |
REQUIRED_PACKAGES += compress/bzip2 |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
99 |
REQUIRED_PACKAGES += compress/xz |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
100 |
REQUIRED_PACKAGES += library/libxml2 |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
101 |
REQUIRED_PACKAGES += library/security/openssl |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
102 |
REQUIRED_PACKAGES += library/zlib |
20c0f21bbe1e
15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
3661
diff
changeset
|
103 |
REQUIRED_PACKAGES += system/library |