aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/porters-handbook/porting-samplem
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/content/en/books/porters-handbook/porting-samplem')
-rw-r--r--documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc106
-rw-r--r--documentation/content/en/books/porters-handbook/porting-samplem/_index.po239
2 files changed, 205 insertions, 140 deletions
diff --git a/documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc b/documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc
index bc8d531397..d56cd68c99 100644
--- a/documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc
@@ -49,84 +49,54 @@ include::../../../../../shared/asciidoctor.adoc[]
endif::[]
Here is a sample [.filename]#Makefile# that can be used to create a new port.
-Make sure to remove all the extra comments (ones between brackets).
-The format shown is the recommended one for ordering variables, empty lines between sections, and so on.
+The format shown is the recommended one for crossref:order[, ordering] variables, empty lines between sections, and so on.
This format is designed so that the most important information is easy to locate.
-We recommend using crossref:quick-porting[porting-portlint,portlint] to check the [.filename]#Makefile#.
+Refer to crossref:testing[, the chapter about testing] to learn more about tools for linting, formatting, and checking the [.filename]#Makefile#.
[.programlisting]
....
-[section to describe the port itself and the master site - PORTNAME
- and PORTVERSION or the DISTVERSION* variables are always first,
- followed by CATEGORIES, and then MASTER_SITES, which can be followed
- by MASTER_SITE_SUBDIR. PKGNAMEPREFIX and PKGNAMESUFFIX, if needed,
- will be after that. Then comes DISTNAME, EXTRACT_SUFX and/or
- DISTFILES, and then EXTRACT_ONLY, as necessary.]
-PORTNAME= xdvi
+PORTNAME= xdvi <1>
DISTVERSION= 18.2
CATEGORIES= print
-[do not forget the trailing slash ("/")!
- if not using MASTER_SITE_* macros]
-MASTER_SITES= ${MASTER_SITE_XCONTRIB}
+MASTER_SITES= ${MASTER_SITE_XCONTRIB} <2>
MASTER_SITE_SUBDIR= applications
PKGNAMEPREFIX= ja-
DISTNAME= xdvi-pl18
-[set this if the source is not in the standard ".tar.gz" form]
-EXTRACT_SUFX= .tar.Z
+EXTRACT_SUFX= .tar.Z <3>
-[section for distributed patches -- can be empty]
-PATCH_SITES= ftp://ftp.sra.co.jp/pub/X11/japanese/
+PATCH_SITES= ftp://ftp.sra.co.jp/pub/X11/japanese/ <4>
PATCHFILES= xdvi-18.patch1.gz xdvi-18.patch2.gz
-[If the distributed patches were not made relative to ${WRKSRC},
- this may need to be tweaked]
-PATCH_DIST_STRIP= -p1
-
-[maintainer; *mandatory*! This is the person who is volunteering to
- handle port updates, build breakages, and to whom a users can direct
- questions and bug reports. To keep the quality of the Ports Collection
- as high as possible, we do not accept new ports that are assigned to
- "ports@FreeBSD.org".]
-MAINTAINER= asami@FreeBSD.org
+PATCH_DIST_STRIP= -p1 <5>
+
+MAINTAINER= asami@FreeBSD.org <6>
COMMENT= DVI Previewer for the X Window System
WWW= http://xdvi.sourceforge.net/
-[license -- should not be empty]
-LICENSE= BSD2CLAUSE
+LICENSE= BSD2CLAUSE <7>
LICENSE_FILE= ${WRKSRC}/LICENSE
-[dependencies -- can be empty]
-RUN_DEPENDS= gs:print/ghostscript
-
-[If it requires GNU make, not /usr/bin/make, to build...]
-USES= gmake
-[If it is an X application and requires "xmkmf -a" to be run...]
-USES= imake
-
-[this section is for other standard bsd.port.mk variables that do not]
- belong to any of the above]
-[If it asks questions during configure, build, install...]
-IS_INTERACTIVE= yes
-[If it extracts to a directory other than ${DISTNAME}...]
-WRKSRC= ${WRKDIR}/xdvi-new
-[If it requires a "configure" script generated by GNU autoconf to be run]
-GNU_CONFIGURE= yes
-[et cetera.]
-
-[If it requires options, this section is for options]
+RUN_DEPENDS= gs:print/ghostscript <8>
+
+USES= gmake <9>
+
+<10>
+IS_INTERACTIVE= yes <11>
+WRKSRC= ${WRKDIR}/xdvi-new <12>
+GNU_CONFIGURE= yes <13>
+
+<14>
OPTIONS_DEFINE= DOCS EXAMPLES FOO
-OPTIONS_DEFAULT= FOO
-[If options will change the files in plist]
-OPTIONS_SUB=yes
+OPTIONS_DEFAULT=FOO
+OPTIONS_SUB= yes <15>
FOO_DESC= Enable foo support
-
FOO_CONFIGURE_ENABLE= foo
-[non-standard variables to be used in the rules below]
+<16>
MY_FAVORITE_RESPONSE= "yeah, right"
-[then the special rules, in the order they are called]
+<17>
pre-fetch:
i go fetch something, yeah
@@ -136,7 +106,29 @@ post-patch:
pre-install:
and then some more stuff before installing, wow
-[and then the epilogue]
-
-.include <bsd.port.mk>
+.include <bsd.port.mk> <18>
....
+
+<1> Section to describe the port itself and the master site -- `PORTNAME` and `PORTVERSION` or the `DISTVERSION*` variables are always first, followed by `CATEGORIES`, and then `MASTER_SITES`, which can be followed by `MASTER_SITE_SUBDIR`.
+`PKGNAMEPREFIX` and `PKGNAMESUFFIX`, if needed, will be after that.
+Then comes `DISTNAME`, `EXTRACT_SUFX` and/or `DISTFILES`, and then `EXTRACT_ONLY`, as necessary.
+<2> Do not forget the trailing slash (`/`) if not using `MASTER_SITE_*` macros.
+<3> Set this if the source is not in the standard ".tar.gz" form.
+<4> Section for distributed patches -- can be empty.
+<5> If the distributed patches were not made relative to `WRKSRC`, this may need to be tweaked.
+<6> Maintainer; *mandatory*!
+This is the person who is volunteering to handle port updates, build breakages, and to whom a users can direct questions and bug reports.
+To keep the quality of the Ports Collection as high as possible, we do not accept new ports that are assigned to "ports@FreeBSD.org".
+<7> License -- should not be empty.
+<8> Dependencies -- can be empty.
+<9> If the port requires GNU make instead of the default FreeBSD `make` (man:make[1]) to build.
+For example, some X applications require `xmkmf -a` to run, in which case the port would need `USES=imake`.
+<10> This section is for other standard [.filename]#bsd.port.mk# variables that do not belong to any of the above.
+<11> If the ports asks interactive questions during configure, build, install.
+<12> If it extracts to a directory other than `DISTNAME`.
+<13> If it requires a `configure` script generated by GNU autoconf to be run.
+<14> This section is for handling ports options.
+<15> Set `OPTIONS_SUB` if options will change the list of files in the crossref:plist[plist-sub, plist].
+<16> Non-standard variables to be used in the rules below.
+<17> Special rules, in the order they are called by the ports framework.
+<18> Finally, the epilogue.
diff --git a/documentation/content/en/books/porters-handbook/porting-samplem/_index.po b/documentation/content/en/books/porters-handbook/porting-samplem/_index.po
index 3df6ac6e59..05f5b10436 100644
--- a/documentation/content/en/books/porters-handbook/porting-samplem/_index.po
+++ b/documentation/content/en/books/porters-handbook/porting-samplem/_index.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: FreeBSD Documentation VERSION\n"
-"POT-Creation-Date: 2025-05-01 19:56-0300\n"
+"POT-Creation-Date: 2025-08-17 20:54+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -35,154 +35,120 @@ msgid "A Sample Makefile"
msgstr ""
#. type: Plain text
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:53
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:52
msgid ""
-"Here is a sample [.filename]#Makefile# that can be used to create a new "
-"port. Make sure to remove all the extra comments (ones between brackets)."
+"Here is a sample [.filename]#Makefile# that can be used to create a new port."
msgstr ""
#. type: Plain text
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:57
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:56
msgid ""
-"The format shown is the recommended one for ordering variables, empty lines "
-"between sections, and so on. This format is designed so that the most "
-"important information is easy to locate. We recommend using crossref:quick-"
-"porting[porting-portlint,portlint] to check the [.filename]#Makefile#."
+"The format shown is the recommended one for crossref:order[, ordering] "
+"variables, empty lines between sections, and so on. This format is designed "
+"so that the most important information is easy to locate. Refer to "
+"crossref:testing[, the chapter about testing] to learn more about tools for "
+"linting, formatting, and checking the [.filename]#Makefile#."
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:77
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:67
#, no-wrap
msgid ""
-"[section to describe the port itself and the master site - PORTNAME\n"
-" and PORTVERSION or the DISTVERSION* variables are always first,\n"
-" followed by CATEGORIES, and then MASTER_SITES, which can be followed\n"
-" by MASTER_SITE_SUBDIR. PKGNAMEPREFIX and PKGNAMESUFFIX, if needed,\n"
-" will be after that. Then comes DISTNAME, EXTRACT_SUFX and/or\n"
-" DISTFILES, and then EXTRACT_ONLY, as necessary.]\n"
-"PORTNAME=\txdvi\n"
+"PORTNAME=\txdvi <1>\n"
"DISTVERSION=\t18.2\n"
"CATEGORIES=\tprint\n"
-"[do not forget the trailing slash (\"/\")!\n"
-" if not using MASTER_SITE_* macros]\n"
-"MASTER_SITES=\t${MASTER_SITE_XCONTRIB}\n"
+"MASTER_SITES=\t${MASTER_SITE_XCONTRIB} <2>\n"
"MASTER_SITE_SUBDIR=\tapplications\n"
"PKGNAMEPREFIX=\tja-\n"
"DISTNAME=\txdvi-pl18\n"
-"[set this if the source is not in the standard \".tar.gz\" form]\n"
-"EXTRACT_SUFX=\t.tar.Z\n"
+"EXTRACT_SUFX=\t.tar.Z <3>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:84
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:71
#, no-wrap
msgid ""
-"[section for distributed patches -- can be empty]\n"
-"PATCH_SITES=\tftp://ftp.sra.co.jp/pub/X11/japanese/\n"
+"PATCH_SITES=\tftp://ftp.sra.co.jp/pub/X11/japanese/ <4>\n"
"PATCHFILES=\txdvi-18.patch1.gz xdvi-18.patch2.gz\n"
-"[If the distributed patches were not made relative to ${WRKSRC},\n"
-" this may need to be tweaked]\n"
-"PATCH_DIST_STRIP=\t-p1\n"
+"PATCH_DIST_STRIP=\t-p1 <5>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:93
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:75
#, no-wrap
msgid ""
-"[maintainer; *mandatory*! This is the person who is volunteering to\n"
-" handle port updates, build breakages, and to whom a users can direct\n"
-" questions and bug reports. To keep the quality of the Ports Collection\n"
-" as high as possible, we do not accept new ports that are assigned to\n"
-" \"ports@FreeBSD.org\".]\n"
-"MAINTAINER=\tasami@FreeBSD.org\n"
+"MAINTAINER=\tasami@FreeBSD.org <6>\n"
"COMMENT=\tDVI Previewer for the X Window System\n"
"WWW=\t\thttp://xdvi.sourceforge.net/\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:97
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:78
#, no-wrap
msgid ""
-"[license -- should not be empty]\n"
-"LICENSE=\tBSD2CLAUSE\n"
+"LICENSE=\tBSD2CLAUSE <7>\n"
"LICENSE_FILE=\t${WRKSRC}/LICENSE\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:100
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:80
#, no-wrap
-msgid ""
-"[dependencies -- can be empty]\n"
-"RUN_DEPENDS=\tgs:print/ghostscript\n"
+msgid "RUN_DEPENDS=\tgs:print/ghostscript <8>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:105
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:82
#, no-wrap
-msgid ""
-"[If it requires GNU make, not /usr/bin/make, to build...]\n"
-"USES= gmake\n"
-"[If it is an X application and requires \"xmkmf -a\" to be run...]\n"
-"USES= imake\n"
+msgid "USES=\t\tgmake <9>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:115
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:87
#, no-wrap
msgid ""
-"[this section is for other standard bsd.port.mk variables that do not]\n"
-" belong to any of the above]\n"
-"[If it asks questions during configure, build, install...]\n"
-"IS_INTERACTIVE=\tyes\n"
-"[If it extracts to a directory other than ${DISTNAME}...]\n"
-"WRKSRC=\t\t${WRKDIR}/xdvi-new\n"
-"[If it requires a \"configure\" script generated by GNU autoconf to be run]\n"
-"GNU_CONFIGURE=\tyes\n"
-"[et cetera.]\n"
+"<10>\n"
+"IS_INTERACTIVE=\tyes <11>\n"
+"WRKSRC=\t\t${WRKDIR}/xdvi-new <12>\n"
+"GNU_CONFIGURE=\tyes <13>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:121
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:92
#, no-wrap
msgid ""
-"[If it requires options, this section is for options]\n"
+"<14>\n"
"OPTIONS_DEFINE=\tDOCS EXAMPLES FOO\n"
-"OPTIONS_DEFAULT=\tFOO\n"
-"[If options will change the files in plist]\n"
-"OPTIONS_SUB=yes\n"
-msgstr ""
-
-#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:123
-#, no-wrap
-msgid "FOO_DESC=\t\tEnable foo support\n"
+"OPTIONS_DEFAULT=FOO\n"
+"OPTIONS_SUB=\tyes <15>\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:125
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:95
#, no-wrap
-msgid "FOO_CONFIGURE_ENABLE=\tfoo\n"
+msgid ""
+"FOO_DESC=\t\tEnable foo support\n"
+"FOO_CONFIGURE_ENABLE=\tfoo\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:128
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:98
#, no-wrap
msgid ""
-"[non-standard variables to be used in the rules below]\n"
+"<16>\n"
"MY_FAVORITE_RESPONSE=\t\"yeah, right\"\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:132
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:102
#, no-wrap
msgid ""
-"[then the special rules, in the order they are called]\n"
+"<17>\n"
"pre-fetch:\n"
"\ti go fetch something, yeah\n"
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:135
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:105
#, no-wrap
msgid ""
"post-patch:\n"
@@ -190,7 +156,7 @@ msgid ""
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:138
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:108
#, no-wrap
msgid ""
"pre-install:\n"
@@ -198,13 +164,120 @@ msgid ""
msgstr ""
#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:140
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:110
#, no-wrap
-msgid "[and then the epilogue]\n"
+msgid ".include <bsd.port.mk> <18>\n"
msgstr ""
-#. type: delimited block . 4
-#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:142
-#, no-wrap
-msgid ".include <bsd.port.mk>\n"
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:115
+msgid ""
+"Section to describe the port itself and the master site -- `PORTNAME` and "
+"`PORTVERSION` or the `DISTVERSION*` variables are always first, followed by "
+"`CATEGORIES`, and then `MASTER_SITES`, which can be followed by "
+"`MASTER_SITE_SUBDIR`. `PKGNAMEPREFIX` and `PKGNAMESUFFIX`, if needed, will "
+"be after that. Then comes `DISTNAME`, `EXTRACT_SUFX` and/or `DISTFILES`, "
+"and then `EXTRACT_ONLY`, as necessary."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:116
+msgid ""
+"Do not forget the trailing slash (`/`) if not using `MASTER_SITE_*` macros."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:117
+msgid "Set this if the source is not in the standard \".tar.gz\" form."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:118
+msgid "Section for distributed patches -- can be empty."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:119
+msgid ""
+"If the distributed patches were not made relative to `WRKSRC`, this may need "
+"to be tweaked."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:122
+msgid ""
+"Maintainer; *mandatory*! This is the person who is volunteering to handle "
+"port updates, build breakages, and to whom a users can direct questions and "
+"bug reports. To keep the quality of the Ports Collection as high as "
+"possible, we do not accept new ports that are assigned to "
+"\"ports@FreeBSD.org\"."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:123
+msgid "License -- should not be empty."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:124
+msgid "Dependencies -- can be empty."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:126
+msgid ""
+"If the port requires GNU make instead of the default FreeBSD `make` "
+"(man:make[1]) to build. For example, some X applications require `xmkmf -a` "
+"to run, in which case the port would need `USES=imake`."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:127
+msgid ""
+"This section is for other standard [.filename]#bsd.port.mk# variables that "
+"do not belong to any of the above."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:128
+msgid ""
+"If the ports asks interactive questions during configure, build, install."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:129
+msgid "If it extracts to a directory other than `DISTNAME`."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:130
+msgid ""
+"If it requires a `configure` script generated by GNU autoconf to be run."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:131
+msgid "This section is for handling ports options."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:132
+msgid ""
+"Set `OPTIONS_SUB` if options will change the list of files in the "
+"crossref:plist[plist-sub, plist]."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:133
+msgid "Non-standard variables to be used in the rules below."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:134
+msgid "Special rules, in the order they are called by the ports framework."
+msgstr ""
+
+#. type: Plain text
+#: documentation/content/en/books/porters-handbook/porting-samplem/_index.adoc:134
+msgid "Finally, the epilogue."
msgstr ""