Add preference for Cygwin.

This commit is contained in:
obache 2013-02-10 12:25:17 +00:00
parent f6580fc41a
commit 59f7f450d0
3 changed files with 197 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.330 2013/01/23 17:02:23 tron Exp $
# $NetBSD: bsd.prefs.mk,v 1.331 2013/02/10 12:25:17 obache Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@ -70,7 +70,7 @@ UNAME=echo Unknown
.endif
.if !defined(OPSYS)
OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g}
OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g:C/^CYGWIN_.*$/Cygwin/}
MAKEFLAGS+= OPSYS=${OPSYS:Q}
.endif
@ -128,6 +128,13 @@ LOWER_VENDOR?= ibm
.elif ${OPSYS} == "BSDOS"
LOWER_OPSYS?= bsdi
.elif ${OPSYS} == "Cygwin"
LOWER_OPSYS?= cygwin
LOWER_VENDOR?= pc
LOWER_ARCH!= ${UNAME} -m
_OS_VERSION!= ${UNAME} -r
OS_VERSION= ${_OS_VERSION:C/\(.*\)//}
.elif ${OPSYS} == "Darwin"
LOWER_OPSYS?= darwin
.if empty(OS_VERSION:M[1-9].*.*)
@ -371,6 +378,8 @@ OBJECT_FMT= ELF
. else
OBJECT_FMT= SOM
. endif
.elif ${OPSYS} == "Cygwin"
OBJECT_FMT= PE
.endif
# Calculate depth

89
mk/platform/Cygwin.mk Normal file
View file

@ -0,0 +1,89 @@
# $NetBSD: Cygwin.mk,v 1.1 2013/02/10 12:25:18 obache Exp $
#
# Variable definitions for the Windows with Cygwin.
###
### Overrides to standard BSD .mk files
###
# "catinstall" not yet supported as there's no shipped [gn]roff
MANINSTALL= maninstall
MAKE_FLAGS+= MKCATPAGES=no NOLINT=1
###
### Alternate defaults to global pkgsrc settings, to help avoid
### some of the excessive Interix fork(2) overhead, and reduce the
### amount of settings required in the user's mk.conf
###
INSTALL?= ${PREFIX}/bin/install-sh
PAX?= ${PREFIX}/bin/nbpax
.if defined(BATCH)
BULK_PREREQ+= lang/perl5
USE_BULK_BROKEN_CHECK?= no
USE_BULK_TIMESTAMPS?= no
.endif
###
### Platform definitions common to pkgsrc/mk/platform/*.mk
###
ECHO_N?= ${ECHO} -n
IMAKE_MAKE?= ${GMAKE} # program which gets invoked by imake
IMAKEOPTS+= -DBuildHtmlManPages=NO
PKGLOCALEDIR?= share
PS?= /bin/ps
SU?= /bin/su
TYPE?= type # Shell builtin
USERADD?= ${LOCALBASE}/sbin/useradd
GROUPADD?= ${LOCALBASE}/sbin/groupadd
_PKG_USER_HOME?= # empty by default
_USER_DEPENDS= user>=20040426:../../sysutils/user_interix
CPP_PRECOMP_FLAGS?= # unset
CONFIG_RPATH_OVERRIDE?= config.rpath */config.rpath */*/config.rpath
DEF_UMASK?= 002
EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table
MOTIF_TYPE_DEFAULT?= motif # default 2.0 compatible libs type
NOLOGIN?= /bin/false
PKG_TOOLS_BIN?= ${LOCALBASE}/sbin
PKGDIRMODE?= 775
# ROOT_USER might be numeric in the special case of Administrator; canonify it:
ROOT_CMD?= ${SU} - "$$(id -un ${ROOT_USER})" -c
ROOT_USER?= ${BINOWN}
ROOT_GROUP?= id -g Administraotr
TOUCH_FLAGS?=
ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
ULIMIT_CMD_memorysize?= ulimit -v `ulimit -H -v`
_OPSYS_HAS_INET6= yes # IPv6 is standard
_OPSYS_HAS_JAVA= no # Java is not standard
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
_OPSYS_PERL_REQD= 5.8.3nb1 # base version of perl required
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_SHLIB_TYPE= PEwin # shared lib type
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix
_USE_RPATH= no # 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
DEFAULT_SERIAL_DEVICE?= /dev/ttyS0
SERIAL_DEVICES?= /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3
_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= ${ECHO} 262144

97
mk/tools/tools.Cygwin.mk Normal file
View file

@ -0,0 +1,97 @@
# $NetBSD: tools.Cygwin.mk,v 1.1 2013/02/10 12:25:18 obache Exp $
#
# System-supplied tools for the Cygwin operating system.
TOOLS_PLATFORM.[?= /bin/[
TOOLS_PLATFORM.awk?= /bin/awk
TOOLS_PLATFORM.basename?= /bin/basename
TOOLS_PLATFORM.bash?= /bin/bash
.if exists(/bin/bison)
TOOLS_PLATFORM.bison?= /bin/bison
TOOLS_PLATFORM.bison-yacc?= /bin/bison -y
.endif
.if exists(/bin/bzcat)
TOOLS_PLATFORM.bzcat?= /bin/bzcat
.elif exists(/bin/bzip2)
TOOLS_PLATFORM.bzcat?= /bin/bzip2 -cd
.endif
.if exists(/bin/bzip2)
TOOLS_PLATFORM.bzip2?= /bin/bzip2
.endif
TOOLS_PLATFORM.cat?= /bin/cat
TOOLS_PLATFORM.chgrp?= /bin/chgrp
TOOLS_PLATFORM.chmod?= /bin/chmod
TOOLS_PLATFORM.chown?= /bin/chown
TOOLS_PLATFORM.cmp?= /bin/cmp
TOOLS_PLATFORM.cp?= /bin/cp
TOOLS_PLATFORM.csh?= /bin/csh
TOOLS_PLATFORM.cut?= /bin/cut
TOOLS_PLATFORM.date?= /bin/date
TOOLS_PLATFORM.diff?= /bin/diff
TOOLS_PLATFORM.dirname?= /bin/dirname
TOOLS_PLATFORM.echo?= echo # shell builtin
TOOLS_PLATFORM.egrep?= /bin/egrep
TOOLS_PLATFORM.env?= /bin/env
TOOLS_PLATFORM.expr?= /bin/expr
TOOLS_PLATFORM.false?= false # shell builtin
TOOLS_PLATFORM.fgrep?= /bin/fgrep
TOOLS_PLATFORM.file?= /bin/file
TOOLS_PLATFORM.find?= /bin/find
.if exists(/bin/flex)
TOOLS_PLATFORM.flex?= /bin/flex
TOOLS_PLATFORM.lex?= /bin/flex
.endif
TOOLS_PLATFORM.grep?= /bin/grep
TOOLS_PLATFORM.gunzip?= /bin/gunzip -f
TOOLS_PLATFORM.gzcat?= /bin/zcat
TOOLS_PLATFORM.gzip?= /bin/gzip -nf ${GZIP}
TOOLS_PLATFORM.head?= /bin/head
TOOLS_PLATFORM.hostname?= /bin/hostname
TOOLS_PLATFORM.id?= /bin/id
TOOLS_PLATFORM.install?= /bin/install
.if exists(/bin/install-info)
TOOLS_PLATFORM.install-info?= /bin/install-info
.endif
TOOLS_PLATFORM.ln?= /bin/ln
TOOLS_PLATFORM.ls?= /bin/ls
TOOLS_PLATFORM.m4?= /bin/m4
TOOLS_PLATFORM.mail?= /bin/mail
.if exists(/bin/make)
TOOLS_PLATFORM.gmake?= /bin/make
.endif
.if exists(/bin/makeinfo)
TOOLS_PLATFORM.makeinfo?= /bin/makeinfo
.endif
TOOLS_PLATFORM.mkdir?= /bin/mkdir -p
TOOLS_PLATFORM.mktemp?= /bin/mktemp
TOOLS_PLATFORM.mv?= /bin/mv
TOOLS_PLATFORM.nice?= /bin/nice
.if exists(/bin/perl)
TOOLS_PLATFORM.perl?= /bin/perl
.endif
# Don't use GNU patch
#.if exists(/bin/patch)
#TOOLS_PLATFORM.patch?= /bin/patch
#.endif
.if exists(/bin/pkg-config)
TOOLS_PLATFORM.pkg-config?= /bin/pkg-config
.endif
TOOLS_PLATFORM.printf?= /bin/printf
TOOLS_PLATFORM.pwd?= /bin/pwd
TOOLS_PLATFORM.rm?= /bin/rm
TOOLS_PLATFORM.rmdir?= /bin/rmdir
TOOLS_PLATFORM.sh?= /bin/sh
TOOLS_PLATFORM.sleep?= /bin/sleep
TOOLS_PLATFORM.sort?= /bin/sort
TOOLS_PLATFORM.strip?= /bin/strip
TOOLS_PLATFORM.tail?= /bin/tail
TOOLS_PLATFORM.tee?= /bin/tee
TOOLS_PLATFORM.test?= test # shell builtin
TOOLS_PLATFORM.touch?= /bin/touch
TOOLS_PLATFORM.tr?= /bin/tr
TOOLS_PLATFORM.true?= true # shell builtin
TOOLS_PLATFORM.tsort?= /bin/tsort
TOOLS_PLATFORM.wc?= /bin/wc
TOOLS_PLATFORM.xargs?= /bin/xargs -r
TOOLS_PLATFORM.sed?= /bin/sed