FreeBSD Documentation - Hosted by Maarga Systems - the
IBM Lotus Notes Workflow Application Developer
FreeBSD Porter's Handbook
The FreeBSD Documentation Project
Copyright
© 2000, 2001, 2002, 2003, 2004 The FreeBSD Documentation Project
Table of Contents
1
Introduction
2
Making a port yourself
3
Quick Porting
3.1
Writing the
Makefile
3.2
Writing the description files
3.2.1
pkg-descr
3.2.2
pkg-plist
3.3
Creating the checksum file
3.4
Testing the port
3.5
Checking your port with
portlint
3.6
Submitting the port
4
Slow Porting
4.1
How things work
4.2
Getting the original sources
4.3
Modifying the port
4.4
Patching
4.5
Configuring
4.6
Handling user input
5
Configuring the Makefile
5.1
The original source
5.2
Naming
5.2.1
PORTNAME
and
PORTVERSION
5.2.2
PORTREVISION
and
PORTEPOCH
5.2.3
PKGNAMEPREFIX
and
PKGNAMESUFFIX
5.2.4
Package Naming Conventions
5.3
Categorization
5.3.1
CATEGORIES
5.3.2
Current list of categories
5.3.3
Choosing the right category
5.3.4
Proposing a new category
5.3.5
Proposing reorganizing all the categories
5.4
The distribution files
5.4.1
DISTNAME
5.4.2
MASTER_SITES
5.4.3
EXTRACT_SUFX
5.4.4
DISTFILES
5.4.5
EXTRACT_ONLY
5.4.6
PATCHFILES
5.4.7
Multiple distribution files or patches from different sites and subdirectories (
MASTER_SITES:n
)
5.4.8
DIST_SUBDIR
5.5
MAINTAINER
5.6
COMMENT
5.7
Dependencies
5.7.1
LIB_DEPENDS
5.7.2
RUN_DEPENDS
5.7.3
BUILD_DEPENDS
5.7.4
FETCH_DEPENDS
5.7.5
EXTRACT_DEPENDS
5.7.6
PATCH_DEPENDS
5.7.7
DEPENDS
5.7.8
USE_
*
5.7.9
Notes on dependencies
5.7.10
Circular dependencies are fatal
5.8
Makefile Options
5.8.1
WITH_
*
and
WITHOUT_
*
5.9
Specifying the working directory
5.9.1
WRKSRC
5.9.2
NO_WRKSUBDIR
5.10
CONFLICTS
5.11
Building mechanisms
6
Special considerations
6.1
Shared Libraries
6.2
Ports with distribution restrictions
6.2.1
NO_PACKAGE
6.2.2
NO_CDROM
6.2.3
RESTRICTED
6.2.4
RESTRICTED_FILES
6.3
Using
perl
6.4
Using X11
6.5
Using
automake
,
autoconf
, and
libtool
6.6
Using GNOME
6.7
Using KDE
6.8
Using Bison
6.9
Using Java
6.9.1
Variable definitions
6.9.2
Best practices
6.10
Using Python
6.11
Using Emacs
6.12
Using Ruby
6.13
Using SDL
7
MASTERDIR
8
Shared library versions
9
Manpages
10
Ports that require Motif
10.1
USE_MOTIF
10.2
MOTIFLIB
11
X11 fonts
12
Info files
13
The
pkg-
*
files
13.1
pkg-message
13.2
pkg-install
13.3
pkg-deinstall
13.4
pkg-req
13.5
Changing
pkg-plist
based on make variables
13.6
Changing the names of
pkg-
*
files
14
Testing your port
14.1
Running
make describe
14.2
Portlint
14.3
PREFIX
15
Upgrading
16
Ports security
16.1
Why security is so important
16.2
Fixing security vulnerabilities
16.3
Keeping the community informed
16.3.1
The VuXML database
16.3.2
A short introduction to VuXML
16.3.3
Testing your changes to the VuXML database
16.3.4
If VuXML still scares you...
17
Dos and Don'ts
17.1
Introduction
17.2
Stripping Binaries
17.3
INSTALL_* macros
17.4
WRKDIR
17.5
WRKDIRPREFIX
17.6
Differentiating operating systems and OS versions
17.7
__FreeBSD_version values
17.8
Writing something after
bsd.port.mk
17.9
Install additional documentation
17.10
Subdirectories
17.11
Cleaning up empty directories
17.12
UIDs
17.13
Do things rationally
17.14
Respect both
CC
and
CXX
17.15
Respect
CFLAGS
17.16
Configuration files
17.17
Feedback
17.18
README.html
17.19
Marking a port
BROKEN
,
FORBIDDEN
, or otherwise not installable
17.20
Necessary workarounds
17.21
Miscellanea
17.22
If you are stuck...
18
A Sample
Makefile
19
Automated package list creation
20
Keeping Up
20.1
FreshPorts
20.2
The Web Interface to the Source Repository
20.3
The FreeBSD Ports Mailing List
20.4
The FreeBSD Port Building Cluster on
pointyhat.FreeBSD.org
20.5
The FreeBSD Port Distfile Survey
20.6
The FreeBSD Ports Monitoring System
List of Tables
5-1.
The
USE_
*
variables
5-2.
The
WITH_
*
and
WITHOUT_
*
variables
6-1.
Variables for ports that use
perl
6-2.
Variables for ports that use X
6-3.
Variables for ports that use automake, autoconf or libtool
6-4.
Variables for ports that use KDE
6-5.
Variables that may be set by ports that use Java
6-6.
Variables provided to ports that use Java
6-7.
Constants defined for ports that use Java
17-1.
__FreeBSD_version values
List of Examples
5-1.
Simplified use of
MASTER_SITES:n
with 1 file per site
5-2.
Simplified use of
MASTER_SITES:n
with more than 1 file per site
5-3.
Detailed use of
MASTER_SITES:n
in
MASTER_SITE_SUBDIR
5-4.
Detailed use of
MASTER_SITES:n
with comma operator, multiple files, multiple sites and multiple subdirectories
5-5.
Detailed use of
MASTER_SITES:n
with
MASTER_SITE_SOURCEFORGE
5-6.
Simplified use of
MASTER_SITES:n
with
PATCH_SITES
.
14-1.
How to avoid using
.error
Next
Introduction
For questions about the FreeBSD ports system, e-mail <
ports@FreeBSD.org
>.
For questions about this documentation, e-mail <
doc@FreeBSD.org
>. FreeBSD Documentation - Hosted by Maarga Systems - the
IBM Lotus Notes Solution Development Company