Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147878140
D41625.id126649.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D41625.id126649.diff
View Options
diff --git a/documentation/content/en/books/porters-handbook/special/_index.adoc b/documentation/content/en/books/porters-handbook/special/_index.adoc
--- a/documentation/content/en/books/porters-handbook/special/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/special/_index.adoc
@@ -49,6 +49,41 @@
This section explains the most common things to consider when creating a port.
+[[splitting-long-files]]
+== Splitting long files
+
+Sometimes, port [.filename]#Makefiles# can be really long.
+For example, rust ports can have a very long `CARGO_CRATES` list.
+In other cases, the [.filename]#Makefile# might have code that varies depending
+on the architecture.
+In cases like this, it can be convenient to split the original
+[.filename]#Makefile# into several files.
+[.filename]#bsd.port.mk# automatically includes some types of
+[.filename]#Makefiles# into the main port [.filename]#Makefile#.
+
+These are the files that the framework handles automatically if they are
+found:
+
+* [.filename]#Makefile.crates#. An example can be found in package:audio/ebur128[]
+* [.filename]#Makefile.inc#. An example can be found in package:net/ntp[]
+* [.filename]#Makefile.${ARCH}-${OPSYS}#
+* [.filename]#Makefile.${OPSYS}#. An example can be found in package:net/cvsup-static[]
+* [.filename]#Makefile.${ARCH}#
+* [.filename]#Makefile.local#
+
+It is also usual practice to split the packaging list of the port into several
+files if the list varies a lot from one architecture to another or depends on
+the selected flavor.
+In this case, the [.filename]#pkg-plist# file for each architecture is named
+following the pattern [.filename]#pkg-plist.${ARCH}# or
+[.filename]#pkg-plist.${FLAVOR}#.
+The framework does not create the packaging list automatically if multiple
+[.filename]#pkg-plist# files exist.
+It is the responsibility of the porter to select the proper
+[.filename]#pkg-plist# file and assign it to the `PLIST` variable.
+Examples on how to deal with this can be found in
+package:audio/logitechmediaserver[] and package:deskutils/libportal[]
+
[[staging]]
== Staging
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 15, 9:26 AM (3 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29711015
Default Alt Text
D41625.id126649.diff (2 KB)
Attached To
Mode
D41625: [phb]: Document inclusion of Makefile.* files
Attached
Detach File
Event Timeline
Log In to Comment