tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Initial MirBSD support for pkgsrc



Hello!

Now that the pkgsrc tree is unfrozen, I am proposing a new version of the 
MirBSD patch. This one fixes the bmake regression tests and contains some 
other improvements, thanks to feedback from several people.

On Tue, 28 Dec 2010, Greg Troxel wrote:

>  A ptach to add MirBSD stanzas, README, etc. and that makes no other
>  changes to behavior on any other system should be non-controversial.

All the "non-controversial" parts are contained in the attachment called 
20110114.diff. A quick description of each change contained in the patch 
follows:

bootstrap/README.MirBSD: new file, contains platform-specific
        instructions.
bootstrap/bootstrap: add MirBSD stanza.
devel/bmake/files/Makefile.in: Add MirBSD to isBSD44.
devel/bmake/files/machine.sh: Add MirBSD stanza.
lang/perl5/Makefile: add LIBSWANTED.MirBSD and SYSLIBPATH.MirBSD.
mk/bsd.prefs.mk: add two MirBSD stanzas.
mk/pthread.builtin.mk: add MirBSD to BUILDLINK_OPSYS_SUPPORT_PTHREAD.
mk/configure/gnu-configure.mk: hardcode lt_cv_deplibs_check_method for
        MirBSD, add configure-scripts-osdep. The latter is needed because
        upstream libtool does not have support for MirBSD, which makes
        some configure scripts abort with an error. Treat it like NetBSD
        in the configure phase, the libtool script will be replaced
        anyway. This is a no-op for other OSes.
mk/platform/MirBSD.mk, mk/tools/tools.MirBSD.mk: new files.
mk/wrapper/transform-gcc: add support for the -fhonour-copts and -Wbounded
        flags for gcc. Both are contained in the standard MirBSD CFLAGS
        and should be given as-is to the compiler. -fhonour-copts can be
        used to check if a Makefile uses CFLAGS correctly, it must be
        given exactly one time to the compiler. -Wbounded warns about
        out-of-bounds access to buffers. No change on other platforms.
pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk: new file, a copy of
        sys.mk from MirBSD.

>  Any changes other than "add MirBSD stanza" probably should be proposed
>  as a separate patch, with rationale as to why it's correct.

I have attached two such patches, for devel/bmake and for net/libfetch.

The bmake patch fixes the test suite on MirBSD:

devel/bmake/files/unit-tests/modts: Using echo in the test is not
        portable, as it may interpret backslash escapes, depending on
        the shell. If mksh is used as the shell, it replaces \x by a
        null byte. Replace echo by printf for the tests in this file to
        avoid this.

The libfetch patch fixes two compiler warnings (-Wformat), which would 
otherwise make the build fail because -Werror is in effect:

net/libfetch/files/ftp.c: On some operating systems (notably MirBSD), the
        tm_year member in struct tm is a long, not an int. The package
        tools already have support for this, libfetch does not. Here, use
        a temporary variable to read in the year so the length is known.
net/libfetch/files/http.c: Same issue as above; cast tm_year to a long
        before printing it.

>  In particular, I don't understand why you are changing "exit 1" to "true".  
> That
>  seems wrong, as the intent is to force failure.

Fixed, see above.

--Benny.
Index: bootstrap/README.MirBSD
===================================================================
RCS file: bootstrap/README.MirBSD
diff -N bootstrap/README.MirBSD
--- /dev/null   2011-01-15 12:01:01.000000000 +0100
+++ README.MirBSD       2011-01-12 08:21:49.000000000 +0100
@@ -0,0 +1,43 @@
+$NetBSD$
+
+Please read the general README file as well.
+
+pkgsrc will install the portable NetBSD make as "bmake". The standard
+make(1) from MirBSD is incompatible with pkgsrc.
+
+Unless you bootstrap pkgsrc with the --unprivileged option, sudo(8) will
+be used to gain root privileges.
+
+MirPorts and pkgsrc can be installed in parallel. The MirPorts framework
+uses /usr/mpkg as its default prefix and /usr/mpkg/db/pkg as its package
+database directory. Thus, its paths do not clash with the default
+choices of pkgsrc, which are /usr/pkg and /var/db/pkg respectively. We
+suggest however that you place the package database for pkgsrc below its
+prefix, for example by specifying the
+
+       --pkgdbdir /usr/pkg/db
+
+option to bootstrap. Please note that the package tools from MirPorts
+and pkgsrc have the same names (e.g. pkg_add) but are incompatible. This
+leads to strage behavior when building or installing packages if both
+frameworks are in your PATH.
+
+Thus, before you start the bootstrap, you must make sure that
+/usr/mpkg/bin and /usr/mpkg/sbin are NOT in your PATH if MirPorts is
+already installed. Use a command like the following:
+
+       export 
PATH=${HOME}/.etc/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/pkg/sbin:/usr/games
+
+Other environment variables that you may want to set are MANPATH,
+INFOPATH and XAPPLRESDIR. There should be no need to set the
+LD_LIBRARY_PATH environment variable.
+
+The default mk.conf will be installed in /usr/pkg/etc.  It mirrors the
+values for CFLAGS, CPPFLAGS, and LDFLAGS retrieved from the native
+make(1) at bootstrap time, instead of including /etc/make.cfg and the
+native <bsd.own.mk>. If you change values in /etc/make.cfg, you will
+also have to adjust the mk.conf used by bmake.
+
+The standard compiler is mgcc; if you have more than one native compiler
+installed (assuming all are GCC variants), export CC=gcc-1.2.3 before
+using pkgsrc and possibly adjust /usr/pkg/etc/mk.conf accordingly.
Index: bootstrap/bootstrap
===================================================================
RCS file: /cvsroot/pkgsrc/bootstrap/bootstrap,v
retrieving revision 1.159
diff -u -d -r1.159 bootstrap
--- bootstrap/bootstrap 30 Aug 2010 06:21:49 -0000      1.159
+++ bootstrap/bootstrap 14 Jan 2011 17:38:38 -0000
@@ -614,6 +614,35 @@
        set_opsys=no
        machine_arch=`uname -m | sed -e 's/i.86/i386/'`
        ;;
+MirBSD)
+       root_group=wheel
+       need_pax=yes
+       need_mtree=no
+       need_bsd_install=no
+       need_awk=no
+       need_sed=no
+       set_opsys=no
+       check_prog mtreeprog mtree
+       machine_arch=`arch -s`
+       [ -z "$fetch_cmd" ] && fetch_cmd=/usr/bin/ftp
+       # there is no /usr/bin/cc, so use mgcc if unset
+       test -n "$CC" || { CC=mgcc; export CC; }
+       # get some variables from the native make if unset
+       for var in CFLAGS CPPFLAGS LDFLAGS; do
+               # check if variable is already set
+               eval _tmp=\"\$$var\"
+               [ "x$_tmp" != x ] && continue
+               # ask the native make (EXPERIMENTAL = don't add -Werror)
+               # the -I${.CURDIR} dance is to prevent junk in CPPFLAGS
+               _tmp=`printf '%s\nall:\n\t@%s %%s %s=${%s:M*:Q:Q}\n%s\n%s\n' \
+                   $var'+=-I${.CURDIR}' printf $var $var':S/-I${.CURDIR}//' \
+                   EXPERIMENTAL=yes '.include <bsd.prog.mk>' | \
+                   (unset MAKECONF; /usr/bin/make -f - all 2>/dev/null) | \
+                   sed 's/^x//'`
+               eval $_tmp
+               eval export $var
+       done
+       ;;
 NetBSD)
        root_group=wheel
        need_bsd_install=no
Index: devel/bmake/files/Makefile.in
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/Makefile.in,v
retrieving revision 1.18
diff -u -d -r1.18 Makefile.in
--- devel/bmake/files/Makefile.in       7 Sep 2010 14:28:00 -0000       1.18
+++ devel/bmake/files/Makefile.in       14 Jan 2011 17:42:09 -0000
@@ -47,7 +47,7 @@
 ARCH!= uname -p 2>/dev/null || uname -m
 
 # list of OS's which are derrived from BSD4.4
-isBSD44= NetBSD FreeBSD OpenBSD DragonFly
+isBSD44= NetBSD FreeBSD OpenBSD DragonFly MirBSD
 
 .if ${OS} == "NetBSD"
 # Don't set these for anyone else since we don't know what the effect may be.
Index: devel/bmake/files/machine.sh
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/machine.sh,v
retrieving revision 1.2
diff -u -d -r1.2 machine.sh
--- devel/bmake/files/machine.sh        9 Mar 2008 19:54:29 -0000       1.2
+++ devel/bmake/files/machine.sh        14 Jan 2011 17:42:26 -0000
@@ -42,6 +42,9 @@
 }
 
 case $OS in
+MirBSD)
+       MACHINE=$OS$OSMAJOR.$machine
+       ;;
 OpenBSD)
        MACHINE=$OS$OSMAJOR.$machine
        arch=`Which arch /usr/bin:/usr/ucb:$PATH`
Index: lang/perl5/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/perl5/Makefile,v
retrieving revision 1.166
diff -u -d -r1.166 Makefile
--- lang/perl5/Makefile 23 Sep 2010 21:47:48 -0000      1.166
+++ lang/perl5/Makefile 14 Jan 2011 18:00:21 -0000
@@ -119,6 +119,7 @@
 LIBSWANTED.IRIX=       m crypt
 LIBSWANTED.Interix=    m dl
 LIBSWANTED.Linux=      m crypt dl nsl
+LIBSWANTED.MirBSD=     m crypt
 LIBSWANTED.NetBSD=     m crypt
 LIBSWANTED.OpenBSD=    m crypt
 LIBSWANTED.SunOS=      m crypt dl socket nsl
@@ -134,6 +135,7 @@
 SYSLIBPATH.DragonFly=  /usr/lib
 SYSLIBPATH.FreeBSD=    /usr/lib
 SYSLIBPATH.Interix=    /usr/lib
+SYSLIBPATH.MirBSD=     /usr/lib
 SYSLIBPATH.NetBSD=     /usr/lib
 SYSLIBPATH.OpenBSD=    /usr/lib
 SYSLIBPATH.SunOS=      /usr/lib
Index: mk/bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.311
diff -u -d -r1.311 bsd.prefs.mk
--- mk/bsd.prefs.mk     24 Aug 2010 19:08:28 -0000      1.311
+++ mk/bsd.prefs.mk     14 Jan 2011 18:06:47 -0000
@@ -198,6 +198,15 @@
 .    endif
 .  endif
 
+.elif ${OPSYS} == "MirBSD"
+LOWER_OPSYS?=          mirbsd
+LOWER_OS_VERSION=      ${OS_VERSION}
+LOWER_OPSYS_VERSUFFIX= ${OS_VERSION}
+LOWER_ARCH!=           arch -s
+LOWER_VENDOR?=         unknown
+MACHINE_ARCH=          ${LOWER_ARCH}
+MAKEFLAGS+=            LOWER_ARCH=${LOWER_ARCH:Q}
+
 .elif !empty(OPSYS:MIRIX*)
 LOWER_ARCH!=           ${UNAME} -p
 LOWER_OPSYS?=          irix
@@ -343,6 +352,9 @@
 .  endif
 .elif ${OPSYS} == "DragonFly"
 OBJECT_FMT=    ELF
+.elif ${OPSYS} == "MirBSD"
+OBJECT_FMT=    ELF
+MKPROFILE=     no
 .elif ${OPSYS} == "AIX"
 OBJECT_FMT=    XCOFF
 .elif ${OPSYS} == "OSF1"
Index: mk/pthread.builtin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pthread.builtin.mk,v
retrieving revision 1.10
diff -u -d -r1.10 pthread.builtin.mk
--- mk/pthread.builtin.mk       12 Apr 2007 18:42:02 -0000      1.10
+++ mk/pthread.builtin.mk       14 Jan 2011 18:06:51 -0000
@@ -53,7 +53,7 @@
 # XXX
 # XXX This should really be a check for GCC!
 # XXX
-BUILDLINK_OPSYS_SUPPORT_PTHREAD=       DragonFly FreeBSD Linux NetBSD
+BUILDLINK_OPSYS_SUPPORT_PTHREAD=       DragonFly FreeBSD Linux MirBSD NetBSD
 .    if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS})
 BUILDLINK_CFLAGS.pthread+=     -pthread
 BUILDLINK_LDFLAGS.pthread+=    -pthread
Index: mk/configure/gnu-configure.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/configure/gnu-configure.mk,v
retrieving revision 1.9
diff -u -d -r1.9 gnu-configure.mk
--- mk/configure/gnu-configure.mk       12 Sep 2009 00:52:45 -0000      1.9
+++ mk/configure/gnu-configure.mk       14 Jan 2011 18:07:04 -0000
@@ -21,6 +21,10 @@
 CONFIGURE_ENV+=        lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN_CMD:sh}
 .endif
 
+.if ${OPSYS} == "MirBSD"
+CONFIGURE_ENV+=        lt_cv_deplibs_check_method='match_pattern 
/lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$$'
+.endif
+
 GNU_CONFIGURE_PREFIX?= ${PREFIX}
 CONFIGURE_ARGS+=       --prefix=${GNU_CONFIGURE_PREFIX:Q}
 
@@ -110,3 +114,44 @@
                depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern";     \
        done
 .endif
+
+######################################################################
+### configure-scripts-osdep (PRIVATE)
+######################################################################
+### configure-scripts-osdep modifies the GNU configure scripts in
+### ${WRKSRC} to support operating systems without upstream support
+### in for example libtool.
+###
+do-configure-pre-hook: configure-scripts-osdep
+
+.if ${OPSYS} == "MirBSD"
+# awk script by Benny Siegert <bsiegert%mirbsd.de@localhost>
+_SCRIPT.configure-scripts-osdep=                                       \
+       ${AWK} 'BEGIN { found = 0 }                                     \
+               /dynamic linker characteristics.../ { found = 1 }       \
+               /^netbsd/ {                                             \
+                       if (found) {                                    \
+                               sub("netbsd","mirbsd*|netbsd");         \
+                               found = 0;                              \
+                       }                                               \
+               }                                                       \
+               { print $0 }' $$file >$$file.override;                  \
+       ${CHMOD} +x $$file.override;                                    \
+       ${MV} -f $$file.override $$file
+.endif
+
+.PHONY: configure-scripts-osdep
+configure-scripts-osdep:
+.if defined(_SCRIPT.configure-scripts-osdep) && 
!empty(_SCRIPT.configure-scripts-osdep)
+       @${STEP_MSG} "Modifying GNU configure scripts for OS dependent support"
+       ${_PKG_SILENT}${_PKG_DEBUG}set -e;                              \
+       cd ${WRKSRC};                                                   \
+       depth=0; pattern=${CONFIGURE_SCRIPT:T};                         \
+       while ${TEST} $$depth -le ${OVERRIDE_DIRDEPTH.configure}; do    \
+               for file in $$pattern; do                               \
+                       ${TEST} -f "$$file" || continue;                \
+                       ${_SCRIPT.${.TARGET}};                          \
+               done;                                                   \
+               depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern";     \
+       done
+.endif
Index: mk/platform/MirBSD.mk
===================================================================
RCS file: mk/platform/MirBSD.mk
diff -N mk/platform/MirBSD.mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ mk/platform/MirBSD.mk       28 Dec 2010 15:38:02 -0000
@@ -0,0 +1,95 @@
+# $NetBSD$
+#
+# Variable definitions for the MirOS BSD operating system.
+
+ECHO_N?=       ${ECHO} -n
+IMAKE_MAKE?=   ${MAKE}         # program which gets invoked by imake
+PKGLOCALEDIR?= share
+PS?=           /bin/ps
+RSH?=          /usr/bin/false  # not delivered with MirOS any more
+SU?=           /usr/bin/su
+TYPE?=         type                            # Shell builtin
+
+USERADD?=      ${LOCALBASE}/sbin/useradd
+GROUPADD?=     ${LOCALBASE}/sbin/groupadd
+_USER_DEPENDS= user>=20000313:../../sysutils/user      #XXX make this work
+
+CPP_PRECOMP_FLAGS?=    # unset
+DEF_UMASK?=            0022
+EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table
+MOTIF_TYPE_DEFAULT?=   openmotif
+NOLOGIN?=              /sbin/nologin
+PKG_TOOLS_BIN?=                ${LOCALBASE}/sbin
+ROOT_CMD?=             /usr/bin/sudo /bin/mksh -c
+ROOT_USER?=            root
+ROOT_GROUP?=           wheel
+ULIMIT_CMD_datasize?=  ulimit -d `ulimit -H -d`
+ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
+ULIMIT_CMD_memorysize?=        ulimit -m `ulimit -H -m`
+
+# imake installs manpages in weird places
+# these values from /usr/X11R6/lib/X11/config/OpenBSD.cf
+# XXX verify against MirBSD.cf defns
+IMAKE_MAN_SOURCE_PATH= man/cat
+IMAKE_MANNEWSUFFIX=    0
+IMAKE_MAN_SUFFIX=      ${IMAKE_MANNEWSUFFIX}
+IMAKE_LIBMAN_SUFFIX=   ${IMAKE_MANNEWSUFFIX}
+IMAKE_FILEMAN_SUFFIX=  ${IMAKE_MANNEWSUFFIX}
+IMAKE_GAMEMAN_SUFFIX=  ${IMAKE_MANNEWSUFFIX}
+IMAKE_MAN_DIR=         ${IMAKE_MAN_SOURCE_PATH}1
+IMAKE_LIBMAN_DIR=      ${IMAKE_MAN_SOURCE_PATH}3
+IMAKE_FILEMAN_DIR=     ${IMAKE_MAN_SOURCE_PATH}5
+IMAKE_GAMEMAN_DIR=     ${IMAKE_MAN_SOURCE_PATH}6
+IMAKE_MANINSTALL?=     maninstall catinstall
+
+_OPSYS_HAS_INET6=      yes     # IPv6 is standard
+_OPSYS_HAS_JAVA=       no      # Java is not standard
+_OPSYS_HAS_MANZ=       no      # MANZ controls gzipping of man pages
+_OPSYS_HAS_OSSAUDIO=   yes     # libossaudio is available
+_OPSYS_LIBTOOL_REQD=   1.5.22nb5
+_OPSYS_PERL_REQD=              # no base version of perl required
+_OPSYS_PTHREAD_AUTO=   no      # -lpthread needed for pthreads
+_OPSYS_SHLIB_TYPE=     ELF     # shared lib type
+_PATCH_CAN_BACKUP=     yes     # native patch(1) can make backups
+_PATCH_BACKUP_ARG?=    -V simple -z    # switch to patch(1) for backup suffix
+_USE_RPATH=            yes     # add rpath to LDFLAGS
+
+# flags passed to the linker to extract all symbols from static archives.
+# this is GNU ld.
+_OPSYS_WHOLE_ARCHIVE_FLAG=     -Wl,--whole-archive
+_OPSYS_NO_WHOLE_ARCHIVE_FLAG=  -Wl,--no-whole-archive
+
+_STRIPFLAG_CC?=                ${_INSTALL_UNSTRIPPED:D:U-s}    # cc(1) option 
to strip
+_STRIPFLAG_INSTALL?=   ${_INSTALL_UNSTRIPPED:D:U-s}    # install(1) option to 
strip
+
+.if (${MACHINE_ARCH} == "i386")
+DEFAULT_SERIAL_DEVICE?=        /dev/tty00
+SERIAL_DEVICES?=       /dev/tty00 \
+                       /dev/tty01
+.elif (${MACHINE_ARCH} == "sparc")
+DEFAULT_SERIAL_DEVICE?=        /dev/ttya
+SERIAL_DEVICES?=       /dev/ttya \
+                       /dev/ttyb
+.else
+DEFAULT_SERIAL_DEVICE?=        /dev/null
+SERIAL_DEVICES?=       /dev/null
+.endif
+
+PKG_HAVE_KQUEUE=       # defined
+
+_OPSYS_CAN_CHECK_SHLIBS=       no # can't use readelf in 
check/bsd.check-vars.mk
+
+# check for maximum command line length and set it in configure's environment,
+# to avoid a test required by the libtool script that takes forever.
+_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
+
+# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
+# (it defaults to 'no' as per defaults/mk.conf).
+# Set the group and mode to meaningful values in that case (defaults to
+# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
+.if !(empty(SETGIDGAME:M[yY][eE][sS]))
+GAMEOWN=               games
+GAMEGRP=               games
+GAMEMODE=              2555
+GAMEDIRMODE=           0775
+.endif
Index: mk/tools/tools.MirBSD.mk
===================================================================
RCS file: mk/tools/tools.MirBSD.mk
diff -N mk/tools/tools.MirBSD.mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ mk/tools/tools.MirBSD.mk    28 Dec 2010 15:38:02 -0000
@@ -0,0 +1,77 @@
+# $NetBSD$
+#
+# System-supplied tools for the MirOS operating system.
+
+TOOLS_PLATFORM.[?=             [                       # shell builtin
+TOOLS_PLATFORM.awk?=           /usr/bin/awk
+TOOLS_PLATFORM.basename?=      /usr/bin/basename
+TOOLS_PLATFORM.byacc?=         /usr/bin/yacc
+TOOLS_PLATFORM.cat?=           /bin/cat
+TOOLS_PLATFORM.chgrp?=         /bin/chgrp
+TOOLS_PLATFORM.chmod?=         /bin/chmod
+TOOLS_PLATFORM.chown?=         /sbin/chown
+TOOLS_PLATFORM.cmp?=           /usr/bin/cmp
+TOOLS_PLATFORM.cp?=            /bin/cp
+TOOLS_PLATFORM.cut?=           /usr/bin/cut
+TOOLS_PLATFORM.date?=          /bin/date
+TOOLS_PLATFORM.diff?=          /usr/bin/diff
+TOOLS_PLATFORM.diff3?=         /usr/bin/diff3
+TOOLS_PLATFORM.dirname?=       /usr/bin/dirname
+TOOLS_PLATFORM.echo?=          echo                    # shell builtin
+TOOLS_PLATFORM.egrep?=         /usr/bin/egrep
+TOOLS_PLATFORM.env?=           /usr/bin/env
+TOOLS_PLATFORM.expr?=          /bin/expr
+TOOLS_PLATFORM.false?=         exit 1
+TOOLS_PLATFORM.fgrep?=         /usr/bin/fgrep
+TOOLS_PLATFORM.file?=          /usr/bin/file
+TOOLS_PLATFORM.find?=          /usr/bin/find
+TOOLS_PLATFORM.flex?=          /usr/bin/lex
+TOOLS_PLATFORM.grep?=          /usr/bin/grep
+TOOLS_PLATFORM.gunzip?=                /usr/bin/gunzip -f
+TOOLS_PLATFORM.gzcat?=         /usr/bin/gzcat
+TOOLS_PLATFORM.gzip?=          /usr/bin/gzip -nf ${GZIP}
+TOOLS_PLATFORM.head?=          /usr/bin/head
+TOOLS_PLATFORM.hostname?=      /bin/hostname
+TOOLS_PLATFORM.id?=            /usr/bin/id
+TOOLS_PLATFORM.install?=       /usr/bin/install
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
+TOOLS_PLATFORM.ksh?=           /bin/mksh
+TOOLS_PLATFORM.lex?=           /usr/bin/lex
+TOOLS_PLATFORM.ln?=            /bin/ln
+TOOLS_PLATFORM.ls?=            /bin/ls
+TOOLS_PLATFORM.m4?=            /usr/bin/m4
+TOOLS_PLATFORM.mail?=          /usr/bin/mail
+TOOLS_PLATFORM.makeinfo?=      /usr/bin/makeinfo
+TOOLS_PLATFORM.mkdir?=         /bin/mkdir -p
+TOOLS_PLATFORM.mktemp?=                /usr/bin/mktemp
+TOOLS_PLATFORM.mtree?=         /usr/sbin/mtree
+TOOLS_PLATFORM.mv?=            /bin/mv
+TOOLS_PLATFORM.nice?=          /usr/bin/nice
+TOOLS_PLATFORM.nroff?=         /usr/bin/nroff
+TOOLS_PLATFORM.openssl?=       /usr/sbin/openssl
+TOOLS_PLATFORM.patch?=         /usr/bin/patch
+TOOLS_PLATFORM.pax?=           /bin/pax
+TOOLS_PLATFORM.printf?=                /usr/bin/printf
+TOOLS_PLATFORM.pwd?=           /bin/pwd
+TOOLS_PLATFORM.rm?=            /bin/rm
+TOOLS_PLATFORM.rmdir?=         /bin/rmdir
+TOOLS_PLATFORM.sdiff?=         /usr/bin/sdiff
+TOOLS_PLATFORM.sed?=           /usr/bin/sed
+TOOLS_PLATFORM.sh?=            /bin/sh
+TOOLS_PLATFORM.sleep?=         /bin/sleep
+TOOLS_PLATFORM.soelim?=                /usr/bin/soelim
+TOOLS_PLATFORM.sort?=          /usr/bin/sort
+TOOLS_PLATFORM.strip?=         /usr/bin/strip
+TOOLS_PLATFORM.tail?=          /usr/bin/tail
+TOOLS_PLATFORM.tar?=           /bin/tar
+TOOLS_PLATFORM.tbl?=           /usr/bin/tbl
+TOOLS_PLATFORM.tee?=           /usr/bin/tee
+TOOLS_PLATFORM.test?=          test                    # shell builtin
+TOOLS_PLATFORM.touch?=         /usr/bin/touch
+TOOLS_PLATFORM.tr?=            /usr/bin/tr
+TOOLS_PLATFORM.true?=          :
+TOOLS_PLATFORM.tsort?=         /usr/bin/tsort
+TOOLS_PLATFORM.wc?=            /usr/bin/wc
+TOOLS_PLATFORM.xargs?=         /usr/bin/xargs -r
+TOOLS_PLATFORM.yacc?=          /usr/bin/yacc
Index: mk/wrapper/transform-gcc
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/transform-gcc,v
retrieving revision 1.20
diff -u -d -r1.20 transform-gcc
--- mk/wrapper/transform-gcc    15 Aug 2009 13:36:48 -0000      1.20
+++ mk/wrapper/transform-gcc    28 Dec 2010 15:38:02 -0000
@@ -28,6 +28,7 @@
 -fexpensive-optimizations |\
 -ffast-math            |\
 -ffloat-store          |\
+-fhonour-copts         |\
 -finline-functions     |\
 -fno-builtin*          |\
 -fno-common            |\
@@ -68,6 +69,7 @@
 -W                     |\
 -W[cLlS],*             |\
 -Wall                  |\
+-Wbounded              |\
 -Wcast-align           |\
 -Wcast-qual            |\
 -Wchar-subscripts      |\
Index: pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk
===================================================================
RCS file: pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk
diff -N pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk        28 Dec 2010 
15:38:20 -0000
@@ -0,0 +1,213 @@
+#      $NetBSD$
+#      $MirOS: src/share/mk/sys.mk,v 1.103 2007/04/28 00:12:46 tg Exp $
+#      @(#)sys.mk    5.11 (Berkeley) 3/13/91
+
+unix?=         We run MirOS BSD.
+
+.SUFFIXES:     .out .a .ln .o .s .S .c .m .cc .cxx .cpp .C .F .f .r .y .l .cl 
.p .i .h .sh .m4
+.LIBS:         .a
+
+AR?=           ar
+ARFLAGS?=      rl
+RANLIB?=       ranlib
+NM?=           nm
+LORDER?=       lorder
+
+AS?=           as
+CC?=           mgcc
+HOST_CC?=      mgcc
+CPP?=          ${CC} -E
+
+CPPFLAGS?=
+
+AFLAGS?=       ${DEBUG}
+COMPILE.s?=    ${CC} -D_ASM_SOURCE ${AFLAGS} -c
+LINK.s?=       ${CC} -D_ASM_SOURCE ${AFLAGS} ${LDFLAGS}
+COMPILE.S?=    ${CC} -D_ASM_SOURCE ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
+LINK.S?=       ${CC} -D_ASM_SOURCE ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
+
+DBG?=          -O2 -pipe
+CFLAGS?=       ${DBG} ${DEBUG}
+COMPILE.c?=    ${CC} ${CFLAGS:M*} ${CPPFLAGS} -c
+LINK.c?=       ${CC} ${CFLAGS:M*} ${CPPFLAGS} ${LDFLAGS}
+
+CXX?=          c++
+CXXFLAGS?=     ${CFLAGS}
+COMPILE.cc?=   ${CXX} ${CXXFLAGS:M*} ${CPPFLAGS} -c
+LINK.cc?=      ${CXX} ${CXXFLAGS:M*} ${CPPFLAGS} ${LDFLAGS}
+
+OBJC?=         ${CC}
+OBJCFLAGS?=    ${CFLAGS}
+COMPILE.m?=    ${CC} ${OBJCFLAGS:M*} ${CPPFLAGS} -c
+LINK.m?=       ${CC} ${OBJCFLAGS:M*} ${CPPFLAGS} ${LDFLAGS}
+
+FC?=           f77
+FFLAGS?=       -O
+RFLAGS?=
+COMPILE.f?=    ${FC} ${FFLAGS} -c
+LINK.f?=       ${FC} ${FFLAGS} ${LDFLAGS}
+COMPILE.F?=    ${FC} ${FFLAGS} ${CPPFLAGS} -c
+LINK.F?=       ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
+COMPILE.r?=    ${FC} ${FFLAGS} ${RFLAGS} -c
+LINK.r?=       ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
+
+LEX?=          lex
+LFLAGS?=
+LEX.l?=                ${LEX} ${LFLAGS}
+
+LD?=           ld
+LDFLAGS+=      ${DEBUG}
+
+LINT?=         lint
+LINTFLAGS?=    -chapbxzF
+
+MAKE?=         make
+
+PC?=           pc
+PFLAGS?=
+COMPILE.p?=    ${PC} ${PFLAGS} ${CPPFLAGS} -c
+LINK.p?=       ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
+
+SHELL?=                /bin/mksh
+
+SIZE?=         size
+
+TSORT?=        tsort -q
+
+YACC?=         yacc
+YFLAGS?=
+YACC.y?=       ${YACC} ${YFLAGS}
+
+INSTALL?=      install
+
+CTAGS?=                /usr/bin/ctags
+
+# C
+.c:
+       ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.c.o:
+       ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} ${.IMPSRC}
+.c.i:
+       ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC}
+.c.a:
+       ${COMPILE.c} ${CFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+.c.ln:
+       ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} \
+           -i ${.IMPSRC}
+
+# Objective-C
+.m:
+       ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.m.o:
+       ${COMPILE.m} ${OBJCFLAGS_${.TARGET}:M*} ${.IMPSRC}
+.m.i:
+       ${COMPILE.m} ${OBJCFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC}
+.m.a:
+       ${COMPILE.m} ${OBJCFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+.m.ln:
+       ${LINT} ${LINTFLAGS} ${OBJCFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} \
+           -i ${.IMPSRC}
+
+# C++
+.cc .cxx .cpp .C:
+       ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.cc.o .cxx.o .cpp.o .C.o:
+       ${COMPILE.cc} ${CXXFLAGS_${.TARGET}:M*} ${.IMPSRC}
+.cc.i .cxx.i .cpp.i .C.i:
+       ${COMPILE.cc} ${CXXFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC}
+.cc.a .cxx.a .cpp.a .C.a:
+       ${COMPILE.cc} ${CXXFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+# Fortran/Ratfor
+.f:
+       ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.f.o:
+       ${COMPILE.f} ${.IMPSRC}
+.f.a:
+       ${COMPILE.f} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+.F:
+       ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.F.o:
+       ${COMPILE.F} ${.IMPSRC}
+.F.a:
+       ${COMPILE.F} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+.r:
+       ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.r.o:
+       ${COMPILE.r} ${.IMPSRC}
+.r.a:
+       ${COMPILE.r} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+# Pascal
+.p:
+       ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.p.o:
+       ${COMPILE.p} ${.IMPSRC}
+.p.a:
+       ${COMPILE.p} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+# Assembly
+.s:
+       ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.s.o:
+       ${COMPILE.s} ${AFLAGS_${.TARGET}:M*} ${.IMPSRC}
+.s.a:
+       ${COMPILE.s} ${AFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+.S:
+       ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
+.S.o:
+       ${COMPILE.S} ${AFLAGS_${.TARGET}:M*} ${.IMPSRC}
+.S.i:
+       ${COMPILE.S} ${AFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC}
+.S.a:
+       ${COMPILE.S} ${AFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC}
+       ${AR} ${ARFLAGS} $@ $*.o
+       rm -f $*.o
+
+# Lex
+.l:
+       ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC}
+       ${LINK.c} -o ${.TARGET} ${.TARGET:R}.yy.c ${LDLIBS} -ll
+       rm -f ${.TARGET:R}.yy.c
+.l.c:
+       ${LEX.l} -o${.TARGET} ${.IMPSRC}
+.l.o:
+       ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC}
+       ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} ${.TARGET:R}.yy.c
+       rm -f ${.TARGET:R}.yy.c
+
+# Yacc
+.y:
+       ${YACC.y} -o ${.TARGET:R}.tab.c ${.IMPSRC}
+       ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS}
+       rm -f ${.TARGET:R}.tab.c
+.y.c:
+       ${YACC.y} -o ${.TARGET} ${.IMPSRC}
+.y.o:
+       ${YACC.y} -o ${.TARGET:R}.tab.c ${.IMPSRC}
+       ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} ${.TARGET:R}.tab.c
+       rm -f ${.TARGET:R}.tab.c
+
+# Shell
+.sh:
+       rm -f ${.TARGET}
+       cp ${.IMPSRC} ${.TARGET}
Index: devel/bmake/files/unit-tests/modts
===================================================================
RCS file: /cvsroot/pkgsrc/devel/bmake/files/unit-tests/modts,v
retrieving revision 1.1
diff -u -d -r1.1 modts
--- devel/bmake/files/unit-tests/modts  31 Oct 2005 21:52:26 -0000      1.1
+++ devel/bmake/files/unit-tests/modts  14 Jan 2011 17:42:46 -0000
@@ -10,23 +10,23 @@
 all:   mod-ts
 
 mod-ts:
-       @echo 'LIST="${LIST}"'
-       @echo 'LIST:ts,="${LIST:ts,}"'
-       @echo 'LIST:ts/:tu="${LIST:ts/:tu}"'
-       @echo 'LIST:ts::tu="${LIST:ts::tu}"'
-       @echo 'LIST:ts:tu="${LIST:ts:tu}"'
-       @echo 'LIST:tu:ts/="${LIST:tu:ts/}"'
-       @echo 'LIST:ts:="${LIST:ts:}"'
-       @echo 'LIST:ts="${LIST:ts}"'
-       @echo 'LIST:ts:S/two/2/="${LIST:ts:S/two/2/}"'
-       @echo 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"'
-       @echo 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"'
-       @echo "Pretend the '/' in '/n' etc. below are back-slashes."
-       @echo 'LIST:ts/n="${LIST:ts\n}"'
-       @echo 'LIST:ts/t="${LIST:ts\t}"'
-       @echo 'LIST:ts/012:tu="${LIST:ts\012:tu}"'
-       @echo 'LIST:tx="${LIST:tx}"'
-       @echo 'LIST:ts/x:tu="${LIST:ts\x:tu}"'
-       @echo 'FU_$@="${FU_${@:ts}:ts}"'
-       @echo 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?'
-       @echo 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?'
+       @printf '%s\n' 'LIST="${LIST}"'
+       @printf '%s\n' 'LIST:ts,="${LIST:ts,}"'
+       @printf '%s\n' 'LIST:ts/:tu="${LIST:ts/:tu}"'
+       @printf '%s\n' 'LIST:ts::tu="${LIST:ts::tu}"'
+       @printf '%s\n' 'LIST:ts:tu="${LIST:ts:tu}"'
+       @printf '%s\n' 'LIST:tu:ts/="${LIST:tu:ts/}"'
+       @printf '%s\n' 'LIST:ts:="${LIST:ts:}"'
+       @printf '%s\n' 'LIST:ts="${LIST:ts}"'
+       @printf '%s\n' 'LIST:ts:S/two/2/="${LIST:ts:S/two/2/}"'
+       @printf '%s\n' 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"'
+       @printf '%s\n' 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"'
+       @printf '%s\n' "Pretend the '/' in '/n' etc. below are back-slashes."
+       @printf '%s\n' 'LIST:ts/n="${LIST:ts\n}"'
+       @printf '%s\n' 'LIST:ts/t="${LIST:ts\t}"'
+       @printf '%s\n' 'LIST:ts/012:tu="${LIST:ts\012:tu}"'
+       @printf '%s\n' 'LIST:tx="${LIST:tx}"'
+       @printf '%s\n' 'LIST:ts/x:tu="${LIST:ts\x:tu}"'
+       @printf '%s\n' 'FU_$@="${FU_${@:ts}:ts}"'
+       @printf '%s\n' 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?'
+       @printf '%s\n' 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?'
Index: net/libfetch/files/ftp.c
===================================================================
RCS file: /cvsroot/pkgsrc/net/libfetch/files/ftp.c,v
retrieving revision 1.36
diff -u -d -r1.36 ftp.c
--- net/libfetch/files/ftp.c    20 Aug 2010 17:56:49 -0000      1.36
+++ net/libfetch/files/ftp.c    28 Dec 2010 15:38:07 -0000
@@ -464,7 +464,7 @@
 {
        char *ln;
        const char *filename;
-       int filenamelen, type;
+       int filenamelen, type, year;
        struct tm tm;
        time_t t;
        int e;
@@ -516,13 +516,13 @@
                return (-1);
        }
        if (sscanf(ln, "%04d%02d%02d%02d%02d%02d",
-           &tm.tm_year, &tm.tm_mon, &tm.tm_mday,
+           &year, &tm.tm_mon, &tm.tm_mday,
            &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
                ftp_seterr(FTP_PROTOCOL_ERROR);
                return (-1);
        }
        tm.tm_mon--;
-       tm.tm_year -= 1900;
+       tm.tm_year = year - 1900;
        tm.tm_isdst = -1;
        t = timegm(&tm);
        if (t == (time_t)-1)
Index: net/libfetch/files/http.c
===================================================================
RCS file: /cvsroot/pkgsrc/net/libfetch/files/http.c,v
retrieving revision 1.29
diff -u -d -r1.29 http.c
--- net/libfetch/files/http.c   24 Jan 2010 19:10:35 -0000      1.29
+++ net/libfetch/files/http.c   28 Dec 2010 15:38:08 -0000
@@ -797,9 +797,9 @@
        struct tm tm;
        char buf[80];
        gmtime_r(&last_modified, &tm);
-       snprintf(buf, sizeof(buf), "%.3s, %02d %.3s %4d %02d:%02d:%02d GMT",
+       snprintf(buf, sizeof(buf), "%.3s, %02d %.3s %4ld %02d:%02d:%02d GMT",
            weekdays + tm.tm_wday * 3, tm.tm_mday, months + tm.tm_mon * 3,
-           tm.tm_year + 1900, tm.tm_hour, tm.tm_min, tm.tm_sec);
+           (long)tm.tm_year + 1900, tm.tm_hour, tm.tm_min, tm.tm_sec);
        http_cmd(conn, "If-Modified-Since: %s\r\n", buf);
 }
 


Home | Main Index | Thread Index | Old Index