From 4d9f9ee421750d62261b7b3e95bd9053d3b235e2 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 26 Dec 2018 23:11:06 +0100 Subject: [PATCH] Import Tecgraf patched version of FTGL --- media-libs/ftgl/ftgl-2.1.5.recipe | 77 +++++++++++++++++++++ media-libs/ftgl/patches/ftgl-2.1.5.patchset | 50 +++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 media-libs/ftgl/ftgl-2.1.5.recipe create mode 100644 media-libs/ftgl/patches/ftgl-2.1.5.patchset diff --git a/media-libs/ftgl/ftgl-2.1.5.recipe b/media-libs/ftgl/ftgl-2.1.5.recipe new file mode 100644 index 000000000..ae1594b34 --- /dev/null +++ b/media-libs/ftgl/ftgl-2.1.5.recipe @@ -0,0 +1,77 @@ +SUMMARY="Library to use arbitrary fonts in OpenGL applications" +DESCRIPTION="FTGL is a free cross-platform Open Source C++ library that uses \ +Freetype2 to simplify rendering fonts in OpenGL applications." +HOMEPAGE="https://sourceforge.net/projects/ftgl" +COPYRIGHT="2001-2004 Unicode, Inc. + 2001-2009 Henry Maddocks" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://sourceforge.net/projects/canvasdraw/files/5.11.1/Docs%20and%20Sources/ftgl-${portVersion}_Sources.tar.gz" +CHECKSUM_SHA256="690a7f80375846765f5cbbc10d0d859bfb62281441ff5878f818ced447fca763" +SOURCE_DIR="ftgl" +PATCHES="ftgl-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + ftgl$secondaryArchSuffix = $portVersion compat >= 2 + lib:libftgl$secondaryArchSuffix = 2.1.3 compat >= 2 + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libbz2$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix + lib:libgl$secondaryArchSuffix + lib:libglu$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + ftgl${secondaryArchSuffix}_devel = $portVersion compat >= 1 + devel:libftgl$secondaryArchSuffix = 2.1.3 compat >= 2 + " +REQUIRES_devel=" + ftgl$secondaryArchSuffix == $portVersion base + devel:libfreetype$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libfreetype$secondaryArchSuffix + devel:libgl$secondaryArchSuffix + devel:libglu$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:g++$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + mkdir -p $libDir + mkdir -p $includeDir + cp lib/Haiku11/*.so $libDir + cp -r include/FTGL $includeDir + + + prepareInstalledDevelLibs libftgl + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir +} diff --git a/media-libs/ftgl/patches/ftgl-2.1.5.patchset b/media-libs/ftgl/patches/ftgl-2.1.5.patchset new file mode 100644 index 000000000..2b364b309 --- /dev/null +++ b/media-libs/ftgl/patches/ftgl-2.1.5.patchset @@ -0,0 +1,50 @@ +From 8bc6c0a5f5bfdb168dc42754b0b5750cccf24dbf Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 26 Dec 2018 23:07:26 +0100 +Subject: Import fixed version of tecmake. + + +diff --git a/tecmake.mak b/tecmake.mak +index 25250b6..2b6c850 100755 +--- a/tecmake.mak ++++ b/tecmake.mak +@@ -568,6 +568,10 @@ ifneq ($(findstring MacOS, $(TEC_UNAME)), ) + FREETYPE_INC := /sw/include/freetype2 + endif + ++ifneq ($(findstring Haiku, $(TEC_UNAME)), ) ++ FREETYPE_INC := $(shell pkg-config --cflags-only-I freetype2 | cut -b 3-) ++endif ++ + # Definitions for GTK + ifdef GTK_BASE + GTK := $(GTK_BASE) +@@ -634,6 +638,11 @@ ifneq ($(findstring CentOS, $(TEC_UNAME)), ) + endif + endif + ++ifneq ($(findstring Haiku, $(TEC_UNAME)), ) ++ UNIX_POSIX = Yes ++ STDLDFLAGS := -shared -Wl,-soname=lib$(TARGETNAME).so ++endif ++ + ifneq ($(findstring IRIX, $(TEC_UNAME)), ) + UNIX_POSIX = Yes + ifndef NO_LOCAL_LD +@@ -1005,7 +1014,12 @@ ifdef USE_LUA + endif + endif + +- LUA_INC ?= $(LUA)/include ++ ifneq ($(findstring Haiku, $(TEC_UNAME)), ) ++ LUA_INC ?= /system/develop/headers/lua5.1 ++ else ++ LUA_INC ?= $(LUA)/include ++ endif ++ + INCLUDES += $(LUA_INC) + + LUA_BIN ?= $(LUA)/bin/$(TEC_UNAME) +-- +2.19.1 +