original_docstring:  Collect available pkgs in which have PACKAGECONFIG flags 
docstring: Collect available pkgs in which have PACKAGECONFIG flags
docstring_tokens: Collect available pkgs in which have PACKAGECONFIG flags
code: def collect_pkgs(data_dict):
      ''' Collect available pkgs in which have PACKAGECONFIG flags '''
      # pkg_dict = {'pkg1': ['flag1', 'flag2',...]}
      pkg_dict = {}
      for fn in data_dict:
          pkgconfigflags = data_dict[fn].getVarFlags("PACKAGECONFIG")
          pkgconfigflags.pop('doc', None)
          pkgname = data_dict[fn].getVar("P")
          pkg_dict[pkgname] = sorted(pkgconfigflags.keys())
  
      return pkg_dict
code_tokens: def collect_pkgs ( data_dict ) : pkg_dict = { } for fn in data_dict : pkgconfigflags = data_dict [ fn ] . getVarFlags ( "PACKAGECONFIG" ) pkgconfigflags . pop ( 'doc' , None ) pkgname = data_dict [ fn ] . getVar ( "P" ) pkg_dict [ pkgname ] = sorted ( pkgconfigflags . keys ( ) ) return pkg_dict
short_docstring: Collect available pkgs in which have PACKAGECONFIG flags
short_docstring_tokens: Collect available pkgs in which have PACKAGECONFIG flags
comment: ''' Collect available pkgs in which have PACKAGECONFIG flags '''$SEP$# pkg_dict = {'pkg1': ['flag1', 'flag2',...]}