Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Maintainer: Wilson E. Alvarez <wilson.e.alvarez1@gmail.com>
# Contributor: Benoit Favre <benoit.favre@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Kamil Biduś <kamil.bidus@gmail.com>
pkgname=aseprite
pkgver=1.2.13
pkgrel=1
pkgdesc='Create animated sprites and pixel art'
arch=('x86_64' 'i686')
url="http://www.aseprite.org/"
license=('custom')
depends=('cmark' 'pixman' 'curl' 'giflib' 'zlib' 'libpng' 'libjpeg-turbo' 'tinyxml' 'freetype2' 'libwebp' 'harfbuzz')
makedepends=('cmake')
conflicts=("aseprite-git" "aseprite-gpl")
source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/Aseprite-v${pkgver}-Source.zip"
"${pkgname}.desktop")
sha256sums=(
'542eb1a4127ade0404728ff05aee461cc84f9ab012c0db36aa828e76a6410230'
'c258fa38a0e0bd575f0bd744c4c3b60cf8d59d596c7572f84bd392e1c5e49b4f'
)
build() {
cd "$srcdir"
if [ -z "$ASEPRITE_ACCEPT_EULA" ]; then
less EULA.txt
echo "Do you accept the EULA? yes/NO (set ASEPRITE_ACCEPT_EULA=yes to skip this message)"
read reply
[ "$reply" == "yes" ] || exit 1
fi
# Disable Allegro4 alias fix which creates a function declaration conflict:
sed -e 's/DUSE_ALLEG4_BACKEND/DUSE_ALLEG4_BACKEND -DALLEGRO_NO_FIX_ALIASES/g' -i CMakeLists.txt
mkdir -p build && cd build
# CMake config notes:
# Do not build using the shared allegro4. Weird graphical glitches happen
# when linking to the library from the official repo. Also, since loadpng.h
# is also distributed in allegro4, using that shared library must also be
# disabled since there's no guarantee Arch users might have allegro4
# installed.
cmake -DUSE_SHARED_PIXMAN=ON \
-DWITH_WEBP_SUPPORT=ON \
-DUSE_SHARED_CURL=ON \
-DUSE_SHARED_GIFLIB=ON \
-DUSE_SHARED_JPEGLIB=ON \
-DUSE_SHARED_HARFBUZZ=ON \
-DUSE_SHARED_ZLIB=ON \
-DUSE_SHARED_LIBPNG=ON \
-DUSE_SHARED_TINYXML=ON \
-DUSE_SHARED_CMARK=ON \
-DENABLE_UPDATER=OFF \
-DUSE_SHARED_FREETYPE=ON \
-DUSE_SHARED_ALLEGRO4=OFF \
-DUSE_SHARED_LIBLOADPNG=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLAF_OS_BACKEND=skia \
-DSKIA_DIR=/usr/src/skia \
-DSKIA_OUT_DIR=/usr/lib \
-DCMAKE_INSTALL_PREFIX:STRING=/usr ..
make $MAKEFLAGS
}
package() {
cd "$srcdir"/build
make DESTDIR="$pkgdir/" install
install -Dm644 "$srcdir/$pkgname.desktop" \
"$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "../data/icons/ase48.png" \
"$pkgdir/usr/share/pixmaps/$pkgname.png"
install -Dm644 "../EULA.txt" "$pkgdir/usr/share/licenses/$pkgname/EULA.txt"
# Remove conflicting files with libarchive
# TODO: With the current compilation options, looks like aseprite build process builds these binaries. Disable the compilation of the following files later on:
# Note: Github issue: https://github.com/aseprite/aseprite/issues/1602
rm -f "$pkgdir/usr/bin/"{bsdcat,bsdcpio,bsdtar,img2webp}
rm -rf "$pkgdir/usr/include" "$pkgdir/usr/lib" "$pkgdir/usr/share/man" "$pkgdir/usr/bin/cmark"
}
# vim:set ts=2 sw=2 et:
pkgname=aseprite-skia-git
pkgver=1.0.0
pkgrel=1
pkgdesc="Chromiums high-performance rendering library (static)"
arch=('any')
url="https://github.com/aseprite/skia"
license=('BSD')
depends=('mesa' 'libgl')
makedepends=('git' 'ninja' 'depot-tools-git' 'python2' 'gcc' 'gn')
source=()
sha256sums=()
prepare() {
# to make sure depot tools are in path
if [[ ! ":$PATH:" == *":/opt/depot_tools:"* ]]; then
export PATH=$PATH:/opt/depot_tools
fi
# download/sync skia
cd "$srcdir"
# make python2 default python
mkdir -p .pkgbuild-bin
ln -sf /usr/bin/python2-config .pkgbuild-bin/python-config
ln -sf /usr/bin/python2 .pkgbuild-bin/python
export PATH="$srcdir/.pkgbuild-bin":$PATH
git clone -b aseprite-m71 https://github.com/aseprite/skia.git skia
# generate the ninja build files using gn
cd skia
python2 tools/git-sync-deps
mkdir -p out
gn gen out/Release --args="is_debug=false is_official_build=true 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"
}
build() {
cd skia
ninja -C ./out/Release
}
package() {
cd "$srcdir/skia"
skiadir="$pkgdir/usr/src/aseprite-skia"
mkdir -p "$skiadir"
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -D -m644 out/Release/libskia.a "$pkgdir/usr/lib/libskia.a"
mkdir -p "$skiadir/include"
cp -dpr --no-preserve=ownership ./include/* "$skiadir/include"
mkdir -p "$skiadir/src"
cp -dpr --no-preserve=ownership ./src/* "$skiadir/src"
mkdir -p "$skiadir/third_party"
cp -dpr --no-preserve=ownership ./third_party/externals/angle2 "$skiadir/third_party/externals"
cp -dpr --no-preserve=ownership ./third_party/skcms "$skiadir/third_party"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.