pkgsrc-Bugs archive

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

Re: pkg/45046: mk/* minix support



The following reply was made to PR pkg/45046; it has been noted by GNATS.

From: Thomas Cort <tcort%minix3.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/45046: mk/* minix support
Date: Tue, 21 Jun 2011 08:07:07 -0400

 Here's an update to the patch. We changed _OPSYS_SHLIB_TYPE to "none"
 since Minix doesn't support shared libraries.
 
 diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
 index 094f902..2f7b7d2 100644
 --- a/mk/bsd.pkg.mk
 +++ b/mk/bsd.pkg.mk
 @@ -482,7 +482,7 @@ PKG_FAIL_REASON+= "${PKGNAME} is restricted:" \
  PKG_FAIL_REASON+= "${PKGNAME} may not be built, because it utilizes strong 
cryptography"
  .    endif
  .  endif
 -.  if defined(USE_X11) && (${X11_TYPE} == "native") && !exists(${X11BASE})
 +.  if defined(USE_X11) && (${X11_TYPE} == "native") && !exists(${X11BASE}) && 
(${OPSYS} != "Minix")
  PKG_FAIL_REASON+= "${PKGNAME} uses X11, but ${X11BASE} not found"
  .  endif
  .  if defined(BROKEN)
 diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
 index 46e3222..cefe6c9 100644
 --- a/mk/bsd.prefs.mk
 +++ b/mk/bsd.prefs.mk
 @@ -279,6 +279,17 @@ LOWER_VENDOR?=            sun
  LOWER_OPSYS?=         solaris
  LOWER_OPSYS_VERSUFFIX=        2
  
 +.elif ${OPSYS} == "Minix"
 +OS_VERSION!= echo `${UNAME} -v`
 +LOWER_OS_VERSION= OS_VERSION
 +LOWER_ARCH!=          ${UNAME} -p
 +MACHINE_ARCH?=                ${LOWER_ARCH}
 +.if ${MACHINE_ARCH} == "unknown"
 +MACHINE_ARCH=         ${LOWER_ARCH}
 +.endif
 +LOWER_VENDOR?=pc
 +LOWER_OPSYS:=         ${OPSYS:tl}
 +CPPFLAGS+=    -D_MINIX -D_POSIX_SOURCE
  .elif !defined(LOWER_OPSYS)
  LOWER_OPSYS:=         ${OPSYS:tl}
  .endif
 @@ -549,6 +560,8 @@ X11BASE?=  /usr
  .  elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) || \
          !empty(MACHINE_PLATFORM:MDarwin-??.*-*)
  X11BASE?=     /usr/X11
 +.  elif ${OPSYS} == "Minix"
 +X11BASE?=     ${LOCALBASE}/X11R6
  .  elif exists(/usr/X11R7/lib/libX11.so)
  X11BASE?=     /usr/X11R7
  .  else
 diff --git a/mk/buildlink3/imake-check b/mk/buildlink3/imake-check
 index c337d20..cc73165 100755
 --- a/mk/buildlink3/imake-check
 +++ b/mk/buildlink3/imake-check
 @@ -86,8 +86,8 @@ then
  fi
  
  # Run imake to process the Imakefile.
 -${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config -s - |
 -${IMAKE_MAKE} -f - builtin-test |
 +${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config
 +${IMAKE_MAKE} builtin-test |
  ${GREP} -q yes
  exitcode="$?"
  
 diff --git a/mk/fetch/sites.mk b/mk/fetch/sites.mk
 index 169f880..3315ffe 100644
 --- a/mk/fetch/sites.mk
 +++ b/mk/fetch/sites.mk
 @@ -465,3 +465,5 @@ MASTER_SITE_BACKUP?=       \
        ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/ \
        http://ftp.NetBSD.org/pub/pkgsrc/distfiles/ \
        ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/
 +
 +MASTER_SITE_MINIX=http://www.minix3.org/distfiles-minix/
 diff --git a/mk/install/bin-install.mk b/mk/install/bin-install.mk
 index 0400f8f..814006d 100644
 --- a/mk/install/bin-install.mk
 +++ b/mk/install/bin-install.mk
 @@ -32,6 +32,9 @@
  .if ${OPSYS} == "NetBSD"
  BINPKG_SITES?= \
        ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$${arch}/$${rel}
 +.elif ${OPSYS} == "Minix"
 +BINPKG_SITES?= \
 +      ftp://ftp.minix3.org/pub/minix/packages/$$(${UNAME} -r)/$${arch}
  .elif ${OPSYS} == "DragonFly"
  BINPKG_SITES?= \
        
http://mirror-master.dragonflybsd.org/packages/$${arch}/DragonFly-$${rel}/stable
 diff --git a/mk/platform/Minix.mk b/mk/platform/Minix.mk
 new file mode 100644
 index 0000000..e91d774
 --- /dev/null
 +++ b/mk/platform/Minix.mk
 @@ -0,0 +1,87 @@
 +# $NetBSD: Linux.mk,v 1.37 2010/03/18 22:46:01 sbd Exp $
 +#
 +# Variable definitions for the Minix operating system.
 +
 +ECHO_N?=      ${ECHO} -n
 +.if !defined(X11_TYPE) || ${X11_TYPE} == "native"
 +IMAKE_MAKE?=  ${MAKE} # program which gets invoked by imake
 +.endif
 +IMAKEOPTS+=   -DBuildHtmlManPages=NO
 +PKGLOCALEDIR?=        share
 +PS?=          /usr/bin/ps
 +# XXX: default from defaults/mk.conf.  Verify/correct for this platform
 +# and remove this comment.
 +SU?=          /usr/bin/su
 +TYPE?=                type                    # Shell builtin
 +
 +CPP_PRECOMP_FLAGS?=   # unset
 +DEF_UMASK?=           022
 +DEFAULT_SERIAL_DEVICE?=       /dev/null
 +EXPORT_SYMBOLS_LDFLAGS?=      # Don't add symbols to the dynamic symbol table
 +GROUPADD?=
 +NOLOGIN?=             /bin/false
 +PKG_TOOLS_BIN?=               ${LOCALBASE}/sbin
 +ROOT_CMD?=            ${SU} - root -c
 +ROOT_GROUP?=  operator
 +ROOT_USER?=           root
 +SERIAL_DEVICES?=      /dev/null
 +USERADD?=             /usr/bin/useradd
 +ULIMIT_CMD_datasize?= : 
 +
 +# imake installs manpages in weird places
 +# these values from /usr/X11R6/lib/X11/config/linux.cf
 +IMAKE_MAN_SOURCE_PATH=        man/man
 +IMAKE_MAN_SUFFIX=     1x
 +IMAKE_LIBMAN_SUFFIX=  3x
 +IMAKE_KERNMAN_SUFFIX= 4
 +IMAKE_FILEMAN_SUFFIX= 5x
 +IMAKE_GAMEMAN_SUFFIX= 6
 +IMAKE_MISCMAN_SUFFIX= 7
 +IMAKE_MAN_DIR=                ${IMAKE_MAN_SOURCE_PATH}1
 +IMAKE_LIBMAN_DIR=     ${IMAKE_MAN_SOURCE_PATH}3
 +IMAKE_KERNMAN_DIR=    ${IMAKE_MAN_SOURCE_PATH}4
 +IMAKE_FILEMAN_DIR=    ${IMAKE_MAN_SOURCE_PATH}5
 +IMAKE_GAMEMAN_DIR=    ${IMAKE_MAN_SOURCE_PATH}6
 +IMAKE_MISCMAN_DIR=    ${IMAKE_MAN_SOURCE_PATH}7
 +IMAKE_MANNEWSUFFIX=   ${IMAKE_MAN_SUFFIX}
 +IMAKE_MANINSTALL?=    maninstall catinstall
 +
 +_OPSYS_HAS_INET6=     no      # IPv6 is not standard
 +_OPSYS_HAS_JAVA=      no      # Java is not standard
 +_OPSYS_HAS_MANZ=      no      # no MANZ for gzipping of man pages
 +_OPSYS_HAS_OSSAUDIO=  no      # libossaudio is available
 +_OPSYS_PERL_REQD=             # no base version of perl required
 +_OPSYS_PTHREAD_AUTO=  no      # -lpthread needed for pthreads
 +_OPSYS_SHLIB_TYPE=    none    # No shared libraries on Minix (yet)
 +_PATCH_CAN_BACKUP=    yes     # native patch(1) can make backups
 +_PATCH_BACKUP_ARG?=   -b -V simple --suffix   # 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
 +
 +_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.
 +# FIXME: Adjust to work on this system and enable the lines below.
 +#_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).
 +# FIXME: Adjust to work on this system and enable the lines below.
 +#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
 +#GAMES_USER=          games
 +#GAMES_GROUP=         games
 +#GAMEOWN=             ${GAMES_USER}
 +#GAMEGRP=             ${GAMES_GROUP}
 +#GAMEMODE=            2555
 +#GAMEDIRMODE=         0775
 +#.endif
 diff --git a/mk/tools/tools.Minix.mk b/mk/tools/tools.Minix.mk
 new file mode 100644
 index 0000000..5d91e77
 --- /dev/null
 +++ b/mk/tools/tools.Minix.mk
 @@ -0,0 +1,64 @@
 +# $NetBSD: tools.Linux.mk,v 1.47 2010/02/13 08:30:59 obache Exp $
 +#
 +# System-supplied tools for the Minix operating system.
 +
 +#System supplied tools
 +TOOLS_PLATFORM.[?=            /bin/[
 +TOOLS_PLATFORM.awk?=          /usr/bin/awk
 +TOOLS_PLATFORM.basename?=     /usr/bin/basename
 +TOOLS_PLATFORM.bzcat?=                /usr/bin/bzcat
 +TOOLS_PLATFORM.cat?=          /bin/cat
 +TOOLS_PLATFORM.bzip2?=                /usr/bin/bzip2
 +TOOLS_PLATFORM.chgrp?=                /usr/bin/chgrp
 +TOOLS_PLATFORM.chmod?=                /usr/bin/chmod
 +TOOLS_PLATFORM.chown?=                /usr/bin/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.dirname?=      /usr/bin/dirname
 +TOOLS_PLATFORM.echo?=         /bin/echo
 +TOOLS_PLATFORM.env?=          /usr/bin/env
 +TOOLS_PLATFORM.expr?=         /bin/expr
 +TOOLS_PLATFORM.false?=                /bin/false
 +TOOLS_PLATFORM.file?=         /usr/bin/file
 +TOOLS_PLATFORM.find?=         /usr/bin/find
 +TOOLS_PLATFORM.head?=         /usr/bin/head
 +TOOLS_PLATFORM.id?=           /usr/bin/id
 +TOOLS_PLATFORM.install?=      /bin/install
 +TOOLS_PLATFORM.ln?=           /bin/ln
 +TOOLS_PLATFORM.ls?=           /bin/ls
 +TOOLS_PLATFORM.m4?=           /usr/bin/m4
 +TOOLS_PLATFORM.mail?=         /usr/bin/mail
 +TOOLS_PLATFORM.mkdir?=                /usr/bin/mkdir -p
 +TOOLS_PLATFORM.mv?=           /bin/mv
 +TOOLS_PLATFORM.nice?=         /usr/bin/nice
 +TOOLS_PLATFORM.nroff?=                /usr/bin/nroff
 +TOOLS_PLATFORM.pwd?=          /bin/pwd
 +TOOLS_PLATFORM.rm?=           /bin/rm
 +TOOLS_PLATFORM.rmdir?=                /bin/rmdir
 +TOOLS_PLATFORM.sed?=  /bin/sed
 +TOOLS_PLATFORM.sh?=           /bin/sh
 +TOOLS_PLATFORM.sleep?=                /usr/bin/sleep
 +TOOLS_PLATFORM.strip?=                /usr/bin/strip
 +TOOLS_PLATFORM.tail?=         /usr/bin/tail
 +TOOLS_PLATFORM.tar?=          /usr/bin/tar
 +TOOLS_PLATFORM.bsdtar?=               /usr/bin/bsdtar
 +TOOLS_PLATFORM.fetch?=                /usr/bin/fetch
 +TOOLS_PLATFORM.tee?=          /usr/bin/tee
 +TOOLS_PLATFORM.test?=         /bin/test
 +TOOLS_PLATFORM.tr?=           /usr/bin/tr
 +TOOLS_PLATFORM.true?=         /bin/true
 +TOOLS_PLATFORM.tsort?=                /usr/bin/tsort
 +TOOLS_PLATFORM.wc?=           /usr/bin/wc
 +TOOLS_PLATFORM.xargs?=                /usr/bin/xargs
 +TOOLS_PLATFORM.yacc?=         /usr/bin/yacc
 +TOOLS_PLATFORM.grep?=         /usr/bin/grep
 +TOOLS_PLATFORM.egrep?=                /usr/bin/egrep
 +TOOLS_PLATFORM.fgrep?=                /usr/bin/fgrep
 +TOOLS_PLATFORM.printf?=               /usr/bin/printf
 +TOOLS_PLATFORM.touch?=                /usr/bin/touch
 +TOOLS_PLATFORM.hostname?= /usr/bin/hostname
 +TOOLS_PLATFORM.patch?=                /usr/bin/patch
 +TOOLS_PLATFORM.diff?= /usr/bin/diff
 +TOOLS_PLATFORM.sort?= /usr/bin/sort
 


Home | Main Index | Thread Index | Old Index