mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
xcairo: Build the full Cairo and declare conflicts with the main package.
This seems to be necessary, unfortunately, to avoid strange crashes.
This commit is contained in:
@@ -19,7 +19,7 @@ COPYRIGHT="2000, 2002, 2004-2007 Keith Packard
|
||||
2002-2010 many others"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="4"
|
||||
REVISION="5"
|
||||
SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
|
||||
PATCHES="cairo-$portVersion.patchset"
|
||||
@@ -90,7 +90,8 @@ defineDebugInfoPackage cairo$secondaryArchSuffix \
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
export CFLAGS=-D__BSD_VISIBLE
|
||||
|
||||
export CFLAGS="-D__BSD_VISIBLE -g -O2"
|
||||
runConfigure ./configure \
|
||||
--disable-static --enable-shared
|
||||
make $jobArgs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUMMARY="Multi-platform 2D graphics library"
|
||||
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, \
|
||||
@@ -19,7 +19,7 @@ COPYRIGHT="2000, 2002, 2004-2007 Keith Packard
|
||||
2002-2010 many others"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
MPL v1.1"
|
||||
REVISION="3"
|
||||
REVISION="4"
|
||||
SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
|
||||
PATCHES="cairo-$portVersion.patchset"
|
||||
@@ -28,35 +28,58 @@ SOURCE_DIR="cairo-$portVersion"
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# This recipe MUST be kept in sync with cairo!
|
||||
|
||||
libVersion="2.11600.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
xcairo$secondaryArchSuffix = $portVersion
|
||||
lib:libcairo_xlib$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cairo$secondaryArchSuffix == $portVersion
|
||||
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="
|
||||
cairo$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
xcairo${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcairo_xlib$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
xcairo$secondaryArchSuffix == $portVersion base
|
||||
cairo${secondaryArchSuffix}_devel == $portVersion
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libpixman_1$secondaryArchSuffix
|
||||
|
||||
devel:libX11$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cairo${secondaryArchSuffix}_devel == $portVersion
|
||||
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
|
||||
"
|
||||
@@ -72,50 +95,32 @@ BUILD_PREREQUIRES="
|
||||
"
|
||||
|
||||
defineDebugInfoPackage xcairo$secondaryArchSuffix \
|
||||
"$libDir"/libcairo-xlib.so.$libVersion
|
||||
"$libDir"/libcairo.so.$libVersion \
|
||||
"$libDir"/libcairo-gobject.so.$libVersion \
|
||||
"$libDir"/libcairo-script-interpreter.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
export CFLAGS=-D__BSD_VISIBLE
|
||||
export CFLAGS="-D__BSD_VISIBLE -g -O2"
|
||||
|
||||
runConfigure ./configure \
|
||||
--disable-static --enable-shared \
|
||||
--enable-xlib
|
||||
make $jobArgs
|
||||
|
||||
# hack: build libcairo-xlib from just the relevant objects
|
||||
rm -f cairo-tmp.a
|
||||
# TODO: these symbols should really all be hidden...
|
||||
ar rcs cairo-tmp.a src/.libs/*.o
|
||||
|
||||
gcc -shared -o libcairo-xlib.so \
|
||||
-lcairo -lpixman-1 -lfreetype -lfontconfig -lX11 -lXext \
|
||||
-Wl,--no-undefined -Wl,-soname,libcairo-xlib.so.2 \
|
||||
src/.libs/*xlib*.o cairo-tmp.a
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
# install our custom cairo-xlib
|
||||
mkdir -p $libDir
|
||||
cp libcairo-xlib.so $libDir
|
||||
mv $libDir/libcairo-xlib.so $libDir/libcairo-xlib.so.$libVersion
|
||||
ln -s libcairo-xlib.so.$libVersion $libDir/libcairo-xlib.so.2
|
||||
ln -s libcairo-xlib.so.$libVersion $libDir/libcairo-xlib.so
|
||||
make install
|
||||
|
||||
# pkg-config
|
||||
mkdir -p $developLibDir/pkgconfig/
|
||||
cp src/cairo-xlib.pc $developLibDir/pkgconfig/
|
||||
sed -i "s/Libs\\:/Libs\\: -lcairo-xlib/" $developLibDir/pkgconfig/cairo-xlib.pc
|
||||
|
||||
# header
|
||||
mkdir -p $includeDir/cairo
|
||||
cp src/cairo-xlib.h $includeDir/cairo/
|
||||
sed -i '/^#if CAIRO_HAS_XLIB_SURFACE.*/i #define CAIRO_HAS_XLIB_SURFACE 1' $includeDir/cairo/cairo-xlib.h
|
||||
rm $libDir/libcairo*.la
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libcairo-xlib
|
||||
libcairo \
|
||||
libcairo-gobject \
|
||||
libcairo-script-interpreter
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
@@ -37,6 +37,7 @@ REQUIRES="
|
||||
pango$secondaryArchSuffix
|
||||
atk$secondaryArchSuffix
|
||||
gdk_pixbuf$secondaryArchSuffix
|
||||
xcairo$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libfribidi$secondaryArchSuffix
|
||||
@@ -45,8 +46,6 @@ REQUIRES="
|
||||
lib:libharfbuzz$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcairo_xlib$secondaryArchSuffix
|
||||
lib:libX11$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
@@ -61,11 +60,10 @@ REQUIRES_devel="
|
||||
pango${secondaryArchSuffix}_devel
|
||||
atk${secondaryArchSuffix}_devel
|
||||
gdk_pixbuf${secondaryArchSuffix}_devel
|
||||
xcairo${secondaryArchSuffix}_devel
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libepoxy$secondaryArchSuffix
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libcairo_xlib$secondaryArchSuffix
|
||||
devel:libX11$secondaryArchSuffix
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user