Files
haikuports/media-gfx/inkscape/inkscape-1.2.1.recipe
Gerasim Troeglazov bf4a0b3ce8 Inkscape: bump version
2022-11-18 22:12:19 +10:00

161 lines
5.2 KiB
Bash

SUMMARY="A free & open source vector graphics editor"
DESCRIPTION="Inkscape is a Free and open source vector graphics editor. It offers a rich set \
of features and is widely used for both artistic and technical illustrations \
such as cartoons, clip art, logos, typography, diagramming and flowcharting. \
It uses vector graphics to allow for sharp printouts and renderings at \
unlimited resolution and is not bound to a fixed number of pixels like raster \
graphics. Inkscape uses the standardized SVG file format as its main format, \
which is supported by many other applications including web browsers."
HOMEPAGE="https://inkscape.org/"
COPYRIGHT="2022 Inkscape Developers"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="https://inkscape.org/gallery/item/34673/inkscape-$portVersion.tar.xz"
CHECKSUM_SHA256="46ce7da0eba7ca4badc1db70e9cbb67e0adf9bb342687dc6e08b5ca21b8d4c1b"
SOURCE_DIR="inkscape-${portVersion}_2022-07-14_9c6d41e410"
PATCHES="inkscape-$portVersion.patchset"
ADDITIONAL_FILES="
inkscape.rdef.in
inkview.rdef.in
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
inkscape$secondaryArchSuffix = $portVersion
lib:lib2geom$secondaryArchSuffix = $portVersion
app:Inkscape = $portVersion
app:Inkview = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
boehm_gc$secondaryArchSuffix
lib:libatkmm_1.6$secondaryArchSuffix
lib:libboost_filesystem$secondaryArchSuffix
lib:libcairo$secondaryArchSuffix
lib:libcairomm_1.0$secondaryArchSuffix
lib:libcdr_0.1$secondaryArchSuffix
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libglibmm_2.4$secondaryArchSuffix
lib:libgiomm_2.4$secondaryArchSuffix
lib:libgdk_3$secondaryArchSuffix
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libGraphicsMagick++$secondaryArchSuffix
lib:libgsl$secondaryArchSuffix
lib:libgtk_3$secondaryArchSuffix
lib:libgtkmm_3.0$secondaryArchSuffix
lib:libharfbuzz$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpango_1.0$secondaryArchSuffix
lib:libpangomm_1.4$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:librevenge_0.0$secondaryArchSuffix
lib:librevenge_stream_0.0$secondaryArchSuffix
lib:librsvg_2$secondaryArchSuffix
lib:libsigc_2.0$secondaryArchSuffix
lib:libsoup_2.4$secondaryArchSuffix
lib:libdouble_conversion$secondaryArchSuffix
lib:libpotrace$secondaryArchSuffix
lib:libvisio_0.1$secondaryArchSuffix
lib:libwpd_0.10$secondaryArchSuffix
lib:libwpg_0.3$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libxslt$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
boehm_gc${secondaryArchSuffix}_devel
devel:libboost_filesystem$secondaryArchSuffix
devel:libcdr_0.1$secondaryArchSuffix
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libglibmm_2.4$secondaryArchSuffix
devel:libGraphicsMagick$secondaryArchSuffix
devel:libGraphicsMagickWand$secondaryArchSuffix
devel:libgsl$secondaryArchSuffix
devel:libgtkmm_3.0$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblcms2$secondaryArchSuffix
devel:libpango_1.0$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
devel:librevenge_0.0$secondaryArchSuffix
devel:libsoup_2.4$secondaryArchSuffix
devel:libdouble_conversion$secondaryArchSuffix
devel:libpotrace$secondaryArchSuffix
devel:libvisio_0.1$secondaryArchSuffix
devel:libwpd_0.10$secondaryArchSuffix
devel:libwpg_0.3$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libxslt$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
{
LDFLAGS="-Wl,--as-needed" \
cmake . $cmakeDirArgs -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DSHARE_INSTALL=$dataDir \
-DINKSCAPE_DATADIR=$dataDir \
-DPACKAGE_LOCALE_DIR=$dataDir/locale \
-DWITH_X11=OFF
# otherwise it runs out of memory, unfortunately
ninja -j1
}
INSTALL()
{
ninja install
mkdir -p $appsDir
mv $binDir/inkscape $appsDir/Inkscape
mv $binDir/inkview $appsDir/Inkview
rm -rf $binDir $developDir $libDir/{cmake,pkgconfig}
local APP_SIGNATURE="application/x-vnd.inkscape-inkscape"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/inkscape.rdef.in > inkscape.rdef
local APP_SIGNATURE="application/x-vnd.inkscape-inkview"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/inkview.rdef.in > inkview.rdef
addResourcesToBinaries inkscape.rdef $appsDir/Inkscape
addAppDeskbarSymlink $appsDir/Inkscape
addResourcesToBinaries inkview.rdef $appsDir/Inkview
addAppDeskbarSymlink $appsDir/Inkview
}