<'
if {[llength $argv] != 2} { error "expected arguments: component types" }
lassign $argv comp types

set msgpkgs [dict create] ;# use a dict to avoid duplicates
dict set msgpkgs std_msgs {}
dict set msgpkgs actionlib_msgs {}
foreach t $types {
  if {[catch {$t masquerade ros} masquerade]} continue
  dict set msgpkgs [lindex [split $masquerade /] 0] {}
}
'>
# pkg-config file for <"[$comp name]">_ros
#
prefix=@prefix@
includedir=@includedir@

Name: <"[$comp name]">_ros
Description: <"[$comp name]"> ros client
Version: <"[$comp version]">
Requires: <"[dict keys $msgpkgs]">
Cflags: -I${includedir}
