diff options
Diffstat (limited to 'source/x')
-rwxr-xr-x | source/x/ibus/ibus.SlackBuild | 17 | ||||
-rw-r--r-- | source/x/libkkc-data/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch | 138 | ||||
-rwxr-xr-x | source/x/libkkc-data/libkkc-data.SlackBuild | 12 | ||||
-rw-r--r-- | source/x/libkkc/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch | 138 | ||||
-rwxr-xr-x | source/x/libkkc/libkkc.SlackBuild | 12 | ||||
-rw-r--r-- | source/x/x11/build/xcb-proto | 2 | ||||
-rw-r--r-- | source/x/x11/configure/xcb-proto | 22 | ||||
-rw-r--r-- | source/x/x11/make/xcb-proto | 10 | ||||
-rw-r--r-- | source/x/x11/package-blacklist | 1 |
9 files changed, 311 insertions, 41 deletions
diff --git a/source/x/ibus/ibus.SlackBuild b/source/x/ibus/ibus.SlackBuild index 27b9629ee..a2a5c5f57 100755 --- a/source/x/ibus/ibus.SlackBuild +++ b/source/x/ibus/ibus.SlackBuild @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2017 Heinz Wiesinger, Amsterdam, The Netherlands -# Copyright 2017, 2020, 2022, 2023 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2017, 2020, 2022, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=ibus VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -117,6 +117,7 @@ CFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --enable-python-library \ --with-python=python3 \ + --disable-python2 \ --with-unicode-emoji-dir=$TMP/ibus-$VERSION \ --with-ucd-dir=$TMP/ibus-$VERSION \ --disable-systemd-services \ @@ -124,7 +125,14 @@ CFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 -make install-strip DESTDIR=$PKG || exit 1 +make install DESTDIR=$PKG || exit 1 + +# cleanup temporary files: +rm -rf $PKG/usr/lib$LIBDIRSUFFIX/python*/site-packages/gi + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cu +t -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # Compress manual pages: find $PKG/usr/man -type f -exec gzip -9 {} \+ @@ -139,9 +147,6 @@ install -m 644 $CWD/ibus-autostart-plasma.desktop $PKG/etc/xdg/autostart/ install -m 755 $CWD/ibus-autostart $PKG/usr/bin/ sed -i "s|LIBDIRSUFFIX|$LIBDIRSUFFIX|" $PKG/usr/bin/ibus-autostart -# cleanup temporary files -rm -rf $PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/gi - # Don't ship .la files: rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la diff --git a/source/x/libkkc-data/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch b/source/x/libkkc-data/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch new file mode 100644 index 000000000..91d3f6956 --- /dev/null +++ b/source/x/libkkc-data/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch @@ -0,0 +1,138 @@ +From ba1c1bd3eb86d887fc3689c3142732658071b5f7 Mon Sep 17 00:00:00 2001 +From: Takao Fujiwara <tfujiwar@redhat.com> +Date: Mon, 30 Jul 2018 15:26:37 +0900 +Subject: [PATCH] build: Enable python3 + +--- + data/templates/libkkc-data/tools/genfilter.py | 18 +++++++-------- + data/templates/libkkc-data/tools/sortlm.py | 23 ++++++++----------- + 2 files changed, 19 insertions(+), 22 deletions(-) + +diff --git a/data/templates/libkkc-data/tools/genfilter.py b/data/templates/libkkc-data/tools/genfilter.py +index 5ffab32..0c5f75a 100644 +--- a/data/templates/libkkc-data/tools/genfilter.py ++++ b/data/templates/libkkc-data/tools/genfilter.py +@@ -84,24 +84,24 @@ def __init__(self, infile, outfile, record_size): + + def generate(self): + size = os.fstat(self.infile.fileno()).st_size +- n = size / self.record_size ++ n = size // self.record_size + m = int(math.ceil(-n*math.log10(ERROR_RATE) / + math.pow(math.log10(2), 2))) +- m = (m/8 + 1)*8 ++ m = (m//8 + 1)*8 + inmem = mmap.mmap(self.infile.fileno(), + size, + access=mmap.ACCESS_READ) +- outmem = bytearray(m/8) +- for i in xrange(0, n): ++ outmem = bytearray(m//8) ++ for i in range(0, n): + offset = i*self.record_size + b0, b1 = struct.unpack("=LL", inmem[offset:offset+8]) +- for k in xrange(0, 4): ++ for k in range(0, 4): + h = murmur_hash3_32(b0, b1, k) + h = int(h * (m / float(0xFFFFFFFF))) +- outmem[h/8] |= (1 << (h%8)) ++ outmem[h//8] |= (1 << (h%8)) + inmem.close() +- # Convert bytearray to str, for Python 2.6 compatibility. +- self.outfile.write(str(outmem)) ++ # Convert bytearray to bytes, for Python 3 compatibility. ++ self.outfile.write(bytes(outmem)) + + if __name__ == '__main__': + import sys +@@ -110,7 +110,7 @@ def generate(self): + parser = argparse.ArgumentParser(description='filter') + parser.add_argument('infile', type=argparse.FileType('r'), + help='input file') +- parser.add_argument('outfile', type=argparse.FileType('w'), ++ parser.add_argument('outfile', type=argparse.FileType('wb'), + help='output file') + parser.add_argument('record_size', type=int, + help='record size') +diff --git a/data/templates/libkkc-data/tools/sortlm.py b/data/templates/libkkc-data/tools/sortlm.py +index a0dd8fe..40f0837 100644 +--- a/data/templates/libkkc-data/tools/sortlm.py ++++ b/data/templates/libkkc-data/tools/sortlm.py +@@ -40,10 +40,10 @@ def __init__(self, infile, output_prefix): + self.__min_cost = 0.0 + + def read(self): +- print "reading N-grams" ++ print("reading N-grams") + self.__read_tries() + self.__read_ngrams() +- print "min cost = %lf" % self.__min_cost ++ print("min cost = %lf" % self.__min_cost) + + def __read_tries(self): + while True: +@@ -58,7 +58,7 @@ def __read_tries(self): + line = self.__infile.readline() + if line == "": + break +- line = line.strip() ++ line = line.strip('\n') + if line == "": + break + match = self.__ngram_line_regex.match(line) +@@ -89,7 +89,7 @@ def __read_ngrams(self): + line = self.__infile.readline() + if line == "": + break +- line = line.strip() ++ line = line.strip('\n') + if line == "": + break + match = self.__ngram_line_regex.match(line) +@@ -125,14 +125,11 @@ def __write_ngrams(self): + def quantize(cost, min_cost): + return max(0, min(65535, int(cost * 65535 / min_cost))) + +- def cmp_header(a, b): +- return cmp(a[0], b[0]) +- +- print "writing 1-gram file" ++ print("writing 1-gram file") + unigram_offsets = {} + unigram_file = open("%s.1gram" % self.__output_prefix, "wb") + offset = 0 +- for ids, value in sorted(self.__ngram_entries[0].iteritems()): ++ for ids, value in sorted(self.__ngram_entries[0].items()): + unigram_offsets[ids[0]] = offset + s = struct.pack("=HHH", + quantize(value[0], self.__min_cost), +@@ -143,13 +140,13 @@ def cmp_header(a, b): + offset += 1 + unigram_file.close() + +- print "writing 2-gram file" ++ print("writing 2-gram file") + bigram_offsets = {} + bigram_file = open("%s.2gram" % self.__output_prefix, "wb") + keys = self.__ngram_entries[1].keys() + items = [(struct.pack("=LL", ids[1], unigram_offsets[ids[0]]), ids) for ids in keys] + offset = 0 +- for header, ids in sorted(items, cmp=cmp_header): ++ for header, ids in sorted(items, key=lambda x: x[0]): + value = self.__ngram_entries[1][ids] + bigram_offsets[ids] = offset + s = struct.pack("=HH", +@@ -160,11 +157,11 @@ def cmp_header(a, b): + bigram_file.close() + + if len(self.__ngram_entries[2]) > 0: +- print "writing 3-gram file" ++ print("writing 3-gram file") + trigram_file = open("%s.3gram" % self.__output_prefix, "wb") + keys = self.__ngram_entries[2].keys() + items = [(struct.pack("=LL", ids[2], bigram_offsets[(ids[0], ids[1])]), ids) for ids in keys] +- for header, ids in sorted(items, cmp=cmp_header): ++ for header, ids in sorted(items, key=lambda x: x[0]): + value = self.__ngram_entries[2][ids] + s = struct.pack("=H", + quantize(value[0], self.__min_cost)) diff --git a/source/x/libkkc-data/libkkc-data.SlackBuild b/source/x/libkkc-data/libkkc-data.SlackBuild index c35d3b623..fc24a2637 100755 --- a/source/x/libkkc-data/libkkc-data.SlackBuild +++ b/source/x/libkkc-data/libkkc-data.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for libkkc-data # Copyright 2015-2016 Heinz Wiesinger, Amsterdam, The Netherlands -# Copyright 2016, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2016, 2020, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=libkkc-data VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d- | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -85,6 +85,10 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ +# Something for later? +#cat $CWD/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch | patch -p1 --verbose || exit 1 +#sed -i "s|#!/usr/bin/python$|#!/usr/bin/python3|g" data/templates/libkkc-data/tools/*.py + if [ ! -r configure ]; then if [ -x ./autogen.sh ]; then NOCONFIGURE=1 ./autogen.sh @@ -93,6 +97,10 @@ if [ ! -r configure ]; then fi fi +########################### +# FORCING PYTHON2 FOR NOW # +########################### +PYTHON=python2 \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/source/x/libkkc/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch b/source/x/libkkc/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch new file mode 100644 index 000000000..91d3f6956 --- /dev/null +++ b/source/x/libkkc/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch @@ -0,0 +1,138 @@ +From ba1c1bd3eb86d887fc3689c3142732658071b5f7 Mon Sep 17 00:00:00 2001 +From: Takao Fujiwara <tfujiwar@redhat.com> +Date: Mon, 30 Jul 2018 15:26:37 +0900 +Subject: [PATCH] build: Enable python3 + +--- + data/templates/libkkc-data/tools/genfilter.py | 18 +++++++-------- + data/templates/libkkc-data/tools/sortlm.py | 23 ++++++++----------- + 2 files changed, 19 insertions(+), 22 deletions(-) + +diff --git a/data/templates/libkkc-data/tools/genfilter.py b/data/templates/libkkc-data/tools/genfilter.py +index 5ffab32..0c5f75a 100644 +--- a/data/templates/libkkc-data/tools/genfilter.py ++++ b/data/templates/libkkc-data/tools/genfilter.py +@@ -84,24 +84,24 @@ def __init__(self, infile, outfile, record_size): + + def generate(self): + size = os.fstat(self.infile.fileno()).st_size +- n = size / self.record_size ++ n = size // self.record_size + m = int(math.ceil(-n*math.log10(ERROR_RATE) / + math.pow(math.log10(2), 2))) +- m = (m/8 + 1)*8 ++ m = (m//8 + 1)*8 + inmem = mmap.mmap(self.infile.fileno(), + size, + access=mmap.ACCESS_READ) +- outmem = bytearray(m/8) +- for i in xrange(0, n): ++ outmem = bytearray(m//8) ++ for i in range(0, n): + offset = i*self.record_size + b0, b1 = struct.unpack("=LL", inmem[offset:offset+8]) +- for k in xrange(0, 4): ++ for k in range(0, 4): + h = murmur_hash3_32(b0, b1, k) + h = int(h * (m / float(0xFFFFFFFF))) +- outmem[h/8] |= (1 << (h%8)) ++ outmem[h//8] |= (1 << (h%8)) + inmem.close() +- # Convert bytearray to str, for Python 2.6 compatibility. +- self.outfile.write(str(outmem)) ++ # Convert bytearray to bytes, for Python 3 compatibility. ++ self.outfile.write(bytes(outmem)) + + if __name__ == '__main__': + import sys +@@ -110,7 +110,7 @@ def generate(self): + parser = argparse.ArgumentParser(description='filter') + parser.add_argument('infile', type=argparse.FileType('r'), + help='input file') +- parser.add_argument('outfile', type=argparse.FileType('w'), ++ parser.add_argument('outfile', type=argparse.FileType('wb'), + help='output file') + parser.add_argument('record_size', type=int, + help='record size') +diff --git a/data/templates/libkkc-data/tools/sortlm.py b/data/templates/libkkc-data/tools/sortlm.py +index a0dd8fe..40f0837 100644 +--- a/data/templates/libkkc-data/tools/sortlm.py ++++ b/data/templates/libkkc-data/tools/sortlm.py +@@ -40,10 +40,10 @@ def __init__(self, infile, output_prefix): + self.__min_cost = 0.0 + + def read(self): +- print "reading N-grams" ++ print("reading N-grams") + self.__read_tries() + self.__read_ngrams() +- print "min cost = %lf" % self.__min_cost ++ print("min cost = %lf" % self.__min_cost) + + def __read_tries(self): + while True: +@@ -58,7 +58,7 @@ def __read_tries(self): + line = self.__infile.readline() + if line == "": + break +- line = line.strip() ++ line = line.strip('\n') + if line == "": + break + match = self.__ngram_line_regex.match(line) +@@ -89,7 +89,7 @@ def __read_ngrams(self): + line = self.__infile.readline() + if line == "": + break +- line = line.strip() ++ line = line.strip('\n') + if line == "": + break + match = self.__ngram_line_regex.match(line) +@@ -125,14 +125,11 @@ def __write_ngrams(self): + def quantize(cost, min_cost): + return max(0, min(65535, int(cost * 65535 / min_cost))) + +- def cmp_header(a, b): +- return cmp(a[0], b[0]) +- +- print "writing 1-gram file" ++ print("writing 1-gram file") + unigram_offsets = {} + unigram_file = open("%s.1gram" % self.__output_prefix, "wb") + offset = 0 +- for ids, value in sorted(self.__ngram_entries[0].iteritems()): ++ for ids, value in sorted(self.__ngram_entries[0].items()): + unigram_offsets[ids[0]] = offset + s = struct.pack("=HHH", + quantize(value[0], self.__min_cost), +@@ -143,13 +140,13 @@ def cmp_header(a, b): + offset += 1 + unigram_file.close() + +- print "writing 2-gram file" ++ print("writing 2-gram file") + bigram_offsets = {} + bigram_file = open("%s.2gram" % self.__output_prefix, "wb") + keys = self.__ngram_entries[1].keys() + items = [(struct.pack("=LL", ids[1], unigram_offsets[ids[0]]), ids) for ids in keys] + offset = 0 +- for header, ids in sorted(items, cmp=cmp_header): ++ for header, ids in sorted(items, key=lambda x: x[0]): + value = self.__ngram_entries[1][ids] + bigram_offsets[ids] = offset + s = struct.pack("=HH", +@@ -160,11 +157,11 @@ def cmp_header(a, b): + bigram_file.close() + + if len(self.__ngram_entries[2]) > 0: +- print "writing 3-gram file" ++ print("writing 3-gram file") + trigram_file = open("%s.3gram" % self.__output_prefix, "wb") + keys = self.__ngram_entries[2].keys() + items = [(struct.pack("=LL", ids[2], bigram_offsets[(ids[0], ids[1])]), ids) for ids in keys] +- for header, ids in sorted(items, cmp=cmp_header): ++ for header, ids in sorted(items, key=lambda x: x[0]): + value = self.__ngram_entries[2][ids] + s = struct.pack("=H", + quantize(value[0], self.__min_cost)) diff --git a/source/x/libkkc/libkkc.SlackBuild b/source/x/libkkc/libkkc.SlackBuild index ee44d61ba..ec67ff4f9 100755 --- a/source/x/libkkc/libkkc.SlackBuild +++ b/source/x/libkkc/libkkc.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for libkkc # Copyright 2016 Heinz Wiesinger, Amsterdam, The Netherlands -# Copyright 2016, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2016, 2020, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=libkkc VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d- | rev)} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -85,6 +85,10 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ +# Something for later? +#cat $CWD/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch | patch -p1 --verbose || exit 1 +#sed -i "s|#!/usr/bin/python$|#!/usr/bin/python3|g" data/templates/libkkc-data/tools/*.py + if [ ! -r configure ]; then if [ -x ./autogen.sh ]; then NOCONFIGURE=1 ./autogen.sh @@ -93,6 +97,10 @@ if [ ! -r configure ]; then fi fi +########################### +# FORCING PYTHON2 FOR NOW # +########################### +PYTHON=python2 \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/source/x/x11/build/xcb-proto b/source/x/x11/build/xcb-proto index d00491fd7..0cfbf0888 100644 --- a/source/x/x11/build/xcb-proto +++ b/source/x/x11/build/xcb-proto @@ -1 +1 @@ -1 +2 diff --git a/source/x/x11/configure/xcb-proto b/source/x/x11/configure/xcb-proto index 2df1aaf74..4074f1583 100644 --- a/source/x/x11/configure/xcb-proto +++ b/source/x/x11/configure/xcb-proto @@ -1,26 +1,8 @@ -mkdir python2 python3 - -cd python2 - CFLAGS=$SLKCFLAGS \ - CXXFLAGS=$SLKCFLAGS \ - PYTHON=python3 \ - ../configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --infodir=/usr/info \ - --mandir=/usr/man \ - --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \ - --with-udev-rules-dir=/lib/udev/rules.d \ - --disable-static \ - --build=$ARCH-slackware-linux -cd - - +mkdir python3 cd python3 CFLAGS=$SLKCFLAGS \ CXXFLAGS=$SLKCFLAGS \ - PYTHON=python \ + PYTHON=python3 \ ../configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ diff --git a/source/x/x11/make/xcb-proto b/source/x/x11/make/xcb-proto index a4c380bbc..b39aa7786 100644 --- a/source/x/x11/make/xcb-proto +++ b/source/x/x11/make/xcb-proto @@ -1,17 +1,7 @@ -cd python2 - if ! make $NUMJOBS ; then - touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed - continue - fi - - make install DESTDIR=$PKG -cd - - cd python3 if ! make $NUMJOBS ; then touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed continue fi - make install DESTDIR=$PKG cd - diff --git a/source/x/x11/package-blacklist b/source/x/x11/package-blacklist index 75a3ace30..51c508d07 100644 --- a/source/x/x11/package-blacklist +++ b/source/x/x11/package-blacklist @@ -41,6 +41,7 @@ xf86-video-vboxvideo xf86-video-voodoo xf86-video-xgi xf86-video-xgixp +xpyb # CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR! |