19 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/guide/xml/glossary.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | MacPorts Guide Glossary
6 |
7 | This section defines a number of words which may be new to
8 | the reader. These are all defined in the context of Macports
9 | instead of as general purpose definition.
10 |
11 |
12 |
13 | MacPorts Guide Terms
14 |
15 |
16 | activate phase
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | automake
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | autoconf
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | API
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | destroot phase
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | port binary
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | build
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | build phase
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | checksum
81 |
82 |
83 | A checksum is a small piece of data, derived from
84 | an original that can be used to ensure that two files are
85 | identical.
86 |
87 |
88 |
89 |
90 | checksum phase
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | compile
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | configure
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | configure phase
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | dependency
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | destroot phase
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 | diff
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | extract phase
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | fetch phase
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | free software
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | global keyword
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | gunzip
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 | keyword
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 | keyword argument modifier
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 | keyword list modifier
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | library
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 | MacPorts
219 |
220 |
221 | A system for compiling, installing, and managing free and open
222 | source software comprised of an infrastructure called MacPorts base
223 | and a collection of ports. MacPorts current port collection defines
224 | the software may be installed.
225 |
226 |
227 |
228 |
229 | open source software
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 | patch phase
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 | patch file
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 | pextlib
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 | phase
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 | port
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 | port command
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 | port image
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 | port maintainer
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 | port phase
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 | port phase keyword
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 | PortGroup
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 | Portfile
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 | registry
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 | rsync
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 | selfupdate
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 | shell
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 | StartupItem
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 | Subversion
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 | sync
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 | tar
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 | Tcl
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 | Tcl extension
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 | Trac
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | Unix
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 | unzip
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 | variant
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 | Xcode Tools
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 | X11
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 | zip
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
--------------------------------------------------------------------------------
/guide/xml/guide.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
9 | MacPorts Guide
10 |
11 |
12 |
13 | Mark
14 | Duling
15 |
16 |
17 |
18 |
19 | Dr
20 | Michael
21 | Maibaum
22 | A
23 |
24 |
25 |
26 |
27 | Will
28 | Barton
29 |
30 |
31 |
32 |
33 | Clemens
34 | Lang
35 |
36 |
37 |
38 |
39 |
40 | 2007–2025
41 | The MacPorts Project
42 |
43 |
44 |
45 | 2002–2004
46 | The OpenDarwin Project
47 |
48 |
49 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
69 |
--------------------------------------------------------------------------------
/guide/xml/internals-hier.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PORTHIER
7 |
8 | 7
9 |
10 |
11 |
12 | porthier
13 |
14 | layout of the ports filesystems
15 |
16 |
17 |
18 | Description
19 |
20 | A map of the filesystem hierarchy used by MacPorts and the ports it
21 | installs. Much of it is based on
22 | hier
23 |
24 | 7
25 | .
26 |
27 |
28 |
29 | ${prefix}
30 |
31 |
32 | The base of the MacPorts filesystem hierarchy.
33 |
34 | Default: /opt/local/
35 |
36 |
37 |
38 | bin/
39 |
40 |
41 | Common utilities, programming tools, and
42 | applications.
43 |
44 |
45 |
46 |
47 |
48 |
49 | etc/
50 |
51 |
52 | System configuration files and scripts.
53 |
54 |
55 |
56 |
57 |
58 |
59 | include/
60 |
61 |
62 | Standard C include files.
63 |
64 |
65 |
66 |
67 |
68 |
69 | lib/
70 |
71 |
72 | Archive libraries.
73 |
74 |
75 |
76 |
77 |
78 |
79 | libexec/
80 |
81 |
82 | System daemons and system utilities (executed by other
83 | programs).
84 |
85 |
86 |
87 |
88 |
89 |
90 | Library/Frameworks/
91 |
92 |
93 | Native macOS frameworks.
94 |
95 |
96 |
97 |
98 |
99 |
100 | sbin/
101 |
102 |
103 | System programs and administration utilities.
104 |
105 |
106 |
107 |
108 |
109 |
110 | share/
111 |
112 |
113 | Architecture-independent files.
114 |
115 |
116 |
117 | doc/
118 |
119 |
120 | Miscellaneous documentation.
121 |
122 |
123 |
124 |
125 |
126 |
127 | examples/
128 |
129 |
130 | Examples for users and programmers.
131 |
132 |
133 |
134 |
135 |
136 |
137 | info/
138 |
139 |
140 | GNU Info hypertext system.
141 |
142 |
143 |
144 |
145 |
146 |
147 | locale/
148 |
149 |
150 | Localization files.
151 |
152 |
153 |
154 |
155 |
156 |
157 | man/
158 |
159 |
160 | Manual pages.
161 |
162 |
163 |
164 |
165 |
166 |
167 | misc/
168 |
169 |
170 | Miscellaneous system-wide ASCII text files.
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 | src/
179 |
180 |
181 | Source code.
182 |
183 |
184 |
185 |
186 | var/
187 |
188 |
189 | Multi-purpose log, temporary, transient and spool
190 | files.
191 |
192 |
193 |
194 | db/
195 |
196 |
197 | Miscellaneous automatically generated
198 | system-specific database files.
199 |
200 |
201 |
202 |
203 | macports/
204 |
205 |
206 | MacPorts package building topdir.
207 |
208 |
209 |
210 | build/
211 |
212 |
213 | Where ports are built and destrooted.
214 |
215 |
216 |
217 |
218 | distfiles/
219 |
220 |
221 | Storage location for the distfiles of fetched
222 | ports.
223 |
224 |
225 |
226 |
227 | packages/
228 |
229 |
230 | Obsolete. Formerly contained archives (packages) of installed
231 | ports.
232 |
233 |
234 |
235 |
236 | receipts/
237 |
238 |
239 | Obsolete. Formerly contained the registry information and receipts
240 | for installed ports, in flat-file format.
241 |
242 |
243 |
244 |
245 | registry/
246 |
247 |
248 | Contains the registry database in sqlite format.
249 |
250 |
251 |
252 |
253 |
254 | software/
255 |
256 |
257 | The files for each installed port are stored here.
258 |
259 |
260 |
261 |
262 | sources/
263 |
264 |
265 | Holds the sources for the ports tree (the
266 | Portfiles) and also MacPorts base.
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 | spool/
277 |
278 |
279 | Directory containing output spool files.
280 |
281 |
282 |
283 |
284 |
285 |
286 | log/
287 |
288 |
289 | Miscellaneous system log files.
290 |
291 |
292 |
293 |
294 |
295 |
296 | run/
297 |
298 |
299 | System information files describing various
300 | information about the system since it was booted.
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 | www/
309 |
310 |
311 | Files to be served by an http server.
312 |
313 |
314 |
315 | cgi-bin/
316 |
317 |
318 | Directory for cgi executables.
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 | /Applications/MacPorts/
332 |
333 |
334 | Native macOS applications.
335 |
336 |
337 |
338 |
339 |
340 |
341 | SEE ALSO
342 |
343 |
344 | port
345 |
346 | 1
347 | ,
348 | macports.conf
349 |
350 | 5
351 | ,
352 | portfile
353 |
354 | 7
355 | ,
356 | portgroup
357 |
358 | 7
359 | ,
360 | portstyle
361 |
362 | 7
363 | ,
364 | hier
365 |
366 | 7
367 |
368 |
369 |
370 |
371 | AUTHORS
372 |
373 | Felix Kroniage fkr@opendarwin.org
374 |
375 | Juan Manuel Palacios jmpp@macports.org
376 |
377 |
378 |
--------------------------------------------------------------------------------
/guide/xml/internals-tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Tests
6 |
7 |
8 | The MacPorts testing framework uses tcltest for its unit tests
9 | as well as regression tests. The framework was developed during Google Summer of Code 2013 by Marius Coțofană (marius@).
10 |
11 |
12 |
13 | To keep things simple, each module of MacPorts (
14 | macports1.0,
15 | package1.0,
16 | port1.0,
17 | registry2.0
18 | ) has its own tests/ directory. Each Tcl script in a module (e.g.
19 | macports.tcl)
20 | has its own test script located in the tests directory, with the same name and the '.test' extension (e.g.
21 | macports.test).
22 | Every proc in a script (e.g. proc macports::findBinary) should have its own test proc
23 | (e.g. test findBinary) in the corresponding test file. Test procs should maintain the order in the
24 | original script and should be independent of one another.
25 |
26 |
27 |
28 | Running tests
29 |
30 |
31 | Tests can be run only on an installed version of MacPorts (so make sure you have run sudo make install).
32 |
33 |
34 |
35 | The easiest way to run all the tests, is to use the target in the Makefile.
36 |
37 |
38 | $ make test
39 |
40 |
41 | Each tests/ directory has a test.tcl file, used by the make target to
42 | run all tests and format the output, making it easy to read. The script just runs the tests individually,
43 | printing the test file name, the total number of tests, number of passed, skipped, failed as well as constraints
44 | or errors of failed tests. This is one possible output when running macports.test:
45 |
46 |
47 | Total:31 Passed:31 Failed:0 Skipped:0 macports.test
48 |
49 |
50 | Many tests need root privileges to run correctly, but will be auto skipped in the other case. Constraints are
51 | printed just below the final result, together with the number of test cases that require it, as so:
52 |
53 |
54 | Total:31 Passed:24 Failed:0 Skipped:7 macports.test
55 | Constraint: 7 root
56 |
57 |
58 | The stack trace of an error that occurs during a test is printed below the constraints (if any).
59 |
60 |
61 |
62 | The file can be used also to:
63 |
64 |
65 |
66 |
67 |
68 | run all tests:
69 |
70 | $tclsh test.tcl
71 |
72 |
73 |
74 | get debug info:
75 |
76 | $tclsh test.tcl -debug \[0-3\]
77 |
78 |
79 |
80 | list individual test files:
81 |
82 | $tclsh test.tcl -l
83 |
84 |
85 |
86 | run specific test files:
87 |
88 | $tclsh test.tcl -t macports.test
89 |
90 |
91 |
92 | print help message:
93 |
94 | $tclsh test.tcl -h
95 |
96 |
97 |
98 |
99 | Specific test cases can be run using the '-match' argument for the file that contains the
100 | test, from its parent directory.
101 |
102 |
103 | $tclsh macports.test -match mportclose
104 |
105 |
106 | Regression tests can be found in tests/test/
107 | and can be run just as unit tests, using make test from the parent directory.
108 |
109 |
110 |
111 |
112 | Must know
113 |
114 |
115 | regression tests have their own directory, found in trunk/base/tests/test
116 | each module of MacPorts (port1.0, macports1.0, package1.0) has its own ‘tests/’ directory where the test files are located and also additional files needed (Portfile, test.tcl)
117 | each file in a module has a corresponding test file (.test extension) in the ‘tests/’ directory
118 | each proc in a file has a corresponding test case (test proc_name) in the
119 | each test case must be independent from each other, so they can be run individually if needed
120 | each test must clean all auxiliary files or directories it creates and revert all ports it installs
121 | use a single test procedure for each tested proc; sub-test cases should be included in the same body
122 | when adding new regression tests, make sure to specify its name in the test_suite list of 'trunk/base/tests/test.tcl'
123 | variables used in tests can be set at install-time using the '[module]_test_autoconf.tcl.in' file in each module (macports_autoconf.tcl.in, port_autoconf.tcl.in)
124 | for some tests in package1.0, an update of the ports tree is required; this is done automatically if they are run using the 'test' target in the Makefile, with root privileges
125 |
126 |
127 |
128 |
129 | Sample file
130 |
131 | # include required tcltest package and set namespace
132 | package require tcltest 2
133 | namespace import tcltest::*
134 |
135 | # get absolute path to current ‘tests/’ directory
136 | set pwd [file normalize $argv0]
137 | set pwd [eval file join {*}[lrange [file split $pwd] 0 end-1]]
138 |
139 | # the macports_fastload.tcl file needs to be sourced so we
140 | # can directly require packages later on; we can use the autoconf
141 | # file to get the path to the file
142 | source ../port_test_autoconf.tcl
143 | source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
144 | package require macports 1.0
145 |
146 | # source/require tested/needed files
147 | # source ../../port1.0/portutil.tcl
148 | package require portutil 1.0
149 |
150 | # use custom macports.conf and sources.conf
151 | # you need to provide the sources.conf (see additional files) file
152 | makeDirectory $pwd/tmpdir
153 | makeDirectory $pwd/tmpdir/share
154 | makeDirectory $pwd/tmpdir/var/macports/registry
155 | set fd [open $pwd/tmpdir/macports.conf w+]
156 | puts $fd "portdbpath $pwd/tmpdir/var/macports"
157 | puts $fd "prefix $pwd/tmpdir"
158 | puts $fd "variants_conf $pwd/tmpdir/variants.conf"
159 | puts $fd "sources_conf $pwd/sources.conf"
160 | puts $fd "applications_dir $pwd/tmpdir/Applications"
161 | puts $fd "frameworks_dir $pwd/tmpdir/Library/Frameworks"
162 | close $fd
163 | set env(PORTSRC) $pwd/tmpdir/macports.conf
164 | file link -symbolic $pwd/tmpdir/share/macports $macports::autoconf::prefix/share/macports
165 | close [open $pwd/tmpdir/variants.conf w+]
166 |
167 | # debug options
168 | # ports_debug and ports_verbose are commented out as default
169 | # need to be set before ‘mportinit’
170 | array set ui_options {}
171 | #set ui_options(ports_debug) yes
172 | #set ui_options(ports_verbose) yes
173 | mportinit ui_options
174 |
175 | # if you need to use procs from macports namespace, that are just aliases, you can
176 | # always source library.tcl (see additional files) which provides a copy macports::worker_init
177 | # without sub-interpreters; it also sets some important environment variables like
178 | # os.platform, os.major, os.arch, workpath, destpath, portpath
179 | # some other option would be to get the $workername from a $mport and use it directly
180 |
181 | # additional procs needed for testing go before the actual test cases
182 |
183 |
184 | # test case example
185 | # the test name must reflect the tested proc (remove namespaces if any)
186 | # the test description should list specific values from the tested proc on which it depends
187 | # or the partial cases it tests
188 | test mportclose {
189 | Mport close unit test.
190 | # this branch is optional and you can use other constraints too
191 | } -constraints {
192 | root
193 | # the setup branch is optional
194 | } -setup {
195 | set mport [mportopen file://.]
196 | # please make output as useful as possible (even error cases)
197 | # all sub-test cases should be part of the body branch
198 | } -body {
199 | if {[catch {mportclose $mport}] != 0} {
200 | return "FAIL: cannot run mportclose"
201 | }
202 | return "Mport close successful."
203 | # the cleanup branch is optional
204 | } -cleanup {
205 | file delete -force $pwd/work
206 | } -result "Mport close successful."
207 |
208 |
209 | # print test results
210 | cleanupTests
211 |
212 |
213 |
214 | Additional files
215 |
216 |
217 | In all tests we use this Portfile.
218 | This is the test.tcl file used to run and parse the output of all the tests in a module.
219 | A worker_init copy, without using sub-interpreters library.tcl.
220 | Example of sources.conf.
221 | An example of a test file macports.test.
222 | A library.tcl of useful procs in regression testing.
223 |
224 |
225 |
226 |
227 |
228 | Resources
229 |
230 |
231 | Tcltest official wiki page
232 | Getting started with tcltest
233 | Official tcltest documentation
234 |
235 |
236 |
237 |
--------------------------------------------------------------------------------
/guide/xml/intro.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 | Introduction
8 |
9 | MacPorts is an easy to use system for compiling, installing, and managing open source software. MacPorts may
10 | be conceptually divided into two main parts: the infrastructure, known as MacPorts base, and the set of
11 | available ports. A MacPorts port is a set of specifications contained in a Portfile that defines an application, its characteristics, and any
13 | files or special instructions required to install it. This allows you to use a single command to tell MacPorts
14 | to automatically download, compile, and install applications and libraries. But using MacPorts to manage your
15 | open source software provides several other significant advantages. For example, MacPorts:
16 |
17 |
18 |
19 | Installs automatically any required support software, known as dependencies, for a given port.
21 |
22 |
23 |
24 | Provides for uninstalls and upgrades for installed ports.
25 |
26 |
27 |
28 | Confines ported software to a private sandbox that keeps it from intermingling with
29 | your operating system and its vendor-supplied software to prevent them from becoming corrupted.
30 |
31 |
32 |
33 | Allows you to create pre-compiled binary installers of ported applications to quickly install software
34 | on remote computers without compiling from source code.
35 |
36 |
37 |
38 | MacPorts is developed on macOS, though it is designed to be portable so it can work on other Unix-like systems,
39 | especially those descended from the Berkeley Software Distribution (BSD). In practice, installing ports only
40 | works on macOS. MacPorts base can be compiled on Linux (and possibly other POSIX-compatible systems) where it is
41 | mainly used to set up mirrors and generate support files for installations on macOS.
42 |
43 | The following notational conventions are used in the MacPorts Guide to distinguish between terminal
44 | input/output, file text, and other special text types.
45 |
46 |
47 |
48 | Terminal I/O and file text.
49 |
50 | $ Commands to be typed into a terminal window.
51 | Command output to a terminal window.
52 | File text.
53 |
54 |
55 |
56 | Other special text types.
57 |
58 |
59 |
60 | A hyperlink: spontaneous
61 | combustion.
62 |
63 |
64 | A file: /var/log/system.log.
65 |
66 |
67 | A command: ifconfig.
68 |
69 |
70 | An option: port
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/guide/xml/macports.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Configuration Files
6 |
7 | The MacPorts configuration files often do not need to be modified for the
8 | general end user. They contain options that may be of use to advanced users
9 | and port developers. Some automatically configured options may need to be
10 | updated when migrating to a new CPU architecture or a new OS version.
11 |
12 | There are three MacPorts configuration files that define important
13 | variables used by the MacPorts system: macports.conf,
14 | sources.conf, and variants.conf.
15 | All MacPorts configurations files are located in
16 | ${prefix}/etc/macports.
17 |
18 | MacPorts configuration file format is a simple key/value pair
19 | separated by either a space or a tab. Lines beginning with '#' are comments,
20 | empty lines are ignored.
21 |
22 |
23 | macports.conf
24 |
25 | macports.conf is the configuration file used to bootstrap the
26 | MacPorts system. This file is read by the port command and determines how
27 | it behaves.
28 |
29 | Options locating other .conf files.
30 |
31 |
32 |
33 | sources_conf
34 |
35 |
36 | Where to find the sources list.
37 |
38 | Default:
39 | ${prefix}/etc/macports/sources.conf
40 |
41 |
42 |
43 |
44 | variants_conf
45 |
46 |
47 | Where to find global variants definition file
48 | (optional).
49 |
50 | Default:
51 | ${prefix}/etc/macports/variants.conf
52 |
53 |
54 |
55 |
56 | Options for MacPorts general operating characteristics.
57 |
58 |
59 |
60 | prefix
61 |
62 |
63 | Sets the directory where ports are installed. Any path may be
64 | used but those with spaces and/or non-ASCII characters should be
65 | avoided because it can break some ports.
66 |
67 | Default: /opt/local
68 |
69 |
70 |
71 |
72 | portdbpath
73 |
74 |
75 | Directory where MacPorts keeps working data such as downloaded
76 | sources, installed port receipts, and the main registry. Same path
77 | restrictions apply as for '${prefix}'.
78 |
79 | Default: ${prefix}/var/macports
80 |
81 |
82 |
83 |
84 | portdbformat
85 |
86 |
87 | Formerly selected the storage type to use for the MacPorts registry: flat or sqlite.
88 | Currently, only sqlite can be used.
89 |
90 | Default:
91 |
92 |
93 |
94 |
95 | build_arch
96 |
97 |
98 | The machine architecture for which to build in normal use.
99 | Options include: arm64, i386, ppc, ppc64, x86_64
100 |
101 | Default:
102 | (Snow Leopard and later) , or depending on hardware
103 | (Leopard/Tiger) or depending on hardware
104 |
105 |
106 |
107 |
108 | applications_dir
109 |
110 |
111 | Directory in which ports will install native macOS application
112 | bundles.
113 |
114 | Default: /Applications/MacPorts
115 |
116 |
117 |
118 |
119 | frameworks_dir
120 |
121 |
122 | Directory in which ports will install native macOS frameworks.
123 |
124 | Default:
125 | ${prefix}/Library/Frameworks
126 |
127 |
128 |
129 |
130 | developer_dir
131 |
132 |
133 | Directory where Xcode is installed.
134 |
135 | Default:
136 | /Developer
137 |
138 |
139 |
140 |
141 | buildfromsource
142 |
143 |
144 | Controls whether ports are built from source or downloaded as pre-built
145 | archives. Setting to 'always' will never use archives, 'never' will always try
146 | to use an archive and fail if one is not available. 'ifneeded' will try to fetch
147 | an archive and fall back to building from source if that isn't possible.
148 |
149 | Default:
150 |
151 |
152 |
153 |
154 | portarchivetype
155 |
156 |
157 | Format of archives in which to store port images. This controls both the
158 | type of archive created locally after building from source, and the type to
159 | request from remote servers. Changing this will not affect the usability of
160 | already installed archives; they can be of any supported type. Supported types
161 | are: tgz, tar, tbz, tbz2, tlz, txz, xar, zip, cpgz, cpio
162 |
163 | Default: tbz2
164 |
165 |
166 |
167 |
168 | configureccache
169 |
170 |
171 | Use ccache (C/C++ compiler cache) - see
172 | https://ccache.samba.org/
173 |
174 | Default:
175 |
176 |
177 |
178 |
179 | configuredistcc
180 |
181 |
182 | Use distcc (distributed compiler) - see
183 | https://distcc.samba.org/
184 |
185 | Default:
186 |
187 |
188 |
189 |
190 | configurepipe
191 |
192 |
193 | Use pipes rather than intermediate files when compiling
194 | C/C++/etc
195 |
196 | Default:
197 |
198 |
199 |
200 |
201 | buildnicevalue
202 |
203 |
204 | Lowered scheduling priority (0-20) to use for make when
205 | building ports.
206 |
207 | Default: 0
208 |
209 |
210 |
211 |
212 | buildmakejobs
213 |
214 |
215 | Number of simultaneous make jobs (commands) to use when
216 | building ports. Using 0 will cause a runtime
217 | autodetection to use all available processor cores.
218 |
219 | Default: 0
220 |
221 |
222 |
223 |
224 | portautoclean
225 |
226 |
227 | Set whether to automatically execute clean after
228 | install of ports.
229 |
230 | Default:
231 |
232 |
233 |
234 |
235 | rsync_server
236 |
237 |
238 | Rsync server from which to fetch MacPorts sources.
239 |
240 | Default: rsync.macports.org
241 |
242 |
243 |
244 |
245 | rsync_dir
246 |
247 |
248 | Rsync directory from which to pull the base/ component
249 | (infrastructure) of MacPorts.
250 |
251 | Default: release/tarballs/base.tar
252 |
253 |
254 |
255 |
256 | rsync_options
257 |
258 |
259 | Rsync options
260 |
261 | Default: -rtzv --delete-after
262 |
263 |
264 |
265 |
266 | destroot_umask
267 |
268 |
269 | Umask value to use during the destrooting of a port.
270 |
271 | Default: 022
272 |
273 |
274 |
275 |
276 | binpath
277 |
278 |
279 | Sets env(PATH), the directory search path for locating system executables
280 | (rsync, tar, etc.) during port installation. Only applications in
281 | these directories are available while ports are being installed even
282 | if other paths are specified by $PATH in a user's
283 | environment.
284 |
285 | Default:
286 | ${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin
287 |
288 |
289 | The binpath is implicitly defined, but it may be overwritten
290 | by defining the variable in macports.conf. However, using a
291 | non-default binpath is discouraged and should only be performed by
292 | advanced users.
293 |
294 |
295 |
296 |
297 |
298 | host_blacklist
299 |
300 |
301 | Space-separated list of download hosts that should not be used.
302 |
303 | Default: none
304 |
305 |
306 | This feature is especially useful if a host turns out to be consistently
307 | slow and therefore should be excluded for MacPorts' actions.
308 |
309 |
310 |
311 |
312 |
313 | preferred_hosts
314 |
315 |
316 | Space-separated list of download hosts that should be used preferentially.
317 |
318 | Default: none
319 |
320 |
321 |
322 |
323 | revupgrade_autorun
324 |
325 |
326 | Controls whether the rev-upgrade action will be run automatically after
327 | upgrading ports.
328 |
329 | Default: yes
330 |
331 |
332 |
333 |
334 | revupgrade_mode
335 |
336 |
337 | Controls the rev-upgrade functionality which checks for broken linking and
338 | can rebuild ports to fix it. 'rebuild' means ports will automatically be rebuilt
339 | when broken linking is detected in their files, while 'report' means broken
340 | files will be scanned for and reported but the ports will not be rebuilt.
341 |
342 | Default: rebuild
343 |
344 |
345 |
346 |
347 | Options for MacPorts Universal Binaries (+universal variant)
348 |
349 |
350 |
351 | universal_archs
352 |
353 |
354 | The machine architectures to use for +universal variant
355 | (multiple entries must be space delimited). Options include: arm64,
356 | i386, ppc, ppc64, x86_64
357 |
358 | Default: for macOS 11 and later,
359 | for 10.6 through 10.13, for 10.5 and earlier
361 |
362 |
363 |
364 |
365 | Options for StartupItems
366 |
367 |
368 |
369 | startupitem_type
370 |
371 |
372 | Options for generated startup items, though this may be
373 | overridden by the startupitem.type Portfile key. Options
374 | are default option, SystemStarter,
375 | launchd, or none. For an empty or
376 | default option, a startupitem type appropriate to the
377 | platform is used; if none, no port startupitems are
378 | installed.
379 |
380 | Default:
381 |
382 |
383 |
384 |
385 | startupitem_install
386 |
387 |
388 | Create system-level symlinks to generated StartupItems. If set
389 | to no, symlinks will not be created; otherwise, symlinks will be
390 | placed in /Library/LaunchDaemons or
391 | /Library/LaunchAgents as appropriate. This
392 | setting only applies when building ports from
393 | source.
394 |
395 | Default:
396 |
397 |
398 |
399 |
400 | Other options
401 |
402 |
403 |
404 | extra_env
405 |
406 |
407 | Extra environment variables to keep. Any variables listed here
408 | are added to the list of variables that are not removed from the
409 | environment used while processing ports.
410 |
411 | Default: none
412 |
413 |
414 |
415 |
416 |
417 |
418 | place_worksymlink
419 |
420 |
421 | Set whether to place a symlink named work from your ports tree to
422 | the build directory of a port, when the port is being built. This
423 | is convenient, but may not be ideal if you care about the structure
424 | of your ports tree. For example, some developers keep their ports
425 | tree synchronized across multiple computers, and don't want to also
426 | synch build directories.
427 |
428 | Default: yes
429 |
430 |
431 |
432 |
433 |
434 |
435 | sources.conf
436 |
437 | This file enables rsync synchronization of the default ports tree
438 | with the MacPorts rsync server when either of the commands port
439 | selfupdate or port sync are run.
440 |
441 | Default:
442 | rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
443 |
444 | Optional local repositories are enabled using a file url:
445 | file:///path/to/localportsrepository
446 |
447 |
448 |
449 | variants.conf
450 |
451 | This optional file specifies any variants you'd like to be invoked
452 | globally. If a variant specified in this file is not supported by a given
453 | Portfile, the variant is simply ignored.
454 |
455 | Default: none
456 |
457 |
458 |
--------------------------------------------------------------------------------
/guide/xml/macros.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 | Macros
8 |
9 |
10 |
11 |
12 | This section is outdated and needs to be reworked.
13 | Please see if you can contribute updated instructions.
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/guide/xml/portfile-dependencies.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Dependencies
6 |
7 | Free and open source software is highly modular, and MacPorts ports
8 | often require that other ports be installed beforehand; these prerequisites
9 | for a given port are called a port's dependencies.
10 |
11 | The keywords used when specifying dependencies in a Portfile are
12 | related to port install phases, and they refer to what are called library,
13 | build, fetch, extract and run dependencies. Though all of them install dependencies
14 | before a given port is installed, specifying dependencies with the correct keyword
15 | is important for proper port upgrade and uninstall behavior, or when running targets
16 | other than install. For example,
17 | you may not uninstall a port that is a library dependency for another installed port,
18 | though you may remove one that is a build dependency. Likewise, if you run the
19 | fetch target for a port, only the fetch dependencies will be installed first, so
20 | they should be all that is needed for that target.
21 |
22 |
23 |
24 | depends_fetch
25 |
26 | depends_fetch-append
27 |
28 | depends_fetch-delete
29 |
30 |
31 | The list of dependencies to check before phases
32 | , ,
33 | , ,
34 | , ,
35 | , , and
36 | . Fetch dependencies are needed to download
37 | the distfiles for a port, and are not needed at all once the software
38 | is installed.
39 |
40 |
41 |
42 |
43 | depends_extract
44 |
45 | depends_extract-append
46 |
47 | depends_extract-delete
48 |
49 |
50 | The list of dependencies to check before phases
51 | , ,
52 | , ,
53 | , , and
54 | . Extract dependencies are needed to unpack a
55 | port's distfiles into the work directory, and are not needed at all once
56 | the software is installed.
57 |
58 |
59 |
60 |
61 | depends_build
62 |
63 | depends_build-append
64 |
65 | depends_build-delete
66 |
67 |
68 | The list of dependencies to check before phases
69 | , ,
70 | , , and
71 | . Build dependencies are needed when software
72 | is being built, but not needed at all once it is installed.
73 |
74 |
75 |
76 |
77 | depends_lib
78 |
79 | depends_lib-append
80 |
81 | depends_lib-delete
82 |
83 |
84 | The list of dependencies to check before phases
85 | , ,
86 | , , and
87 | . Library dependencies are needed both at
88 | build time (for headers and libraries to link against) and at run
89 | time.
90 |
91 |
92 |
93 |
94 | depends_test
95 |
96 | depends_test-append
97 |
98 | depends_test-delete
99 |
100 |
101 | The list of dependencies to check before phase
102 | .
103 | Test dependencies are only needed when the port enables
104 | testing (i.e. ).
105 |
106 |
107 |
108 |
109 |
110 | depends_run
111 |
112 | depends_run-append
113 |
114 | depends_run-delete
115 |
116 |
117 | The list of dependencies to check before phases
118 | , , and
119 | . Run dependencies are needed when the
120 | software is run, but not to compile it.
121 |
122 |
123 |
124 |
125 |
126 | Port and File Dependencies
127 |
128 | There are two types of dependencies: port dependencies and file
129 | dependencies. Port dependencies can be satisfied by reference to a port
130 | (the MacPorts registry is queried), or by reference to a file (whether
131 | provided by a port or not). The most commonly-used type of dependencies in
132 | Portfiles are port dependencies, because dependencies should be provided
133 | by MacPorts ported software whenever possible, and usually only one port
134 | can provide the needed libraries and files.
135 |
136 | But when satisfying a dependency with vendor-supplied software is
137 | preferred for special reasons, or when it is possible for more than one
138 | port to satisfy a dependency, then file dependencies may be used. An
139 | example of the former is with ubiquitous utilities like awk, grep, make or
140 | sed, where the versions in macOS are often sufficient; an example of the latter
141 | is with -devel ports—these ports provide a different
142 | version of the same files (though only one can be activated at a
143 | time).
144 |
145 | Port dependencies, the preferred type, are specified as shown in
146 | these examples:
147 |
148 | depends_lib port:rrdtool port:apache2
149 |
150 | depends_build port:libtool
151 |
152 | depends_run port:apache2 port:php5
153 |
154 | File dependencies should only be used if one of the reasons listed
155 | above applies. There are three types: for
156 | programs, for libraries, and
157 | for any installed file. File dependencies are specified in the form:
158 | <type>:<filespec>:<port>.
159 |
160 | For dependencies,
161 | <filespec> is the name of a program in a
162 | bin directory like ${prefix}/bin, /usr/bin, /bin, and
163 | the associated sbin directories.
164 |
165 | For dependencies,
166 | <filespec> is the name of a library
167 | (but without its extension) in a lib directory like
168 | ${prefix}/lib, /usr/lib, /lib, some Framework
169 | directories, and those found in environment variables like DYLD_LIBRARY_PATH.
170 |
171 | For dependencies,
172 | <filespec> is the complete absolute path
173 | to the file, or more usually, when the file is inside
174 | ${prefix}, it is specified relative to
175 | ${prefix}.
176 | Since dependencies are the only ones which would find
177 | files only in an absolute path or a path inside ${prefix}
178 | they are - in cases when a port needs to be more restrictive - often used
179 | instead of and dependencies .
180 |
181 | Note that the <port> specified is
182 | only installed if the specified library, binary, or file is not found. See
183 | the examples below:
184 |
185 | depends_lib lib:libX11.6:xorg
186 |
187 | depends_build bin:glibtool:libtool
188 |
189 | depends_run path:lib/libltdl.a:libtool
190 |
191 |
192 |
--------------------------------------------------------------------------------
/guide/xml/portfile-livecheck.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | Livecheck / Distcheck
7 |
8 | Options livecheck and distcheck are especially useful for port
9 | maintainers, but others may also find this information valuable.
10 |
11 | Livecheck checks to see if MacPorts can query the developer's
12 | download site to determine if a newer version of the software has become
13 | available since the port was installed.
14 |
15 |
16 |
17 | livecheck.type
18 |
19 |
20 | Specify what kind of update check to perform.
21 |
22 | Open source mirror site options are to use the project's
23 | latest file release from
24 | or the project's
25 | date_updated XML tag for
26 | . These options are automatically used if
27 | a matching ${master_sites} URL is used.
28 |
29 | Generic download site options are to specify a
30 | (modification date of a URL resource), a
31 | (retrieve the version by applying a regex to
32 | a URL resource), (retrieve the version by
33 | applying a multi-line regex to a URL resource),
34 | (compares the md5 sum of a URL resource) or
35 | (no check).
36 |
37 |
38 |
39 | Default: or
40 | if the
41 | ${master_sites} is one of these, else
42 | .
43 |
44 |
45 |
46 | Values:
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Examples:
55 |
56 | livecheck.type regex
57 | livecheck.url ${homepage}
58 | livecheck.regex "Generally Available (\\d+(?:\\.\\d+)*)"
59 |
60 |
61 |
62 |
63 |
64 |
65 | livecheck.name
66 |
67 |
68 | Name of the project for live checks. Is only used with
69 | freecode, sourceforge
70 |
71 |
72 |
73 | Default: ${name} or the sourceforge,
74 | freecode project name if it can be guessed from
75 | ${master_sites}.
76 |
77 |
78 |
79 | Example:
80 |
81 | livecheck.name hibernate
82 |
83 |
84 |
85 |
86 |
87 |
88 | livecheck.distname
89 |
90 |
91 | Name of the file release for sourceforge
92 | checks. Use the name of the package release.
93 | You may use this keyword without
94 | livecheck.version if you replace the version part of
95 | the name with (.*).
96 |
97 |
98 |
99 | Default: sourceforge:
100 | ${livecheck.name}
101 |
102 |
103 |
104 | Example:
105 |
106 | livecheck.distname faad2.src
107 |
108 |
109 |
110 |
111 |
112 |
113 | livecheck.version
114 |
115 |
116 | Version of the project for a check; used for regex-based
117 | checks.
118 |
119 |
120 |
121 | Default: ${version}
122 |
123 |
124 |
125 | Example:
126 |
127 | livecheck.version ${name}-${version}
128 |
129 |
130 |
131 |
132 |
133 |
134 | livecheck.url
135 |
136 |
137 | URL to query for a check.
138 |
139 |
140 |
141 | Default:
142 |
143 |
144 |
145 | ${homepage} or the first hit among
146 | the following sites:
147 |
148 |
149 |
150 | http://freecode.com/projects-xml/${livecheck.name}/${livecheck.name}.xml
151 |
152 |
153 |
154 | https://sourceforge.net/api/file/index/project-name/${livecheck.name}/rss
155 |
156 |
157 |
158 | https://code.google.com/p/${livecheck.name}/downloads/list
159 |
160 |
161 |
162 |
163 |
164 | Example:
165 |
166 | livecheck.url https://ftp.gnu.org/gnu/bison/
167 |
168 |
169 |
170 |
171 |
172 |
173 | livecheck.regex
174 |
175 |
176 | Regular expression to parse the resource for regex checks. Be
177 | sure to use a regular expression grouping around the version
178 | component. Also remember that square brackets need to be quoted because Tcl
179 | otherwise interprets them as a procedure call.
180 |
181 |
182 |
183 | Default: none
184 |
185 |
186 |
187 | Example:
188 |
189 | livecheck.regex 4th-(\[a-z0-9.\]+)-unix${extract.suffix}
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 | livecheck.md5
200 |
201 |
202 | md5 checksum to use for an md5 comparison.
203 |
204 |
205 |
206 | Default: none
207 |
208 |
209 |
210 | Example:
211 |
212 | livecheck.md5 37e6a5b6516a680c7178b72021d3b706
213 |
214 |
215 |
216 |
217 |
218 |
219 | livecheck.ignore_sslcert
220 |
221 |
222 | Disables verification of the server's SSL certificate.
223 |
224 |
225 |
226 | Default:
227 |
228 |
229 |
230 | Example:
231 |
232 | livecheck.ignore_sslcert yes
233 |
234 |
235 |
236 |
237 |
238 |
239 | livecheck.compression
240 |
241 |
242 | Sets the Accept-Encoding HTTP header in the request and automatically decompresses the server's response.
243 |
244 |
245 |
246 | Default:
247 |
248 |
249 |
250 | Example:
251 |
252 | livecheck.compression no
253 |
254 |
255 |
256 |
257 |
258 |
259 | Distcheck reports whether or not the distfile(s) specified in a
260 | Portfile are still available on the developer's download site. Examples
261 | are given below.
262 |
263 |
264 |
265 | distcheck.check
266 |
267 |
268 | This option can be used to disable distcheck. It specifies
269 | what kind of check should be performed on distfiles:
270 | (check if the Portfile is older than the
271 | distfile) or (no check).
272 |
273 |
274 |
275 | Default:
276 |
277 |
278 |
279 | Example:
280 |
281 | distcheck.check none
282 |
283 |
284 |
285 |
286 |
287 |
288 |
--------------------------------------------------------------------------------
/guide/xml/portfile-subports.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Subports
6 |
7 | The subport declaration causes MacPorts to define an additional port,
8 | with the name given by the declaration. The keywords
9 | for the subport are those in the global section of the Portfile, and those
10 | in the brace-enclosed body.
11 |
12 |
13 |
14 | subport name body
15 |
16 |
17 | Example:
18 |
19 |
20 | Portfile 1.0
21 |
22 | name example
23 |
24 | depends_lib aaa
25 | configure.args --bbb
26 |
27 | subport example-sub1 {
28 | depends_lib-append ccc
29 | configure.args --ddd
30 | }
31 |
32 | subport example-sub2 {
33 | depends_lib-append eee
34 | configure.args-append --fff
35 | }
36 |
37 |
38 |
39 |
40 |
41 | Because MacPorts treats each subport as a separate port declaration,
42 | each subport will have its own, independent phases: fetch, configure,
43 | build, destroot, install, activate, etc. However, because the subports
44 | share the global declaration part, all the subports will by default
45 | share the same dist_subdir. This means that MacPorts only needs to fetch
46 | the distfiles once, and the remaining subports can reuse the
47 | distfiles.
48 |
49 |
50 |
--------------------------------------------------------------------------------
/guide/xml/portfile-tcl.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Tcl Extensions & Useful Tcl Commands
6 |
7 | A MacPorts Portfile is a Tcl script, so it may contain any arbitrary
8 | Tcl code you may learn about in the Tcl documentation.
10 | However, few authors will use arbitrary Tcl code; the vast majority will use
11 | a subset of Tcl commands and a number of Tcl extensions that are coded within
12 | MacPorts for performing the most common tasks needed for Portfiles. The list
13 | below is a list of useful Tcl commands for Portfile development and Tcl
14 | extensions provided by MacPorts base.
15 |
16 |
17 |
18 | file
19 |
20 |
21 | The standard Tcl file command can be used for
22 | a number of operations on files, such as moving, renaming, deleting,
23 | or creating directories, among others. For a complete list, consult
24 | the Tcl
25 | reference manual for the file command,
26 | or the Tcl file manpage in the section of manpages
27 | on your machine using man n file
28 |
29 |
30 |
31 | file copy
32 |
33 |
34 | Copy a file.
35 |
36 |
37 |
38 |
39 |
40 |
41 | file rename
42 |
43 |
44 | Rename a file.
45 |
46 |
47 |
48 |
49 |
50 |
51 | file delete [-force]
52 |
53 |
54 | Remove a file or (with ) a directory
55 | and its contents.
56 |
57 |
58 |
59 |
60 |
61 |
62 | file mkdir
63 |
64 |
65 | Create a directory.
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | macros
74 |
75 |
76 | For the above operations provided by Tcl's
77 | file command, MacPorts provides the following
78 | shorthands. These should be used in preference to the Tcl commands
79 | above, as they may work around certain bugs.
80 |
81 |
82 |
83 | copy
84 |
85 |
86 | Shorthand for file copy.
87 |
88 |
89 |
90 |
91 |
92 |
93 | move
94 |
95 |
96 | Similar to file rename but correctly handles
97 | renames that only change the case of a file on a case-insensitive
98 | filesystem.
99 |
100 |
101 |
102 |
103 | delete
104 |
105 |
106 | Shorthand for file delete -force.
107 |
108 |
109 |
110 |
111 | touch
112 |
113 |
114 | Mimics the BSD touch command.
115 |
116 |
117 |
118 |
119 | ln
120 |
121 |
122 | Mimics the BSD ln command.
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | xinstall
131 |
132 |
133 | xinstall copies files and creates directories; it is intended to
134 | be compatible with install(1).
135 |
136 |
137 |
138 | xinstall [-o owner] [-g
139 | group] [-m
140 | mode] [file1 file2
141 | ...] directory
142 |
143 |
144 | Install the specified file(s) to a destination
145 | directory.
146 |
147 |
148 |
149 |
150 |
151 |
152 | xinstall [-o owner] [-g
153 | group] [-m
154 | mode] [-W
155 | dir] [file1 file2
156 | ...] directory
157 |
158 |
159 | Change to and install file(s) to a
160 | destination directory.
161 |
162 |
163 |
164 |
165 |
166 |
167 | xinstall [-o owner] [-g
168 | group] [-m
169 | mode] {*}[glob
170 | pattern]
171 | directory
172 |
173 |
174 | Install the file(s) matching the glob pattern to a
175 | destination directory. Note the use of the
176 | operator to convert the list returned by glob
177 | into separate arguments to xinstall.
178 |
179 |
180 |
181 |
182 |
183 |
184 | xinstall -d [-o owner] [-g
185 | group] [-m
186 | mode]
187 | directory
188 |
189 |
190 | Create a directory including parent directories if
191 | necessary.
192 |
193 |
194 |
195 |
196 | Defaults:
197 |
198 |
199 |
200 | owner -
201 |
202 |
203 |
204 | group -
205 |
206 |
207 |
208 | mode -
209 |
210 |
211 |
212 | Examples:
213 |
214 | xinstall -m 640 ${worksrcpath}/README \
215 | ${destroot}${prefix}/share/doc/${name}
216 |
217 | xinstall -m 640 -W ${worksrcpath}/doc README INSTALL COPY \
218 | ${destroot}${prefix}/share/doc/${name}
219 |
220 | xinstall -m 640 {*}[glob ${worksrcpath}/doc/*] \
221 | ${destroot}${prefix}/share/doc/${name}
222 |
223 | xinstall -d ${destroot}${prefix}/share/doc/${name}
224 |
225 |
226 |
227 |
228 | strsed
229 |
230 |
231 | strsed can be used for string manipulations using regular
232 | expressions. It supports a small subset of the commands known
233 | from sed(1).
234 |
235 |
236 |
237 | strsed string
238 | s/regex/replacement/
239 |
240 |
241 |
242 | Replaces the first instance of
243 | regex with
244 | replacement. Refer to
245 | re_format(7) for a definition of regular expression
246 | syntax.
247 |
248 |
249 |
250 |
251 | strsed string
252 | g/regex/replacement/
253 |
254 |
255 |
256 | The same as the previous format, except all
257 | instances of the pattern will be replaced, not only
258 | the first (mnemonic: 'g' is for global).
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 | reinplace
267 |
268 |
269 | Allows text specified by a regular expression to be replaced by
270 | new text, in-place (the file will be updated itself, no need to place
271 | output into a new file and rename).
272 |
273 |
274 |
275 |
276 | reinplace
277 | [-locale locale]
278 | [-n]
279 | [-W dir]
280 | [--] command
281 | file
282 | [file2 ...]
283 |
284 |
285 |
286 | Replace text given by the regular expression portion of
287 | the command with the replacement text, in all files
288 | specified.
289 |
290 | Use -locale to set the locale. The default locale is en_US.UTF-8.
291 | For example, -locale C will allow a non-UTF-8 file to be modified (which
292 | may otherwise give the error "sed: RE error: illegal byte sequence"), but only operating
293 | on ASCII characters. If you need it to work on non-ASCII characters you need to set a
294 | locale with the correct charset for the file, e.g. "en_US.ISO8859-1".
295 |
296 | -n is passed to sed to suppress echoing result
297 |
298 | -W to set a common working directory for multiple
299 | files
300 |
301 | Use -E to use the extended regular expression style (see
302 | re_format(7) for a description of the basic and extended
303 | styles)
304 |
305 | Use -- to end option processing and allow any further
306 | dashes not to be treated as options.
307 |
308 |
309 |
310 |
311 | Examples:
312 |
313 | reinplace -W ${worksrcpath} "s|/usr/local|${prefix}|g" configure setup.py
314 |
315 | reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/Makefile
316 |
317 |
318 |
319 |
320 | user/group
321 |
322 |
323 |
324 |
325 |
326 |
327 | adduser username [uxml:id=uid]
328 | [gxml:id=gid]
329 | [passwd=passwd]
330 | [realname=realname]
331 | [home=home]
332 | [shell=shell]
333 |
334 |
335 | Add a new local user to the system with the specified uid,
336 | gid, password, real name, home directory and login shell.
337 |
338 |
339 |
340 |
341 |
342 |
343 | existsuser username
344 |
345 |
346 | Check if a local user exists. Returns the uid for the
347 | given user, or 0 if the user wasn't found. Checking for the root
348 | user is not supported because its uid is 0, and it will always
349 | exist anyway.
350 |
351 |
352 |
353 |
354 |
355 |
356 | nextuid
357 |
358 |
359 | Returns the highest used uid plus one.
360 |
361 |
362 |
363 |
364 |
365 |
366 | addgroup group
367 | [gxml:id=gid]
368 | [passwd=passwd]
369 | [realname=realname]
370 | [users=users]
371 |
372 |
373 | Add a new local group to the system, with the specified
374 | gid, password, real name, and with a list of users as
375 | members.
376 |
377 |
378 |
379 |
380 |
381 |
382 | existsgroup group
383 |
384 |
385 | Check if a local group exists and return the corresponding
386 | gid. This can be used with adduser:
387 |
388 | addgroup foo
389 | adduser foo gxml:id=[existsgroup foo]
390 |
391 |
392 |
393 |
394 |
395 |
396 | nextgid
397 |
398 |
399 | Returns the highest used gid plus one.
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 | External program execution
408 |
409 |
410 | Use only when ....
411 |
412 |
413 |
414 |
415 |
--------------------------------------------------------------------------------
/guide/xml/portfile-variables.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Global Variables
6 |
7 | Global variables are variables available to any Portfile. For a list
8 | of additional variables available to ports that are assigned to a MacPorts
9 | Portgroup, see portgroup(7).
10 |
11 | All of these variables except prefix are
12 | read-only!
13 |
14 |
15 |
16 | prefix
17 |
18 |
19 | Installation prefix, set at compile time and displayed in
20 | ${prefix}/etc/macports/macports.conf —- may be
21 | overridden on a per-port basis, for example to install into a
22 | wholly-contained subdirectory of ${prefix}, but most ports should
23 | have no reason to do so.
24 |
25 | Default: /opt/local
26 |
27 |
28 |
29 |
30 | libpath
31 |
32 |
33 | Path to the MacPorts Tcl libraries.
34 |
35 |
36 |
37 |
38 | portpath
39 |
40 |
41 | Full path to the Portfile of the port being executed. Portfile
42 | repositories are defined in the file sources.conf.
44 |
45 | Default:
46 | ${prefix}/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/<category>/<portname>/
47 |
48 |
49 |
50 |
51 | filesdir
52 |
53 |
54 | Path to files directory relative to
55 | ${portpath}.
56 |
57 | Value: files
58 |
59 |
60 |
61 |
62 | filespath
63 |
64 |
65 | Full path to files directory.
66 |
67 | Value: ${portpath}/${filesdir}
68 |
69 |
70 |
71 |
72 | workpath
73 |
74 |
75 | Full path to work directory.
76 |
77 |
78 |
79 | Value: ${portbuildpath}/work
80 |
81 |
82 |
83 |
84 | worksrcpath
85 |
86 |
87 | Full path to extracted source code.
88 |
89 | Value: ${workpath}/${worksrcdir}
90 |
91 |
92 |
93 |
94 | destroot
95 |
96 |
97 | Full path into which software will be destrooted.
98 |
99 | Value: ${workpath}/destroot
100 |
101 |
102 |
103 |
104 | distpath
105 |
106 |
107 | Location to store downloaded distfiles.
108 |
109 | Value:
110 | ${portdbpath}/distfiles/${dist_subdir}
111 |
112 |
113 |
114 |
115 | install.user
116 |
117 |
118 | The Unix user at the time of port installation.
119 |
120 |
121 |
122 |
123 | install.group
124 |
125 |
126 | The Unix group at the time of port installation.
127 |
128 |
129 |
130 |
131 | os.platform
132 |
133 |
134 | The underlying operating system platform (e.g.,
135 | darwin on macOS, freebsd,
136 | etc.).
137 |
138 |
139 |
140 |
141 | os.arch
142 |
143 |
144 | The hardware architecture -- either powerpc,
145 | i386, or arm.
146 |
147 |
148 |
149 |
150 | os.version
151 |
152 |
153 | The version number of the host operating system (e.g.,
154 | 12.3.0 for Darwin 12.3.0 a.k.a. OS X 10.8.3).
155 |
156 |
157 |
158 |
159 | os.endian
160 |
161 |
162 | Endianness of the processor -- either big (on
163 | PowerPC systems) or little (on Intel and Apple Silicon systems).
164 |
165 |
166 |
167 |
168 | os.major
169 |
170 |
171 | The major version number of the host operating system (e.g.,
172 | 12 for Darwin 12.x).
173 |
174 |
175 |
176 |
177 | macos_version
178 |
179 |
180 | The full macOS version number of the host operating system, if applicable (e.g.,
181 | 10.15.7).
182 |
183 |
184 |
185 |
186 | macos_version_major
187 |
188 |
189 | The major macOS version number of the host operating system, if applicable (e.g.,
190 | 12 for Monterey or 10.15 for Catalina).
191 |
192 |
193 |
194 |
195 | xcodeversion
196 |
197 |
198 | The installed version of Xcode, if any (e.g.,
199 | 14.0.1).
200 |
201 |
202 |
203 |
204 | xcodecltversion
205 |
206 |
207 | (Added: MacPorts 2.8) The installed version of the Command Line
208 | Tools for Xcode, if any (e.g., 14.0.0.0.1.1661618636).
209 |
210 |
211 |
212 |
213 | universal_possible
214 |
215 |
216 | Boolean value indicating whether it is possible to build universal binaries
217 | given the configured SDK and universal_archs and the port's supported_archs.
218 |
219 |
220 |
221 |
222 |
223 |
--------------------------------------------------------------------------------
/guide/xml/portfile-variants.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Variants
6 |
7 | MacPorts variants are conditional modifications of port installation
8 | behavior during port installation. There are two types of variants:
9 | user-selected variants and platform variants. User-selected variants are
10 | options selected by a user when a port is installed; platform variants are
11 | selected automatically by MacPorts base according to the OS or hardware
12 | platform (darwin, freebsd, linux, i386, powerpc, etc.).
13 |
14 |
15 | User-Selected Variants
16 |
17 | User-selected variants are those that are defined so a user can
18 | invoke them to enable port options at install time. They also allow a port
19 | author a level of modularity and control using the keyword
20 | default_variants (see below).
21 |
22 |
23 | Variant names may contain only letters, numbers and underscore
24 | characters. In particular, the hyphen is not a valid character in
25 | variant names because it would conflict with the notation for deselecting
26 | a variant.
27 |
28 |
29 |
30 |
31 | variant name [requires
32 | variant1 variant2 ...] [conflicts
33 | variant1 variant2 ...] [description
34 | description]
35 |
36 |
37 | The variant declaration may contain any keywords that can be
38 | placed in a Portfile's global section. If you wish to execute system
39 | (shell) calls or Tcl extensions during the execution of a port
40 | phase, you should place those statements within a
41 | variant_isset conditional within a phase
42 | declaration and not within the variant declaration itself.
43 | Dependencies and conflicts with other variants in the same port can
44 | be expressed with requires and
45 | conflicts options as shown below.
46 |
47 |
48 |
49 | Default: none
50 |
51 |
52 |
53 | Examples:
54 |
55 | variant gnome requires glib {
56 | configure.args-append --with-gnome
57 | depends_lib-append port:gnome-session
58 | }
59 |
60 | variant apache2 conflicts apache {
61 | configure.args-append \
62 | --with-apxs2=${prefix}/apache2/bin/apxs
63 | }
64 |
65 |
66 |
67 |
68 |
69 |
70 | default_variants
71 |
72 |
73 | The optional default_variants keyword is
74 | used to specify variants that a port author wishes to have enabled
75 | by default. This allows for Portfile modularity and also allows
76 | users to suppress default variants if they wish.
77 |
78 |
79 |
80 | Default: none
81 |
82 |
83 |
84 | Example:
85 |
86 | default_variants +ssl +tcpd
87 |
88 |
89 |
90 |
91 |
92 | Default variants may be suppressed by preceding a variant name
93 | with a - as shown in this example.
94 |
95 | %%port install foo -ssl
96 |
97 |
98 |
99 |
100 | universal_variant
101 |
102 |
103 | When using MacPorts on macOS, a universal variant is
104 | defined by default to configure ports with universal flags. The
105 | variant can be overridden if the default code does not work (see the
106 | Configure
107 | Universal section above), or suppressed if a universal
108 | variant does not function properly for a given port.
109 |
110 |
111 |
112 | Default:
113 |
114 |
115 |
116 | Example:
117 |
118 | universal_variant no
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | User-Selected Variant Descriptions
128 |
129 | User-selected variants ought to provide a description, which will be
130 | displayed when using command port variants foo. The
131 | syntax used for the description keyword is shown below.
132 |
133 | variant bar description {Add IMAP support} {}
134 |
135 | Descriptions should be short but clear, and not merely repeat the
136 | name of the variant. To allow for compatibility for possible MacPorts GUI
137 | support, a good rule of thumb is to use sentence fragments for brevity,
138 | with a capitalized first letter and no trailing punctuation. Think of them
139 | as short labels such as ones you'd find next to a GUI checkbox or radio
140 | button. Thus, it would be better to write Build with support for
141 | foo instead of Builds with support for foo;
142 | Add support for foo would be better than Adds support
143 | for foo.
144 |
145 | Variant descriptions are strings, so one should take care not to put
146 | whitespace between the brackets and the beginning and end of the variant
147 | description, and also not to use unnecessary whitespace, unlike with
148 | port descriptions and long_descriptions.
149 |
150 |
151 |
152 | Platform Variants
153 |
154 | Platform variants are either defined by default in MacPorts base, or
155 | defined by a port author to customize a port's installation according to
156 | OS (operating system) or hardware platform.
157 |
158 |
159 |
160 | platform os
161 | [version]
162 | [arch]
163 |
164 |
165 | MacPorts allows platform-specific port options to be specified
166 | in a Portfile for handling differences between platforms and
167 | versions of the same platform.
168 |
169 | platform darwin
170 | version can be used to handle
171 | different tasks depending on the version of Darwin, the core
172 | operating system underlying macOS.
173 | version is the major version of Darwin,
174 | and can be 18 for macOS Mojave 10.14,
175 | 17 for macOS High Sierra 10.13, 16
176 | for macOS Sierra 10.12, and so on.
177 |
178 |
179 |
180 | Examples:
181 |
182 |
183 | platform darwin 10 {
184 | configure.env-append LIBS=-lresolv
185 | }
186 |
187 |
188 | platform darwin i386 {
189 | configure.args-append --disable-mmx
190 | }
191 |
192 |
193 | platform darwin 8 powerpc {
194 | configure.compiler gcc-3.3
195 | }
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 | Though a combination of OS version and hardware platform may be
207 | specified in a single platform statement (e.g., darwin 8 i386), it is not
208 | possible to specify a range of platforms with a single statement. For
209 | example, to select Darwin versions 9 and 10 while excluding all others,
210 | you would need two statements: platform darwin 9 and
211 | platform darwin 10. Alternately, you could make that
212 | behavior the port's default, and add a platform darwin 8
213 | block to remove it again.
214 |
215 |
216 |
217 |
--------------------------------------------------------------------------------
/guide/xml/portfileref.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | Portfile Reference
6 |
7 | This chapter serves as a reference for the major elements of a
8 | Portfile: port phases, dependencies, StartupItems, variables, keywords, and
9 | Tcl extensions.
10 |
11 |
13 |
14 |
16 |
17 |
19 |
20 |
22 |
23 |
25 |
26 |
28 |
29 |
31 |
32 |
34 |
35 |
37 |
38 |
39 | PortGroups
40 |
41 |
43 |
44 |
46 |
47 |
49 |
50 |
52 |
53 |
55 |
56 |
58 |
59 |
61 |
62 |
64 |
65 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-github.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup github
7 |
8 | The github portgroup allows for efficient porting of
9 | software hosted on GitHub.
10 |
11 |
12 | Description
13 |
14 |
15 | This portgroup greatly simplifies the porting of software hosted on
16 | GitHub. Provided a GitHub repository author follows common GitHub
17 | practices, a port can be almost fully configured simply by declaring the
18 | repository coordinates. The github portgroup is indeed
19 | capable of configuring, amongst other things:
20 |
21 |
22 |
23 | The port name.
24 |
25 |
26 | The port version.
27 |
28 |
29 | The distfiles (if the project uses GitHub
30 | releases).
31 |
32 |
33 | The livecheck parameters.
34 |
35 |
36 |
37 |
38 |
39 |
40 | Setting up the GitHub repository coordinates
41 |
42 |
43 | The main port configuration is triggered by the usage of the
44 | github.setup keyword:
45 |
46 |
47 | PortGroup github 1.0
48 | github.setup author project version [tag_prefix]
49 |
50 |
51 |
52 | By default, the port name will be set to the GitHub project
53 | name (project) and version will be set to the
54 | GitHub project version. The port name can be overridden by
55 | using the name keyword.
56 |
57 |
58 |
59 | The tag_prefix is optional, and it's used to specify a prefix
60 | to use when constructing the tag name. If, for example, the project uses
61 | tags such as v1.0.0, then the tag_prefix should
62 | be set to v, as in the following example:
63 |
64 |
65 | github.setup author project version v
66 |
67 |
68 |
69 |
70 | Choosing a distfile strategy
71 |
72 |
73 | GitHub, and as a consequence the github portgroup, offers
74 | multiple mechanisms to get a distfile:
75 |
76 |
77 |
78 | Distfile from a git commit or tag.
79 |
80 |
81 |
82 | Distfile from a GitHub release.
84 |
85 |
86 |
87 |
88 | Distfile from a GitHub download.
90 |
91 |
92 |
93 |
94 | Distfile from Github legacy auto-generated tarball downloads
95 |
96 |
97 |
98 |
99 |
100 |
101 | The default behaviour of the portgroup is to use GitHub releases.
102 | However, not all projects offer releases, so it may be necessary to
103 | instead use an automatically generated distfile from a
104 | git commit or tag.
105 |
106 |
107 |
108 |
109 | Distfile from a GitHub release
110 |
111 |
112 | The github portgroup allows maintainers to easily configure
113 | the distfiles when the project uses GitHub releases. A release is the
114 | best distfile candidate, and project maintainers should be encouraged to
115 | use them. To enable this feature, the following keyword should be used:
116 |
117 |
118 | github.tarball_from releases
119 |
120 | By default, the github portgroup sets distname
121 | to:
122 |
123 |
124 | distname ${github.project}-${github.version}
125 |
126 | However, GitHub does not enforce any rule for release distfiles, so port
127 | maintainers may need to override the distname as they would
128 | do for other ports.
129 |
130 |
131 |
132 |
133 | Distfile from tag or commit
134 |
135 |
136 | The github portgroup can leverage
137 | GitHub's ability to create a distfile from a git tag or
138 | commit. In this case, the distname is irrelevant and should
139 | not be set. To enable this feature, the following keyword should be used:
140 |
141 |
142 | github.tarball_from archive
143 |
144 |
145 |
146 | If the project's developers do not tag their releases, they should be
147 | encouraged to do so. Until they do, or in the case in which an untagged
148 | development version has to be used, port maintainers have the possibility
149 | of specifying a git commit hash and manually set the
150 | version field. If the project does not assign version
151 | numbers the port maintainer has to define one. Such versions typically
152 | format the date of the chosen commit using the YYYYMMDD
153 | pattern. If, for example, the port maintainer decides to use a changeset
154 | with the hash 0ff25277c3842598d919cd3c73d60768, committed on
155 | April 1, 2014, then the following would be used:
156 |
157 |
158 | github.setup someone someproject 0ff25277c3842598d919cd3c73d60768
159 | version 20140401
160 |
161 |
162 |
163 |
164 | Distfile from a GitHub download
165 |
166 |
167 | Older projects use the discontinued downloads
169 | service. New GitHub downloads can no longer be created, but old ones are
170 | still available.
171 |
172 |
173 |
174 | If the project doesn't have GitHub releases but does have GitHub
175 | downloads, they can be used using the following keyword:
176 |
177 |
178 | github.tarball_from downloads
179 |
180 | Since GitHub doesn't enforce any naming rules for downloads, the portgroup
181 | can only provide a sensible default value for distname, which
182 | can be overridden if necessary.
183 |
184 |
185 |
186 |
187 | Distfile from GitHub legacy tarball downloads
188 |
189 |
190 | Some ports still use GitHub's older automatically-generated tarball
191 | URLs that can be used for downloading distfiles. This is deprecated
192 | since the contents of the tarballs can change in some circumstances,
193 | such as when the account name of the repository owner changes, and
194 | this causes checksum mismatches. This mechanism should not be used in
195 | new ports, and existing ports should switch away from it when they are
196 | updated to a newer version.
197 |
198 |
199 | github.tarball_from tarball
200 |
201 |
202 |
203 |
204 |
205 |
206 | Using repositories with git submodules
207 |
208 |
209 | If the project uses git submodules, some projects' tag- or
210 | commit-based distfiles will not contain all the necessary files. Once
211 | again, the best distfile candidate (if available) is a distfile from
212 | GitHub releases, as described in the previous sections. However, in the
213 | case a project doesn't provide any other alternative, a project using
214 | submodules can be successfully retrieved by fetching the sources using
215 | git and then using a post-fetch to initialize
216 | the submodules:
217 |
218 |
219 | fetch.type git
220 |
221 | post-fetch {
222 | system -W ${worksrcpath} "git submodule update --init"
223 | }
224 |
225 |
226 |
227 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-gnustep.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup gnustep
7 |
8 | PortGroup gnustep allows for efficient porting of GNUstep-based open
9 | source software using the GNU objective-C runtime that defines options for
10 | the configuration, build, and destroot phases, and also defines some
11 | values for GNUstep-based software. A minimum Portfile using the gnustep
12 | PortGroup class need only define the fetch and the checksum phases.
13 |
14 |
15 | gnustep PortGroup Specific Keywords
16 |
17 | Portfiles using the gnustep PortGroup allow for port authors to
18 | set the following keywords in addition to the general Portfile
19 | keywords.
20 |
21 |
22 |
23 | gnustep.post_flags
24 |
25 |
26 | An associative array which specifies the sub-directories
27 | relative to ${worksrcpath} and the SHARED_LD_POSTFLAGS variables
28 | to be added to GNUmakefile.preamble in those sub-directories. This
29 | helps making the patching process easier on Darwin.
30 |
31 |
32 |
33 | Type: optional
34 |
35 |
36 |
37 | Default: none
38 |
39 |
40 |
41 | Example:
42 |
43 | platform darwin {
44 | array set gnustep.post_flags {
45 | BundleSubDir "-lfoo -lbar"
46 | }
47 | }
48 |
49 |
50 |
51 |
52 |
53 |
54 | gnustep.cc
55 |
56 |
57 | Define the gcc compiler to use when compiling a port.
58 |
59 |
60 |
61 | Type: optional
62 |
63 |
64 |
65 | Default: gcc-mp-4.2
66 |
67 |
68 |
69 | Example:
70 |
71 | gnustep.cc gcc-mp-4.3
72 |
73 |
74 |
75 |
76 |
77 |
78 | variant with_docs
79 |
80 |
81 | Many GNUstep packages include a Documentation sub-directory
82 | that is not built by default. Enabling this variant builds and
83 | installs the included documentation.
84 |
85 |
86 |
87 | Type: optional
88 |
89 |
90 |
91 | Example:
92 |
93 | %%port install gnustep-gui +with_docs
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 | gnustep FilesystemLayout Keywords
103 |
104 | PortGroup gnustep supports both the traditional gnustep file
105 | layout and the new fhs file layout. However, a given ported application
106 | does not necessarily support both. The Portfiles have access to many
107 | procedures to handle these two layouts:
108 |
109 |
110 |
111 | set_gnustep_make
112 |
113 |
114 | Sets GNUSTEP_MAKEFILES according to the
115 | FilesystemLayout
116 |
117 |
118 |
119 |
120 | set_gnustep_env
121 |
122 |
123 | Sets DYLD_LIBRARY_PATH and PATH for the gnustep
124 | FilesystemLayout
125 |
126 |
127 |
128 |
129 | gnustep_layout
130 |
131 |
132 | Returns true (1) if current file layout is gnustep
133 |
134 |
135 |
136 |
137 | set_system_library
138 |
139 |
140 | Sets GNUSTEP_SYSTEM_LIBRARY according to the
141 | FilesystemLayout
142 |
143 |
144 |
145 |
146 | set_local_library
147 |
148 |
149 | Sets GNUSTEP_LOCAL_LIBRARY according to the
150 | FilesystemLayout
151 |
152 |
153 |
154 |
155 |
156 |
157 | gnustep PortGroup Sugar
158 |
159 | Portfiles using PortGroup gnustep do not need to define the
160 | following variables:
161 |
162 |
163 |
164 | categories
165 |
166 |
167 | Default: gnustep
168 |
169 |
170 |
171 |
172 | homepage
173 |
174 |
175 | Default: http://www.gnustep.org/
176 |
177 |
178 |
179 |
180 | master_sites
181 |
182 |
183 | Default: gnustep:core
184 |
185 |
186 |
187 |
188 | depends_lib
189 |
190 |
191 | Default: gnustep-core
192 |
193 |
194 |
195 |
196 | use_configure
197 |
198 |
199 | Default: no
200 |
201 |
202 |
203 |
204 | configure.env
205 |
206 |
207 | Default: DYLD_LIBRARY_PATH PATH
208 |
209 |
210 |
211 |
212 | configure.pre_args-append
213 |
214 |
215 | Default: CC=gcc-mp-4.2 GNUSTEP_MAKEFILES
216 |
217 |
218 |
219 |
220 | build.type
221 |
222 |
223 | Default: gnu
224 |
225 |
226 |
227 |
228 | build.env
229 |
230 |
231 | Default: DYLD_LIBRARY_PATH PATH
232 |
233 |
234 |
235 |
236 | build.pre_args-append
237 |
238 |
239 | Default: messages=yes
240 |
241 |
242 |
243 |
244 | destroot.env
245 |
246 |
247 | Default: DYLD_LIBRARY_PATH PATH
248 |
249 |
250 |
251 |
252 | destroot.pre_args-append
253 |
254 |
255 | Default: messages=yes
256 |
257 |
258 |
259 |
260 |
261 |
262 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-golang.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup golang
7 |
8 | The golang PortGroup allows for efficient porting of
9 | Go-based open source software.
10 |
11 |
12 | Description
13 |
14 |
15 | This PortGroup greatly simplifies the porting of software written in Go,
16 | especially when the software and its dependencies are hosted on GitHub or
17 | Bitbucket. Provided a project author follows common Go packaging
18 | practices, a port can be almost fully configured simply by declaring the
19 | package identifier.
20 |
21 |
22 |
23 | In particular, Go has strict requirements relating to the arrangement of
24 | code on the filesystem (GOPATH). This PortGroup handles the construction
25 | of the GOPATH for you.
26 |
27 |
28 |
29 |
30 | Setting up the Go package identifier
31 |
32 |
33 | The main port configuration is triggered by the usage of the
34 | go.setup keyword:
35 |
36 |
37 | PortGroup golang 1.0
38 | go.setup domain/author/project version [tag_prefix] [tag_suffix]
39 |
40 |
41 |
42 | By default, the port name will be set to the package name
43 | (project) and version will be set to the project
44 | version. The port name can be overridden by using the
45 | name keyword.
46 |
47 |
48 |
49 | The tag_prefix and tag_suffix are optional, and
50 | are used to specify a prefix/suffix to use when constructing the tag name.
51 | If, for example, the project uses tags such as v1.0.0, then
52 | the tag_prefix should be set to v, as in the
53 | following example:
54 |
55 |
56 | go.setup domain/author/project version v
57 |
58 |
59 |
60 | When the domain is either github.com or
61 | bitbucket.org, the appropriate PortGroup will be applied and
62 | set up automatically. See those PortGroups' documentation for details.
63 |
64 |
65 |
66 | Projects hosted elsewhere can be used, but require additional manual setup.
67 |
68 |
69 |
70 |
71 | Setting up dependencies
72 |
73 |
74 | The PortGroup provides a keyword to facilitate listing dependencies:
75 | go.vendors. Supply a list of vendor package IDs, their
76 | versions (git commit hashes, labeled "lock" as in "lockfile"), and their
77 | checksums as follows. The packages and their versions can usually be
78 | found in a lockfile (e.g. Gopkg.lock,
79 | glide.lock) in the upstream code. All checksum types
80 | supported by the checksums keyword are
82 | supported here as well.
83 |
84 |
85 | go.vendors example.com/dep1/foo \
86 | lock abcdef123456... \
87 | rmd160 fedcba654321... \
88 | sha256 bdface246135... \
89 | size 1234 \
90 | example.com/dep2/bar \
91 | lock abcdef123456... \
92 | rmd160 fedcba654321... \
93 | sha256 bdface246135... \
94 | size 4321
95 |
96 |
97 |
98 | Note that go.vendors cannot be used with dependencies hosted
99 | outside of GitHub and Bitbucket. Such dependencies must be handled
100 | manually.
101 |
102 |
103 |
104 | After the extraction phase, the vendor packages will be placed alongside
105 | the main port code as appropriate in the GOPATH.
106 |
107 |
108 |
109 |
110 | Building and destroot
111 |
112 |
113 | By default this PortGroup runs go build from the
114 | ${worksrcpath}. Assuming this results in a binary with
115 | the same name as the project, and that there are no other files to
116 | install, the following is sufficient for the destroot phase:
117 |
118 |
119 | destroot {
120 | xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/
121 | }
122 |
123 | Please modify as appropriate for each individual port.
124 |
125 |
126 |
127 |
128 | golang PortGroup Specific Variables
129 |
130 | When the golang PortGroup is declared within a Portfile, the
131 | following variables are provided during port install.
132 |
133 |
134 |
135 | go.bin
136 |
137 |
138 | Default: ${prefix}/bin/go
139 |
140 | The Go binary location.
141 |
142 |
143 |
144 |
145 | go.package
146 |
147 |
148 | The package identifier of the port,
149 | e.g. example.com/author/project.
150 |
151 |
152 |
153 |
154 | go.domain, go.author, go.project
155 |
156 |
157 | The individual parts of ${go.package}.
158 |
159 |
160 |
161 |
162 | gopath
163 |
164 |
165 | Default: ${workpath}/gopath
166 |
167 | The location where source packages will be arranged after the
168 | extract phase.
169 |
170 |
171 |
172 |
173 | goarch
174 |
175 |
176 | Default: 386 or amd64, depending on
177 | ${build_arch}
178 |
179 |
180 |
181 |
182 | goos
183 |
184 |
185 | Default: ${os.platform}
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 | golang PortGroup Sugar
194 |
195 | Portfiles using PortGroup golang do not need to define the
196 | following variables:
197 |
198 |
199 |
200 |
201 | name, version, homepage, distname, master_sites, livecheck.*
202 |
203 |
204 | Default: see github or bitbucket PortGroups (when project hosted
205 | on GitHub or Bitbucket)
206 |
207 |
208 |
209 |
210 | depends_build
211 |
212 |
213 | Default: port:go
214 |
215 |
216 |
217 |
218 | use_configure
219 |
220 |
221 | Default: no
222 |
223 |
224 |
225 |
226 | platforms
227 |
228 |
229 | Default: darwin freebsd linux
230 |
231 | Go can target these platforms, but individual ports should
232 | override this as necessary if only some are actually supported.
233 |
234 |
235 |
236 |
237 | build.cmd
238 |
239 |
240 | Default: ${go.bin} build
241 |
242 |
243 |
244 |
245 | build.args
246 |
247 |
248 | Default: ""
249 |
250 |
251 |
252 |
253 | build.target
254 |
255 |
256 | Default: ""
257 |
258 |
259 |
260 |
261 | build.env
262 |
263 |
264 | Default: GOPATH=${gopath}
265 | GOARCH=${goarch}
266 | GOOS=${goos}
267 | CC=${configure.cc}
268 |
269 |
270 |
271 |
272 | post-extract
273 |
274 |
275 | Default: arranges the project and vendor source files
276 | appropriately in the GOPATH.
277 |
278 |
279 |
280 |
281 |
282 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-java.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup java
7 |
8 | PortGroup java is useful for Java packages.
9 |
10 |
11 | java PortGroup Specific Keywords
12 |
13 | Portfiles using the java PortGroup allow for port authors to set
14 | the following keywords in addition to the general Portfile keywords.
15 |
16 |
17 |
18 | java.version
19 |
20 |
21 | This keyword indicates that the port requires a Java
22 | installation of the specified version. If no such installation
23 | can be located, and no fallback option is specified (see below),
24 | the port will fail at the pre-fetch phase.
25 |
26 | The version string can indicate a specific version
27 | or a range with wildcards "+" and "*". Note that Java 8 and
28 | earlier are "1.8", etc., while Java 9 and later are "9",
29 | etc.
30 |
31 |
32 |
33 | Type: optional
34 |
35 |
36 |
37 | Example:
38 | java.version 1.8+
39 |
40 |
41 |
42 |
43 |
44 | java.fallback
45 |
46 |
47 | This keyword indicates an (optional) port dependency
48 | that will be added to the ports 'depends-lib' list in the
49 | case a prior installation of Java satisfying the requested
50 | version can not be found. It is recommended that only an
51 | LTS version of Java be specified as the fallback, as
52 | non-LTS versions are only supported for 6 months.
53 |
54 |
55 |
56 | Type: optional
57 |
58 |
59 |
60 | Example:
61 | java.fallback openjdk17
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | java PortGroup Sugar
71 |
72 | Portfiles using PortGroup java do not need to define the
73 | following variables:
74 |
75 |
76 |
77 | configure.env, build.env, destroot.env
78 |
79 |
80 | Default: JAVA_HOME=(detected value)
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-perl.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup perl5
7 |
8 | PortGroup perl5 allows for efficient porting of perl modules and
9 | other perl open source software.
10 |
11 |
12 | perl5 PortGroup Specific Keywords
13 |
14 | Portfiles using the perl5 PortGroup allow for port authors to set
15 | the following keywords in addition to the general Portfile
16 | keywords.
17 |
18 |
19 |
20 | perl5.setup
21 |
22 |
23 | This keyword sets the ${distfile} and ${version}.
24 |
25 |
26 |
27 | Type: required
28 |
29 |
30 |
31 | Example:
32 |
33 | perl5.setup Net-Telnet 3.03
34 |
35 |
36 |
37 |
38 |
39 | perl5.use_module_build
40 |
41 |
42 | Perl modules are ordinarily assumed to be built with
43 | ExtUtils::MakeMaker. Use this keyword if a module must be built using
44 | Module::Build instead.
45 |
46 |
47 |
48 | Type: optional
49 |
50 |
51 |
52 | Example:
53 |
54 | perl5.use_module_build
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | perl5 PortGroup Sugar
64 |
65 | Portfiles using PortGroup perl5 do not need to define the
66 | following variables:
67 |
68 |
69 |
70 | categories
71 |
72 |
73 | Default: perl
74 |
75 |
76 |
77 |
78 | master_sites
79 |
80 |
81 | Default: perl_cpan:${perl5.cpandir}
82 |
83 |
84 |
85 |
86 | depends_lib
87 |
88 |
89 | Default: perl5.26
90 |
91 |
92 |
93 |
94 | use_configure
95 |
96 |
97 | Default: no
98 |
99 |
100 |
101 |
102 |
103 |
104 | perl5 PortGroup Specific Variables
105 |
106 | When the perl5 PortGroup is declared within a Portfile, the
107 | following variables are provided during port install.
108 |
109 |
110 |
111 | perl5.version
112 |
113 |
114 | The MacPorts Perl version.
115 |
116 |
117 |
118 |
119 | perl5.bin
120 |
121 |
122 | The Perl binary path (i.e.,
123 | ${prefix}/bin/perl).
124 |
125 |
126 |
127 |
128 | perl5.lib
129 |
130 |
131 | Path to the Perl vendor directory.
132 |
133 |
134 |
135 |
136 | perl5.archlib
137 |
138 |
139 | Path to the Perl architecture-dependent modules
140 | directory.
141 |
142 |
143 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-python.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup python
7 |
8 | PortGroup python allows for efficient porting of python-based open
9 | source software.
10 |
11 |
12 | python PortGroup Specific Keywords
13 |
14 | Portfiles using the python PortGroup allow for port authors to
15 | set the following keywords in addition to the general Portfile
16 | keywords.
17 |
18 |
19 |
20 | python.versions
21 |
22 |
23 | Defines the python versions supported by this port. If the
24 | port name starts with py-, then a subport will be defined for each
25 | version in the list. For example, if a port named py-foo declares
26 | python.versions 39 310, subports py39-foo and py310-foo will be
27 | created, and will depend on python39 and python310, respectively.
28 | If the port name does not start with py-, it is interpreted
29 | as an application written in python rather than a python module. In
30 | this case, no subports are defined, and python.versions defaults to
31 | the value of python.default_version, which must be set. For example,
32 | if a port named mercurial sets python.default_version 310, then
33 | python.versions will automatically be set to 310, and a dependency
34 | on python310 will be added.
35 |
36 |
37 |
38 | Type: required for modules, optional for apps
39 |
40 |
41 | Example:
42 |
43 | python.versions 38 39 310
44 |
45 |
46 |
47 |
48 |
49 | python.default_version
50 |
51 |
52 | For modules (i.e., name starts with py-), this sets the
53 | subport that will be installed if the user asks to install py-foo
54 | rather than, e.g., py39-foo or py310-foo. If not explicitly set, a
55 | reasonable default is chosen from the list in python.versions.
56 | For applications (i.e., name does not start with py-), this chooses
57 | which version of python to use, and must be set. It can be changed
58 | in variants if desired.
59 |
60 |
61 |
62 | Type: required for apps, optional for modules
63 |
64 |
65 | Example:
66 |
67 | python.default_version 310
68 |
69 |
70 |
71 |
72 |
73 | python.pep517
74 |
75 |
76 | If set to yes, the port will be built as per
77 | PEP 517.
78 | Dependencies on appropriate front end tools will be added
79 | automatically. This is supported when using Python 3.6 or later, though
80 | the supporting module ports for 3.6 and other EOL Python versions may
81 | be removed in future.
82 | If set to no, the port will be built with the
83 | traditional distutils/setuptools setup.py commands.
84 |
85 |
86 |
87 | Type: optional
88 |
89 |
90 | Default (Python >= 3.7): yes
91 | Default (Python <= 3.6): no
92 |
93 |
94 | Example:
95 |
96 | python.pep517 yes
97 |
98 |
99 |
100 |
101 |
102 | python.pep517_backend
103 |
104 |
105 | This can be set to the name of the PEP 517 build back-end used by the port.
106 | If python.pep517 is set to yes, dependencies on the
107 | ports that provide the specified back-end will be added automatically.
108 | Currently supported values are setuptools, flit,
109 | poetry, hatch, maturin, and
110 | meson. Clearing this option or setting it
111 | to an unsupported value will result in no back-end dependencies being added.
112 |
113 |
114 |
115 | Type: optional
116 |
117 |
118 | Default: setuptools
119 |
120 |
121 | Example:
122 |
123 | python.pep517_backend flit
124 |
125 |
126 |
127 |
128 |
129 | python.test_framework
130 |
131 |
132 | This can be set to the name of testing framework used by the port.
133 | If test.run is set to yes, dependencies on
134 | the port that provides the specified framework will be added automatically.
135 | Currently supported values are pytest, nose,
136 | and unittest. Clearing this option or setting it to an
137 | unsupported value will result in no framework dependency being added.
138 |
139 |
140 |
141 | Type: optional
142 |
143 |
144 | Default: pytest
145 |
146 |
147 | Example:
148 |
149 | python.test_framework nose
150 |
151 |
152 |
153 |
154 |
155 | python.add_dependencies
156 |
157 |
158 | If set to yes, a dependency on a python interpreter will
159 | be added as per python.version, and if python.pep517
160 | is also set to yes, dependencies on appropriate front- and back-end
161 | tools will also be added.
162 | If set to no, the portgroup will not add any dependencies,
163 | and all required dependencies need to be declared in the Portfile.
164 |
165 |
166 |
167 | Type: optional
168 |
169 |
170 | Default: yes
171 |
172 |
173 | Example:
174 |
175 | python.add_dependencies no
176 |
177 |
178 |
179 |
180 |
181 | python.link_binaries
182 |
183 |
184 | When yes (the default), tells the PortGroup to automatically
185 | link any executable binaries installed in the bin/ directory within
186 | the framework into
187 | ${prefix}/bin.
188 |
189 |
190 |
191 | Type: optional
192 |
193 |
194 | Example:
195 |
196 | python.link_binaries no
197 |
198 |
199 |
200 |
201 |
202 | python.link_binaries_suffix
203 |
204 |
205 | Suffix to add to the names of the links created in
206 | ${prefix}/bin when ${python.link_binaries}
207 | is enabled. Can be cleared if no suffix is desired.
208 |
209 |
210 |
211 | Type: optional
212 |
213 |
214 | Default: -${python.branch}
215 |
216 |
217 |
218 |
219 |
220 | python.add_archflags
221 |
222 | When yes (the default), the PortGroup will automatically
223 | try to pass the correct arch-specific flags during build time
224 | (via the standard CFLAGS, LDFLAGS, etc environment variables).
225 | Set this to no and set up those variables in build.env manually
226 | if the default does not work.
227 |
228 |
229 | Type: optional
230 |
231 |
232 | Example:
233 |
234 | python.add_archflags no
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 | python PortGroup Specific Variables
244 |
245 | When the python PortGroup is declared within a Portfile, the
246 | following variables are provided.
247 |
248 |
249 |
250 | python.version
251 |
252 |
253 | The python version in use in the current subport. This will be
254 | one of the versions listed in python.versions.
255 |
256 |
257 |
258 |
259 | python.branch
260 |
261 |
262 | The python version in use in the current subport, in normal
263 | dotted notation. For example, if python.version is 310,
264 | python.branch will be 3.10.
265 |
266 |
267 |
268 |
269 | python.prefix
270 |
271 |
272 | The prefix in which the current python version is installed.
273 | For framework builds, this is ${frameworks_dir}/Python.framework/Versions/${python.branch},
274 | whereas for non-framework builds, it is the same as ${prefix}.
275 |
276 |
277 |
278 |
279 | python.bin
280 |
281 |
282 | The path to the MacPorts Python executable.
283 |
284 |
285 |
286 |
287 | python.lib
288 |
289 |
290 | The Python dynamic library path, i.e.,
291 | ${python.prefix}/Python (framework builds) or
292 | ${prefix}/lib/libpython2.7.dylib (python27).
293 |
294 |
295 |
296 |
297 | python.libdir
298 |
299 |
300 | The path to python's lib directory, i.e.,
301 | ${python.prefix}/lib/python${python.branch}.
302 |
303 |
304 |
305 |
306 | python.include
307 |
308 |
309 | Path to the Python include directory.
310 |
311 |
312 |
313 |
314 | python.pkgd
315 |
316 |
317 | Path to the Python site-packages directory. (i.e.,
318 | ${python.prefix}/lib/python${python.branch}/site-packages).
319 |
320 |
321 |
322 |
323 |
324 |
325 | python PortGroup Sugar
326 |
327 | Portfiles using PortGroup python do not need to define the
328 | following variables:
329 |
330 |
331 |
332 | categories
333 |
334 |
335 | Default: python
336 |
337 |
338 |
339 |
340 | depends_lib
341 |
342 |
343 | Default: port:python${python.version}
344 |
345 |
346 |
347 |
348 | use_configure
349 |
350 |
351 | Default: no
352 |
353 |
354 |
355 |
356 | build.cmd
357 |
358 |
359 | Default (python.pep517 no): ${python.bin} setup.py --no-user-cfg
360 | Default (python.pep517 yes): ${python.bin} -m build --wheel --no-isolation --outdir ${workpath}
361 |
362 |
363 |
364 |
365 | build.target
366 |
367 |
368 | Default (python.pep517 no): build
369 | Default (python.pep517 yes): (empty)
370 |
371 |
372 |
373 |
374 | destroot.cmd
375 |
376 |
377 | Default (python.pep517 no): ${python.bin} setup.py --no-user-cfg
378 | Default (python.pep517 yes): ${python.bin} -m install --verbose
379 |
380 |
381 |
382 |
383 | destroot.destdir
384 |
385 |
386 | Default (python.pep517 no): --prefix=${python.prefix} --root=${destroot}
387 | Default (python.pep517 yes): --destdir ${destroot}
388 |
389 |
390 |
391 |
392 | pre-destroot
393 |
394 |
395 | Default: creates directory
396 | ${destroot}${prefix}/share/doc/${subport}/examples.
397 |
398 |
399 |
400 |
401 |
402 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-ruby.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup ruby
7 |
8 | PortGroup ruby allows for efficient porting of ruby-based open
9 | source software.
10 |
11 |
12 | ruby PortGroup Specific Variables
13 |
14 | When the ruby PortGroup is declared within a Portfile, the
15 | following variables are provided during port install.
16 |
17 |
18 |
19 | ruby.version
20 |
21 |
22 | The MacPorts Ruby version.
23 |
24 |
25 |
26 |
27 | ruby.bin
28 |
29 |
30 | The Ruby binary location.
31 |
32 |
33 |
34 |
35 | ruby.lib
36 |
37 |
38 | Path to the Ruby vendorlibdir directory (i.e.,
39 | ${prefix}/lib/ruby/vendor_ruby/${ruby.version})
40 |
41 |
42 |
43 |
44 | ruby.arch
45 |
46 |
47 | The name for the Ruby architecture-dependent directory name
48 | (i.e., i686-darwin8.10.1).
49 |
50 |
51 |
52 |
53 | ruby.archlib
54 |
55 |
56 | Path to the Ruby vendor archdir (i.e.,
57 | ${ruby.lib}/${ruby.arch}).
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/guide/xml/portgroup-xcode.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | PortGroup xcode
6 |
7 | PortGroup xcode allows for efficient porting of
8 | Xcode-based opensource software. A minimum Portfile for PortGroup
9 | xcode uses defaults for the configuration, build, and destroot
10 | phases. It also defines some values for Xcode-based software.
11 |
12 | Using PortGroup xcode is a way to make your port able to
13 | tolerate Xcode version updates because the PortGroup is tested against all
14 | supported macOS and Xcode versions.
15 |
16 |
17 | xcode PortGroup Specific Keywords
18 |
19 | Portfiles using PortGroup xcode allow for port authors
20 | to set the following keywords in addition to the general Portfile
21 | keywords.
22 |
23 |
24 |
25 | xcode.project
26 |
27 |
28 | The path relative to ${build.dir} and
29 | ${destroot.dir} of the Xcode project. If unset,
30 | Xcode Tools should be able to determine it automatically. It usually
31 | succeeds if there is only a single project in the directory.
32 |
33 |
34 |
35 | Type: optional
36 |
37 |
38 |
39 | Default: none
40 |
41 |
42 |
43 | Example:
44 |
45 | xcode.project ${name}.xcode
46 |
47 |
48 |
49 |
50 |
51 |
52 | xcode.configuration
53 |
54 |
55 | Project configuration/buildstyle to use.
56 |
57 |
58 |
59 | Type: optional
60 |
61 |
62 |
63 | Default:
64 |
65 |
66 |
67 | Example:
68 |
69 | xcode.configuration Main
70 |
71 |
72 |
73 |
74 |
75 |
76 | xcode.target
77 |
78 |
79 | If present, it overrides build.target and
80 | destroot.target.
81 |
82 |
83 |
84 | Type: optional
85 |
86 |
87 |
88 | Default: none
89 |
90 |
91 |
92 | Example:
93 |
94 | xcode.target ${name}
95 |
96 |
97 |
98 |
99 |
100 |
101 | xcode.build.settings
102 |
103 |
104 | Additional settings passed to the xcodebuild tool during the
105 | build phase. These settings should be in the X=Y form.
106 |
107 |
108 |
109 | Type: optional
110 |
111 |
112 |
113 | Default: none
114 |
115 |
116 |
117 | Example:
118 |
119 | xcode.build.settings FRAMEWORK_SEARCH_PATHS=${frameworks_dir}
120 |
121 |
122 |
123 |
124 |
125 |
126 | xcode.destroot.type
127 |
128 |
129 | Type of project that will be installed. This tells the
130 | PortGroup xcode how to destroot the project. Correct values are
131 | and .
132 |
133 |
134 |
135 | Type: optional
136 |
137 |
138 |
139 | Default:
140 |
141 |
142 |
143 | Example:
144 |
145 | xcode.destroot.type framework
146 |
147 |
148 |
149 |
150 |
151 |
152 | xcode.destroot.path
153 |
154 |
155 | Where to install the build product.
156 |
157 |
158 |
159 | Type: optional
160 |
161 |
162 |
163 | Default: ${frameworks_dir}
164 | or ${applications_dir} depending on
165 | xcode.destroot.type.
166 |
167 |
168 |
169 |
170 |
171 |
172 | xcode.destroot.settings
173 |
174 |
175 | Additional settings passed to the xcodebuild tool during the
176 | destroot phase. These settings should be in the X=Y form.
177 |
178 |
179 |
180 | Type: optional
181 |
182 |
183 |
184 | Default: none
185 |
186 |
187 |
188 | Example:
189 |
190 | xcode.destroot.settings SKIP_INSTALL=NO
191 |
192 |
193 |
194 |
195 |
196 |
197 | xcode.universal.settings
198 |
199 |
200 | Settings passed to the xcodebuild tool when the +universal
201 | variant is selected. These settings should be in the X=Y
202 | form.
203 |
204 |
205 |
206 | Type: optional
207 |
208 |
209 |
210 | Default: ARCHS="${universal_archs}"
211 | MACOSX_DEPLOYMENT_TARGET=${universal_target}
212 |
213 |
214 |
215 |
216 |
217 |
218 | xcode.universal.sdk
219 |
220 |
221 | SDK to use when the +universal variant is selected. The
222 | argument may be an absolute path to an SDK, or the canonical name of
223 | an SDK.
224 |
225 |
226 |
227 | Type: optional
228 |
229 |
230 |
231 | Default: ${universal_sysroot}
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | xcode PortGroup Sugar
241 |
242 | Portfiles using the PortGroup xcode do not need to define the
243 | following variables:
244 |
245 |
246 |
247 | categories
248 |
249 |
250 | Default: aqua
251 |
252 |
253 |
254 |
255 | platforms
256 |
257 |
258 | Default: macosx
259 |
260 |
261 |
262 |
263 | use_configure
264 |
265 |
266 | Default: no
267 |
268 |
269 |
270 |
271 |
272 |
273 | Portfile-Phase Keywords Affecting the PortGroup xcode
274 |
275 | The following Portfile phase keywords affect the PortGroup xcode in
276 | a unique way. In most cases, you will not need to set any of these
277 | keywords in the Portfile. See
278 | portfile-phase
279 |
280 | 7
281 |
282 |
283 |
284 |
285 | build.cmd
286 |
287 |
288 | Default: ${xcodebuildcmd}.
289 |
290 |
291 |
292 |
293 | build.target
294 |
295 |
296 | Default: ""
297 |
298 | This variable will be ignored if
299 | xcode.target is set.
300 |
301 |
302 |
303 |
304 | build.args
305 |
306 |
307 | Default: build
308 |
309 |
310 |
311 |
312 | destroot.cmd
313 |
314 |
315 | Default: ${xcodebuildcmd}
316 |
317 |
318 |
319 |
320 | destroot.target
321 |
322 |
323 | Default: ""
324 |
325 | This variable will be ignored if
326 | xcode.target is set.
327 |
328 |
329 |
330 |
331 |
332 |
--------------------------------------------------------------------------------
/guide/xml/portgroups.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | PortGroup Introduction
7 |
8 | PortGroups are simply include files for portfiles. They can define as much or as little as
9 | a portgroup author feels is necessary to provide a set of definitions or behaviors common to a
10 | group of portfiles, in order that those portfiles can be expressed as simply as possible with
11 | minimum redundancy.
12 |
13 | See the following folder for PortGroup definitions:
14 |
15 | ${prefix}/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/
16 |
17 | or if you prefer directly in
18 | GitHub
19 | .
20 |
21 | A sample listing follows:
22 |
23 | %%ls -1 /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/
24 |
25 | active_variants-1.1.tcl
26 | apache2-1.0.tcl
27 | app-1.0.tcl
28 | archcheck-1.0.tcl
29 | bitbucket-1.0.tcl
30 | cmake-1.0.tcl
31 | cmake-1.1.tcl
32 | compiler_blacklist_versions-1.0.tcl
33 | compilers-1.0.tcl
34 | conflicts_build-1.0.tcl
35 | crossbinutils-1.0.tcl
36 | crossgcc-1.0.tcl
37 | cxx11-1.0.tcl
38 | cxx11-1.1.tcl
39 | debug-1.0.tcl
40 | elisp-1.0.tcl
41 | github-1.0.tcl
42 | ...
43 |
44 |
45 | The requirements of a minimum portfile using a portgroup varies by portgroup.
46 | The sections below devoted to each portgroup (or, for portgroups not documented there yet, the
47 | comments in the header of the portgroup file itself) should provide guidance on how each
48 | portgroup is used. Prospective MacPorts developers are also encouraged to examine existing
49 | portfiles that use these portgroups.
50 |
51 |
52 |
--------------------------------------------------------------------------------
/toc-for-chunked.tcl:
--------------------------------------------------------------------------------
1 | # Adds the table of contents to every file of the chunked documentation.
2 |
3 |
4 | # Get the table of contents from the index.html file and create the
5 | # replacement string.
6 | set file [open "[lindex $argv 0]/index.html"]
7 | regexp {
.+?
} [read $file] replacement
8 | close $file
9 | set replacement "
[regsub -all {&|\\[0-9]} $replacement {\\&}]"
10 |
11 | # Add the table of contents to all other html files.
12 | foreach path [glob -directory [lindex $argv 0] {*.html}] {
13 | if {[file tail $path] == "index.html"} {
14 | continue
15 | }
16 |
17 | set file [open $path r+]
18 | set data [read $file]
19 | regsub {]+)>} $data $replacement data
20 | regsub {} $data {