diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2009-11-23 18:50:22 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2009-11-23 18:50:22 -0800 |
commit | 3cb604acdf3ee68ff6420372d367768b60383d56 (patch) | |
tree | 21a81d7f7861db21f2ee4b4d861f9bccdaa3f715 /files.c | |
parent | d5357451067ca1320a41299b2ca12937331267da (diff) |
195.22195.22
Diffstat (limited to 'files.c')
-rw-r--r-- | files.c | 44 |
1 files changed, 42 insertions, 2 deletions
@@ -503,6 +503,16 @@ int set_destinations(Options *op, Package *p) case FILE_TYPE_OPENGL_LIB: case FILE_TYPE_OPENGL_SYMLINK: + if (p->entries[i].flags & FILE_CLASS_COMPAT32) { + prefix = op->compat32_prefix; + dir = op->compat32_libdir; + } else { + prefix = op->opengl_prefix; + dir = op->opengl_libdir; + } + path = ""; + break; + case FILE_TYPE_VDPAU_LIB: case FILE_TYPE_VDPAU_SYMLINK: if (p->entries[i].flags & FILE_CLASS_COMPAT32) { @@ -512,7 +522,7 @@ int set_destinations(Options *op, Package *p) prefix = op->opengl_prefix; dir = op->opengl_libdir; } - path = ""; + path = p->entries[i].path; break; case FILE_TYPE_CUDA_LIB: @@ -524,7 +534,7 @@ int set_destinations(Options *op, Package *p) prefix = op->opengl_prefix; dir = op->opengl_libdir; } - path = ""; + path = p->entries[i].path; break; case FILE_TYPE_XLIB_SHARED_LIB: @@ -1179,6 +1189,36 @@ int install_file(Options *op, const char *srcfile, } /* install_file() */ +/* + * install_symlink() - install dstfile as a symlink to linkname; this + * is done by extracting the directory portion of dstfile, creating + * that directory if it does not exist, and then calling symlink(). + */ + +int install_symlink(Options *op, const char *linkname, const char *dstfile) +{ + int retval; + char *dirc, *dname; + + dirc = nvstrdup(dstfile); + dname = dirname(dirc); + + if (!mkdir_recursive(op, dname, 0755)) { + free(dirc); + return FALSE; + } + + if (symlink(linkname, dstfile)) { + free(dirc); + return FALSE; + } + + free(dirc); + return TRUE; + +} /* install_symlink() */ + + size_t get_file_size(Options *op, const char *filename) { |