diff --git a/en/gnome/docs/porting.sgml b/en/gnome/docs/porting.sgml index 2973aa0043..5b899dee24 100644 --- a/en/gnome/docs/porting.sgml +++ b/en/gnome/docs/porting.sgml @@ -1,16 +1,12 @@ - + %gnomeincludes; %includes; ]> &header; - -
@@ -19,73 +15,198 @@
instructions can be found in the
FreeBSD Porter's Handbook.
+
GNOME Makefile Macros-For ports that require GNOME, you should define the following - in your port's Makefile: +Recently, the GNOME porting infrastructure has undergone some + changes so that GNOME 1 applications can coexist with the GNOME + 2 desktop and vice versa. This new infrastructure is called + GNOMENG. The GNOME team is working to port the + applications using the old infrastructure over to GNOMENG. + Currently, all of the GNOME 1 desktop and the GNOME Fifth Toe + have been ported. --USE_GNOME= yes +- These will take care of the install prefix and requiring all the - core GNOME dependencies. If your port can use GNOME, but it isn't - required, you can define the following in your Makefile: +The list of GNOME components consists of one or more of + the following separated by a single space: --WANT_GNOME= yes -- - If the ports system detects GNOME installed on the system - then GNOME components will be built. Other useful GNOME-related - macros that can be define in your port's Makefile include: - - +
libghttp : This adds a dependency on + www/libghttp. If your port can optionally use GNOME, you must set - WANT_GNOME= yes in your Makefile, then check to see if - HAVE_GNOME is set. Since this is a conditional - evaluation, you need to stick it between bsd.port.pre.mk - and bsd.port.post.mk. For example: +glib12 : This adds a dependency on + devel/glib12 (replaces USE_GLIB). + gtk12 : This adds a dependency on + x11-toolkits/gtk12 (replaces USE_GTK). libxml : This adds a dependency on + textproc/libxml. gdkpixbuf : This adds a dependency on + graphics/gdk-pixbuf. imlib : This adds a dependency on + graphics/imlib (replaces USE_IMLIB). orbit : This adds a dependency on + devel/ORBit. gnomelibs : This adds a dependency on + x11/gnomelibs (replaces USE_GNOMELIBS). gnomecanvas : This adds a dependency on + graphics/gnomecanvas. oaf : This adds a dependency on + devel/oaf. gnomemimedata : This adds a dependency on + misc/gnomemimedata. gconf : This adds a dependency on + devel/gconf. gnomevfs : This adds a dependency on + devel/gnomevfs. libcapplet : This adds a dependency on + x11/libcapplet (replaces USE_GNOMECTRL). + If your port installs a configuration applet (or capplet), + you must include this option. gnomeprint : This adds a dependency on + print/gnomeprint. bonobo : This adds a dependency on + devel/bonobo. libgda : This adds a dependency on + databases/libgda. gnomedb : This adds a dependency on + databases/gnomedb. libglade : This adds a dependency on + devel/libglade. gal : This adds a dependency on + x11-toolkits/gal. glibwww : This adds a dependency on + www/glibwww. gtkhtml : This adds a dependency on + www/gtkhtml. libpanel : This adds a dependency on + x11/libpanel. Use this if your port installs + an applet that can be placed in the GNOME 1 panel. Note: + that even though you can have GNOME 1 applets in a + GNOME 2 desktop environment, they will not work + with the GNOME 2 panel. Let us take an example: + ++USE_X_PREFIX= yes +USE_GNOMENG= yes +USE_GNOME= gnomeprefix gnomehack gnomelibs bonobo libglade gal + +post-patch: + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \ + s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure ++ + This port makes use of the new GNOMENG infrastructure. It + installs into the GNOME mtree, and uses the gnomehack to + remove some common Makefile Linuxisms. Since it uses gnomehack, + the pre-install target has been changed to a + post-install target. If this is not done, then the + pre-install target from gnomehack will be overwritten. + The port also requires gnomelibs, bonobo, libglade, and gal. + + +If your port can optionally use GNOME, you must set + WANT_GNOME= yes in your Makefile, then check to see if + HAVE_GNOME is set for each component from the list + above that your port can use. Since this is a conditional + evaluation, you need to stick it between bsd.port.pre.mk + and bsd.port.post.mk. For example: + +WANT_GNOME= yes .include <bsd.port.pre.mk> -.if defined(HAVE_GNOME) -USE_GNOME= yes +.if ${HAVE_GNOME:Mlibpanel}!="" +USE_GNOME+= libpanel CONFIGURE_ARGS+= --with-gnome +PKGNAMESUFFIX= -gnome .else CONFIGURE_ARGS+= --without-gnome .endif @@ -93,120 +214,79 @@ CONFIGURE_ARGS+= --without-gnome .include <bsd.port.post.mk>- What happens here is WANT_GNOME tells the ports system - to check for the existence of gnome-config. If it - exists, HAVE_GNOME is set. If not, HAVE_GNOME - remains unset. By setting USE_GNOME after checking for - HAVE_GNOME the port will register all the GNOME - dependencies properly. +What happens here is WANT_GNOME tells the ports system + to check for the existence of the various GNOME components + listed above. For each component found, HAVE_GNOME + is updated with the name of component. Since this port + specifically can use libpanel, we check + HAVE_GNOME to see if it contains libpanel + (for more on the :Mpattern make syntax, please refer to + make(1) manpage). + If libpanel is found, then it is added the list of + USE_GNOME dependencies, and the port-specific + --with-gnome CONFIGURE_ARG is passed. + In the old GNOME infrastructure, PKGNAMESUFFIX was + automatically adjusted by the proper USE_* macro. + In GNOMENG, it is up to the individual porter to do this. + Our example port appends -gnome to the port name + to indicate it has been built with GNOME support. + -When building GNOME ports, remember that many applications - require shared directories in ${PREFIX}/share/gnome. Ports - should be constructed in a way such that files placed in these - directories are removed before the package which created the - directories (i.e. the package that has an appropriate - @dirrm in its pkg-plist). For GNOME, the principle - parent port is gnomecore. If your port incudes - USE_GNOME= yes you should be fine. If you're - uncertain if you need to require any other packages, you can use - the script ${PORTSDIR}/Tools/scripts/gnomedepends.py - to examine your port's pkg-plist: +To enforce use of optional GNOME dependencies no matter what, + you can add WITH_GNOME= yes to /etc/make.conf + or on the make command line. This makes GNOMENG always return + true when checking for optional GNOME dependencies. If you + want GNOMENG to always return false when checking for optional + GNOME dependencies, you can add WITHOUT_GNOME= yes + to /etc/make.conf or to the make command line. + --# cd /usr/ports/x11/mygnomeport -# /usr/ports/Tools/scripts/gnomedepends.py -According to the contents of pkg-plist the port depends on the following GNOME -port(s): +- - To see a list of what packages your port will actually require, - use the command make package-depends. +More information on GNOMENG can be found my looking at the source + and comments of ${PORTSDIR}/Mk/bsd.gnomeng.mk. - -GNOME Internationalization-GNOME relies on the gettext port to do - internationalization (I18N). FreeBSD currently supports two - versions of gettext: 0.10.35 and 0.11.1. Most ports can - use 0.11.1. However, if, when compiling your port, you get an - error building the .po translation files need to use the older - version of gettext. - -To use the older gettext, add the following to your - port's Makefile: - --BUILD_DEPENDS= msgfmt-old:${PORTSDIR}/devel/gettext-old -CONFIGURE_ENV+= MSGFMT=${LOCALBASE}/bin/msgfmt-old \ - XGETTEXT=${LOCALBASE}/bin/xgettext-old -- - When installing GNOME applications, make sure the translation - files are put in /usr/X11R6/share/locale and - not /usr/X11R6/share/gnome/locale. To do this, add the - following to your port's Makefile's pre-patch: section: - --pre-patch: - @find ${WRKSRC} -name "Makefile.in*" | xargs ${PERL} -pi -e \ - 's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \ - s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g' -- - Also, make sure the translation files are installed as .mo files and - not .gmo files. To do this, you can generally use this - patch. - - -Libtool IssuesMost if not all GNOME applications depend on GNU's libtool. They - also use the GNU configure system. Newer versions of libtool have - a problem with FreeBSD's USE_LIBTOOL macro. Use of this - macro should be avoided. Instead, set GNU_CONFIGURE= yes, - and use the following patch. - This patch prevents the installation of .la files, prevents - the building and installation of static archive libraries, and - ensures that -pthread will be passed to the linker. + also use the GNU configure system. If your port installs + shared libraries, you should add USE_LIBTOOL= yes to + your port's Makefile. This takes care of most of the libtool + requirements, but will not prevent things such as .la files + from being installed. To ensure a proper shared library + installation, also consider adding the following line to your + port's configure script directly below the line + LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh": + ++$ac_aux_dir/ltconfig $LIBTOOL_DEPS ++ + This prevents the installation of .la files and + ensures that ${PTHREAD_LIBS} will be passed to the linker. Distfiles-As GNOME 2.0 gains developer momentum, things must be done to sort - out the new GNOME 2.0 distfiles from the GNOME 1.0 distfiles, as well - as do our part to keep the distfiles directory clean. To do - this, GNOME 1.0 ports that download their distfiles from - ${MASTER_SITE_GNOME} must add the following to their + Things must be done to sort out the new GNOME 2 distfiles from + the GNOME 1 distfiles, as well as do our part to keep the + distfiles directory clean. To do this, GNOME 1 ports that + download their distfiles from ${MASTER_SITE_GNOME} must + add the following to their Makefile: -+-DIST_SUBDIR= gnome -+ GNOME 2.0 ports that download their distfiles from + GNOME 2 ports that download their distfiles from ${MASTER_SITE_GNOME} must include the following in their Makefile: @@ -227,9 +307,9 @@ USE_BZIP2= yesIf you still need help with your port, have a look at some of - the existing ports for examples. - The freebsd-gnome mailing - list is also there for you. + the existing ports for examples. + The freebsd-gnome mailing + list is also there for you. |