summaryrefslogtreecommitdiff
path: root/share/man/man5/bsd.port.mk.5
blob: d3e68dfb087c3754e95b5f4ade5ff460597af678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
.\" $OpenBSD: bsd.port.mk.5,v 1.404 2014/08/10 11:23:02 jmc Exp $
.\"
.\" Copyright (c) 2000-2008 Marc Espie
.\"
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd $Mdocdate: August 10 2014 $
.Dt BSD.PORT.MK 5
.Os
.Sh NAME
.Nm bsd.port.mk
.Nd ports tree master Makefile fragment
.Sh SYNOPSIS
.Fd .include <bsd.port.mk>
.Sh DESCRIPTION
.Nm
holds all the standard routines used by the ports tree.
Some variables and targets are for its internal use only.
The rest is documented here.
.Pp
.Nm
also uses quite a few helper scripts.
Those live under
.Pa ${PORTSDIR}/infrastructure/bin ,
and they do have manpages under
.Pa ${PORTSDIR}/infrastructure/man .
.Pp
Other
.Bx
variants, as well as older versions of
.Nm bsd.port.mk ,
include other targets and variables.
Conversion methods are outlined here.
.Pp
Most variables and targets are documented, with very few exceptions.
.Pp
This documentation covers the current targets, variables and paths used by
.Nm bsd.port.mk .
There is a separate section covering the fake framework, a section
explaining flavors and multi-packages, and a section covering
the generation of package information.
.Pp
It ends with sections on obsolete constructs that a porter may need
when converting from other ports systems.
.Pp
Binary package details are mostly covered in
.Xr pkg_create 1
for the packing-list details,
and in
.Xr pkg_add 1
for the installation semantics.
.Pp
Selected common user activity such as the building of every package in
the system is covered by
.Xr ports 7
instead.
.Xr packages 7
provides an overview of the result.
.Sh TARGETS
.Bl -tag -width do-configure
.It Ar {build,run,all,test}-dir-depends
Print all dependencies for a port in order to build it, run it, build and
run it, or to run regression tests.
The output is formatted as package specification pairs, in a form suitable
for
.Xr tsort 1 .
.It Ar full-{build,run,all}-depends
Print all dependencies a package depends upon for building, running,
or both, as a list of package names.
.It Ar {build,lib,test,run}-depends-list
Print a list of first level package specifications a port depends as
build dependencies, library dependencies, test dependencies or
run dependencies.
.It Ar print-{build,run}-depends
User convenience target that displays the result of
.Ar full-{build,run}-depends
in a more readable way.
.It Ar {pre,do,post}-*
Most standard targets can be specialized according to a given port's needs.
If defined,
the
.Ar pre-*
hook will be invoked before running the normal action;
the
.Ar do-*
hook will be invoked instead of the normal action;
the
.Ar post-*
hook will be invoked after the normal action.
Specialization hooks exist for
.Ar build ,
.Ar configure ,
.Ar distpatch ,
.Ar extract ,
.Ar fake ,
.Ar install ,
.Ar patch ,
.Ar test .
See individual targets for exceptions.
.It Ar addsum
Complete the ${CHECKSUM_FILE} record of checksums with files that have been
added since
.Ar makesum .
Complain if anything does not match.
.It Ar all-lib-depends-args
Process the full
.Ev LIB_DEPENDS
list into a form suitable for
.Xr pkg_create 1 ,
see
.Ar print-package-args .
.It Ar build , Ar all
Default target.
Build the port.
Essentially invoke
.Bd -literal
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \e
	-f ${MAKE_FILE} ${ALL_TARGET}
.Ed
.It Ar build-depends
Verify the ports mentioned in
.Ev BUILD_DEPENDS ,
by checking the corresponding packages are actually installed,
and install the missing ports by recursing through the ports tree.
Deprecated, see
.Ar prepare .
.It Ar check-register
Introspection target.
Verify from the ports tree, without building anything, that the current
subpackage will register okay
.Po
see
.Ev PLIST_DB
.Pc .
.It Ar check-register-all
Apply
.Ar check-register
to all subpackages of the current port.
.It Ar checkpatch
Debugging version of the
.Ar patch
target that simulates invoking
.Xr patch 1 .
.It Ar checksum
Check distribution archives and distribution patches control sum against
the results recorded in ${CHECKSUM_FILE},
using the message digest (checksum) utilities listed in ${PREFERRED_CIPHERS}.
All the files needed to recreate a port should be in ${CHECKSUMFILES} and
checksummed.
Invoking
.Ar checksum
with
.Ev REFETCH Ns = Ns Cm true
will try to fetch a version with the correct checksum from the
.Ox
main archive site in the case of a checksum mismatch.
.Ev NO_CHECKSUM
can be used to avoid all checksumming steps.
.It Ar clean
Clean ports contents.
By default, it will clean the work directory.
It can be invoked as
make clean='[depends build bulk work fake flavors dist install sub package
packages plist]'.
.Bl -tag -width packages
.It Va work
Clean work directory.
.It Va bulk
Clean bulk cookie.
.It Va build
Clean the
.Va WRKBUILD
directory (only useful if
.Va SEPARATE_BUILD
is set).
.It Va depends
Recurse into dependencies.
.It Va dist
Clean distribution files.
.It Va fake
Clean fake installation directory.
.It Va flavors
Clean all work directories.
.It Va install
Uninstall package.
.It Va package
Remove all copies of package file.
.It Va plist
Remove registered packing lists of all subpackages.
.It Va sub
With
.Va install
or
.Va package ,
clean subpackages as well.
.It Va packages
Shorthand for `sub package'.
.It Va all
Shorthand for `work flavors packages plist'.
.El
.It Ar clean-depends
Short hand for make clean=depends.
.It Ar configure
Configure the port.
Might be a void operation.
Unless overridden, configure creates the ${WRKBUILD}
directory (see SEPARATE_BUILD),
and runs whatever configuration methods are recorded in
.Ev CONFIGURE_STYLE .
.It Ar depends
Check all the port's dependencies, that is:
.Ar build-depends ,
.Ar lib-depends ,
.Ar run-depends ,
.Ar test-depends .
.It Ar describe
Prints a one-line index entry of the port, suitable for
.Pa ${PORTSDIR}/INDEX .
.It Ar distclean
Short-hand for make clean=dist.
.It Ar distpatch
Apply distribution patches only.
See
.Ar patch
and
.Ev PATCH_CASES
for details.
.It Ar dump-vars
Dump the values of all relevant variables in a port, prepended with the
port's FULLPKGPATH.
.It Ar extract
Extract the distribution files under
.Pa ${WRKDIR}
(but see
.Ev EXTRACT_ONLY
and
.Ev NO_DEPENDS ) .
Refer to
.Ev EXTRACT_CASES
for a complete description.
Do not use
.Ar pre-extract
and
.Ar do-extract
hooks.
.It Ar fake
Do a fake port installation, that is, simulate the port installation under
${WRKINST}.
There is no
.Ar do-fake
and
.Ar post-fake
hooks.
.Ar fake
actually uses
.Ar pre-fake ,
.Ar pre-install ,
.Ar do-install
and
.Ar post-install .
Override
.Ar pre-install ,
.Ar do-install ,
or
.Ar post-install
to change behavior.
Do not touch
.Ar pre-fake
unless you really know what you are doing.
Described in a separate section below
.Po
.Qq THE FAKE FRAMEWORK
.Pc .
.It Ar fake-wantlib-args
Check
.Ev WANTLIB
against the list of installed packages and libraries in the ports tree.
See
.Ar print-package-args .
.It Ar fetch
Fetch the distribution files and patchfiles, using ${FETCH_CMD}.
Each file of the
.Ev DISTFILES
and
.Ev PATCHFILES
lists is retrieved, if necessary, from the list of sites in
.Ev MASTER_SITES .
.Pp
If a filename ends with a
.Sq :0
to
.Sq :9
extension, it will be retrieved from
.Ev MASTER_SITES0
to
.Ev MASTER_SITES9
instead.
After stripping that extension if necessary,
if the entry parses as
.Sq Ar filename Ns { Ns Ar url Ns } Ns Ar sufx
it will be fetched as
.Ar url Ns Ar sufx
instead, yet still stored as
.Ar filename Ns Ar sufx .
.Pp
Transfers in progress will be stored as
.Ar filenamesufx.part .
.Pp
The ports framework uses
.Pa ${DISTDIR}/${DIST_SUBDIR}
(aliased to
.Pa ${FULLDISTDIR} )
to cache the ports distribution files and patch files.
Note that this framework is also used by mirroring scripts,
which will also retrieve
.Ev SUPDISTFILES ,
to fill with supplementary distribution files which are not needed for
every configuration.
.Pp
Note that fetching a significant number of distfiles, or fetching all distfiles
relevant to a port and dependencies is better accomplished using
.Xr dpb 1
with the
.Fl F
option.
.Pp
Use of
.Ar {pre,do,post}-fetch
hooks is forbidden, as this would make mirroring of distfiles very complicated.
See
.Ev CHECKSUMFILES ,
.Ev CDROM_SITE ,
.Ev DISTDIR ,
.Ev DISTFILES ,
.Ev DIST_SUBDIR ,
.Ev FETCH_CMD ,
.Ev FETCH_MANUALLY ,
.Ev FETCH_SYMLINK_DISTFILES ,
.Ev FULLDISTDIR ,
.Ev MAKESUMFILES ,
.Ev MASTER_SITES ,
.Ev MASTER_SITES0 , ... ,
.Ev MASTER_SITES9 ,
.Ev PATCHFILES ,
.Ev SUPDISTFILES ,
.Ev REFETCH .
.It Ar fetch-all
also fetches
.Ev SUPDISTFILES ,
for use with e.g.,
.Ar makesum .
.It Ar index
Top-level target, see
.Xr ports 7 .
.It Ar install
Install the package after building.
See the description of
.Qq THE FAKE FRAMEWORK
for the non-intuitive details of the way
.Ar {pre,do,post}-install
hooks are actually used by the ports tree.
.It Ar install-all
Install all packages in a multi-packages port.
.It Ar lib-depends
Verify that the library dependencies a port needs are actually there,
by checking the library specifications.
.It Ar lib-depends-args
Filter
.Ev LIB_DEPENDS
to keep only entries required by
.Ev WANTLIB ,
and output a list of dependencies suitable for
.Xr pkg_create 1 ,
see
.Ar print-package-args .
.It Ar lib-depends-check
Verify that the
.Ev LIB_DEPENDS
and
.Ev WANTLIB
are accurate for the port.
See
.Ar port-lib-depends-check ,
which is quicker.
.It Ar license-check
Check that
.Ev PERMIT_PACKAGE_*
settings match:
if any dependency has a more restrictive setting, warn about it.
This warning is advisory, because the automated license checking cannot
figure out which ports were used only for building and did not taint
the current port.
.It Ar link-categories
Create symbolic links in other directories that correspond to the port's
.Ev CATEGORIES .
Note that this does not affect bulk package building, since those links
don't appear in the upper-level Makefiles.
See also
.Ar unlink-categories .
.It Ar lock
Manually obtain a lock on a given directory.
Output must be used to update environment variables.
The lock can be released with
.Ar unlock .
Seldom used, see
.Xr ports 7
for details.
.It Ar makesum
Create the ${CHECKSUM_FILE} list of recorded checksums by running the
cryptographic fingerprint sha256 on ${MAKESUMFILES}.
That normally includes ${DISTFILES}, ${SUPDISTFILES} and ${PATCHFILES}.
.Ev NO_CHECKSUM
can be used to avoid all checksumming steps.
.It Ar manpages-check
Verify that
.Xr makewhatis 8
can do a correct job with the port's manpages.
.It Ar mirror-maker
Top-level target, see
.Xr mirroring-ports 7 .
.It Ar mirror-maker-fetch
Debug target: generate the
.Ar mirror-maker
makefile fragment and use it
to fetch files, see
.Xr mirroring-ports 7 .
.It Ar no-lib-depends-args
Degenerate form of
.Ar lib-depends-args
that does not do anthing.
See
.Ar print-package-args .
.It Ar no-wantlib-args
Degenerate form of
.Ar wantlib-args
that does not do anything.
See
.Ar print-package-args .
.It Ar package
Build a port package (or packages in a
.Ev MULTI_PACKAGES
case) from the fake installation.
Involves creating packaging information from templates
(see
.Ev COMMENT ,
.Ev SUBST_VARS
among others) and invoking
.Xr pkg_create 1
for each package in the
.Ev MULTI_PACKAGES
list.
If the repository already contains up-to-date packages, they are not rebuilt.
If PLIST_DB is set, the resulting packaging information is compared
with existing stuff, and saved if new, with loud complaints if it changed
without a REVISION bump.
Arch-independent packages are created in ${PACKAGE_REPOSITORY}/no-arch,
and copied into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all as needed.
If ${PERMIT_PACKAGE_FTP} is set to
.Sq Yes ,
copies built packages into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp, using
hard links if possible.
If ${PERMIT_PACKAGE_CDROM} is set to
.Sq Yes ,
copies built packages into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom, using
hard links if possible.
.It Ar patch
Apply distribution and
.Ox
specific patches.
Because of historical accident,
.Ar patch
does not follow the exact same scheme other standard targets do.
Namely,
.Ar patch
invokes
.Ar pre-patch
(if defined),
.Ar do-patch ,
and
.Ar post-patch ,
but the default
.Ar do-patch
target invokes
.Ar distpatch
directly.
So, if the
.Ar do-patch
target is overridden, it should still begin by calling
make distpatch, before applying
.Ox
specific patches.
Accordingly, the exact sequence of hooks is:
.Ar pre-patch ,
.Ar do-distpatch ,
.Ar post-distpatch ,
.Ar do-patch ,
.Ar post-patch .
If
.Pa ${PATCHDIR}
exists, the files described under
.Ev PATCH_LIST
will be applied under
.Ev WRKDIST .
See also
.Ev REORDER_DEPENDENCIES
for possible
.Ar post-patch
clean-up.
.It Ar peek-ftp
Connect to the first site in
.Ev MASTER_SITES ,
in the right directory, and leaves user at
.Xr ftp 1 Ns 's
prompt.
.It Ar pkglocatedb
Top-level target, see
.Xr ports 7 .
.It Ar port-lib-depends-check
Verify that the
.Ev LIB_DEPENDS
and
.Ev WANTLIB
hold all shared libraries used for every package in the port.
See
.Xr library-specs 7 .
This makes use of
.Ar print-plist-with-depends
to avoid actually building the packages, it only needs the
completion of the
.Ar fake
stage, and thus is quicker than
.Ar lib-depends-check ,
unless you already have all binary packages.
.It Ar port-wantlib-args
Resolve
.Ev WANTLIB
against the ports tree itself and system libraries, without looking at built
or installed packages, and writes a list of options suitable for
.Xr pkg-create 1 .
See
.Ar print-package-args .
.It Ar prepare
Prepare a port for building, by checking and installing all required
dependencies, constructed from
.Ev LIB_DEPENDS
and
.Ev BUILD_DEPENDS .
In
.Ev MULTI_PACKAGES
setups,
see
.Qq Flavors and multi-packages .
.It Ar print-package-args
Print all dependency-related information that will be passed as parameters
to
.Xr pkg_create 1 ,
\&.e.g.,
.Fl W Ar wantlib
and
.Fl P Ar depends
lines.
.Pp
Those parameters are generated by
.Ar run-depends-args
for
.Ev RUN_DEPENDENCIES
handling, a form of
.Ar lib-depends-args
for
.Ev LIB_DEPENDS
and
.Ev WANTLIB
interaction,
and a form of
.Ar wantlib-args
for
.Ev WANTLIB
resolution.
.Pp
Variables
.Ev lib_depends_args
and
.Ev wantlib_args
control the exact behavior:
.Ev lib_depends_args
is normally set to
.Ar lib-depends-args ,
but will be set to
.Ar all-lib-depends-args
by
.Ar port-lib-depends-check ,
in order to have access to the full list of LIB_DEPENDS for figuring
out missing WANTLIB.
.Ev wantlib_args
is normally set to
.Ar wantlib-args
but it may be set to
.Ar port-wantlib-args
for introspection purposes,
to
.Ar fake-wantlib-args
to avoid some checks, or to
.Ar no-wantlib-args
to avoid expensive WANTLIB checks entirely.
.It Ar print-update-signature
Print the update signature, as computed using information from the ports tree,
in the same format used for
.Xr pkg_info 1
.Fl S .
.It Ar print-plist
Generate and print a package packing-list from the static information
present in the port.
.It Ar print-plist-all
Iterate over
.Ar print-plist
for all subpackages in a given port.
.It Ar print-plist-all-with-depends
Iterate over
.Ar print-plist-with-depends
for all subpackages in a given port.
.It Ar print-plist-contents
Generate and print package contents from the static information
present in the port.
In contrast with
.Ar print-plist ,
the package contents only consists of files, all tagged with category
markers such as @file.
See
.Xr pkg_create 1 .
.It Ar print-plist-libs
Generate and print the list of static and dynamic libraries present in the port.
See
.Xr pkg_create 1 .
.It Ar print-plist-libs-with-depends
Like
.Ar print-plist-libs ,
but slower.
It also handles
.Ev LIB_DEPENDS ,
.Ev RUN_DEPENDS ,
and
.Ev WANTLIB ,
so that the packing-list has complete dependency information.
.It Ar print-plist-with-depends
Like
.Ar print-plist ,
but slower.
It also handles
.Ev LIB_DEPENDS ,
.Ev RUN_DEPENDS ,
and
.Ev WANTLIB ,
so that the packing-list is complete.
.It Ar rebuild
Force rebuild of the port.
.It Ar test
Run regression tests for the port.
Essentially depend on a correct build and invoke
.Bd -literal
env -i ${ALL_TEST_ENV} ${MAKE_PROGRAM} ${ALL_TEST_FLAGS} \e
	-f ${MAKE_FILE} ${TEST_TARGET} ${TEST_LOG}
.Ed
.Pp
If a port needs some other ports installed to run regression tests,
use
.Ev TEST_DEPENDS .
If a port needs special configuration or build options to enable regression
testing, define a
.Sq test
.Ev FLAVOR .
.It Ar test-depends
Verify packages needed for regression tests, using the same scheme as
.Ar build-depends .
Only invoked when regression tests are run, or explicitly through
.Ar depends .
.It Ar reinstall
Force reinstallation of a port, by first cleaning the old installation.
Seldom needed, as
.Ar update
will often do the right thing.
.It Ar repackage
Rebuild the packages of a port after removing existing packages.
.It Ar run-depends
Verify the ports mentioned in
.Ev RUN_DEPENDS ,
by checking the corresponding packages are actually installed,
and install the missing ports by recursing through the ports tree.
Invoked right before installing the package.
.It Ar run-depends-args
Process
.Ev RUN_DEPENDS
and outputs a list of dependencies suitable for
.Xr pkg_create 1 ,
see
.Ar print-package-args .
.It Ar show
Invoked as make show=name, show the contents of ${name}.
Invoked as make show="name1 name2 ...",
show the contents of ${name1} ${name2} ...,
one variable value per line.
Mostly used from recursive makes, or to know the contents of another
port's variables without guessing wrongly.
.It Ar show-fake-size
Print the size of ${WRKINST}.
Used by some options of
.Xr dpb 1 ,
suitable for
.Ev BULK_TARGETS .
.It Ar show-prepare-results
Print the list of actual installed packages found out by
.Ar prepare .
.It Ar show-prepare-test-results
Print the list of actual installed packages found out by
.Ar prepare
and
.Ar test-depends .
.It Ar show-required-by
Print the list of
.Xr pkgpath 7
for all ports that will be affected by the
current port changing.
Works by walking the list of dependencies, in reverse.
.It Ar show-run-depends
Print all running dependencies for a port, one per-line, without duplicates.
.It Ar subpackage
Build a port package.
Exactly like
.Ar package ,
but affects only one single subpackage in multi-packages ports.
.It Ar show-size
Prints the size of the work directory.
Used by some options of
.Xr dpb 1 ,
suitable for
.Ev BULK_TARGETS .
.It Ar subupdate
Update an existing installation to a newer package, exactly
like
.Ar update ,
but affects only one single subpackage in multi-packages ports.
.It Ar unlink-categories
Remove symbolic links in other directories that correspond to the port's
.Ev CATEGORIES .
See also
.Ar link-categories .
.It Ar unlock
Manually release a lock on a given directory.
See
.Ar lock .
.It Ar update-patches
Create or update patches for a port, using
.Xr update-patches 1 ,
which invokes
.Xr diff 1
between
.Pa file
and
.Pa file.orig ,
based on
.Pa file.orig
existence.
In order to generate a patch, the original file needs to be named
.Pa file.orig
and
.Pa file
edited.
After the target is invoked, the patches are placed under the
patches/ directory.
It moves existing patches from
.Pa patch-file
to
.Pa patch-file.orig
.It Ar update
Update an existing installation to a newer package:
scan the installation for a package with the same
.Ev FULLPKGPATH ,
and update it using
.Sq pkg_add -r
if a newer package is available.
In multi-packages ports, all relevant packages are updated.
See
.Ev UPDATE_COOKIES_DIR
and
.Ev FORCE_UPDATE
as well.
.It Ar update-or-install
Update an installed package or perform a fresh installation,
by using
.Sq pkg_add -r .
Handles one single package in multi-packages ports.
See
.Ev UPDATE_COOKIES_DIR
and
.Ev FORCE_UPDATE
as well.
.It Ar update-or-install-all
Update installed packages or perform a fresh installation,
by using
.Sq pkg_add -r .
Handles all packages in multi-packages ports.
See
.Ev UPDATE_COOKIES_DIR
and
.Ev FORCE_UPDATE
as well.
.It Ar update-plist
Update the packing lists for a port, using the fake installation and the
existing packing lists.
.Ar update-plist
should produce mostly correct
.Pa PLIST ,
.Pa PFRAG.shared
and
.Pa PFRAG.no-shared
files, handling shared libraries, GNU
.Xr info 1
files, setuid files, and empty directories.
It moves existing files to
.Pa PLIST.orig ,
.Pa PFRAG.shared.orig
and
.Pa PFRAG.no-shared.orig .
If the generated lists include files and directories that shouldn't be
included, comment these like this:
.Bd -literal
@comment unwanted-file
@comment unwanted-dir/
.Ed
.Pp
Subsequent calls to
.Ar update-plist
will automatically recognize and handle such lines correctly.
.Pp
.Ar update-plist
may not handle flavor and multi-packages situations correctly yet, so beware.
.It Ar verbose-show
Similar to
.Ar show ,
except that it prefixes each value with the variable name, e.g.
.Li VAR=value .
Also note that it does not show undefined variables, contrary to
.Ar show
which outputs blank lines for these.
.It Ar wantlib-args
Call
.Ar port-wantlib-args
and
.Ar fake-wantlib-args
and compare the results, errors out in case of discrepancies.
See
.Ar print-package-args .
.El
.Sh VARIABLES
Note that some variables are marked as
.Sq User-settings ,
which means that individual ports should not modify them,
and that some variables are marked as
.Sq read-only ,
which means that they shouldn't ever be changed.
In a
.Ev MULTI_PACKAGES
setup, some variables have settings specific to a given subpackage.
See
.Qq Flavors and multi-packages .
.Bl -tag -width MASTER_SITES
.It Ev show
Invoked as make show=name, show the contents of ${name}.
Invoked as make show="name1 name2 ...", show the contents of
${name1} ${name2} ...,
one variable value per line.
.It Ev ALL_FAKE_FLAGS
Flags passed to ${MAKE} invocations during the fake process.
Equals
.Li ${MAKE_FLAGS} ${DESTDIRNAME}=${WRKINST} ${FAKE_FLAGS} .
Read-only.
.It Ev ALL_TEST_ENV
Environment passed to test.
Equals
.Li ${MAKE_ENV} ${TEST_ENV} .
Read-only.
.It Ev ALL_TEST_FLAGS
Flags passed to ${MAKE} invocations during test.
Equals
.Li ${MAKE_FLAGS} ${TEST_FLAGS} .
Read-only.
.It Ev ALL_TARGET
Target used to build software.
Default is
.Sq all .
Can be set to empty, to yield a package's default target.
.It Ev APM_ARCHS
Set to the list of
.Xr apm 4
architectures.
Read-only.
Use with
.Ev ONLY_FOR_ARCHS .
.It Ev ARCH
Current machine architecture.
Read-only.
.It Ev AUTOCONF
Location of the autoconf binary if needed.
Defaults to autoconf (though autoreconf might be more appropriate).
.It Ev AUTOCONF_DIR
Where to invoke autoconf if ${CONFIGURE_STYLE} includes autoconf.
Defaults to ${WRKSRC}.
.\" AUTOCONF_DIR should probably be a list, and be renamed to AUTOCONF_DIRS ?
.It Ev AUTOCONF_VERSION
Starting with
.Ox 3.3 ,
several versions of autoconf may coexist peacefully.
The main autoconf script is a shell wrapper in the
.Pa devel/metaauto
package, and similarly for automake.
Setting
.Ev AUTOCONF_VERSION
along with
.Ev CONFIGURE_STYLE
set to autoconf is the correct way to specify which one to use.
.Ev AUTOCONF_VERSION
defaults to 2.13.
If autoconf must be run manually,
.Ev MODGNU_AUTOCONF_DEPENDS
can be used to specify what packages to depend upon.
.It Ev AUTOHEADER
Location of the autoheader binary.
Defaults to autoheader.
.It Ev AUTOMAKE_VERSION
Several versions of automake may coexist peacefully.
.Ev AUTOMAKE_VERSION
must be set before trying to run automake.
Defaults to 1.4.
Note that even if
.Ev CONFIGURE_STYLE
includes automake,
automake should still be run manually during the right
.Ar configure
stage.
.It Ev AUTOUPDATE
Location of the autoupdate binary.
Defaults to autoupdate.
.It Ev BASE_PKGPATH
Full
.Xr pkgpath 7
to the current port, taking flavors into account.
See also
.Ev BUILD_PKGPATH ,
which also includes pseudo-flavors.
Read-only.
.It Ev BASELOCALSTATEDIR
User settings.
Base location for system-wide state directory.
Defaults to
.Pa ${VARBASE} .
See
.Ev LOCALSTATEDIR .
.It Ev BASESYSCONFDIR
User settings.
Base location for system-wide configuration files.
Defaults to
.Pa /etc .
See
.Ev SYSCONFDIR .
.It Ev BATCH
User-settings.
Set to
.Sq Yes
to avoid ports that require user-interaction.
Use in conjunction with
.Ev INTERACTIVE
to simplify bulk-package builds.
.Pq See IGNORE .
.It Ev BE_ARCHS
Set to the list of big-endian architectures.
Read-only.
Use with
.Ev NOT_FOR_ARCHS
and
.Ev ONLY_FOR_ARCHS .
.It Ev BUILD_PACKAGES
The actual list of packages that will be built, once architecture problems
and pseudo-flavors have been taken into account.
See
.Qq Flavors and multi-packages .
.It Ev BROKEN
Define only for broken ports, set to reason the port is broken.
See also
.Ev NO_IGNORE ,
.Ev TRY_BROKEN .
.It Ev BROKEN-<arch>
Define only for ports broken on a given architecture.
Distinct from
.Ev ONLY_FOR_ARCHS
and
.Ev NOT_FOR_ARCHS ,
which are used to mark ports for which support for some architectures
does not exist at all, or is completely obsolete.
.It Ev BSD_INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR]
Macros passed to make and configure invocations.
Set based on corresponding INSTALL_* variables.
.It Ev BUILD_DEPENDS
List of other ports the current port needs to build correctly.
Each item has the form
.Sq [pkgspec:]pkgpath[:target] .
.Sq target
defaults to
.Sq install .
The package installed must conform to the
.Sq pkgspec ,
which is by default obtained from the dependent
.Sq pkgpath
.Po
see
.Ev PKGSPEC
.Pc .
If no installation is involved, the infrastructure will still check
that the directory would provide a package conforming to the
.Sq pkgspec .
.Sq pkgpath
is set relative to ${PORTSDIR},
see
.Xr pkgpath 7
for details.
Build dependencies are checked before the
.Ar extract
stage during
.Ar prepare .
.Pp
Build dependencies with a
.Ar patch ,
.Ar configure
or
.Ar build
target will be processed in a subdirectory of the working directory,
specifically, in ${WRKDIR}/some/directory,
with
.Pa some/directory
the directory part of the
.Sq pkgpath .
.It Ev BUILD_ONCE
User settings.
Defaults to
.Sq \&No .
Set to
.Sq Yes
during bulk builds.
.Pp
When
.Ev BUILD_ONCE
is set to
.Sq Yes ,
all
.Ev PSEUDO_FLAVORS
matching
.Sq no_*
will be disabled, unless the special pseudo-flavor
.Sq bootstrap
is also set.
.Pp
This is a bulk build optimisation, automatically set by
.Xr dpb 1 :
to avoid rebuilding the same package several times, a full bulk build will
strip most ports of pseudo-packages variations that remove subpackages.
.Pp
For instance, an individual package may depend on
.Pa databases/db/v4,no_java,no_tcl ,
to avoid bringing a jdk in during a quick build.
Nevertheless, during a full bulk build,
.Pa databases/db/v4
will only be built once, as the pseudo-flavor will be automatically removed.
.Pp
However, the extra
.Sq bootstrap
rule is needed to take build cycles into account.
For instance, the
.Pa devel/dconf,-editor
subpackage depends on most of GNOME, which in turn requires
.Pa devel/dconf,-main
to build.
So
.Pa devel/dconf
has
.Li PSEUDO_FLAVORS = no_editor bootstrap
and the GNOME build first builds
.Pa devel/dconf,no_editor,bootstrap,-main
which is later used to rebuild
.Pa devel/dconf .
.It Ev BUILD_PKGPATH
Full
.Xr pkgpath 7
to the current port, taking flavors and pseudo-flavors
into account.
See also
.Ev BASE_PKGPATH ,
which doesn't include pseudo-flavors.
Mostly useful to write dependencies for subpackages like this:
.Li "LIB_DEPENDS-foo=${BUILD_PKGPATH}"
and avoid starting to build a package with some other flavor combination.
See
.Xr pkgpath 7
on the subject of
.Sq pkgpath normalisation .
Read-only.
.It Ev BULK
User settings.
If set to
.Sq Yes ,
all successful package builds and installations will clean
their working directories, after invoking
any targets mentioned in BULK_TARGETS,
and commands mentioned in BULK_DO.
Can be set on a per-${PKGPATH} basis.
For instance, setting BULK_misc/screen=No
will override any BULK=Yes passed on the command line.
If set to
.Sq Auto ,
it will apply to dependencies, but not to the current port itself.
See
.Ev BULK_COOKIES_DIR .
Defaults to
.Sq Auto .
.It Ev BULK_COOKIES_DIR
User settings.
Used to store cookies for successful bulk-package builds, defaults to
.Pa ${PORTSDIR}/bulk/${MACHINE_ARCH} .
.It Ev BULK_DO
Commands to run after each bulk package build before cleaning up the
working directory.
Empty defaults.
Can be set on a per-${PKGPATH} basis, e.g.,
BULK_DO_${PKGPATH}=...
.It Ev BULK_FLAGS
Flags to pass to build each target in
.Ev BULK_TARGETS .
.It Ev BULK_TARGETS
Targets to run after each bulk package build before cleaning up the
working directory.
Empty defaults.
Can be set on a per-${PKGPATH} basis, e.g.,
BULK_TARGETS_${PKGPATH}=...
.It Ev BZIP2
Name of the bzip2 binary.
.It Ev CATEGORIES
List of descriptive categories into which this port falls.
Mandatory.
One entry must match the current pkgpath:
.Pa devel/gmake
must belong to the
.Sq devel
category.
See
.Ar link-categories ,
.Ar unlink-categories .
.It Ev CDIAGFLAGS
Flags appended to
.Ev CFLAGS
if
.Ev WARNINGS
is set.
.It Ev CCACHE_DIR
Sets the cache directory used when
.Ev USE_CCACHE
is set to yes.
Defaults to ${WRKOBJDIR}/.ccache.
.It Ev CCACHE_ENV
Sets additional environment variables when
.Ev USE_CCACHE
is set to yes.
For instance, to enable verbose logging, set
CCACHE_ENV="CCACHE_LOGFILE=/tmp/ccache.log"
.It Ev CDROM_SITE
Path to a local source that holds distribution files (usually a CD-ROM
or other similar media), used to retrieve distribution files before going
to the network.
Defaults to empty, set to
.Pa /cdrom/distfiles/${DIST_SUBDIR}
to check that path.
Distribution files are still copied or linked (see
.Ev FETCH_SYMLINK_DISFILES )
into
.Ev DISTDIR
if they are found under CDROM_SITE.
.It Ev CFLAGS
Default flags passed to the compiler for building.
Many ports ignore it.
See also
.Ev COPTS ,
.Ev CDIAGFLAGS .
.It Ev CHECK_LIB_DEPENDS
User settings.
If set to
.Sq Yes ,
every package build will verify that shared libraries are correctly
registered.
This is essentially the same as running
.Nm make Ar lib-depends-check
after each package build.
Defaults to
.Sq \&No ,
as this can be a big performance hit.
.It Ev CHECKSUMFILES
List of all files that need to be retrieved by
.Ar fetch ,
with
.Ev DIST_SUBDIR
prepended and with the master site selection extension removed.
Read-only.
See also
.Ev MAKESUMFILES .
.It Ev CHECKSUM_FILE
Location for this port's checksums, used by
.Ar addsum ,
.Ar checksum ,
and
.Ar makesum .
Defaults to
.Pa distinfo .
.It Ev CHECKSUM_PACKAGES
User settings.
Choose whether or not to checksum packages while building.
Deposits result in
.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cksums/${FULLPKGNAME}.sha256 .
Can be set to
.Sq Yes
to compute a checksum for all packages,
.Sq cdrom
to compute it only for
.Ev PERMIT_PACKAGE_CDROM
packages
or to
.Sq ftp
to compute it only for
.Ev PERMIT_PACKAGE_FTP
packages.
Defaults to
.Sq no ,
which does not compute a checksum at all.
.It Ev CLEANDEPENDS
If set to
.Sq Yes ,
.Sq make clean
will also clean dependencies.
Can be overridden on a per-${PKGPATH} basis,
by setting CLEANDEPENDS_${PKGPATH}.
.It Ev COMMENT
Short, one line description of the port, used for the package, and in the
INDEX.
.It Ev COMMENT-foo
Same as COMMENT but used for sub package -foo in a multi-package setup.
.It Ev COMMENT-vanilla
Same as COMMENT but used for a flavored package, if the non-flavored comment
is inappropriate.
.It Ev COMMENT-foo-vanilla
Same as COMMENT but used for a sub-, flavored package.
.It Ev COMES_WITH
The first release where the port was made part of the standard
distribution.
If the current
.Ox
version is >= this version then a notice
will be displayed instead of the port being built.
.It Ev CONFIG_SITE_LIST
Used when
.Li CONFIGURE_STYLE=gnu ,
or with
.Li MODULES += gnu .
List of
.Pa config.site
fragments that will speed up gnu-configure, and prevent it from
preferring various gnu programs, unless
.Ev BUILD_DEPENDS
explicitly ask for them.
Read-only, available for debugging purposes.
.It Ev CONFIGURE_ARGS
Arguments to pass to configure script.
Defaults are empty, except for
GNU-style configure, where prefix and sysconfdir are set.
.It Ev CONFIGURE_ENV
Basic environment passed to configure script (path and libtool setup).
GNU-style configure adds a lot more variables.
.It Ev CONFIGURE_SCRIPT
Set to name of script invoked by
.Ar configure
target, if appropriate.
Should be either an absolute path, or relative to ${WRKSRC}.
.It Ev CONFIGURE_SHARED
Set by default to --enable-shared or --disable-shared, depending on whether
the architecture supports shared libraries.
Should be appended to CONFIGURE_ARGS, for ports that build dynamic libraries
and whose configure script supports these options.
.It Ev CONFIGURE_STYLE
Set to style of configuration that needs to happen.
.Pp
If
.Sq perl ,
assume
.Xr perl 1
.Xr ExtUtils::MakeMaker 3p
style.
Add
.Sq modbuild ,
to enable
.Xr perl 1
.Xr Module::Build 3p
or
.Sq modinst
for
.Xr Module::Install 3p
style.
.Pp
If
.Sq gnu ,
assume
GNU configure style.
Add
.Sq dest
if port does not handle DESTDIR correctly, and needs to be configured to
add DESTDIR to prefixes
.Po
see also
.Ev DESTDIRNAME
.Pc .
Add
.Sq old
if port is an older autoconf port that does not recognize --sysconfdir.
Add
.Sq autoconf
if autoconf needs to be rerun first,
but set
.Sq no-autoheader
to prevent autoheader from running.
Add
.Sq automake
if automake may need to be rerun.
Otherwise, automake will be explicitly disabled.
Note that automake is never run automatically.
In order to use it,
.Ev CONFIGURE_STYLE
should include
.Sq automake
and there should be a
.Ar {pre,do}-configure
target running automake.
.Pp
If
.Sq imake ,
assume port configures using X11 ports Imakefile framework.
Add
.Sq noman
if port has no man pages the Imakefile should try installing.
.Pp
If
.Sq simple ,
there is a configure script, but it does not fit the normal GNU configure
conventions.
.Pp
Extensions may be defined by specific MODULES.
See
.Xr port-modules 5
for details.
.It Ev COPTS
User settings.
Supplementary options appended to ${CFLAGS} for building.
Since most ports ignore the COPTS convention, they are actually told to use
${CFLAGS} ${COPTS} as CFLAGS.
.It Ev CXXDIAGFLAGS
Flags appended to
.Ev CXXFLAGS
if
.Ev WARNINGS
is set.
.It Ev CXXFLAGS
Default flags passed to the C++ compiler for building.
Many ports ignore it.
.It Ev CXXOPTS
User settings.
Supplementary options appended to ${CXXFLAGS} for building.
.It Ev DESTDIR
See
.Ev DESTDIRNAME .
.It Ev DESTDIRNAME
Name of variable to set to ${WRKINST} while faking.
Usually DESTDIR.
To be used in the rare cases where a port heeds DESTDIR in a few
directories and needs to be configured with
.Sq gnu dest ,
so that those few directories do not get in the way.
.It Ev DISTDIR
User settings.
Directory where all ports distribution files and patchfiles are stashed.
Defaults to
.Pa ${PORTSDIR}/distfiles .
Override if distribution files are stored elsewhere.
Always use
.Ev FULLDISTDIR
to refer to ports' distribution files location, as it takes an eventual
.Ev DIST_SUBDIR
into account.
.It Ev DISTFILES
The main port's distribution files (the actual software source, except
for binary-only ports).
Will be retrieved from the MASTER_SITES (see
.Ar fetch ) ,
checksummed and extracted (see
.Ar checksum ,
.Ar extract ) .
.Ev DISTFILES
normally holds a list of files, possibly with
.Sq :0
to
.Sq :9
appended to select a different
.Ev MASTER_SITES .
.Pp
Each entry may optionally be of the form
.Sq Ar filename Ns { Ns Ar url Ns } Ns Ar sufx
to deal with sites that only offer archives as weird urls, doing the transfer
of
.Ar url Ns Ar sufx
into result file
.Ar filename Ns Ar sufx .
For instance, if
.Bd -literal
DISTFILES = minetest-{minetest/archive/}${V}${EXTRACT_SUFX}
.Ed
.Pp
then
.Ar fetch
will retrieve from url
.Sq minetest/archive/${V}${EXTRACT_SUFX}
into
.Sq minetest-${V}${EXTRACT_SUFX} .
.Pp
If ${DISTFILES} varies depending on FLAVORS or architecture,
use
.Ev SUPDISTFILES
to ensure distfiles mirroring and
.Ar makesum
proper operation.
.It Ev DISTNAME
Name used to identify the port.
See
.Ev DISTFILES
and
.Ev PKGNAME .
.It Ev DISTORIG
Suffix used by
.Ar distpatch
to rename original files.
Defaults to
.Pa .bak.orig .
Distinct from
.Pa .orig
to avoid confusing
.Ar update-patches .
.It Ev DIST_SUBDIR
Optional subdirectory of ${DISTDIR} where the current port's distribution
files and patchfiles will be located.
See target
.Ar fetch .
.It Ev DPB
Set by the distributed ports builder to only get the information it needs
from
.Ar dump-vars .
.It Ev ECHO_MSG
User settings.
Used to display
.Sq ===> Configuring for foo
and similar informative messages.
Override to turn off, for instance.
.It Ev ECHO_REORDER
User settings.
Set it to
.Sq echo
to see
.Ev REORDER_DEPENDENCIES
actions.
Silent by default.
.It Ev EPOCH
Epoch number of the current package.
Defaults to empty (no need for numbering changes), then
numbering starts at 0.
Gets automatically incorporated into
.Ev FULLPKGNAME
as
.Sq v${EPOCH}
to form a full package-name conforming to
.Xr packages-specs 7 .
.It Ev ERRORS
List of errors found while parsing the port's Makefile.
Display the errors before making any target, and if any error starts with
.Qq Fatal: ,
do not make anything.
For instance:
.Bd -literal -offset indent
\&.if !defined(COMMENT)
ERRORS+="Fatal: Missing comment"
\&.endif
.Ed
Porter can add to
.Ev ERRORS ,
for instance to flag erroneous combinations of
.Ev FLAVORS
(but see
.Ev ONLY_FOR_ARCHS
.Ev NOT_FOR_ARCHS
and
.Ev BROKEN
for other common issues).
.It Ev EXTRACT_CASES
In the normal extraction stage (when
.Ev EXTRACT_ONLY
is not empty), this is the contents of a case statement, used to extract files.
Fragments are automatically appended to extract tar, xz and zip
archives, so that the default case is more or less equivalent to the
following shell fragment:
.Bd -literal
set -e
cd ${WRKDIR}
for archive in ${EXTRACT_ONLY}
do
    case $$archive in
	*.tar.xz)
	  xzcat ${FULLDISTDIR}/$$archive| tar xf -;;
	*.tar.lz)
	  lunzip -c ${FULLDISTDIR}/$$archive| tar xf -;;
	*.zip)
	  unzip -q ${FULLDISTDIR}/$$archive -d ${WRKDIR};;
	*.tar.bz2)
	  bzip2 -dc ${FULLDISTDIR}/$$archive| tar xf -;;
	*.shar.gz|*.shar.Z|*.sh.Z|*.sh.gz)
	  gzcat ${FULLDISTDIR}/$$archive | /bin/sh;;
	*.shar|*.sh)
	  /bin/sh ${FULLDISTDIR}/$$archive;;
	*.tar)
	  tar xf ${FULLDISTDIR}/$$archive;;
	*)
	  gzip -dc ${FULLDISTDIR}/$$archive | tar xf -;;
    esac
done
.Ed
.It Ev EXTRACT_ONLY
Set to the list of distfiles to actually extract if some distfiles
should not be extracted during the
.Ar do-extract
stage.
Defaults to all distfiles, can even be set to empty.
.It Ev EXTRACT_SUFX
Used to set DISTFILES default value to ${DISTNAME}${EXTRACT_SUFX}.
Default value is .tar.gz.
.It Ev FAKE_FLAGS
Extra flags passed to ${MAKE_PROGRAM} during the
fake invocation.
Empty by default.
Also see
.Ev ALL_FAKE_FLAGS .
.It Ev FAKE_SETUP
List of environment values normally set during fake invocations.
Exposed so that modules may provide their own
.Ar do-install .
Read-only,
see
.Qq THE FAKE FRAMEWORK
for details.
.It Ev FAKE_TARGET
Target built by ${MAKE_PROGRAM} on fake invocation.
Defaults to ${INSTALL_TARGET}.
.It Ev FAKEOBJDIR
User settings.
If non empty, used as a base for the fake area.
The real fake directory ${WRKINST} is created there.
Can be set on a per-${PKGPATH} basis.
For instance, setting FAKEOBJDIR_www/mozilla=/tmp/obj
will affect only the mozilla port.
.It Ev FETCH_CMD
User settings.
Command used to fetch distribution files for this port.
Defaults to
.Xr ftp 1 .
Can be used to go through excessively paranoid firewalls.
Note that
.Ev FETCH_CMD
should support
.Fl C
and
.Fl o Ar dest .
.It Ev FETCH_MANUALLY
Some ports' distfiles cannot be fetched automatically for licensing reasons.
In this case, set
.Ev FETCH_MANUALLY
to a list of strings that will be displayed, one per line, e.g.,
.Bd -literal
FETCH_MANUALLY= "You must fetch foo-1.0.tgz"
FETCH_MANUALLY+="from http://www.fubar.com/ manually,"
FETCH_MANUALLY+="after reading and agreeing to the license."
.Ed
Behaves like
.Ev IS_INTERACTIVE
if some distribution files are missing.
.It Ev FETCH_PACKAGES
User settings.
If set to
.Sq Yes ,
the
.Ar package
target will download packages missing from the repository from locations in
${PKG_PATH} and place them into
.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache/ .
It will only build them if no suitable packages are found.
.It Ev FETCH_SYMLINK_DISTFILES
User settings.
Set to
.Sq Yes
to link distribution files off
.Ev CDROM_SITE
instead of copying them.
.It Ev FILESDIR
Location of other files related to the current port.
Default: files.
.It Ev FLAVOR
The port's current options.
Set by the user, and tested by the port to activate wanted functionalities.
.It Ev FLAVORS
List of all flavors keywords a port may match.
Used to sort FLAVOR into a canonical order to build the package name,
or to select the packing-list, and as a quick validity check.
See also
.Ev PSEUDO_FLAVORS .
.It Ev FLAVOR_EXT
Canonical list of flavors being set for the current build, dash-separated.
See
.Ev FULLPKGNAME .
.It Ev FORCE_UPDATE
User settings.
If set to
.Sq Yes ,
the
.Ar update
target will always update an installed package,
as soon as its signature differs,
and all dependencies that install packages will
also force an update.
If set to
.Sq hard ,
the
.Ar update
target will also update installed packages even when the signature
did not change.
.It Ev FULLDISTDIR
Complete path to directory where ${DISTFILES} and ${PATCHFILES} will be
located, to be used in hand-crafted extraction targets.
Read-only.
.It Ev FULLPKGNAME
Full name of the created package, taking flavors into account.
Defaults to ${PKGNAME}${FLAVOR_EXT}.
See also
.Ev EPOCH
and
.Ev REVISION .
.It Ev FULLPKGPATH
Path to the current port's directory, relative to ${PORTSDIR},
including flavors and subpackages.
See
.Xr pkgpath 7 .
.It Ev GCC3_ARCHS , GCC4_ARCHS
List of architectures using gcc 3.3.6, or gcc 4.2.1.
Read-only.
Use with
.Ev NOT_FOR_ARCHS
or
.Ev ONLY_FOR_ARCHS
to limit ports to architectures where they compile.
.It Ev GH_*
Support for GitHub-hosted projects.
Leave empty for non hosted projects.
Yields a suitable default for
.Ev MASTER_SITES_GITHUB .
.It Ev GH_ACCOUNT
Account name of the GitHub user hosting the project.
.It Ev GH_COMMIT
SHA1 commit id to fetch.
It is good practice to always specify
the commit id, even if ${GH_TAGNAME} was specified.
.It Ev GH_PROJECT
Name of the project on GitHub.
.It Ev GH_TAGNAME
Name of the tag to download.
Setting ${GH_TAGNAME} to master is invalid
and will throw an error.
${WRKDIST} is auto-generated based on the
${GH_TAGNAME} if specified, otherwise ${GH_COMMIT} will be used to generate
${WRKDIST}.
.It Ev GMAKE
Location of the GNU make binary, if needed.
Defaults to gmake.
.It Ev HOMEPAGE
URL to the homepage of the software, if applicable.
.It Ev IGNORE
For ignored ports, set to the reasons for which the port is ignored.
If non-empty, most common targets that do something (e.g.,
.Ar fetch ,
.Ar build ,
.Ar install ...)
will be ignored.
See also
.Ev BATCH ,
.Ev BROKEN ,
.Ev FETCH_MANUALLY ,
.Ev IGNORE_IS_FATAL ,
.Ev IGNORE_SILENT ,
.Ev INTERACTIVE ,
.Ev IS_INTERACTIVE ,
.Ev NOT_FOR_ARCHS ,
.Ev NO_IGNORE ,
.Ev ONLY_FOR_ARCHS .
.It Ev IGNORE_IS_FATAL
If set to
.Sq Yes ,
ignored ports will become fatal errors.
.It Ev IGNORE_SILENT
If set to
.Sq Yes ,
do not print anything when ignoring a port.
.It Ev INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR]
Macros to use to install a program, a script, data, or a man page (or the
corresponding directory), respectively.
.It Ev INSTALL_TARGET
Target invoked to install the software, during fake installation.
Default is
.Sq install .
.It Ev INTERACTIVE
User settings.
Set to
.Sq Yes
to skip all non-interactive ports.
Used in conjunction with
.Ev BATCH
to simplify bulk-package builds.
.It Ev IS_INTERACTIVE
Set to
.Sq Yes
if port needs human interaction to build.
Porters should strive to minimize
.Ev IS_INTERACTIVE
ports, by using
.Ev FLAVORS
for multiple choice ports, and by postponing human intervention
to package installation time.
.It Ev LE_ARCHS
Set to the list of little-endian architectures.
Read-only.
Use with
.Ev NOT_FOR_ARCHS
and
.Ev ONLY_FOR_ARCHS .
.It Ev LIB_DEPENDS
Libraries this port depends upon.
Each item has the form
.Sq [pkgspec:]pkgpath .
Similar to
.Ev BUILD_DEPENDS
and
.Ev RUN_DEPENDS ,
but with specific rules:
.Ev LIB_DEPENDS
always turn into
.Ev BUILD_DEPENDS .
.Pp
On architectures that use dynamic libraries,
.Ev LIB_DEPENDS
is also used as a run-time dependency, and recorded in the package as
such, if any of the libraries mentioned in
.Ev WANTLIB
is a shared library that originates within the dependent port.
.Pp
See
.Xr library-specs 7
for more details.
.It Ev lib_depends_args
Controls the behavior of
.Xr pkg_create 1
related targets, see
.Ar print-package-args
for details.
.It Ev LIBTOOL
Location of the libtool binary.
Default:
.Pa /usr/bin/libtool .
.It Ev LIBTOOL_FLAGS
Arguments to pass to libtool.
If USE_LIBTOOL is set, the environment variable LIBTOOL is set
to ${LIBTOOL} ${LIBTOOL_FLAGS}.
.It Ev LOCALBASE
where other ports have already been installed.
Default:
.Pa /usr/local .
.It Ev LOCALSTATEDIR
Location for this port's state directory, should always be derived
from
.Ev BASELOCALSTATEDIR ,
which defaults to
.Pa /var .
Passed to gnu configure scripts.
.It Ev LOCKDIR
User settings.
Defaults to
.Pa ${WRKOBJDIR}/locks .
If set, points to a local directory common for all instances of
concurrent ports builds.
.It Ev LOCK_CMD
Expands to a command that will acquire a lock, namely
.Xr dolock 1 .
See also
.Xr ports 7 .
.It Ev LOCK_VERBOSE
User settings.
Defaults to
.Sq \&No .
Set to
.Sq Yes
to show every acquire/release lock operation.
.It Ev LP64_ARCHS
Set to the list of 64-bit architectures.
Read-only.
Use with
.Ev NOT_FOR_ARCHS .
.It Ev MAINTAINER
E-mail address with full name of the port's maintainer.
Defaults to
.Mt ports@openbsd.org .
.It Ev MAKE_ENV
Environment variables passed to make invocations and tests.
Sets at least PATH, PREFIX, LOCALBASE, X11BASE, CFLAGS, TRUEPREFIX, DESTDIR,
and the BSD_INSTALL_* macros.
.It Ev MAKE_FLAGS
Flags used for all make invocations, except for the
.Ar fake
stage, which adds
.Ev FAKE_FLAGS
(see
.Ev ALL_FAKE_FLAGS )
and for the test stage, which adds
.Ev TEST_FLAGS
(see
.Ev ALL_TEST_FLAGS ) .
.It Ev MAKE_FILE
Name of the Makefile used for ports building.
Defaults to Makefile.
Used after changing directory to ${WRKBUILD}.
.It Ev MAKE_PROGRAM
The make program that is used for building the port.
Set to ${MAKE} or ${GMAKE} depending on USE_GMAKE.
Read-only.
.It Ev MAKESUMFILES
List of all files that need to be retrieved by
.Ar fetch-all ,
with
.Ev DIST_SUBDIR
prepended and with master site selection extension removed.
Read-only.
See also
.Ev CHECKSUMFILES .
.It Ev MASTER_SITE_BACKUP
User settings.
List of sites to try after normal master sites, or before if
.Ev MASTER_SITE_OVERRIDE
is set to
.Sq Yes .
Normally includes ${MASTER_SITE_OPENBSD} and ${MASTER_SITE_FREEBSD}.
.It Ev MASTER_SITE_*
Lists of standard sites to retrieve files from, refer to
.Pa ${PORTSDIR}/infrastructure/templates/network.conf.template .
.It Ev MASTER_SITE_OVERRIDE
User settings.
Set to
.Sq Yes
to retrieve distfiles and patchfiles preferentially from the
${MASTER_SITE_BACKUP} sites.
Defaults to
.Sq \&No .
.It Ev MASTER_SITES
List of primary locations from which distribution files and patchfiles are
retrieved.
See the
.Ar fetch
target for details.
Defaults to ${MASTER_SITES_GITHUB} for GitHub-hosted projects,
see
.Ev GH_* .
See
.Xr ports 7
for user configuration.
.It Ev MASTER_SITES0 , ... , MASTER_SITES9
Supplementary locations from which distribution files and patchfiles are
retrieved.
.It Ev MESSAGE
File recorded in the package and displayed during installation.
Defaults to ${PKGDIR}/MESSAGE if this file exists.
Leave empty if no message is needed.
.It Ev MISSING_FILES
When
.Ev FETCH_MANUALLY
is set,
.Ev MISSING_FILES
will contain the list of missing distfiles or patchfiles that need to
be fetched manually.
Read-only.
.It Ev MTREE_FILE
.Xr mtree 8
specification to check when creating a PLIST with the
.Ar update-plist
target.
.Ev MTREE_FILE
can hold a list of file names, to which
.Pa ${PORTSDIR}/infrastructure/db/fake.mtree
is always appended.
These specifications are rooted at
.Pa ${WRKINST} ,
and are subject to
.Ev SUBST_VARS
substitution, to ease
.Pa ${PREFIX}
independence.
This feature is primarily intended for large, interconnected ports,
such as the kde suite, where a base package sets up a large, extra
directory hierarchy that would make the manual checking of packing lists
tedious.
.It Ev MODGNU_CONFIG_GUESS_DIRS
If a port uses config.guess outside WRKSRC, the directories
containing the other copies must be set here.
.It Ev MODPERL_ADJ_FILES
If any files have a Perl shebang line, which needs to be replaced
with
.Dq #!/usr/bin/perl ,
list them in
.Ev MODPERL_ADJ_FILES .
File paths here should be relative to
.Ev WRKSRC .
These files are patched automatically at the end of
.Ar pre-configure .
.It Ev MODPERL_BIN_ADJ
Shell fragment to patch the Perl interpreter path in executable scripts.
Used by
.Ev MODPERL_ADJ_FILES .
.It Ev MODPERL_BUILD_TARGET
Normal content of
.Ar do-build
when
.Ev CONFIGURE_STYLE
uses perl.
Provided as a separate variable if a port wants to override
.Ar do-build
for its own reasons.
.It Ev MODPERL_INSTALL_TARGET
Likewise for
.Ar do-install .
.It Ev MODPERL_TEST_TARGET
Likewise for
.Ar do-test .
.It Ev MODULES
External modules mechanism, documented separately.
Modules such as
.Sq imake
and
.Sq gnu
are normally included automatically with the right
.Ev CONFIGURE_STYLE .
Note that it is possible to
.Li CONFIGURE_STYLE = simple ,
.Li MODULES += gnu
to just get the effects of
.Ev CONFIG_SITE
and
.Ev MODGNU_CONFIG_GUESS_DIRS
along with the default
.Ev TEST_TARGET ,
in case the normal GNU configure script was wrapped in a separate script that
takes different arguments.
See
.Xr port-modules 5 .
.It Ev MULTI_PACKAGES
Set to a list of subpackage extensions for ports that create multiple packages.
See
.Qq Flavors and multi-packages
below.
Especially read the part about
.Ev ONLY_FOR_ARCHS
when some of the packages only exist for some architectures.
.It NO_ARCH
Location for arch-independent packages.
Defaults to
.Sq no-arch .
Normally, packages are generated under ${PACKAGE_REPOSITORY}/${MACHINE_ARCH},
except for packages where PKG_ARCH=*, which end up under
${PACKAGE_REPOSITORY}/${NO_ARCH}.
.It Ev NOT_FOR_ARCHS
List of architectures on which this port does not build.
See also
.Ev ONLY_FOR_ARCHS .
See also
.Ev SHARED_ONLY .
Do not use instead of
.Ev SHARED_ONLY
without very good reasons.
.It Ev NO_BUILD
Set to
.Sq Yes
if port does not need any build stage.
.It Ev NO_CCACHE
Set to
.Sq Yes
to prevent ccache from being used when building a certain port,
even when
.Ev USE_CCACHE
is set.
.It Ev NO_CHECKSUM
User settings.
Set to
.Sq Yes
to avoid
.Ar checksum ,
.Ar makesum ,
and
.Ar addsum
actions entirely.
Beware of the full implications of this mechanism, namely that it disables
the basic authentication mechanisms of the ports tree entirely.
.It Ev NO_DEPENDS
User settings.
Don't verify build of dependencies.
Do not use in any ports Makefile.
This is only meant as a user convenience when, e.g., you just want to browse
through a given port's source and do not wish to trigger the build of
dependencies.
.It Ev NO_IGNORE
User settings.
If set to
.Sq Yes ,
avoid ignoring a port for the usual reasons.
Use, for instance, for fetching all distribution files, or for fixing a
broken port.
See also
.Ev IGNORE
and
.Ev TRY_BROKEN .
.It Ev NO_TEST
Port does not have any regression tests.
Only set to
.Sq Yes
for ports with no regression test.
It should be left alone for ports with empty regression tests, and for
ports with failing tests.
That way, if a subsequent update of a port acquires actual regression tests,
they will be picked up automatically.
.It Ev NO_SHARED_ARCHS
Set to the list of platforms that do not support shared libraries.
Read-only.
Use with
.Ev NOT_FOR_ARCHS .
.It Ev NO_SHARED_LIBS
Set to
.Sq Yes
if platform does not support shared libraries.
To be tested after including
.Nm bsd.port.mk ,
or
.Xr bsd.port.arch.mk 5 ,
if neither PFRAG.shared nor CONFIGURE_SHARED are enough.
.It Ev NO_SYSTRACE
Port does not build with systrace-enabled build targets.
.It Ev OLD_WRKDIR_NAME
Base name for
.Ev WRKDIR
in the old scheme without
.Ev WRKOBJDIR .
Mostly used as a value for
.Ev WRKDIR_LINKNAME ,
e.g.,
.Bd -literal
WRKDIR_LINKNAME = ${OLD_WRKDIR_NAME}
.Ed
.Pp
in
.Pa /etc/mk.conf .
Read-only.
.It Ev ONLY_FOR_ARCHS
List of architectures on which this port builds.
Can hold both processor-specific information (e.g., powerpc), and more
specific model information (e.g., macppc).
This is subpackage dependent.
Read the corresponding part of
.Qq Flavors and multi-packages
if some subpackages should only be built on some architectures.
.It Ev OSREV
Revision number of
.Ox .
Read-only.
.It Ev PACKAGE_REPOSITORY
User settings.
Location for built packages.
Defaults to
.Pa ${PORTSDIR}/packages .
See
.Ar package
for details.
.It Ev PATCH
Command to use to apply all patches.
Defaults to
.Pa /usr/bin/patch .
.It Ev PATCHORIG
Suffix used by
.Ar patch
to rename original files, and
.Ar update-patches
to re-generate
.Pa ${PATCHDIR}/${PATCH_LIST}
by looking for files using this suffix.
Defaults to
.Pa .orig .
For a port that already contains
.Pa .orig
files in the ${DISTFILES},
set this to something else, such as
.Pa .pat.orig .
See also
.Ar distpatch ,
.Ev DISTORIG .
.It Ev PATCH_CASES
In the normal distpatch stage (when
.Ev PATCHFILES
is not empty), this is the contents of a case statement, used to apply
distribution patches.
Fragments are automatically appended to handle gzip'ed, bzip'ed and lzip'ed
patches, so that the default case is more or less equivalent to the following
shell fragment:
.Bd -literal
set -e
cd ${FULLDISTDIR}
for patchfile in ${_LIST_PATCHFILES}
do
    case $$patchfile in
	*.bz2)
	  bzip2 -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
	*.lz)
	  lunzip -c $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
	*.Z|*.gz)
	  gzcat $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};;
	*)
	  ${PATCH} ${PATCH_DIST_ARGS} <$$patchfile;;
    esac
done
.Ed
.It Ev PATCHDIR
Location for patches applied by patch target.
Default:
.Pa patches .
.It Ev PATCHFILES
Files to fetch from the master sites like
.Ev DISTFILES ,
but serving a different purpose, as they hold distribution patches that
will be applied at the
.Ar patch
stage.
See also
.Ev SUPDISTFILES .
.It Ev PATCH_ARGS
Full list of options used while applying port's patches.
.It Ev PATCH_CHECK_ONLY
Set to
.Sq Yes
by the
.Ar checkpatch
target.
Don't touch unless the default
.Ar checkpatch
target needs to be redefined.
Ideally, user-defined patch subtargets ought to test checkpatch.
In practice, they don't.
.It Ev PATCH_DEBUG
If set to
.Sq Yes ,
the
.Ar patch
stage will output extra debug information.
.It Ev PATCH_DIST_ARGS
Full list of options used while applying distribution patches.
.It Ev PATCH_DIST_STRIP
Patch option used to strip directory levels while applying distribution
patches.
Defaults to -p0 .
.It Ev PATCH_LIST
Wildcard pattern of patches to select under ${PATCHDIR}.
Defaults to patch-*.
Note that filenames ending in .orig, or ~ are never applied.
Note that
.Ev PATCH_LIST
can hold absolute pathnames, for instance to share patches among similar
ports:
.Bd -literal
PATCH_LIST=${PORTSDIR}/x11/kde/libs2/patches/p-* patch-*
.Ed
.It Ev PATCH_STRIP
Patch option used to strip directory levels while applying port's patches.
Defaults to -p0 .
.It Ev PERMIT_DISTFILES_FTP , PERMIT_PACKAGE_CDROM , PERMIT_PACKAGE_FTP
Set to
.Sq Yes
if package or distribution files can be allowed on FTP sites or CD-ROM without
legal issues.
Set to reason not to otherwise.
PERMIT_* lines in the Makefile should be preceded with a comment explaining
details about licensing and patents issues the port may have.
Porters must be very thorough in their checks.
In case of doubt, ask.
.Pp
If
.Ev PERMIT_PACKAGE_CDROM
is set to
.Sq Yes ,
.Ev PERMIT_PACKAGE_FTP
and
.Ev PERMIT_DISTFILES_FTP
will default to
.Sq Yes .
.Pp
If
.Ev PERMIT_PACKAGE_FTP
is set to
.Sq Yes ,
.Ev PERMIT_DISTFILES_FTP
will default to
.Sq Yes .
.It Ev PKG_ADD
User settings.
Path to
.Xr pkg_add 1
command, with possible options.
.It Ev PKG_ARCH
Comma-separated list of architectures on which this package may install.
Defaults to ${MACHINE_ARCH},${ARCH}.
Use * for arch-independent packages.
.It Ev PKG_ARGS
Special arguments to pass to
.Xr pkg_create 1 ,
in addition to the default ones.
For mips64 and pic libraries, see
.Qq The generation of package information .
.It Ev PKG_CREATE
User settings.
Path to
.Xr pkg_create 1
command, with possible options.
Signing options should be set separately in
.Ev SIGNING_PARAMETERS .
.It Ev PKG_CREATE_NO_CHECKS
Porters switch.
Set to
.Sq Yes
to avoid checking the ports tree when solving
.Ev WANTLIB
.Po
see
.Ar wantlib-args
.Pc .
May result in bogus packages that mix
.Cm @depends
lines obtained from
the ports tree with
.Cm @wantlib
lines that come from the installed system.
Set to
.Sq Warn
to have the differences printed as a warning instead of an error
.Po
the default
.Pc .
.It Ev PKG_DBDIR
User settings.
Path to package installation records.
Defaults to
.Pa /var/db/pkg .
.It Ev PKG_DELETE
User settings.
Path to
.Xr pkg_delete 1
command, with possible options.
.It Ev PKG_INFO
User settings.
Path to
.Xr pkg_info 1
command, with possible options.
.It Ev PKG_TMPDIR
See
.Xr pkg_add 1 .
Normally points to
.Pa /var/tmp ,
as per default.
.It Ev PORTHOME
Setting of env variable
.Ev HOME
for most shell invocations.
Default will trip ports that try to write into $HOME while building.
.It Ev PORTPATH
Path used by most shell invocations.
Don't override unless really needed.
.It Ev PORTSDIR
Root of the ports tree (default:
.Pa /usr/ports ) .
.It Ev PORTSDIR_PATH
Path used by dependencies and
.Pa bsd.port.subdir.mk
to look up package specifications.
Defaults to
.Pa ${PORTSDIR}:${PORTSDIR}/mystuff .
.It Ev PKGDIR
Location for packaging information (packing list, port description, messages).
Default: pkg.
.It Ev PKGFILE
Full path to the created package for the given subpackage.
Read-only.
.It Ev PKGFILES
Full path to all created packages.
Read-only.
.It Ev PKGNAME
Name of the created package.
Default is ${DISTNAME}.
This does not take flavors into account.
See
.Ev FULLPKGNAME
for that.
Specific revisions and epoch changes should be
handled by
.Ev REVISION
and
.Ev EPOCH
instead.
.It Ev PKGNAMES
Read-only.
List of all package names generated by the port, with
.Ev FLAVORS
and
.Ev MULTI_PACKAGES
taken into account.
Mostly used as
.Sq make show=PKGNAMES
to verify that bumped package names are correct.
.It Ev PKGNAME-foo
Package name for sub-package foo, if the default value
of ${PKGNAME}${SUBPACKAGE} is not appropriate.
.It Ev PKGPATH
Path to the current port's directory, relative to ${PORTSDIR}.
Read-only.
.It Ev PKGSPEC
Default package spec for using this port as a dependency.
Defaults to
.Sq stem-* ,
derived from the
.Ev FULLPKGNAME .
Do not override without very good reasons,
namely software that coexist as different incompatible versions with the
same stem, e.g., already a mess.
.It Ev PLIST_DB
User settings.
Directory used to save generated packing-lists, as persistent information.
Packing-lists are processed by a script,
.Xr register-plist 1 ,
which complains when packing-lists change without a
.Ev REVISION
bump.
It also knows enough about package version numbers when something in the
package or its dependencies goes backward, thus catching
.Ev EPOCH
issues.
This directory is never cleaned during normal operation.
.Sq make clean=plist
should only ever be used during debugging by port maintainers.
Defaults to
.Pa ${PORTSDIR}/plist/${MACHINE_ARCH} .
If set to empty, will not register anything: very much unsafe.
.It Ev PORTS_BUILD_XENOCARA_TOO
EXPERIMENTAL.
Set to
.Sq Yes
to build xenocara through ports.
This is highly experimental and not recommended.
.It Ev PREFERRED_CIPHERS
List of cryptographic ciphers to use, in order of preference.
Default is
.Sq sha256 .
The first cipher that matches in ${CHECKSUM_FILE} is verified.
.It Ev PREFIX
Base directory for the current port installation.
Usually ${LOCALBASE}, though some ports may elect a location under
.Pa ${VARBASE} ,
and some multi-package ports may install under several locations.
Additionally, firmware files generally install under
.Pa ${BASESYSCONFDIR} .
.It Ev PREPARE_CHECK_ONLY
Build settings.
Prevent the
.Ar prepare
stage from installing anything, let it just check dependencies, and
handle [:target] dependencies.
Mostly used by
.Xr dpb 1 ,
which already installs everything before running
.Ar prepare .
.It Ev PROGRESS_METER
User-settings.
Defaults to
.Sq Yes .
Forces commands like
.Xr ftp 1
and
.Xr pkg_create 1
to use their progress-meter even in the absence of a terminal.
.It Ev PROPERTIES
List of properties specific to a given machine architecture.
Most often obtained through
.Xr bsd.port.arch.mk 5 .
These can be checked like this
.Bd -literal -offset indent
\&.include <bsd.port.arch.mk>
\&.if ${PROPERTIES:Mapm}
# then add build options specific to apm arches
\&...
\&.if !${PROPERTIES:Mlp64}
# build options specific to lp32 arches
\&...
.Ed
For
.Ev MULTI_PACKAGES
setup, use of
.Ev ONLY_FOR_ARCHS-sub
and
.Ev BUILD_PACKAGES
is generally preferred (and simpler).
Possible properties include
.Bl -tag -width no_shared
.It apm
architecture possesses suspend (apm) support.
.It be
architecture is big-endian.
.It gccN
gccN architecture.
.It elf
.Xr elf 5
architecture.
.It le
architecture is little-endian.
.It lp64
lp64 architecture.
.It no_shared
architecture has no shared library support.
.It llvm
there is
.Pa lang/llvm
support on this architecture.
.It mono
there is
.Pa lang/mono
support on this architecture.
.El
.It Ev PSEUDO_FLAVOR
List of flavors in
.Ev FLAVOR
that are actually pseudo-flavors.
Only for introspection purposes.
Read-only.
.It Ev PSEUDO_FLAVORS
Extra list of flavors that do not register in package names, but are still
used to control build logic, and work directory names.
Its only use should be for disabling part of a multi-packages build,
for instance:
.Bd -literal
FLAVOR=no_gnome make package
.Ed
.Pp
Pseudo-flavors should be named as
.Sq no_something
to disable the build of subpackage
.Sq -something
.Po
and possibly some others, by restricting
.Ev BUILD_PACKAGES
.Pc .
Pseudo-flavors should always be handled through
.Xr bsd.port.arch.mk 5 .
A pseudo-flavor can remove several subpackages through the following
construct.
.Bd -literal -offset indent
# pseudo-flavor no_gui will also remove gtk and gtk3
MULTI_PACKAGES = -main -gtk -gtk3 -gui
# ...
\&.include <bsd.port.arch.mk>

# remove extra build components
\&.if !${BUILD_PACKAGES:M-gui}
BUILD_PACKAGES := ${BUILD_PACKAGES:N-gtk:N-gtk3}
\&.endif

# normal configure setup, e.g.,
\&.if ${BUILD_PACKAGES:M-gtk}
# ...
.Ed
.Pp
Caveat: creation of a separate working directory is mandatory for a
pseudo-flavor.
If, at a later time, a full build with all subpackages is required,
all the work will need to be done again.
.Pp
See also
.Ev BUILD_ONCE .
.It Ev RCDIR
Location for daemon startup scripts.
Defaults to
.Pa /etc/rc.d .
Do not change.
.It Ev RECURSIVE_FETCH_LIST
See
.Xr mirroring-ports 7 .
.It Ev REFETCH
User settings.
If set to true,
.Ar checksum
will analyze ${CHECKSUM_FILE}, and try retrieving files with the correct
checksum off
.Pa ftp.openbsd.org ,
in the directory
.Pa /pub/OpenBSD/distfiles/$cipher/$value/$file .
.It Ev TEST_DEPENDS
See
.Ev BUILD_DEPENDS
for specification.
Test dependencies are only checked if the test stage is invoked.
.It Ev TEST_ENV
Additional environment variables passed to tests.
Empty by default.
.It Ev TEST_FLAGS
Extra flags passed to ${MAKE_PROGRAM} to run the regression tests.
Empty by default.
.It Ev TEST_IS_INTERACTIVE
Set to
.Sq Yes
if port needs human interaction to run its tests, or set to
.Sq X11
if the tests need an active X11 display to work.
.It Ev TEST_LOG
Command used to log the results of regression tests to TEST_LOGFILE.
.It Ev TEST_LOGFILE
Log file containing the results of regression tests.
.It Ev TEST_TARGET
Target to run regression tests.
Defaults to
.Sq regress ,
except for
.Sq perl
and
.Sq gnu
.Ev CONFIGURE_STYLE ,
which default to
.Sq test
and
.Sq check ,
respectively.
.It Ev REORDER_DEPENDENCIES
Points to a list of files that specify inter-dependencies for
.Xr make 1 .
If defined, each line of the file is either a comment (starting with #)
or a pair of two files: most_recent older.
At the end of
.Ar post-patch ,
.Xr touch 1
will be used to ensure those files are put in the proper order.
The files are assumed to be under
.Pa ${WRKSRC} .
The notation /file can be used to ask for a recursive search, e.g.,
to make sure that all Makefile.in are up-to-date.
See
.Pa ${PORTSDIR}/infrastructure/mk/automake.dep
for an example.
.It Ev REPORT_PROBLEM
See
.Xr ports 7 .
.It Ev REPORT_PROBLEM_LOGFILE
See
.Xr ports 7 .
.It Ev REVISION
Revision number of the current package.
Defaults to empty (very first package), then
numbering starts at 0.
Gets automatically incorporated into
.Ev FULLPKGNAME
as
.Sq p${REVISION}
to form a full package-name conforming to
.Xr packages-specs 7 .
.It Ev RUN_DEPENDS
Specification of ports this port needs installed to be functional.
Same format as
.Ev LIB_DEPENDS .
The corresponding packages will be built right before the
.Ar install
stage, and
.Xr pkg_add 1
will take care of installing them.
.It Ev SEPARATE_BUILD
Many GNU configure ports can be built in a directory distinct from the
place they were unpacked.
For some specific ports, this is even mandatory.
Set to
.Sq yes
or
.Sq simple
if this is the case.
The ports infrastructure will generate a separate ${WRKBUILD} directory
in which the port will be configured and built.
Wipe ${WRKBUILD} to start anew, but skipping the extract/patch stage.
.It Ev SETENV
Normally set to
.Li /usr/bin/env -i .
Prepended to every command invocation that requires a clean environment.
Do not override.
.It Ev SHARED_LIBS
List of shared libraries that the port may build, as a list of the form
.Sq libname
.Sq libversion .
Used to set variables of the form
.Ev LIBlibname_VERSION
that are then used for substitution by
.Xr pkg_create 1 .
The porter is responsible for making sure the port uses those version numbers
when shared libraries are built.
.Pp
The intent is that the
.Ox
ports system must have control over shared library versions because of global
changes that may require bumping the major version of every shared library in
the system, or simply because the third party programmers do not understand
the rules for shared library versions, thus breaking the update mechanism.
For that reason it is advised to set libversion to 0.0 when first importing a
port.
.Pp
Porters of software using libtool should make sure
.Ev MAKE_FLAGS
get propagated to the libtool invocations.
This should be enough in most cases.
.It Ev SHARED_ONLY
Set to
.Sq Yes
if port can only be built on architectures with shared libraries.
.It Ev SIGNING_PARAMETERS
User settings.
Set to
.Xr pkg_create 1
options for signing packages directly during their creation.
.It Ev SKIPDIR
See
.Xr ports 7 .
.It Ev STATIC_PLIST
Normally set to
.Sq yes .
Can be set to no for ports that do not have a static plist.
Do not change without a very good reason.
Note that the only good reason to not have a static plist is for ports such
as
.Pa databases/ports-readmes
which actually build a bunch of files depending on the current ports tree.
This breaks all introspection mechanisms within the ports tree, including
.Pa databases/pkglocatedb
which will not include that port.
.It Ev STARTAFTER
See
.Xr ports 7 .
.It Ev STARTDIR
See
.Xr ports 7 .
.It Ev SUBPACKAGE
Set to the subpackage suffix when building a package in a multi-package port.
Read-only.
Used to test for dependencies or to adjust the package name.
.It Ev SUBST_CMD
A command that can be used to perform
.Ev SUBST_VARS
substitution on arbitrary files.
In normal mode,
.Pp
.Dl ${SUBST_CMD} file1 file2 ...
.Pp
will substitute files in place, creating backup copies of them.
In copy mode,
.Pp
.Dl ${SUBST_CMD} -c src1 dest1 src2 dest2
.Pp
will copy files over while performing the substitution, as suitable for
copying template files over from
.Pa ${FILESDIR}
to
.Pa ${PREFIX} ,
for instance.
This uses
.Xr pkg_subst 1
with suitable parameters.
Read-only.
.Pp
${SUBST_CMD}
can be used like
.Xr install 1 :
.Dl ${SUBST_CMD} Oo Fl g Ar group Oc Oo Fl o Ar owner Oc Oo Fl m Ar mode Oc file...
to set file
.Ar owner ,
.Ar group
and/or
.Ar mode .
.Pp
Note that
.Ev SUBST_CMD
is not really appropriate when variables have subpackage variations, like
.Ev PREFIX
or
.Ev FULLPKGNAME .
Use the appropriate
.Ev SUBST_CMD-sub
instead.
.It Ev SUBST_CMD-sub
.Ev SUBST_CMD
with subpackage-dependent semantics, like packing-list substitution.
It will substitute the right variable depending on the desired subpackage,
e.g.,
.Ev SUBST_CMD-foo
will substitute the value of
.Ev FULLPKGNAME-foo
for
.Li ${FULLPKGNAME} .
.It Ev SUBST_DATA , SUBST_MAN , SUBST_PROGRAM
Specialized versions of
.Ev SUBST_CMD
that use
.Fl c
and appropriate owner/group/mode for data, manpages and programs respectively.
.It Ev SUBST_VARS
Make variables whose values get substituted to create the actual package
information.
Always holds
.Ev ARCH ,
.Ev BASE_PKGPATH ,
.Ev FLAVOR_EXT ,
.Ev FULLPKGNAME ,
.Ev HOMEPAGE ,
.Ev LOCALBASE ,
.Ev MACHINE_ARCH ,
.Ev MAINTAINER ,
.Ev PREFIX ,
.Ev RCDIR ,
.Ev SYSCONFDIR ,
.Ev TRUEPREFIX ,
and
.Ev X11BASE .
The special construct
.Sq ${FLAVORS}
can be used in the packing-list to specify the current list of dash
separated flavors the port is compiled with (useful for cross-dependencies
in
.Ev MULTI_PACKAGES ) .
Add other
variables as needed.
Some variable names are prefixed by a ^.
This is only relevant for
.Ar update-plist ,
where it means the variable will only be substituted at the beginning of
a path.
.It Ev SUDO
User settings.
If set to
.Xr sudo 8
in
.Xr mk.conf 5 ,
the ports tree will only invoke root's privileges for the parts that
really require it.
.It Ev SUPDISTFILES
Supplementary files that need to be retrieved under some specific
circumstances.
For instance, a port might need architecture-specific files.
.Ev SUPDISTFILES
should hold a list of all distribution files and patchfiles that are not
always needed, so that a mirror will be able to grab all files, or that
.Ar makesum
will work.
Having an overlap between
.Ev SUPDISTFILES
and
.Ev DISTFILES ,
.Ev PATCHFILES
is admissible, and in fact, expected, as it is much simpler to build
an error-free list of files to retrieve in that way.
See the xanim port for an example.
.It Ev SYSCONFDIR
Location for this port's configuration files, should always be derived
from
.Ev BASESYSCONFDIR ,
which defaults to
.Pa /etc .
Passed to gnu configure scripts and substituted in PLISTs.
.It Ev SYSTRACE_FILTER
Location of the systrace filter file which is the basis for a port's
actual systrace policy file.
Defaults to
.Pa ${PORTSDIR}/infrastructure/db/systrace.filter .
.It Ev SYSTRACE_FILTER_CCACHE
Location of the supplementary systrace filter file which is used when
.Ev USE_CCACHE
is enabled.
Defaults to
.Pa ${PORTSDIR}/infrastructure/db/systrace.filter.ccache .
.It Ev SYSTRACE_SUBST_VARS
List of variables used in ${SYSTRACE_FILTER} that will be substituted
by their real value when creating the systrace policy file.
Always holds
.Ev WRKOBJDIR ,
.Ev PORTSDIR ,
and
.Ev DISTDIR .
.It Ev TAR
Name of the tar binary.
.It Ev TARGETS
Read-only.
Set to the list of special targets for a port
.Po
.Ar {pre,do,post}-*
and module hooks
.Pc .
Used by introspection tools such as the sqlports package.
.It Ev TEMPLATES
Base location for the templates used in the
.Ar readmes
target.
User settings.
Defaults to
.Pa ${PORTSDIR}/infrastructure/templates .
.It Ev TRUEPREFIX
Read-only.
Mostly the same as ${PREFIX}, except it never gets ${DESTDIR} prepended
during
.Ar fake .
Refer to
.Qq THE FAKE FRAMEWORK
for details.
.It Ev TRY_BROKEN
User settings.
If set to
.Sq Yes ,
don't set
.Ev IGNORE
for
.Ev BROKEN
ports, so that we will attempt to build them.
.It Ev UNLOCK_CMD
User settings.
If set, expands to a command that will release a lock.
This lock will reside in
.Pa ${LOCKDIR} .
.It Ev UNMESSAGE
File recorded in the package and displayed during deinstallation.
Defaults to ${PKGDIR}/UNMESSAGE if this file exists.
Leave empty if no message is needed.
.It Ev UNZIP
Name of the unzip binary.
.It Ev UPDATE_COOKIES_DIR
User settings.
Used to store cookies for package updates and defaults to
.Pa ${PORTSDIR}/update/${MACHINE_ARCH} .
If set to empty, will revert to a file under
.Pa ${WRKDIR} .
.It Ev USE_CCACHE
User settings.
Set to
.Sq Yes
to use ccache when building ports.
Adds a build dependency on devel/ccache, and sets up the build
environment so that it is used.
.It Ev USE_GMAKE
Set to
.Sq Yes
if GNU make (${GMAKE}) is needed for correct behavior of this port.
.It Ev USE_GROFF
Set to
.Sq Yes
to use groff to build manpages.
This sets groff as a build dependency, and also tells
.Xr pkg_create 1
to format manpages behind the scene using groff while building packages.
.It Ev USE_LIBTOOL
Defaults to
.Sq Yes .
Set to
.Sq gnu
if the base
.Xr libtool 1
is insufficient and GNU libtool is required.
Set to
.Sq \&No
to disable the use of
.Xr libtool 1
entirely; this should not be set under normal circumstances.
Adds dependencies if necessary, and passes LIBTOOL environment variable to
scripts invocations.
.It Ev USE_MFS
Set to
.Sq Yes
to build ports under an
.Xr mfs 8
filesystem.
Mostly for use by
.Xr dpb 1
and not intended to be a user setting.
See
.Ev WRKOBJDIR_MFS
for configuration.
.It Ev USE_SYSTRACE
User settings.
Set to
.Sq Yes
to protect port building with systrace.
.It Ev USE_X11
Normally, presence of ${X11BASE} is enforced by default for building ports.
But there is an experimental way to hook the xenocara build into
.Xr dpb 1 ,
which requires knowing whether a port requires X11 to already
be there.
.Pp
The infrastructure mostly sets
.Ev USE_X11
automatically based on
.Ev WANTLIB
values, there are a few ports (about 20) that require X11 components without
any library telltale.
.It Ev VARBASE
User settings.
Base location for ports that install stuff outside of
.Pa ${LOCALBASE} .
Defaults to
.Pa /var .
.It Ev WANTLIB
Extra list of library specifications that a package will need.
May include system and X11 libraries.
See
.Xr library-specs 7
for more details.
.Pp
As a special extension,
.Ev WANTLIB
may include absolute paths, e.g.,
.Pa ${LOCALBASE}/lib/expat.=4
to distinguish between base libraries and port libraries.
Use with caution, this is very seldom needed.
.It Ev wantlib_args
Controls the behavior of
.Xr pkg_create 1
related targets, see
.Ar print-package-args
for details.
.It Ev WARNINGS
User settings.
If set to
.Sq Yes ,
add
.Ev CDIAGFLAGS
to
.Ev CFLAGS
and
.Ev CXXDIAGFLAGS
to
.Ev CXXFLAGS .
.It Ev WRKBUILD
Subdirectory of ${WRKDIR} where the actual build occurs.
Defaults to ${WRKSRC}, unless SEPARATE_BUILD is involved, in which case
it is set to an appropriate value.
.It Ev WRKCONF
Subdirectory of ${WRKDIR} where the actual configure set occurs.
Defaults to ${WRKBUILD}.
.It Ev WRKDIR
Location where all port activity occurs.
Apart from the actual port, may
hold all kinds of cookies that checkpoint the port's build.
Read-only.
Note that WRKDIR may be a symbolic link.
During ports building,
.Pa ${WRKDIR}/bin
is put at the front of the
.Ev PATH .
.It Ev WRKDIR_LINKNAME
Name of a symbolic link to create within the port directory which will
point to the port's ${WRKDIR}.
See
.Ev OLD_WRKDIRNAME .
.It Ev WRKDIST
Subdirectory of ${WRKDIR} in which the distribution files normally unpack.
Base for all patches.
Defaults to
.Pa ${WRKDIR}/${DISTNAME} .
Note that WRKDIST may be a symbolic link, if set to ${WRKDIR}.
.It Ev WRKSRC
Subdirectory of ${WRKDIR} where the actual source is.
Base for configuration (default: ${WRKDIST}).
Note that WRKSRC may be a symbolic link, if set to ${WRKDIR}.
.It Ev WRKINST
Subdirectory of ${WRKDIR} where port normally installs (see
.Ar fake
target).
.It Ev WRKOBJDIR
Used as a base for the actual port working directory.
Defaults to
.Pa ${PORTSDIR}/pobj .
The real working directory ${WRKDIR} is created there.
Can be set on a per-${PKGPATH} basis.
For instance, setting WRKOBJDIR_www/mozilla=/tmp/obj
will affect only the mozilla port.
If explicitly unset (WRKOBJDIR=), the working directory is
created within the port directory.
.It Ev WRKOBJDIR_MFS
Alternate location for the port working directory.
The intent is to use an
.Xr mfs 8
based filesystem for small ports with
.Xr dpb 1 .
Active when
.Ev USE_MFS
is
.Sq Yes .
Defaults to
.Pa /tmp/pobj .
.It Ev X11BASE
Where X11 has been installed.
Default:
.Pa /usr/X11R6 .
.It Ev XAUTHORITY
Points to a suitable authority file for X11 interactive regression tests.
Defaults to
.Pa ${HOME}/.xauthority .
.It Ev XMKMF
Invocation of xmkmf for a
.Li CONFIGURE_STYLE=imake
port.
Defaults to xmkmf -a -DPorts.
The -DPorts is specific to
.Ox
and is always appended.
.It Ev YACC
Name of yacc program to pass to GNU-configure, defaults to yacc.
GNU-configure would always try to use bison otherwise, which leads to
unreproducible builds.
Set to bison if needed.
.El
.Sh DIAGNOSTICS
Note that some of these messages are actually emitted by some other external
commands, but grouped here for convenience: easier to look for in
.Xr dpb 1 Ns 's
logs.
.Bl -diag
.It "Error: change in plist between ..."
Error message comes from
.Xr register-plist 1 .
.It "Error: duplicate item in packing-list"
Error message comes from
.Xr pkg_create 1 ,
and will result from incorrect packing-lists, such as including several
fragments with the same file, or having incorrect
.Ev PKG_ARGS-sub .
.It "Error: Libraries in packing-lists...and libraries from installed packages don't match"
The ports tree and the installed packages are out-of-sync.
Mixing library information from both sources might produce packages that can't
be installed elsewhere.
Cleanest fix is to update the out-of-date source (e.g., update the ports tree,
or build and install new packages).
Developers may use
.Ev PKG_CREATE_NO_CHECKS
instead, assuming they understand the implications.
See print-package-args (wantlib-args) for details.
.It "Fatal: can't flavor a SUBDIR"
A dependency mentions top_subdir,flavor.
Flavor would then be ignored, as it is only applied to individual ports.
.It "Fatal: can't subpackage a SUBDIR"
A dependency mentions top_subdir,-sub.
Subpackage would then be ignored, as it is only applied to individual ports.
.It "Fatal: flavor should never start with a digit"
This would utterly confuse
.Xr pkg_add 1 .
See
.Xr packages-specs 7 .
.It "Fatal: inclusion of <file> from <file>"
.Pa bsd.port.mk
or
.Pa bsd.port.subdir.mk
has been included from a
.Ev MODULE
or from
.Pa Makefile.inc ,
resulting in a double inclusion.
This would lead to weird results, such as
.Ev PKG_ARGS
being defined twice.
.It "Fatal: SUBPACKAGES should always begin with -: <offending list>"
That is the only way to differentiate between
.Ev FLAVOR
and
.Ev SUBPACKAGE
in
.Xr pkgpath 7
specifications.
.It "Fatal: building ports requires correctly installed X11"
All file sets of the base OS, including xenocara, must be installed
before building ports.
.It "Fatal: /usr/local/lib/X11/app-defaults should exist and be a symlink"
/usr/local/lib/X11/app-defaults is distributed as a symlink in the
xshare*.tgz file set.
If xenocara was not fully installed before packages were added, it may
have been created as a directory instead.
.It "Fatal: the licencing info for <pkgname> is incomplete..."
Every port must have explicit defines of all
.Ev PERMIT_*
values.
.It "Fatal: Use 'env FLAVOR=flavor make' instead"
Arguments specified after
.Xr make 1
are hardcoded for all recursive sub-makes, and very difficult to override.
Thus,
.Ev FLAVOR
must be specified in the environment instead.
.It "Fatal: Use 'env SUBPACKAGE=-sub make' instead"
Arguments specified after
.Xr make 1
are hardcoded for all recursive sub-makes, and very difficult to override.
Thus,
.Ev SUBPACKAGE
must be specified in the environment instead.
.It "ldconfig: <dir>: No such file or directory"
Usually produced by
.Xr pkg_add 1
running
.Xr ldconfig 8 .
Some tools such as GNU libtool will add directories living under
.Pa ${WRKINST}
to the shared library path during the
.Ar fake
stage.
Of course,
.Xr ldconfig 8
will later complain after the directory no longer exists.
The bogus tool should be fixed to conform to
.Ox
usage.
.It LIB_DEPENDS <spec> not needed for <FULLPKGPATH>
There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS.
Thus, the LIB_DEPENDS won't turn into a @depends line in the created package.
This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS:
RUN_DEPENDS is needed for dlopen'd libraries.
.Pp
Might be intentional sometimes, if some compile flavors create static binaries,
for instance.
Also, will happen for multi-packages, where one sets LIB_DEPENDS to have
a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE).
.Pp
See print-package-args (lib-depends-args) for details.
.It "Warning: FULLPKGNAME-sub defined but not FULLPKGPATH-sub"
.Ev FULLPKGNAME-sub
has been explicitly defined by the port, instead of relying on the default,
but no value of
.Ev FULLPKGPATH-sub
has been given.
This is often an error.
.It "Warning: symlink(s) point to non existent file."
Warning message comes from
.Xr pkg_create 1 .
The symlink resides in the fake area, under
.Pa ${WRKINST} .
This is only a warning because the symlink may point to a run-time dependency,
which obviously won't exist under
.Pa ${WRKINST}
at the time
.Li make package
is run.
.It "Warning: @option no-default-conflict with no @conflict"
Warning message comes from
.Xr pkg_create 1 .
Most packages that waive "default-conflict" will have explicit conflict markers
instead.
Otherwise, the package will only conflict with the exact same version, with
some possible
.Ev REVISION
bumps.
Any other version or
.Ev FLAVOR
won't conflict.
This is generally an error, apart from very few ports like
.Pa devel/autoconf/* .
.It "groff produced empty result for <manpage>..."
Warning message comes from
.Xr pkg_create 1 .
Manpages are automatically formatted with
.Xr groff 1
if
.Ev USE_GROFF
is set.
The above message denotes an actual problem while formatting the page,
which should be addressed.
In the meantime,
.Xr pkg_create 1
still produces a package, but leaves the manpage unformatted, in the hope
that something will be able to make sense of it.
.El
.Sh FILES
.Bl -tag -width files/md5
.It Pa ../Makefile.inc
Common Makefile fragment for a set of ports, included automatically.
.It Pa /cdrom/distfiles
Default path to a CD-ROM (or other media) full of distribution files.
.It Pa ${DISTDIR}
Cache of all distribution files.
.It Pa distinfo
Checksum file.
Holds the output of
.Xr cksum 1 ,
using ${PREFERRED_CIPHERS},
for the port's ${DISTFILES} and ${PATCHFILES},
as well as the sizes of these files.
.It Pa ${DISTDIR}/${CHECKSUMFILES}
Cache of normal distribution files for a given port.
.It Pa ${DISTDIR}/${MAKESUMFILES}
Cache of all distribution files for a given port.
.It Pa ${PKGDIR}/DESCR
Description for the port.
Variables such as ${HOMEPAGE} and ${MAINTAINER} will be expanded
(see SUBST_VARS).
Multi-package ports will use DESCR${SUBPACKAGE}.
.It Pa ${PKGDIR}/README
.Ox
specific documentation for a port, that will be installed as
.Pa ${LOCALBASE}/share/doc/pkg-readmes/${FULLPKGNAME}
at the end of
.Ar fake .
Variables from
.Ev SUBST_VARS
will be expanded.
Multi-package ports will use
.Pa README${SUBPACKAGE} .
.It Pa ${PKGDIR}/<foo>.rc
Startup script for <foo>.
Will be installed as
.Ar ${RCDIR}/<foo>
at the end of
.Ar fake .
Variables from
.Ev SUBST_VARS
will be expanded.
.It Pa ${PORTSDIR}/infrastructure/db/fake.mtree
Specification used for populating ${WRKINST} at the start of
.Ar fake .
Use
.Ar pre-fake
if this is incomplete.
.It Pa ${PORTSDIR}/packages/${MACHINE_ARCH}
Default setup of ${PACKAGE_REPOSITORY}.
.It Pa ${PACKAGE_REPOSITORY}/no-arch
Location of arch-independent packages.
.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all
Location of all built packages.
.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache
Location of packages retrieved through the network.
.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cksums
Location of checksums, see
.Ev CHECKSUM_PACKAGES .
.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom
Location of packages suitable for the CD.
.It Pa ${PACkAGE_REPOSITORY}/${MACHINE_ARCH}/ftp
Location of packages suitable for FTP.
.It Pa ${PORTSDIR}/bulk/${MACHINE_ARCH}
Default setup of ${BULK_COOKIES_DIR}.
.It Pa ${PORTSDIR}/update/${MACHINE_ARCH}
Default setup of ${UPDATE_COOKIES_DIR}.
.It Pa ${PORTSDIR}/mystuff
Extra directory used to store local ports before committing them.
All depend targets will normally look there after the normal lookup fails.
See
.Ev PORTSDIR_PATH .
.It Pa systrace.filter
List of additional port specific filters, included automatically.
.It Pa systrace.policy
List of additional port specific policies, included automatically.
.El
.Sh THE FAKE FRAMEWORK
The
.Ar fake
target is used to install the port in a private directory first, ready for
packaging by the
.Ar package
target, so that the actual installation will use the package.
.Pp
Essentially,
.Ar fake
invokes a real
.Ar install
process after tweaking a few variables.
.Pp
.Ar fake
first creates a skeleton tree under ${WRKINST}, using the
.Xr mtree 8
specification
.Pa ${PORTSDIR}/infrastructure/db/fake.mtree .
.Pp
A
.Ar pre-fake
target may be used to complete that skeleton tree.
For instance, a few ports may need supplementary stuff to be present (as
it would be installed if the port's dependencies were present).
.Pp
If
.Ar {pre,do,post}-install
overrides are present, they are used with some
important changes, listed in
.Ev FAKE_SETUP :
.Bd -literal -offset indent
TRUEPREFIX=${PREFIX}
PREFIX=${WRKINST}${PREFIX}
${DESTDIRNAME}=${WRKINST}
.Ed
.Pp
Essentially, old install targets work transparently, except for a need to
change PREFIX to TRUEPREFIX for symbolic links and similar path lookups.
Specific traditional post install work can be simply removed, as it will
be taken care of by the package itself (for instance, ldconfig, or
texinfo's install-info).
.Pp
If no
.Ar do-install
override is present, the port is installed using
.Bd -literal -offset 2n
env -i ${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET}
.Ed
.Pp
Note that this does set both PREFIX and ${DESTDIRNAME}.
If a port's Makefile both heeds ${DESTDIRNAME},
and references PREFIX explicitly,
FAKE_FLAGS may rectify the problem by setting PREFIX=${PREFIX}
(which will do the right thing, since ${PREFIX} is a
.Xr make 1
construct which will not be seen by the shell).
.Pp
${FAKE_FLAGS} is used to set variables on
.Xr make 1
command line, which will override the port Makefile contents.
Thus, a port that mentions DESTDIR= does not need any patch to work with fake.
.Pp
Files such as
.Pa ${PKGDIR}/README*
or
.Pa ${PKGDIR}/*.rc
get copied to
.Pa ${WRKINST}
at the end of
.Ar fake
(see the FILES section above for details).
.Sh FLAVORS AND MULTI_PACKAGES
Starting with
.Ox 2.7 ,
each port can generate distinct packages through two orthogonal mechanisms:
FLAVORS and MULTI_PACKAGES.
.Pp
The current MULTI_PACKAGES mechanism was introduced after
.Ox 4.0 .
.Pp
The arch-dependent part was refined after
.Ox 5.0 .
.Pp
If a port can be compiled with several options, these options
should be turned into FLAVORS.
The port maintainer will set FLAVORS to be the list of possible options in
the Makefile.
When building the port, the package builder will set
.Li "FLAVOR='option1 option2...'"
to build a specific flavor of the port.
The Makefile should test the value of FLAVOR as follows:
.Bd -literal -offset indent
FLAVOR?=
\&.if ${FLAVOR:Moption1}
# what to do if option1
\&.endif
\&.if ${FLAVOR:Moption2}
# what to do if option2
\&.endif
.Ed
.Pp
.Pa bsd.port.mk
takes care of a few details, such as generating a distinct work directory for
each flavor, or creating a FULLPKGNAME by adding a dash separated list of
flavors to the base package name.
The order in which FLAVOR is specified does not matter: this dash separated
list will be reordered to match the ordering of FLAVORS.
.Pp
It is an error to specify an option in FLAVOR that does not appear in FLAVORS,
to prevent misspellings.
.Pp
In bulk package building, flavors can be specified as a comma
separated list after the package directory, e.g., SUBDIR+=vim,no_x11
.Po
see
.Xr pkgpath 7
.Pc
.Pp
Finally, package information will use templates with the canonical package
extension if they are available: if FLAVOR='option1 option2' and both
COMMENT and COMMENT-option1-option2 are available, COMMENT-option1-option2 will
be used.
.Pp
If one build of a port can generate several distinct packages, set
MULTI_PACKAGES accordingly.
Each extension of a MULTI_PACKAGES name should start with a dash, so that
they cannot be confused with FLAVORS.
In dependency checking and bulk builds, a subpackage can be
specified after a comma, e.g., SUBDIR+=quake,-server.
MULTI_PACKAGES only affects the actual package building step (and the
describe step, since a MULTI_PACKAGES port will produce several
descriptions).
.Pp
If MULTI_PACKAGES is set, the packaging stage happens once for every
subpackage, using subpackage-specific variables.
For instance, if MULTI_PACKAGES=-main -lib -server,
.Ev PKG_ARCH-main ,
.Ev PKG_ARCH-lib
and
.Ev PKG_ARCH-server
will be used for the subpackages respectively called
.Ev FULLPKGNAME-main ,
.Ev FULLPKGNAME-lib
and
.Ev FULLPKGNAME-server .
.Pp
All package information is also derived from
templates with SUBPACKAGE appended.
In the preceding example, the packing-list template for FULLPKGNAME-lib
must be in PLIST-lib.
.Pp
The following variables are subpackage dependent:
.Ev COMMENT ,
.Ev PKG_ARCH ,
.Ev PERMIT_PACKAGE_FTP ,
.Ev PERMIT_PACKAGE_CDROM ,
.Ev PKGFILE ,
.Ev PKGNAME ,
.Ev FULLPKGNAME ,
.Ev REVISION ,
.Ev EPOCH ,
.Ev FULLPKGPATH ,
.Ev RUN_DEPENDS ,
.Ev WANTLIB ,
.Ev LIB_DEPENDS ,
.Ev IGNORE ,
.Ev ONLY_FOR_ARCHS ,
.Ev NOT_FOR_ARCHS ,
.Ev PKG_ARGS ,
.Ev PREFIX ,
.Ev CATEGORIES ,
.Ev MESSAGE ,
.Ev UNMESSAGE ,
.Ev DESCR ,
.Ev PLIST ,
.Ev STATIC_PLIST ,
.Ev PKGSPEC .
.Pp
The usual non-MULTI_PACKAGES variables are simply used as default values
for all subpackages.
So, if you set
.Li "PKG_ARCH=*"
.Li "PKG_ARCH-main=i386"
then
.Ev PKG_ARCH-lib
and
.Ev PKG_ARCH-server
will both be
.Sq * .
.Pp
.Ev WANTLIB
and
.Ev LIB_DEPENDS
are special.
At the beginning of the build, during
.Ar prepare ,
all build dependencies will be checked,
which includes
.Ev LIB_DEPENDS ,
.Ev WANTLIB
for every subpackage.
As an exception, any
.Ev LIB_DEPENDS-sub
that references the current port will be ignored as a build dependency,
in order to avoid recursion.
.Pp
.Ev FULLPKGPATH
and
.Ev FULLPKGNAME
are special as well.
You must set
.Ev PKGNAME-sub
or
.Ev FULLPKGNAME-sub
for each subpackage, but
.Ev FULLPKGPATH-sub
is set automatically to the right value.
In very rare cases, one may override
.Ev FULLPKGPATH-sub .
(for instance, if one specific subpackage is not affected by option
settings that affect other subpackages, e.g., for include files packs).
.Pp
In terms of using the port, quite a few targets will have a subpackage
specific subtarget:
invoking
.Ar package
is the same as invoking
.Ar subpackage
for all subpackages,
invoking
.Ar install-all
is the same as invoking
.Ar install
for all subpackages,
and invoking
.Ar update
is the same as invoking
subupdate
for all subpackages.
.Pp
.Ev ONLY_FOR_ARCHS
and
.Ev NOT_FOR_ARCHS
interact with
.Ev MULTI_PACKAGES
and
.Ev IGNORE .
The infrastructure will automatically filter subpackages
that are not suitable for the current architecture.
Thus,
.Ev MULTI_PACKAGES
should always list all subpackages,
even things not buildable on the current architecture,
for indexing purposes.
.Pp
Starting with
.Ox 5.1 ,
.Xr bsd.port.arch.mk 5
should be used to simplify the handling of
.Ev MULTI_PACKAGES
in arch-dependent setups:
.Pp
Make sure
.Ev MULTI_PACKAGES ,
.Ev ONLY_FOR_ARCHS* ,
and
.Ev PSEUDO_FLAVORS
are defined correctly, then
.Bd -literal -offset indent
\&.include <bsd.port.arch.mk>
.Ed
.Pp
This will compute
.Ev BUILD_PACKAGES ,
the list of actual subpackages to build with the current setup,
by taking arch constraints and pseudo-flavors into account.
Then test
.Ev BUILD_PACKAGES
to set up the right configuration, e.g., to check if
.Ev SUBPACKAGE
.Ar -mono
should be built:
.Bd -literal -offset indent
\&.if ${BUILD_PACKAGES:M-mono}
.Ed
.Pp
The
.Pa lang/gcc/4.2
or
.Pa print/poppler
ports should provide examples of proper use.
.Pp
Note that
.Xr dpb 1
will break if all subpackages are not properly listed.
.Sh THE GENERATION OF PACKAGE INFORMATION
Starting after
.Ox 4.1
all package information is processed directly by
.Xr pkg_create 1
from templates in ${PKG_DIR}.
.Pp
.Bl -bullet -compact
.It
If not overridden by the user, determine which set of templates to use,
depending on the current SUBPACKAGE and FLAVOR information.
Set PLIST${SUBPACKAGE}, DESCR${SUBPACKAGE}, COMMENT${SUBPACKAGE}, MESSAGE${SUBPACKAGE}, UNMESSAGE${SUBPACKAGE} accordingly.
.It
Generate the actual DESCR, and if needed, MESSAGE, UNMESSAGE,
from the templates in ${DESCR}, ${MESSAGE}, ${UNMESSAGE}, by
substituting the variables in ${SUBST_VARS}, and by substituting
${FLAVORS} with the canonical flavor extension for this port,
e.g., if FLAVORS=no_map gfx qt2, if FLAVOR=gfx no_map, this is
.Sq -no_map-gfx .
.It
Generate the actual PLIST from the template ${PLIST},
by inserting shared/no-shared fragments, merging other fragments,
and applying the same variable substitutions as other package information.
.El
.Pp
Note that ${COMMENT} is currently not substituted, to speed up
.Ar describe
generation.
.Pp
To avoid substitution, variables can be escaped as follows:
.Li "$\e{PREFIX}"
.Pp
Constructs such as the line
.Li "%%SHARED%%"
or
.Li "!%%SHARED%%"
in the packing-list template trigger the inclusion of the
.Pa ${PKGDIR}/PFRAG.shared${SUBPACKAGE}
or
.Pa ${PKGDIR}/PFRAG.no-shared${SUBPACKAGE} .
.Pp
Similarly, if FLAVORS lists flav1, then the line
.Li "%%flav1%%"
(resp.
.Li "!%%flav1%%" )
will trigger the inclusion of
.Pa ${PKGDIR}/PFRAG.flav1${SUBPACKAGE}
(resp.
.Pa ${PKGDIR}/PFRAG.no-flav1${SUBPACKAGE} )
in the packing-list.
Other fragments can be defined by simply adding
.Li "-Dfrag=1"
or
.Li "-Dfrag=0"
to
.Ev PKG_ARGS
.Pp
If libraries are built using
.Pa bsd.lib.mk ,
special care should be taken for mips64* architectures,
which do not ever build
.Pa *pic.a
files (all mips code is pic already).
.Nm
automatically adds
.Li "-Dno_mips64=1"
or
.Li "-Dno_mips64=0"
to
.Ev PKG_ARGS ,
and the porter only needs to provide the appropriate fragment.
.Pp
.Xr pkg_add 1
now calls
.Xr ldconfig 8
directly, provided dynamic libraries have been annotated with
.Li "@lib libthingy.so.5.0" .
Adding new directories to the dynamic loader cache has been
deprecated.
It is often better to let libraries be visible as a link
under ${LOCALBASE}.
Having a separate directory is enough to trick
.Xr ld 1
into grabbing the right version.
Libraries used only for
.Xr dlopen 3
do not need to be visible.
Some programs will prefer to use rpath to find their own libraries.
.Pp
The special
.Ar update-plist
target does a fairly good job of automatically generating PLIST and
PFRAG.shared fragments.
.Pp
If
.Ev PLIST_DB
points to a directory, all packing-lists from packages generated by
.Xr pkg_create 1
during the
.Ar package
stage are saved in that location by a script:
.Pa ${PORTSDIR}/infrastructure/bin/register-plist .
This script strips some irrelevant information and normalizes the
packing-list somehow, and compares it to existing information, looking
for relevant changes.
Since a package name must always be changed when the packing-list changes,
any attempt to replace a packing-list of a given name with a different
packing-list will be flagged as an error.
.Pp
In MULTI_PACKAGES mode, there must be separate COMMENT, DESCR, and PLIST
templates for each SUBPACKAGE (and optional distinct MESSAGE, UNMESSAGE
files in a similar way).
This contrasts with the FLAVORS
situation, where all these files will automatically default to the
non-flavor version if there is no flavor-specific file around.
.Sh OBSOLETE TARGETS
.Bl -tag -width do-configure
.It Ar cdrom-packages , ftp-packages
Links are now created during the
.Ar package
target.
.It Ar depends-list
Renamed into
.Ar full-build-depends
.It Ar {pre,do}-extract
Don't override.
Set
.Ev EXTRACT_ONLY
to nothing and override
.Ar post-extract
instead.
.It Ar {pre,do,post}-fetch
These prevented bulk mechanisms from running properly.
.It Ar {pre,do,post}-package
There is no port that requires special treatment during packaging,
as
.Ar {pre,do,post}-install
should take care of every necessity.
.It Ar fetch-list , Ar mirror-distfiles , Ar fetch-makefile
See
.Xr mirroring-ports 7
for more efficient and flexible ways to build mirrors.
.It Ar obj
Starting with
.Ox 3.3 ,
using
.Ev WRKOBJDIR
no longer creates a symlink between the current directory and
a subdirectory of ${WRKOBJDIR}, so
.Ar obj
is no longer applicable.
.It Ar print-depends
Use
.Ar print-build-depends
and
.Ar print-run-depends
instead.
.It Ar print-depends-list
Renamed into
.Ar print-build-depends
.It Ar print-package-depends
Renamed into
.Ar print-run-depends
.It Ar print-package-signature
Renamed into
.Ar print-update-signature
.It Ar readme , readmes
replaced by the
.Pa databases/ports-readmes
port, using the Template Toolkit
.Po
.Pa textproc/p5-Template
.Pc
instead of hand-coded substitutions.
.El
.Sh OBSOLETE VARIABLES
.Bl -tag -width MASTER_SITES
.It Ev BIN_PACKAGES
Old user settings.
The infrastructure always trusts the repository to contain correct packages.
So, if the package name did not change and if it exists in the repository,
it will not be rebuilt without manual user action.
.It Ev CATn
List of formatted manpages, per section.
.It Ev CATPREFIX
Location for storing formatted manpages.
Derived directly from
.Ev PREFIX .
.It Ev CDROM_PACKAGES
Old user settings.
Base location where packages suitable for a CD-ROM (see
PERMIT_PACKAGE_CDROM) will be placed.
Now hardwired to
.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom .
.It Ev COMMENT
Used to be the name of the comment file for a package.
It now holds the comment itself.
Some magic has been put in to allow for a seamless transition.
.It Ev DESCR_SRC
From
.Nx .
This is DESCR.
.Ox
does not give a specific name to the generated file.
It is not recommended to try to access it directly.
.It Ev EXTRACT_AFTER_ARGS
Was used to cobble together the normal extraction command, as
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_AFTER_ARGS}.
Use
.Ev EXTRACT_CASES
instead.
.It Ev EXTRACT_BEFORE_ARGS
Likewise, use
.Ev EXTRACT_CASES
instead.
.It Ev EXTRACT_CMD
Likewise, use
.Ev EXTRACT_CASES
instead.
.It Ev FETCH_BEFORE_ARGS , FETCH_AFTER_ARGS
Set
.Ev FETCH_CMD
to point to a script that does any required special treatment instead.
.It Ev FETCH_DEPENDS
Used to specify dependencies that were needed to fetch files.
It is much easier to mirror locally weird distribution files.
.It Ev FTP_PACKAGES
User settings.
Base location where packages suitable for FTP (see
PERMIT_PACKAGE_FTP) will be placed.
Now hardwired to
.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp .
.It Ev GNU_CONFIGURE
Use
.Ev CONFIGURE_STYLE
instead.
.It Ev HAS_CONFIGURE
Use
.Ev CONFIGURE_STYLE
instead.
.It Ev IGNOREFILES
Set to the list of files that can't be checksummed.
All uses of it have led to postponing the correct action: talking
to the software author and getting him to provide versioned archives.
.It Ev MANn
List of unformatted manpages, per section.
.It Ev MANPREFIX
Location for storing unformatted manpages.
Derived directly from
.Ev PREFIX .
.It Ev MASTERDIR
From
.Fx .
Used to organize a collection of ports that share most files.
.Ox
uses a single port with flavors or multi-packages to produce
package variations instead.
.It Ev MASTER_SITE_SUBDIR
Contents were used to replace
.Sq %SUBDIR%
in all
.Ev MASTER_SITES
variables.
Since
.Sq %SUBDIR%
almost always occur at the end of the directory,
the simpler
.Li ${VARIABLE:=subdir/}
construct is now used instead
.Po
taken from
.Nx
.Pc .
.It Ev MD5_FILE
Use
.Ev CHECKSUM_FILE
instead.
.It Ev MIRROR_DISTFILE
Use
.Ev PERMIT_DISTFILES_FTP
to determine which files can be mirrored instead.
See
.Xr mirroring-ports 7 .
.It Ev NEED_VERSION
Used to set a requirement on a specific revision of
.Nm
needed by a port.
No longer needed as
.Nm
should always be kept up-to-date.
.It Ev NO_CONFIGURE
If ${CONFIGURE_SCRIPT} does not exist, no automatic configuration will
be done anyway.
.It Ev NO_DESCRIBE
All ports should generate a description.
.It Ev NO_EXTRACT
Set EXTRACT_ONLY= instead.
.It Ev NO_INSTALL_MANPAGES
Use
.Ev CONFIGURE_STYLE
instead.
.It Ev NO_MTREE
Starting with
.Ox 2.7 ,
the operating system installation script runs the /usr/local specification
globally, instead of embedding it in each package.
So packages no longer record an
.Xr mtree 8
specification.
Use an explicit
.Sq @exec
command if needed.
.It Ev NO_PACKAGE
All ports should generate a package, preferably before install.
.It Ev NO_PATCH
The absence of a patches directory does the same.
Use PATCHDIR and PATCH_LIST if patches need to be changed dynamically.
.It Ev NO_WRKDIR
All ports should have a working directory, as this is necessary to store
cookies and keep state.
.It Ev NO_WRKSUBDIR
The same functionality is obtained by setting WRKDIST=${WRKDIR} .
.It Ev NOCLEANDEPENDS
Use CLEANDEPENDS instead.
.It Ev NOMANCOMPRESS
.Fx
ships with compressed man pages, and uses this variable to control
that behavior.
.It Ev OBJMACHINE
Starting with
.Ox 3.3 ,
setting
.Ev WRKOBJDIR
creates the whole
.Ev WRKDIR
hierarchy under ${WRKOBJDIR}, so
.Ev OBJMACHINE
is no longer useful.
.It Ev OPSYS
The operating system.
This ports tree is only used on
.Ox .
.It Ev OPSYS_VER
Use
.Ev OSREV
instead.
.It Ev PACKAGES
Base location for packages built, everything is based on
.Ev PACKAGE_REPOSITORY
now.
.It Ev PACKAGING
Used to be set during package creation, so that the port would test it
to tweak some settings at this point.
All its effects are now achieved through
.Ev MULTI_PACKAGES .
.It Ev PATCH_SITES
.Ev PATCHFILES
used to be retrieved from a separate site list.
For greater flexibility, all files are now retrieved from
.Ev MASTER_SITES ,
.Ev MASTER_SITES0 , ... ,
.Ev MASTER_SITES9 ,
using a
.Sq :0
to
.Sq :9
extension to the file name, e.g.,
.Bd -literal -offset indent
PATCHFILES=foo.diff.gz
PATCH_SITES=ftp://ftp.zoinx.org/pub/
.Ed
.Pp
becomes
.Bd -literal -offset indent
PATCHFILES=foo.diff.gz:0
MASTER_SITES0=ftp://ftp.zoinx.org/pub/
.Ed
.It Ev PERMIT_DISTFILES_CDROM
The
.Ox
project does not ship distfiles on cdrom.
Concentrate on real questions instead, make sure
.Ev PERMIT_PACKAGE_CDROM
is set correctly.
.It Ev PKG_CMD
replaced by
.Ev PKG_CREATE .
.It Ev PKGREPOSITORY
Old user settings.
See
.Ev PACKAGE_REPOSITORY .
.It Ev PKGREPOSITORYBASE
Old user settings.
See
.Ev PACKAGE_REPOSITORY .
.It Ev PLIST_SRC
From
.Nx .
This is PLIST.
.Ox
does not give a specific name to the generated file.
It is not recommended to try to access them directly.
.It Ev PKGNAME
Used to refer to the full package name, has been superseded by
.Ev FULLPKGNAME-foo ,
for
.Ev SUBPACKAGE
-foo .
.Ev PKGNAME
now holds the package name, not taking multi-packages or flavors
into account.
Most ports are not concerned by this change.
.It Ev PLIST_SUBST
From
.Nx
and
.Fx .
Use SUBST_VARS instead.
.Ox
does not allow general substitutions of the form VAR=value, but uses
only a list of variables instead.
Most package files gets transformed, instead of only the packing list.
.It Ev RESTRICTED
Port has cryptographic issues.
.Ox
focuses on
.Ev PERMIT_PACKAGE_{FTP,CDROM}
instead.
.It Ev SED_PLIST
Old pipeline for creating packing-lists at the ports level.
Necessary functionality has been integrated directly into
.Xr pkg_create 1 .
.It Ev SCRIPTDIR
Old location for scripts related to the current port.
There is no reason for the semantic distinction, use
.Ev FILESDIR
for those.
.It Ev SCRIPTS_ENV
Used to contain the environment for invoking various scripts.
.Ev CONFIGURE_ENV
and
.Ev MAKE_ENV
are enough.
.It Ev USE_AUTOCONF
Use
.Ev CONFIGURE_STYLE
instead.
.It Ev USE_BZIP2
The framework will automatically detect the presence of
.Pa .tar.bz2
files to extract.
See also
.Ev BZIP2 , EXTRACT_CASES ,
and
.Ev EXTRACT_SUFX .
.It Ev USE_IMAKE
Use
.Ev CONFIGURE_STYLE
instead.
.It Ev USE_ZIP
The framework will automatically detect the presence of
.Pa .zip
files to extract.
See also
.Ev ZIP , EXTRACT_CASES ,
and
.Ev EXTRACT_SUFX .
.It Ev VARNAME
Use make show=name instead of make show VARNAME=name.
.It Ev WRKPKG
Directory used to build package information from the templates under
.Pa ${PKGDIR} .
This information is now built on the fly by
.Xr pkg_create 1 .
.El
.Sh OBSOLETE FILES
.Bl -tag -width files/md5
.It Pa {files,patches,pkg}.${ARCH}
Offensive to introspection, makes it impossible to build a decent sqlports
on a given arch.
Hasn't been used for a long time, and there are lots of mechanisms such as
.Ev PKG_ARGS
and fragment substitution, or
.Ev PATCH_LIST
to achieve similar results.
.It Pa Makefile.${ARCH}
Likewise, offensive to introspection too.
.It Pa ${FILESDIR}/md5
Renamed to
.Pa distinfo
to match other
.Bx ,
and save directories.
.It Pa ${SCRIPTDIR}/{pre,do,post}-*
Identical functionality can be obtained through a {pre,do,post}-* target,
invoking the script manually if necessary.
.It Pa ${SCRIPTDIR}/configure
No longer invoked automatically.
Just inline the instructions in
.Ar do-configure
in the Makefile, or put the script in ${FILESDIR} and
invoke it.
.It Pa ${PKGDIR}/COMMENT
Use COMMENT variable instead.
.It Pa ${PKGDIR}/DEINSTALL*
Use @unexec annotations in the packing-list instead.
.It Pa ${PKGDIR}/INSTALL*
Use @exec annotations in the packing-list instead.
.It Pa ${PKGDIR}/PLIST.noshared
Use PFRAG.shared or PFRAG.no-shared instead.
PLIST.noshared was too easy to forget when updating ports.
.It Pa ${PKGDIR}/PLIST.sed
Use PLIST directly.
Until revision 1.295,
.Nm
did not substitute variables in the packing list unless this special form
was used.
.It Pa ${PKGDIR}/REQ*
Old requirement script.
Was mostly unused anyway.
.It Pa /usr/share/mk/bsd.port.mk
Original location of
.Nm bsd.port.mk .
The current file lives under
.Pa ${PORTSDIR}/infrastructure/mk/bsd.port.mk ,
whereas
.Pa /usr/share/mk/bsd.port.mk
is just a stub.
.It Pa {scripts,files,patches}.${OPSYS}
The
.Ox
ports tree focuses on robustness, not on being portable to other operating
systems.
In any case, portability should not need to depend on operating
system dependent patches.
.It Pa /usr/local/etc
Used by
.Fx
to marshall system configuration files.
All
.Ox
system configuration files are located in
.Pa /etc ,
or in a subdirectory of
.Pa /etc .
.El
.Sh SEE ALSO
.Xr ftp 1 ,
.Xr pkg_add 1 ,
.Xr pkg_create 1 ,
.Xr OpenBSD::Intro 3p ,
.Xr bsd.port.arch.mk 5 ,
.Xr mk.conf 5 ,
.Xr port-modules 5 ,
.Xr library-specs 7 ,
.Xr mirroring-ports 7 ,
.Xr packages-specs 7 ,
.Xr pkgpath 7 ,
.Xr ports 7
.Sh HISTORY
The ports mechanism originally came from
.Fx .
A lot of additions were taken from
.Nx
over the seminal years.
.Pp
Since 1998, the framework has been systematically cleaned-up and reorganized
to remove bugs.
New features have been carefully introduced, trying hard to avoid
inconsistencies.
.Pp
FLAVORS, MULTI_PACKAGES and FAKE are
.Ox
improvements.
Most recent additions do not come from another
.Bx .
.\" Voluntarily undocumented:
.\" AUTOCONF_ENV: probably not needed anyway, should be internal.
.Sh BUGS AND LIMITATIONS
.Ev LOCALBASE ,
.Ev X11BASE ,
.Ev SYSCONFDIR
and
.Ev PREFIX
are not heeded consistently.
Most of the ports tree will probably fall
apart if one tries to build/use stuff elsewhere.