1
0
forked from ports/contrib
contrib/inkscape/Pkgfile

71 lines
2.2 KiB
Plaintext
Raw Normal View History

2011-11-09 19:18:13 +11:00
# Description: An open source SVG editor.
2017-02-11 16:29:26 +11:00
# URL: https://www.inkscape.org/
2014-11-10 23:28:07 +11:00
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: boehm-gc boost double-conversion graphicsmagick gsl gtkmm3 libsoup libxslt poppler-glib popt potrace gdl
2011-11-09 19:18:13 +11:00
name=inkscape
2021-10-10 01:05:47 +11:00
_name=inkscape-INKSCAPE
2022-05-22 17:22:24 +10:00
version=1.2
_version=1.2_2022-05-15_dc2aedaf03
_pversion=22.05.0
_psoversion=121
release=1
source=(https://media.inkscape.org/dl/resources/file/inkscape-$_version.tar.xz
https://poppler.freedesktop.org/poppler-$_pversion.tar.xz)
2011-11-09 19:18:13 +11:00
poppler() {
2021-03-07 11:35:01 +11:00
cmake -S poppler-$_pversion -B build-poppler -G Ninja \
2020-11-08 11:19:41 +00:00
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
2020-12-06 23:54:57 +00:00
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
2020-11-08 11:19:41 +00:00
-D ENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-D ENABLE_UTILS=ON \
-D ENABLE_CPP=ON \
-D ENABLE_GLIB=ON \
-D ENABLE_QT5=OFF \
-D ENABLE_ZLIB=ON \
-D ENABLE_CMS=lcms2 \
-D ENABLE_LIBOPENJPEG=none \
-D WITH_NSS3=OFF \
2020-11-08 09:05:08 +00:00
-Wno-dev
2020-05-28 17:45:50 +02:00
cmake --build build-poppler
2020-11-08 09:05:08 +00:00
DESTDIR=$SRC/poppler cmake --install build-poppler
2021-03-07 11:35:01 +11:00
install -D -t $PKG/usr/lib $SRC/poppler/usr/lib/libpoppler.so.$_psoversion
2020-05-28 17:45:50 +02:00
export CXXFLAGS+=" -I$SRC/poppler/usr/include -I$SRC/poppler/usr/include/poppler"
export PKG_CONFIG_PATH="$SRC/poppler/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
}
2011-11-09 19:18:13 +11:00
build() {
2021-03-07 11:35:01 +11:00
[ ! -e "/usr/lib/libpoppler.so.$_psoversion" ] && poppler
2020-08-21 21:58:52 +10:00
# https://gitlab.gnome.org/GNOME/glib/-/issues/2331
CFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'
CXXFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'
2017-02-11 16:29:26 +11:00
2021-10-10 01:05:47 +11:00
cmake -S $name-$_version -B build -G Ninja \
2020-11-08 11:19:41 +00:00
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
2020-11-08 11:19:41 +00:00
-D CMAKE_BUILD_TYPE=Release \
2020-12-06 23:54:57 +00:00
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D WITH_INTERNAL_2GEOM=ON \
2020-11-08 09:05:08 +00:00
-Wno-dev
cmake --build build
2020-07-08 13:01:36 +00:00
DESTDIR=$PKG cmake --install build
2011-11-09 19:18:13 +11:00
rm -r $PKG/usr/share/man/?? \
$PKG/usr/share/locale \
$PKG/usr/share/inkscape/doc
2012-03-02 23:29:46 +11:00
2022-05-22 17:22:24 +10:00
find $PKG/usr/share/inkscape \( -name 'README' -o -name 'README.*' \) -exec rm -f {} +
/usr/bin/python3 -mcompileall $PKG
/usr/bin/python3 -O -m compileall $PKG
/usr/bin/python3 -OO -m compileall $PKG
2011-11-09 19:18:13 +11:00
}