6.2. USES= cmake Example .......................................................................................................... 99
6.3. CMAKE_ON and CMAKE_OFF ...................................................................................................... 99
6.4. Creating a Port for a Simple Rust Application ............................................................................ 102
6.5. Enabling Additional Application Features ................................................................................. 103
6.6. Encoding Application Features As Port Options ......................................................................... 103
6.7. Listing Crate Licenses .......................................................................................................... 104
6.8. USES=meson Example ........................................................................................................... 104
6.9. Creating a Port for a Go Modules Based Application .................................................................... 105
6.10. Setting Output Binary Name or Installation Path ...................................................................... 106
6.11. Creating a Port for a Hackage-hosted Haskell Application ........................................................... 107
6.12. Perl Dependency Example ................................................................................................... 110
6.13. A Port Which Only Requires Perl to Build ............................................................................... 111
6.14. A Port Which Also Requires Perl to Patch ............................................................................... 111
6.15. A Perl Module Which Needs ExtUtils::MakeMaker to Build ........................................................ 111
6.16. A Perl Module Which Needs Module::Build to Build ................................................................. 111
6.17. USE_XORG Example ............................................................................................................. 112
6.18. Using X11-Related Variables ................................................................................................ 112
6.19. Selecting Qt 5 Components .................................................................................................. 122
6.20. USES= qmake Example ....................................................................................................... 123
6.21. USE_KDE Example .............................................................................................................. 129
6.22. USE_LXQT Example ............................................................................................................. 129
6.23. Example Makefile for PEAR Class .......................................................................................... 134
6.24. Example Makefile for Horde Module ...................................................................................... 135
6.25. Makefile for a Simple Python Module .................................................................................... 137
6.26. Selecting wxWidgets Components ......................................................................................... 141
6.27. Detecting Installed wxWidgets Versions and Components .......................................................... 141
6.28. Using wxWidgets Variables in Commands ............................................................................... 142
6.29. Makefile for an application using Lua .................................................................................... 145
6.30. Makefile for a simple Lua module ......................................................................................... 146
6.31. Simple iconv Usage ........................................................................................................... 147
6.32. iconv Usage with configure ............................................................................................... 147
6.33. Fixing Hardcoded -liconv .................................................................................................. 147
6.34. Checking for Native iconv Availability ................................................................................... 147
6.35. USES=xfce Example ........................................................................................................... 148
6.36. Using Xfce's Own GTK2 Widgets ........................................................................................... 148
6.37. Using Berkeley DB 6 .......................................................................................................... 149
6.38. Using MySQL .................................................................................................................... 149
6.39. Using PostgreSQL .............................................................................................................. 149
6.40. Using SQLite 3 .................................................................................................................. 150
7.1. Basic Flavors Usage ............................................................................................................. 155
7.2. Another Basic Flavors Usage ................................................................................................. 156
7.3. More Complex Flavors Usage ................................................................................................. 156
7.4. Flavor Specific PKGNAME ........................................................................................................ 157
7.5. Simple USES=php Extension .................................................................................................. 158
7.6. Flavorizing a PHP Application ................................................................................................ 158
7.7. Simple USES=python ........................................................................................................... 159
7.8. USES=python with Version Requirements ................................................................................ 159
7.9. For a Port Not Using distutils ............................................................................................. 160
8.1. Using PLIST_SUB with Regular Expressions ............................................................................... 163
8.2. Example of a @dirrmtryecho Keyword ..................................................................................... 169
8.3. Real Life Example, How @sample is Implemented ....................................................................... 169
9.1. UCL Short Strings ............................................................................................................... 172
9.2. UCL Multiline Strings .......................................................................................................... 172
9.3. Display a Message on Install/Deinstall ..................................................................................... 172
9.4. Display a Message on Upgrade ............................................................................................... 173
10.1. Using make.conf to Change Default Perl ............................................................................. 185
13.1. How to Avoid Using .error ................................................................................................. 203
15.1. Options Variables Order Example .......................................................................................... 210
xii