Backport of hook_library() for Drupal 6? I've come to love the hook_library() of Drupal 7 as an extremely clean way of including assets etc. I'm fully aware of the many different ways to include assets intelligently (including the context_addassets module) but I'd love a near exact drop in backport for the hook_library() that Drupal 7 provides.

Note: Using mymodule_library() essentially defines a list of css/js (and their dependant libraries) which can be added in one simple call to drupal_add_library()
The module that originated the patch that introduced hook_library() in Drupal 7 is the jQ module (see Allow to add JS/CSS libraries (sets of files, settings, and dependent libraries). The hooks used by that module are different, but that is the module that is closer to what you are looking for. That module requires you to call a different function, but using drupal_add_js() would require you to hack the Drupal core, which is something it is never suggested to do, in the cases where you want absolute compatibility between Drupal 6 and Drupal 7.