pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/doc/portability-book Imported portability-book.
details: https://anonhg.NetBSD.org/pkgsrc/rev/734f16da9915
branches: trunk
changeset: 519626:734f16da9915
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Oct 06 21:10:41 2006 +0000
description:
Imported portability-book.
The pkgsrc portability book covers many of the platform-specific issues
that are useful when writing programs that are portable to a great
number of UNIX-like operating systems.
diffstat:
doc/portability-book/DESCR | 3 +
doc/portability-book/Makefile | 93 ++++++++++++++++++++
doc/portability-book/distinfo | 5 +
doc/portability-book/files/Makefile | 27 +++++
doc/portability-book/files/chapters.ent | 10 ++
doc/portability-book/files/devices.xml | 10 ++
doc/portability-book/files/functions.xml | 39 ++++++++
doc/portability-book/files/headers.xml | 9 +
doc/portability-book/files/intro.xml | 8 +
doc/portability-book/files/libraries.xml | 9 +
doc/portability-book/files/portability.xml | 59 ++++++++++++
doc/portability-book/files/utilities.xml | 134 +++++++++++++++++++++++++++++
12 files changed, 406 insertions(+), 0 deletions(-)
diffs (truncated from 454 to 300 lines):
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/DESCR Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,3 @@
+The pkgsrc portability book covers many of the platform-specific issues
+that are useful when writing programs that are portable to a great
+number of UNIX-like operating systems.
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/Makefile Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,93 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $
+#
+
+DISTNAME= portability-book-${TODAY}
+CATEGORIES= # empty
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+DISTFILES= htdocs-share-20061001.tar.gz
+
+MAINTAINER= rillig%NetBSD.org@localhost
+#HOMEPAGE= http://www.NetBSD.org/Documentation/pkgsrc/
+COMMENT= The pkgsrc portability book
+
+TODAY!= date '+%Y%m%d'
+DIST_SUBDIR= pkgsrc-guide
+NO_MTREE= yes
+USE_LANGUAGES= # none
+
+PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
+DOCDIR= ${PREFIX}/share/doc/pkgsrc-portability
+HTDOCSDIR?= ${.CURDIR}/../../../htdocs
+
+BUILD_DEFS+= OUTPUTS
+OUTPUTS?= lint html html-split ascii pdf
+
+.if defined(OUTPUTS)
+. if !empty(OUTPUTS:Mascii)
+# the html is needed to build the ascii version.
+OUTPUTS+= html
+. endif
+
+# only override the Makefile.common default if it is explicitly set
+_GUIDE_OUTPUTS= ${OUTPUTS}
+.endif
+
+DEPENDS+= netbsd-doc-print>=1.2:../../meta-pkgs/netbsd-doc-print
+
+# The source files are only symlinked into the WRKSRC, so that they can
+# be easily modified, should the "lint" phase fail.
+pre-extract:
+ ${MKDIR} ${WRKSRC}
+ ${LN} -s ${FILESDIR}/* ${WRKSRC}
+ ln -s ${PKGSRCDIR}/doc/guide/files/share ${WRKSRC}/
+
+do-build:
+.for _output_ in ${OUTPUTS}
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${_output_}
+.endfor
+
+post-build:
+ @${RM} -f ${WRKSRC}/portability.tmp.html
+
+do-install:
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+.if !empty(OUTPUTS:Mhtml) || !empty(OUTPUTS:Mhtml-split)
+ ${INSTALL_DATA} ${WRKSRC}/*.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKDIR}/htdocs/NetBSD.css ${DOCDIR}
+.endif
+.if !empty(OUTPUTS:Mascii)
+ ${INSTALL_DATA} ${WRKSRC}/portability.txt ${DOCDIR}
+.endif
+.if !empty(OUTPUTS:Mpdf)
+ ${INSTALL_DATA} ${WRKSRC}/portability.ps ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/portability.pdf ${DOCDIR}
+.endif
+
+post-install:
+ ${FIND} ${DOCDIR} \( -type f -o -type l \) -print \
+ | ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
+ >> ${PLIST_SRC}
+ ${FIND} ${DOCDIR} -type d -print \
+ | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
+ >> ${PLIST_SRC}
+
+do-lint:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} lint
+
+DETAB_PROGRAM= \
+ if (/<programlisting>/ .. /<\/programlisting>/) { \
+ while (/(.*?)\t(.*)/s) { \
+ my $$filler = " " x (8 - (length($$1) % 8)); \
+ $$_ = "$$1$$filler$$2"; \
+ } \
+ }
+
+# remove tabulators from the <programlisting> tags.
+# TeX does not like them.
+.PHONY: detab
+detab:
+ cd ${FILESDIR} && \
+ perl -p -i".detab.tmp" -e '${DETAB_PROGRAM}' *.xml && \
+ ${RM} -f *.xml.detab.tmp
+
+.include "../../mk/bsd.pkg.mk"
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/distinfo Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $
+
+SHA1 (pkgsrc-guide/htdocs-share-20061001.tar.gz) = 9d952e5da6c846882c058ce0ec5095b643a1363e
+RMD160 (pkgsrc-guide/htdocs-share-20061001.tar.gz) = dd8f2a83d8f816c980219c54fc55b711b9e1a310
+Size (pkgsrc-guide/htdocs-share-20061001.tar.gz) = 93042 bytes
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/Makefile Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $
+
+DOC= portability
+
+SRCS= portability.xml
+SRCS+= chapters.ent
+SRCS+= intro.xml
+SRCS+= utilities.xml
+SRCS+= headers.xml
+SRCS+= functions.xml
+SRCS+= devices.xml
+
+# Make deeper TOC:
+XSL_DBX_WITH_TOC_SECTION_DEPTH?= 2
+
+# Avoid extra normalization
+NO_TIDY?= yes
+
+
+all: # doing this as depends doesn't work
+ ${MAKE} html-split
+ ${MAKE} html
+ ${MAKE} ascii
+ ${MAKE} pdf
+
+WEB_PREFIX= ${.CURDIR}/../htdocs
+.include "../htdocs/share/mk/doc.docbook.mk"
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/chapters.ent
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/chapters.ent Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,10 @@
+<!-- $NetBSD: chapters.ent,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<!ENTITY chap.intro SYSTEM "intro.xml">
+<!ENTITY chap.shell SYSTEM "shell.xml">
+<!ENTITY chap.utilities SYSTEM "utilities.xml">
+<!ENTITY chap.headers SYSTEM "headers.xml">
+<!ENTITY chap.functions SYSTEM "functions.xml">
+<!ENTITY chap.libraries SYSTEM "libraries.xml">
+<!ENTITY chap.devices SYSTEM "devices.xml">
+<!ENTITY chap.faq SYSTEM "faq.xml">
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/devices.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/devices.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,10 @@
+<!-- $NetBSD: devices.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<chapter id="dev">
+<title>Device files</title>
+
+<para>This chapter lists the device files that are available on the
+platforms and whether they are compatible to other platform's
+devices.</para>
+
+</chapter>
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/functions.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/functions.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,39 @@
+<!-- $NetBSD: functions.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<chapter id="functions">
+<title>C/C++: functions</title>
+
+<para>This chapter contains the requirements for using certain functions
+in C and C++ code.</para>
+
+<table>
+<title>Functions on various platforms</title>
+<tgroup cols="5">
+<thead><row>
+ <entry>Function name</entry>
+ <entry>Platform</entry>
+ <entry>Library</entry>
+ <entry>Headers</entry>
+ <entry>Feature test macros</entry>
+</row></thead>
+
+<tbody>
+<row>
+ <entry>getopt</entry>
+ <entry>NetBSD-*-*</entry>
+ <entry>c</entry>
+ <entry>unistd.h</entry>
+ <entry>_POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE >= 4 || defined(_NETBSD_SOURCE)</entry>
+</row>
+<row>
+ <entry>getopt</entry>
+ <entry>SunOS-5.10-*</entry>
+ <entry>c</entry>
+ <entry>unistd.h</entry>
+ <entry>(_XOPEN_SOURCE && _XOPEN_VERSION == 4) || __EXTENSIONS__</entry>
+</row>
+</tbody>
+</tgroup>
+</table>
+
+</chapter>
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/headers.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/headers.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,9 @@
+<!-- $NetBSD: headers.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<chapter id="headers">
+<title>C/C++: Header files</title>
+
+<para>This chapter provides information about which header files are
+available on which platform.</para>
+
+</chapter>
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/intro.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/intro.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,8 @@
+<!-- $NetBSD: intro.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<chapter id="intro">
+<title>Introduction</title>
+
+<para>Blubb.</para>
+
+</chapter>
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/libraries.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/libraries.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,9 @@
+<!-- $NetBSD: libraries.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<chapter id="libraries">
+<title>C/C++: libraries</title>
+
+<para>This chapter provides information about which libraries are
+available on which platform.</para>
+
+</chapter>
diff -r 7a7b68170873 -r 734f16da9915 doc/portability-book/files/portability.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/portability-book/files/portability.xml Fri Oct 06 21:10:41 2006 +0000
@@ -0,0 +1,59 @@
+<!-- $NetBSD: portability.xml,v 1.1.1.1 2006/10/06 21:10:41 rillig Exp $ -->
+
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//NetBSD//DTD DocBook XML V4.2-Based DocBook Extension//EN" [
+ <!ENTITY % man-refs.ent PUBLIC "-//NetBSD//ENTITIES NetBSD Manual Page Entities//EN">
+ %man-refs.ent;
+ <!ENTITY % misc.ent PUBLIC "-//NetBSD//ENTITIES NetBSD Miscellaneous Entities//EN">
+ %misc.ent;
+ <!ENTITY % chapters SYSTEM "chapters.ent">
+ %chapters;
+
+ <!ENTITY u.PR "http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=">
+]>
+
+<book id="portability">
+ <bookinfo>
+ <title>The pkgsrc portability book</title>
+
+ <authorgroup>
+ <author>
+ <firstname>Roland</firstname>
+ <surname>Illig</surname>
+
+ <affiliation>
+ <address><email>rillig%NetBSD.org@localhost</email></address>
+ </affiliation>
+ </author>
+ <corpauthor>
+ The pkgsrc Developers
+ </corpauthor>
+ </authorgroup>
+
+ <copyright>
+ <year>2006</year>
+
+ <holder role="mailto:www%NetBSD.org@localhost">The NetBSD Foundation, Inc.</holder>
+ </copyright>
+
+ <pubdate>2006-10-01</pubdate>
+
+ <abstract>
+
+ <para>pkgsrc is a package management system that has been ported
Home |
Main Index |
Thread Index |
Old Index