diff options
author | bapt <bapt@FreeBSD.org> | 2012-04-18 19:38:20 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-04-18 19:38:20 +0800 |
commit | 54a6e65711b7bba3a5bbde1743cc69ee010f2127 (patch) | |
tree | 261be00340d9ae75a40c96bcb1bfc6e2e9c59942 | |
parent | 88d96153e776135d6da48bf47ae208aa826e90a4 (diff) | |
download | freebsd-ports-gnome-54a6e65711b7bba3a5bbde1743cc69ee010f2127.tar.gz freebsd-ports-gnome-54a6e65711b7bba3a5bbde1743cc69ee010f2127.tar.zst freebsd-ports-gnome-54a6e65711b7bba3a5bbde1743cc69ee010f2127.zip |
Make USE_NCURSES and USE_OPENSSL work with pkgng in case people are using
ncurses and/or openssl from ports
-rw-r--r-- | Mk/bsd.ncurses.mk | 16 | ||||
-rw-r--r-- | Mk/bsd.openssl.mk | 16 |
2 files changed, 31 insertions, 1 deletions
diff --git a/Mk/bsd.ncurses.mk b/Mk/bsd.ncurses.mk index 8eb30a7d5f2f..c5f442607d7f 100644 --- a/Mk/bsd.ncurses.mk +++ b/Mk/bsd.ncurses.mk @@ -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 diff --git a/Mk/bsd.openssl.mk b/Mk/bsd.openssl.mk index 40f6d4872ebd..d33968a8750b 100644 --- a/Mk/bsd.openssl.mk +++ b/Mk/bsd.openssl.mk @@ -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 |