mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
Make USE_NCURSES and USE_OPENSSL work with pkgng in case people are using
ncurses and/or openssl from ports
This commit is contained in:
parent
e9c99ee71f
commit
a1245a1828
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295006
@ -1,3 +1,5 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# the user/port can now set this options in the makefiles.
|
||||
#
|
||||
# WITH_NCURSES_BASE=yes - Use the version in the base system.
|
||||
@ -55,6 +57,14 @@ NCURSESINC= ${NCURSESBASE}/include/ncurses
|
||||
# find installed port and use it for dependency
|
||||
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
|
||||
.if !defined(NCURSES_INSTALLED)
|
||||
.if defined(WITH_PKGNG)
|
||||
.if defined(DESTDIR)
|
||||
PKGARGS= -c ${DESTDIR}
|
||||
.else
|
||||
PKGARGS=
|
||||
.endif
|
||||
NCURSES_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libncurses.so
|
||||
.else
|
||||
NCURSES_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
|
||||
xargs -0 grep -l "^lib/libncurses.so." | \
|
||||
while read contents; do \
|
||||
@ -62,9 +72,15 @@ NCURSES_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
|
||||
if test "$${ncursesprefix}" = "@cwd ${LOCALBASE}" ; then \
|
||||
echo "$${contents}"; break; fi; done
|
||||
.endif
|
||||
.endif
|
||||
.if defined(NCURSES_INSTALLED) && ${NCURSES_INSTALLED} != ""
|
||||
.if defined(WITH_PKGNG)
|
||||
NCURSES_PORT= ${NCURSES_INSTALLED}
|
||||
NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | grep "^`pkg query "%p" ${OPENSSL_INSTALLED}`/lib/libncurses.so."
|
||||
.else
|
||||
NCURSES_PORT!= grep "^@comment ORIGIN:" "${NCURSES_INSTALLED}" | ${CUT} -d : -f 2
|
||||
NCURSES_SHLIBFILE!= grep -m 1 "^lib/libncurses.so." "${NCURSES_INSTALLED}"
|
||||
.endif
|
||||
NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E}
|
||||
.else
|
||||
# PKG_DBDIR was not found, default
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Date created: 31 May 2002
|
||||
# Whom: dinoex
|
||||
#
|
||||
# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.openssl.mk,v 1.47 2012-04-15 07:31:52 dinoex Exp $
|
||||
# $FreeBSD: /tmp/pcvs/ports/Mk/bsd.openssl.mk,v 1.48 2012-04-18 11:38:20 bapt Exp $
|
||||
#
|
||||
# Use of 'USE_OPENSSL=yes' includes this Makefile after bsd.ports.pre.mk
|
||||
#
|
||||
@ -100,6 +100,14 @@ OPENSSLBASE= ${LOCALBASE}
|
||||
# find installed port and use it for dependency
|
||||
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
|
||||
.if !defined(OPENSSL_INSTALLED)
|
||||
.if defined(WITH_PKGNG)
|
||||
.if defined(DESTDIR)
|
||||
PKGARGS= -c ${DESTDIR}
|
||||
.else
|
||||
PKGARGS=
|
||||
.endif
|
||||
OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so
|
||||
.else
|
||||
OPENSSL_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
|
||||
xargs -0 grep -l "^lib/libssl.so." | \
|
||||
while read contents; do \
|
||||
@ -107,9 +115,15 @@ OPENSSL_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \
|
||||
if test "$${sslprefix}" = "@cwd ${LOCALBASE}" ; then \
|
||||
echo "$${contents}"; break; fi; done
|
||||
.endif
|
||||
.endif
|
||||
.if defined(OPENSSL_INSTALLED) && ${OPENSSL_INSTALLED} != ""
|
||||
.if defined(WITH_PKGNG)
|
||||
OPENSSL_PORT= ${OPENSSL_INSTALLED}
|
||||
OPENSSL_SHLIBFILE!= ${PKG_INFO} -ql ${OPENSSL_INSTALLED} | grep "^`pkg query "%p" ${OPENSSL_INSTALLED}`/lib/libssl.so."
|
||||
.else
|
||||
OPENSSL_PORT!= grep "^@comment ORIGIN:" "${OPENSSL_INSTALLED}" | ${CUT} -d : -f 2
|
||||
OPENSSL_SHLIBFILE!= grep "^lib/libssl.so." "${OPENSSL_INSTALLED}"
|
||||
.endif
|
||||
OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E}
|
||||
.else
|
||||
# PKG_DBDIR was not found, default
|
||||
|
Loading…
Reference in New Issue
Block a user