summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2020-05-08 21:25:24 +0000
committer Eric Hameleers <alien@slackware.com>2020-05-09 08:59:52 +0200
commit04ebdce888955069ae2288597a2e50339eda3f4b (patch)
tree271c1bb47037cabcc3139d95e17120058dd8c4fa /testing
parent7f9672ea573b02b2665782f9760d8c38b83c46e9 (diff)
downloadcurrent-04ebdce888955069ae2288597a2e50339eda3f4b.tar.gz
current-04ebdce888955069ae2288597a2e50339eda3f4b.tar.xz
Fri May 8 21:25:24 UTC 202020200508212524
a/shadow-4.8.1-x86_64-6.txz: Rebuilt. Include manpages for sulogin(8). a/util-linux-2.35.1-x86_64-5.txz: Rebuilt. ap/sysstat-12.3.3-x86_64-1.txz: Upgraded. d/bison-3.6-x86_64-1.txz: Upgraded. l/jansson-2.13.1-x86_64-1.txz: Upgraded. n/NetworkManager-1.24.0-x86_64-1.txz: Upgraded. n/fetchmail-6.4.5-x86_64-1.txz: Upgraded. testing/packages/PAM/shadow-4.8.1-x86_64-6_pam.txz: Rebuilt. Include manpages for sulogin(8). Use this version of /bin/su. testing/packages/PAM/util-linux-2.35.1-x86_64-5_pam.txz: Rebuilt. Don't use this version of /bin/su.
Diffstat (limited to 'testing')
-rw-r--r--testing/packages/PAM/nss-pam-ldapd-0.9.11-x86_64-1_pam.txt11
-rw-r--r--testing/packages/PAM/shadow-4.8.1-x86_64-6_pam.txt (renamed from testing/packages/PAM/shadow-4.8.1-x86_64-5_pam.txt)0
-rw-r--r--testing/packages/PAM/util-linux-2.35.1-x86_64-5_pam.txt (renamed from testing/packages/PAM/util-linux-2.35.1-x86_64-4_pam.txt)0
-rw-r--r--testing/packages/gcc10/gcc-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-brig-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-g++-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-gdc-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-gfortran-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-gnat-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-go-10.1.0-x86_64-1.txt11
-rw-r--r--testing/packages/gcc10/gcc-objc-10.1.0-x86_64-1.txt11
-rw-r--r--testing/source/PAM/buildlist1
-rw-r--r--testing/source/PAM/buildlist-fix-lib-security-location9
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/1025d5de336d8c9585b79df3154b5649da344281.patch42
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/548efe5333b56a0a042843a044e0348317f80065.patch37
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/b33551895b3c02dc7082363c6aae13f8e336f4e5.patch26
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/doinst.sh26
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/fea0f5ed287b04406afca0835b1a333bd1fe617b.patch49
-rwxr-xr-xtesting/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.SlackBuild152
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.url1
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/rc.nss-pam-ldapd37
-rw-r--r--testing/source/PAM/n/nss-pam-ldapd/slack-desc19
-rw-r--r--testing/source/gcc10/c89.sh10
-rw-r--r--testing/source/gcc10/c99.sh10
-rwxr-xr-xtesting/source/gcc10/fetch-from-svn-and-prep-tarball.sh83
-rwxr-xr-xtesting/source/gcc10/gcc.SlackBuild653
-rw-r--r--testing/source/gcc10/patches/gcc-no_fixincludes.diff27
-rw-r--r--testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch40
-rw-r--r--testing/source/gcc10/slack-desc.gcc19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-brig19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-g++19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-gdc19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-gfortran19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-gnat19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-go19
-rw-r--r--testing/source/gcc10/slack-desc.gcc-objc19
36 files changed, 1464 insertions, 9 deletions
diff --git a/testing/packages/PAM/nss-pam-ldapd-0.9.11-x86_64-1_pam.txt b/testing/packages/PAM/nss-pam-ldapd-0.9.11-x86_64-1_pam.txt
new file mode 100644
index 000000000..1cb8a4430
--- /dev/null
+++ b/testing/packages/PAM/nss-pam-ldapd-0.9.11-x86_64-1_pam.txt
@@ -0,0 +1,11 @@
+nss-pam-ldapd: nss-pam-ldapd (LDAP NSS/PAM module)
+nss-pam-ldapd:
+nss-pam-ldapd: nss-pam-ldapd is an NSS and PAM module that allows your LDAP server to
+nss-pam-ldapd: provide user account, group, host name, alias, netgroup, and basically
+nss-pam-ldapd: any other information that you would normally get from /etc/ flat
+nss-pam-ldapd: files or NIS. It also allows you to do authentication to an LDAP
+nss-pam-ldapd: server.
+nss-pam-ldapd:
+nss-pam-ldapd: Homepage: https://arthurdejong.org/nss-pam-ldapd/
+nss-pam-ldapd:
+nss-pam-ldapd:
diff --git a/testing/packages/PAM/shadow-4.8.1-x86_64-5_pam.txt b/testing/packages/PAM/shadow-4.8.1-x86_64-6_pam.txt
index 29a3d574d..29a3d574d 100644
--- a/testing/packages/PAM/shadow-4.8.1-x86_64-5_pam.txt
+++ b/testing/packages/PAM/shadow-4.8.1-x86_64-6_pam.txt
diff --git a/testing/packages/PAM/util-linux-2.35.1-x86_64-4_pam.txt b/testing/packages/PAM/util-linux-2.35.1-x86_64-5_pam.txt
index 7e4aa7b72..7e4aa7b72 100644
--- a/testing/packages/PAM/util-linux-2.35.1-x86_64-4_pam.txt
+++ b/testing/packages/PAM/util-linux-2.35.1-x86_64-5_pam.txt
diff --git a/testing/packages/gcc10/gcc-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..68606afe3
--- /dev/null
+++ b/testing/packages/gcc10/gcc-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc: gcc (Base GCC package with C support)
+gcc:
+gcc: GCC is the GNU Compiler Collection.
+gcc:
+gcc: This package contains those parts of the compiler collection needed to
+gcc: compile C code. Other packages add Ada, C++, Fortran, Go,
+gcc: Objective-C, and BRIG support to the compiler core.
+gcc:
+gcc:
+gcc:
+gcc:
diff --git a/testing/packages/gcc10/gcc-brig-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-brig-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..3d80fa95f
--- /dev/null
+++ b/testing/packages/gcc10/gcc-brig-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-brig: gcc-brig (BRIG support for GCC)
+gcc-brig:
+gcc-brig: BRIG support for the GNU Compiler Collection.
+gcc-brig:
+gcc-brig: BRIG is the binary form of the Heterogeneous System Architecture
+gcc-brig: Intermediate Language (HSA IL), which is a virtual instruction set for
+gcc-brig: parallel programs. While similar in some ways to OpenCL or CUDA, HSA
+gcc-brig: is designed to ease the burden on the programmer by automatically
+gcc-brig: handling the offloading of tasks and moving of data.
+gcc-brig:
+gcc-brig:
diff --git a/testing/packages/gcc10/gcc-g++-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-g++-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..9503a07fb
--- /dev/null
+++ b/testing/packages/gcc10/gcc-g++-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-g++: gcc-g++ (C++ for GCC)
+gcc-g++:
+gcc-g++: C++ support for the GNU Compiler Collection.
+gcc-g++:
+gcc-g++: This package contains those parts of the compiler collection needed to
+gcc-g++: compile C++ code.
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
diff --git a/testing/packages/gcc10/gcc-gdc-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-gdc-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..365a1185e
--- /dev/null
+++ b/testing/packages/gcc10/gcc-gdc-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-gdc: gcc-gdc (D support for GCC)
+gcc-gdc:
+gcc-gdc: D support for the GNU Compiler Collection.
+gcc-gdc:
+gcc-gdc: D is a general-purpose programming language with static typing,
+gcc-gdc: systems-level access, and C-like syntax.
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
diff --git a/testing/packages/gcc10/gcc-gfortran-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-gfortran-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..a884f74e1
--- /dev/null
+++ b/testing/packages/gcc10/gcc-gfortran-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-gfortran: gcc-gfortran (Fortran support for GCC)
+gcc-gfortran:
+gcc-gfortran: The GNU Fortran compiler is fully compliant with the Fortran 95
+gcc-gfortran: Standard and includes legacy F77 support. In addition, a significant
+gcc-gfortran: number of Fortran 2003 and Fortran 2008 features are implemented.
+gcc-gfortran: GNU Fortran also contains many standard and extensions and can be
+gcc-gfortran: used to run real-world programs.
+gcc-gfortran:
+gcc-gfortran: This package contains those parts of the compiler collection
+gcc-gfortran: needed to compile Fortran code.
+gcc-gfortran:
diff --git a/testing/packages/gcc10/gcc-gnat-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-gnat-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..b0b945777
--- /dev/null
+++ b/testing/packages/gcc10/gcc-gnat-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-gnat: gcc-gnat (Ada support for GCC)
+gcc-gnat:
+gcc-gnat: Ada support for the GNU Compiler Collection.
+gcc-gnat:
+gcc-gnat: This package contains those parts of the compiler collection needed to
+gcc-gnat: compile Ada code. GNAT implements Ada 95, Ada 2005 and Ada 2012, and
+gcc-gnat: it may also be invoked in Ada 83 compatibility mode. By default, GNAT
+gcc-gnat: assumes Ada 2012.
+gcc-gnat:
+gcc-gnat:
+gcc-gnat:
diff --git a/testing/packages/gcc10/gcc-go-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-go-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..d215089e6
--- /dev/null
+++ b/testing/packages/gcc10/gcc-go-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-go: gcc-go (Go support for GCC)
+gcc-go:
+gcc-go: Go is a compiled, garbage-collected, concurrent programming language
+gcc-go: developed by Google Inc. The initial design of Go was started in
+gcc-go: September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
+gcc-go: Rob Pike has stated that Go is being used "for real stuff" at Google.
+gcc-go: Go's "gc" compiler targets the Linux, Mac OS X, FreeBSD, OpenBSD and
+gcc-go: Microsoft Windows operating systems, and the i386, amd64, and ARM
+gcc-go: processor architectures.
+gcc-go:
+gcc-go: Homepage: http://golang.org
diff --git a/testing/packages/gcc10/gcc-objc-10.1.0-x86_64-1.txt b/testing/packages/gcc10/gcc-objc-10.1.0-x86_64-1.txt
new file mode 100644
index 000000000..e03f29b74
--- /dev/null
+++ b/testing/packages/gcc10/gcc-objc-10.1.0-x86_64-1.txt
@@ -0,0 +1,11 @@
+gcc-objc: gcc-objc (Objective-C/C++ support for GCC)
+gcc-objc:
+gcc-objc: Objective-C/C++ support for the GNU Compiler Collection.
+gcc-objc:
+gcc-objc: This package contains those parts of the compiler collection needed to
+gcc-objc: compile code written in Objective-C and Objective-C++. Objective-C was
+gcc-objc: originally developed to add object-oriented extensions to the C
+gcc-objc: language, and is best known as the native language of the NeXT
+gcc-objc: computer.
+gcc-objc:
+gcc-objc:
diff --git a/testing/source/PAM/buildlist b/testing/source/PAM/buildlist
index b05fcbf66..5fc1b40fc 100644
--- a/testing/source/PAM/buildlist
+++ b/testing/source/PAM/buildlist
@@ -1,6 +1,7 @@
a/cracklib/cracklib.SlackBuild
a/pam/pam.SlackBuild
a/libpwquality/libpwquality.SlackBuild
+n/nss-pam-ldapd/nss-pam-ldapd.SlackBuild
source/a/shadow/shadow.SlackBuild
source/a/util-linux/util-linux.SlackBuild
source/a/libcgroup/libcgroup.SlackBuild
diff --git a/testing/source/PAM/buildlist-fix-lib-security-location b/testing/source/PAM/buildlist-fix-lib-security-location
deleted file mode 100644
index 4b49d3824..000000000
--- a/testing/source/PAM/buildlist-fix-lib-security-location
+++ /dev/null
@@ -1,9 +0,0 @@
-a/pam/pam.SlackBuild
-a/libpwquality/libpwquality.SlackBuild
-source/a/libcgroup/libcgroup.SlackBuild
-source/l/polkit/polkit.SlackBuild
-source/l/ConsoleKit2/ConsoleKit2.SlackBuild
-source/l/gnome-keyring/gnome-keyring.SlackBuild
-source/n/cifs-utils/cifs-utils.SlackBuild
-source/ap/mariadb/mariadb.SlackBuild
-source/n/samba/samba.SlackBuild
diff --git a/testing/source/PAM/n/nss-pam-ldapd/1025d5de336d8c9585b79df3154b5649da344281.patch b/testing/source/PAM/n/nss-pam-ldapd/1025d5de336d8c9585b79df3154b5649da344281.patch
new file mode 100644
index 000000000..b21ab09ee
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/1025d5de336d8c9585b79df3154b5649da344281.patch
@@ -0,0 +1,42 @@
+From 1025d5de336d8c9585b79df3154b5649da344281 Mon Sep 17 00:00:00 2001
+From: Arthur de Jong <arthur@arthurdejong.org>
+Date: Sun, 13 Oct 2019 17:23:20 +0200
+Subject: [PATCH] Fix Python 3 compatibility in chsh.ldap
+
+---
+ utils/chsh.py | 6 +++---
+ utils/shells.py | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/utils/chsh.py b/utils/chsh.py
+index e7537e71..0f24bfcc 100755
+--- a/utils/chsh.py
++++ b/utils/chsh.py
+@@ -43,11 +43,11 @@
+ def ask_shell(oldshell):
+ """Ask the user to provide a shell."""
+ # Provide Python 2 compatibility
++ prompt = ' Login Shell [%s]: ' % oldshell
+ try:
+- input = raw_input
++ shell = raw_input(prompt)
+ except NameError:
+- pass
+- shell = input(' Login Shell [%s]: ' % oldshell)
++ shell = input(prompt)
+ return shell or oldshell
+
+
+diff --git a/utils/shells.py b/utils/shells.py
+index 92dba2f2..327b35e7 100644
+--- a/utils/shells.py
++++ b/utils/shells.py
+@@ -35,7 +35,7 @@ def list_shells():
+ shell = getusershell()
+ if not shell:
+ break
+- yield shell
++ yield shell.decode('utf-8')
+ libc.endusershell()
+
+
diff --git a/testing/source/PAM/n/nss-pam-ldapd/548efe5333b56a0a042843a044e0348317f80065.patch b/testing/source/PAM/n/nss-pam-ldapd/548efe5333b56a0a042843a044e0348317f80065.patch
new file mode 100644
index 000000000..d03f1552d
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/548efe5333b56a0a042843a044e0348317f80065.patch
@@ -0,0 +1,37 @@
+From 548efe5333b56a0a042843a044e0348317f80065 Mon Sep 17 00:00:00 2001
+From: Arthur de Jong <arthur@arthurdejong.org>
+Date: Mon, 11 Nov 2019 23:06:20 +0100
+Subject: [PATCH] Log the correct timeout value
+
+This fixes logging of the LDAP_OPT_TIMEOUT, LDAP_OPT_NETWORK_TIMEOUT and
+LDAP_X_OPT_CONNECT_TIMEOUT options to actually log the value of the
+bind_timelimit option instead of the timelimit option.
+---
+ nslcd/myldap.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/nslcd/myldap.c b/nslcd/myldap.c
+index 02b97195..0ee1be80 100644
+--- a/nslcd/myldap.c
++++ b/nslcd/myldap.c
+@@ -911,17 +911,17 @@ static int do_set_options(MYLDAP_SESSION *session)
+ tv.tv_usec = 0;
+ #ifdef LDAP_OPT_TIMEOUT
+ log_log(LOG_DEBUG, "ldap_set_option(LDAP_OPT_TIMEOUT,%d)",
+- nslcd_cfg->timelimit);
++ nslcd_cfg->bind_timelimit);
+ LDAP_SET_OPTION(session->ld, LDAP_OPT_TIMEOUT, &tv);
+ #endif /* LDAP_OPT_TIMEOUT */
+ #ifdef LDAP_OPT_NETWORK_TIMEOUT
+ log_log(LOG_DEBUG, "ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,%d)",
+- nslcd_cfg->timelimit);
++ nslcd_cfg->bind_timelimit);
+ LDAP_SET_OPTION(session->ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
+ #endif /* LDAP_OPT_NETWORK_TIMEOUT */
+ #ifdef LDAP_X_OPT_CONNECT_TIMEOUT
+ log_log(LOG_DEBUG, "ldap_set_option(LDAP_X_OPT_CONNECT_TIMEOUT,%d)",
+- nslcd_cfg->timelimit);
++ nslcd_cfg->bind_timelimit);
+ LDAP_SET_OPTION(session->ld, LDAP_X_OPT_CONNECT_TIMEOUT, &tv);
+ #endif /* LDAP_X_OPT_CONNECT_TIMEOUT */
+ log_log(LOG_DEBUG, "ldap_set_option(LDAP_OPT_REFERRALS,%s)",
diff --git a/testing/source/PAM/n/nss-pam-ldapd/b33551895b3c02dc7082363c6aae13f8e336f4e5.patch b/testing/source/PAM/n/nss-pam-ldapd/b33551895b3c02dc7082363c6aae13f8e336f4e5.patch
new file mode 100644
index 000000000..127243e0e
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/b33551895b3c02dc7082363c6aae13f8e336f4e5.patch
@@ -0,0 +1,26 @@
+From b33551895b3c02dc7082363c6aae13f8e336f4e5 Mon Sep 17 00:00:00 2001
+From: Arthur de Jong <arthur@arthurdejong.org>
+Date: Mon, 10 Feb 2020 22:52:16 +0100
+Subject: [PATCH] Fix typo in manual page
+
+Thanks Benedict Reuschling for pointing this out.
+
+Closes https://github.com/arthurdejong/nss-pam-ldapd/issues/39
+Fixes b93838d
+---
+ man/nslcd.conf.5.xml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/nslcd.conf.5.xml b/man/nslcd.conf.5.xml
+index 7ae56b28..4e81645c 100644
+--- a/man/nslcd.conf.5.xml
++++ b/man/nslcd.conf.5.xml
+@@ -514,7 +514,7 @@
+ <term><option>idle_timelimit</option> <replaceable>SECONDS</replaceable></term>
+ <listitem>
+ <para>
+- Specifies the period if inactivity (in seconds) after which the
++ Specifies the period of inactivity (in seconds) after which the
+ connection to the <acronym>LDAP</acronym> server will be closed.
+ The default is not to time out connections.
+ </para>
diff --git a/testing/source/PAM/n/nss-pam-ldapd/doinst.sh b/testing/source/PAM/n/nss-pam-ldapd/doinst.sh
new file mode 100644
index 000000000..d483abce2
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+config etc/nslcd.conf.new
+preserve_perms etc/rc.d/rc.nss-pam-ldapd.new
diff --git a/testing/source/PAM/n/nss-pam-ldapd/fea0f5ed287b04406afca0835b1a333bd1fe617b.patch b/testing/source/PAM/n/nss-pam-ldapd/fea0f5ed287b04406afca0835b1a333bd1fe617b.patch
new file mode 100644
index 000000000..13b0ace7f
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/fea0f5ed287b04406afca0835b1a333bd1fe617b.patch
@@ -0,0 +1,49 @@
+From fea0f5ed287b04406afca0835b1a333bd1fe617b Mon Sep 17 00:00:00 2001
+From: Arthur de Jong <arthur@arthurdejong.org>
+Date: Sun, 13 Oct 2019 17:24:36 +0200
+Subject: [PATCH] Add pam_authc_ppolicy support in pynslcd
+
+See https://bugs.debian.org/900253
+---
+ pynslcd/cfg.py | 3 ++-
+ pynslcd/pam.py | 6 ++++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/pynslcd/cfg.py b/pynslcd/cfg.py
+index 877d4427..b970b5a7 100644
+--- a/pynslcd/cfg.py
++++ b/pynslcd/cfg.py
+@@ -87,6 +87,7 @@
+ nss_getgrent_skipmembers = False
+ nss_disable_enumeration = False
+ validnames = re.compile(r'^[a-z0-9._@$][a-z0-9._@$ \\~-]{0,98}[a-z0-9._@$~-]$', re.IGNORECASE)
++pam_authc_ppolicy = True
+ pam_authz_searches = []
+ pam_password_prohibit_message = None
+ reconnect_invalidate = set()
+@@ -184,7 +185,7 @@ def read(filename): # noqa: C901 (many simple branches)
+ # parse options with a single boolean argument
+ m = re.match(
+ r'(?P<keyword>referrals|nss_nested_groups|nss_getgrent_skipmembers|'
+- r'nss_disable_enumeration)\s+(?P<value>%s)' % (
++ r'nss_disable_enumeration|pam_authc_ppolicy)\s+(?P<value>%s)' % (
+ '|'.join(_boolean_options.keys())),
+ line, re.IGNORECASE)
+ if m:
+diff --git a/pynslcd/pam.py b/pynslcd/pam.py
+index b372cdda..5f5486b3 100644
+--- a/pynslcd/pam.py
++++ b/pynslcd/pam.py
+@@ -42,8 +42,10 @@ def authenticate(binddn, password):
+ # open a new connection
+ conn = search.Connection()
+ # bind using the specified credentials
+- pwctrl = PasswordPolicyControl()
+- res, data, msgid, ctrls = conn.simple_bind_s(binddn, password, serverctrls=[pwctrl])
++ serverctrls = []
++ if cfg.pam_authc_ppolicy:
++ serverctrls.append(PasswordPolicyControl())
++ res, data, msgid, ctrls = conn.simple_bind_s(binddn, password, serverctrls=serverctrls)
+ # go over bind result server controls
+ for ctrl in ctrls:
+ if ctrl.controlType == PasswordPolicyControl.controlType:
diff --git a/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.SlackBuild b/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.SlackBuild
new file mode 100755
index 000000000..204e96030
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.SlackBuild
@@ -0,0 +1,152 @@
+#!/bin/bash
+
+# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=nss-pam-ldapd
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Upstream patches from git:
+zcat $CWD/1025d5de336d8c9585b79df3154b5649da344281.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/548efe5333b56a0a042843a044e0348317f80065.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/b33551895b3c02dc7082363c6aae13f8e336f4e5.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/fea0f5ed287b04406afca0835b1a333bd1fe617b.patch.gz | patch -p1 --verbose || exit 1
+
+export PYTHON=python3
+
+# Configure, build, and install:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-pam-seclib-dir=/lib$LIBDIRSUFFIX/security \
+ --build=$ARCH-slackware-linux || exit 1
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Install config file as .new:
+mv $PKG/etc/nslcd.conf $PKG/etc/nslcd.conf.new
+# Restrict access since this file may include a secret credential:
+chmod 600 $PKG/etc/nslcd.conf.new
+
+# Install init script:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.nss-pam-ldapd > $PKG/etc/rc.d/rc.nss-pam-ldapd.new
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \+
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS* ChangeLog COPYING* HACKING* LICENSE* NEWS* README* TODO* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.url b/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.url
new file mode 100644
index 000000000..2644c0ebd
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/nss-pam-ldapd.url
@@ -0,0 +1 @@
+https://arthurdejong.org/nss-pam-ldapd
diff --git a/testing/source/PAM/n/nss-pam-ldapd/rc.nss-pam-ldapd b/testing/source/PAM/n/nss-pam-ldapd/rc.nss-pam-ldapd
new file mode 100644
index 000000000..7a4252a38
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/rc.nss-pam-ldapd
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# rc.nss-pam-ldapd: start/stop/restart nslcd
+#
+# nslcd is a daemon that will do LDAP queries for local processes that want
+# to do user, group, and other naming lookups (NSS), or do user authentication,
+# authorization, or password modification (PAM).
+
+nslcd_start() {
+ if [ -x /usr/sbin/nslcd -a -r /etc/nslcd.conf ]; then
+ # Ensure /run directory exists:
+ mkdir -p /run/nslcd
+ echo "Starting local LDAP name service daemon: /usr/sbin/nslcd"
+ /usr/sbin/nslcd
+ fi
+}
+
+nslcd_stop() {
+ echo "Stopping local LDAP name service daemon."
+ killall --ns $$ nslcd
+}
+
+case "$1" in
+'start')
+ nslcd_start
+ ;;
+'stop')
+ nslcd_stop
+ ;;
+'restart')
+ nslcd_stop
+ sleep 2
+ nslcd_start
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/testing/source/PAM/n/nss-pam-ldapd/slack-desc b/testing/source/PAM/n/nss-pam-ldapd/slack-desc
new file mode 100644
index 000000000..fed065b20
--- /dev/null
+++ b/testing/source/PAM/n/nss-pam-ldapd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+nss-pam-ldapd: nss-pam-ldapd (LDAP NSS/PAM module)
+nss-pam-ldapd:
+nss-pam-ldapd: nss-pam-ldapd is an NSS and PAM module that allows your LDAP server to
+nss-pam-ldapd: provide user account, group, host name, alias, netgroup, and basically
+nss-pam-ldapd: any other information that you would normally get from /etc/ flat
+nss-pam-ldapd: files or NIS. It also allows you to do authentication to an LDAP
+nss-pam-ldapd: server.
+nss-pam-ldapd:
+nss-pam-ldapd: Homepage: https://arthurdejong.org/nss-pam-ldapd/
+nss-pam-ldapd:
+nss-pam-ldapd:
diff --git a/testing/source/gcc10/c89.sh b/testing/source/gcc10/c89.sh
new file mode 100644
index 000000000..35486ea83
--- /dev/null
+++ b/testing/source/gcc10/c89.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c89"
+for opt; do
+ case "$opt" in
+ -ansi|-std=c89|-std=iso9899:1990) fl="";;
+ -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/testing/source/gcc10/c99.sh b/testing/source/gcc10/c99.sh
new file mode 100644
index 000000000..88dd80640
--- /dev/null
+++ b/testing/source/gcc10/c99.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c99"
+for opt; do
+ case "$opt" in
+ -std=c99|-std=iso9899:1999) fl="";;
+ -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/testing/source/gcc10/fetch-from-svn-and-prep-tarball.sh b/testing/source/gcc10/fetch-from-svn-and-prep-tarball.sh
new file mode 100755
index 000000000..de2459067
--- /dev/null
+++ b/testing/source/gcc10/fetch-from-svn-and-prep-tarball.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Copyright 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+#
+# Parts of this script are based on the gcc_release script by
+# Jeffrey Law, Bernd Schmidt, Mark Mitchell.
+# Copyright (c) 2001-2015 Free Software Foundation.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+BRANCH=${BRANCH:-gcc-9-branch}
+
+rm -rf tmp-fetch
+mkdir tmp-fetch
+cd tmp-fetch
+# Not sure why, but this emits a different revision when the fetch is done than
+# what's returned by "svn log -r COMMITTED". We'll trust the latter.
+svn co svn://gcc.gnu.org/svn/gcc/branches/${BRANCH} gcc
+cd gcc
+echo "Generating LAST_UPDATED..."
+svn log -r COMMITTED > LAST_UPDATED.raw
+REVISION="$(cat LAST_UPDATED.raw | head -n 2 | tail -n 1 | cut -f 1 -d ' ' | cut -f 2 -d r)"
+DATE="$(date -d "$(cat LAST_UPDATED.raw | head -n 2 | tail -n 1 | cut -f 3 -d '|' | cut -f 1 -d '(')" "+%Y%m%d")"
+echo "Obtained from SVN: branches/${BRANCH} revision ${REVISION}" > LAST_UPDATED
+cat LAST_UPDATED.raw >> LAST_UPDATED
+rm LAST_UPDATED.raw
+# Remove the .svn data (not packaged):
+rm -r .svn
+# Get the version number:
+VERSION=$(cat gcc/BASE-VER)
+# Rename the directory:
+cd ..
+GCCDIR="gcc-${VERSION}_${DATE}_r${REVISION}"
+mv gcc $GCCDIR
+cd $GCCDIR
+# Now we need to generate some documentation files that would normally be
+# created during the GCC release process:
+echo "Generating INSTALL/ documentation..."
+SOURCEDIR=gcc/doc \
+DESTDIR=INSTALL \
+gcc/doc/install.texi2html 1> /dev/null 2> /dev/null
+echo "Generating NEWS..."
+contrib/gennews > NEWS
+# Create a "MD5SUMS" file to use for checking the validity of the release.
+echo "Generating MD5SUMS..."
+echo \
+"# This file contains the MD5 checksums of the files in the
+# "${GCCDIR}".tar.lz tarball.
+#
+# Besides verifying that all files in the tarball were correctly expanded,
+# it also can be used to determine if any files have changed since the
+# tarball was expanded or to verify that a patchfile was correctly applied.
+#
+# Suggested usage:
+# md5sum -c MD5SUMS | grep -v \"OK$\"
+#" > MD5SUMS
+find . -type f |
+sed -e 's:^\./::' -e '/MD5SUMS/d' |
+sort |
+xargs md5sum >>MD5SUMS
+cd ..
+# Tar it up:
+echo "Creating ${GCCDIR}.tar..."
+tar cf ${GCCDIR}.tar ${GCCDIR}
+# Compress with (p)lzip:
+echo "Compressing ${GCCDIR}.tar.lz..."
+plzip -9 ${GCCDIR}.tar
+# Move the new archive up a directory:
+mv ${GCCDIR}.tar.lz ..
+# Move up a directory and then delete the cruft:
+cd ..
+rm -r tmp-fetch
+echo "Done."
diff --git a/testing/source/gcc10/gcc.SlackBuild b/testing/source/gcc10/gcc.SlackBuild
new file mode 100755
index 000000000..6e7d53081
--- /dev/null
+++ b/testing/source/gcc10/gcc.SlackBuild
@@ -0,0 +1,653 @@
+#!/bin/bash
+# GCC package build script (written by volkerdi@slackware.com)
+#
+# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Modified 2011 by Eric Hameleers <alien at slackware.com> for OpenJDK.
+
+# Some notes, Fri May 16 12:31:32 PDT 2003:
+#
+# Why i486 and not i386? Because the shared C++ libraries in gcc-3.2.x will
+# require 486 opcodes even when a 386 target is used (so we already weren't
+# compatible with the i386 for Slackware 9.0, didn't notice, and nobody
+# complained :-). gcc-3.3 fixes this issue and allows you to build a 386
+# compiler, but the fix is done in a way that produces binaries that are not
+# compatible with gcc-3.2.x compiled binaries. To retain compatibility with
+# Slackware 9.0, we'll have to use i486 (or better) as the compiler target
+# for gcc-3.3.
+#
+# It's time to say goodbye to i386 support in Slackware. I've surveyed 386
+# usage online, and the most common thing I see people say when someone asks
+# about running Linux on a 386 is to "run Slackware", but then they also
+# usually go on to say "be sure to get an OLD version, like 4.0, before glibc,
+# because it'll be more efficient." Now, if that's the general advice, then
+# I see no reason to continue 386 support in the latest Slackware (and indeed
+# it's no longer easily possible).
+
+# Some more notes, Mon Aug 3 19:49:51 UTC 2015:
+#
+# Changing to -march=i586 for 32-bit x86 as several things (Mesa being one of
+# them) no longer work if constrained to -march=i486. We're not going to use
+# -march=i686 since the only additional opcode is CMOV, which is actually less
+# efficient on modern CPUs running in 32-bit mode than the alternate i586
+# instructions. No need to throw i586 CPUs under the bus (yet).
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=gcc
+SRCVER=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=$(echo $SRCVER | cut -f 1 -d _)
+BUILD=${BUILD:-1}
+
+# How many jobs to run in parallel:
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "gcc-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-g++-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-gfortran-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-gnat-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-objc-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-go-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-brig-$VERSION-$ARCH-$BUILD.txz"
+ echo "gcc-gdc-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=s390
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=armv7hl
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Temporary build location:
+TMP=${TMP:-/tmp}
+
+# Extract the source code:
+cd $TMP
+rm -rf gcc-$SRCVER
+tar xvf $CWD/gcc-$SRCVER.tar.?z || exit 1
+
+# This is the main DESTDIR target:
+PKG1=$TMP/package-gcc
+# These are the directories to build other packages in:
+PKG2=$TMP/package-gcc-g++
+PKG3=$TMP/package-gcc-gfortran
+PKG4=$TMP/package-gcc-gnat
+PKG6=$TMP/package-gcc-objc
+#PKG7=$TMP/package-gcc-g++-gch
+PKG8=$TMP/package-gcc-go
+PKG9=$TMP/package-gcc-brig
+PKG10=$TMP/package-gcc-gdc
+
+# Clear the build locations:
+rm -rf $PKG{1,2,3,4,6,8,9,10}
+mkdir -p $PKG{1,2,3,4,6,8,9,10}/usr/doc/gcc-$VERSION
+
+# Insert package descriptions:
+mkdir -p $PKG{1,2,3,4,6,8,9,10}/install
+cat $CWD/slack-desc.gcc > $PKG1/install/slack-desc
+cat $CWD/slack-desc.gcc-g++ > $PKG2/install/slack-desc
+cat $CWD/slack-desc.gcc-gfortran > $PKG3/install/slack-desc
+cat $CWD/slack-desc.gcc-gnat > $PKG4/install/slack-desc
+cat $CWD/slack-desc.gcc-objc > $PKG6/install/slack-desc
+#cat $CWD/slack-desc.gcc-g++-gch > $PKG7/install/slack-desc
+cat $CWD/slack-desc.gcc-go > $PKG8/install/slack-desc
+cat $CWD/slack-desc.gcc-brig > $PKG9/install/slack-desc
+cat $CWD/slack-desc.gcc-gdc > $PKG10/install/slack-desc
+
+cd gcc-$SRCVER || exit 1
+
+# Smite the fixincludes:
+zcat $CWD/patches/gcc-no_fixincludes.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Fix a gfortran bug:
+zcat $CWD/patches/gfortran.deferred-shape-vs-assumed-shape.patch.gz | patch -p0 --verbose --backup --suffix=.orig || exit 1
+
+# Fix perms/owners:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 754 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 664 \) \
+ -exec chmod 644 {} \+
+
+# Install docs:
+mkdir -p $PKG1/usr/doc/gcc-$VERSION
+cp -a \
+ COPYING* ChangeLog* FAQ INSTALL \
+ LAST_UPDATED MAINTAINERS NEWS \
+ README* *.html \
+$PKG1/usr/doc/gcc-$VERSION
+
+# We will keep part of these, but they are really big...
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/gcc-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/gcc-$VERSION)
+ cat NEWS | head -n 1500 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+fi
+
+mkdir -p $PKG1/usr/doc/gcc-${VERSION}/gcc
+( cd gcc || exit 0
+ cp -a \
+ ABOUT* COPYING* DATESTAMP DEV-PHASE LANG* ONEWS README* SERVICE \
+ $PKG1/usr/doc/gcc-$VERSION/gcc
+)
+
+mkdir -p $PKG3/usr/doc/gcc-${VERSION}/gcc/fortran
+( cd gcc/fortran || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG3/usr/doc/gcc-$VERSION/gcc/fortran/ChangeLog
+ touch -r ChangeLog $PKG3/usr/doc/gcc-$VERSION/gcc/fortran/ChangeLog
+ fi
+)
+
+mkdir -p $PKG4/usr/doc/gcc-${VERSION}/gcc/ada
+( cd gcc/ada || exit 0
+ cp -a \
+ ChangeLog.tree-ssa \
+ $PKG4/usr/doc/gcc-$VERSION/gcc/ada
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG4/usr/doc/gcc-$VERSION/gcc/ada/ChangeLog
+ touch -r ChangeLog $PKG4/usr/doc/gcc-$VERSION/gcc/ada/ChangeLog
+ fi
+)
+
+mkdir -p $PKG6/usr/doc/gcc-${VERSION}/gcc/objc
+( cd gcc/objc || exit 0
+ cp -a \
+ README* \
+ $PKG6/usr/doc/gcc-${VERSION}/gcc/objc
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG6/usr/doc/gcc-${VERSION}/gcc/objc/ChangeLog
+ touch -r ChangeLog $PKG6/usr/doc/gcc-${VERSION}/gcc/objc/ChangeLog
+ fi
+)
+
+mkdir -p $PKG6/usr/doc/gcc-${VERSION}/gcc/objcp
+( cd gcc/objcp || exit 0
+ cp -a \
+ README* \
+ $PKG6/usr/doc/gcc-${VERSION}/gcc/objcp
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG6/usr/doc/gcc-${VERSION}/gcc/objcp/ChangeLog
+ touch -r ChangeLog $PKG6/usr/doc/gcc-${VERSION}/gcc/objcp/ChangeLog
+ fi
+)
+
+mkdir -p $PKG8/usr/doc/gcc-${VERSION}/gcc/go
+( cd gcc/go || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG8/usr/doc/gcc-${VERSION}/gcc/go/ChangeLog
+ touch -r ChangeLog $PKG8/usr/doc/gcc-${VERSION}/gcc/go/ChangeLog
+ fi
+ cp -a \
+ README* THREADS* \
+ gofrontend/{LICENSE,PATENTS,README} \
+ $PKG8/usr/doc/gcc-${VERSION}/gcc/go
+)
+
+mkdir -p $PKG9/usr/doc/gcc-${VERSION}/gcc/brig
+( cd gcc/brig || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG9/usr/doc/gcc-${VERSION}/gcc/brig/ChangeLog
+ touch -r ChangeLog $PKG9/usr/doc/gcc-${VERSION}/gcc/brig/ChangeLog
+ fi
+)
+
+mkdir -p $PKG10/usr/doc/gcc-${VERSION}/gcc/d
+( cd gcc/d || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG10/usr/doc/gcc-${VERSION}/gcc/d/ChangeLog
+ touch -r ChangeLog $PKG10/usr/doc/gcc-${VERSION}/gcc/d/ChangeLog
+ fi
+)
+
+mkdir -p $PKG3/usr/doc/gcc-${VERSION}/libgfortran
+( cd libgfortran || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG3/usr/doc/gcc-${VERSION}/libgfortran/ChangeLog
+ touch -r ChangeLog $PKG3/usr/doc/gcc-${VERSION}/libgfortran/ChangeLog
+ fi
+)
+
+mkdir -p $PKG4/usr/doc/gcc-${VERSION}/libada
+( cd libada || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog
+ touch -r ChangeLog $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog
+ fi
+)
+
+mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libgomp
+( cd libgomp || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG1/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ touch -r ChangeLog $PKG1/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ fi
+)
+
+mkdir -p $PKG6/usr/doc/gcc-${VERSION}/libobjc
+( cd libobjc || exit 0
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG6/usr/doc/gcc-${VERSION}/libobjc/ChangeLog
+ touch -r ChangeLog $PKG6/usr/doc/gcc-${VERSION}/libobjc/ChangeLog
+ fi
+ cp -a \
+ README* THREADS* \
+ $PKG6/usr/doc/gcc-${VERSION}/libobjc
+)
+
+mkdir -p $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3
+( cd libstdc++-v3 || exit 0
+ cp -a \
+ README* \
+ doc/html/faq.html \
+ $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ touch -r ChangeLog $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ fi
+)
+
+# build gcc
+( mkdir gcc.build.lnx
+ cd gcc.build.lnx
+
+ # I think it's incorrect to include this option (as it'll end up set
+ # to i586 on x86 platforms), and we want to tune the binary structure
+ # for i686, as that's where almost all of the optimization speedups
+ # are to be found.
+ # Correct me if my take on this is wrong.
+ # --with-cpu=$ARCH
+
+ if [ "$ARCH" != "x86_64" ]; then
+ GCC_ARCHOPTS="--with-arch=$ARCH"
+ else
+ GCC_ARCHOPTS="--disable-multilib"
+ fi
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ../configure --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --enable-bootstrap \
+ --enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++ \
+ --enable-threads=posix \
+ --enable-checking=release \
+ --enable-objc-gc \
+ --with-system-zlib \
+ --enable-libstdcxx-dual-abi \
+ --with-default-libstdcxx-abi=new \
+ --disable-libstdcxx-pch \
+ --disable-libunwind-exceptions \
+ --enable-__cxa_atexit \
+ --disable-libssp \
+ --enable-gnu-unique-object \
+ --enable-plugin \
+ --enable-lto \
+ --disable-install-libiberty \
+ --disable-werror \
+ --with-gnu-ld \
+ --with-isl \
+ --verbose \
+ --with-arch-directory=$LIB_ARCH \
+ --disable-gtktest \
+ --enable-clocale=gnu \
+ $GCC_ARCHOPTS \
+ --target=${TARGET} \
+ --build=${TARGET} \
+ --host=${TARGET} || exit 1
+
+ # Start the build:
+
+ # Include all debugging info (for now):
+ make $NUMJOBS bootstrap || exit 1
+
+ ( cd gcc
+ make $NUMJOBS gnatlib GNATLIBCFLAGS="$SLKCFLAGS" || exit 1
+ # This wants a shared -ladd2line?
+ #make gnatlib-shared || exit 1
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ make $NUMJOBS gnattools || exit 1
+ ) || exit 1
+ make info || exit 1
+
+ # Set GCCCHECK=something to run the tests
+ if [ ! -z $GCCCHECK ]; then
+ make $NUMJOBS check || exit 1
+ fi
+
+ make install DESTDIR=$PKG1 || exit 1
+
+ # Move gdb pretty printers to the correct place
+ mkdir -p $PKG1/usr/share/gdb/auto-load/usr/lib$LIBDIRSUFFIX
+ mv $PKG1/usr/lib$LIBDIRSUFFIX/*-gdb.py \
+ $PKG1/usr/share/gdb/auto-load/usr/lib$LIBDIRSUFFIX/
+
+ # Be sure the "specs" file is installed.
+ if [ ! -r $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs ]; then
+ cat stage1-gcc/specs > $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+ fi
+
+ # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
+ if [ "$ARCH" = "x86_64" ]; then
+ sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
+ $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+ fi
+
+ # make ada.install-common DESTDIR=$PKG1 || exit 1
+ # make install-gnatlib DESTDIR=$PKG1 || exit 1
+ make -i install-info DESTDIR=$PKG1 || exit 1
+
+ chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1
+
+ # Fix stuff up:
+ ( cd $PKG1/usr/info ; rm dir ; gzip -9 * )
+ ( cd $PKG1
+ # *not* ${LIBDIRSUFFIX}
+ mkdir -p lib
+ cd lib
+ ln -sf /usr/bin/cpp .
+ )
+
+ ( cd $PKG1/usr/bin
+ mv g++ g++-gcc-$VERSION
+ mv gcc gcc-$VERSION
+ mv ${TARGET}-gfortran gfortran-gcc-$VERSION
+ ln -sf g++-gcc-$VERSION g++
+ ln -sf gcc-$VERSION gcc
+ ln -sf g++ c++
+ ln -sf gcc cc
+ ln -sf gcc-$VERSION ${TARGET}-gcc
+ ln -sf gcc-$VERSION ${TARGET}-gcc-$VERSION
+ ln -sf gcc-ar ${TARGET}-gcc-ar
+ ln -sf gcc-nm ${TARGET}-gcc-nm
+ ln -sf gcc-ranlib ${TARGET}-gcc-ranlib
+ ln -sf g++-gcc-$VERSION ${TARGET}-c++
+ ln -sf g++-gcc-$VERSION ${TARGET}-g++
+ ln -sf gfortran-gcc-$VERSION gfortran
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran-$VERSION
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-g95
+ ln -sf gfortran g95
+ ln -sf gfortran f95
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-g77
+ ln -sf gfortran g77
+ ln -sf gfortran f77
+ cat $CWD/c89.sh > c89
+ cat $CWD/c99.sh > c99
+ chmod 755 c89 c99
+ )
+
+ ( cd $PKG1/usr/man
+ gzip -9 */*
+ cd man1
+ ln -sf g++.1.gz c++.1.gz
+ ln -sf gcc.1.gz cc.1.gz
+ )
+
+ ## build an all-in-one txz package:
+ #(
+ # cd $PKG1;
+ # makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz
+ #)
+
+# keep a log:
+) 2>&1 | tee gcc.build.log
+
+# Filter all .la files (thanks much to Mark Post for the sed script):
+( cd $PKG1
+ for file in $(find . -type f -name "*.la") ; do
+ cat $file | sed -e 's%-L/gcc-[[:graph:]]* % %g' > $TMP/tmp-la-file
+ cat $TMP/tmp-la-file > $file
+ done
+ rm $TMP/tmp-la-file
+)
+
+# Don't ship .la files in /{,usr/}lib${LIBDIRSUFFIX}:
+rm -f $PKG1/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Strip bloated binaries and libraries:
+( cd $PKG1
+ find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
+ find . -name "lib*so*" -exec patchelf --remove-rpath "{}" \;
+ find . -name "lib*a" -exec strip -g "{}" \;
+ strip --strip-unneeded usr/bin/* 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# OK, time to split the big package where needed:
+
+# gcc-g++:
+( cd $PKG2
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*++* usr/bin
+ mkdir -p usr/include
+ mv $PKG1/usr/include/c++ usr/include
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/*++* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1plus usr/libexec/gcc/$TARGET/$VERSION/cc1plus
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/*++* usr/man/man1
+ mkdir -p usr/share
+ mv $PKG1/usr/share/gdb usr/share
+ mkdir -p usr/share/gcc-$VERSION/python
+ mv $PKG1/usr/share/gcc-$VERSION/python/libstdcxx usr/share/gcc-$VERSION/python
+)
+
+# gcc-gfortran:
+( cd $PKG3
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*gfortran* usr/bin
+ mv $PKG1/usr/bin/*95* usr/bin
+ mv $PKG1/usr/bin/*77* usr/bin
+ # Doesn't this seem like a logical idea?
+ ( cd usr/bin ; ln -sf gfortran-gcc-${VERSION} fortran )
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gfortran* usr/info
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgfortran* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/finclude usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/libgfortran* usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/f951 usr/libexec/gcc/$TARGET/$VERSION/f951
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/libgfortran* usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gfortran* usr/man/man1
+)
+
+# gcc-gnat:
+( cd $PKG4
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/gnat* usr/bin
+ mv $PKG1/usr/bin/gpr* usr/bin
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gnat* usr/info
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/gnat1 usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adainclude usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adalib usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+)
+
+# gcc-objc:
+( cd $PKG6
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libobjc* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1obj usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1objplus usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/objc usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/cc1objplus usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+)
+
+## NOTE: Thought about this, because the precompiled headers are so large.
+## Probably easier to keep everything together, though.
+## gcc-g++-gch (precompiled c++ headers)
+#( cd $PKG7
+# mkdir -p usr/include/c++/$VERSION/$TARGET/bits
+# mv $PKG2/usr/include/c++/$VERSION/$TARGET/bits/stdc++.h.gch usr/include/c++/$VERSION/$TARGET/bits
+#)
+
+# gcc-go:
+( cd $PKG8
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*gccgo* usr/bin
+ mv $PKG1/usr/bin/go{,fmt} usr/bin
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/{cgo,go1} usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gccgo.info.gz usr/info
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/go usr/lib${LIBDIRSUFFIX}
+ if [ -r $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.la ]; then
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.la usr/lib${LIBDIRSUFFIX}
+ fi
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.so*,libgobegin.a,libgolibbegin.a} usr/lib${LIBDIRSUFFIX} || exit 1
+ # Don't package the (bloated) libgo.a. As a rule, we don't package static libraries.
+ rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gccgo.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/go.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gofmt.1.gz usr/man/man1
+) || exit 1
+
+# gcc-brig:
+( cd $PKG9
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*brig* usr/bin
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libhsail* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/brig1 usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gccbrig.1.gz usr/man/man1
+) || exit 1
+
+# gcc-gdc:
+( cd $PKG10
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/gdc $PKG1/usr/bin/*-gdc usr/bin
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgdruntime* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgphobos* usr/lib${LIBDIRSUFFIX}
+ ## COMMENTED OUT: defaults to static linking and that default does not
+ ## seem to be easlity changed...
+ ## Don't package the (bloated) libgphobos.a or libgdruntime.a.
+ ## As a rule, we don't package static libraries.
+ #rm -f usr/lib${LIBDIRSUFFIX}/libgphobos.a
+ #rm -f usr/lib${LIBDIRSUFFIX}/libgdruntime.a
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/d21 usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/d usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gdc.info.gz usr/info
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gdc.1.gz usr/man/man1
+) || exit 1
+
+# Generate packages:
+( cd $PKG1
+ makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG2
+ makepkg -l y -c n $TMP/gcc-g++-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG3
+ makepkg -l y -c n $TMP/gcc-gfortran-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG4
+ makepkg -l y -c n $TMP/gcc-gnat-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG6
+ makepkg -l y -c n $TMP/gcc-objc-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG8
+ makepkg -l y -c n $TMP/gcc-go-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG9
+ makepkg -l y -c n $TMP/gcc-brig-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG10
+ makepkg -l y -c n $TMP/gcc-gdc-$VERSION-$ARCH-$BUILD.txz )
+
+echo
+echo "Slackware GCC package build complete!"
+echo
+
diff --git a/testing/source/gcc10/patches/gcc-no_fixincludes.diff b/testing/source/gcc10/patches/gcc-no_fixincludes.diff
new file mode 100644
index 000000000..e152e0821
--- /dev/null
+++ b/testing/source/gcc10/patches/gcc-no_fixincludes.diff
@@ -0,0 +1,27 @@
+--- ./gcc/Makefile.in.orig 2018-03-09 09:24:44.000000000 -0600
++++ ./gcc/Makefile.in 2018-05-02 12:25:43.958002771 -0500
+@@ -3004,9 +3004,9 @@
+ chmod a+r $${fix_dir}/limits.h; \
+ done
+ # Install the README
+- rm -f include-fixed/README
+- cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
+- chmod a+r include-fixed/README
++# rm -f include-fixed/README
++# cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
++# chmod a+r include-fixed/README
+ $(STAMP) $@
+
+ .PHONY: install-gcc-tooldir
+@@ -3087,10 +3087,7 @@
+ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
+ SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
+ gcc_dir=`${PWD_COMMAND}` ; \
+- export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+- cd $(build_objdir)/fixincludes && \
+- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+- $(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
++ export TARGET_MACHINE srcdir SHELL MACRO_LIST ); \
+ rm -f $${fix_dir}/syslimits.h; \
+ if [ -f $${fix_dir}/limits.h ]; then \
+ mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
diff --git a/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch b/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch
new file mode 100644
index 000000000..f695b969e
--- /dev/null
+++ b/testing/source/gcc10/patches/gfortran.deferred-shape-vs-assumed-shape.patch
@@ -0,0 +1,40 @@
+[PATCH] deferred-shape vs assumed-shape
+Steve Kargl sgk@troutmask.apl.washington.edu
+Wed Apr 1 20:04:43 GMT 2020
+
+See
+https://stackoverflow.com/questions/60972134/whats-wrong-with-the-following-fortran-code-gfortran-dtio-dummy-argument-at
+
+Is A(:) a deferred-shape array or an assumed-shape array? The
+answer of course depends on context.
+
+This patch fixes the issue found at the above URL.
+
+Index: gcc/fortran/interface.c
+===================================================================
+--- gcc/fortran/interface.c (revision 280157)
++++ gcc/fortran/interface.c (working copy)
+@@ -4916,10 +4916,15 @@ check_dtio_arg_TKR_intent (gfc_symbol *fsym, bool type
+ || ((type != BT_CLASS) && fsym->attr.dimension)))
+ gfc_error ("DTIO dummy argument at %L must be a scalar",
+ &fsym->declared_at);
+- else if (rank == 1
+- && (fsym->as == NULL || fsym->as->type != AS_ASSUMED_SHAPE))
+- gfc_error ("DTIO dummy argument at %L must be an "
+- "ASSUMED SHAPE ARRAY", &fsym->declared_at);
++ else if (rank == 1)
++ {
++ if (fsym->as == NULL
++ || !(fsym->as->type == AS_ASSUMED_SHAPE
++ || (fsym->as->type == AS_DEFERRED && fsym->attr.dummy
++ && !fsym->attr.allocatable && !fsym->attr.pointer)))
++ gfc_error ("DTIO dummy argument at %L must be an "
++ "ASSUMED-SHAPE ARRAY", &fsym->declared_at);
++ }
+
+ if (type == BT_CHARACTER && fsym->ts.u.cl->length != NULL)
+ gfc_error ("DTIO character argument at %L must have assumed length",
+
+--
+Steve
+
diff --git a/testing/source/gcc10/slack-desc.gcc b/testing/source/gcc10/slack-desc.gcc
new file mode 100644
index 000000000..ebe1b8422
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc: gcc (Base GCC package with C support)
+gcc:
+gcc: GCC is the GNU Compiler Collection.
+gcc:
+gcc: This package contains those parts of the compiler collection needed to
+gcc: compile C code. Other packages add Ada, C++, Fortran, Go,
+gcc: Objective-C, and BRIG support to the compiler core.
+gcc:
+gcc:
+gcc:
+gcc:
diff --git a/testing/source/gcc10/slack-desc.gcc-brig b/testing/source/gcc10/slack-desc.gcc-brig
new file mode 100644
index 000000000..e9496b8bd
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-brig
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-brig: gcc-brig (BRIG support for GCC)
+gcc-brig:
+gcc-brig: BRIG support for the GNU Compiler Collection.
+gcc-brig:
+gcc-brig: BRIG is the binary form of the Heterogeneous System Architecture
+gcc-brig: Intermediate Language (HSA IL), which is a virtual instruction set for
+gcc-brig: parallel programs. While similar in some ways to OpenCL or CUDA, HSA
+gcc-brig: is designed to ease the burden on the programmer by automatically
+gcc-brig: handling the offloading of tasks and moving of data.
+gcc-brig:
+gcc-brig:
diff --git a/testing/source/gcc10/slack-desc.gcc-g++ b/testing/source/gcc10/slack-desc.gcc-g++
new file mode 100644
index 000000000..6beaf21b1
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-g++
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-g++: gcc-g++ (C++ for GCC)
+gcc-g++:
+gcc-g++: C++ support for the GNU Compiler Collection.
+gcc-g++:
+gcc-g++: This package contains those parts of the compiler collection needed to
+gcc-g++: compile C++ code.
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
diff --git a/testing/source/gcc10/slack-desc.gcc-gdc b/testing/source/gcc10/slack-desc.gcc-gdc
new file mode 100644
index 000000000..4e54ea889
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-gdc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-gdc: gcc-gdc (D support for GCC)
+gcc-gdc:
+gcc-gdc: D support for the GNU Compiler Collection.
+gcc-gdc:
+gcc-gdc: D is a general-purpose programming language with static typing,
+gcc-gdc: systems-level access, and C-like syntax.
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
+gcc-gdc:
diff --git a/testing/source/gcc10/slack-desc.gcc-gfortran b/testing/source/gcc10/slack-desc.gcc-gfortran
new file mode 100644
index 000000000..6d08f0125
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-gfortran
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-gfortran: gcc-gfortran (Fortran support for GCC)
+gcc-gfortran:
+gcc-gfortran: The GNU Fortran compiler is fully compliant with the Fortran 95
+gcc-gfortran: Standard and includes legacy F77 support. In addition, a significant
+gcc-gfortran: number of Fortran 2003 and Fortran 2008 features are implemented.
+gcc-gfortran: GNU Fortran also contains many standard and extensions and can be
+gcc-gfortran: used to run real-world programs.
+gcc-gfortran:
+gcc-gfortran: This package contains those parts of the compiler collection
+gcc-gfortran: needed to compile Fortran code.
+gcc-gfortran:
diff --git a/testing/source/gcc10/slack-desc.gcc-gnat b/testing/source/gcc10/slack-desc.gcc-gnat
new file mode 100644
index 000000000..9c1eb7714
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-gnat
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-gnat: gcc-gnat (Ada support for GCC)
+gcc-gnat:
+gcc-gnat: Ada support for the GNU Compiler Collection.
+gcc-gnat:
+gcc-gnat: This package contains those parts of the compiler collection needed to
+gcc-gnat: compile Ada code. GNAT implements Ada 95, Ada 2005 and Ada 2012, and
+gcc-gnat: it may also be invoked in Ada 83 compatibility mode. By default, GNAT
+gcc-gnat: assumes Ada 2012.
+gcc-gnat:
+gcc-gnat:
+gcc-gnat:
diff --git a/testing/source/gcc10/slack-desc.gcc-go b/testing/source/gcc10/slack-desc.gcc-go
new file mode 100644
index 000000000..0c518b18c
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-go
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-go: gcc-go (Go support for GCC)
+gcc-go:
+gcc-go: Go is a compiled, garbage-collected, concurrent programming language
+gcc-go: developed by Google Inc. The initial design of Go was started in
+gcc-go: September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
+gcc-go: Rob Pike has stated that Go is being used "for real stuff" at Google.
+gcc-go: Go's "gc" compiler targets the Linux, Mac OS X, FreeBSD, OpenBSD and
+gcc-go: Microsoft Windows operating systems, and the i386, amd64, and ARM
+gcc-go: processor architectures.
+gcc-go:
+gcc-go: Homepage: http://golang.org
diff --git a/testing/source/gcc10/slack-desc.gcc-objc b/testing/source/gcc10/slack-desc.gcc-objc
new file mode 100644
index 000000000..ac48f8bdc
--- /dev/null
+++ b/testing/source/gcc10/slack-desc.gcc-objc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gcc-objc: gcc-objc (Objective-C/C++ support for GCC)
+gcc-objc:
+gcc-objc: Objective-C/C++ support for the GNU Compiler Collection.
+gcc-objc:
+gcc-objc: This package contains those parts of the compiler collection needed to
+gcc-objc: compile code written in Objective-C and Objective-C++. Objective-C was
+gcc-objc: originally developed to add object-oriented extensions to the C
+gcc-objc: language, and is best known as the native language of the NeXT
+gcc-objc: computer.
+gcc-objc:
+gcc-objc: