summaryrefslogtreecommitdiff
path: root/source/d
diff options
context:
space:
mode:
Diffstat (limited to 'source/d')
-rwxr-xr-xsource/d/gyp/fetch-gyp.sh48
-rw-r--r--source/d/gyp/gyp-fix-cmake.patch33
-rw-r--r--source/d/gyp/gyp-ninja-build.patch26
-rw-r--r--source/d/gyp/gyp-python3.patch36
-rw-r--r--source/d/gyp/gyp-python38.patch19
-rw-r--r--source/d/gyp/gyp-python39.patch55
-rwxr-xr-xsource/d/gyp/gyp.SlackBuild110
-rw-r--r--source/d/gyp/slack-desc19
8 files changed, 346 insertions, 0 deletions
diff --git a/source/d/gyp/fetch-gyp.sh b/source/d/gyp/fetch-gyp.sh
new file mode 100755
index 00000000..7fe99f2b
--- /dev/null
+++ b/source/d/gyp/fetch-gyp.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Copyright 2019, 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.
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf gyp
+
+# Clone repository:
+git clone https://chromium.googlesource.com/external/gyp
+
+# checkout $BRANCH:
+( cd gyp
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd gyp && git log -1 --format=%h )"
+DATE="$( cd gyp && git log -1 --format=%ad --date=format:%Y%m%d )"
+# Cleanup. We're not packing up the whole git repo.
+( cd gyp && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+rm -r gyp/test/*
+mv gyp gyp-${DATE}_${HEADISAT}
+tar cf gyp-${DATE}_${HEADISAT}.tar gyp-${DATE}_${HEADISAT}
+xz -9 -f gyp-${DATE}_${HEADISAT}.tar
+rm -rf gyp-${DATE}_${HEADISAT}
+echo
+echo "gyp branch $BRANCH with HEAD at $HEADISAT packaged as gyp-${DATE}_${HEADISAT}.tar.xz"
+echo
diff --git a/source/d/gyp/gyp-fix-cmake.patch b/source/d/gyp/gyp-fix-cmake.patch
new file mode 100644
index 00000000..31bd7ac8
--- /dev/null
+++ b/source/d/gyp/gyp-fix-cmake.patch
@@ -0,0 +1,33 @@
+--- a/pylib/gyp/generator/cmake.py
++++ b/pylib/gyp/generator/cmake.py
+@@ -40,9 +40,9 @@
+
+ try:
+ # maketrans moved to str in python3.
++ _maketrans = str.maketrans
++except NameError:
+ _maketrans = string.maketrans
+-except NameError:
+- _maketrans = str.maketrans
+
+ generator_default_variables = {
+ 'EXECUTABLE_PREFIX': '',
+@@ -281,7 +281,7 @@
+ dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
+
+ if int(action.get('process_outputs_as_sources', False)):
+- extra_sources.extend(zip(cmake_outputs, outputs))
++ extra_sources.extend(list(zip(cmake_outputs, outputs)))
+
+ # add_custom_command
+ output.write('add_custom_command(OUTPUT ')
+@@ -987,7 +987,7 @@
+
+ # XCode settings
+ xcode_settings = config.get('xcode_settings', {})
+- for xcode_setting, xcode_value in xcode_settings.viewitems():
++ for xcode_setting, xcode_value in xcode_settings.items():
+ SetTargetProperty(output, cmake_target_name,
+ "XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
+ '' if isinstance(xcode_value, str) else ' ')
+
diff --git a/source/d/gyp/gyp-ninja-build.patch b/source/d/gyp/gyp-ninja-build.patch
new file mode 100644
index 00000000..74d8522d
--- /dev/null
+++ b/source/d/gyp/gyp-ninja-build.patch
@@ -0,0 +1,26 @@
+diff -pruN gyp-0.1-gitfcd686f1.orig/pylib/gyp/generator/ninja.py gyp-0.1-gitfcd686f1/pylib/gyp/generator/ninja.py
+--- gyp-0.1-gitfcd686f1.orig/pylib/gyp/generator/ninja.py 2019-08-14 09:05:50.000000000 +0000
++++ gyp-0.1-gitfcd686f1/pylib/gyp/generator/ninja.py 2019-08-14 09:19:26.668031638 +0000
+@@ -2073,11 +2073,11 @@ def GenerateOutputForConfig(target_list,
+ # .c files. This should be handled by mspdbsrv, but rarely errors out with
+ # c1xx : fatal error C1033: cannot open program database
+ # By making the rules target separate pdb files this might be avoided.
+- cc_command = ('ninja -t msvc -e $arch ' +
++ cc_command = ('ninja-build -t msvc -e $arch ' +
+ '-- '
+ '$cc /nologo /showIncludes /FC '
+ '@$out.rsp /c $in /Fo$out /Fd$pdbname_c ')
+- cxx_command = ('ninja -t msvc -e $arch ' +
++ cxx_command = ('ninja-build -t msvc -e $arch ' +
+ '-- '
+ '$cxx /nologo /showIncludes /FC '
+ '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ')
+@@ -2453,7 +2453,7 @@ def PerformBuild(data, configurations, p
+ options = params['options']
+ for config in configurations:
+ builddir = os.path.join(options.toplevel_dir, 'out', config)
+- arguments = ['ninja', '-C', builddir]
++ arguments = ['ninja-build', '-C', builddir]
+ print('Building [%s]: %s' % (config, arguments))
+ subprocess.check_call(arguments)
+
diff --git a/source/d/gyp/gyp-python3.patch b/source/d/gyp/gyp-python3.patch
new file mode 100644
index 00000000..6235b82a
--- /dev/null
+++ b/source/d/gyp/gyp-python3.patch
@@ -0,0 +1,36 @@
+diff -pruN gyp-0.1-gitfcd686f1.orig/gyp gyp-0.1-gitfcd686f1/gyp
+--- gyp-0.1-gitfcd686f1.orig/gyp 2015-04-30 09:48:21.000000000 +0000
++++ gyp-0.1-gitfcd686f1/gyp 2019-08-14 09:41:05.343208034 +0000
+@@ -5,4 +5,4 @@
+
+ set -e
+ base=$(dirname "$0")
+-exec python "${base}/gyp_main.py" "$@"
++exec python3 "${base}/gyp_main.py" "$@"
+diff -pruN gyp-0.1-gitfcd686f1.orig/gyp_main.py gyp-0.1-gitfcd686f1/gyp_main.py
+--- gyp-0.1-gitfcd686f1.orig/gyp_main.py 2016-10-17 02:00:37.000000000 +0000
++++ gyp-0.1-gitfcd686f1/gyp_main.py 2019-08-14 09:41:43.380207320 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # Copyright (c) 2009 Google Inc. All rights reserved.
+ # Use of this source code is governed by a BSD-style license that can be
+diff -pruN gyp-0.1-gitfcd686f1.orig/gyptest.py gyp-0.1-gitfcd686f1/gyptest.py
+--- gyp-0.1-gitfcd686f1.orig/gyptest.py 2019-08-14 09:05:50.000000000 +0000
++++ gyp-0.1-gitfcd686f1/gyptest.py 2019-08-14 09:41:48.578208719 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # Copyright (c) 2012 Google Inc. All rights reserved.
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+diff -pruN gyp-0.1-gitfcd686f1.orig/setup.py gyp-0.1-gitfcd686f1/setup.py
+--- gyp-0.1-gitfcd686f1.orig/setup.py 2015-04-30 09:48:21.000000000 +0000
++++ gyp-0.1-gitfcd686f1/setup.py 2019-08-14 09:41:53.510210046 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # Copyright (c) 2009 Google Inc. All rights reserved.
+ # Use of this source code is governed by a BSD-style license that can be
diff --git a/source/d/gyp/gyp-python38.patch b/source/d/gyp/gyp-python38.patch
new file mode 100644
index 00000000..36f1da6a
--- /dev/null
+++ b/source/d/gyp/gyp-python38.patch
@@ -0,0 +1,19 @@
+commit 7b0a3fd85beb67c990da3fb1b690444a27a6ee42
+Author: Tom Hughes <tom@compton.nu>
+Date: Fri Aug 23 09:33:14 2019 +0100
+
+ Fix python 3.8 warnings
+
+diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
+index 42c279cf..013231dc 100644
+--- a/pylib/gyp/input.py
++++ b/pylib/gyp/input.py
+@@ -1181,7 +1181,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
+ if variable_name in variables:
+ # If the variable is already set, don't set it.
+ continue
+- if the_dict_key is 'variables' and variable_name in the_dict:
++ if the_dict_key == 'variables' and variable_name in the_dict:
+ # If the variable is set without a % in the_dict, and the_dict is a
+ # variables dict (making |variables| a varaibles sub-dict of a
+ # variables dict), use the_dict's definition.
diff --git a/source/d/gyp/gyp-python39.patch b/source/d/gyp/gyp-python39.patch
new file mode 100644
index 00000000..cb5f2e1b
--- /dev/null
+++ b/source/d/gyp/gyp-python39.patch
@@ -0,0 +1,55 @@
+diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
+index b268d229..03c99cab 100644
+--- a/pylib/gyp/common.py
++++ b/pylib/gyp/common.py
+@@ -4,7 +4,6 @@
+
+ from __future__ import with_statement
+
+-import collections
+ import errno
+ import filecmp
+ import os.path
+@@ -12,6 +11,11 @@ import re
+ import tempfile
+ import sys
+
++try:
++ from collections.abc import MutableSet
++except ImportError:
++ from collections import MutableSet
++
+
+ # A minimal memoizing decorator. It'll blow up if the args aren't immutable,
+ # among other "problems".
+@@ -494,7 +498,7 @@ def uniquer(seq, idfun=None):
+
+
+ # Based on http://code.activestate.com/recipes/576694/.
+-class OrderedSet(collections.MutableSet):
++class OrderedSet(MutableSet):
+ def __init__(self, iterable=None):
+ self.end = end = []
+ end += [None, end, end] # sentinel node for doubly linked list
+diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
+index 843e7067..327fe8d2 100644
+--- a/pylib/gyp/generator/msvs.py
++++ b/pylib/gyp/generator/msvs.py
+@@ -4,7 +4,7 @@
+
+ from __future__ import print_function
+
+-import collections
++from collections import OrderedDict
+ import copy
+ import ntpath
+ import os
+@@ -195,7 +195,7 @@ def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None,
+ if not prefix: prefix = []
+ result = []
+ excluded_result = []
+- folders = collections.OrderedDict()
++ folders = OrderedDict()
+ # Gather files into the final result, excluded, or folders.
+ for s in sources:
+ if len(s) == 1:
diff --git a/source/d/gyp/gyp.SlackBuild b/source/d/gyp/gyp.SlackBuild
new file mode 100755
index 00000000..2e8899e5
--- /dev/null
+++ b/source/d/gyp/gyp.SlackBuild
@@ -0,0 +1,110 @@
+#!/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=gyp
+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 {} \+
+
+# Patches from Fedora:
+zcat $CWD/gyp-fix-cmake.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gyp-ninja-build.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gyp-python3.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gyp-python38.patch.gz | patch -p1 --verbose || exit 1
+#zcat $CWD/gyp-python39.patch.gz | patch -p1 --verbose || exit 1
+
+python3 setup.py install --root=$PKG || exit 1
+
+# 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
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS* LICENSE* README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+mkdir -p $PKG/install
+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/source/d/gyp/slack-desc b/source/d/gyp/slack-desc
new file mode 100644
index 00000000..5f01d4ff
--- /dev/null
+++ b/source/d/gyp/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gyp: gyp (Generate Your Projects)
+gyp:
+gyp: GYP is a Meta-Build system: a build system that generates other build
+gyp: systems. GYP is intended to support large projects that need to be
+gyp: built on multiple platforms (e.g., Mac, Windows, Linux), and where it
+gyp: is important that the project can be built using the IDEs that are
+gyp: popular on each platform as if the project is a "native" one.
+gyp:
+gyp: Homepage: https://gyp.gsrc.io/
+gyp:
+gyp: