pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/compat_netbsd Various changes to produce the...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0c7cd27db0f0
branches:  trunk
changeset: 341128:0c7cd27db0f0
user:      he <he%pkgsrc.org@localhost>
date:      Tue Oct 15 12:10:19 2019 +0000

description:
Various changes to produce the compat80 package:
 * bump versions to match 8.0 / 9.0_BETA
 * Use local directories (NetBSD-daily isn't on ftp.netbsd.org anymore).
   Yes, this requires local access to both versions.
 * Add detection of .tar.xz sets from "new" version sets
 * Overhaul arch-list and machine-lists, add various arm and mips variants
 * Add a few comments to hopefully make it easier to grasp what is going on
   (according to my best interpretation)

diffstat:

 emulators/compat_netbsd/gencompat.sh |  62 ++++++++++++++++++++++++-----------
 1 files changed, 43 insertions(+), 19 deletions(-)

diffs (131 lines):

diff -r 7659e9339fc7 -r 0c7cd27db0f0 emulators/compat_netbsd/gencompat.sh
--- a/emulators/compat_netbsd/gencompat.sh      Tue Oct 15 12:03:42 2019 +0000
+++ b/emulators/compat_netbsd/gencompat.sh      Tue Oct 15 12:10:19 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: gencompat.sh,v 1.2 2009/06/14 22:58:00 joerg Exp $
+# $NetBSD: gencompat.sh,v 1.3 2019/10/15 12:10:19 he Exp $
 #
 # This script generates the distfiles and PLISTs for the NetBSD compat*
 # packages.
@@ -9,30 +9,38 @@
 # XXX options.
 #
 
-compat_version=4.0
-compat_version_name=40
+compat_version=8.0
+compat_version_name=80
 
-compat_base=/ftp/pub/NetBSD/NetBSD-$compat_version
-cur_base=/ftp/pub/NetBSD/NetBSD-daily/HEAD/200712300002Z
+compat_base=/x/NetBSD/$compat_version
+cur_base=/x/NetBSD/9.0_BETA
 setdir=binary/sets
 
 BASESET="base.tgz"
 XBASESET="xbase.tgz"
+BASESET_X="base.tar.xz"
+XBASESET_X="xbase.tar.xz"
 
-archlist="alpha arm hppa i386 m68010 m68k mipseb mipsel ns32k powerpc sh3eb sh3el sparc sparc64 vax x86_64"
+archlist="alpha arm armeb armv6hf armv7hf earmv7hfeb earm earmv7hfeb hppa i386 m68010 m68k mips64el mips64eb mipseb mipsel powerpc sh3eb sh3el sparc sparc64 vax x86_64"
 
 machlist_alpha="alpha"
-machlist_arm="acorn26 acorn32 cats evbarm hpcarm iyonix netwinder shark zaurus"
+machlist_arm="acorn32 cats evbarm hpcarm iyonix netwinder shark zaurus"
+machlist_earm="evbarm-earm"
+machlist_armeb="evbarm-earmeb"
+machlist_armv6hf="evbarm-earmv6hf"
+machlist_armv7hf="evbarm-earmv7hf"
+machlist_earmv7hfeb="evbarm-earmv7hfeb"
 machlist_hppa="hp700"
 machlist_i386="i386"
 machlist_m68010="sun2"
 machlist_m68k="amiga atari cesfic hp300 luna68k mac68k mvme68k news68k next68k sun3 x68k"
-machlist_mipseb="ews4800mips mipsco newsmips sgimips"
-machlist_mipsel="algor arc cobalt evbmips hpcmips playstation2 pmax sbmips"
-machlist_ns32k="pc532"
-machlist_powerpc="amigappc bebox evbppc ibmnws macppc mvmeppc ofppc pmppc prep sandpoint"
-machlist_sh3eb="mmeye"
-machlist_sh3el="dreamcast landisk hpcsh"
+machlist_mipseb="ews4800mips mipsco newsmips sgimips evbmips-mipseb"
+machlist_mipsel="algor arc cobalt hpcmips pmax evbmips-mipsel"
+machlist_mips64el="evbmips-mips64el"
+machlist_mips64eb="evbmips-mips64eb"
+machlist_powerpc="amigappc bebox evbppc ibmnws macppc mvmeppc ofppc prep rs6000 sandpoint"
+machlist_sh3eb="evbsh3-sh3eb"
+machlist_sh3el="evbsh3-sh3el dreamcast landisk hpcsh"
 machlist_sparc="sparc"
 machlist_sparc64="sparc64"
 machlist_vax="vax"
@@ -56,8 +64,18 @@
                compat_dir=$compat_pkgdir-$arch-$compat_version
                compat_extras_dir=$compat_pkgdir-extras-$arch-$compat_version
 
-               [ -f $cur_setdir/$BASESET ] || continue
-               [ -f $cur_setdir/$XBASESET ] || continue
+               # probe for .tar.xz entries in $cur_setdir
+               BASE=$BASESET
+               XBASE=$XBASESET
+               if [ -f $cur_setdir/$BASESET_X ]; then
+                       BASE=$BASESET_X
+               fi
+               if [ -f $cur_setdir/$XBASESET_X ]; then
+                       XBASE=$XBASESET_X
+               fi
+
+               [ -f $cur_setdir/$BASE ] || continue
+               [ -f $cur_setdir/$XBASE ] || continue
                [ -f $compat_setdir/$BASESET ] || continue
                [ -f $compat_setdir/$XBASESET ] || continue
 
@@ -66,18 +84,21 @@
                [ -d $compat_extras_dir ] || mkdir -p $compat_extras_dir
 
                # Extract the shared libraries from the base and xbase sets.
-               ( cd $cur_dir && tar zxf $cur_setdir/$BASESET "*/ld.*" "*.so*" )
-               ( cd $cur_dir && tar zxf $cur_setdir/$XBASESET "*.so*" )
+               ( cd $cur_dir && tar zxf $cur_setdir/$BASE "*/ld.*" "*.so*" )
+               ( cd $cur_dir && tar zxf $cur_setdir/$XBASE "*.so*" )
 
                ( cd $compat_dir && tar zxf $compat_setdir/$BASESET "*/ld.*" "*.so*" )
                ( cd $compat_dir && tar zxf $compat_setdir/$XBASESET "*.so*" )
 
+               # For all non-dirs (files, symlinks) in $cur_dir
                ( cd $cur_dir && find . \! -type d -print ) | sort |
                while read f; do
                        destdir=$compat_extras_dir/`dirname $f`
                        mkdir -p $destdir
+                       # Move out of $compat_dir
                        mv -f $compat_dir/$f $destdir 2>/dev/null || true
                        case $f in
+                       # Move any libs with same major number too
                        *.so.[0-9]|*.so.[0-9][0-9]|*.so.[0-9][0-9][0-9])
                                mv -f $compat_dir/$f.* $destdir 2>/dev/null || true
                                ;;
@@ -90,18 +111,21 @@
                        rmdir -p $d 2>/dev/null || true
                done
 
+               # What is left in $compat_dir is (mostly) libs
+               # with differnt majors than what's in the new version
+
                [ -d $compat_pkgdir ] || mkdir -p $compat_pkgdir
                [ -d $compat_extras_pkgdir ] || mkdir -p $compat_extras_pkgdir
 
                # Generate PLISTs and distfiles.
-               ( echo '@comment $NetBSD: gencompat.sh,v 1.2 2009/06/14 22:58:00 joerg Exp $'
+               ( echo '@comment $NetBSD: gencompat.sh,v 1.3 2019/10/15 12:10:19 he Exp $'
                  find $compat_dir \! -type d | sort |
                  sed 's,'$compat_dir'/,${EMULSUBDIRSLASH},'
                ) > $compat_pkgdir/PLIST.$arch
                tar cf $compat_pkgdir/$compat_dir.tar $compat_dir
                bzip2 -9 $compat_pkgdir/$compat_dir.tar
 
-               ( echo '@comment $NetBSD: gencompat.sh,v 1.2 2009/06/14 22:58:00 joerg Exp $'
+               ( echo '@comment $NetBSD: gencompat.sh,v 1.3 2019/10/15 12:10:19 he Exp $'
                  find $compat_extras_dir \! -type d | sort |
                  sed 's,'$compat_extras_dir'/,${EMULSUBDIRSLASH},'
                ) > $compat_extras_pkgdir/PLIST.$arch



Home | Main Index | Thread Index | Old Index