ports/162995: Add USE_READLINE knob
Max Khon
fjoe at FreeBSD.org
Thu Dec 1 14:10:10 UTC 2011
>Number: 162995
>Category: ports
>Synopsis: Add USE_READLINE knob
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 01 14:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Max Khon
>Release: FreeBSD 8.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #5 r227907: Wed Nov 23 21:55:50 UTC 2011 simon at freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386
>Description:
Attached patch adds USE_READLINE support with the support for
upcoming removal of libreadline from 10.0.
Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.699
diff -u -p -r1.699 bsd.port.mk
--- Mk/bsd.port.mk 9 Nov 2011 08:53:12 -0000 1.699
+++ Mk/bsd.port.mk 1 Dec 2011 13:57:23 -0000
@@ -375,6 +375,12 @@ FreeBSD_MAINTAINER= portmgr at FreeBSD.org
# USE_SDL - If set, this port uses the sdl libraries.
# See bsd.sdl.mk for more information.
##
+# USE_READLINE - If set, this port uses libreadline.
+# Legal values are: yes, base, port
+# yes, base: use base system libreadline on FreeBSD 9 or earlier,
+# use ports/devel/readline on FreeBSD 10.0+
+# port: always use ports/devel/readline
+##
# USE_OPENAL - If set, this port relies on the OpenAL package.
# Legal values are: al, soft, si, alut.
# If set to an unknown value, the port is marked broken.
@@ -1705,6 +1711,15 @@ MAKE_ENV+= ${b}="${${b}}"
.include "${PORTSDIR}/Mk/bsd.ldap.mk"
.endif
+.if defined(USE_READLINE)
+.if ${USE_READLINE} == "port" || ${OSVERSION} > 900000 #1000000
+LIB_DEPENDS+= readline.6:${PORTSDIR}/devel/readline
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -lreadline
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+.endif
+.endif
+
.if defined(USE_OPENAL)
_OPENAL_ALL= al si soft alut
_OPENAL_LIBS= si soft
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list