SUMMARY="A platform-independent graphics library" DESCRIPTION="CD (Canvas Draw) is a platform-independent graphics library. It \ is implemented in several platforms using native graphics libraries: Microsoft \ Windows (GDI) and X-Windows (XLIB). The library contains functions to support both vector and image applications, \ and the visualization surface can be either a window or a more abstract \ surface, such as Image, Clipboard, Metafile, PS, and so on." HOMEPAGE="http://www.tecgraf.puc-rio.br/cd/" COPYRIGHT="1994-2019 Tecgraf, PUC-Rio." LICENSE="MIT" REVISION="3" SOURCE_URI="https://sourceforge.net/projects/canvasdraw/files/$portVersion/Docs%20and%20Sources/cd-${portVersion}_Sources.zip" # They have a tar.gz but the permissions are broken inside it (will create unreadable files) CHECKSUM_SHA256="288fe4decd2100b2d5fad8ba4081837b492c2ce380e86dcfcd5a4c9ee1458e60" SOURCE_DIR="cd" PATCHES="cd-$portVersion.patchset" ARCHITECTURES="all" SECONDARY_ARCHITECTURES="x86" PROVIDES=" cd$secondaryArchSuffix = $portVersion lib:libcd$secondaryArchSuffix = $portVersion lib:libcdcontextplus$secondaryArchSuffix = $portVersion lib:libcdgl$secondaryArchSuffix = $portVersion lib:libcdim$secondaryArchSuffix = $portVersion lib:libcdlua51$secondaryArchSuffix = $portVersion lib:libcdluacontextplus51$secondaryArchSuffix = $portVersion lib:libcdluagl51$secondaryArchSuffix = $portVersion lib:libcdluaim51$secondaryArchSuffix = $portVersion lib:libcdluapdf51$secondaryArchSuffix = $portVersion lib:libcdpdf$secondaryArchSuffix = $portVersion lib:libpdflib$secondaryArchSuffix = $portVersion " REQUIRES=" haiku$secondaryArchSuffix lib:libfontconfig$secondaryArchSuffix lib:libfreetype$secondaryArchSuffix lib:libftgl$secondaryArchSuffix lib:libGL$secondaryArchSuffix lib:libGLU$secondaryArchSuffix lib:libim$secondaryArchSuffix lib:libpng16$secondaryArchSuffix lib:libxml2$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_devel=" cd${secondaryArchSuffix}_devel = $portVersion devel:libcd$secondaryArchSuffix = $portVersion devel:libcdcontextplus$secondaryArchSuffix = $portVersion devel:libcdgl$secondaryArchSuffix = $portVersion devel:libcdim$secondaryArchSuffix = $portVersion devel:libcdlua51$secondaryArchSuffix = $portVersion devel:libcdluacontextplus51$secondaryArchSuffix = $portVersion devel:libcdluagl51$secondaryArchSuffix = $portVersion devel:libcdluaim51$secondaryArchSuffix = $portVersion devel:libcdluapdf51$secondaryArchSuffix = $portVersion devel:libcdpdf$secondaryArchSuffix = $portVersion devel:libpdflib$secondaryArchSuffix = $portVersion " REQUIRES_devel=" cd$secondaryArchSuffix == $portVersion base " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libfontconfig$secondaryArchSuffix devel:libfreetype$secondaryArchSuffix devel:libftgl$secondaryArchSuffix devel:libgl$secondaryArchSuffix devel:libglu$secondaryArchSuffix devel:libiconv$secondaryArchSuffix devel:libim$secondaryArchSuffix devel:liblua$secondaryArchSuffix devel:libxml2$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:as$secondaryArchSuffix cmd:gcc$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix cmd:which " BUILD() { cd src make LINK_FREETYPE=Yes LINK_ZLIB=Yes cd .. } INSTALL() { mkdir -p $developLibDir mkdir -p $libDir mkdir -p $includeDir cp lib/Haiku11/Lua51/* $libDir rm -rf lib/Haiku11/Lua51 cp -r lib/Haiku11/* $libDir rm -f $libDir/*.a cp include/* $includeDir prepareInstalledDevelLibs libcd libcdgl libcdim libcdlua51 libcdluagl51 \ libcdluaim51 libcdluapdf51 libcdpdf libpdflib \ libcdcontextplus libcdluacontextplus51 packageEntries devel $developDir } TEST() { export PKG_CONFIG_PATH=`finddir B_SYSTEM_DEVELOP_DIRECTORY`/lib$secondaryArchSubDir/pkgconfig # Make sure the tests can link against the built libs mkdir -p bin/Haiku11 ln -sf ../../lib/Haiku11 bin/Haiku11/lib cd test make -f ../tecmake.mak MF=metafile ../bin/Haiku11/metafile # needs IUP #make -f ../tecmake.mak MF=screencapture #../bin/Haiku11/screencapture # needs IUP #pushd cdtest #make -f ../../tecmake.mak #popd #../bin/Haiku11/cdtest }