summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTércio Martins2021-08-07 02:06:59 -0300
committerTércio Martins2021-08-07 02:06:59 -0300
commit1424ecf9f15a4d52936638707da32d8449dcf4ae (patch)
tree3cdcf7f3398ee18a53bba38eee9fd974b255e736
parentaf6a31317c2b5986580780638115d59ee14e17d5 (diff)
downloadaur-1424ecf9f15a4d52936638707da32d8449dcf4ae.tar.gz
Update to Python 3; fix build issues
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD67
-rw-r--r--enve-quazip-qscintilla.patch61
-rw-r--r--enve-skia-deps-python3.patch65
4 files changed, 114 insertions, 93 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 93e82d966b12..0ebe0c1c5710 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = enve-git
pkgdesc = 2D animation software
- pkgver = continuous.windows.r175.gf691b357
+ pkgver = continuous.linux.r52.gc39be6f4
pkgrel = 1
+ epoch = 1
url = https://maurycyliebner.github.io/
arch = i686
arch = pentium4
@@ -12,25 +13,24 @@ pkgbase = enve-git
makedepends = intltool
makedepends = ninja
makedepends = openmp
- makedepends = python2
+ makedepends = python
depends = gperftools
- depends = qscintilla-qt5
depends = qt5-multimedia
depends = qt5-svg
depends = qt5-webengine
- depends = quazip
source = git+https://github.com/MaurycyLiebner/enve.git
source = git+https://github.com/gperftools/gperftools.git
source = git+https://github.com/mypaint/libmypaint.git
source = git+https://skia.googlesource.com/skia.git
+ source = git+https://github.com/opencor/qscintilla.git
source = enve-QPainterPath.patch
- source = enve-quazip-qscintilla.patch
+ source = enve-skia-deps-python3.patch
+ sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = a6ec4054ee0b91a02e99e8dcd0dab08afe0d72bb00065b9df3425081247be37da25635e7b9faf55039e380582c0a40a3ff73b79f29df0c7d6c7c45b8117c3ad6
- sha512sums = ba321de43cf07aaf009d4f05e5962b9de578d65be8b8b58fed5c4f4b85d3ce0121715816263c3848d5c164906370cac35cbffbaee2472c188d54c44b3ed3db5a
+ sha512sums = 527906079ac8d14837acb78f750c60bee212976e2e335e58777db5e563b76f8288cc6f50259512e3fe2789b47e4101ed8e6c616ee193c6a547ecf13e89787907
pkgname = enve-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 9b23e8b6192a..a02a407ae99e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,34 @@
# Maintainer: Tércio Martins <echo dGVyY2lvd2VuZGVsQGdtYWlsLmNvbQo= | base64 -d>
pkgname=enve-git
-_pkgname=enve
-pkgver=continuous.windows.r175.gf691b357
+_pkgname=${pkgname%-git}
+pkgver=continuous.linux.r52.gc39be6f4
pkgrel=1
+epoch=1
arch=('i686' 'pentium4' 'x86_64')
pkgdesc="2D animation software"
url="https://maurycyliebner.github.io/"
license=('GPL3')
-depends=('gperftools' 'qscintilla-qt5' 'qt5-multimedia' 'qt5-svg' 'qt5-webengine' 'quazip')
-makedepends=('git' 'gn' 'intltool' 'ninja' 'openmp' 'python2')
+depends=('gperftools' 'qt5-multimedia' 'qt5-svg' 'qt5-webengine')
+makedepends=('git' 'gn' 'intltool' 'ninja' 'openmp' 'python')
source=("git+https://github.com/MaurycyLiebner/enve.git"
"git+https://github.com/gperftools/gperftools.git"
"git+https://github.com/mypaint/libmypaint.git"
"git+https://skia.googlesource.com/skia.git"
+ "git+https://github.com/opencor/qscintilla.git"
"enve-QPainterPath.patch"
- "enve-quazip-qscintilla.patch")
+ "enve-skia-deps-python3.patch")
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
+ 'SKIP'
'a6ec4054ee0b91a02e99e8dcd0dab08afe0d72bb00065b9df3425081247be37da25635e7b9faf55039e380582c0a40a3ff73b79f29df0c7d6c7c45b8117c3ad6'
- 'ba321de43cf07aaf009d4f05e5962b9de578d65be8b8b58fed5c4f4b85d3ce0121715816263c3848d5c164906370cac35cbffbaee2472c188d54c44b3ed3db5a')
+ '527906079ac8d14837acb78f750c60bee212976e2e335e58777db5e563b76f8288cc6f50259512e3fe2789b47e4101ed8e6c616ee193c6a547ecf13e89787907')
pkgver() {
cd "$_pkgname"
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
@@ -34,21 +37,26 @@ prepare() {
git submodule init
git config submodule.third_party/gperftools.url $srcdir/gperftools
git config submodule.third_party/libmypaint.url $srcdir/libmypaint
+ git config submodule.third_party/qscintilla.url $srcdir/qscintilla
git config submodule.third_party/skia.url $srcdir/skia
git submodule update
- # Creating a symbolic link to the python2 executable, used to build skia.
- # Source: aseprite-git PKGBUILD
- mkdir -p "$srcdir/.pkgbuild-bin"
- ln -sf "$(which python2)" "$srcdir/.pkgbuild-bin/python"
-
# Patching enve source code
patch --forward --strip=1 --input="$srcdir/enve-QPainterPath.patch"
- patch --forward --strip=1 --input="$srcdir/enve-quazip-qscintilla.patch"
+ sed -i 's|libmypaint/||g' src/core/libmypaintincludes.h
+
+ cd third_party
+
+ # Work around error "Dependency not allowed" during skia building
+ # https://community.aseprite.org/t/skia-dependency-not-allowed-during-gn-gen/7091
+ sed -i '/visibility/d' skia/BUILD.gn
+
+ # Delete reference to gn function "set_sources_assignment_filter"
+ # https://gn.googlesource.com/gn/+/55e535a6716e57320fdd3901f0347a5c30562199
+ sed -i '/set_sources_assignment_filter/d' skia/BUILD.gn
# Apply enve-specific library patches
- cd "$srcdir/$_pkgname/third_party"
- if ! patch --dry-run --silent --reverse -d gperftools -p1 < gperftools-enve-mod.patch 2>&- ;
+ if [ ! -f gperftools/include/gperftools/heap-checker.h ]
then
make patch
fi
@@ -62,6 +70,13 @@ build() {
export PATH="$srcdir/.pkgbuild-bin":$PATH
cd "$_third_party_dir/skia"
python tools/git-sync-deps
+
+ # Patch Skia dependencies to support Python 3
+ if ! grep -q "b'clang" gn/is_clang.py
+ then
+ patch --forward --strip=3 --input="$srcdir/enve-skia-deps-python3.patch"
+ fi
+
gn gen out/Release --args='is_official_build=true is_debug=false extra_cflags=["-Wno-error"] skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_system_freetype2=false skia_use_system_harfbuzz=false'
ninja -C out/Release skia
@@ -73,29 +88,31 @@ build() {
make
unset CFLAGS
+ # Build quazip
+ cd "$_third_party_dir/quazip"
+ qmake quazip.pro CONFIG+=Release
+ make
+
# Build gperftools
cd "$_third_party_dir/gperftools"
./autogen.sh
- ./configure --prefix=/usr
+ ./configure --prefix=/usr LIBS=-lpthread
+ make
+
+ # Build qscintilla
+ cd "$_third_party_dir/qscintilla"
+ qmake Qt4Qt5/qscintilla.pro CONFIG+=Release
make
# Build enve
cd "$srcdir/$_pkgname/build/Release"
qmake ../../enve.pro \
PREFIX=/usr \
- CONFIG+=release \
- CONFIG+=build_examples
+ CONFIG+=release
make
}
package() {
cd "$srcdir/$_pkgname/build/Release"
make INSTALL_ROOT="$pkgdir" install
-
- # Move libraries ignored by the "make install" script
- for file in 'Blur' 'Linearize' 'Shadow'; do
- find "$srcdir/$_pkgname/build/Release/examples" \
- -type f -name "libe${file}.so*" \
- -exec cp -pa {} "$pkgdir/usr/lib" \;
- done
}
diff --git a/enve-quazip-qscintilla.patch b/enve-quazip-qscintilla.patch
deleted file mode 100644
index 10cae0b518e8..000000000000
--- a/enve-quazip-qscintilla.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Description: Changes the include paths for qscintilla and quazip to "/usr/include/..."
-
-diff --unified --recursive --text enve.orig/src/app/app.pro enve.new/src/app/app.pro
---- enve.orig/src/app/app.pro 2020-06-28 16:35:40.420742370 -0300
-+++ enve.new/src/app/app.pro 2020-06-28 16:37:46.877404810 -0300
-@@ -31,7 +31,7 @@
- include(../core/core.pri)
-
- ENVE_CORE_FOLDER = ../core
--QSCINTILLA_FOLDER = $$THIRD_PARTY_FOLDER/qscintilla/Qt4Qt5
-+QSCINTILLA_FOLDER = /usr/include/qt
-
- INCLUDEPATH += $$ENVE_CORE_FOLDER
- DEPENDPATH += $$ENVE_CORE_FOLDER
-diff --unified --recursive --text enve.orig/src/core/core.pri enve.new/src/core/core.pri
---- enve.orig/src/core/core.pri 2020-06-28 16:17:57.960777695 -0300
-+++ enve.new/src/core/core.pri 2020-06-28 16:21:39.570770341 -0300
-@@ -16,7 +16,7 @@
- THIRD_PARTY_FOLDER = $$ENVE_FOLDER/third_party
- SKIA_FOLDER = $$THIRD_PARTY_FOLDER/skia
- LIBMYPAINT_FOLDER = $$THIRD_PARTY_FOLDER/libmypaint
--QUAZIP_FOLDER = $$THIRD_PARTY_FOLDER/quazip
-+QUAZIP_FOLDER = /usr/include/quazip5
-
- INCLUDEPATH += $$SKIA_FOLDER
- QMAKE_CFLAGS += -isystem $$SKIA_FOLDER
-@@ -25,7 +25,9 @@
- LIBS += -L$$LIBMYPAINT_FOLDER/.libs -lmypaint
-
- INCLUDEPATH += $$QUAZIP_FOLDER
--LIBS += -L$$QUAZIP_FOLDER/quazip -lquazip
-+LIBS += -L$$QUAZIP_FOLDER -lquazip5
-+
-+INCLUDEPATH += $$THIRD_PARTY_FOLDER
-
- CONFIG(debug, debug|release) {
- LIBS += -L$$SKIA_FOLDER/out/Debug
-diff --unified --recursive --text enve.orig/src/core/zipfileloader.h enve.new/src/core/zipfileloader.h
---- enve.orig/src/core/zipfileloader.h 2020-06-28 16:22:32.970768566 -0300
-+++ enve.new/src/core/zipfileloader.h 2020-06-28 16:23:20.730766976 -0300
-@@ -17,7 +17,7 @@
- #ifndef ZIPFILELOADER_H
- #define ZIPFILELOADER_H
-
--#include <quazip/quazipfile.h>
-+#include <quazip5/quazipfile.h>
-
- #include <QDir>
-
-diff --unified --recursive --text enve.orig/src/core/zipfilesaver.h enve.new/src/core/zipfilesaver.h
---- enve.orig/src/core/zipfilesaver.h 2020-06-28 16:22:45.310768159 -0300
-+++ enve.new/src/core/zipfilesaver.h 2020-06-28 16:23:31.327433290 -0300
-@@ -17,7 +17,7 @@
- #ifndef ZIPFILESAVER_H
- #define ZIPFILESAVER_H
-
--#include <quazip/quazipfile.h>
-+#include <quazip5/quazipfile.h>
-
- #include "exceptions.h"
-
diff --git a/enve-skia-deps-python3.patch b/enve-skia-deps-python3.patch
new file mode 100644
index 000000000000..bdc84b4c62ce
--- /dev/null
+++ b/enve-skia-deps-python3.patch
@@ -0,0 +1,65 @@
+Description: This patch updates the scripts "is_clang.py" (gn) and "make_data_assembly.py" (icu) to work with Python 3.
+
+diff --unified --recursive --text enve.orig/third_party/skia/gn/is_clang.py enve.new/third_party/skia/gn/is_clang.py
+--- enve.orig/third_party/skia/gn/is_clang.py 2021-04-27 23:42:44.879494431 -0300
++++ enve.new/third_party/skia/gn/is_clang.py 2021-04-28 18:47:13.033804170 -0300
+@@ -11,8 +11,8 @@
+ import sys
+ cc,cxx = sys.argv[1:3]
+
+-if ('clang' in subprocess.check_output('%s --version' % cc, shell=True) and
+- 'clang' in subprocess.check_output('%s --version' % cxx, shell=True)):
++if (b'clang' in subprocess.check_output('%s --version' % cc, shell=True) and
++ b'clang' in subprocess.check_output('%s --version' % cxx, shell=True)):
+ print('true')
+ else:
+ print('false')
+diff --unified --recursive --text enve.orig/third_party/skia/third_party/externals/icu/scripts/make_data_assembly.py enve.new/third_party/skia/third_party/externals/icu/scripts/make_data_assembly.py
+--- enve.orig/third_party/skia/third_party/externals/icu/scripts/make_data_assembly.py 2021-04-28 17:45:36.609684118 -0300
++++ enve.new/third_party/skia/third_party/externals/icu/scripts/make_data_assembly.py 2021-04-28 19:07:03.537511109 -0300
+@@ -42,7 +42,7 @@
+ step = -1
+
+ input_data = open(input_file, 'rb').read()
+-n = input_data.find("icudt")
++n = input_data.find(b"icudt")
+ if n == -1:
+ sys.exit("Cannot find a version number in %s." % input_file)
+
+@@ -75,28 +75,28 @@
+ "\t.type icudt%s_dat,%%object\n"
+ "icudt%s_dat:\n" % tuple([version_number] * 4))
+
+-split = [binascii.hexlify(input_data[i:i + 4][::step]).upper().lstrip('0')
++split = [binascii.hexlify(input_data[i:i + 4][::step]).upper().lstrip(b'0')
+ for i in range(0, len(input_data), 4)]
+
+ for i in range(len(split)):
+ if (len(split[i]) == 0):
+- value = '0'
++ value = b'0'
+ elif (len(split[i]) == 1):
+- if not any((c in '123456789') for c in split[i]):
+- value = '0x0' + split[i]
++ if not any((c in b'123456789') for c in split[i]):
++ value = b'0x0' + split[i]
+ else:
+ value = split[i]
+ elif (len(split[i]) % 2 == 1):
+- value = '0x0' + split[i]
++ value = b'0x0' + split[i]
+ else:
+- value = '0x' + split[i]
++ value = b'0x' + split[i]
+
+ if (i % 32 == 0):
+ output.write("\n.long ")
+ else:
+ output.write(",")
+- output.write(value)
++ output.write(value.decode('utf-8'))
+
+ output.write("\n")
+ output.close()
+-print "Generated " + output_file
++print(f'Generated {output_file}')