source: trunk/base/doc/portgroup.7 @ 40803

Last change on this file since 40803 was 40803, checked in by jmr@…, 12 years ago

Move default frameworks_dir under prefix, and use it in portgroups

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.7 KB
Line 
1.\" portgroup.7
2.\"
3.\" Copyright (c) 2005 Paul Guyot <pguyot@kallisys.net>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of Apple Computer, Inc. nor the names of its
15.\"    contributors may be used to endorse or promote products derived from
16.\"    this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 5, 2007
31.Dt XCODE 7 "MacPorts"
32.Os
33.Sh NAME
34.Nm PortGroup
35.Nd MacPorts PortGroup command reference
36.Sh SYNOPSIS
37.Nm PortGroup gnustep 1.0
38.Nm PortGroup perl5 1.0
39.Nm PortGroup python24 1.0
40.Nm PortGroup python25 1.0
41.Nm PortGroup python30 1.0
42.Nm PortGroup ruby 1.0
43.Nm PortGroup xcode 1.0
44.Sh DESCRIPTION
45MacPorts defines the notion of PortGroup classes with the PortGroup command.
46These classes factorize the work for similar ports.  Port maintainers willing to
47use
48.Nm PortGroup
49need to have some notion of Portfiles. See
50.Xr portfile 7
51.Pp
52.Sh XCODE PORTGROUP
53.Nm PortGroup xcode
54is here to easily port Xcode-based opensource software. It handles
55configuration, build and destroot phases. It also defines some values
56for Xcode-based software. A minimum Portfile using the xcode PortGroup class
57only defines the fetch and the checksum phases.
58.Pp
59Using
60.Nm PortGroup xcode
61is a way to make your port more robust to Xcode version updates as the PortGroup
62is tested against all supported Mac OS X and Xcode versions.
63.Sh XCODE PORTGROUP SUGAR
64Portfiles using xcode PortGroup do not need to define the following variables:
65.Bl -tag -width lc
66.It Ic categories
67.Sy Default:
68.Em aqua
69.br
70.It Ic platforms
71.Sy Default:
72.Em macosx
73.br
74.It Ic use_configure
75.Sy Default:
76.Em no
77.El
78.br
79Moreover, Portfiles using
80.Nm PortGroup xcode
81do not need to define any build or destroot phase.  Some options are provided
82for tailoring these phases to what the software requires.
83.Sh XCODE PORTGROUP SPECIFIC VARIABLES
84Portfiles using xcode PortGroup may define the following variables:
85.Bl -tag -width lc
86.It Ic xcode.project
87path (relative to ${build.dir} and ${destroot.dir}) of the Xcode project. If
88unset, let xcode tool figure it out. It usually succeeds if there is a single
89project in the directory.
90.br
91.Sy Type:
92.Em optional
93.br
94.Sy Example:
95.Dl xcode.project ${name}.xcode
96.br
97.It Ic xcode.configuration
98Project configuration/buildstyle to use.
99.br
100.Sy Type:
101.Em optional
102.br
103.Sy Default:
104.Em Deployment
105.br
106.Sy Example:
107.Dl xcode.configuration Main
108.br
109.It Ic xcode.target
110If present, overrides build.target and destroot.target.
111.br
112.Sy Type:
113.Em optional
114.br
115.It Ic xcode.build.settings
116Additional settings passed to the xcode build tool during the build phase.
117These settings should be in the X=Y form.
118.br
119.Sy Type:
120.Em optional
121.br
122.Sy Example:
123.Bd -literal -offset indent -compact
124xcode.build.settings FRAMEWORK_SEARCH_PATHS=${prefix}/Library/Frameworks
125.Ed
126.It Ic xcode.destroot.type
127Type of project that will be installed. This tells Xcode PortGroup how to
128destroot the project. Correct values are application and framework.
129.br
130.Sy Type:
131.Em optional
132.br
133.Sy Default:
134.Em application
135.br
136.Sy Example:
137.Dl xcode.destroot.type framework
138.It Ic xcode.destroot.path
139Where to install the build product.
140.br
141.Sy Type:
142.Em optional
143.br
144.Sy Default:
145.Em ${prefix}/Library/Frameworks
146or
147.Em /Applications/MacPorts depending on xcode.destroot.type
148.br
149.It Ic xcode.destroot.settings
150Additional settings passed to the xcode build tool during the destroot phase.
151These settings should be in the X=Y form.
152.br
153.Sy Type:
154.Em optional
155.br
156.Sy Example:
157.Bd -literal -offset indent -compact
158xcode.destroot.settings SKIP_INSTALL=NO
159.Ed
160.El
161.Sh STANDARD PORTFILE VARIABLES AFFECTING XCODE PORTGROUP
162The following standard Portfile variables actually affect
163.Nm xcode PortGroup.
164In most cases, you will not need to set any of these variables in the Portfile.
165.Bl -tag -width lc
166.It Ic destroot
167Where to destroot the project.
168.br
169.It Ic build.cmd
170The command to invoke to build the project.
171.Nm xcode PortGroup
172sets this variable to ${xcodebuildcmd}.
173.br
174.It Ic build.target
175The Xcode target to build.
176.Nm xcode PortGroup
177sets this variable to "", thus building all targets. This variable will be
178ignored if xcode.target is set.
179.br
180.It Ic build.pre_args
181Additional parameters for ${build.cmd}.
182.br
183.Sy Default:
184none
185.br
186.It Ic build.args
187Main parameters for ${build.cmd}.
188.br
189.Sy Default:
190.Em build
191.br
192.It Ic build.post_args
193Additional parameters for ${build.cmd}.
194.br
195.Sy Default:
196none
197.br
198.It Ic build.dir
199Where to build the project from (i.e. where the Xcode project is).
200.br
201.Sy Default:
202${worksrcpath}
203.br
204.It Ic destroot.cmd
205The command to invoke to destroot the project.
206.Nm xcode PortGroup
207sets this variable to xcodebuildcmd.
208.br
209.It Ic destroot.target
210The Xcode target to install.
211.Nm xcode PortGroup
212sets this variable to "", thus installing all targets. This variable will be
213ignored if xcode.target is set.
214.br
215.It Ic destroot.pre_args
216Additional parameters for ${destroot.cmd}.
217.br
218.Sy Default:
219none
220.br
221.It Ic destroot.args
222Main parameters for ${destroot.cmd}.
223.br
224.Sy Default:
225.Em install
226.br
227.It Ic destroot.post_args
228Additional parameters for ${destroot.cmd}.
229.br
230.Sy Default:
231none
232.br
233.It Ic destroot.dir
234Where to destroot the project from (i.e. where the Xcode project is).
235.br
236.Sy Default:
237${worksrcpath}
238.br
239.El
240.Sh GNUSTEP PORTGROUP
241.Nm PortGroup gnustep
242is here to easily port GNUstep-based opensource software using the GNU
243objective-C runtime. It handles configuration, build and destroot phases.
244It also defines some values for GNUstep-based software. A minimum Portfile
245using the gnustep PortGroup class only defines the fetch and the checksum phases.
246.Sh GNUSTEP FILESYSTEM LAYOUTS
247.Nm PortGroup gnustep
248also supports both the traditionnal gnustep file layout and the new fhs file layout.
249However, the ports themselves do not necessarily support both.
250The Portfiles have access to many procedures in dealing with these two layouts :
251.Bl -tag -width lc
252.It Ic set_gnustep_make
253Sets GNUSTEP_MAKEFILES according to the FilesystemLayout
254.br
255.It Ic set_gnustep_env
256Sets DYLD_LIBRARY_PATH and PATH for the gnustep FilesystemLayout
257.br
258.It Ic gnustep_layout
259Returns true (1) if current file layout is gnustep
260.br
261.It Ic set_system_library
262Sets GNUSTEP_SYSTEM_LIBRARY according to the FilesystemLayout
263.br
264.It Ic set_local_library
265Sets GNUSTEP_LOCAL_LIBRARY according to the FilesystemLayout
266.br
267.Pp
268.Sh GNUSTEP PORTGROUP SUGAR
269Portfiles using gnustep PortGroup do not need to define the following variables:
270.Bl -tag -width lc
271.It Ic categories
272.Sy Default:
273.Em gnustep
274.br
275.It Ic homepage
276.Sy Default:
277.Em http://www.gnustep.org/
278.br
279.It Ic master_sites
280.Sy Default:
281.Em gnustep:core
282.br
283.It Ic depends_lib
284.Sy Default:
285.Em gnustep-core
286.br
287.It Ic use_configure
288.Sy Default:
289.Em no
290.It Ic configure.env
291.Sy Default:
292.Em DYLD_LIBRARY_PATH PATH
293.It Ic configure.pre_args-append
294.Sy Default:
295.Em CC=gcc-mp-4.2 GNUSTEP_MAKEFILES
296.br
297.It Ic build.type
298.Sy Default:
299.Em gnu
300.br
301.It Ic build.env
302.Sy Default:
303.Em DYLD_LIBRARY_PATH PATH
304.It Ic build.pre_args-append
305.Sy Default:
306.Em messages=yes
307.br
308.It Ic destroot.env
309.Sy Default:
310.Em DYLD_LIBRARY_PATH PATH
311.It Ic destroot.pre_args-append
312.Sy Default:
313.Em messages=yes
314.br
315.br
316.El
317.br
318Moreover, Portfiles using
319.Nm PortGroup gnustep
320do not need to define any build or destroot phase.  Some options are provided
321for tailoring these phases to what the software requires.  A mechanism is also
322provided to ease the patch process.
323.Sh GNUSTEP PORTGROUP SPECIFIC VARIABLES
324Portfiles using
325.Nm gnustep PortGroup
326may define the following variables:
327.Bl -tag -width lc
328.It Ic gnustep.post_flags
329an associative array which specifies the sub-directories relative to ${worksrcpath}
330and the SHARED_LD_POSTFLAGS variables to be added to GNUmakefile.preamble in those
331sub-directories.  This helps making the patching process easier on Darwin.
332.br
333.Sy Type:
334.Em optional
335.br
336.Sy Example:
337.Dl platform darwin {
338.Dl             array set gnustep.post_flags {
339.Dl                     BundleSubDir  """-lfoo -lbar""
340.Dl             }
341.Dl }
342.br
343.It Ic gnustep.cc
344.br
345.Sy Type:
346.Em optional
347.br
348.Sy Default:
349.Em gcc-mp-4.2
350.br
351.Sy Example:
352.Dl gnustep.cc gcc-mp-4.3
353.br
354.It Ic variant with_docs
355Many GNUstep packages include a Documentation sub-directory that is not
356built by default.  Enabling this variant builds and installs the included
357documentation.
358.br
359.Sy Type:
360.Em optional
361.br
362.Sy Example:
363.Dl port install gnustep-gui +with_docs
364.br
365.El
366.Sh SEE ALSO
367.Xr port 1 ,
368.Xr macports.conf 5 ,
369.Xr portfile 7 ,
370.Xr portstyle 7 ,
371.Xr porthier 7
372.Sh AUTHORS
373.An "Paul Guyot" Aq pguyot@kallisys.net
374.An "Yves de Champlain" Aq yves@macports.org
Note: See TracBrowser for help on using the repository browser.