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]
23 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
27 include ..
/..
/..
/make-rules
/shared-macros.mk
29 COMPONENT_NAME
= readline
31 COMPONENT_VERSION
= $(subst p
,.
,$(HUMAN_VERSION
))
32 COMPONENT_SUMMARY
= GNU readline provides interactive line-editing and history
33 COMPONENT_DESCRIPTION
= The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines
as they are typed in
34 COMPONENT_PROJECT_URL
= https
://tiswww.cwru.edu
/php
/chet
/readline
/rltop.html
35 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(firstword $(subst p
, ,$(HUMAN_VERSION
)))
36 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
37 COMPONENT_ARCHIVE_HASH
= sha256
:08835e57b5eb84f07f8fa50c7530e4b13b08265ffef340e4a4cce4ad6fb575fe
38 COMPONENT_ARCHIVE_URL
= https
://ftp.gnu.org
/gnu
/readline
/$(COMPONENT_ARCHIVE
)
39 COMPONENT_VERSION_MAJOR
= $(firstword $(subst .
, ,$(HUMAN_VERSION
)))
40 COMPONENT_FMRI
= library
/readline-
$(COMPONENT_VERSION_MAJOR
)
41 COMPONENT_CLASSIFICATION
= System
/Libraries
42 COMPONENT_LICENSE
= GPL-3.0
-only
43 COMPONENT_LICENSE_FILE
= COPYING
45 COMPONENT_FMRI.readline-32
= $(COMPONENT_FMRI
)/32
47 include $(WS_MAKE_RULES
)/common.mk
49 # We need this to handle official patches verbatim
52 CONFIGURE_OPTIONS
+= --enable-shared
53 CONFIGURE_OPTIONS
+= --disable-static
54 CONFIGURE_OPTIONS
+= --with-shared-termcap-library
56 # Build the readline examples as well (see the INSTALL file).
57 COMPONENT_BUILD_TARGETS
= everything
59 # Install the additional file
60 COMPONENT_POST_INSTALL_ACTION
+= \
61 $(INSTALL
) -Dm0444
$(SOURCE_DIR
)/examples
/Inputrc
$(PROTOUSRDIR
)/demo
/readline
/Inputrc
;
63 # We do not want the info index file
64 COMPONENT_POST_INSTALL_ACTION
+= $(RM
) $(PROTOUSRSHAREDIR
)/info/dir ;
66 COMPONENT_TEST_DIR
= $(@D
)/examples
67 COMPONENT_TEST_CMD
= $(CAT
) $(SOURCE_DIR
)/examples
/Inputrc | .
/rlcat
68 COMPONENT_TEST_TARGETS
=
70 # Needed to build the test program.
71 COMPONENT_PRE_TEST_ACTION
+= \
72 (cd
$(@D
) ; PATH
="$(PATH)" $(GMAKE
) libreadline.a
) ;
74 # Build the test program.
75 COMPONENT_PRE_TEST_ACTION
+= \
76 (cd
$(@D
)/examples
; PATH
="$(PATH)" $(GMAKE
) rlcat
) ;
78 # Get correct libreadline.so.6 from the proto area.
79 TEST_LIBPATH
.32= $(PROTOUSRLIBDIR
)
80 TEST_LIBPATH
.64= $(PROTOUSRLIBDIR64
)
81 COMPONENT_TEST_ENV
+= LD_LIBRARY_PATH
=$(TEST_LIBPATH.
$(BITS
))
83 test: install $(TEST_64_and_32
)
86 ifneq ($(strip $(COMPONENT_VERSION_MAJOR
)),$(strip $(READLINE_VERSION
)))
87 $(error READLINE_VERSION does not match the readline version
)
90 # Auto-generated dependencies
91 REQUIRED_PACKAGES
+= system
/library