FreeBSD Bugzilla – Attachment 152712 Details for
Bug 197012
Rework dependency registration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
the patch
rework-dependency-registration.diff (text/plain), 6.27 KB, created by
Antoine Brodin
on 2015-02-08 17:53:54 UTC
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Antoine Brodin
Created:
2015-02-08 17:53:54 UTC
Size:
6.27 KB
patch
obsolete
>Index: Mk/Scripts/actual-package-depends.sh >=================================================================== >--- Mk/Scripts/actual-package-depends.sh (svn+ssh://svn.freebsd.org/ports/head) (revision 0) >+++ Mk/Scripts/actual-package-depends.sh (revision 378662) >@@ -0,0 +1,72 @@ >+#!/bin/sh >+# MAINTAINER: portmgr@FeeeBSD.org >+# $FreeBSD$ >+ >+if [ -z "${PKG_BIN}" ]; then >+ echo "PKG_BIN required in environment." >&2 >+ exit 1 >+fi >+ >+resolv_symlink() { >+ local file tgt >+ file=${1} >+ if [ ! -L ${file} ] ; then >+ echo ${file} >+ return >+ fi >+ >+ tgt=`readlink ${file}` >+ case $tgt in >+ /*) >+ echo $tgt >+ return >+ ;; >+ esac >+ >+ file=${file%/*}/${tgt} >+ absolute_path ${file} >+} >+ >+absolute_path() { >+ local file myifs target >+ file=$1 >+ >+ myifs=${IFS} >+ IFS='/' >+ set -- ${file} >+ IFS=${myifs} >+ for el; do >+ case $el in >+ .) continue ;; >+ '') continue ;; >+ ..) target=${target%/*} ;; >+ *) target="${target}/${el}" ;; >+ esac >+ done >+ echo ${target} >+} >+ >+find_dep() { >+ pattern=$1 >+ case ${pattern} in >+ *\>*|*\<*|*=*) >+ ${PKG_BIN} info -Eg "${pattern}" 2>/dev/null >+ return >+ ;; >+ /*) >+ searchfile=$pattern >+ ;; >+ *) >+ searchfile=$(/usr/bin/which ${pattern} 2>/dev/null) >+ ;; >+ esac >+ if [ -n "${searchfile}" ]; then >+ echo $(resolv_symlink ${searchfile}) >&2 >+ ${PKG_BIN} which -q ${searchfile} || ${PKG_BIN} which -q "$(resolv_symlink ${searchfile} 2>/dev/null)" || >+ echo "actual-package-depends: dependency on ${searchfile} not registered (normal if it belongs to base)" >&2 >+ fi >+} >+ >+for lookup; do >+ ${PKG_BIN} query "\"%n\": {origin: \"%o\", version: \"%v\"}" "$(find_dep ${lookup})" || : >+done > >Property changes on: Mk/Scripts/actual-package-depends.sh >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: Mk/Scripts/find-lib.sh >=================================================================== >--- Mk/Scripts/find-lib.sh (svn+ssh://svn.freebsd.org/ports/head) (revision 0) >+++ Mk/Scripts/find-lib.sh (revision 378662) >@@ -0,0 +1,62 @@ >+#!/bin/sh >+# MAINTAINER: portmgr@FreeBSD.org >+# $FreeBSD$ >+ >+if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then >+ echo "LIB_DIRS, LOCALBASE required in environment." >&2 >+ exit 1 >+fi >+ >+if [ $# -ne 1 ]; then >+ echo "$0: no argument provided." >&2 >+fi >+ >+lib=$1 >+dirs="${LIB_DIRS} `cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :`" >+ >+resolv_symlink() { >+ local file tgt >+ file=${1} >+ if [ ! -L ${file} ] ; then >+ echo ${file} >+ return >+ fi >+ >+ tgt=`readlink ${file}` >+ case $tgt in >+ /*) >+ echo $tgt >+ return >+ ;; >+ esac >+ >+ file=${file%/*}/${tgt} >+ absolute_path ${file} >+} >+ >+absolute_path() { >+ local file myifs target >+ file=$1 >+ >+ myifs=${IFS} >+ IFS='/' >+ set -- ${file} >+ IFS=${myifs} >+ for el; do >+ case $el in >+ .) continue ;; >+ '') continue ;; >+ ..) target=${target%/*} ;; >+ *) target="${target}/${el}" ;; >+ esac >+ done >+ echo ${target} >+} >+ >+for libdir in ${dirs} ; do >+ test -f ${libdir}/${lib} || continue >+ libfile=`resolv_symlink ${libdir}/${lib}` >+ [ `file -b -L --mime-type ${libfile}` = "application/x-sharedlib" ] || continue >+ echo $libfile >+ break >+done > >Property changes on: Mk/Scripts/find-lib.sh >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: Mk/bsd.port.mk >=================================================================== >--- Mk/bsd.port.mk (svn+ssh://svn.freebsd.org/ports/head) (revision 378662) >+++ Mk/bsd.port.mk (working copy) >@@ -1766,9 +1766,12 @@ > PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' > > _GL_gbm_LIB_DEPENDS= libgbm.so:${PORTSDIR}/graphics/gbm >-_GL_glesv2_LIB_DEPENDS= libGLESv2.so:${PORTSDIR}/graphics/libglesv2 >-_GL_egl_LIB_DEPENDS= libEGL.so:${PORTSDIR}/graphics/libEGL >-_GL_gl_LIB_DEPENDS= libGL.so:${PORTSDIR}/graphics/libGL >+_GL_glesv2_BUILD_DEPENDS= libglesv2>0:${PORTSDIR}/graphics/libglesv2 >+_GL_glesv2_RUN_DEPENDS= libglesv2>0:${PORTSDIR}/graphics/libglesv2 >+_GL_egl_BUILD_DEPENDS= libEGL>0:${PORTSDIR}/graphics/libEGL >+_GL_egl_RUN_DEPENDS= libEGL>0:${PORTSDIR}/graphics/libEGL >+_GL_gl_BUILD_DEPENDS= libGL>0:${PORTSDIR}/graphics/libGL >+_GL_gl_RUN_DEPENDS= libGL>0:${PORTSDIR}/graphics/libGL > _GL_gl_USE_XORG= glproto dri2proto > _GL_glew_LIB_DEPENDS= libGLEW.so:${PORTSDIR}/graphics/glew > _GL_glu_LIB_DEPENDS= libGLU.so:${PORTSDIR}/graphics/libGLU >@@ -4473,18 +4476,8 @@ > target="${DEPENDS_TARGET}"; \ > depends_args="${DEPENDS_ARGS}"; \ > ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library: $${lib}" ; \ >- found=0 ; \ >- dirs="${LIB_DIRS} `${CAT} ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || : `" ; \ >- for libdir in $$dirs; do \ >- test -f $${libdir}/$${lib} || continue; \ >- if [ -x /usr/bin/file ]; then \ >- _LIB_FILE=`realpath $${libdir}/$${lib}`; \ >- [ `file -b -L --mime-type $${_LIB_FILE}` = "application/x-sharedlib" ] || continue ; \ >- fi ; \ >- found=1 ; \ >- ${ECHO_MSG} -n " - found ($${_LIB_FILE})"; \ >- done ; \ >- if [ $${found} -eq 0 ]; then \ >+ libfile=`${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}` ; \ >+ if [ -z "$${libfile}" ]; then \ > ${ECHO_MSG} " - not found"; \ > ${ECHO_MSG} "===> Verifying for $$lib in $$dir"; \ > if [ ! -d "$$dir" ] ; then \ >@@ -4493,7 +4486,7 @@ > ${_INSTALL_DEPENDS} \ > fi ; \ > else \ >- ${ECHO_MSG}; \ >+ ${ECHO_MSG} " - found ($${libfile})"; \ > fi ; \ > done > .endif >@@ -4801,9 +4794,11 @@ > done > > ACTUAL-PACKAGE-DEPENDS?= \ >- if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \ >- ${PKG_QUERY} "\"%n\": {origin: %o, version: \"%v\"}" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \ >- fi >+ depfiles="" ; \ >+ for lib in ${LIB_DEPENDS:C/\:.*//}; do \ >+ depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ >+ done ; \ >+ ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} > > create-manifest: > @${MKDIR} ${METADIR}; \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197012
:
152036
|
152064
|
152121
| 152712