Files
BMLFS/build-scripts/inkscape.build
2022-05-14 21:19:35 -05:00

50 lines
1.8 KiB
Bash

#! /bin/bash
# inkscape
# Source: https://media.inkscape.org/dl/resources/file/inkscape-1.1.2.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: harfbuzz pango cairo fontconfig gsl libsoup2 gc lcms2
# Required: double-conversion libjpeg-turbo libpng potrace gtkmm3
# Required: poppler
# Recommended: boost dbus
# Optional: libwpg librevenge libvisio libcdr
patch -Np1 -i ../patches/inkscape-alpine/fix-Werror.patch && \
patch -Np1 -i ../patches/inkscape-alpine/poppler-22.03.patch && \
# Disable support for poppler, breaks build.
export CXXFLAGS="$CXXFLAGS -std=c++11" && \
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True -DBUILD_TESTING=OFF \
-DDENABLE_POPPLER=OFF -DENABLE_POPPLER_CAIRO=OFF && \
read -p "Compile?" && ninja -j2 -C build &&
sudo -S DESTDIR=$BUILD ninja -C build install &&
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# 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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
inkscape: inkscape
inkscape:
inkscape: A vector-based drawing program - svg compliant.
inkscape:
inkscape: https://inkscape.org
inkscape:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/inkscape-1.1.2-$(uname -m)-mlfs.txz &&
sudo -S rm -rf ${BUILD}/*