summaryrefslogtreecommitdiff
path: root/pkgtools/pkgtasks/files/ocaml_findlib.subr
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2017-08-10 05:38:30 +0000
committerjlam <jlam@pkgsrc.org>2017-08-10 05:38:30 +0000
commite9fcc5515da8d69e0761eef6cc38269b72d10619 (patch)
tree52c0fd22aa3390085287abc9a38660dd2b425c6d /pkgtools/pkgtasks/files/ocaml_findlib.subr
parent55c3eac508427d74cacd3ab66f2f49373af8993d (diff)
downloadpkgsrc-e9fcc5515da8d69e0761eef6cc38269b72d10619.tar.gz
Update pkgtools/pkgtasks to version 1.13.
* Add a "icon_themes" task to cache GTK+ icon theme directories. * Change the way that install-info(1) is invoked. * Clarify the output from the "groups" and "users" tasks. * Bug fixes.
Diffstat (limited to 'pkgtools/pkgtasks/files/ocaml_findlib.subr')
-rw-r--r--pkgtools/pkgtasks/files/ocaml_findlib.subr17
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgtools/pkgtasks/files/ocaml_findlib.subr b/pkgtools/pkgtasks/files/ocaml_findlib.subr
index 5f73f83f7d0..89bb6f6ef32 100644
--- a/pkgtools/pkgtasks/files/ocaml_findlib.subr
+++ b/pkgtools/pkgtasks/files/ocaml_findlib.subr
@@ -102,6 +102,7 @@ __task_ocaml_findlib_init__="_task_ocaml_findlib_init"
task_load cleanup
task_load echo
task_load lock
+task_load makedir
task_load maketemp
task_load match
task_load quote
@@ -173,15 +174,21 @@ task_ocaml_findlib()
[!/]*) ldconf="$prefix/$ldconf" ;;
esac
ldconf="${PKG_DESTDIR}$ldconf"
+ local ldconfdir=${ldconf%/*}
line_result=0
case $action in
add|remove)
- lock="$ldconf.lock"
- task_quote "$lock"
- lock_quoted=$quoted
- __task_ocaml_findlib_locks__="$quoted $__task_ocaml_findlib_locks__"
- task_lock "$lock" || line_result=1
+ # Ensure that the ld.conf directory exists.
+ [ -d "$ldconfdir" ] || task_makedir "$ldconfdir" 2>/dev/null
+ [ -d "$ldconfdir" ] || line_result=1
+ if [ $line_result -eq 0 ]; then
+ lock="$ldconf.lock"
+ task_quote "$lock"
+ lock_quoted=$quoted
+ __task_ocaml_findlib_locks__="$quoted $__task_ocaml_findlib_locks__"
+ task_lock "$lock" || line_result=1
+ fi ;;
esac
if [ $line_result -eq 0 ]; then
case $action in