mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
cairo/xcairo, add version 1.18.0 (#9523)
This commit is contained in:
136
x11-libs/cairo/cairo1.18-1.18.0.recipe
Normal file
136
x11-libs/cairo/cairo1.18-1.18.0.recipe
Normal file
@@ -0,0 +1,136 @@
|
||||
SUMMARY="Multi-platform 2D graphics library"
|
||||
DESCRIPTION="Cairo is a 2D graphics library with support for multiple output \
|
||||
devices. Currently supported output targets include the X Window \
|
||||
System (via both Xlib and XCB), quartz, win32, and image buffers, \
|
||||
as well as PDF, PostScript, and SVG file output. Experimental backends \
|
||||
include OpenGL, BeOS, OS/2, and DirectFB."
|
||||
HOMEPAGE="http://cairographics.org/"
|
||||
COPYRIGHT="2000, 2002, 2004-2007 Keith Packard
|
||||
2002-2003 University of Southern California
|
||||
2004-2010 Red Hat, Inc.
|
||||
2005-2010 Mozilla Corporation
|
||||
2006-2009 Adrian Johnson
|
||||
2007-2009 Chris Wilson
|
||||
2006-2013 Intel Corporation
|
||||
2011 Andrea Canciani
|
||||
2011 Samsung Electronics
|
||||
2010-2011 Linaro Limited
|
||||
2009-2010 Eric Anholt
|
||||
2002-2010 many others"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64"
|
||||
SOURCE_DIR="cairo-$portVersion"
|
||||
PATCHES="cairo-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# This recipe MUST be kept in sync with xcairo!
|
||||
|
||||
libVersion="2.11800.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
cairo1.18$secondaryArchSuffix = $portVersion
|
||||
lib:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cairo1.18${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
cairo1.18$secondaryArchSuffix == $portVersion base
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
cairo${secondaryArchSuffix}_devel
|
||||
xcairo${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gtkdocize
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:make
|
||||
cmd:meson
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
pygments_python310
|
||||
"
|
||||
|
||||
defineDebugInfoPackage cairo1.18$secondaryArchSuffix \
|
||||
"$libDir"/libcairo.so.$libVersion \
|
||||
"$libDir"/libcairo-gobject.so.$libVersion \
|
||||
"$libDir"/libcairo-script-interpreter.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
meson \
|
||||
--buildtype=release \
|
||||
--prefix=$prefix \
|
||||
--libdir=$libDir \
|
||||
--libexecdir=$binDir \
|
||||
--datadir=$dataDir \
|
||||
--includedir=$includeDir \
|
||||
--sysconfdir=$settingsDir \
|
||||
-Dgtk_doc=true \
|
||||
-Dtests=disabled \
|
||||
build
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja -C build install
|
||||
|
||||
# #install documentation
|
||||
mkdir -p $dataDir
|
||||
mv $prefix/share/gtk-doc $dataDir
|
||||
rm -rf $prefix/share
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libcairo \
|
||||
libcairo-gobject \
|
||||
libcairo-script-interpreter
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build/test
|
||||
cairo-test-suite
|
||||
}
|
||||
80
x11-libs/cairo/patches/cairo-1.18.0.patchset
Normal file
80
x11-libs/cairo/patches/cairo-1.18.0.patchset
Normal file
@@ -0,0 +1,80 @@
|
||||
From d3376558b01b9445e8805a7666174ef0c5d7cef8 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Sun, 24 Sep 2023 15:41:34 +0200
|
||||
Subject: Xlib: Do not attempt to use shm.
|
||||
|
||||
|
||||
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
|
||||
index 10f947d..94b811f 100644
|
||||
--- a/src/cairo-xlib-surface-shm.c
|
||||
+++ b/src/cairo-xlib-surface-shm.c
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
#include "cairoint.h"
|
||||
|
||||
-#if !CAIRO_HAS_XLIB_XCB_FUNCTIONS
|
||||
+#if 1
|
||||
|
||||
#include "cairo-xlib-private.h"
|
||||
#include "cairo-xlib-surface-private.h"
|
||||
|
||||
-#if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H)
|
||||
+#if 1
|
||||
void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
|
||||
{
|
||||
display->shm = NULL;
|
||||
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
|
||||
index 84d5362..748a808 100644
|
||||
--- a/src/cairo-xlib-surface.c
|
||||
+++ b/src/cairo-xlib-surface.c
|
||||
@@ -79,7 +79,9 @@
|
||||
|
||||
#include <X11/extensions/XShm.h>
|
||||
#include <sys/ipc.h>
|
||||
+#ifndef __HAIKU__
|
||||
#include <sys/shm.h>
|
||||
+#endif
|
||||
|
||||
#define DEBUG 0
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From b750af6bae4047f3959c515b3c4056a7a33f0077 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Sun, 24 Sep 2023 16:57:05 +0200
|
||||
Subject: Fix linking and building the tests
|
||||
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 9100152..554071c 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -41,7 +41,7 @@ cflags = []
|
||||
if cc.get_id() != 'msvc'
|
||||
cflags += [
|
||||
'-Wmissing-declarations',
|
||||
- '-Werror-implicit-function-declaration',
|
||||
+ '-Wno-error-implicit-function-declaration',
|
||||
'-Wpointer-arith',
|
||||
'-Wwrite-strings',
|
||||
'-Wsign-compare',
|
||||
@@ -488,6 +488,14 @@ if host_machine.system() == 'darwin' and not get_option('quartz').disabled()
|
||||
endif
|
||||
endif
|
||||
|
||||
+if host_machine.system() == 'haiku'
|
||||
+ haiku_extra_deps = [
|
||||
+ cc.find_library('network'),
|
||||
+ cc.find_library('gnu')
|
||||
+ ]
|
||||
+ deps += haiku_extra_deps
|
||||
+endif
|
||||
+
|
||||
if host_machine.system() == 'windows'
|
||||
add_project_arguments('-DWIN32_LEAN_AND_MEAN', '-DNOMINMAX', language: ['c', 'cpp'])
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
146
x11-libs/cairo/xcairo1.18-1.18.0.recipe
Normal file
146
x11-libs/cairo/xcairo1.18-1.18.0.recipe
Normal file
@@ -0,0 +1,146 @@
|
||||
SUMMARY="Multi-platform 2D graphics library (with Xlib surfaces)"
|
||||
DESCRIPTION="Cairo is a 2D graphics library with support for multiple output \
|
||||
devices. Currently supported output targets include the X Window \
|
||||
System (via both Xlib and XCB), quartz, win32, and image buffers, \
|
||||
as well as PDF, PostScript, and SVG file output. Experimental backends \
|
||||
include OpenGL, BeOS, OS/2, and DirectFB."
|
||||
HOMEPAGE="http://cairographics.org/"
|
||||
COPYRIGHT="2000, 2002, 2004-2007 Keith Packard
|
||||
2002-2003 University of Southern California
|
||||
2004-2010 Red Hat, Inc.
|
||||
2005-2010 Mozilla Corporation
|
||||
2006-2009 Adrian Johnson
|
||||
2007-2009 Chris Wilson
|
||||
2006-2013 Intel Corporation
|
||||
2011 Andrea Canciani
|
||||
2011 Samsung Electronics
|
||||
2010-2011 Linaro Limited
|
||||
2009-2010 Eric Anholt
|
||||
2002-2010 many others"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64"
|
||||
SOURCE_DIR="cairo-$portVersion"
|
||||
PATCHES="cairo-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# This recipe MUST be kept in sync with cairo!
|
||||
|
||||
libVersion="2.11800.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
xcairo1.18$secondaryArchSuffix = $portVersion
|
||||
lib:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpixman_1$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
|
||||
lib:libX11$secondaryArchSuffix
|
||||
lib:libXext$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS="
|
||||
cairo1.18$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
xcairo1.18${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
xcairo1.18$secondaryArchSuffix == $portVersion base
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
|
||||
devel:libX11$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
cairo${secondaryArchSuffix}_devel
|
||||
xcairo${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
|
||||
devel:libX11$secondaryArchSuffix
|
||||
devel:libXext$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:gtkdocize
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:make
|
||||
cmd:meson
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
pygments_python310
|
||||
"
|
||||
|
||||
defineDebugInfoPackage xcairo1.18$secondaryArchSuffix \
|
||||
"$libDir"/libcairo.so.$libVersion \
|
||||
"$libDir"/libcairo-gobject.so.$libVersion \
|
||||
"$libDir"/libcairo-script-interpreter.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
meson \
|
||||
--buildtype=release \
|
||||
--prefix=$prefix \
|
||||
--libdir=$libDir \
|
||||
--libexecdir=$binDir \
|
||||
--datadir=$dataDir \
|
||||
--includedir=$includeDir \
|
||||
--sysconfdir=$settingsDir \
|
||||
-Dgtk_doc=true \
|
||||
build
|
||||
ninja -C build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja -C build install
|
||||
|
||||
# #install documentation
|
||||
mkdir -p $dataDir
|
||||
mv $prefix/share/gtk-doc $dataDir
|
||||
rm -rf $prefix/share
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libcairo \
|
||||
libcairo-gobject \
|
||||
libcairo-script-interpreter
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build/test
|
||||
cairo-test-suite
|
||||
}
|
||||
Reference in New Issue
Block a user