--- title: 第2章 自分で port を作成するには prev: books/porters-handbook/why-port next: books/porters-handbook/quick-porting showBookMenu: true weight: 2 params: path: "/books/porters-handbook/own-port/" --- [[own-port]] = 自分で port を作成するには :doctype: book :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :sectnumoffset: 2 :partnums: :source-highlighter: rouge :experimental: :images-path: books/porters-handbook/ ifdef::env-beastie[] ifdef::backend-html5[] :imagesdir: ../../../../images/{images-path} endif::[] ifndef::book[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] toc::[] endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] toc::[] include::../../../../../shared/asciidoctor.adoc[] endif::[] 自分で port を作ることや、既存の port の 更新作業に興味があるのですか。それはすばらしい! ここでは FreeBSD 用の port を作る際の ガイドラインをいくつか示します。 既存の port を更新したいと考えている場合であっても、 まずこの章を読んでから、次に crossref:port-upgrading[port-upgrading, アップグレード] を読むようにしてください。 この文書では充分に詳細がわからない場合には、 [.filename]#/usr/ports/Mk/bsd.port.mk# を参照してください。 このファイルは、port の Makefile が例外なくインクルードしているものです。 これには細かくコメントが書かれていますので、Makefile を読むのに あまり慣れていない人でも、たくさんの情報を得ることができるでしょう。 それでも解決できないような質問は、link:{freebsd-ports} にポストしてみるのも 良いでしょう。 [NOTE] ==== この文書では、上書き可能な 変数 (`_VAR_`) のうち 一部のものについてだけ述べています。 (すべてでは無いかもしれませんが、) ほとんどの変数は [.filename]#bsd.port.mk# の先頭部分に記述されています。 それ以外のものも記述すべきかもしれません。 なお、このファイルは非標準のタブ設定を使用しています。 Emacs や Vim は、 この設定をファイルの読み込み時に認識するはずです。 man:vi[1] と man:ex[1] では、 一旦ファイルを読み込んでから `:set tabstop=4` と タイプすることで、正しい値に設定することができます。 ====