mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
106 lines
3.3 KiB
Bash
106 lines
3.3 KiB
Bash
SUMMARY="A thin layer of graphic data types"
|
|
DESCRIPTION="When creating graphic libraries you most likely end up dealing with points and \
|
|
rectangles. If you're particularly unlucky, you may end up dealing with affine matrices and 2D \
|
|
transformations. If you're writing a graphic library with 3D transformations, though, you are \
|
|
going to hit the jackpot: 4x4 matrices, projections, transformations, vectors, and quaternions.
|
|
|
|
Most of this stuff exists, in various forms, in other libraries, but it has the major drawback of \
|
|
coming along with the rest of those libraries, which may or may not be what you want. Those \
|
|
libraries are also available in various languages, as long as those languages are C++; again, it \
|
|
may or may not be something you want.
|
|
|
|
For this reason, I decided to write the thinnest, smallest possible layer needed to write a \
|
|
canvas library; given its relative size, and the propensity for graphics libraries to have a pun \
|
|
in their name, I decided to call it Graphene.
|
|
|
|
This library provides types and their relative API; it does not deal with windowing system \
|
|
surfaces, drawing, scene graphs, or input. You are supposed to do that yourself, in your own \
|
|
canvas implementation, which is the whole point of writing the library in the first place."
|
|
HOMEPAGE="https://ebassi.github.io/graphene/"
|
|
COPYRIGHT="2014-2018 Emmanuele Bassi"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/ebassi/graphene/archive/refs/tags/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="922dc109d2dc5dc56617a29bd716c79dd84db31721a8493a13a5f79109a4a4ed"
|
|
srcGitRev_2="f0dcb2a48a4a8ef3dc1f7327bb0d4056a798c1a7"
|
|
SOURCE_URI_2="https://github.com/ebassi/mutest/archive/$srcGitRev_2.tar.gz"
|
|
CHECKSUM_SHA256_2="8e5728113f7247bd6f6655dae94642f646c03b747f44724a6dc2e5f95a627d99"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="0.1000.8"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
graphene$secondaryArchSuffix = $portVersion
|
|
lib:libgraphene_1.0$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libglib_2.0$secondaryArchSuffix
|
|
lib:libgobject_2.0$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
graphene${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libgraphene_1.0$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
graphene$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libgirepository_1.0$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
devel:libgobject_2.0$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:gtkdoc_scan
|
|
cmd:meson
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
pygments_python310
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cp -r $sourceDir2/mutest-$srcGitRev_2/* subprojects/mutest
|
|
meson --buildtype release \
|
|
--prefix $prefix \
|
|
--bindir $binDir \
|
|
--datadir $dataDir \
|
|
--includedir $includeDir \
|
|
--libdir $libDir \
|
|
--default-library shared \
|
|
-Dgtk_doc=true \
|
|
-Dintrospection=enabled \
|
|
-Dinstalled_tests=false \
|
|
build
|
|
ninja -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja -C build install
|
|
|
|
# move header to $includeDir develop/lib/graphene-1.0/include
|
|
mkdir -p $developLibDir
|
|
mv $libDir/graphene-1.0 $developLibDir
|
|
|
|
mkdir -p $dataDir
|
|
mv $prefix/share/* $dataDir
|
|
rm -rf $prefix/share
|
|
|
|
prepareInstalledDevelLib \
|
|
libgraphene-1.0
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|