summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--ETL-1.2.1.patch12
-rw-r--r--PKGBUILD75
3 files changed, 65 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c0234a6caaa9..30cf7a81d623 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,13 @@
pkgbase = synfig
pkgdesc = Professional vector animation program (CLI renderer only)
pkgver = 1.2.1
- pkgrel = 4
+ pkgrel = 5
url = https://synfig.org
arch = x86_64
license = GPL2
makedepends = boost
depends = libxml++2.6
depends = libsigc++2.0
- depends = etl
depends = libmagick6
depends = ffmpeg
depends = fontconfig
@@ -24,11 +23,13 @@ pkgbase = synfig
depends = intltool
optdepends = openexr
optdepends = libsigc++
- conflicts = synfig-core
- replaces = synfig-core
- source = https://downloads.sourceforge.net/project/synfig/releases/1.2.1/source/synfig-1.2.1.tar.gz
+ source = https://github.com/synfig/synfig/releases/download/v1.2.1/ETL-1.2.1.tar.gz
+ source = https://github.com/synfig/synfig/releases/download/v1.2.1/synfig-1.2.1.tar.gz
+ source = ETL-1.2.1.patch
source = ffmpeg-3.0.patch
+ sha256sums = 754d88c5ddfdef54f27d1e17f62a902eb9f09fbe7ef9aebded34541b4c1700e6
sha256sums = 4d8bada4e99f05ee16b4256fc3f5a551d00a745347944837bbd6fa158b57e457
+ sha256sums = 35e218317050430ebae667d26269903ad1c377407b9a75feb48a9138af131cb0
sha256sums = 424b3cc38809038c3b015ce2a6d3a006d73aefe0445d0090fae45e8eb69b2b55
pkgname = synfig
diff --git a/ETL-1.2.1.patch b/ETL-1.2.1.patch
new file mode 100644
index 000000000000..bcf70e00880c
--- /dev/null
+++ b/ETL-1.2.1.patch
@@ -0,0 +1,12 @@
+--- a/ETL/_pen.h 2017-09-08 05:51:26.000000000 -0400
++++ b/ETL/_pen.h 2018-07-27 12:56:43.833337339 -0400
+@@ -136,7 +136,8 @@
+ typedef int value_type;
+ value_type x,y;
+ difference_type(value_type x, value_type y):x(x),y(y) { }
+- value_type &operator[](int i)const { return i?y:x; }
++ const value_type &operator[](int i) const { return i?y:x; }
++ value_type &operator[](int i) { return i?y:x; }
+ };
+
+ protected:
diff --git a/PKGBUILD b/PKGBUILD
index a0f01caf0b7a..b816a20f21c5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,69 @@
-# $Id: PKGBUILD 276264 2017-12-27 19:52:10Z bpiotrowski $
# Maintainer: Mattéo Delabre <bonjour@matteodelabre.me>
-# Contriubtor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Franco Iacomella <yaco@gnu.org>
pkgname=synfig
pkgver=1.2.1
-pkgrel=4
+pkgrel=5
pkgdesc="Professional vector animation program (CLI renderer only)"
arch=(x86_64)
url="https://synfig.org"
license=('GPL2')
-depends=('libxml++2.6' 'libsigc++2.0' 'etl' 'libmagick6' 'ffmpeg' 'fontconfig'
+depends=('libxml++2.6' 'libsigc++2.0' 'libmagick6' 'ffmpeg' 'fontconfig'
'libpng' 'libtiff' 'libdv' 'libmng' 'cairo' 'pango' 'boost-libs' 'mlt'
'fftw' 'intltool')
makedepends=('boost')
optdepends=('openexr' 'libsigc++')
-conflicts=('synfig-core')
-replaces=('synfig-core')
-source=(https://downloads.sourceforge.net/project/synfig/releases/$pkgver/source/synfig-$pkgver.tar.gz
- ffmpeg-3.0.patch)
-sha256sums=('4d8bada4e99f05ee16b4256fc3f5a551d00a745347944837bbd6fa158b57e457'
- '424b3cc38809038c3b015ce2a6d3a006d73aefe0445d0090fae45e8eb69b2b55')
+source=(
+ "https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/ETL-$pkgver.tar.gz"
+ "https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
+ 'ETL-1.2.1.patch'
+ 'ffmpeg-3.0.patch')
+sha256sums=(
+ '754d88c5ddfdef54f27d1e17f62a902eb9f09fbe7ef9aebded34541b4c1700e6'
+ '4d8bada4e99f05ee16b4256fc3f5a551d00a745347944837bbd6fa158b57e457'
+ '35e218317050430ebae667d26269903ad1c377407b9a75feb48a9138af131cb0'
+ '424b3cc38809038c3b015ce2a6d3a006d73aefe0445d0090fae45e8eb69b2b55')
prepare() {
- cd $pkgname-$pkgver
- patch -p1 -i "$srcdir"/ffmpeg-3.0.patch
+ # Fix const-invalid method in ETL 1.2.1 using the patch which is included
+ # in ETL ≥ 1.3.9. This makes building with GCC possible.
+ # (see <https://github.com/synfig/synfig/commit/cb05b072>)
+ cd "$srcdir"/ETL-$pkgver
+ patch -p1 -i "$srcdir"/ETL-1.2.1.patch
+
+ # Workaround usage of deprecated ffmpeg constants by manually defining
+ # them, and other deprecation workarounds
+ cd "$srcdir"/$pkgname-$pkgver
+ patch -p1 -i "$srcdir"/ffmpeg-3.0.patch
}
build() {
- cd $pkgname-$pkgver
-
-# CXXFLAGS="$CXXFLAGS -std=gnu++11"
- PKG_CONFIG_PATH="/usr/lib/imagemagick6/pkgconfig" \
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --disable-static \
- --with-imagemagick \
- --with-magickpp \
- --with-libavcodec \
- --with-libdv
-
- sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
- make
+ # Build a local ETL version
+ cd "$srcdir"/ETL-$pkgver
+ ./configure --prefix="$srcdir/ETL-$pkgver/build"
+ make
+ make install
+
+ # Build Synfig using the local ETL version
+ # (do not use the system-wide one as it probably
+ # contains the bug we want to patch)
+ cd "$srcdir"/$pkgname-$pkgver
+
+ PKG_CONFIG_PATH="/usr/lib/imagemagick6/pkgconfig:$srcdir/ETL-$pkgver" \
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-static \
+ --with-imagemagick \
+ --with-magickpp \
+ --with-libavcodec \
+ --with-libdv
+
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
}
package() {
- cd $pkgname-$pkgver
- make DESTDIR="$pkgdir" install
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
}