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.
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.
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]
22 # Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2018, Michal Nowak
24 # Copyright (c) 2023, Till Wegmueller
28 USE_COMMON_TEST_MASTER
= no
29 include ..
/..
/..
/make-rules
/shared-macros.mk
32 COMPONENT_VERSION
= 10.44
33 COMPONENT_SUMMARY
= Version
2 of Perl-Compatible Regular Expressions
34 COMPONENT_PROJECT_URL
= https
://pcre.org
/
35 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
36 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
37 COMPONENT_ARCHIVE_HASH
= sha256
:d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96
38 COMPONENT_ARCHIVE_URL
= https
://github.com
/PhilipHazel
/pcre2
/releases
/download
/$(COMPONENT_SRC
)/$(COMPONENT_ARCHIVE
)
39 COMPONENT_CLASSIFICATION
=Development
/C
40 COMPONENT_FMRI
= library
/pcre2
41 COMPONENT_CLASSIFICATION
= Development
/C
42 COMPONENT_LICENSE
= BSD
43 COMPONENT_LICENSE_FILE
= LICENCE
45 include $(WS_MAKE_RULES
)/common.mk
47 TEST_TARGET
= install $(TEST_32_and_64
)
49 # pick up -std=c99 in CFLAGS
54 # turn on largefile support
55 CFLAGS
+= $(CPP_LARGEFILES
)
59 CONFIGURE_ENV
+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
60 CONFIGURE_ENV
+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
61 CONFIGURE_ENV
+= "CXXLDFLAGS=$(LDFLAGS)"
62 CONFIGURE_ENV
+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
63 CONFIGURE_ENV
+= "INSTALL=$(INSTALL)"
64 CONFIGURE_ENV
+= "MAKE=$(GMAKE)"
66 CONFIGURE_ENV
.64 += "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
67 CONFIGURE_ENV
.64 += "MACH64=$(MACH64)"
69 CONFIGURE_OPTIONS
+= --includedir=$(CONFIGURE_INCLUDEDIR
)/pcre
70 CONFIGURE_OPTIONS
+= --localstatedir
=$(VARDIR
)
71 CONFIGURE_OPTIONS
+= --disable-static
72 CONFIGURE_OPTIONS
+= --enable-rebuild-chartables
73 CONFIGURE_OPTIONS
+= --enable-newline-is-any
74 CONFIGURE_OPTIONS
+= --enable-pcre2grep-libz
75 CONFIGURE_OPTIONS
+= --enable-pcre2grep-libbz2
76 CONFIGURE_OPTIONS
+= --enable-pcre2-16
77 CONFIGURE_OPTIONS
+= --enable-pcre2-32
78 CONFIGURE_OPTIONS
+= --with-link-size
=4
79 CONFIGURE_OPTIONS
+= --with-match-limit
=10000000
80 CONFIGURE_OPTIONS
+= --with-pic
81 # Enable UTF8 support (was --enable-utf8 in pcre(1) configure).
82 CONFIGURE_OPTIONS
+= --enable-pcre2-8
83 # Enable Unicode support (was --enable-unicode-properties in pcre(1) configure).
84 CONFIGURE_OPTIONS
+= --enable-unicode
86 COMPONENT_BUILD_ENV
+= "LDFLAGS=$(LDFLAGS)"
87 COMPONENT_BUILD_ENV
+= "INSTALL=$(INSTALL)"
88 COMPONENT_BUILD_ENV
+= "MAKE=$(GMAKE)"
90 COMPONENT_BUILD_ARGS
+= -e
92 COMPONENT_INSTALL_ARGS
+= "INSTALL=$(INSTALL)"
94 # Get correct libpcre2-8.so.0 from the build area.
95 TEST_LIBPATH
.32 = $(PROTOUSRLIBDIR
)
96 TEST_LIBPATH
.64 = $(PROTOUSRLIBDIR64
)
97 COMPONENT_TEST_ENV
+= LD_LIBRARY_PATH
=$(TEST_LIBPATH.
$(BITS
))
99 COMPONENT_TEST_TRANSFORMS
+= \
100 '-e "/Nothing to be done/d"' \
101 '-e "/Leaving directory/d"' \
102 '-e "/Entering directory/d"' \
103 '-e "s|Testsuite summary for PCRE .*|Testsuite summary for PCRE|" '
105 # Auto-generated dependencies
106 REQUIRED_PACKAGES
+= compress
/bzip2
107 REQUIRED_PACKAGES
+= library
/zlib
108 REQUIRED_PACKAGES
+= shell/ksh93
109 REQUIRED_PACKAGES
+= system
/library