ebuild.st 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. * Name: ebuild
  3. * Description: Gentoo Portage ebuild
  4. * Author: Ed Catmur <ed@catmur.co.uk>
  5. *
  6. * Based on gentoo.vim by Ciaran McCreesh <ciaranm@gentoo.org>
  7. */
  8. state ebuild extends bash
  9. {
  10. /* Variables */
  11. /^([ \t]*)([0-9a-zA-Z_.-]+)(=)/ {
  12. language_print ($1);
  13. variable_name_face(true);
  14. language_print ($2);
  15. variable_name_face(false);
  16. language_print ($3);
  17. }
  18. /* Core keywords */
  19. /\b(use|has_version|best_version|use_with|use_enable|check_KV\
  20. |keepdir|econf|die|einstall|einfo|ewarn|eerror|diropts\
  21. |dobin|docinto|dodoc|doexe|dohard|dohtml|doinfo|doins\
  22. |dolib|dolib|a|dolib|so|doman|dosbin|dosym|emake|exeinto\
  23. |exeopts|fowners|fperms|insinto|insopts|into|libopts|newbin\
  24. |newexe|newins|newman|newsbin|prepall|prepalldocs|prepallinfo\
  25. |prepallman|prepallstrip|has|unpack|dopython|dosed|into\
  26. |doinitd|doconfd|doenvd|dojar|domo|dodir|ebegin|eend\
  27. |newconfd|newdoc|newenvd|newinitd|newlib\.a|newlib\.so\
  28. |hasq|hasv|useq|usev\
  29. |addread|addwrite|adddeny|addpredict\
  30. |inherit\
  31. |EXPORT_FUNCTIONS)\b/ {
  32. keyword_face(true);
  33. language_print ($0);
  34. keyword_face (false);
  35. }
  36. /* Recognised functions */
  37. /\b(pkg_nofetch|pkg_setup|src_unpack|src_compile|src_test|src_install\
  38. |pkg_preinst|pkg_postinst|pkg_prerm|pkg_postrm|pkg_config)\b/ {
  39. function_name_face(true);
  40. language_print ($0);
  41. function_name_face(false);
  42. }
  43. /* Other keywords */
  44. /\b(gen_usr_ldscript|draw_line|epatch|have_NPTL|get_number_of_jobs|egetent\
  45. |emktemp|enewuser|enewgroup|edos2unix|make_desktop_entry|unpack_pdv\
  46. |unpack_makeself|check_license|cdrom_get_cds|cdrom_load_next\
  47. |cdrom_locate_file_on_cd|strip|linguas|epause|ebeep|built_with_use\
  48. |make_session_desktop|domenu|doicon|find_unpackable_file|unpack_pdv\
  49. |set_arch_to_kernel|set_arch_to_portage|preserve_old_lib\
  50. |preserve_old_lib_notify|built_with_use|epunt_cxx|dopamd|newpamd\
  51. |make_wrapper\
  52. |setup-allowed-flags|filter-flags|filter-lfs-flags|append-lfs-flags\
  53. |append-flags|replace-flags|replace-cpu-flags|is-flag|filter-mfpmath\
  54. |strip-flags|test_flag|test_version_info|strip-unsupported-flags|get-flag\
  55. |has_hardened|has_pic|has_pie|has_ssp_all|has_ssp|has_m64|has_m32\
  56. |replace-sparc64-flags|append-ldflags|filter-ldflags|fstack-flags|gcc2-flags\
  57. |gcc-getCC|gcc-getCXX|gcc-fullversion|gcc-version|gcc-major-version\
  58. |gcc-minor-version|gcc-micro-version|gcc-libpath|gcc-libstdcxx-version\
  59. |gcc-libstdcxx-major-version|gcc2-flags\
  60. |elibtoolize|uclibctoolize|darwintoolize\
  61. |ht_fix_file|ht_fix_all\
  62. |fdo-mime_desktop_database_update|fdo-mime_mime_database_update\
  63. |webapp_checkfileexists|webapp_import_config|webapp_strip_appdir\
  64. |webapp_strip_d|webapp_strip_cwd|webapp_configfile|webapp_hook_script\
  65. |webapp_postinst_txt|webapp_postupgrade_txt|webapp_runbycgibin\
  66. |webapp_serverowned|webapp_server_configfile|webapp_sqlscript\
  67. |webapp_src_install|webapp_pkg_postinst|webapp_pkg_setup\
  68. |webapp_getinstalltype|webapp_src_preinst|webapp_pkg_prerm\
  69. |get_all_version_components|version_is_at_least\
  70. |get_version_components|get_major_version\
  71. |get_version_component_range|get_after_major_version\
  72. |replace_version_separator|replace_all_version_separators\
  73. |delete_version_separator|delete_all_version_separators\
  74. |cvs_fetch|cvs_src_unpack\
  75. |dobashcompletion|bash-completion_pkg_postinst\
  76. |vim-plugin_src_install|vim-plugin_pkg_postinst|vim-plugin_pkg_postrm\
  77. |update_vim_afterscripts|display_vim_plugin_help\
  78. |update_vim_helptags\
  79. |has_multilib_profile|get_libdir|get_multilibdir|get_libdir_override\
  80. |get_abi_var|get_abi_CFLAGS|get_abi_LDFLAGS|get_abi_CHOST\
  81. |get_abi_FAKE_TARGETS|get_abi_CDEFINE|get_abi_LIBDIR|get_install_abis\
  82. |get_all_abis|get_all_libdirs|is_final_abi|number_abis|get_ml_incdir\
  83. |prep_ml_includes|create_ml_includes|create_ml_includes-absolute\
  84. |create_ml_includes-tidy_path|create_ml_includes-listdirs\
  85. |create_ml_includes-makedestdirs|create_ml_includes-allfiles\
  86. |create_ml_includes-sym_for_dir\
  87. |64-bit\
  88. |tc-getPROG|tc-getAR|tc-getAS|tc-getCC|tc-getCXX|tc-getLD|tc-getNM\
  89. |tc-getRANLIB|tc-getF77|tc-getGCJ|tc-getBUILD_CC|tc-export|ninj\
  90. |tc-is-cross-compiler|tc-ninja_magic_to_arch|tc-arch-kernel|tc-arch\
  91. |tc-endian|gcc-fullversion|gcc-version|gcc-major-version\
  92. |gcc-minor-version|gcc-micro-version\
  93. |docrondir|docron|docrontab|cron_pkg_postinst\
  94. |egamesconf|egamesinstall|gameswrapper|dogamesbin|dogamessbin|dogameslib\
  95. |dogameslib.a|dogameslib.so|newgamesbin|newgamessbin|gamesowners|gamesperms\
  96. |prepgamesdirs|gamesenv|games_pkg_setup|games_src_compile|games_pkg_postinst\
  97. |games_ut_unpack|games_umod_unpack|games_make_wrapper\
  98. |subversion_svn_fetch|subversion_bootstrap|subversion_src_unpack\
  99. |alternatives_auto_makesym|alternatives_makesym|alternatives_pkg_postinst\
  100. |alternatives_pkg_postrm\
  101. |rpm_unpack|rpm_src_unpack\
  102. |python_version|python_tkinter_exists|python_mod_exists|python_mod_compile\
  103. |python_mod_optimize|python_mod_cleanup|python_disable_pyc\
  104. |python_enable_pyc\
  105. |check_version_h|get_KV_info|is_2_4_kernel|is_2_5_kernel|is_2_6_kernel\
  106. |kernel_supports_modules\
  107. |perl-module_src_prep|perl-module_src_compile|perl-module_src_test\
  108. |perl-module_src_install\
  109. |perl-module_pkg_postinst|perl-module_pkg_postrm\
  110. |perl_set_version|perl_delete_localpod|updatepod\
  111. |distutils_src_compile|distutils_src_install|distutils_pkg_postrm\
  112. |distutils_pkg_postinst|distutils_python_version|disutils_python_tkinter\
  113. |need_apache|need_apache1|need_apache2\
  114. |apache-module_pkg_setup|apache-module_src_compile\
  115. |apache-module_src_install|apache-module_pkg_postinst|acache_cd_dir\
  116. |apache_mod_file|apache_doc_magic|apache1_src_compile|apache1_src_install\
  117. |apache1_pkg_postinst|apache2_pkg_setup|apache2_src_compile\
  118. |apache1_src_install|apache2_pkg_postinst\
  119. |dopamd|newpamd|dopamsecurity|newpamsecurity|getpam_mod_dir\
  120. |dopammod|newpammod|pamd_mimic_system\
  121. |virtualmake|Xmake|Xemake|Xeconf\
  122. |gnome2_src_configure|gnome2_src_compile|gnome2_src_install\
  123. |gnome2_gconf_install|gnome2_gconf_uninstal|gnome2_omf_fix\
  124. |gnome2_scrollkeeper_update|gnome2_pkg_postinst|gnome2_pkg_postrm)\b/ {
  125. builtin_face(true);
  126. language_print ($0);
  127. builtin_face(false);
  128. }
  129. }