summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>2011-01-23 19:07:24 +0000
committeragc <agc>2011-01-23 19:07:24 +0000
commit07a1d88d66e812dabac2c48b20477ca953053f48 (patch)
tree329b182f4e7c428624cf6a843492f604fb12c155 /mk
parentbb4492b8d0a5caa822a9234068455b97a9aa8788 (diff)
downloadpkgsrc-07a1d88d66e812dabac2c48b20477ca953053f48.tar.gz
Add support for MirBSD to pkgsrc. Patches from Benny Siegert and
Thorsten Glaser.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk14
-rw-r--r--mk/configure/gnu-configure.mk47
-rw-r--r--mk/platform/MirBSD.mk95
-rw-r--r--mk/pthread.builtin.mk4
-rw-r--r--mk/tools/tools.MirBSD.mk77
-rw-r--r--mk/wrapper/transform-gcc4
6 files changed, 236 insertions, 5 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 445b6f839a1..d6f55ab373e 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.311 2010/08/24 19:08:28 bad Exp $
+# $NetBSD: bsd.prefs.mk,v 1.312 2011/01/23 19:07:25 agc Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -198,6 +198,15 @@ OS_VERSION= 3.0
. 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 @@ OBJECT_FMT?= a.out
. endif
.elif ${OPSYS} == "DragonFly"
OBJECT_FMT= ELF
+.elif ${OPSYS} == "MirBSD"
+OBJECT_FMT= ELF
+MKPROFILE= no
.elif ${OPSYS} == "AIX"
OBJECT_FMT= XCOFF
.elif ${OPSYS} == "OSF1"
diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk
index ccade7315c3..1734fa167a9 100644
--- a/mk/configure/gnu-configure.mk
+++ b/mk/configure/gnu-configure.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gnu-configure.mk,v 1.9 2009/09/12 00:52:45 joerg Exp $
+# $NetBSD: gnu-configure.mk,v 1.10 2011/01/23 19:07:25 agc Exp $
_VARGROUPS+= gnu-configure
_USER_VARS.gnu-configure= # none
@@ -21,6 +21,10 @@ CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\ ${BINGRP}
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 @@ configure-scripts-override:
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>
+_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
diff --git a/mk/platform/MirBSD.mk b/mk/platform/MirBSD.mk
new file mode 100644
index 00000000000..0d22a849ddf
--- /dev/null
+++ b/mk/platform/MirBSD.mk
@@ -0,0 +1,95 @@
+# $NetBSD: MirBSD.mk,v 1.1 2011/01/23 19:07:26 agc Exp $
+#
+# 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
diff --git a/mk/pthread.builtin.mk b/mk/pthread.builtin.mk
index 1b39ac23e22..9a25a83bbe4 100644
--- a/mk/pthread.builtin.mk
+++ b/mk/pthread.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.builtin.mk,v 1.10 2007/04/12 18:42:02 tnn Exp $
+# $NetBSD: pthread.builtin.mk,v 1.11 2011/01/23 19:07:25 agc Exp $
BUILTIN_PKG:= pthread
@@ -53,7 +53,7 @@ BUILDLINK_LDFLAGS.pthread= # empty
# 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
diff --git a/mk/tools/tools.MirBSD.mk b/mk/tools/tools.MirBSD.mk
new file mode 100644
index 00000000000..104b8b0c9fe
--- /dev/null
+++ b/mk/tools/tools.MirBSD.mk
@@ -0,0 +1,77 @@
+# $NetBSD: tools.MirBSD.mk,v 1.1 2011/01/23 19:07:26 agc Exp $
+#
+# 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
diff --git a/mk/wrapper/transform-gcc b/mk/wrapper/transform-gcc
index 8138f4d4ec5..7e1e3b601e6 100644
--- a/mk/wrapper/transform-gcc
+++ b/mk/wrapper/transform-gcc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-gcc,v 1.20 2009/08/15 13:36:48 joerg Exp $
+# $NetBSD: transform-gcc,v 1.21 2011/01/23 19:07:26 agc Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
@@ -28,6 +28,7 @@ case $arg in
-fexpensive-optimizations |\
-ffast-math |\
-ffloat-store |\
+-fhonour-copts |\
-finline-functions |\
-fno-builtin* |\
-fno-common |\
@@ -68,6 +69,7 @@ case $arg in
-W |\
-W[cLlS],* |\
-Wall |\
+-Wbounded |\
-Wcast-align |\
-Wcast-qual |\
-Wchar-subscripts |\