Changes between Version 46 and Version 47 of PortfileRecipes
- Timestamp:
- Feb 25, 2013, 4:30:02 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PortfileRecipes
v46 v47 2 2 [[PageOutline(2-3,Table of Contents,inline)]] 3 3 4 == Branch and major versions == #branch4 == Branch versions and version segments == #branch 5 5 6 6 Often times, when a port's version is x.y.z, you want to be able to refer to just the x.y part, for a download URL or for other reasons. The de facto standard way to do this is … … 11 11 This example is from [browser:trunk/dports/devel/glib2 glib2]. 12 12 13 If you need to refer just to the x part (the major version) you can similarly do:13 If you need to refer just one part of the version, you can similarly use: 14 14 {{{ 15 15 set major [lindex [split ${version} .] 0] 16 }}} 17 This splits the version string into an array and returns just the first element. 18 This example is from [browser:trunk/dports/lang/php5 php5]. 16 set minor [lindex [split ${version} .] 1] 17 set patch [lindex [split ${version} .] 2] 18 }}} 19 These split the version string into an array and return the desired element. 20 These examples are based on [browser:trunk/dports/lang/php5 php5]. 19 21 20 22 == Fetching from a URL that uses GET parameters == #fetchwithgetparams