4.4. ¶i¶¥±MÃD

4.4.1. ¦Û¤v°µ­Ó port

·Q¥²²{¦b¦U¦ì¤@©w¹ï°µ¤@­Ó¦Û¤vªº port ©M¤É¯Å²{¦³ªº port ¦³¿³½ì§a¡H¤Ó´Î¤F¡I

±µ¤U¨Óªº¬O¦p¦ó°µ¤@­Ó FreeBSD ªº port ªº«ü¤Þ¡C ¦pªG­n¤É¯Å²{¦³ªº port ´NÀ³¸Ó¬Ý§¹³o­Ó¦A¬Ý Section 4.4.15¡C

ı±o³o¥÷¤å¥ó¤£°÷¸Ô²Ó®É¡A¥i¥H°Ñ¦Ò©Ò¦³ port ªº Makefile ³£¦³¥]§tªº /usr/ports/Mk/bsd.port.mk¡C§Y¨Ï¨S¦³¨C¤Ñ³£¦b hack Makefile¡A¤´µM«Øij³o¼Ë°µ¡A¦Ó¥B¥i¥H±q¸Ì­±±o¨ì«Ü¦hª¾ÃÑ¡C ¦¹¥~¤]¥i¥H§â¯S§Oªº°ÝÃD°e¨ì FreeBSD ports mailing list ¡C

Note: ¥u¦³¤Ö¼Æ¥i¥H§ó°ÊªºÅÜ¼Æ (VAR) ¤~·|¦b³o¥÷¤å¥ó¤¤´£¨ì¡C¤j³¡¥÷(¦pªG¤£¬O¥þ³¡)³£¦b bsd.port.mk ªº¶}©l¦³µù¸Ñ¡C ³o­ÓÀɮץΪº¬O¤£¼Ð·Çªº tab ³]©w¡CEmacs ©M Vim ¦b¸ü¤JÀÉ®×®ÉÀ³¸Ó³£¯àÅG»{¥X¨Ó¡C ¤@¥¹Àɮ׸ü¤J®É¡Avi ©M ex ³£¯àÂÇ¥ÑÁä¤J :set tabstop=4 ±o¨ì¥¿½Tªº³]©w­È¡C

4.4.2. §Ö³t Porting

³o¤@³¹»¡©ú¤F¦p¦ó§Ö³t¦a²¾´Ó(port)¡C ¤£¹L§Ú­Ì·|¬Ý¨ì¦b«Ü¦h¦a¤è³o¼Ë¬O¤£°÷ªº¡C

­º¥ý®³¨ì­ì©lªº tarball ¨Ã§â¥¦©ñ¶i DISTDIR¡A ¹w³]¬O /usr/ports/distfiles¡C

Note: The following assumes that the software compiled out-of-the-box, ´N¬O»¡³o­Ó port §¹¥þ¤£»Ý­n­×§ï´N¥i¥H¦b FreeBSD ¤W°õ¦æ¡C °²¦p­n§ïÅܬY­Ó¦a¤è¡A¨º¤]¥²¶·°Ñ¦Ò¤U¤@¸`¡C

4.4.2.1. ¼¶¼g Makefile

³Ì¤pªº Makefile ¬Ý°_¨Ó·|¬O³o°Æ¼w©Ê¡G

    # New ports collection makefile for:   oneko
    # Version required:    1.1b
    # Date created:        5 December 1994
    # Whom:                asami
    #
    # $FreeBSD$
    #
           
    DISTNAME=      oneko-1.1b
    CATEGORIES=    games
    MASTER_SITES=  ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/
           
    MAINTAINER=    asami@FreeBSD.org
           
    MAN1=          oneko.1
    MANCOMPRESSED= yes
    USE_IMAKE=     yes
           
    .include <bsd.port.mk>

¬Ý¯à¤£¯à¤F¸Ñ§a¡C¤£¥Î¾á¤ß¦³ $FreeBSD$ ¨º¦æ¡A·í port ¶i¤J¥D­nªº port tree ®É·|¥Ñ CVS ¦Û°Ê¶ñ¤W¡C ¥i¥H¦b Makefile ªº¼Ë¥»¨º³¹¸Ì¦³§ó¸Ô²Óªº¨Ò¤l¡C

4.4.2.2. ¼¶¼g±Ô­z(description)ÀÉ

¦³¤T­Ó±Ô­zÀɬO¨C­Ó port ³£­n¦³ªº¡A¤£ºÞ¥¦­Ì¹ê»Ú¤W¬O¤£¬O package¡C ³o¤T­ÓÀɬO COMMENT¡ADESCR ©M PLIST¡A¨Ã©ñ¦b pkg ³o­Ó¤l¥Ø¿ý¸Ì¡C

4.4.2.2.1. COMMENT

³o­ÓÀɶȥΤ@¦æ¨Ó´y­z port¡C«ô¦«¤£­n§â package ªº¦WºÙ¤]¼g¶i¥h(©Î¬O³nÅ骺ª©¥»)¡C ³o¥÷µù¸ÑÀ³¸Ó¥H¤j¼g¦r¥À¶}ÀY¡A¦Óµ²§À¤£¯à¦³­^¤åªº¥yÂI¡C ³o¸Ì¦³¤@­Ó½d¨Ò¡G

    A cat chasing a mouse all over the screen

4.4.2.2.2. DESCR

³o¬O¤@­Ó¸ûªøªº±Ô­z¡C ¥Î¤@¨ì´X¬qªº±Ô­z²¼ä§ã­nªº»¡©ú port ªº¨Æ¬O¨¬°÷ªº¡C

Note: ³o¨Ã¤£¬O¤@¥÷Ãö©ó¦p¦ó¨Ï¥Î©Î½sĶ port ªº«ü«n©Î²`¤Jªº´y­z¡I¦pªGª½±µ±q README ©Î manpage §Û¹L¨Óªº¸Ü½Ð·V­«¡F¦]¬°¤Ó¦h®É«á¥¦­Ì¨Ã¤£¬O­Ó§ã­nªº»¡©ú¡A ©ÎªÌ¥¦­Ìªº®æ¦¡«ÜÃøÀ³¥I(¦p manpage ¦³½Õ¾ã¹Lªº spacing)¡C ¦pªG³Q²¾´Óªº³nÅ馳¥¿¦¡ªº WWW ­º­¶¡A¨º¤]À³¸Ó¦C¦b³o­ÓÀɮ׸̡C ¦b¤@­Óºô¯¸ªº¦r­º¥[¤W WWW: ³o¼Ë¦Û°Ê¤Æªº¤u¨ã¤~¯à¥¿½T¦a°õ¦æ¡C

«Øij¦bÀɮתº³Ì«á¼g¤W¦Û¤vªº¦W¦r¡A¦p¤U¡G

    This is a port of oneko, in which a cat chases a poor mouse all over
    the screen.
     :
    (etc.)
    
    WWW: http://www.oneko.org/            
    
    - Satoshi
    asami@cs.berkeley.edu

4.4.2.2.3. PLIST

³o­ÓÀɮצC¥X¤F©Ò¦³ port ¦w¸ËªºÀɮסC¦]¬° package ´N¬OÂǥѧâ©Ò¦C¥XªºÀÉ®×¥]¸Ë°_¨Ó²£¥Íªº¡A©Ò¥H³o­ÓÀɤS¥s°µ ``packing list''¡C¨ä¸ô®|«h¬O¬Û¹ï©ó¦w¸Ëªº«e¸m¥Ø¿ý(³q±`¬O /usr/local ©Î /usr/X11R6)¡C¦pªG¦³¥Î MANn ³o­ÓÅܼÆ(¥»¨Ó´N¸Ó³o»ò°µ)¡A¨º¤d¸U¤£­n¦b³o¸Ì¦C¥X¥ô¦ó manpage¡C

³o¸Ì¦³­Ó¤p¨Ò¤l¡G

    bin/oneko
    lib/X11/app-defaults/Oneko
    lib/X11/oneko/cat1.xpm
    lib/X11/oneko/cat2.xpm
    lib/X11/oneko/mouse.xpm
    @dirrm lib/X11/oneko

¸Ô²Ó¸ê®Æ°Ñ¦Ò pkg_create(1) man page ¸Ìªº¥]¸Ë¦Cªí(packing list)¡C

Note: ¦Cªí¸ÌÀ³¸Ó¦C¥X©Ò¦³ªºÀɮסA¦Ó¤£¬O the name directories¡C ¦pªG port ¦b¦w¸Ë¹Lµ{¦Û¤v·s¼W¤F¥Ø¿ý¡A½T©w­n¦³¥[¤W @dirrm ³o´X¦æ¡A¦]¬°­n²¾°£ port ®É¤£¥i©Î¯Ê¡C

«Øij§âÀɮצWºÙ·Ó¦r¥À¶¶§Ç±Æ¦C¡C³o¼Ë¦b¤É¯Å port ®É¥i¥H§ó®e©ö¬Ý¥X­þ¸Ì§ïÅܤF¡C

¦Û¤v¤â°Ê°µ¤@­Ó¥]¸Ë¦Cªí¬O«Ü¤¾ªø¥F¨ýªº¡C¦pªG port ­n¸Ë«Ü¦hÀɮסA¨º¦Û°Ê²£¥Í¥]¸Ë¦Cªí ¥i¯à·|¸û¬Ù®É¡C

4.4.2.3. ²£¥Í checksum file

¥u­nÁä¤J make makesum¡CPort ½sĶªº³W«h·|¦Û°Ê²£¥Í files/md5 ³o­ÓÀÉ¡C

4.4.2.4. ´ú¸Õ port

¥ý½T©w port ªº³W«h³£¿í§g¦®·N¡A¥]¬A¥]¸Ë port¡C ³o¨Ç³£¬O±o¥ý½T»{ªº­nÂI¡C

  • PLIST ¨S¦³¥]§t¥ô¦ó port ¨S¸ËªºªF¦è

  • PLIST ¥]§t port ¦w¸Ëªº©Ò¦³ªF¦è

  • Port ¥i¥H¥Î reinstall ªº¼Ðªº­«ÂЦw¸Ë

  • Port ¦b¸Ñ°£¦w¸Ë«á¥i¥H²M²z°®²b

«Øijªº´ú¸Õ¶¶§Ç

  1. make install

  2. make package

  3. make deinstall

  4. pkg_add package-name

  5. make deinstall

  6. make reinstall

  7. make package

½T©w port ¦b package ©M deinstall ªº¶¥¬q¨S¦³¥ô¦óĵ§i°T®§¡A ¦b¨BÆJ¤T«áÀˬd¬O§_©Ò¦³·sªº¥Ø¿ý³£³Q¥¿½Tªº§R°£¡CÁÙ¦³¡A ¸ÕµÛ¦b¨BÆJ¥|«á¨Ï¥Î³o­Ó³nÅé¥H½T©w·í¥Î package ¦w¸Ë«á¥i¥H¥¿½Tªº°õ¦æ¡C

4.4.2.5. ¥Î portlint Àˬd port

½Ð¥Î portlint ¨Ó¬Ý¬Ý port ¦³¨S¦³²Å¦X§Ú­Ìªº«ü¥Ü¡Cportlint ³o­Óµ{¦¡¤]¬O ports collection ªº¤@³¡¥÷¡C¯S§O¬O·í·Q¥Î¨ÓÀˬd Makefile ªø±o¥¿¤£¥¿½T©M package ªº©R¦W¬O§_«ê·í®É¡C

4.4.2.6. ´£¥X port

­º¥ý­n½T©w¤w¸g¬Ý¹L°µ»P¤£°µªº³¹¸`¡C

²{¦b§A¤@©w¹ï¦Û¤vªº port ·P¨ì¿³¾Ä§a¡A ¦A¨Ó°ß¤@­n°µªº´N¬O§â¥¦©ñ¨ì¥D­nªº FreeBSD ports tree ¸Ì¥h¡A Åý¨ä¥L¤H¤]¦P¼Ë·P¨ì°ª¿³¡C§Ú­Ì¤£»Ý­n work ³o­Ó¥Ø¿ý©Î¬O pkgname.tgz ªº package¡A ©Ò¥H¬å¤F¥¦§a¡C¦A¨Ó¡A¥u­n§â°õ¦æ shar `find port_dir` ²£¥Íªº°T®§¤]¥]¬A¶i¨Ó¡A¥Î send-pr(1) ¥H bug ³ø§iªº§Î¦¡±H¥X(°Ñ¦Ò bug ³ø§i©M¤@¯ë»¡©ú¥H±o¨ì§ó¦h¦³Ãö send-pr(1) ªº¸ê°T)¡C ¦pªG port ¨SÀ£ÁY«e¤j©ó 20KB¡A ¨º´N­n¦b§â¥¦¥]¬A¨ì bug ³ø§i«e¥ýÀ£¦¨ tar ªºÀɮקΦ¡¨Ã¥B°õ¦æ uuencode(1)(§Y¨Ï bug ³ø§i¤ñ 20KB ¤p¤]¬O¥i¥H§â¥¦À£°_¨Ó¦A uuencoded¡A¤£¹L¨Ã¤£¹ªÀy)¡C­n½T©w§â bug ³ø§i¤ÀÃþ¬° ports ¦Ó¥Bµ¥¯Å¬° change-request¡C (¤d¸U¤£­n¼Ð°O¬°¾÷±K³ø§i¡I)

¦A»¡¤@¦¸¡A¤£­n¥]¬A­ì©lÀÉ¡A¥Ø¿ý work¡A©M¥Î make package °µ¥X¨Óªº package¡C

Note: ¥H«e«Øij»¡§â·s port ¤W¶Ç¨ì ftp ¯¸ (ftp.FreeBSD.org)¡C ¤£¹L¦]¬° incoming/ ³o­Ó¥Ø¿ýªºÅª¨úÅv­­³QÃö±¼¡A©Ò¥H³o­Ó¤èªk¤w¸g¤£ºÞ¥Î¤F¡C ³o¬O¦]¬°¦³¤Ó¦hªº«Dªk³nÅé¥X²{¦b¸Ì­±ªºÃö«Y¡C

§Ú­Ì·|À˵ø³o­Ó port ¨Ã§â¥¦©ñ¶i ports tree¡A­Y¥²­nªº¸Ü·|§â¥¦ÂkÁÙ¡C §Aªº¦W¦r¤]·|¥X²{¦b FreeBSD ¨Ï¥ÎªÌ¤â¥U``ÃB¥~ªº FreeBSD °^ÄmªÌ''ªº¦Cªí©M¨ä¥¦Àɮ׸̡C«Ó§a¡H¡I:-)

4.4.3. ºCºC Porting

¦n§a¡C³o¨S¦³¨º»ò²³æ¡A¦Ó¥B³o­Ó port »Ý­n¤@¨Ç­×§ï¤~¯à¤u§@¡C ¦b³o³¹¸Ì§Ú­Ì¥Î±N port ªº½d¨Ò¤@¨B¨Bªº¸ÑÄÀ¦p¦ó­×§ï¥¦¤~¯à¥Î¡C

4.4.3.1. ³o¨ÇªF¦è¦p¦ó¹B§@ªº

­º¥ý¡A³o¬O·í¦b port ªº¥Ø¿ý¤UÁä¤J make «áªºµ²ªGªº¶¶§Ç¡A¦Ó¥B§A¥i¥H§â bsd.port.mk ¶}¦b¥t¤@­Óµøµ¡¡A©M³o¥÷¤å¥ó°t¦XµÛ¬Ý¡A³o¼Ë¤ñ¸û¦nÀ´¡C

¤£¥Î¾á¤ß¬Ý¤£À´ bsd.port.mk ¦b°µ¤°»ò¡A ¤]¨S«Ü¦h¤HÀ´ ...:->

  1. fetch ³o­Ó¼Ðªº¥¿¦b°õ¦æ¡C fetch ³o­Ó¼Ðªº­t³d½T©w tarball ¦³¦b DISTDIR ¸Ì¡C¦pªG fetch ¦b DISTDIR §ä¤£¨ì¥¦­nªºÀɮסA¥¦·|¥h Makefile ¸Ì©w¸qªº MASTER_SITES ¸Ìªº URL §ä¡A ¥¿¦p¦P§Ú­Ì¥D­nªº ftp ¯¸ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ ¸Ì©ñµÛ»{¥iªºÀÉ®×°µ¬°³Æ¥÷¡C°²¦p©Ò½Ð¨Dªº¯¸¥i¥H¦bºô¸ô¤Wª½±µ¦s¨ú¡A ¥¦·|¸ÕµÛ¥Î FETCH ¥h§ì«ü¦Wªºµo¦æª©¥»¡C ¦pªG¦¨¥\´N·|§âÀɮצs¦b DISTDIR ¥H«KÄ~Äò¶i¦æ©M¦A§Q¥Î¡C

  2. extract ³o­Ó¼Ðªº¥¿¦b°õ¦æ¡C ¥¦·|§ä©ñ¦b DISTDIR ¸Ìªºµo¦æª©¥»ªºÀÉ®× (¤@¯ë¬O gzip ªº tarball) ¨Ã§â¥¦¸Ñ¨ì WRKDIR ©Ò¼gªº¼È®É¥Ø¿ý¤U(¹w³]¬O work)¡C

  3. patch ³o­Ó¼Ðªº¥¿¦b°õ¦æ¡C­º¥ý¡A ¬I¦æ¥ô¦ó©w¸q¦b PATCHFILES ¸Ìªº patch¡C ¦A¨Ó¡A·Ó¦r¥À¶¶§Ç¬I¦æ¥ô¦ó¦b PATCHDIR (¹w³]¬O¤l¥Ø¿ý patches)¡C

  4. configure ³o­Ó¼Ðªº¥¿¦b°õ¦æ¡C ¥¦¥i¥H±q«Ü¦h¤£¤@¼Ëªº¨Æ¸Ì¬D¥ô¦ó¤@­Ó¨Ó°µ¡C

    1. ¦pªG¦s¦b scripts/configure¡A ´N°õ¦æ¥¦¡C

    2. ¦pªG³]©w¤F HAS_CONFIGURE ©Î GNU_CONFIGURE¡A ´N°õ¦æ WRKSRC/configure¡C

    3. ¦pªG³]©w¤F USE_IMAKE¡A °õ¦æ XMKMF(¹w³]­È¡G xmkmf -a)¡C

  5. build ¥¿¦b°õ¦æ¡C ³o­Ó­t³d©¹¤U©µ¦ù¶i¨ì port ¨p¤Hªº¤u§@¥Ø¿ý (WRKSRC)¨Ã¶}©l½sĶ¡C ¦pªG³]©w¤F USE_GMAKE¡A ´N·|¨Ï¥Î GNU make¡A §_«h´N·|¥Î¨t²Îªº make¡C

¤W­±³o¨Ç¬O¹w³]ªº°Ê§@¡C¤]¥i¥H©w¸qÃB¥~ªº¼Ðªº pre-something ©Î post-something¡A ©Î¬O§â scripts ´«³o³o¨Ç¦W¦r©ñ¨ì¤l¥Ø¿ý scripts ¸Ì¡A³o¼Ë¥¦­Ì´N·|¦b¹w³]ªº°Ê°µ§¹¦¨«e©Î§¹¦¨«á°õ¦æ¡C

¨Ò¦p¦³¤@­Ó¥s°µ post-extractªº¼Ðªº©w¸q¦b Makefile ¸Ì¡A©M¤@­Ó¥s°µ pre-build ªºÀɮשñ¦b¤l¥Ø¿ý scripts ¸Ì¡A¨º»ò post-extract ³o­Ó¼Ðªº·|¦b³W©wªº¸Ñ¶} (extraction)°Ê§@§¹¦¨«á³Q©I¥s¡A¦Ó pre-build ³o­Ó script ·|¦b¹w³]ªº½sĶ³W«h«e°õ¦æ¡C°²¦p°Ê§@°÷²³æªº¸Ü¡A «Øij¥Î Makefile ¸Ìªº¼Ðªº¡A ¦]¬°³o¼Ë§O¤H¤ñ¸û®e©öµo²{³o­Ó port »Ý­n­þ¨Ç«D¹w³]ªº°Ê§@¡C

³o¨Ç¹w³]ªº°Ê§@¬O¥Ñ¦b bsd.port.mk ªº¼Ðªº do-something ¨Ó°õ¦æ¡C¨Ò¦p¡A¥Î¨Ó¸Ñ¶}¤@­Ó port ªº«ü¥O¼g¦b do-extract ³o­Ó¼Ðªº¸Ì¡C ¦pªG¬Ý³o­Ó¹w³]ªº¼Ðªº¤£°ª¿³ªº¸Ü¡A¥i¥H¦b Makefile ¸Ì­«·s©w¸q do-something ¨Ó­×§ï¥¦¡C

Note: ``¥D­nªº''¼Ðªº(¦p extract¡Aconfigure µ¥µ¥)¥u¬O¥Î¨Ó½T©w¨ì³o¤§«eªº¶¥¬q¤w¸g§¹¦¨¡A¨Ã©I¥s¯u¥¿ªº¼Ðªº©Î script¡A ¦Ó¥B§Ú­Ì¨Ã¨S¦³¥´ºâ§ïÅܳo¨Ç¼Ðªº¡C°²¦p­n­×§ï¸Ñ¶}³o­Ó°Ê§@¡A½Ð­×§ï do-extract¡Aµ´¤£­n¸I extract¡I

²{¦bÀ³¸Óª¾¹D·íÁä¤J make ·|µo¥Í¤°»ò¤F§a¡A Åý§Ú­ÌÄ~Äò¬Ý¬Ý³Ð³y¤@­Ó§¹¬üªº port ©Ò«Øijªº¨BÆJ§a¡C

4.4.3.2. ¨ú±o­ì©lµ{¦¡½X

(³q±`)¨ú±oÀ£ÁY§Î¦¡ªº­ì©l½Xªº tarball (foo.tar.gz ©Î foo.tar.Z) ¨Ã§â¥¦½Æ»s¨ì DISTDIR¡C ¦³¿ìªkªº¸Ü´N³£¥Î¥D¬yªºµ{¦¡½X¡C

¦pªG§ä¤£¨ì³s½uª¬ªp¨}¦nªº ftp/http ºô¯¸¡A ©Î¬O¥u§ä±o¨ì®æ¦¡¤£¼Ð·Çªº¯¸¡A ¥i¥H§â¥¦½Æ»s¤@¥÷©ñ¦b¥i«H¥ôªº ftp ¯¸©Î¬O¦Û¤v±±¨îªº http ¦øªA¾¹ (¨Ò¦p¦Û¤vºô­¶)¡C½T©w©Ò³]©wªº MASTER_SITES ¯à¤ÏÀ³¨ì©Ò¿ï¾Üªººô¯¸¡C

¦pªG§ä¤£¨ì¤è«K©Î¥i«H¿àªº¦a¤è©ñ distfile (¦pªG§A¬O FreeBSD committer¡A¥u­n©ñ¦b¦Û¤v¦b freefall ªº public_html/ ¥Ø¿ý¸Ì§Y¥i)¡A ³Ì«á¤â¬q´N¬O§Ú­Ì·|§â¥¦``¦¬ÂÃ''¦b ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/LOCAL_PORTS/¡C ½Ð°Ñ¦Ò MASTER_SITE_LOCAL ©Ò¦bªº¦ì¸m¡C MASTER_SITE_LOCAL¡C¦pªG¤£½T©w­n«ç»ò°µ¨ì¸Ü¡A ±H«Ê«H¨ì FreeBSD ports mailing list §a¡C

¦pªG port ªº distfile ¸g±`¨S²z¥Ñªº§ï¨Ó§ï¥hªº¸Ü¡A ¥i¥H¦Ò¼{§â distfile ©ñ¦b§Aªººô­¶¤W¨Ã§â¦ì§}¦C¬°²Ä¤@­Ó MASTER_SITES¡C³o¼Ë¥i¥HÁקKÅý¨Ï¥ÎªÌ±o¨ì ``checksum mismatch'' ªº¿ù»~°T®§¡A ¤]Åý§Ú­Ì ftp ¯¸ªº maintainers »´ÃPÂI¡C¦pªG³o­Ó port ¥u¦³¤@­Ó¥D­nªº¯¸¡A«Øij§A¦¬Âä@¥÷³Æ¥÷¦b¦Û¤vªº¯¸¨Ã¦C¬°²Ä¤G­Ó MASTER_SITES¡C

¦pªG³o­Ó port »Ý­n¤@¨ÇÃB¥~ªº `patches' ¥B¥i¥H¦bºô¸ô¤W¨ú±o¡A ¤]§â¥¦­Ì§ì¤U¨Ó©ñ¨ì DISTDIR §a¡C §O¾á¤ß¥¦ªù¸ò¥D­nªºµ{¦¡½Xªº tarball ¨Ó·½¤£¦P¡A §Ú­Ì¦³¿ìªk³B²z(¬Ý¤U­± PATCHFILES ªº´y­z§a)¡C

4.4.3.3. ­×§ï port

§â tarball ¸Ñ¨ì¤@­Ó¨p¤Hªº¥Ø¿ý¤U¦A°µ¥ô¦ó¥²­nªº§ïÅÜ ¨Ï±o port ¥i¥H¦b current ª©¥»ªº FreeBSD ¥¿½Tªº½sĶ¡C ¥J²Ó¦a°lÂÜ©Ò¦³¹Lµ{¡A³o¼Ë¤~¯à²µu¦a§â¹Lµ{¦Û°Ê¤Æ¡C ·í port §¹¦¨®É¡A©Ò¦³ªF¦è¥]¬A¹ïÀɮתº§R°£¡B¼W¥[¡A ©Î¬O­×§ï³£­n¯àÂǥѤ@­Ó¦Û°Ê¤Æªº script ©Î¬O patch ÀɨӰõ¦æ¡C

¦pªG¸Ó port »Ý­n¨Ï¥ÎªÌ°µ­«­nªº¤¬°Ê/©w»s¤~¯à½sĶ©Î¦w¸Ë¡A ¨º´N¸Ó¬Ý¬Ý Larry Wall's ªº¸g¨å§@¤§¤@ Configure scripts¡A ¥i¯àªº¸Ü¨Ã¦Û¤v°µ¨Ç¬Û¦üªº¨Æ¡C·s port ¦¬¶°ªº¥Øªº¦bÅý³Ì²×ªº¨Ï¥ÎªÌ ¥Î³Ì¤ÖªºªÅ¶¡ºÉ¥i¯à¦a°µ¨ì ``plug-and-play''¡C

Note: °£«D¦³©ú¥Õªº«Å§i¡A§_«h©Ò¦³³Ð³y©M°^Ämµ¹ FreeBSD ports ¦¬¶°ªº patch ÀÉ¡Bscripts©M¨ä¥¦ªºÀɮ׳£¨ü¨ì¼Ð·Ç BSD ª©Åv±ø¬ùªº«OÅ@¡C

4.4.3.4. Patching

¦b·Ç³Æ port ®É¡A¤w¸g³Q¼W¥[©Î­×§ïªºÀÉ®×¥i¥H¥Î¤@­Ó»¼°jªº diff ¾ã²z°_¨Ó¥H¬°¤F¤§«á¥Î¨Ó patch¡C©Ò­n´£¨Ñªº¨C¤@²Õ patch ³£À³¸Ó¦¬¶°¦¨¤@­Ó¥s°µ patch-xx ªºÀɮסAxx ªí¥Ü©Ò­n´£¨Ñªº patch ªº¶¶§Ç -- ¥H¦r¥À¶¶§Ç¡A¦]¦¹ aa ±Æ²Ä¤@­Ó¡A¦A¨Ó¬O ab µ¥µ¥¡C ³o¨ÇÀÉ®×À³¸Ó¦s©ñ¦b PATCHDIR ³o¼Ë¤~¯à³Q¦Û°Ê´£¨Ñ¡C©Ò¦³ªº patch À³¸Ó¬Û¹ï©ó WRKSRC (³q±`¬O§â tarball ¸Ñ¶}ªº¥Ø¿ý¡A½sĶ¤]¦b¨º¸Ì§¹¦¨)¡C ­nÅý­×¥¿©M¤É¯Å®e©öªº¸Ü¡AÀ³¸ÓÁקKÅý¶W¹L¤@­Ó patch ­×¥¿¦P¤@­ÓÀÉ®× (¨Ò¦p patch-aa ©M patch-ab ³£­×¥¿ WRKSRC/foobar.c)¡C

4.4.3.5. Configuring

§â¥ô¦óªþ¥[ªº customization ©R¥O¥]§t¨ì configure script ¸Ì¨Ã¦s¦b¤l¥Ø¿ý scripts ¸Ì¡C ¥¿¦p¦P«e­±´£¹Lªº¡A¤]¥i¥HÂÇ¥Ñ Makefile ¸Ìªº¼Ðªº©M/©Î¥H pre-configure ©Î post-configure ©R¦Wªº script ¨Ó°µ¨ì³o¥ó¨Æ¡C

4.4.3.6. ³B²z¨Ï¥ÎªÌªº¿é¤J

¦pªG port »Ý­n¨Ï¥ÎªÌ¿é¤J¥H½sĶ¡Aconfiguration¡A©Î¦w¸Ë¡A¨º´N¦b Makefile ¸Ì³]©w IS_INTERACTIVE¡C ³o¼Ë·|¤¹³\³]©wÀô¹ÒÅÜ¼Æ BATCH ªº¨Ï¥ÎªÌ¦b``¹ý©]½sĶ''®É¸õ¹L³o­Ó port (¦pªG¨Ï¥ÎªÌ³]¤FÅÜ¼Æ INTERACTIVE¡A ¨º´N¥u¦³»Ý­n¤¬°Êªºµ{¦¡·|³Q½sĶ)¡C

¦P¼Ë¦a¡A°²¦p¦³¦X²zªº¹w³]µª®×¡A«h«Øij·íÅÜ¼Æ PACKAGE_BUILDING ³]©w®ÉÃö±¼¨º­Ó¤¬°Êªº script¡C ³o¼Ë«K¤¹³\§Ú­Ì¬°¥úºÐ©M ftp ½sĶ packages¡C

4.4.4. Configuring the Makefile

Configuring the Makefile ¬Û·í²³æ¡A ¦A¦¸«Øij§A¦b¶}©l«e¬Ý¬Ý²{¦³ªº¨Ò¤l¡C ¨Ï¥Î¤â¥U¸Ì¤]¦³¤@­Ó Makefile ªº¼Ë«~¡A©Ò¥H¬Ý¬Ý¨Ã¸òÀHµÛ¼Ë«~¸ÌÅܼƩM³¹¸`ªº¶¶§Ç¡A Åý§Aªº port ¹ï§O¤H¨Ó»¡§ó¨ã¥iŪ©Ê¡C

²{¦b¡A¦b³]­p·sªº Makefile ®É¨Ì§Ç¦Ò¼{¤U­±ªº°ÝÃD§a¡G

4.4.4.1. ­ì©lµ{¦¡½X

¥¦¦³¥H¼Ð·Ç gzip ªº tarball §Î¦¡©ñ¦b DISTDIR ¶Ü¡H¦pªG¦³¡A¸õ¨ì¤U¤@¨B§a¡C¦pªG¨S¦³¡A À˵ø port µo¦æªºÀɮ׬O­þºØ¬P²yªº®æ¦¡¨Ó¨M©w­n¥Î EXTRACT_CMD¡A EXTRACT_BEFORE_ARGS¡A EXTRACT_AFTER_ARGS¡A EXTRACT_SUFX¡A©Î DISTFILES ¤¤ªº¥ô¤@ÅܼơC(·í tarball ³Q¼Ð·ÇªºÀ£ÁYµ{¦¡¦Ó¤£¬O gzip À£ÁY®É¡A ³Ì±`¨£ªº®æ¦¡¬O EXTRACT_SUFX=.tar.Z¡C)

¦b³ÌÁVªº±¡ªp¤U¡A¥i¥H²³æªº³Ð³y¤@­Ó¦Û¤vªº do-extract ¼Ðªº¨Ó»\¹L¹w³]ªº¡A ÁöµM³o«Ü¤Ö¨£¡A¦ý¦pªG¥X²{´N¥u±o³o»ò°µ¤F¡C

4.4.4.2. DISTNAME

§â DISTNAME ³]¬° port ªº¦WºÙ¡C ¹w³]ªº³W©w¬O§Æ±æµo¦æª©¥»ªºÀɮצCªí¥H DISTNAMEEXTRACT_SUFX ªº§Î¦¡©R¦W¡A¹ï¤@­Ó¥¿±`ªº tarball ¦Ó¨¥¡A ¤@­Ó¦W¬° DISTNAME=foozolix-1.0 ªº port¡A¨äÀɮצCªíÀ³¸Óªø±o¹³ foozolix-1.0.tar.gz¡C

¹w³]ªº³W«h¤]´Á±æ§â tarball(s) ¸Ñ¨ì¤l¥Ø¿ý work/DISTNAME ¤U¡A ¦p work/foozolix-1.0/¡C

·íµM³o¨Ç³£¥i¥H³Q±À½¡F¥¦¥u¬O¥Nªí¤F¤j³¡¥÷¬Ù®Éªº¦@¦P¹w³]­È¡C ¹ï¤@­Ó»Ý­n¦h­Óµo¦æª©¥»ªºÀɮתº port¡A¥u­n©ú½Tªº³]©w DISTFILES§Y¥i¡C¦pªG¥u¦³¤@¤p²Õ DISTFILES ¬O¹ê»Ú¥i¸Ñ¶}ªºÀɮסA ¨º´N§â¥¦­Ì¼g¦b EXTRACT_ONLY¡A ³o¼Ë·í­n¸Ñ¶}®É«K·|¨ú¥N DISTFILES ªº¦Cªí¡A ¦Ó¨ä¥¦ªºÀɮ׫h·|¯d¦b DISTDIR ¥H«á¦A¥Î¡C

4.4.4.3. PKGNAME

¦pªG DISTNAME ¤£²Å¦X ¦nªº package ¦WºÙªº«ü«n¡A ¨º´N³]©w PKGNAME ³o­ÓÅܼƨӨú­Ó¦n¦W¦r§a¡C ­nª¾¹D§ó¦h²Ó¸`´N¬Ý¤W­±¨º­Ó«ü«n§a¡C

4.4.4.4. CATEGORIES

·í¤@­Ó package °µ¦n®É¡A¥¦·|©ñ¦b /usr/ports/packages/All ¤U¨Ã³sµ²¨ì /usr/ports/packages ¤Uªº¤@­Ó©Î¦h­Ó¤l¥Ø¿ý¡C³o¨Ç¤l¥Ø¿ýªº¦WºÙ¦bÅÜ¼Æ CATEGORIES ¸Ì¦³¸Ô²Ó»¡©ú¡C ³o¬O¥´ºâÅý¨Ï¥ÎªÌ¦b ftp ¯¸©Î¥úºÐ¤W¶O¤O´ç¹L¤@°ï package ¨Ó§äªF¦è®É®e©ö¤@ÂI¡C½Ð¬Ý¤@¤U²{¦³ªº¤ÀÃþ(category)¨Ã¿ï¤@­Ó³Ì¾A¦X§Aªº port ªº¡C

³o¤]¨M©w¤F port ·|³Q¦¬¤J¨ì port tree ªº¦ì¸m¡C ¦pªG¦b³oÅܼƸ̩ñ¶i¤F¤Ó¦hªº¤ÀÃþ¡A±N°²³] port ªºÀÉ®×·|³Q©ñ¦b²Ä¤@­Ó¤ÀÃþªº¤l¥Ø¿ý¸Ì¡C¤ÀÃþ³o­Ó³¹¸`¸Ì¦³§ó¦hÃö©ó¦p¦ó ¬D¿ï¥¿½Tªº¤ÀÃþªº°Q½×¡C

¦pªG port ¯uªº¤£ÄÝ©ó²{¦³ªº¥ô¦ó¤ÀÃþ¡A´N¦Û¤v³Ð³y¤@­Ó§a¡C ¦b³o±¡ªp¤U½Ð±H«Ê«H¨ì FreeBSD ports mailing list ´£Ä³¤@­Ó·sªº¤ÀÃþ¡C

Note: ÀˬdºØÃþ¦WºÙ®É¤£·|¦³¥ô¦ó¿ù»~¡C¦pªG¥´¿ùºØÃþ¦WºÙ¡Amake package ·|«Ü¼Ö·NÀ°§A¥Í¥X¤@­Ó·s¥Ø¿ý¡A ©Ò¥H­n¤p¤ßÂI¡I

4.4.4.5. MASTER_SITES

§â ftp/http-URL ¸Ì«ü¥X¨Ó·½ tarball ©Ò¦b¥Ø¿ýªº³¡¥÷°O¿ý¦b MASTER_SITES¸Ì¡C §O§Ñ¤F¸ò¦b«á­±ªº±×½u (/)¡I

¦pªG¦b¨t²Î¸Ì§ä¤£¨ìµo¦æª©¥»ªºÀɮתº¸Ü¡Amake ³o­Ó¥¨¶°«ü¥O¦b¥Î FETCH §ìÀɮɷ|¸ÕµÛ¥Î¨ì³o¥÷²M³æ¡C

«Øij¦b¦Cªí¸Ì©ñ¦h¤@ÂI¯¸¡A³Ì¦n¨Ó¦Û¦U¬w¡C ³o¼Ë·|ÁקK¤j½d³òªººô¸ô°ÝÃD¡A§Ú­Ì¬Æ¦Ü­pµe¼W¥[¥i¦Û°Ê¨M©w³Ìªñªº ¥D¯¸¨Ã±q¨º¸Ì§ì¨úªº¤ä´©¡I

¦pªG¨Ó·½ªº tarball ¬O¤U­±´X­Ó´¶¹MªºÀÉ®×®w¡G X-contrib¡AGNU¡APerl CPAN¡ATeX CTAN¡A©Î Linux Sunsite¡A ¥i¥H§Q¥Î MASTER_SITE_XCONTRIB¡A MASTER_SITE_GNU¡A MASTER_SITE_PERL_CPAN¡A MASTER_SITE_TEX_CTAN¡A©M MASTER_SITE_SUNSITE ¨Ó°µ°Ñ¦Ò¡C¥u­n§â MASTER_SITE_SUBDIR ³]¨ìÀÉ®×®w¸Ìªº¸ô®|¡C ³o¦³­Ó¨Ò¤l¡G

    MASTER_SITES=         ${MASTER_SITE_XCONTRIB}
    MASTER_SITE_SUBDIR=   applications

¨Ï¥ÎªÌ¤]¥i¦b /etc/make.conf ³]©wÅÜ¼Æ MASTER_SITE_* ¨Ó»\¹L§Ú­Ìªº¿ï¾Ü¡A µM«á¥Î¥L­Ì³ßÅwªº mirror ¯¸¨Ó¥N´À¡C

4.4.4.6. PATCHFILES

¦pªG§Aªº port »Ý­n¤@¨ÇÃB¥~ªº patch¡A¦Ó¤S¥i¥H¥Ñ ftp ©Î http ¨ú±o¡A¨º´N§â PATCHFILES ³]¬°ÀɮצWºÙ¡A ¦Ó PATCH_SITES ¬°¥]§t¸ÓÀɮתº¥Ø¿ýªº URL (®æ¦¡¸ò MASTER_SITES ¤@¼Ë)¡C

°²¦p¦]¬° patch ¥]§t¤@¨ÇÃB¥~ªº¸ô®|¡A¨Ï±o patch ¨Ã¤£¬Û¹ï©óµ{¦¡½Xªº¾ðª¬µ²ºcªº³Ì¤W¼h(¦p WRKSRC)¡A ¨º´N¾A·í¦a³]©w PATCH_DIST_STRIP¡CÁ|­Ó¨Ò¡A °²¦p patch ¸Ì©Ò¦³ªº¸ô®|«e­±³£¦h¥[¤F foozolix-1.0/¡A¨º´N³]¦¨ PATCH_DIST_STRIP=-p1¡C

§O¾á¤ß patch ³QÀ£ÁY°_¨Ó¡A¦pªGÀɮצWºÙ¬O¥H .gz ©Î .Z µ²§À¡A ¨º¥¦­Ì·|¦Û°Ê³Q¸ÑÀ£¡C

¦pªG patch ¬O¸ò¨ä¥¦ÀɮסA¦p¤å¥ó¡A¤@°_¥H gzip §Î¦¡ªº tarball µo¦æ¡A¨º´N¤£¯à¥Î PATCHFILES¡C ¦b³o±¡§Î¤U¡A´N§â patch tarball ªº¦WºÙ©M¦ì¸m¥[¶i DISTFILES ©M MASTER_SITES¡C µM«á¡A±q pre-patch ªº¼Ðªº´£¨Ñ patch¡A ¤£½×¬O±q¨º­Ó¼Ðªº°õ¦æ¡A©Î¬O§â path ½Æ»s¨ì¥Ø¿ý PATCHDIR ¸Ì¨ÃºÙ¤§¬° patch-xx¡C

Note: ­nª`·N tarball ¤w¸g¸òµÛ¥¿±`ªºµ{¦¡½X³Q¸Ñ¶}¤F¡A ©Ò¥H¦pªG¬O¥H gzip ©Î compress À£°_¨Óªº tarball ¤]¤£¥²­n¦A¸Ñ¶}¡C ¦pªG§A§â¥¦¸Ñ¶}¤F¡A¯S§O¤p¤ß¤£­n§â¤w¸g¦s¦b¥Ø¿ý¸ÌªºªF¦è§ï¼g±¼¡C ¦P¼Ë¤]§O§Ñ¤F¦b pre-clean ªº¼Ðªº¸Ì¥[­Ó©R¥O¨Ó²¾°£½Æ»sªº patch¡C

4.4.4.7. MAINTAINER

¦b³o¯d¤U§Aªº¶l¥ó¦a§}§a¡C«ô¦« :-)

­nª¾¹D¦³Ãö maintainer ­t³d¨Æ¶µ¸Ô²Óªº´y­zªº¸Ü¡A °Ñ¦Ò MAINTAINER on Makefiles ªº³¹¸`¡C

4.4.4.8. Dependencies

«Ü¦h port ³£¨Ì¿à¨ä¥¦ªº port¡C¦³¤­­ÓÅܼƥi¥Î¨Ó½T©w©Ò¦³»Ý­nªº ³¡¥÷³£¤w¸g¦b¨Ï¥ÎªÌªº¾÷¾¹¸Ì¤F¡C¦b¤@¯ë±¡§Î¤UÁÙ¦³¤@¨Ç¹w¥ý¤ä´©ªº dependency ÅܼơA¥[¤W¤F¦h¤@¨ÇªF¦è¨Ó±±¨î dependency ªºªí²{¡C

4.4.4.8.1. LIB_DEPENDS

³o­ÓÅܼƸԭz¤F¸Ó port ©Ò¨Ì¿àªº¦@¨É¨ç¦¡¡C ¥¦¬O­Ó¦h²Õ lib:dir[:target] ªº¦Cªí¡Alib ¬O¦@¨É¨ç¦¡ªº¦WºÙ¡A dir ¬O¸U¤@¨t²Î¸Ì¨S¦³®É¥i¥Î¨Ó§ä¨ì¥¦ªº¥Ø¿ý¡A¦Ó target ¬O¦b¨º¥Ø¿ý¤U©Ò©I¥sªº¼Ðªº¡C ¨Ò¦p

     LIB_DEPENDS=
                  jpeg.9:${PORTSDIR}/graphics/jpeg:install
·|Àˬd¥Dª©¥»¬° 9 ªº¦@¨É¨ç¦¡ jpeg¡A¥B°²¦p§ä¤£¨ìªº¸Ü¡A «K·|©¹¤U¨ì ports tree ªº¤l¥Ø¿ý graphics/jpeg «Ø¥ß¨Ã¦w¸Ë¥¦¡C°²¦p target ©M DEPENDS_TARGET ¤@¼Ëªº¸Ü«h¥i¬Ù²¤(¹w³]¬O install)¡C

Note: lib ªº³¡¥÷¬O¤@­Ó­nµ¹ ldconfig -r | grep -wF ªº°Ñ¼Æ¡C ¦b³o­ÓÅܼƸ̤£¥i¦³¥¿³Wªí¥Ü¦¡(regular expression)¡C

Denpendency ·|³QÀˬd¨â¦¸¡A¤@¦¸¬O¦b extract ªº¼Ðªº¸Ì¡A¤@¦¸¬O¦b install ªº¼Ðªº¡C ¦P¼Ë¦a¡Adependency ªº¦WºÙ¤]·|©ñ¨ì package ¸Ì³o¼Ë·í¨Ï¥ÎªÌ¨t²Î¸Ì¨S¦³®É pkg_add «K·|¦Û°Ê§â¥¦¸Ë¤W¡C

4.4.4.8.2. RUN_DEPENDS

³o­ÓÅܼƸԭz¤F³o­Ó port °õ¦æ®É©Ò¨Ì¿àªº¥i°õ¦æÀÉ©ÎÀɮסC ¥¦¬O­Ó¦h²Õ path:dir[:target] ªº¦Cªí¡A path ¬O°õ¦æÀÉ©ÎÀɮתº¦WºÙ¡A dir ¬O¸U¤@¨t²Î¸Ì¨S¦³®É¥i¥Î¨Ó§ä¨ì¥¦ªº¥Ø¿ý¡A ¦Ó target ¬O¦b¸Ó¥Ø¿ý©Ò©I¥sªº¼Ðªº¡C ¦pªG path ¥Hµu±×½u¶}ÀY (/)¡A¨º¥¦·|³Q¬Ý°µ¤@­ÓÀɮרåΠtest -e ³o­Ó©R¥O¨Ó´ú¸Õ¨ä¬O§_¦s¦b¡F §_«h´N»{¬°¬O¥i°õ¦æÀɨåΠwhich -s ¨Ó¨M©wµ{¦¡¬O§_¦b¨Ï¥ÎªÌªº·j´M¸ô®|¸Ì¡C

¨Ò¦p¡A

    RUN_DEPENDS=   ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
                   wish8.0:${PORTSDIR}/x11-toolkits/tk80

·|Àˬd /usr/local/etc/innd ³o­ÓÀɮשΥؿý¬O§_¦s¦b¡A¦pªG§ä¤£¨ì´N·|¥h port tree ªº¤l¥Ø¿ý news/inn §â¥¦«Ø¥ß¨Ã¸Ë¦n¡C ¥¦¤]·|¬Ý¦b·j´M¸ô®|¸Ì¬O§_¦³­Ó¥s wish8.0 ªº¥i°õ¦æÀÉ¡A¨S§ä¨ìªº¸Ü´N¨ì port tree ªº¤l¥Ø¿ý x11-toolkits/tk80 ¸Ì«Ø¥ß¨Ã¦w¸Ë¦n¡C

Note: ¦b³o¸Ì innd ¹ê»Ú¤W¬O­Ó¥i°õ¦æÀÉ¡F ¦pªG¤@­Ó¥i°õ¦æÀÉ©Ò¦b¥Ø¿ý¨Ã¤£¬O¤@¯ë¨Ï¥ÎªÌªº·j´M¸ô®|¡A ¨º´NÀ³¸Ó¥Î§¹¾ãªº¸ô®|ªí¥Ü¡C

Dependency ·|¦b install ªº¼Ðªº¸ÌÀˬd¡C¦P¼Ë¦a¡Adependency ªº¦WºÙ¤]­n©ñ¨ì package ¸Ì¡A ³o¼Ë·í¨Ï¥ÎªÌªº¨t²Î¨S¦³®É pkg_add ³o­Ó©R¥O«K·|¦Û°Ê¦w¸Ë¥¦¡C¦pªG target ªº³¡¥÷©M DEPENDS_TARGET ¬Û¦P«h¥i¬Ù²¤¡C

4.4.4.8.3. BUILD_DEPENDS

³o­ÓÅܼƸԭz¤F³o­Ó port ½sĶ®É»Ý­nªº°õ¦æÀÉ©ÎÀɮסC ´N¸ò RUN_DEPENDS ¤@¼Ë¡A¥¦¬O¥Ñ¦h²Õ path:dir[:target] ºc¦¨ªº¦Cªí¡C ¨Ò¦p

     BUILD_DEPENDS=
                  unzip:${PORTSDIR}/archivers/unzip
·|Àˬd¬O§_¦³­Ó°õ¦æÀÉ unzip¡A ¨S¦³ªº¸Ü´N¨ì port tree ªº¤l¥Ø¿ý archivers/unzip ¤U«Ø¥ß¨Ã¸Ë¥¦¡C

Note: ¦b³o¸Ì``«Ø¥ß''«ü±o¬O±q¸ÑÀ£¨ì½sĶ¾ã­Ó¹Lµ{¡C Dependency ·|¦b extract ªº¼Ðªº¸ÌÀˬd¡C °²¦p target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¥H¬Ù²¤¡C

4.4.4.8.4. FETCH_DEPENDS

³o­ÓÅܼƸԭz¦b¨ú±o¸Ó port ®É©Ò»Ýªº°õ¦æÀÉ©ÎÀɮסC ¸ò«e¨â­Ó¤@¼Ë¡A¥¦¤]¬O¥Ñ¦h²Õ path:dir[:target] ²Õ¦¨ªº¦Cªí¡C ¨Ò¦p

     FETCH_DEPENDS=
                  ncftp2:${PORTSDIR}/net/ncftp2
·|Àˬd ncftp2 ³o­Ó°õ¦æÀÉ¡A¨S¦³ªº¸Ü´N¨ì port tree ¤Uªº¤l¥Ø¿ý net/ncftp2 «Ø¥ß¨Ã¦w¸Ë¥¦¡C

Dependency ·|¦b fetch ªº¼Ðªº¸ÌÀˬd¡C°²¦p target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¬Ù²¤¡C

4.4.4.8.5. DEPENDS

¦pªG¦³­Ó dependency ¤£ÄÝ©ó¤W­±¥|ºØ¤§¤@¡A©Î¬O§Aªº port »Ý­n¨ä¥¦ port ¸Ñ¶}ªºµ{¦¡½X¤~¯à¦w¸Ë¡A¨º´N¥Î³o­ÓÅܼƧa¡C ³o¬O¤@¥÷ dir[:target] ªº¦Cªí¡A ¤£¹³«e­±¥|­Ó¡A³o¸Ì¨S¤°»ò¦nÀˬdªº¡C ¦pªG target ªº³¡¥÷¸ò DEPENDS_TARGET ¤@¼Ë«h¥i¬Ù²¤¡C

4.4.4.8.6. ¤@¯ëªº dependency ÅܼÆ

¦pªG port »Ý­n¦³¦w¸Ë X Window System ¤~¯à¦w¸Ë¡A ½Ð©w¸q USE_XLIB=yes(¥¦³Q¥]§t¦b USE_IMAKE¸Ì)¡C°²¦p port »Ý­n GNU make ¥H¨ú¥N BSD make ¡A½Ð©w¸q USE_GMAKE=yes¡C°²¦p port »Ý­n°õ¦æ¨ì GNU autoconf¡A½Ð©w¸q USE_AUTOCONF=yes¡C°²¦p port ­n¥Î³Ì·sªº qt toolkit¡A½Ð©w¸q USE_QT=yes¡C ¦pªG port »Ý­n²Ä¤­ª©ªº perl µ{¦¡»y¨¥¡A¨º´N¥Î USE_PERL5=yes¡C(³Ì«á¤@­Ó³Ì­«­n¡A ¦]¬°¤@¨Çª©¥»ªº FreeBSD §â perl5 §Ë¬°¶§¬Kª©ªº¤@³¡¥÷¡A¦Ó¨ä¥¦ªº¨S¦³¡C)

4.4.4.8.7. Dependency ªºª`·N¨Æ¶µ

¦b«e­±´£¹L¡A·í»Ý­n dependency ®É·|©I¥sªº¹w³]¼Ðªº¬O DEPENDS_TARGET¡C¹w³]­È¬O install¡C³o¬O­Ó¨Ï¥ÎªÌªºÅܼơF¥¦±q¥¼¦b port ªº Makefile ¸Ì©w¸q¡C¦pªG port »Ý­n¯S§Oªº¤èªk¨Ó³B¸Ì dependency¡A¥Î *_DEPENDS ¸Ì :target ªº³¡¥÷¦Ó¤£­n­«·s©w¸q DEPENDS_TARGET¡C

·íÁä¤J make clean«á¡A ¥¦ªº dependency ¤]·|³Q¦Û°Ê²M°£¡C¦pªG¤£·Q²M°£ªº¸Ü¡A ¥i¥H³]©wÀô¹ÒÅÜ¼Æ NOCLEANDEPENDS¡C

­nµL±ø¥ó¦a¨Ì¿à¨ä¥¦ port¡A·ÓºD¨Ò¬O¥H¦r¦ê nonexistent ¬° BUILD_DEPENDS ©Î RUN_DEPENDS ªº²Ä¤@­ÓÄæ¦ì¡C¥u¦³·í»Ý­n¨ä¥¦ port ªºµ{¦¡½X®É¤~³o»ò°µ¡C¤]¥i¥H¸g±`¥Î³o­Ó¼Ðªº¨Ó¬Ù¤U½sĶªº®É¶¡¡C ¨Ò¦p

    BUILD_DEPENDS=   /nonexistent:${PORTSDIR}/graphics/jpeg:extract
¨C¦¸³£·|¨ì JPEG ³o­Ó port ¸Ì¨Ã¸Ñ¶}¥¦¡C

°£«D¨S¦³§Oªº¿ìªk¥i¥H§¹¦¨©Ò·Q­nªí²{ªº¡A§_«h§O¥Î DEPENDS¡C¥¦·|¨Ï±o¨ä¥¦ port ¨C¦¸³£³Q½sĶ( ÁÙ¦³¦w¸Ë¡A·Ó¹w³]­Èªº¸Ü)¡A¦Ó¥B dependency ¤]·|¶i¨ì package ¸Ì¡C ¦pªG¯uªº»Ý­n¡A«Øij§A¼g¦¨ BUILD_DEPENDS ©M RUN_DEPENDS ¥N´À -- ¦Ü¤Ö³o¼Ë¥Øªº¸û²M·¡¡C

4.4.4.9. «Ø¥ßªº¾÷¨î

¦pªG package ­n¥Î¨ì GNU make¡A³]©w USE_GMAKE=yes¡C¦pªG package ­n¥Î¨ì configure¡A³]©w HAS_CONFIGURE=yes¡C¦pªG package ­n¥Î¨ì GNU configure¡A³]©w GNU_CONFIGURE=yes (³o¥]§t HAS_CONFIGURE)¡C¦pªG­n¹ï configure ¤U¤@¨ÇÃB¥~ªº°Ñ¼Æ(¹ï GNU configure ¹w³]°Ñ¼Æ¬° --prefix=${PREFIX}¡A«D GNU configure «hµL)¡A§â³o¨ÇÃB¥~ªº°Ñ¼Æ³]¦b CONFIGURE_ARGS ¸Ì¡C¦pªG package ­n¥Î¨ì GNU autoconf¡A³]©w USE_AUTOCONF=yes¡C³o¥]§t¤F GNU_CONFIGURE¡A¦Ó¥B·|¨Ï autoconf ¦b configure ¤§«e°õ¦æ¡C

¦pªG package ¬O¥Î imake ±q Imakefiles ²£¥Í Makefiles ªº X À³¥Îµ{¦¡¡A´N³]©w USE_IMAKE=yes¡C ³o¼Ë·|¨Ï configure ªº¶¥¬q¦Û°Ê°µ xmkmf -a¡C ¦pªG -a ³o­ÓºX¼Ð·|¹ï port ³y¦¨°ÝÃD¡A´N³]¦¨ XMKMF=xmkmf¡C¦pªG port ¥Îimake ³o­Ó©R¥O«o¤S»{¤£±o install.man ³o­Ó«ü¼Ð¡A ¨º´NÀ³¸Ó³] NO_INSTALL_MANPAGES=yes¡CÁÙ¦³¡A ³Ìªìªº port ªº§@ªÌ¦W¦rÀ³¸Ó³Q°O¤W¤@µ§¡C :->

¦pªG port ªºµ{¦¡½X¸Ìªº Makefile ¥H all ¥H¥~ªº¼Ðªº§@¬°¥D­nªº«Ø¥ß¼Ðªº¡A ¨º´N³]¦¨ ALL_TARGET¡C¦P¼Ëªº¹D²z¤]¾A¥Î¦b install ©M INSTALL_TARGET¡C

4.4.5. ¯S®í¦Ò¶q

ÁÙ¦³¤@¨Ç¨Æ¶µ¬O³Ð³y¤@­Ó·s port ®É©Ò­n¦Ò¼{ªº¡C ³o­Ó³¹¸`¸ÑÄÀ¤F¤j³¡¥÷ªº¤@¯ë±¡§Î¡C

4.4.5.1. ldconfig

¦pªG port ¦w¸Ë¤F¤@­Ó¦@¨É¨ç¦¡¡A¦b Makefile ¸Ì¥[¤W post-install ³o­Ó¼Ðªº¡A ¤º®e¬°¦b·s¨ç¦¡¦w¸Ëªº¥Ø¿ý¤W(³q±`¬O PREFIX/lib)°õ¦æ ${LDCONFIG} -m ¥H±N¨äµù¥U¶i¦@¨É¨ç¦¡¼È¦s°Ï¸Ì¡C

¦¹¥~¡A¼W¥[¤@¹ï @exec /sbin/ldconfig -m ©M @unexec /sbin/ldconfig -R ªº²Õ¦X¨ìÀÉ®× pkg/PLIST ¸Ì¥H«K¦w¸Ë¦¹ package ªº¨Ï¥ÎªÌ¥i¥H¥ß¨è¶}©l¥Î³o­Ó¨ç¦¡¡A ¦Ó¸Ñ°£¦w¸Ë¤]¤£·|Åý¨t²Î¥H¬°¨ç¦¡ÁÙ¿àµÛ¤£¨«¡C ³o´X¦æÀ³¸Óºò¸ò¦b¼gµÛ¨ç¦¡¦WºÙ¸Ó¦æ«á­±¡A¦p¤U¡G

    lib/libtvl80.so.1
    @exec /sbin/ldconfig -m %D/lib
    @unexec /sbin/ldconfig -R

µ´¹ïµ´¹ï¡A¤d¸U¤£­n¦b Makefile ©Î pkg/PLIST ¸Ì¥[¤W¤@¦æ¨S¦³¥ô¦ó°Ñ¼Æªº ldconfig¡C ³o¼Ë·|¨Ï±o¦@¨É¨ç¦¡¼È¦s°Ï¸Ì­«³]¦¨¥u§t /usr/lib ¸Ìªº¤º®e¡A¦Ó¥B·|¹³¬Ó«Ò¯ë¦a§Ë¶Ã¨Ï¥ÎªÌªº¨t²Î("±Ï©R¡A §Ú¸Ë§¹³o­Ó port «á xinit ´N¦A¤]¤£°Ê¤F")¡C ¥ô¦ó³o»ò°µªº¤H³£·|³Qºj±þ¡A¥Î¥ÍÄ꺤M¤j¤Á 65,536 ¶ô¡A ³Q¤@¸s¯Q¾~§â¨xŦ§è¥X¨ï¸H¡AµM«áÄꦺ¦b¦aº»²`³B¡A¸U§T¤£´_ (¤£¤@©w·|·Ó³o¶¶§Ç¨Ó...)

4.4.6. ELF support

¦Û±q FreeBSD ¦b 3.0-RELEASE «á¥ß¨è§ï¬° ELF binary format¡A §Ú­Ì­n§ó´««Ü¦h«Ø¥ß¦@¨É¨ç¦¡ªº port ¨Ó¤ä´© ELF¡C ½ÆÂøªº¬O 3.0 ¥i¥H¦P®É°õ¦æ ELF ©M a.out¡A ¦Ó¥B§Ú­Ì§Æ±æ«D¥¿¦¡¦a¤ä´© 2.2¡A¶V¤[¶V¦n¡C ¤U­±³o¨Ç«ü¤Þ¦p¦ó§ó´«¥u¤ä´© a.out ªº port ¥H¦P®É¤ä´© a.out ©M ELF¡C

³o¥÷¦Cªíªº¬Y¨Ç³¡¥÷¥u¦³¦bÂà´«¹Lµ{¤¤¤~¾A¥Î¡A ¤£¹L¤´µM¯d¦b³o·í§@°Ñ¦Ò¥H§K§A¹J¨ì·Q­n¤É¯Åªº¦Ñ port¡C

4.4.6.1. §â a.out ªº¨ç¦¡²¾¶}

¥ô¦ó a.out ªº¨ç¦¡³£À³¸Ó²¾¶} /usr/local/lib ¨ì¤@­Ó aout ªº¤l¥Ø¿ý¡C(¦pªG¤£§â¥¦­Ì²¾¨«¡A ELF ports ·|«Ü¼Ö·N§â a.out ªº¨ç¦¡Âмg±¼¡C) ¦b 3.0-CURRENT ªº src/Makefile ¸Ìªº move-aout-libs (±q aout-to-elf ©I¥s)³o­Ó¼Ðªº·|À°§A°µ³o¥ó¨Æ¡C ¥¦¥u·|²¾°Ê a.ou ªº¨ç¦¡¡A©Ò¥H¦b¦P®É¦³ ELF ©M a.out ¨ç¦¡ªº¼Ð·Ç¥Ø¿ý©I¥s¥¦«Ü¦w¥þªº¡C

4.4.6.2. ®æ¦¡

Ports tree ·|¨Ì·Ó¨t²Îªº®æ¦¡¨Ó«Ø¥ß package¡C ªí¥Ü¥Ñ `objformat` ¶Ç¦^ªº­È¨M©w¦b 2.2 ¬O a.out ¦Ó¦b 3.0¬O a.out ©Î ELF¡C¦P¼Ë¦a¡A¤@¥¹¨Ï¥ÎªÌ±N a.out ªº¨ç¦¡²¾¨ì¤@­Ó¤l¥Ø¿ý¤U¡A±N¤£¤ä´©«Ø¥ß a.out ªº¨ç¦¡¡C(´«¥y¸Ü»¡¡A¦pªG§A¯uªºª¾¹D¦b°µ¤°»òªº¸Ü¤´µM¥i¥H¹B§@¡A ¤£¹L±o¾a¦Û¤v¨Ó¡C)

Note: ¦pªG port ¥u¯à¦b a.out Àô¹Ò°õ¦æ¡A§â BROKEN_ELF ³]¬°¤@»¡©ú­ì¦]ªº¦r¦ê¡C ¦b ELF ªº¨t²Î¤W«Ø¥ß port ®É·|§â³oÃþªº¸õ¹L¥h¡C

4.4.6.3. PORTOBJFORMAT

bsd.port.mk ·|§â PORTOBJFORMAT ³]¬° aout ©Î elf ¨Ã±N¥¦¿é¥X¨ìÀô¹ÒÅÜ¼Æ CONFIGURE_ENV¡ASCRIPTS_ENV ©M MAKE_ENV¡C(¦b 2.2-STABLE ¸Ì¥Ã»·¬O aout)¡C¥¦¤]·|³Q¥H PORTOBJFORMAT=${PORTOBJFORMAT} ¶Ç¤J PLIST_SUB¡C (¬Ý¤U­±´X¦æ ldconfig ªº»¡©ú¡C)

³o­ÓÅܼƳ]©w¨Ï¥Î bsd.port.mk ¸Ì³o¦æ¡G

    PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout

Ports ªº make µ{§ÇÀ³¸Ó¥Î³o­ÓÅܼƨӨM©w¸Ó°µ¤°»ò¡C µM¦Ó¡A°²¦p port ªº configure script ¤w¸g¦Û°Ê¬d¥X¬° ELF ªº¨t²Î¡A¨º´N¨S¦³¥²­n°Ñ·Ó PORTOBJFORMAT¡C

4.4.6.4. «Ø¥ß¦@¨É¨ç¦¡

±µ¤U¨Óªº¦b¬° a.out ©M ELF ªº¨t²Î³B²z¦@¨É¨ç¦¡ªº³¡¥÷¦³«Ü¦h¤£¦P¡C

  • ¦@¨É¨ç¦¡ªºª©¥»

    ¤@­Ó ELF ªº¦@¨É¨ç¦¡À³¸Ó¦W¬° libfoo.so.M¡A M ¬O­Ó³æ¤@ªºª©¥»½s¸¹¡A¦Ó a.out ªº¦@¨É¨ç¦¡À³¸Ó¦W¬° libfoo.so.M.N¡A M ¬O¥Dª©¥»½s¸¹¦Ó N ¬O¦¸ª©¥»½s¸¹¡C§O§â¥¦­Ì·d²V¤F¡F ¤d¸U¤£­n¦w¸Ë¤@­Ó¥s°µ libfoo.so.N.M ªº ELF ¦@¨É¨ç¦¡¡A©Î¬O¥s°µ libfoo.so.N ªº a.out ¦@¨É¨ç¦¡(©Î¬O²Å¸¹³sµ²)¡C

  • ³sµ²¾¹(linker)ªº©R¥O¦C

    °²³] cc -shared ¤ñ ld ¥Î°_¨Ó§óª½±µ¡A¨º°ß¤@¤£¦Pªº¦a¤è´N¬O¦b ELF ¨t²Îªº©R¥O¦C­n¥[¤W -Wl,-soname,libfoo.so.M¡C

Áٻݭn¦w¸Ë¤@­Ó²Å¸¹³sµ²(symlink)±q libfoo.so ¨ì libfoo.so.N Åý ELF ªº³sµ²¾¹§Ö¼ÖÂI¡C¦]¬°¥¦¤]À³¸Ó¦C¦b PLIST ¸Ì¡A¦Ó¥B¦b a.out ªº±¡ªp¤U¤]¤£·|³y¦¨¶Ë®`(¦³¨Ç port ¬Æ¦Ü°ÊºA¸ü¤J®É¤´»Ý­n­Ó³sµ²)¡A§A¥u¶·­n°µ­Ó³sµ²¦Ó¤£¥²ºÞ PORTOBJFORMAT ªº³]©w¡C

4.4.6.5. LIB_DEPENDS

LIB_DEPENDS ¸Ìªº¦¸½s¸¹À³¸Ó±q©Ò¦³ port ªº Makefiles ²¾°£¡A¤]­n²¾°£©Ò¦³ regexp ªº¤ä´©¡C (¨Ò¦p¡Afoo\\.1\\.\\(33|40\\) Åܦ¨ foo.2¡C)¥i¥H¥Î grep -wF §â¥¦­Ì§ä¥X¨Ó¡C

4.4.6.6. PLIST

°²¦p a.out ªº¥D½s¸¹¬O 0 «h PLIST À³¸Ó¥]§tµuªº(ELF)¦@¨É¨ç¦¡¦WºÙ¡A¤Ï¤§«h¬°ªøªº(a.out)¦@¨É¨ç¦¡¦WºÙ¡C bsd.port.mk ·|¦b·í PORTOBJFORMAT µ¥©ó aout ®É¦Û°Ê©óµuªº¦@¨É¨ç¦¡¸Ó¦æ«á¥[¤W .0¡A¦Ó·í PORTOBJFORMAT µ¥©ó elf ®É§R¥hªøªº¦@¨É¨ç¦¡¤§¦¸½s¸¹¡C

¸U¤@§A¯uªº¥²¶·¦b ELF ªº¨t²Î¤W¦w¸Ë¨â­Óª©¥»ªº¦@¨É¨ç¦¡¡A ©Î¬O­n¦b a.out ªº¨t²Î¦w¸Ë¤@­Óª©¥»(¨Ò¦p¦w¸Ë¨ä¥¦ªº§@·~¨t²Îªº¬Û®e¨ç¦¡ªº port)¡A´N³]©wÅÜ¼Æ NO_FILTER_SHLIBS¡C ³o¼Ë·|Ãö±¼¤W¤@¬q¸Ì©Ò´£¨ì¹ï PLIST ½s¿è¡C

4.4.6.7. ldconfig

ldconfig ¨º¦æ¦b Makefiles ¸ÌÀ³¸ÓŪ¨ú¡G

    ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ....

¦b PLIST ¸ÌÀ³¸ÓŪ¨ú¡G

    @exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m ...
    @unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R

³o¬O¥Î¨Ó½T©w¥¿½Tªº ldconfig ªº©I¥s¬O¨M©w¦b package ªº®æ¦¡¦Ó¤£¬O¨t²Îªº¹w³]®æ¦¡¡G

4.4.7. MASTERDIR

¦pªG port »Ý­nÂÇÅܼƭȪº¤£¦P¨Ó«Ø¥ßµy·L¤£¦Pª©¥»ªº package (¨Ò¦p¡Aresolution ©Î paper size)¡A´N´À¨C­Ó package ¶}­Ó¤l¥Ø¿ýÅý¨Ï¥ÎªÌ§ó®e©öª¾¹D¸Ó°µ¤°»ò¡A¤£¹L¾¨¶qÅý¦U­Ó port ¤§¶¡¦@¥Î ªºÀɮ׶V¦h¶V¦n¡C¦pªG§A«Ü¥©§®¦a¹B¥ÎÅܼơA ¨º´X¥G¥u¶·­n¦b¨ä¤¤¤@­Ó¥Ø¿ý©ñ­Ó²µuªº Makefile «K¥i¡C¦b³o¨Ç³æ¤@ªº Makefiles¡A¥i¥H¥Î MASTERDIR ¨Ó»¡©ú¨ä¥¦ªºÀɮצb­þ­Ó¥Ø¿ý¡C ¦P¼Ë¦a¡A¨Ï¥Î¤@­ÓÅܼưµ¬° PKGNAME ªº¤@³¡¥÷¡AÅý¨C­Ó package ¾Ö¦³¤£¦Pªº¦WºÙ¡C

¤@­Ó¨Ò¤l¬O³Ì¨Îªº»¡©ú¡C³o¬O japanese/xdvi300/Makefile ªº¤@³¡¥÷¡F

    PKGNAME=       ja-xdvi${RESOLUTION}-17
     :
    # default
    RESOLUTION?=   300
    .if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
           ${RESOLUTION} != 300 && ${RESOLUTION} != 400
           @${ECHO} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
           @${ECHO} "Possible values are: 118, 240, 300 (default) and 400."
           @${FALSE}
    .endif

japanese/xdvi300 ¤]¦³©Ò¦³¥¿¦¡ªº patch¡A package ÀÉ®×....µ¥µ¥¡C¦pªG¦b¦¹Áä¤J make¡A ¥¦·|¨ú¥Î¹w³]­È°µ¬° resolution ªº­È(300)¨Ã·Ó¤@¯ë±¡§Î«Ø¥ß port¡C

¹ï¨ä¥¦ resolution ¨Ó»¡¡A³o¬O§¹¾ãªº xdvi118/Makefile¡G

    RESOLUTION=     118
    MASTERDIR=      ${.CURDIR}/../xdvi300
    
    .include ${MASTERDIR}/Makefile

(xdvi240/Makefile ©M xdvi400/Makefile ®t¤£¦h)¡C MASTERDIR ªº©w¸q§i¶D bsd.port.mk »¡ PATCHDIR ©M PKGDIR ³oÃþ¥¿¦¡ªº¤l¥Ø¿ýªº³]©w¦b xdvi300 ¤U­±¡CRESOLUTION=118 ³o¦æ·|»\±¼ xdvi300/Makefile ¸Ìªº RESOLUTION=300¡A¦Ó port ·|¥H resolution ¬° 118 ¨Ó«Ø¥ß¡C

4.4.8. ¦@¨É¨ç¦¡ªºª©¥»

­º¥ý¡A½Ð¥ýŪŪ¦@¨É¨ç¦¡ª©¥»ªº¬Fµ¦ ¥H¤F¸Ñ¤@¯ë¦p¦ó¨M©w¦@¨É¨ç¦¡ªºª©¥»¡C¤£­nª¼¥Ø¦a¥H¬°³nÅé§@ªÌª¾¹D¥L­Ì¦b°µ¤°»ò¡F «Ü¦h³£¤£ª¾¹D¡CÂÔ·V¦a¦Ò¼{³o¨Ç²Ó¸`¬O«Ü­«­nªº¡A ¦]¬°§Ú­Ì¸ÕµÛÅý¤@°ï¥i¯à¤£¬Û®eªº³nÅé¤@°_¦s¦b¡A³o¬O¬Û·í¿W¯Sªº±¡ªp¡C ¦b¥H«e²Ê¤ßªº port ´¿¸g¦b¦@¨É¨ç¦¡ªº»{©w¤W³y¦¨«Ü¤jªº§xÂZ¡C (¦³¨S¦³·Q¹L¬°¤°»ò jpeg-6b ªº¦@¨É¨ç¦¡ª©¥»¬O 9.0¡H)¡C¤£«Hªº¸Ü´N¨ì FreeBSD ports mailing list °Ý°Ý¡C¤j³¡¥÷ªº®É­Ô¡A §Aªº¤u§@³Ì«á´N¬O¨M©w¦@¨É¨ç¦¡ªºª©¥»©M°µ¥X¾A·íªº patch ¨Ó°µ³o¥ó¨Æ¡C

µM¦Ó¡A¦pªG¦³­Ó port ¸ò port tree ¸Ì¦P¤@³nÅ骺ª©¥»¤£¦Pªº¸Ü¡A ¨º´N§ó½ÆÂø¤F¡C²³æªº»¡¡AFreeBSD ªº¹ê¦æ¨Ã¤£¤¹³\¨Ï¥ÎªÌ«ü©w³sµ²¾¹³sµ²­þ¤@ª©¥»ªº¦@¨É¨ç¦¡ (³sµ²¾¹¥Ã»·³£¬D¿ï½s¸¹³Ì°ªªºª©¥»)¡C³oªí¥Ü°²¦p¨t²Î¸Ì¦³ libfoo.so.3.2 ©M libfoo.so.4.0¡A ´N¨S¦³¿ìªk¥s³sµ²¾¹³sµ²­Ó§OªºÀ³¥Îµ{¦¡¨ì libfoo.so.3.2¡CIt is essentially completely overshadowed in terms of compilation-time linkage.¦b³o±¡§Î¤U¡A °ß¤@ªº¸Ñ¨M¿ìªk´N¬O§ó§ï¦@¨É¨ç¦¡°ò¦³¡¥÷ªº¦WºÙ¡C ¨Ò¦p¡A§â libfoo.so.4.0 §ï¦¨ libfoo4.so.1.0 ³o¼Ë 3.2 ©M 4.0 ªºª©¥»«K³£¥i¥H±q¨ä¥¦ port ³sµ²¡C

4.4.9. Manpages

MAN[1-9LN] ³o¨ÇÅܼƷ|¦Û°Ê§â¥ô¦ó manpage ¥[¶i pkg/PLIST (³oªí¥Üµ´¤£­n §â manpage ¦C¦b PLIST ¸Ì -- generating PLIST ¦³§ó¦h®Æ)¡C ¦b¦w¸Ëªº¶¥¬q¬O§_·|À£ÁY manpage ¨M©w©ó /etc/make.conf ¸Ì¬O§_¦³³]©w NOMANCOMPRESS¡C

¦pªG­n¥Î²Å¸¹³sµ²(symlink)©Î¹êÅé³sµ²(hardlink)¬° manpage ¦w¸Ë¦h­Ó¦WºÙ¡A«hÀ³¸Ó¥Î MLINKS ³o­ÓÅܼƨӽT»{¡C Port ©Ò¦w¸Ëªº³sµ²·|³Q bsd.port.mk ·´±¼©Î­«·s³Ð³y¥H½T©w¥¦«ü¦V¥¿½TªºÀɮסC¥ô¦ó¦C¦b MLINKS ªº manpage µ´¤£¥i¦C¦b PLIST ¸Ì¡C

­n«ü©w manpage ¬O§_¦b¦w¸Ë®ÉÀ£ÁY¥i¥ÎÅÜ¼Æ MANCOMPRESSED¡C³o­ÓÅܼƦ³¤T­Ó­È¥i¥Î¡A yes¡Ano ©M maybe¡Cyes ªí¥Ü manpages ¤w¸g¥HÀ£ÁY¹Lªº§Î¦¡¦w¸Ë¡Ano ªí¥Ü¨S¦³À£ÁY¡A ¦Ó maybe ªí¥Ü¦­¤w¿í¦u NOMANCOMPRESS ªº­È¡A©Ò¥H bsd.port.mk ¨Ã¤£»Ý­n°µ¤°»ò¯S§Oªº¨Æ¤F¡C

°²¦p³]©w¤F USE_IMAKE ¦Ó¥B¨S¦³³]©w NO_INSTALL_MANPAGES¡A«h MANCOMPRESSED ·|¦Û°Ê³]¬° yes¡A ¤Ï¤§«h³]¬° no¡C¨S¦³¥²­n©ú½T¦a©w¸q¥¦¡A °£«D¹w³]­È¤£¾A¦X§Aªº port¡C

¦pªG§Aªº port ªº¥D­n¾ðª¬µ²ºc¦ì©ó PREFIX ¥H¥~¡A¥i¥H¥Î MANPREFIX ¨Ó³]©w¡C ¦P¼Ë¦a¡A¦pªG¥u¦³¯S©w³¹¸`ªº manpages ¦b¤£¼Ð·Çªº¦a¤è¡A ¨Ò¦p¤@¨Ç Perl ¼Ò²Õ(module)ªº port¡A¥i¥H§Q¥Î MANsectPREFIX (sect ¬O 1-9¡A L ©Î N ¨ä¤¤¤§¤@) ¨Ó³]©w­Ó§Oªº¥D­n¸ô®|¡C

¦pªG manpages ¸Ë¦b«ü©w»y¨¥ªº¤l¥Ø¿ý¡A §â MANLANG ³]¬°¸Ó»y¨¥ªº¦WºÙ¡C ³o­ÓÅܼƪº¹w³]­È¬O "" (¤]´N¬O¥u¦³­^¤å)¡C

³o­Ó¨Ò¤l§â¤W­±»¡ªº³£©ñ¤@°_¤F¡C

    MAN1=          foo.1
    MAN3=          bar.3
    MAN4=          baz.4
    MLINKS=        foo.1 alt-name.8
    MANLANG=       "" ja
    MAN3PREFIX=    ${PREFIX}/share/foobar
    MANCOMPRESSED= yes

³oªí¥Ü³o­Ó port ¸Ë¤F¤»­ÓÀɮסF

    ${PREFIX}/man/man1/foo.1.gz
    ${PREFIX}/man/ja/man1/foo.1.gz
    ${PREFIX}/share/foobar/man/man3/bar.3.gz
    ${PREFIX}/share/foobar/man/ja/man3/bar.3.gz
    ${PREFIX}/man/man4/baz.4.gz
    ${PREFIX}/man/ja/man4/baz.4.gz

ªþ¥[ªº ${PREFIX}/man/man8/alt-name.8.gz ¥i¯à·|¤]¥i¯à¤£·|³Q port ¦w¸Ë¡CµL½×¦p¦ó¡A foo(1) manpage ©M alt-name(8) manpage ·|¥Î¤@­Ó²Å¸¹³sµ²(symlink)±µ°_¨Ó¡C

4.4.10. »Ý­n Motif ªº ports

¦³«Ü¦hµ{¦¡»Ý­n Motif ªº¨ç¦¡(¥i¥H±q¤@¨Ç°Ó·~©Êªº¼t°Ó¨ú±o¡A ÁöµM¦³³ø¾É«ü¥X«Ü¦hÀ³¥Îµ{¦¡¤]¥i¥H¥Î§K¿úªº§Ï»s³nÅé x11-toolkits/lesstif ¨Ó°õ¦æ)¨Ó½sĶ¡C ¦]¬°³o¬O­Ó«Ü´¶¤Îªº toolkit ¦Ó¥B¥¦ªº±ÂÅv³q±`¤¹³\¨Ï¥ÎªÌ­«Âд²§GÀRºA³sµ²ªº binary¡A§Ú­Ì¬°³B²z»Ý­n Motif ªº port °µ¤F¨Ç·Ç³Æ¡A´N¬YÆ[ÂI¦Ó¨¥¡A ³o¼Ë¤£½×¬O°ÊºA(¬°¤F¨º¨Ç±q port ½sĶªº¤H)©Î¬OÀRºA(¬°¤F´²§G package ªº¤H) ³sµ²ªº binary ³£¥i¥H®e©ö¦a½sĶ¡C

4.4.10.1. REQUIRES_MOTIF

¦pªG port »Ý­n Motif¡A¦b Makefile ¸Ì©w¸q³o­ÓÅܼơC³o¼Ë¥i¥H¨¾¤î¨S¦³ Motif ªº¤H¸Õ¹Ï¥h½sĶ¥¦¡C

4.4.10.2. MOTIFLIB

³o­ÓÅܼƦb bsd.port.mk ³]©w¡A ¥Î¨Ó¾A·íªº°Ñ¦Ò Motif ªº¨ç¦¡¡C¤£½× Motif ªº¨ç¦¡¬O¦b Makefile ©Î Imakefile ¸Ì³Q°Ñ¦Ò¡A½Ð patch µ{¦¡½X¥H¨Ï¥Î³o­ÓÅܼơC

¦³¨âºØ¤@¯ëªº±¡ªp¡G

  • ¦pªG port ¦b¥¦ªº Makefile ©Î Imakefile ¥H -lXm ¨Ó°Ñ¦Ò Motif ªº¨ç¦¡¡A¥u­n§â¥¦´«¦¨ ${MOTIFLIB}¡C

  • ¦pªG port ¦b¥¦ªº Imakefile ¥Î XmClientLibs¡A§â¥¦§ï¦¨ ${MOTIFLIB} ${XTOOLLIB} ${XLIB}¡C

ª`·N MOTIFLIB (³q±`)®i¶}¦¨ -L/usr/X11R6/lib -lXm ©Î /usr/X11R6/lib/libXm.a¡A©Ò¥H¨S¦³¥²­n¦b«e­±¥[¤W -L ©Î -l¡C

4.4.11. X11 ªº¦r«¬

¦pªG port ·|¬° X Window system ¦w¸Ë¦r«¬¡A§â¦r«¬©ñ¨ì X11BASE/lib/X11/fonts/local ¸Ì¡C ³o­Ó¥Ø¿ý¬O XFree86 release 3.3.3 ·s¦³ªº¡C¦pªG¤£¦s¦bªº¸Ü½Ð¶}¤@­Ó¡A ¨Ã¦L¥X¤@­Ó°T®§¶Ê«P¨Ï¥ÎªÌ¤É¯Å¥L­Ìªº XFree86 ¨ì 3.3.3 ©Î§ó·sªº¡A ©ÎªÌ¦Ü¤Ö§â³o­Ó¥Ø¿ý¥[¶i /etc/XF86Config ¸Ìªº¦r«¬¸ô®|¡C

4.4.12. Info ÀÉ

·sª©ªº texinfo (¥]¬A¦b 2.2.2-RELEASE ©M¤§«áªº) ¥]§t¤@­Ó¹ê¥Îªºµ{¦¡¥s°µ install-info¡A ¥Î¨Ó¼W¥[©Î§R°£°O¿ý¨ì dir ¸Ì¡C¦pªG port ¦w¸Ë¥ô¦óªº info ¤å¥ó¡A½Ð¸òµÛ³o¨Ç«ü¤Þ¡A³o¼Ë port/package ¤~·|¥¿½T¦a§ó·s¨Ï¥ÎªÌªº PREFIX/info/dir ÀɮסC (©êºp³o¤@³¹³o»òªø¡A¤£¹L§â©Ò¦³ªº info ÀÉ®×½s¦b¤@°_¬O¥²­nªº¡C ¦pªG°µªº¥¿½T±N·|²£¥Í¤@­Óº}«Gªº¦Cªí¡A ©Ò¥H½Ð¸ò§Ú¤@°_§Ô§a¡I

­º¥ý¡A³o¬O§A(¨­¬°¤@­Ó porter)±oª¾¹Dªº

    % install-info --help
    install-info [OPTION]... [INFO-FILE [DIR-FILE]]
      Install INFO-FILE in the Info directory file DIR-FILE.
    
    Options:
    --delete          Delete existing entries in INFO-FILE;
                        don't insert any new entries.
     :
    --entry=TEXT      Insert TEXT as an Info directory entry.
     :
    --section=SEC     Put this file's entries in section SEC of the directory. :

Note: ³o­Óµ{¬O¨Ã¤£·|¯uªº¦w¸Ë info ÀɮסF ¥¦¥u¬O¦b dir Àɸ̴¡¤J©Î§R°£°O¿ý¡C

³o¸Ì¦³¤C­Ó¨BÆJªºµ{§Ç¥Î¨Ó§ó´« port ¨Ó¨Ï¥Î install-info¡C§Ú·|¥Î editors/emacs ·í¨Ò¤l¡C

  1. À˵ø texinfo µ{¦¡½X¨Ã°µ­Ó patch ¨Ó§â @dircategory ©M @direntry ¥[¶i¨S¦³³o¨â­Ó±Ô­zªºÀɮסC³o¬O§Úªº patch ªº¤@³¡¥÷¡G

        --- ./man/vip.texi.org  Fri Jun 16 15:31:11 1995
        +++ ./man/vip.texi      Tue May 20 01:28:33 1997
        @@ -2,6 +2,10 @@
                     
         @setfilename ../info/vip
         @settitle VIP
        +@dircategory The Emacs editor and associated tools
        +@direntry
        +* VIP: (vip).          A VI-emulation for Emacs.
        +@end direntry
                     
         @iftex
         @finalout
         :

    ³o®æ¦¡À³¸Ó¬O¤@¬Ý´NÀ´ªº¡C«Ü¦h§@ªÌ§â dir Àɯd¦b source tree ¸Ì¡A¸ÓÀÉ¥]§t©Ò¦³©Ò»Ýªº°O¿ý¡A ©Ò¥H¦b­n¼g¤@­Ó¦Û¤vªºÀÉ«e¥ý¯d·N¤@¤U¡C¦P¼Ë¦a¡A½T©w¦³¬d¬Ý¬ÛÃöªº ports ¨ÃÅý³¹¸`ªº¦WºÙ©M°O¿ý¤@­P(§Ú­Ì«Øij©Ò¦³°O¿ýªº¥¿¤å±q²Ä¥|­Ó tab °±¤îªº¦a¤è¶}©l)¡C

    Note: ­nª`·N¨C­ÓÀÉ®×¥u¯à¦³¤@µ§ info °O¿ý¦]¬° install-info --delete ªº¤@­Ó¿ù»~¾É­P¦pªG ªº³¡¥÷¦³¦h­Ó°O¿ý¤]¥u·|¬å±¼²Ä¤@­Ó¡C

    ¥i¥H§â dir ªº°O¿ýµ¹ install-info ·í°Ñ¼Æ¥Î (--section ©M --entry) ¥H¨ú¥N patch texinfo ­ì©l½X¡C§Ú¤£»{¬°³o¹ï port ¨Ó»¡¬O¦n¤èªk¡A ¦]¬°³o¼Ë¥²¶·§â¦P¼ËªºªF¦è½Æ»s¨ì¤T­Ó¦a¤è (Makefile ©M PLIST ªº @exec/@unexec¡F ¬Ý¤U­±)¡C¥i¬O¦pªG¦³¤é¤åªº(©Î¬O¨ä¥¦Âù¦ì¤¸½s½Xªº) info ÀÉ¡A ³o¼Ë install-info ¥²¶·¥ÎÃB¥~ªº°Ñ¼Æ¡A ¦]¬° makeinfo ¤£¯à³B²z¨º¨Ç texinfo µ{¦¡½X¡C (®³ japanese/skk ªº Makefile ©M PLIST ·í¨Ò¤l¬Ý¬Ý«ç»ò°µ)¡C

  2. ¦^¨ì port ªº¥Ø¿ý°õ¦æ make clean; make ¨Ã½T»{ info Àɤw¸g±q texinfo µ{¦¡½X­«·s²£¥Í¡C ¬JµM texinfo µ{¦¡½X¤ñ info ÀÉÁÙ·s¡A·íÁä¤J make ®É´NÀ³¸Ó³Q­«·s«Ø¥ß¡F¤£¹L«Ü¦h Makefiles ¨Ã¨S¦³¬° info ÀÉ¥]§t¥¿½Tªº dependency¡C¦b emacs ªº±¡ªp¡A«K¥²¶· patch ¥D­nªºMakefile.in ³o¼Ë¥¦¤~·|©¹¤U¨ì man ªº¤l¥Ø¿ý­«·s«Ø¥ß info¡C

        --- ./Makefile.in.org   Mon Aug 19 21:12:19 1996
        +++ ./Makefile.in       Tue Apr 15 00:15:28 1997
        @@ -184,7 +184,7 @@
         # Subdirectories to make recursively.  `lisp' is not included
         # because the compiled lisp files are part of the distribution
         # and you cannot remake them without installing Emacs first.
        -SUBDIR = lib-src src
        +SUBDIR = lib-src src man
         
         # The makefiles of the directories in $SUBDIR.
         SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile src/Makefile oldXMenu/Makefile
         lwlib/Makefile
        --- ./man/Makefile.in.org       Thu Jun 27 15:27:19 1996
        +++ ./man/Makefile.in   Tue Apr 15 00:29:52 1997
        @@ -66,6 +66,7 @@
         ${srcdir}/gnu1.texi \
         ${srcdir}/glossary.texi
                     
        +all: info
         info: $(INFO_TARGETS)
                     
         dvi: $(DVI_TARGETS)

    ²Ä¤G¶ô(hunk)¬O¥²­nªº¦]¬°¤l¥Ø¿ý man ¹w³]ªº¼Ðªº¥s°µ info¡A¦Ó¥D­nªº Makefile ·|©I¥s all¡C §Ú¤]§R°£¤F info Àɪº¦w¸Ë¦]¬° /usr/share/info ¸Ì¤w¸g¦³¤@­Ó¦P¦WªºÀÉ®× (¨º­Ó patch ¨S¦³¦b³o¨q¥X¨Ó)¡C

  3. ¦pªG Makefile ¸Ì¦³­Ó¦a¤è·|¦w¸Ë dir ÀÉ¡A¬å¤F¥¦¡C§Aªº port ¥i¯à¤£·|»ò³o°µ¡C ¦P¼Ë¦a¡A§R¥h¥ô¦ó¥H§Oªº¤è¦¡§Ëż dir Àɪº©R¥O¡C

        --- ./Makefile.in.org   Mon Aug 19 21:12:19 1996
        +++ ./Makefile.in       Mon Apr 14 23:38:07 1997
        @@ -368,14 +368,8 @@
                if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
                then \
                  (cd ${infodir};  \
        -          if [ -f dir ]; then \
        -            if [ ! -f dir.old ]; then mv -f dir dir.old; \
        -            else mv -f dir dir.bak; fi; \
        -          fi; \
                   cd ${srcdir}/info ; \
        -          (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir); 
        \
        -          (cd $${thisdir}; chmod a+r ${infodir}/dir); \
                   for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* sc* vip*; do \
                     (cd $${thisdir}; \
                      ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \
                      chmod a+r ${infodir}/$$f); \
  4. (³o­Ó¨BÆJ¥u¦³¦b­×§ï¤@­Ó²{¦sªº port ®É¤~»Ý­n¡C) ¬Ý¤@¤U pkg/PLIST ¨Ã§R¥h¥ô¦ó¸ÕµÛ­×§ï info/dir ªº³¡¥÷¡C ¥i¯à¦b pkg/INSTALL ©Î¨ä¥¦Àɮ׸̡A ©Ò¥H¤j³W¼Ò¦a·j¯Á§a¡C

        Index: pkg/PLIST
        ===================================================================
        RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v
        retrieving revision 1.15
        diff -u -r1.15 PLIST
        --- PLIST       1997/03/04 08:04:00     1.15
        +++ PLIST       1997/04/15 06:32:12
        @@ -15,9 +15,6 @@
         man/man1/emacs.1.gz
         man/man1/etags.1.gz
         man/man1/ctags.1.gz
        -@unexec cp %D/info/dir %D/info/dir.bak
        -info/dir
        -@unexec cp %D/info/dir.bak %D/info/dir
         info/cl
         info/cl-1
         info/cl-2
  5. ¦b Makefile ¥[¤@­Ó post-install ªº¼Ðªº¨Ó©I¥s ¦ñÀHµÛ­n¦w¸Ëªº info Àɪº install-info¡C (¤£»Ý­n¦A¦Û¤v«Ø¤@­Ó dir ÀɤF¡F·í¥¦¤£¦s¦b®É install-info ·|¦Û°Ê³Ð³y¤@­Ó¡C)

        Index: Makefile
        ===================================================================
        RCS file: /usr/cvs/ports/editors/emacs/Makefile,v
        retrieving revision 1.26
        diff -u -r1.26 Makefile
        --- Makefile    1996/11/19 13:14:40     1.26
        +++ Makefile    1997/05/20 10:25:09     1.28
        @@ -20,5 +20,8 @@
         post-install:
         .for file in emacs-19.34 emacsclient etags ctags b2m
                strip ${PREFIX}/bin/${file}
         .endfor
        +.for info in emacs vip viper forms gnus mh-e cl sc dired-x ediff ccmode
        +       install-info ${PREFIX}/info/${info} ${PREFIX}/info/dir
        +.endfor
                     
         .include <bsd.port.mk>
  6. ½s¿è PLIST ¨Ã¥[¤Wµ¥®Äªº @exec ±Ô­zÁÙ¦³¦]À³ pkg_delete ªº @unexec¡C

        Index: pkg/PLIST
        ===================================================================
        RCS file: /usr/cvs/ports/editors/emacs/pkg/PLIST,v
        retrieving revision 1.15
        diff -u -r1.15 PLIST
        --- PLIST       1997/03/04 08:04:00     1.15
        +++ PLIST       1997/05/20 10:25:12     1.17
        @@ -16,7 +14,14 @@
         man/man1/etags.1.gz
         man/man1/ctags.1.gz
        +@unexec install-info --delete %D/info/emacs %D/info/dir
         :
        +@unexec install-info --delete %D/info/ccmode %D/info/dir
         info/cl
         info/cl-1
        @@ -87,6 +94,18 @@
         info/viper-3
         info/viper-4
        +@exec install-info %D/info/emacs %D/info/dir
         :
        +@exec install-info %D/info/ccmode %D/info/dir
         libexec/emacs/19.34/i386--freebsd/cvtmail
         libexec/emacs/19.34/i386--freebsd/digest-doc

    Note: @unexec install-info --delete ³o­Ó©R¥O ¥²¶·¦C¦b info Àɤ§«e¡A³o¼Ë¤~¥i¥HŪ¨ú³o­ÓÀÉ¡C¦P¼Ë¦a¡A @exec install-info ³o­Ó«ü¥O­n¦b info ÀÉ ©M³Ð³y dir Àɪº©R¥O @exec ¤§«á¡C

  7. ´ú¸Õ¨Ã¸ØÆg§Aªº¦¨ªG§a¡C :-)¡C ¦b¨C­Ó¨BÆJ¶}©l¤§«e©M¤§«áÀˬd dir ÀÉ¡C

4.4.13. ¤l¥Ø¿ý pkg/

³o¦³¤@¨Ç¦³Ãö pkg/ ¦Ó§Ú­Ì¥¼´¿´£¤Îªº¤p§Þ¥©¡A ¦³®É«á¥¦­Ì¤]·|¬£¤W¥Î³õ¡C

4.4.13.1. MESSAGE

¦pªG­n¹ï¦w¸Ëªº¤HÅã¥Ü°T®§ªº¸Ü¡A¥i¥H§â°T®§©ñ¦b pkg/MESSAGE ¸Ì¡C³o­Ó¥\¯à¦b·í pkg_add ¤§«á­nÅã¥ÜÃB¥~ªº¦w¸Ë¨BÆJ¡A ©Î¬O­nÅã¥Ü±ÂÅv¸ê°T®É©¹©¹¬Û·í¦³¥Î¡C

Note: pkg/MESSAGE ³o­ÓÀɤ£»Ý­n¥[¶i pkg/PLIST ¸Ì¡C¦P¼Ë¦a¡A¦pªG¨Ï¥ÎªÌ¬O¥Î port ¦Ó«D package¡A¨º¥¦´N¤£·|¦Û°ÊÅã¥Ü¥X¨Ó¡A©Ò¥H§AÀ³¸Ó¦Û¤v¦b post-install ªº¼Ðªº¸Ì§â¥¦Åã¥Ü¥X¨Ó¡C

4.4.13.2. INSTALL

¦pªG port ¦b¥Î pkg_add ¦w¸Ë binary package ®É»Ý­n°õ¦æ©R¥O¡A¥i¥HÂÇ¥Ñ pkg/INSTALL ³o­Ó script ¨Ó¹F¦¨¡C³o­Ó script ·|¦Û°Ê¥[¶i package ¸Ì¡A¥B·|ÂÇ¥Ñ pkg_add °õ¦æ¨â¦¸¡C²Ä¤@¦¸¬O INSTALL ${PKGNAME} PRE-INSTALL ¦Ó²Ä¤G¦¸¬O INSTALL ${PKGNAME} POST-INSTALL¡C $2 ¥i¥Î¥H½T©w script ¥¿¶i¤J¦óºØ¼Ò¦¡¡C PKG_PREFIX ³o­ÓÀô¹ÒÅܼƷ|³]©w¬° package ªº¦w¸Ë¥Ø¿ý¡C ¬d¬Ý pkg_add(1) ¥HÀò±o§ó¦h°T®§¡C

Note: ¦pªG¥Î make install ¦w¸Ë port¡A«h¦¹ script ¤£·|¦Û°Ê°õ¦æ¡C¦pªG§A¥²¶·¨Ì¿à¥¦ªº°õ¦æ¡A«h¥²¶·¦b port ªº Makefile ¸Ì©ú½T¦a©I¥s¥¦¡C

4.4.13.3. REQ

¦pªG port »Ý­n¨M©w¥¦¬O§_À³¸Ó¦w¸Ë¡A«h¥i«Ø¤@­Ó pkg/REQ ``¥²³Æ±ø¥ó(requirements)'' ªº script¡C¦b¦w¸Ë/¤Ï¦w¸Ë®É¥¦·|³Q¦Û°Ê±Ä¥Î¥H¨M©w ¦w¸Ë/¤Ï¦w¸Ëµ{§Ç¬O§_Ä~Äò¶i¦æ¡C

4.4.13.4. ®Ú¾Ú make ªºÅܼƧïÅÜ PLIST

¦³¨Ç port¡A¤×¨ä¬O p5- ªº port¡A¥²¶·¨ú¨M©ó configure ®É¥Îªº¿ï¶µ(©Î¬O¦b p5- ports ®É¬° perl ªºª©¥»)¨Ó§ïÅÜ PLIST¡C­n¨Ï³o§ó®e©ö¤@ÂI¡A¦b PLIST ¸Ìªº %%OSREL%%¡A %%PERL_VER%% ©M %%PERL_VERSION%% ªº¥ô¦ó instance ³£±N³Q¾A·í¦a´À¥N¡C%%OSREL%% ªº­È¬O§@·~¨t²Îªº­×­qª©¸¹½X(¦p 2.2.7)¡C %%PERL_VERSION%% ¬O perl §¹¾ãªºª©¥»½s¸¹(¦p 5.00502) ¦Ó %%PERL_VER%% «h¬O perl ª©¥»½s¸¹´î¥h patchlevel (¦p 5.005)¡C

¦pªG¥²¶·°µ¨ä¥¦ªº´À¥N¡A¥i¥H¥Î¦¨¹ïªº VAR=VALUE ªº¦Cªí¨Ó³]©wÅÜ¼Æ PLIST_SUB¡A¦Ó %%VAR%% ªº instance ±N·|³Q PLIST ¸Ìªº VALUE ©Ò¨ú¥N¡C

Á|­Ó¨Ò¡A°²¦p¦³­Ó port ¦w¸Ë¤F«Ü¦hÀɮצb¤@­Ó«ü©wª©¥»ªº¤l¥Ø¿ý¡A ¥i¥H§â¤@­ÓÃþ¦ü

    OCTAVE_VERSION= 2.0.13
    PLIST_SUB=      OCTAVE_VERSION=${OCTAVE_VERSION}
ªºªF¦è©ñ¶i Makefile ¨Ã¦b©Ò¦³ PLIST ¸Ì¥X²{ª©¥»ªº¦ì¸m¨Ï¥Î %%OCTAVE_VERSION%%¡C·Ó³o¤èªk¡A·í§A¤É¯Å port ®É´N¤£¥²§ó§ï PLIST ¸Ì¨º¼Æ(©ÎªÌ¦b¤@¨Ç±¡§Î¤U¡A ¼Æ¦Ê)¦æªºªF¦è¡C

³oºØ´À¥N(¥H¤Î¥ô¦ó man pages) ªº¼W¥[)·|ÂÇ¥ÑŪ¨ú PLIST ©M¼g¤J TMPPLIST(¹w³]¡G WRKDIR/.PLIST.mktmp)¦b do-install ©M post-install ªº¼Ðªº¤§¶¡§¹¦¨ ¦]¦¹°²¦p§A¥^¦£¦a«Ø¥ß PLIST¡A¦b do-install ¸Ì©Î¤§«e³o¼Ë°µ¡C¦P¼Ë¦a¡A ¦pªG port ¥²¶·½s¿èµ²ªGªºÀɮסA¦b post-install ¸Ì¹ï¦W¬° TMPPLIST ªºÀɮ׳o»ò°µ¡C

4.4.13.5. §ïÅܤl¥Ø¿ý pkg ¸ÌªºÀɮצWºÙ

©Ò¦³¦b¤l¥Ø¿ý pkg ¸ÌªºÀɦW³£¬O¥ÎÅܼƩw¸qªº¡A ©Ò¥H°²¦p»Ý­n¥i¥H¦b Makefile ¸Ì§ïÅÜ¥¦­Ì¡C ·í­n¦b¼Æ­Ó port ¶¡¤À¨É¦P¤@­Ó¤l¥Ø¿ý pkg¡A ©ÎªÌ¥²¶·¼g¤J¤W­±©Ò­zÀɮפ¤ªº¬Y­ÓÀÉ®×(¬Ý¬Ý ¦b WRKDIR ¥H¥~ªº¦a¤è¼g¤J¥iª¾¬°¦óª½±µ¼g¤J¤l¥Ø¿ý pkg ¬O­ÓÄê¤èªk)®É¡A³o¤èªk¯S§O¦a¦³¥Î¡C

³o¸Ì¦³¥÷ÅܼƦWºÙ¤Î¨ä¹w³]­Èªº¦Cªí¡C

Åܼƹw³]­È
COMMENT${PKGDIR}/DESCR
DESCR${PKGDIR}/DESCR
PLIST${PKGDIR}/PLIST
PKGINSTALL${PKGDIR}/PKGINSTALL
PKGDEINSTALL${PKGDIR}/PKGDEINSTALL
PKGREQ${PKGDIR}/REQ
PKGMESSAGE${PKGDIR}/MESSAGE

½Ð§ïÅܳo¨ÇÅܼƦӤ£­n¶Ã§Ë PKG_ARGS¡C ¦pªG§ïÅܤF PKG_ARGS¡A«h±q port ¦w¸Ë®É¨º¨ÇÀɮ׫K¤£·|³Q¥¿½T¦a¦w¸Ë¨ì /var/db/pkg¡C

4.4.14. Licensing Problems

¦³¨Ç³nÅé package ¦³³\¥iªº­­¨î©Î¥i³y¦¨¹Hªk(PKP ¦b public key crypto ªº±M§QÅv¡AITAR (crypto ³nÅ骺¿é¥X)³o¨â­Ó«êÄÝ©ó³oºØ)¡C ¹ï³oºØ³nÅé§Ú­Ìªº§@ªk®t²§«Ü¤j¡AºÝ¿à©ó­Ó§Oªº³\¥iªº½T¹ê»¡ªk¡C

Note: ¨­¬°¤@­Ó porter¡A¦³³d¥ô­n¤F¸Ñ³nÅ骺³\¥i±ø¥ó¡A¨Ã½T«O FreeBSD project ¤£·|¦]¬°­«·s´²§Gµ{¦¡½X©Î½sĶ¹Lªº binary ¦Ó¬°¹H¤Ï³\¥i­t³d¥ô¡A¤£½×¬O¸g¥Ñ ftp ©Î¥úºÐ¡C¦pªG¤£ªÖ©wªº¸Ü½Ð»P FreeBSD ports mailing list Ápô¡C

¦³¨â­ÓÅܼƥi¥H³]¦b Makefile ¸Ì¥H³B²z¸g±`µo¥Íªº±¡ªp¡G

  1. ¦pªG port ¦³``¤£¥i°â¥HÀò§Q''³oºØ§Î¦¡ªº³\¥i¡A³]©wÅÜ¼Æ NO_CDROM ¬°¤@±Ô­z­ì¦]ªº¦r¦ê¡C§Ú­Ì·|½T©w³oÃþªº port ¤£·|¦b release ®É¶i¤J¥úºÐ¸Ì¡C¦Ó distfile ©M package ¤´¥i¸g¥Ñ¨ú±o¡C

  2. ¦pªG resulting package ¥²¶·¦b¦U­Ó¯¸¿W¥ß«Ø¥ß¡A©ÎªÌ resulting binary package ¦]¬°³\¥i¤£±o´²§G¡F³]©wÅÜ¼Æ NO_PACKAGE ¬°¤@±Ô­z­ì¦]ªº¦r¦ê¡C§Ú­Ì·|½T©w³oÃþªº package ¤£·|¥X²{¦b ftp ¯¸¤W¡A¤]¤£·|¦b release ®É¶i¤J¥úºÐ¸Ì¡C ¦Ó distfile ¤´·|¥]¬A¦b¨º¨âªÌ¸Ì¡C

  3. °²¦p port ¦³ªk©wªº­­¨î¥i¨Ï¥Îªº¤H(¦p crypto ¦¹Ãþ)©ÎªÌ¦³ ``«DÀç§Q¥Î³~''ªº³\¥i¡A³]©wÅÜ¼Æ RESTRICTED ¬°±Ô­z­ì¦]ªº¦r¦ê¡C¹ï³oÃþªº port¡A distfiles/packages §Y¨Ï±q§Ú­Ìªº ftp ¯¸¤]µLªk¨ú±o¡C

Note: ²Ä¤@ª©¸ò²Ä¤Gª©ªº GNU ¤j²³¤½¥Îª©Åv(GPL)¹ï port À³¸Ó³£¤£¬O­Ó°ÝÃD¡C

Note: ¦pªG§A¬O­Ó committer¡A½T©w§A¤]§ó·s¤F ports/LEGAL¡C

4.4.15. ¤É¯Å

·í§Aªº port ¤ñ¨Ó¦Û°_·½§@ªÌªº³Ì·sª©Á٦ѮɡA¥ý½T«O§A¦³³Ì·sªº port¡C ¥i¥H±q ftp mirror ¯¸ªº¥Ø¿ý ports/ports-current ¨ú±o¡C¤]¥i¥H¥Î CVSup ¨Ï¾ã­Ó ports collection «O«ù¬°·sªº¡A¦p¦P Section 19.3.3.3 ¸Ì©Ò´y­zªº¡C

¤U¤@¨B¬O±H«Hµ¹ maintainer¡A¦pªG port ªº Makefile ¦³¦C¥X¡C¨º­Ó¤H¥i¯à¤w¸g¦bµÛ¤â¤É¯Å¡A ©ÎªÌ¦³²{¦b¤£¤É¯Åªº­ì¦](¨Ò¦p¦]¬°·sª©¥»ªºÃ­©w©Ê°ÝÃD)¡C

¦pªG maintainer ­n§A¶i¦æ¤É¯Å©Î¬O¨S¦³¥ô¦ó¤H¶}©lµÛ¤â¡A ½Ð°µ¦n¤É¯Å¨Ã§â·sªº©Mªº port ¥Ø¿ýªº recursive diff (unified ©Î context diff ¤]¦n¡A¤£¹L port committer ¦ü¥G¤ñ¸û³ßÅw unified diff) µ¹§Ú­Ì(¤ñ¦p¡A¦pªG­×§ïªº port ¥Ø¿ý¬O superedit ¦Ó­ì¥»¦b port tree ¸Ìªº¬O superedit.bak¡A ±µµÛ´N§â diff -ruN superedit.bak superedit ªºµ²ªG±Hµ¹§Ú­Ì)¡C½ÐÀˬd¿é¥X°T®§½T©w©Ò¦³ªº§ïÅܳ£¦³¹D²z¡C§â diff ±Hµ¹§Ú­Ì³Ì¦nªº¤èªk´N¬O§â¥¦¥]¬A¶i send-pr(1) (¤ÀÃþ¬° ports)¡C½Ð¦b°T®§¸Ì´£¤Î¼W¥[©Î§R°£ªºÀɮסA ¦]¬°·í commit ®É¥¦­Ì¥²¶·³Q©ú½T¦a°O¤J CVS¡C¦pªG diff ¤j©ó 20KB¡A ½Ð§â¥¦À£ÁY¨Ã uuencode¡G¤£µM´N¥u­n§â¥¦¥]§t¶i¨Ó¦p¦P¥]§t¶i PR¡C

Note: ¦A»¡¤@¦¸¡A½Ð¥Î diff(1) ¨Ó±H¥X²{¦sªº port ªº§ó·s¦Ó¤£­n¥Î shar(1)

4.4.16. Do's and Dont's

³o¸Ì¦³¥÷·í¦b porting ¹Lµ{¤¤À³¸Ó»P¤£À³¸Ó¤Uªº©R¥Oªº¦Cªí¡C §AÀ³¸Ó¤ñ¹ï³o¥÷¦Cªí¨ÓÀˬd¦Û¤vªº port¡A¤£¹L¤]¥i¥HÀˬd PR ¸ê®Æ®w¸Ì¨ä¥L¤H´£¥Xªº port¡C¥H Bug Reports and General Commentary ©Ò´y­zªº¨Ó´£¥X©ÒÀˬdªº port ªºµù¸Ñ¡CÀˬd PR ¸ê®Æ®w¸Ìªº port ¤£¶ÈÅý§Ú­Ì¯à§ó§Ö¦a commit ¥¦­Ì¡A ¦Ó¥B¤]ÃÒ©ú¤F§Aª¾¹D§A¦b·F¤°»ò¡C

4.4.16.1. Strip Binaries

Do strip binaries. ¦pªG­ì¥»ªºµ{¦¡½X¤w¸g strips the binaries¡A ¨º«Ü¦n¡F§_«h´NÀ³¸Ó¦Û¤v¥[¤@­Ó post-install ªº³W«h ¨Ó°µ³o¥ó¨Æ¡C³o¸Ì¦³­Ó¨Ò¤l¡G

    post-install:
            strip ${PREFIX}/bin/xdl

¥Î file(1) ³o­Ó©R¥O¦b¤@­Ó¥i¦w¸Ëªº°õ¦æÀɤW¨ÓÀˬd³o­Ó binary ¬O§_¦³³Q strip¡C¦pªG¥¦¨S¦³»¡ not stripped¡A ´Nªí¥Ü³o­ÓÀɤw¸g³Q strip¡C

4.4.16.2. INSTALL_* macros

¦b *-install ªº¼Ðªº¸Ì¨Ï¥Î bsd.port.mk ¸Ì´£¨Ñªº¥¨¶°«ü¥O¨Ó½T«OÀɮצ³¥¿½Tªº¼Ò¦¡©M¾Ö¦³Åv¡C ³o¨Ç«ü¥O¬O¡G

  • INSTALL_PROGRAM ³o­Ó«ü¥O¬O¦w¸Ë binary ªº¥i°õ¦æÀÉ¡C

  • INSTALL_SCRIPT ³o­Ó«ü¥O¬O¦w¸Ë¥i°õ¦æªº script¡C

  • INSTALL_DATA ³o­Ó«ü¥O¬O¦w¸Ë¥i¤À¨Éªº¸ê®Æ¡C

  • INSTALL_MAN ³o­Ó«ü¥O¬O¦w¸Ë manpage ©M¨ä¥¦ ¤å¥ó(¥¦¤£·|À£ÁY¥ô¦óªF¦è)¡C

³o¨Ç¬O¦³©Ò¦³¾A·íªººX¼Ðªº°ò¥» install «ü¥O¡C ¬Ý¤U­±ªº¨Ò¤l¥Hª¾¦p¦ó¨Ï¥Î¥¦­Ì¡C

4.4.16.3. WRKDIR

¤£­n¦b WRKDIR ¥H¥~¼g¤J¥ô¦óªF¦è¡C WRKDIR ¬O«Ø¥ß port ®É°ß¤@«OÃÒ¥i¼g¤Jªº¦a¤è (±q¥úºÐ½sĶ port ¦³±q°ßŪªº tree ½sĶ port ªº¨Ò¤l)¡C¦pªG¥²¶·­×§ï¥ô¦ó PKGDIR ¸ÌªºÀɮסAÂǥѭ«·s©w¸q¤@­ÓÅܼƨӰµ¡A ¦Ó¤£¬Oª½±µ¼g¤J¡C

4.4.16.4. WRKDIRPREFIX

½T«O§Aªº port ·|´L·q WRKDIRPREFIX¡C ¤j³¡¥÷ªº port ¤£¥Î¾á¤ß³o­Ó¡C¯S§O¬O°²¦p§A°Ñ¦Ò¥t¤@­Ó port ªº WRKDIR¡A¥¿½Tªº¦ì¸mÀ³¬° WRKDIRPREFIXPORTSDIR/subdir/name/work ¦Ó¤£¬O PORTSDIR/subdir/name/work ©Î .CURDIR/../../subdir/name/work ©ÎªÌ¤@¨Ç³oÃþªº¡C

¦P¼Ë¦a¡A¦pªG¦Û¤v©w¸q WRKDIR¡A ½T©w§A¦³¦b«e­±¥[¤W ${WRKDIRPREFIX}${.CURDIR}¡C

4.4.16.5. °Ï§O§@·~¨t²Î©M OS ª©¥»

§A¥i¯à·|¹J¨ì¥²»Ý­×§ï©Î¬O¦³±ø¥óªº½sĶªºµ{¦¡½X¡A³o­n¬Ý¥¦¬O¥H¦óºØª©¥» UNIX ¬°°ò¦¨Ó°õ¦æ¡C¦pªG¬°¤F¦³±ø¥óªº½sĶ¥²¶·¹ïµ{¦¡½X°µ³oÃþªº§ó§ï¡A ½T©w§A¦³ºÉ¶q§â¥¦§ïªº¤@¯ë¤ÆÂI¥H«K§Ú­Ì¥i¥H§â port ©¹¦^²¾´Ó¨ì FreeBSD 1.x ªº¨t²Î¦Ó¥B¥i¥H²¾´Ó¨ì¨ä¥¦ªº BSD ¨t²Î¡A¦p·½¦Û CSRG ªº 4.4BSD¡BBSD/386¡B 386BSD¡BNetBSD ©M OpenBSD¡C

¤À¿ë 4.3BSD/Reno (1990) ©M¸û·sª©ªº BSD ªºµ{¦¡½X¸û¦nªº¤èªk¬O¥Î <sys/param.h> ¸Ì©w¸qªº BSD ¥¨¶°«ü¥O¡C§Æ±æ¨º­ÓÀɤw¸g³Q¥]¬A¶i¥h¤F¡F °²¦p¨S¦³¡A§â³o¬qµ{¦¡½X¡G

    #if (defined(__unix__) || defined(unix)) && !defined(USG)
    #include <sys/param.h>
    #endif

¥[¶i .c Àɮ׸̾A·íªº¦ì¸m¡C §Ú­Ì¬Û«H¥ô¦ó¦³©w¸q³o¨â­Ó²Å¸¹ªº¨t²Î³£¦³ sys/param.h¡C¦pªGµo²{¦³¨t²Î¨S¦³¡A §Ú­Ì·|«Ü¼Ö·Nª¾¹Dªº¡C½Ð±H«H¨ì FreeBSD ports mailing list ¡C

¥t¤@ºØ¤èªk¬O¥Î GNU Autoconf ªº§Î¦¡¨Ó°µ¡G

    #ifdef HAVE_SYS_PARAM_H
    #include <sys/param.h>
    #endif

§O§Ñ¤F³oºØ¤è¦¡­n¦b Makefile ¸Ìªº CFLAGS ¥[¤W -DHAVE_SYS_PARAM_H¡C

¤@¥¹¥]¬A¤F sys/param.h¡A¥i¥H¥Î¡G

    #if (defined(BSD) && (BSD >= 199103))

¨ÓÀˬdµ{¦¡¬O§_¦b 4.3 Net2 code base ©Î§ó·sª©ªº¤W½sĶ(¦p FreeBSD 1.x¡B4.3/Reno¡BNetBSD 0.9¡B386BSD¡BBSD/386 1.1 ©M¤§¤Uªºª©¥»)¡C

¥Î¡G

    #if (defined(BSD) && (BSD >= 199306))

¨ÓÀˬdµ{¦¡¬O§_¦b 4.4 code base ©Î§ó·sªº°ò¦¤W½s¸q(¦p FreeBSD 2.x¡B4.4¡BNetBSD 1.0¡BBSD/386 2.0 ©Î³o¤§¤Wªºª©¥»)¡C

¹ï 4.4BSD-Lite2 code base ¦Ó¨¥¡ABSD ¥¨¶°«ü¥Oªº­È¬O 199506¡C ³o­Ó³¯­z¥u¬O¬°¤F´£¨Ñ°T®§¡C¥¦¤£À³¸Ó³Q¥Î¨Ó¤ÀÅG³æ¯Â¥H 4.4 Lite ¬°°ò¦ªº FreeBSD ª©¥»¥H¤Î¿Ä¦X¤F¨Ó¦Û 4.4-Lite2 ªº§ïÅܪºª©¥»¡C ³o®É«áÀ³¸Ó¥Î __FreeBSD__ ³o­Ó¥¨¶°«ü¥O¨Ó´À¥N¡C

Use sparingly:

  • __FreeBSD__ ©w¸q¦b©Ò¦³ª©¥»ªº FreeBSD ¸Ì¡C °²¦p§A°µªº§ïÅÜ¥u¦³¼vÅT¨ì FreeBSD ´N¥Î¥¦¡C Porting gotchas like the use of sys_errlist[] vs strerror() are Berkeleyisms, not FreeBSD changes.

  • ¦b FreeBSD 2.x ¸Ì¡A__FreeBSD__ ©w¬° 2¡C¦b§ó¦­ªºª©¥»«h¬° 1¡C ¸û·sªºª©¥»·|´£¤É³o­Ó­È¨Ó°t¦X¥¦­Ìªº¥Dª©¥»½s¸¹¡C

  • ¦pªG¥²¶·¤ÀÅG FreeBSD 1.x ¨t²Î©M FreeBSD 2.x ©Î 3.x ¨t²Î¶¡ªº¤£¦P¡A³q±`¥¿½Tªº¸Ñµª¬O¥Î¤W­zªº BSD ¥¨¶°«ü¥O¡C¦pªG¯uªº¦³±M¬° FreeBSD ªº§ïÅÜ(¦p¥Î¨ì ld®Éªº¯S®í¦@¨É¨ç¦¡¿ï¶µ)¨º´N¥i¥H¥Î __FreeBSD__ ©M #if __FreeBSD__ > 1 ¨Ó»{¥X FreeBSD 2.x ©M¨ä¤§«áªº¨t²Î¡C ¦pªG»Ý­n§ó¦h²Ó¸`¨Ó»{¥X 2.0-RELEASE ¤§«áªº FreeBSD ¨t²Î¡A ¥i¥H¥Î¤U­±ªº¤èªk¡G

        #if __FreeBSD__ >= 2
        #include <osreldate.h>
        #    if __FreeBSD_version >= 199504
                 /* 2.0.5+ release specific code here */
        #    endif
        #endif

    Release__FreeBSD_version
    2.0-RELEASE119411
    2.1-CURRENT199501, 199503
    2.0.5-RELEASE199504
    2.1 ¤§«eªº 2.2-CURRENT199508
    2.1.0-RELEASE199511
    2.1.5 ¤§«eªº 2.2-CURRENT199512
    2.1.5-RELEASE199607
    2.1.6 ¤§«eªº 2.2-CURRENT199608
    2.1.6-RELEASE199612
    2.1.7-RELEASE199612
    2.2-RELEASE220000
    2.2.1-RELEASE220000 (¤£ÅÜ)
    2.2.1-RELEASE ¤§«áªº 2.2-STABLE220000 (¤£ÅÜ)
    2.2-STABLE after texinfo-3.9221001
    2.2-STABLE after top221002
    2.2.2-RELEASE222000
    2.2.2-RELEASE ¤§«áªº 2.2-STABLE222001
    2.2.5-RELEASE225000
    2.2.5-RELEASE ¤§«áªº 2.2-STABLE225001
    ¨Ö¤J ldconfig -R ¤§«áªº 2.2-STABLE225002
    2.2.6-RELEASE226000
    2.2.7-RELEASE227000
    2.2.7-RELEASE ¤§«áªº 2.2-STABLE227001
    semctl(2) §ïÅܫ᪺ 2.2-STABLE227002
    2.2.8-RELEASE228000
    2.2.8-RELEASE ¤§«áªº 2.2-STABLE228001
    mount(2) §ïÅÜ«eªº 3.0-CURRENT300000
    mount(2) §ïÅܫ᪺ 3.0-CURRENT300001
    semctl(2) §ïÅܫ᪺ 3.0-CURRENT300002
    ioctl arg §ïÅܫ᪺ 3.0-CURRENT300003
    Âà´«¬° ELF «áªº 3.0-CURRENT300004
    3.0-RELEASE300005
    3.0-RELEASE ¤§«áªº 3.0-CURRENT300006
    3/4 ¤À¤ä«áªº 3.0-STABLE300007
    3.1-RELEASE310000
    3.1-RELEASE «áªº 3.1-STABLE310001
    C++ constructor/destructor order §ïÅܫ᪺ 3.1-STABLE 310002
    3.2-RELEASE320000
    3.2-STABLE320001
    binary-incompatible IPFW ©M socket §ïÅܫ᪺ 3.2-STABLE 320002
    3.3-RELEASE330000
    3.3-STABLE330001
    mkstemps() ¥[¶i libc «áªº 3.3-STABLE330002
    3/4 ¤À¤ä«áªº 4.0-CURRENT400000
    °ÊºA³sµ²¾¹ªººÞ²z§ïÅܫ᪺ 4.0-CURRENT 400001
    C++ constructor/destructor order §ïÅܫ᪺ 4.0-CURRENT 400002
    dladdr(3) °_§@¥Î«áªº 4.0-CURRENT400003
    __deregister_frame_info °ÊºA³sµ²¾¹ªº¿ù»~­×¥¿«áªº 4.0-CURRENT (¾ã¦X EGCS 1.1.2 «áªº 4.0-CURRENT ¤]¬O) 400004
    suser(9) API §ïÅܫ᪺ 4.0-CURRENT (newbus ¤§«áªº 4.0-CURRENT ¤]¬O)400005
    cdevsw registration §ïÅܫ᪺ 4.0-CURRENT400006
    4.0-CURRENT after the addition of so_cred for socket level credentials400007
    4.0-CURRENT after the addition of a poll syscall wrapper to libc_r400008
    §ó´« kernel ªº dev_t ®æ¦¡¬° struct specinfo «ü¼Ð«áªº 4.0-CURRENT 400009
    ­×¥¿ jail(2) ªºº|¬}«áªº 4.0-CURRENT400010
    sigset_t ªº¸ê®Æ®æ¦¡§ïÅܫ᪺ 4.0-CURRENT400011
    §ó·s¦Ü GCC 2.95.2 ½sĶ¾¹«áªº 4.0-CURRENT 400012
    4.0-CURRENT after adding pluggable linux-mode ioctl handlers400013
    ¿é¤J OpenSSL «áªº 4.0-CURRENT400014
    GCC 2.95.2 ¸Ìªº C++ ABI ¥Ñ¹w³]ªº -fno-vtable-thunks §ï¬° -fvtable-thunks «áªº 4.0-CURRENT400015

Note: ª`·N¤@¤U¦³®É«á 2.2-STABLE ·|¥H¬°¦Û¤v¬O¦b 2.2.5-RELEASE «áªº ``2.2.5-STABLE''¡C­ì¥»¸Ó¼Ë¦¡¬O¦~¥÷«áºò±µµÛ¤ë¥÷¡A ¤£¹L±q 2.2 ¶}©l§Ú­Ì¨M©w§ï¬°§óª½±µªº ¥D­nªº/¦¸­nªº ¨t²Î¡C ³o¬O¦]¬°¤@¨Ç¤À¤äªº¥­¦æµo®iÅý²³æ¦a¥ÎÄÀ¥X¤é´Á¨Ó¤ÀÃþÅܱo¤£¥i¦æ¡C ¦pªG§A¥¿¦b°µ¤@­Ó port¡A¤£¥Î¾á¤ßªº -CURRENT¡F ¥¦­Ì·|¦C¦b³o´N¬O¬°¤FÅý§A°Ñ¦Ò¡C

¦b¤w¸g°µ¦nªº¼Æ¦Ê­Ó port ¸Ì¡A¥u¦³¤Ö¼Æ¤@¨â­Ó±¡§ÎÀ³¸Ó¤w¸g¥Î¨ì¤F __FreeBSD__¡C¥u¦]¬°¤@­Ó¸û¦­ªº port §Ë¶Ã¤F¥¦¨Ã§â¥¦¥Î¿ù¦a¤è¤£¥Nªí§A¤]À³¸Ó³o»ò°µ¡C

4.4.16.6. ¦b bsd.port.mk «á¼gªF¦è

¤£­n¦b .include <bsd.port.mk> ³o¦æ«á¼g¤W¥ô¦óªF¦è¡C³o³q±`¥i¥HÂǥѦb§Aªº Makefile ¤¤¶¡¬Y³B§t¦³ bsd.port.pre.mk ©Mµ²§À¦³ bsd.port.post.mk ¨ÓÁקK¡C

Note: §A¥²¶·§t¦³ pre.mk/post.mk ³o¤@¹ï©Î¬O¥u¦³ bsd.port.mk¡F ¤£­n§â¨âªÌ²V¦b¤@°_¡C

bsd.port.pre.mk ¥u¦³©w¸q¤Ö¼Æ¥i¥H©ñ¦b Makefile ¥Î¨Ó´ú¸ÕªºÅܼơA bsd.port.post.mk ©w¸q¨ä¾lªºÅܼơC

³o¸Ì¦³´X­Ó©w¸q¦b bsd.port.pre.mk ¸Ìªº­«­nÅܼÆ(³o¤£¬O§¹¾ãªº¦Cªí¡A­n¬Ý§¹¾ãªº½Ð¬Ý bsd.port.mk)¡C

Åܼƴy­z
ARCH¨t²Î¬[ºc·|ÂÇ¥Ñ uname -m ¦^¶Ç(¦p i386)
OPSYS§@·~²Ó²Î§Î¦¡¡A¥Ñ uname -s ¦^¶Ç(¦p FreeBSD)
OSREL§@·~¨t²Îªº release ª©¥»(¦p 2.1.5 ©Î 2.2.7)
OSVERSION¥Î¼Æ¦rªí¥Üªº§@·~¨t²Îª©¥»¡A¸ò __FreeBSD_version ¤@¼Ë¡C
PORTOBJFORMAT¨t²Îªºª«¥ó®æ¦¡(aout ©Î elf
LOCALBASE``local'' tree ªº°ò©³(¦p /usr/local/)
X11BASE``X11'' tree ªº°ò©³(¦p /usr/X11R6)
PREFIXport ¸Ó§â¦Û¤v¸Ë¨ì­þ¸Ì(¬Ý more on PREFIX).

Note: ¦p­n¥²¶·©w¸qÅÜ¼Æ USE_IMAKE¡A USE_X_PREFIX ©Î MASTERDIR¡A ¦b¥]¬A bsd.port.pre.mk «e°µ³o¥ó¨Æ¡C

³o¸Ì¦³´X­Ó¥i¥H¼g¦b bsd.port.pre.mk «áªº¨Ò¤l¡F

    # no need to compile lang/perl5 if perl5 is already in system
    .if ${OSVERSION} > 300003
    BROKEN= perl is in system
    .endif
    
    # only one shlib version number for ELF
    .if ${PORTOBJFORMAT} == "elf"
    TCL_LIB_FILE=  ${TCL_LIB}.${SHLIB_MAJOR}
    .else
    TCL_LIB_FILE=  ${TCL_LIB}.${SHLIB_MAJOR}.${SHLIB_MINOR}
    .endif
    
    # software already makes link for ELF, but not for a.out
    post-install:
    .if ${PORTOBJFORMAT} == "aout"
           ${LN} -sf liblinpack.so.1.0 ${PREFIX}/lib/liblinpack.so
    .endif

4.4.16.7. ¦w¸ËÃB¥~ªº¤å¥ó¸ê®Æ

¦pªG³nÅ馳¼Ð·Çªº man ©M info ¥H¥~§A»{¬°¹ï¨Ï¥ÎªÌ¦³¥Îªº¤å¥ó¡A §â¥¦¦w¸Ë¨ì PREFIX/share/doc ¤U¡C¦p¦P«e­±ªº¶µ¥Ø¡A³o¥i¥H¦b post-install ªº¼Ðªº¸Ì°µ¨ì¡C

¬°§Aªº port «Ø¤@­Ó·sªº¥Ø¿ý¡C¸Ó¥Ø¿ýÀ³¸Ó­n¯à¤ÏÀ³¸Ó port ¬°¦óª«¡C ³o³q±`·N¿×µÛ PKGNAME ´î¥hª©¥»ªº³¡¥÷¡C µM¦Ó¡A¦pªG»{¬°¨Ï¥ÎªÌ¥i¯à¦P®É¦w¸Ë¤£¦Pª©¥»ªº port¡A¨º´N¥i¥H¥Î¾ã­Ó PKGNAME¡C

Åý¦w¸Ëªº°Ê§@¨Ì¿àÅÜ¼Æ NOPORTDOCS ¥H«K¨Ï¥ÎªÌ¥i¥H¦b /etc/make.conf Åý¥¦¥¢¥Î§@¥Î¡A ¦p¤U¡G

    post-install:
    .if !defined(NOPORTDOCS)
            ${MKDIR}${PREFIX}/share/doc/xv
            ${INSTALL_MAN} ${WRKSRC}/docs/xvdocs.ps ${PREFIX}/share/doc/xv
    .endif

§O§Ñ¤F¤]§â¥¦­Ì¥[¶i pkg/PLIST¡I (¦b³oÃ䤣¥Î¾á¤ß NOPORTDOCS¡F¥Ø«e package ¨S¦³¿ìªk±q /etc/make.conf Ū¨úÅܼơC)

¤]¥i¥H¥Î pkg/MESSAGE ³o­ÓÀÉÅý¦w¸Ë®ÉÅã¥Ü°T®§¡C ¬Ý ¨Ï¥Î pkg/MESSAGE ªº³¹¸`¨ÓÀò±o§ó¦h²Ó¸`¡C

Note: MESSAGE ¤£»Ý­n¥[¶i pkg/PLIST ¸Ì¡C

4.4.16.8. DIST_SUBDIR

¤£­nÅý port §Ë¶Ã¤F /usr/ports/distfiles¡C ¦pªG port »Ý­n§ì«Ü¦hÀɮסA©Î¬O§t¦³ÀɦW¥i¯à·|©M¨ä¥¦ port ¬Û½ÄªºÀÉ®×(¦p¡AMakefile)¡A§â DIST_SUBDIR ³]¬° port ªº¦WºÙ(¨S¦³ª©¥»ªº³¡¥÷ªº PKGNAME À³¸Ó´N¦æ¤F)¡C³o¼Ë·|§â DISTDIR ±q¹w³]ªº /usr/ports/distfiles §ï¬° /usr/ports/distfiles/DIST_SUBDIR¡A ¹ê»Ú¤W¨Ã§â port »Ý­nªº©Ò¦³ªF¦è³£©ñ¶i¨º­Ó¤l¥Ø¿ý¡C

¥¦¦b¥D­nªº³Æ¥÷¯¸ ftp.FreeBSD.org ¤W¤]¬O¬Ý¦P¦Wªº¤l¥Ø¿ý¡C(¦b Makefile ©ú½T¦a³]©w DISTDIR ¤£·|°µ¨ì³o¤@ÂI¡A©Ò¥H½Ð¥Î DIST_SUBDIR¡C)

Note: ³o¤£·|¼vÅT Makefile ¸Ì³]©wªº MASTER_SITES¡C

4.4.16.9. Package ªº¸ê°T

§â package ªº¸ê°T¥]¬A¨ì pkg ¸Ì¡A¦p. COMMENT¡ADESCR¡A©M PLIST¡C

Note: ³o¨ÇÀɮפw¤£¦A¥u¥Î©ó¥]¸Ë¡A²{¦b§Y¨Ï³]©w¤F NO_PACKAGE ³o¨ÇÀɮפ´¬O¥²­nªº¡C

4.4.16.10. RCS ¦r¦ê

¤£­n§â RCS ¦r¦ê©ñ¶i patch ¸Ì¡C·í§Ú­Ì§âÀɮשñ¶i ports tree ®É CVS ·|§â¥¦­Ì¤Á¥h¡A¦Ó·í§Ú­ÌÀˬd®É¤S¤@¦¸¡A ³o¼Ë¥¦­Ì·|Åܱo¤£¤@¼Ë¦Ó¥B patch ·|¥¢±Ñ¡CRCS ¦r¦ê¥Ñ dollar ²Å¸¹($)³ò°_¨Ó¡A¤@¯ë¨Ó»¡¥Ñ $Id ©Î $RCS °_ÀY¡C

4.4.16.11. »¼°jªº diff

¹ï diff ¨Ï¥Î»¼°j¿ï¶µ(-r) diff ¨Ó²£¥Í patch ·|¦n¦h¤F¡A¤£¹L½Ð¬Ý¤@¤U³Ì«áªº patch ¨Ó½T©w¨S¦³¥ô¦ó¤£»Ý­nªº©U§£¦b¸Ì­±¡C¤×¨ä¬O¨â­Ó³Æ¥÷Àɶ¡ªº diff¡A ©M·í port ¥Î Imake ©Î GNU configure µ¥µ¥®Éªº Makefiles ¤]¤£»Ý­n¦Ó¸Ó¬å±¼¡C¦pªG¥²¶·½s¿è configure.in ¨Ã°õ¦æ autoconf ¨Ó­«·s²£¥Í configure¡A¤£­n°µ configure ªº diff (³o³q±`·|¼Æ¤d¦æ¡I)¡F©w¸q USE_AUTOCONF=yes ¨Ã°µ configure.in ªº diff¡C

¦P¼Ë¦a¡A¦pªG¥²¶·¬å±¼ÀɮסA¨º´N¼g¦b post-extract ªº¼Ðªº¸Ì¨Ó°µ¦Ó¤£­n§Ë¬° patch ªº¤@³¡¥÷¡C¦pªG¹ï³Ì²×ªº diff º¡·N¡A ½Ð§â¥¦¤À³Î¦¨¤@­Ó patch ´N¹ïÀ³¤@­Ó­ì©lÀÉ¡C

4.4.16.12. PREFIX

¸ÕµÛÅý port ¦w¸Ë¦Ü¬Û¹ï©ó PREFIX (³o­Ó­ÈÀ³¸Ó³]¬° LOCALBASE (¹w³]¬O /usr/local)¡A°£«D¤w¸g³]¤F USE_X_PREFIX ©Î USE_IMAKE¡A ³o¼Ëªº¸Ü´NÀ³¸Ó¬O X11BASE (¹w³]¬O /usr/X11R6)¡C)ªº¦ì¸m¡C

¤£­n§â /usr/local ©Î /usr/X11R6 ¼g¦º¦bµ{¦¡½Xªº¥ô¦ó¦a¤è¡A ³o·|Åý port §ó¦³¼u©Ê¦Ó¥B¥i¥Hªï¦X¨ä¥¦¯¸ªº»Ý¨D¡C¹ï¥Î imake ªº X port ¨Ó»¡¡A³o¬O¦Û°Ê²£¥Íªº¡F ¤£µM©¹©¹¥i¥H¶ÈÂǥѧâ port ¸Ì¦U­Ó scripts/Makefiles ¥X²{ /usr/local (¨S¦³¥Î imake ªº X port ´N¬O /usr/X11R6) ªº¦a¤è¨ú¥N¬°¥hŪ¨ú PREFIX ¨Ó¹F¦¨¡A ¦]¬°³o­ÓÅܼƷ|¦Û°Ê¦a©¹¤U¶Ç¦Ü«Ø¥ß»P¦w¸Ë¹Lµ{¤¤ªº¨C­Ó¶¥¬q¡C

¤£­n³] USE_X_PREFIX¡A°£«D§Aªº port ¯uªº»Ý­n¥¦ (¨Ò¦p¡A¥¦³sµ² X ªº¨ç¦¡©Î¥¦¥²¶·°Ñ¦Ò¨ì X11BASE ¸ÌªºÀÉ®×)¡C

PREFIX ³o­ÓÅܼƥi¥H¦b§Aªº Makefile ©Î¨Ï¥ÎªÌªºÀô¹Ò¸Ì­«·s«ü©w¡CµM¦Ó¡A ¦b³æ¿W port ªº Makefiles ©ú½T¦a³]©w³o­ÓÅܼƬO¬Û·í¥O¤H·P¨ì®ð¾kªº¡C

¦P¼Ë¦a¡A¥Î¤W­±´£¨ìªºÅܼƨӰѦҨ䥦 port ªºµ{¦¡/ÀɮסA ¦Ó«D¥Î©ú½Tªº¸ô®|¦WºÙ¡CÁ|­Ó¨Ò¡A¦pªG port »Ý­n¤@­Ó§¹¾ãªº less ¸ô®|¦WºÙ°µ¬°¥¨¶° PAGER¡A ¥Î½sĶ¾¹ªººX¼Ð¡G

    -DPAGER=\"${PREFIX}/bin/less\"
©Î
    -DPAGER=\"${LOCALBASE}/bin/less\"
¦pªG³o¬O¤@­Ó X port¡A¨ú¥N±¼ -DPAGER=\"/usr/local/bin/less\"¡C ³o¼Ë°²¦p¨t²ÎºÞ²zªÌ§â¾ã­Ó `/usr/local' tree ²¾¨ì¨ä¥¦¦a¤è¡A ¥¦·|¦³¸û¨Îªº¾÷·|¥i¥H¹B§@¡C

4.4.16.13. ¤l¥Ø¿ý

¸ÕµÛÅý port §âªF¦è©ñ¨ì PREFIX ¤U¥¿½Tªº¤l¥Ø¿ý¡C ¦³¨Ç port §â©Ò¦³ªF¦è»E¦b¨Ã©ñ¶i»P port ¦P¦Wªº¤l¥Ø¿ý¡A³o¬O¤£¹ïªº¡C ¦P¼Ë¦a¡A¦³«Ü¦h port §â binaries¡Aheader files ©M manual pages ¥H¥~ªº©Ò¦³ªF¦è©ñ¨ì lib ªº¤@­Ó¤l¥Ø¿ý¤U¡A³o¹ï BSD ªº¼Ò½d¨Ã¤£¬O­Ó¦n¥üÀY¡C³o¸Ì­±¦³«Ü¦hÀɮ׳£À³¸Ó²¾¨ì¤U­±©Ò¦C¦ì¸mªº¨ä¤¤¤@­Ó¡G etc (setup/configuration ÀÉ)¡A libexec (¤º³¡±Ò°Êªº¥i°õ¦æÀÉ)¡A sbin (superusers/managers ¥Îªº¥i°õ¦æÀÉ) info (¬° info ÂsÄý¾¹°µªº¤å¥ó) ©Î share (»P¬[ºcµLÃöªºÀÉ®×)¡C¸Ô²Ó¸ê®Æ°Ñ¦Ò man hier(7)¡A¤ä°t /usr ªº³W«h¦³¬Û·í¦hªº³¡¥÷¤]¾A¥Î¦b /usr/local¡C °£¤F³B²z USENET ``news'' ªº port ¥H¥~¡C¥¦­Ì¥H PREFIX/news ¬°Àɮץتº¦a¡C

4.4.16.14. ²M²zªÅ¥Ø¿ý

·í port ³Q¤Ï¦w¸Ë®ÉÅý¥¦¯à²M²z°®²b¡C³o³q±`ÂǥѬ°¨C­Ó©ú½T¦a¥Ñ port «Ø¥ßªº¥Ø¿ý¥[¤W @dirrm ³o´X¦æ¨Ó¹F¦¨¡C ¦b§R°£ parent ¥Ø¿ý«e¥²¶·¥ý§R°£¤l¥Ø¿ý¡C

     :
    lib/X11/oneko/pixmaps/cat.xpm
    lib/X11/oneko/sounds/cat.au
     :
    @dirrm lib/X11/oneko/pixmaps
    @dirrm lib/X11/oneko/sounds
    @dirrm lib/X11/oneko

µM¦Ó¦³®É«á @dirrm ·|¥X²{¿ù»~¦]¬°¨ä¥¦ªº port ¤]¦b¦@¥Î¦P¤@­Ó¤l¥Ø¿ý¡C¥i¥H±q @unexec ©I¥s rmdir ¨Ó²¾°£ªÅ¥Ø¿ý¦Ó¤£¥X²{ĵ§i¡C

    @unexec rmdir %D/share/doc/gimp 2>/dev/null || true

³o±N¤£·|¦L¥X¥ô¦ó¿ù»~°T®§¡A¤]¤£·|³y¦¨ pkg_delete ¤£¥¿±`¸õ¥X§Y¨Ï PREFIX/share/doc/gimp ¤£¬OªÅªº¡A¥Ñ©ó¨ä¥¦ port §â¤@¨ÇÀɮ׸˦b¸Ì­±¡C

4.4.16.15. UIDs

¦pªG»Ý­n¦w¸Ëªº¨t²Î¤W¦³¯S©wªº¬Y¨Ï¥ÎªÌ¡AÅý pkg/INSTALL script ©I¥s pw ¨Ó¦Û°Ê«Ø¥ß¥¦¡C¨Ò¤l¥i¦b net/cvsup-mirror ¬Ý¨ì¡C

¦pªG port ¦w¸Ë¤@­Ó binary package ®É¥²¶·¨Ï¥Î»P½sĶ®É¬Û¦Pªº¨Ï¥ÎªÌ/¸s²Õ(user/group) ID ½s¸¹¡A ¨º´N¥²¶·±q 50 ¨ì 99 ¿ï¾Ü¤@­Ó¥¼³Q¦û¥Îªº UID ¨Ãµn°O¥¦¡C ¨Ò¤l¥i¨ì japanese/Wnn ¬Ý¡C

½T©w§A¨S¦³¥Î¤@­Ó¤w¸g³Q¨t²Î©Î¨ä¥¦ port ¦û¥Îªº UID¡C ³o¸Ì¬O²{¦b 50 ¨ì 99 ¶¡ªº UID ªº¦Cªí¡C

    majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent
    cyrus:*:60:60:the cyrus mail server:/nonexistent:/nonexistent
    gnats:*:61:1:GNATS database owner:/usr/local/share/gnats/gnats-db:/bin/sh
    uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
    xten:*:67:67:X-10 daemon:/usr/local/xten:/nonexistent
    pop:*:68:6:Post Office Owner (popper):/nonexistent:/nonexistent
    wnn:*:69:7:Wnn:/nonexistent:/nonexistent
    ifmail:*:70:66:Ifmail user:/nonexistent:/nonexistent
    pgsql:*:70:70:PostgreSQL pseudo-user:/usr/local/pgsql:/bin/sh
    ircd:*:72:72:IRCd hybrid:/nonexistent:/nonexistent
    alias:*:81:81:QMail user:/var/qmail/alias:/nonexistent
    qmaill:*:83:81:QMail user:/var/qmail:/nonexistent
    qmaild:*:82:81:QMail user:/var/qmail:/nonexistent
    qmailq:*:85:82:QMail user:/var/qmail:/nonexistent
    qmails:*:87:82:QMail user:/var/qmail:/nonexistent
    qmailp:*:84:81:QMail user:/var/qmail:/nonexistent
    qmailr:*:86:82:QMail user:/var/qmail:/nonexistent
    msql:*:87:87:mSQL-2 pseudo-user:/var/db/msqldb:/bin/sh
    mysql:*:88:88:MySQL Daemon:/var/db/mysql:/sbin/nologin

·í´£¥X¤@­Ó­n¹w¯d³o½d³ò¤º·sªº UID ©Î GID ªº port (©Î¤É¯Å)®É¡A ½Ð¥]¬A¶i¤@­Ó¤½§i¡C³o·|®e³\§Ú­Ì§â¹w¯dªº ID ¦Cªí«O«ù¦b³Ì·sª¬ºA¡C

4.4.16.16. ¦X²z¦a°µ¨Æ

Makefile À³¸Ó²³æ¨Ã¦X²z¦a°µ¨Æ¡C ¦pªG¯àÅý¨â¤T¦æÅܱo§óµu©Î§ó¦X¸Ì¡A¨º´N³o»ò°µ§a¡C³o¨Ç¨Ò¤l¥]¬A¥Î .if construct ¨Ó´À¥N shell¡A¦pªG¥i¥H­«·s©w¸q EXTRACT* ´N¤£­n¦A©w¸q do-extract¡AÁÙ¦³¥Î GNU_CONFIGURE ¨Ó´À¥N CONFIGURE_ARGS += --prefix=${PREFIX}¡C

4.4.16.17. ´L­« CFLAGS

port À³¸Ó´L­« CFLAGS ³o­ÓÅܼơC ¦pªG¨S¦³½Ð¥[¤W NO_PACKAGE=ignores cflags ¨ì Makefile ¸Ì¡C

4.4.16.18. Configuration ÀÉ

¦pªG port »Ý­n©ñ¤@¨Ç configuration Àɦb PREFIX/etc ¸Ì¡A ¤£­n¥u¬O¦w¸Ë¥¦­Ì¨Ã¦C¦b pkg/PLIST ¸Ì¡C³o·|³y¦¨ pkg_delete §R°£¨Ï¥ÎªÌ¶O¤ß½s¿èªºÀɮשM³Q·sªº¦w¸Ë§¹¥þ®ø°£¡C

¤Ï¤§¡A¦w¸Ë¦³¦r§À»yªº¼Ë«~ÀÉ (filename.sample ´N¤£¿ù)¨Ã¦L¥X¤@¬qmessage «ü©ú¨Ï¥ÎªÌ¦b¸Ó³nÅé¯à¹B§@¿ú¥²¶·¥ý«þ¨©¨Ã½s¿è¸ÓÀɮסC

4.4.16.19. Portlint

¦b´£¥X©Î commit ¤§«e¥Î portlint Àˬd¦¨ªG¡C

4.4.16.20. ¦^õX

§â¾A¦Xªº§ïÅÜ/patch ±Hµ¹­ì¥ýªº§@ªÌ/maintainer ¥H¦b¤U¤@­ÓÄÀ¥Xªºµ{¦¡½X¥]§t¶i¥h¡C³o¥u·|Åý§A¦b¤U¤@ª©ªº¤u§@§ó»´ÃP¡C

4.4.16.21. Miscellanea

pkg/DESCR¡Apkg/COMMENT¡A ©M pkg/PLIST ¨C­ÓÀɳ£À³¸Ó¥[­¿Àˬd¡C ¦pªG­«·sÀ˵ø¤@­Ó port ¨Ãı±o¥i¥Hªí¹Fªº§ó¦n¡A´N°µ§a¡C

¤£­n½Æ»sÃB¥~ªº GNU ¤j²³¤½¥Îª©Åv(GPL) ªº½Æ¥»¨ì§Ú­Ìªº¨t²Î¡A«ô¦«¡C

½Ð¤p¤ßª`·N¥ô¦óªºªk«ßijÃD¡I¤£­nÅý§Ú­Ì¹Hªk´²§G³nÅé¡I

4.4.16.22. ¦pªG·P¨ì§x´b...

¦b°Ý§Ú­Ì¥ô¦ó°ÝÃD«e¥ý¬Ý²{¦sªº¨Ò¤l©M bsd.port.mk ÀÉ¡I ;)

¦pªG¦³¥ô¦ó³Â·Ð´N°Ý§Ú­Ì§a¡I¤£­n¥ÎÀY¥h¼²Àð¡I:-)

4.4.17. ¤@­Ó Makefile ªº¼Ë«~

³o¸Ì¦³­Ó Makefile ªº¼Ë«~¥i¥H¥Î¨Ó³Ð³y¤@­Ó·sªº port¡C½T©w¤w²¾°£©Ò¦³ÃB¥~ªº»¡©ú(¤è¬A©·¤ºªºªF¦è)¡I

«Øij§A¸òµÛ³o­Ó®æ¦¡(Åܼƪº¦¸§Ç¡A³¹¸`¶¡ªºªÅ¦æµ¥µ¥)¡C ³o­Ó®æ¦¡³Q³]­p©ó®e©ö§ä¨ì¤j³¡¥÷ªº­«­n°T®§¡C§Ú­Ì«Øij¥Î portlint ¨ÓÀˬd Makefile¡C

    [ÀÉÀY...¥u¬OÅý§Ú­Ì®e©ö½T»{ port¡C]
    # New ports collection makefile for:   xdvi
    [·í¤É¯Å¤@­Ó port ®É version required ªºÀÉÀYÀ³¸Ó§ó·s¡C]
    # Version required:    pl18 [things like "1.5alpha" are fine here too]
    [³o¬O³o­Ó Makefile ªº²Ä¤@ª©³Ð³y®Éªº¤é´Á¡C§ó·s port ®Éµ´¤£­n§ïÅܳo­Ó¡C]
    # Date created:                26 May 1995
    [³o¬O°µ¥X³Ìªìªº port µ¹ FreeBSD ªº¤H¡A¤×¨ä¬O¼g¥X³o­Ó Makefile ²Ä¤@ª©ªº¤H¡C
    °O¦í¡A¥H«á¤É¯Å port ®É³o¤£À³¸Ó§ïÅÜ¡C]
    # Whom:                        Satoshi Asami <asami@FreeBSD.org>
    #
    # $FreeBSD$
    [ ^^^^^^^^^ ·í¥¦³Q commit ¨ì§Ú­Ìªº¶JÂîw®É·|³Q CVS ¦Û°Ê¦a¥H RCS ID ¦r¦ê¨ú¥N¡C 
    ¦pªG¤É¯Å port¡A¤£­n§â³o¦æ§ï¦^ "$FreeBSD$"¡CCVS ·|¦Û°Ê³B²z¡C]
    #
           
    [¥Î¨Ó´y­z port ¥»¨­©M¥D¯¸ªº³¹¸` - DISTNAME ¥Ã»·³Ì¥ý¡A¸òµÛ¬O PKGNAME(¦pªG»Ý­n)¡A
     CATEGORIES¡AµM«á¬O MASTER_SITES¡AMASTER_SITE_SUBDIR ¥i¥H¸ò¦b¨ä«á¡C
     ¦b³o¨Ç¤§«á¡AEXTRACT_SUFX ©Î DISTFILES ¤¤¤§¤@¤]¥i¥H¸Ô¸ü¡C]ü
    DISTNAME=      xdvi
    PKGNAME=       xdvi-pl18
    CATEGORIES=    print
    [¦pªG¤£¬O¥Î MASTER_SITE_* ¥¨¶°§O§Ñ¤F³Ì«áªº±×½u ("/")¡I] 
    MASTER_SITES=  ${MASTER_SITE_XCONTRIB}
    MASTER_SITE_SUBDIR= applications
    [¦pªGµ{¦¡½X¤£¬O¥Î¼Ð·Çªº ".tar.gz" µ²ºc´N³]©w³o­Ó]
    EXTRACT_SUFX=  .tar.Z
           
    [´²§Gªº patch ªº³¹¸` -- ¥i¥HªÅµÛ]
    PATCH_SITES=   ftp://ftp.sra.co.jp/pub/X11/japanese/
    PATCHFILES=    xdvi-18.patch1.gz xdvi-18.patch2.gz
           
    [maintainer; *©e°UºÞ²zªº*¡I³o¬O¤@­Ó¨Ï¥ÎªÌ¦³°ÝÃD©M bug ¦^³ø®ÉÁpµ¸ªº¤H
     (³Ì¦n¦³ commit ªº¯SÅv) - ³o­Ó¤HÀ³¸Ó¬O porter ©Î¬O¥i¥H§Y¨è¦X²z¦a¶Ç¹F°ÝÃDµ¹°_ªìªº
     porter ªº¤H¡C¦pªG¯uªº¤£·Q¦b³o¼g¤W¦ì§}¡A´N³]¬° "ports@FreeBSD.org"¡C]
    MAINTAINER=    asami@FreeBSD.org
           
    [dependencies -- ¥i¥HªÅµÛ]
    RUN_DEPENDS=   gs:${PORTSDIR}/print/ghostscript
    LIB_DEPENDS=   Xpm.5:${PORTSDIR}/graphics/xpm
           
    [³o­Ó³¹¸`¬O¬°¤F¤£ÄÝ©ó¤W­±¥ô¤@³¹ªº¨ä¥¦¼Ð·Çªº bsd.port.mk ÅܼÆ]
    [¦pªG¦b configure¡A«Ø¥ß¡A¦w¸Ë...ªº¹Lµ{¤¤·|°Ý°ÝÃD]
    IS_INTERACTIVE=        yes
    [¦pªG¥¦¸Ñ¨ì ${DISTNAME} ... ¥H¥~ªº¥Ø¿ý]
    WRKSRC=                ${WRKDIR}/xdvi-new
    [¦pªG´²§Gªº patch ¨S¦³¬Û¹ï©ó ${WRKSRC}¡A¥i¯à±o¶O¤ß³B²z³o­Ó]
    PATCH_DIST_STRIP=      -p1
    [¦pªG¥¦»Ý­n°õ¦æ¤@­Ó¥Ñ GNU autoconf ²£¥Íªº "configure" script]
    GNU_CONFIGURE= yes
    [¦pªG¥¦¶·­n¥Î GNU make ¨Ó«Ø¥ß...¡A¦Ó¤£¬O /usr/bin/make]
    USE_GMAKE=     yes
    [¦pªG¥¦¬O¤@­Ó X À³¥Îµ{¦¡¥B»Ý­n°õ¦æ "xmkmf -a"]
    USE_IMAKE=     yes
    [et cetera.]
           
    [¥Î¦b¤U­±³W«hªº«D¼Ð·ÇÅܼÆ]
    MY_FAVORITE_RESPONSE=  "yeah, right"
           
    [¦A¨Ó¬O¯S®íªº³W«h¡A¥H¥¦­Ì³Q©I¥sªº¶¶§Ç±Æ¦C]
    pre-fetch:
            i go fetch something, yeah
           
    post-patch:
            i need to do something after patch, great
           
    pre-install:
            and then some more stuff before installing, wow
           
    [µM«á´N¬Oµ²§À¤F]
    .include <bsd.port.mk>

4.4.18. Automated package list creation

­º¥ý¡A½T©w port ¤w´X¥G§¹¦¨¡A¥u¯Ê PLIST¡C ³Ð³y¤@­ÓªÅªº PLIST¡C

    # touch PLIST

¦A¨Ó¡A³Ð³y¤@²Õ port ¥i¥H¦w¸Ëªº·s¥Ø¿ý¡A¨Ã¦w¸Ë¥ô¦óªº dependency¡C

    # mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/port-name
    # make depends PREFIX=/var/tmp/port-name

§â¥Ø¿ýªºµ²ºc¦s¦b¤@­Ó·sÀɮ׸̡C

    # (cd /var/tmp/port-name && find * \! -type d) > OLD-DIRS

¦pªG port ´L·q PREFIX (¥¦À³¸Ó¦p¦¹) ±µµÛ´N¥i¥H¦w¸Ë port ¨Ã³Ð³y package ¦Cªí¡C

    # make install PREFIX=/var/tmpport-name
    # (cd /var/tmp/port-name && find * \! -type d) > pkg/PLIST

§A¤]¥²¶·§â¥ô¦ó³Ì·s³Ð³yªº¥Ø¿ý¥[¶i¥]¸Ë¦Cªí¡C

    # (cd /var/tmp/port-name && find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm#' >> pkg/PLIST

³Ì«á¡A¥²¶·¦Û¤v°Ê¤â¾ã²z¥]¸Ë¦Cªí¡C·í§Ú»¡³o¬O¥þ¦Û°Ê®É§Ú¼»¤F­ÓÁÀ¡C Manual pages À³¸Ó¦C¦b port ªº Makefile ¸Ìªº MANn ¤U¡A ¦Ó¤£¬O¦b¥]¸Ë¦Cªí¸Ì¡C¨Ï¥ÎªÌªº configuration ÀÉÀ³¸Ó²¾°£¡A©Î¬O¦w¸Ë¬° filename.sample¡C ¥ô¦ó port ¦w¸Ëªº¨ç¦¡À³¸Ó¦p¦P ldconfig ¸Ó¸`©Ò¸Ô­zªº¤è¦¡¦C¥X¡C

4.4.19. Package ªº¦WºÙ

±µ¤U¨Ó¬O¦b¬° package ©R¦W®ÉÀ³¿í¦uªººD¨Ò¡C³o¬O¬°¤FÅý§Ú­Ìªº package ªº¥Ø¿ý®e©ö·j´M¡A¦]¬°¤w¸g¦³¤Ó¦h¤Ó¦hªº package¡A °²¦p³o¶Ë¨ì¥L­Ìªº²´·ú¨º¥L­Ì´N·|Á׶}¤F¡I

Package ªº¦WºÙÀ³¸Ó¬Ý°_¨Ó¹³ language-name-compiled.specifics-version.numbers.

¦pªG DISTNAME ¬Ý°_¨Ó¤£¹³³o­Ó¡A´N§â PKGNAME ³]¬°³oºØ®æ¦¡¡C

  1. FreeBSD ºÉ¤O¥h¤ä´©¨Ï¥ÎªÌªº¥»¦a»y¨¥¡C¦pªG port «ü©wµ¹¬Y¯S©w»y¨¥¡A language- ªº³¡¥÷´NÀ³¸Ó¬O¸Ó»y¨¥¥Ñ ISO-639 ©Ò©w¸qªº¨â­Ó¦r¥ÀªºÁY¼g¡C¨Ò¦p Japanese ¬O ja¡A Russian ¬O ru¡AVietnamese ¬O vi¡Ahinese ¬O zh¡A Korean ¬O ko¡A¦Ó German ¬O de¡C

  2. name ªº³¡¥÷À³¸Ó¥þ¬O¤p¼g¡A°£¤F¯uªº«Ü¤jªº package (¸Ì­±¦³«Ü¦hµ{¦¡)¡C¦p XFree86 (¨S¿ù¡A¯uªº¦³³o­Ó port¡A ¬d¤@¤U§a) ©M ImageMagick ´N¬O³o¤@Ãþ¡C§_«hªº¸Ü¡A§â¦W¦r (©Î¦Ü¤Ö²Ä¤@­Ó¦r¥À)Âন¤p¼g¡C¦pªG¤j¼g¦r¥À¹ï¦WºÙ«Ü­«­n(¨Ò¦p¹³ R ©Î V ¦³¤@­Ó¦r¥Àªº¦WºÙ) §A¥i¥H¦Û¤v·r°u¨Ï¥Î¤j¼g¦r¥À¡C¬° Perl 5 ªº¼Ò²Õ©R¦W¶Ç²Î¤W·|¹w¥ý¥[¤W p5- ¨Ã§âÂù«_¸¹ªº¤À¹jÂର³s¦r¸¹¡F¨Ò¦p Data::Dumper ¼Ò²ÕÅܬ° p5-Data-Dumper¡C¦pªG¦³ª§Ä³ªº³nÅé¦WºÙ¤¤¦³ ¼Æ¦r¡A³s¦r¸¹¡A©Î©³½u¡A¤]¥i¥H§â¥¦­Ì³£¥]¬A¶i¥h (´N¹³ kinput2)¡C

  3. ¦pªG port ¥i¥H¥Î¤£¦Pªº hardcoded defaults «Ø¥ß (³q±`¬O¤@­Ó port ªº®a±Úªº¥Ø¿ý¦WºÙªº¤@³¡¥÷)¡A -compiled.specifics ªº³¡¥÷À³¸ÓÁn©ú¤F compiled-in ªº¹w³]­È (³s¦r¸¹¬O¿ï¾Ü©Êªº)¡C¨Ò¦p¯È±i¤j¤p©M¦r«¬³æ¤¸¡C

  4. version ¦r¦êÀ³¸Ó¬O¥yÂI¤À¹jªº¾ã¼Æ©M¤@­Ó·Ó¶¶§Çªº¤p¼g¦r¥À¡C °ß¤@ªº¨Ò¥~¬O pl (ªí¥Ü `patchlevel') ¦r¦ê¡A ³o°ß¦³·í³nÅé¨S¦³¥D­n©M¦¸­nªºª©¥»½s¸¹¤~¥i¥H¥Î¡C

³o¸Ì¦³¨Ç¦p¦ó§â DISTNAME Âà´«¦¨¦X¾Aªº PKGNAME ªº(¯u¹êªº)¨Ò¤l¡G

µo¦æª©¥»ªº¦WºÙPackage ¦WºÙ­ì¦]
mule-2.2.2.mule-2.2.2¤£¥Î§ï
XFree86-3.1.2XFree86-3.1.2¤£¥Î§ï
EmiClock-1.0.2emiclock-1.0.2³æ¤@µ{¦¡¤£¥Î¤j¼g¦WºÙ
gmod1.4gmod-1.4ª©¥»½s¸¹«e»Ý­n¤@­Ó³s¦r¸¹
xmris.4.0.2xmris-4.0.2ª©¥»½s¸¹«e»Ý­n¤@­Ó³s¦r¸¹
rdist-1.3alphardist-1.3a¤£¯à¦³¹³ alpha ªº¦r¦ê
es-0.9-beta1es-0.9b1¤£¯à¦³¹³ beta ªº¦r¦ê
v3.3beta021.srctiff-3.3³o­Ë©³¬O¤°»òªF¦è¡H
tvtwmtvtwm-pl11¤@©w­n¦³ª©¥»¦r¦ê
piewmpiewm-1.0¤@©w­n¦³ª©¥»¦r¦ê
xvgr-2.10pl1xvgr-2.10.1°ß¦³¨S¥D­n/¦¸­nªºª©¥»½s¸¹¤~¥i¥Î pl
gawk-2.15.6ja-gawk-2.15.6¤é»yªºª©¥»
psutils-1.13psutils-letter-1.13Package ½sij®É¤w¼g¦ºªº¯È±i¤j¤p
pkfontspkfonts300-1.0300dpi ¦r«¬ªº package

¦pªG¦b­ì©lªºµ{¦¡½X¸Ì§¹¥þ¨S¦³ª©¥»¸ê°Tªº²ª¸ñ¡A ¦Ó¥B°_ªìªº§@ªÌ¤]¤£¤j¥i¯à´¿¸gÄÀ¥X¨ä¥¦ª©¥»¡A´N§âª©¥»ªº¦r¦ê³]¬° 1.0 (´N¹³¤W­±ªº¨Ò¤l piewm)¡C §_«h´N°Ý°_ªìªº§@ªÌ©Î¥Î¤é´Á¦r¦ê (yy.mm.dd) ·íª©¥»¡C

4.4.20. ºØÃþ

¦p¦P¤wª¾¡Aport ¥H¼Æ­ÓºØÃþ¨Ó¤ÀÃþ¡C¤£¹L­nÅý³oµo´§¥\®Ä¡Aporter ©M¨Ï¥ÎªÌ¤F¸Ñ¨C­ÓºØÃþ¦Ó¥B§Ú­Ì¨M©w¨C­ÓºØÃþ­n©ñ¤°»ò¬O«Ü­«­nªº¡C

4.4.20.1. ²{¦bªº¤ÀÃþ¦Cªí

­º¥ý¡A³o¬O²{¦b port ªººØÃþªº¦Cªí¡C¥H¬P¸¹(*) ¼Ð¥Üªº¬OµêÀÀªººØÃþ--¨º¨Ç¦b ports tree ¸Ì¨Ã¨S¦³¬Û¹ïÀ³ªº¤l¥Ø¿ý¡C

Note: ¦Ó«DµêÀÀªººØÃþ¡A¥i¥H¦b¸Ó¤l¥Ø¿ý¸Ìªº pkg/COMMENT §ä¨ì¤@¦æªº´y­z(¦p archivers/pkg/COMMENT)¡C

ºØÃþ´y­z
afterstep*¤ä´© AfterStep µøµ¡ºÞ²z­ûªº port
archiversÀɮ׳B²zªº¤u¨ã¡C
astro¤Ñ¤åªº port¡C
audioÁn­µªº¤ä´©¡C
benchmarks®Ä¯àµû¤ñªº¤u¨ã¡C
biology¦³Ãö¥Íª«ªº³nÅé¡C
cad¹q¸£»²§U³]­pªº¤u¨ã¡C
chinese¤¤¤åªº¤ä´©¡C
comms³q°T³nÅé¡C¤j³¡¥÷ªº³nÅé¬O¥Î¦ê¦C°ð¥æ½Í¡C
converters¦r½XªºÂà´«¾¹¡C
databases¸ê®Æ®w¡C
deskutils¹q¸£µo©ú«e¦b®à¤WªºªF¦è¡C
develµo®i¤u¨ã¡C¤£­n¥u¦]¬°¥¦­Ì¬O¨ç¦¡´N§â¨ç¦¡©ñ¦b³o-- °£«D¥¦­Ì¯uªº¤£ÄÝ©ó¨ä¥¦¦a¤è¡A§_«h¥¦­Ì¤£¸Ó¦b³oºØÃþ¸Ì¡C
editors¤@¯ëªº½s¿è¾¹¡C¯S®í¥Î³~ªº½s¿è¾¹¦b¨º¨Ç¤u¨ãªº°Ï°ì¸Ì (¨Ò¦p¡A¼Æ¾Ç¤½¦¡ªº½s¿è¾¹·|¦b math)¡C
elispEmacs-lisp ªº port¡C
emulators¨ä¥¦§@·~¨t²Îªº¼ÒÀÀ¾¹¡C²×ºÝ¾÷(terminal)ªº¼ÒÀÀ¾¹ ¤£ÄÝ©ó³o¸Ì--¥H X ¬°°ò¦ªºÀ³¸Ó¦b x11 ¦Ó¤å¦r°ò¦ªº¤£¬O¦b comms ´N¬O misc¡A µø¨ä½T¹êªº¥\¯à¦Ó©w¡C
ftpFTP «È¤áºÝ©M¦øªA¾¹ºÝªº¤u¨ã¡C¦pªG port ¥i»P FTP ©M HTTP ¥æ½Í¡A§â¥¦¥H www ¬°¦¸­nªº¤ÀÃþ©ñ¦b ftp¡C
games¹CÀ¸¡C
german¼w»yªº¤ä´©¡C
gnome*¨Ó¦Û GNU Object Model Environment (GNOME) Project ªº port¡C
graphics¹Ï§Î¤u¨ã¡C
ircInternet Chat Relay ªº¤u¨ã¡C
japanese¤é»yªº¤ä´©¡C
javaJava »y¨¥ªº¤ä´©¡C
kde*¨Ó¦Û K Desktop Environment (KDE) Project ªº port¡C
koreanÁú»yªº¤ä´©¡C
langµ{¦¡»y¨¥¡C
mail¶l¥ó³nÅé¡C
math¼Æ­È¹Bºâªº³nÅé©M¨ä¥¦ªº¼Æ¾Ç¤u¨ã¡C
mboneMBone ªºÀ³¥Îµ{¦¡¡C
misc¦U¦¡¦U¼Ëªº¤u¨ã--°ò¥»¤W¬O¤£ÄÝ©ó¥ô¦ó¦a¤èªºªF¦è¡C ³o¬O°ß¤@¤£À³¸Ó¥X²{¨ä¥¦«DµêÀÀºØÃþªº¤ÀÃþ¡C¦pªG§A¦b CATEGORIES ¨º¦æ¦³ misc ¥H¥~ªºªF¦è¡A¨º§A¥i¥H©ñ¤ß¦a§R°£ misc ¨Ã§â port ©ñ¶i¥t¤@­Ó¤l¥Ø¿ý¡I
net¦U¦¡¦U¼Ëªººô¸ô³nÅé¡C
newsUSENET news ªº³nÅé¡C
offix*¨Ó¦Û OffiX ®M¥óªº port¡C
palm3Com Palm(tm) ¨t¦Cªº³nÅé¤ä´©¡C
perl5*»Ý­n perl ²Ä¤­ª©¤~¯à°õ¦æªº port¡C
plan9*Plan9 ªº¦UºØµ{¦¡¡C
print¦C¦L³nÅé¡C®à­±¥Xª©ªº¤u¨ã¤]ÄÝ©ó³o¸Ì (previewers µ¥µ¥)¡C
python*¥Î python ¼gªº³nÅé¡C
russian«X»yªº¤ä´©¡C
security¹q¸£¦w¥þªº¤u¨ã¡C
shells©R¥O¦C¤Uªº shell¡C
sysutils¨t²Î¤u¨ã¡C
tcl75*¥Î Tcl 7.5 ª©°õ¦æªº port¡C
tcl76*¥Î Tcl 7.6 ª©°õ¦æªº port¡C
tcl80*¥Î Tcl 8.0 ª©°õ¦æªº port¡C
tcl81*¥Î Tcl 8.1 ª©°õ¦æªº port¡C
textproc¤å¦r³B²zªº¤u¨ã¡C¥¦¤£¥]¬A®à­±¥Xª©ªº¤u¨ã¡A ¨ºÄÝ©ó print/¡C
tk41*¥Î Tk 4.1 ª©°õ¦æªº port¡C
tk42*¥Î Tk 4.2 ª©°õ¦æªº port¡C
tk80*¥Î Tk 8.0 ª©°õ¦æªº port¡C
tk81*¥Î Tk 8.1 ª©°õ¦æªº port¡C
tkstep80*¥Î TkSTEP 8.0 ª©°õ¦æªº port¡C
vietnamese¶V«n»yªº¤ä´©¡C
windowmaker*¤ä´© WindowMaker µøµ¡ºÞ²z­ûªº port
www¸ò World Wide Web ¦³Ãöªº³nÅé¡CHTML »y¨¥ªº¤ä´©¤]ÄÝ©ó³o¸Ì¡C
x11X window system ©M¥¦ªºªB¤Í­Ì¡C ³o­ÓºØÃþ¥uµ¹ª½±µ¤ä´©µøµ¡¨t²Îªº³nÅé¡C¤£­n§â¥­±`ªº X À³¥Îµ{¦¡©ñ¦b³o¡C¦pªG port ¬O­Ó X À³¥Îµ{¦¡¡A ©w¸qUSE_XLIB (¥]§t¦³ USE_IMAKE) ¨Ã§â¥¦©ñ¦b¾A·íªººØÃþ¡C ¦P¼Ë¦a¡A¥¦­Ì¸Ì­±¦³«Ü¦hÄÝ©ó¨ä¥¦ªº x11-* ºØÃþ(¬Ý¤U­±)¡C
x11-clocksX11 ªº®ÉÄÁ¡C
x11-fmX11 ªºÀɮ׺޲z­û¡C
x11-fontsX11 ªº¦r«¬©M¦r«¬¤u¨ã¡C
x11-serversX11 servers.
x11-toolkitsX11 toolkits.
x11-wmX11 µøµ¡ºÞ²z­û¡C

4.4.20.2. ¿ï¾Ü¥¿½TªººØÃþ

¦]¬°¦³«Ü¦hªººØÃþ­«Å|¡A§A¥²¶·¿ï¾Ü¦óªÌ¬° port ­º­nªººØÃþ¡C ¦³´X­Ó³W«h¤ä°tµÛ³o­ÓijÃD¡C³o¸Ì¦³¥÷Àu¥ýÅvªº¦Cªí¡A¨äÀu¥ýÅv¨Ì§Ç»¼´î¡C

  • ¯S©w»y¨¥ªººØÃþ¥Ã»·¬O²Ä¤@­Ó¡C¨Ò¦p¡A¦pªG port ¦w¸Ë ¤é»yªº X11 ¦r«¬¡A¨º CATEGORIES ¨º¦æÀ³¬O japanese x11-fonts¡C

  • «ü©wºØÃþªº³Ó¹L¯Ê¥F«ü©wªº¡CÁ|­Ó¨Ò¡A¤@­Ó HTML ½s¿è¾¹À³¸Ó¦C¦¨ www editors¡A¦Ó¤£¬O¬Û¤Ï¹L¨Óªº¤è¦¡¡C ¦P¼Ë¦a¡A·í port ÄÝ©ó irc¡A mail¡Ambone¡A news¡Asecurity¡A ©Î www ¨ä¤¤¤§¤@®É¡A«K¤£»Ý­n¦C¥X net¡C

  • ¥u¦³·í­º­nªººØÃþ¬O¥À»y®É x11 ¤~¥i·í§@²Ä¤G­ÓºØÃþ¡CX ªºÀ³¥Îµ{¦¡¯S§O¤£¸Ó§â x11 ©ñ¶iºØÃþ¨º¦æ¡C

  • Emacs ªº¼Ò²ÕÀ³¸Ó©M¨ä¤ä´©ªºÀ³¥Îµ{¦¡©ñ¦b¦P¤@­ÓºØÃþ¸Ì¡A ¦Ó¤£¬Oeditors¡C¨Ò¦p¡A ¥Î¨Ó½s¿è¬Y¨Çµ{¦¡»y¨¥ªº­ì©lÀɪº Emacs ¼Ò²Õ´NÀ³¸Ó¦b lang ¸Ì¡C

  • ¦pªG port ¯uªº¤£ÄÝ©ó¥ô¦ó¦a¤è¡A´N§â¥¦©ñ¦b misc¡C

¦pªG¤£½T©w¬O¦óºØÃþ¡A½Ð¦b°e¥Xªº send-pr ¸Ìªþ¤W¤@¬qµùÄÀ»¡©ú¡A¥H«K§Ú­Ì¥i¥H¦b§â¥¦¿é¤J«e°Q½×°Q½×¡C (¦pªG§A¬O committer¡A±H¤W¤@¥÷³Æ§Ñ¿ý¨ì FreeBSD ports mailing list ¡A ³o¼Ë§Ú­Ì¥i¥H¥ý°Q½×¥¦--·sªº port ©¹©¹³Q¿é¤J¨ì¿ù»~ªººØÃþµ²ªG³Q¥ß¨è²¾¨«¡C)

4.4.21. ¹ï³o¥÷¤å¥ó©M ports ¨t²Îªº§ïÅÜ

¦pªG§AºûÅ@¤j¶qªº port¡AÀ³¸Ó¦Ò¼{¸òµÛFreeBSD ports mailing list ¡C¹ï port ªº¹B§@ªº­«­n§ïÅܳ£·|¦b³o¸Ì¤½§i¡C§A¥Ã»·¥i¥H¦b the bsd.port.mk CVS log §ä¨ì³Ì·sªºÅܰʪº¸Ô²Ó¸ê°T¡C

4.4.22. ¦U¦ì¦P­M­Ì¡A´N³o¼Ë¤F¡I

«z¡A³o¬q»¡©ú¯u¬Oªø¡A¤£¬O¶Ü¡H¯uªº·PÁ¦U¦ì¸ò§Ú­Ì¨«¨ì³oÃä¡C ²{¦b§Aª¾¹D¦p¦ó°µ¤@­Ó port ¨Ã§â¥@¬É¤W¨C­ÓªF¦èÂà´«¨ì port ¸Ì¤F¡I ³o¬O¶}©l¹ï FreeBSD Project °µ¥X°^Äm³Ì²³æªº¤è¦¡¡I :-)