diff --git a/x11-libs/cd/cd-5.11.1.recipe b/x11-libs/cd/cd-5.12.recipe similarity index 96% rename from x11-libs/cd/cd-5.11.1.recipe rename to x11-libs/cd/cd-5.12.recipe index 5858a2e5c..3b9985222 100644 --- a/x11-libs/cd/cd-5.11.1.recipe +++ b/x11-libs/cd/cd-5.12.recipe @@ -6,15 +6,15 @@ 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-2017 Tecgraf, PUC-Rio." +COPYRIGHT="1994-2019 Tecgraf, PUC-Rio." LICENSE="MIT" REVISION="1" 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="88999f6703217f5b25d158fe2d2c9d351079b2310335afb5fadd311f334517df" +CHECKSUM_SHA256="288fe4decd2100b2d5fad8ba4081837b492c2ce380e86dcfcd5a4c9ee1458e60" SOURCE_DIR="cd" PATCHES="cd-$portVersion.patchset" -ARCHITECTURES="x86_gcc2" +ARCHITECTURES="x86_gcc2 ?x86 x86_64" SECONDARY_ARCHITECTURES="x86" PROVIDES=" @@ -51,7 +51,6 @@ REQUIRES=" PROVIDES_devel=" cd${secondaryArchSuffix}_devel = $portVersion - devel:libcd$secondaryArchSuffix = $portVersion devel:libcdcontextplus$secondaryArchSuffix = $portVersion devel:libcdgl$secondaryArchSuffix = $portVersion @@ -71,6 +70,7 @@ PROVIDES_devel=" " BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel devel:libfontconfig$secondaryArchSuffix devel:libfreetype$secondaryArchSuffix devel:libftgl$secondaryArchSuffix @@ -83,7 +83,6 @@ BUILD_REQUIRES=" devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" - haiku${secondaryArchSuffix}_devel cmd:as$secondaryArchSuffix cmd:gcc$secondaryArchSuffix cmd:make diff --git a/x11-libs/cd/cd-5.8.recipe b/x11-libs/cd/cd-5.8.recipe deleted file mode 100644 index 2a61eed95..000000000 --- a/x11-libs/cd/cd-5.8.recipe +++ /dev/null @@ -1,137 +0,0 @@ -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-2014 Tecgraf, PUC-Rio." -LICENSE="MIT" -REVISION="1" -SOURCE_URI="http://heanet.dl.sourceforge.net/project/canvasdraw/$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="533facb78db1638028740da472352a51d766518b8ab925ebd4c3ca90eb1cbb8e" -SOURCE_DIR="cd" -PATCHES="cd-5.8.patchset" - -ARCHITECTURES="x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - cd$secondaryArchSuffix = $portVersion - lib:libcd$secondaryArchSuffix = $portVersion - lib:libcdcontextplus$secondaryArchSuffix = $portVersion - lib:libcdgl$secondaryArchSuffix = $portVersion - lib:libcdlua51$secondaryArchSuffix = $portVersion - lib:libcdlua52$secondaryArchSuffix = $portVersion - lib:libcdluacontextplus51$secondaryArchSuffix = $portVersion - lib:libcdluacontextplus52$secondaryArchSuffix = $portVersion - lib:libcdluagl51$secondaryArchSuffix = $portVersion - lib:libcdluagl52$secondaryArchSuffix = $portVersion - lib:libcdluaim51$secondaryArchSuffix = $portVersion - lib:libcdluaim52$secondaryArchSuffix = $portVersion - lib:libcdluapdf51$secondaryArchSuffix = $portVersion - lib:libcdluapdf52$secondaryArchSuffix = $portVersion - lib:libcdpdf$secondaryArchSuffix = $portVersion - lib:libftgl$secondaryArchSuffix = $portVersion - lib:libpdflib$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libfontconfig$secondaryArchSuffix - lib:libfreetype$secondaryArchSuffix - lib:libGL$secondaryArchSuffix - lib:libGLU$secondaryArchSuffix - lib:libim$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:libcdlua51$secondaryArchSuffix = $portVersion - devel:libcdlua52$secondaryArchSuffix = $portVersion - devel:libcdluacontextplus51$secondaryArchSuffix = $portVersion - devel:libcdluacontextplus52$secondaryArchSuffix = $portVersion - devel:libcdluagl51$secondaryArchSuffix = $portVersion - devel:libcdluagl52$secondaryArchSuffix = $portVersion - devel:libcdluaim51$secondaryArchSuffix = $portVersion - devel:libcdluaim52$secondaryArchSuffix = $portVersion - devel:libcdluapdf51$secondaryArchSuffix = $portVersion - devel:libcdluapdf52$secondaryArchSuffix = $portVersion - devel:libcdpdf$secondaryArchSuffix = $portVersion - devel:libftgl$secondaryArchSuffix = $portVersion - devel:libpdflib$secondaryArchSuffix = $portVersion - " - -BUILD_REQUIRES=" - devel:libfontconfig$secondaryArchSuffix - devel:libfreetype$secondaryArchSuffix - devel:libgl$secondaryArchSuffix - devel:libglu$secondaryArchSuffix - devel:libiconv$secondaryArchSuffix - devel:libim$secondaryArchSuffix - devel:liblua$secondaryArchSuffix - devel:libxml2$secondaryArchSuffix - devel:libz$secondaryArchSuffix - " -BUILD_PREREQUIRES=" - haiku${secondaryArchSuffix}_devel - 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/* $libDir - cp include/* $includeDir - - prepareInstalledDevelLibs libcd libcdgl libcdlua51 libcdlua52 libcdluagl51 \ - libcdluagl52 libcdluaim51 libcdluaim52 libcdluapdf51 libcdluapdf52 \ - libcdpdf libftgl libpdflib libcdcontextplus libcdluacontextplus51 \ - libcdluacontextplus52 - - 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 -} diff --git a/x11-libs/cd/patches/cd-5.11.1.patchset b/x11-libs/cd/patches/cd-5.12.patchset similarity index 76% rename from x11-libs/cd/patches/cd-5.11.1.patchset rename to x11-libs/cd/patches/cd-5.12.patchset index cddabefd6..354c79d22 100644 --- a/x11-libs/cd/patches/cd-5.11.1.patchset +++ b/x11-libs/cd/patches/cd-5.12.patchset @@ -1,21 +1,21 @@ -From a09ed0651077bbf6955e2bc9f36d768185a770e8 Mon Sep 17 00:00:00 2001 +From 0b0590688b815e88cb019d4b807519f689024534 Mon Sep 17 00:00:00 2001 From: Adrien Destugues -Date: Wed, 26 Dec 2018 18:27:16 +0100 +Date: Thu, 21 Feb 2019 16:46:08 +0100 Subject: gcc2 fixes diff --git a/src/cd_util.c b/src/cd_util.c -index f2b13fe..f733a32 100644 +index 80d38f1..b5b5759 100644 --- a/src/cd_util.c +++ b/src/cd_util.c -@@ -824,14 +824,17 @@ int cdStrTmpFileName(char* filename) - strcpy(filename, tmp); +@@ -841,12 +841,13 @@ int cdStrTmpFileName(char* filename) free(tmp); #else -+ { char* dirname = getenv("TMPDIR"); + int fd; if (!dirname) dirname = "/tmp"; + if (strlen(dirname) >= 10240-10) + return 0; strcpy(filename, dirname); strcat(filename, "/~cdXXXXXX"); - int fd = mkstemp(filename); @@ -23,22 +23,18 @@ index f2b13fe..f733a32 100644 if (fd == -1) return 0; close(fd); -+ } - #endif - return 1; - } -- 2.19.1 -From 5f875cc7dd2f980d6f1dd1992a246b776a682740 Mon Sep 17 00:00:00 2001 +From b7443a55907fdd203c44938dcdc98c31de2c7ba0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues -Date: Wed, 26 Dec 2018 18:27:41 +0100 +Date: Thu, 21 Feb 2019 16:49:26 +0100 Subject: Do not link xrender on Haiku diff --git a/src/cdcontextplus.mak b/src/cdcontextplus.mak -index 2ddfe52..40b00a8 100644 +index 2ddfe52..76562b2 100644 --- a/src/cdcontextplus.mak +++ b/src/cdcontextplus.mak @@ -20,11 +20,13 @@ else @@ -50,7 +46,7 @@ index 2ddfe52..40b00a8 100644 - LIBS = Xrender Xft - USE_X11 = Yes - INCLUDES += x11 -+ ifeq ($(findstring Haiku, $(TEC_SYSNAME)), ) ++ ifeq ($(findstring Haiku, $(TEC_SYSNAME)), ) + CHECK_XRENDER = Yes + SRC = xrender/cdxrender.c xrender/cdxrplus.c + LIBS = Xrender Xft @@ -85,18 +81,19 @@ index ee08381..f8a62e4 100644 2.19.1 -From a99cbd0311bb58b3c0aa43046b44319b2bff7c49 Mon Sep 17 00:00:00 2001 +From 8c677268d4272342681450c25996093d70acf1d0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues -Date: Wed, 26 Dec 2018 18:28:05 +0100 +Date: Thu, 21 Feb 2019 16:51:58 +0100 Subject: Use iconv on Haiku The fallback is glib, which we prefer to avoid. + diff --git a/src/config.mak b/src/config.mak -index 41af3ad..e4fe78a 100644 +index f382141..7a29b8b 100644 --- a/src/config.mak +++ b/src/config.mak -@@ -127,6 +127,7 @@ else +@@ -134,6 +134,7 @@ else LIBS += fontconfig endif else ifdef USE_HAIKU @@ -108,17 +105,17 @@ index 41af3ad..e4fe78a 100644 2.19.1 -From 99caf3836e43cc74465fb38c33665d9620029577 Mon Sep 17 00:00:00 2001 +From 696f47e419a7a92e528bbe2f2367773fcca0038f Mon Sep 17 00:00:00 2001 From: Adrien Destugues -Date: Wed, 26 Dec 2018 18:29:19 +0100 +Date: Thu, 21 Feb 2019 16:56:04 +0100 Subject: Adjust search paths for Haiku diff --git a/tecmake.mak b/tecmake.mak -index 25250b6..5d9f9ea 100644 +index 524b7ec..a599c3d 100644 --- a/tecmake.mak +++ b/tecmake.mak -@@ -568,6 +568,10 @@ ifneq ($(findstring MacOS, $(TEC_UNAME)), ) +@@ -582,6 +582,10 @@ ifneq ($(findstring MacOS, $(TEC_UNAME)), ) FREETYPE_INC := /sw/include/freetype2 endif @@ -129,7 +126,7 @@ index 25250b6..5d9f9ea 100644 # Definitions for GTK ifdef GTK_BASE GTK := $(GTK_BASE) -@@ -634,6 +638,11 @@ ifneq ($(findstring CentOS, $(TEC_UNAME)), ) +@@ -653,6 +657,11 @@ ifneq ($(findstring CentOS, $(TEC_UNAME)), ) endif endif @@ -141,7 +138,7 @@ index 25250b6..5d9f9ea 100644 ifneq ($(findstring IRIX, $(TEC_UNAME)), ) UNIX_POSIX = Yes ifndef NO_LOCAL_LD -@@ -1005,7 +1014,12 @@ ifdef USE_LUA +@@ -1043,7 +1052,12 @@ ifdef USE_LUA endif endif diff --git a/x11-libs/cd/patches/cd-5.8.patchset b/x11-libs/cd/patches/cd-5.8.patchset deleted file mode 100644 index d9232562b..000000000 --- a/x11-libs/cd/patches/cd-5.8.patchset +++ /dev/null @@ -1,155 +0,0 @@ -From 91afb00aa32c3ade14ac016cde0be56c2ca5dab2 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 26 Sep 2014 12:46:46 +0200 -Subject: Don't build X11 things on Haiku. - - -diff --git a/src/cdcontextplus.mak b/src/cdcontextplus.mak -index 469fc28..feeb2dd 100644 ---- a/src/cdcontextplus.mak -+++ b/src/cdcontextplus.mak -@@ -13,17 +13,21 @@ ifneq ($(findstring Win, $(TEC_SYSNAME)), ) - LIBS = gdiplus - CHECK_GDIPLUS = Yes - else -- SRC = xrender/cdxrender.c xrender/cdxrplus.c -- -- LIBS = Xrender Xft -- USE_X11 = Yes -- CHECK_XRENDER = Yes -+ ifneq ($(findstring Haiku, $(TEC_SYSNAME)), ) -+ INCLUDES = . sim freetype2 -+ else -+ SRC = xrender/cdxrender.c xrender/cdxrplus.c -+ -+ LIBS = Xrender Xft -+ USE_X11 = Yes -+ CHECK_XRENDER = Yes - -- ifdef GTK_DEFAULT -- CD_SUFFIX := x11 -- endif -+ ifdef GTK_DEFAULT -+ CD_SUFFIX := x11 -+ endif - -- INCLUDES = . sim freetype2 x11 -+ INCLUDES = . sim freetype2 x11 -+ endif - endif - - ifneq ($(findstring MacOS, $(TEC_UNAME)), ) -diff --git a/src/cdluacontextplus5.mak b/src/cdluacontextplus5.mak -index 9f057a1..6a16096 100644 ---- a/src/cdluacontextplus5.mak -+++ b/src/cdluacontextplus5.mak -@@ -12,11 +12,15 @@ ifneq ($(findstring Win, $(TEC_SYSNAME)), ) - CHECK_GDIPLUS = Yes - LIBS = cdcontextplus - else -- ifdef GTK_DEFAULT -- CHECK_GTK = Yes -- else -- CHECK_XRENDER = Yes -+ ifneq ($(findstring Haiku, $(TEC_SYSNAME)), ) - LIBS = cdcontextplus -+ else -+ ifdef GTK_DEFAULT -+ CHECK_GTK = Yes -+ else -+ CHECK_XRENDER = Yes -+ LIBS = cdcontextplus -+ endif - endif - endif - --- -1.8.3.4 - - -From cbf7f80553b44d4fb47303d9ac2ab88ed9ad3f90 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 26 Sep 2014 12:46:59 +0200 -Subject: Haiku libraries must have a soname. - - -diff --git a/tecmake.mak b/tecmake.mak -index 14361c1..e9887f9 100644 ---- a/tecmake.mak -+++ b/tecmake.mak -@@ -539,6 +539,11 @@ ifneq ($(findstring Linux, $(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 --- -1.8.3.4 - - -From 1a1e11538197d839eb964ab0c64a39205461067f Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 26 Sep 2014 12:47:15 +0200 -Subject: GCC2 compatibility fix. - - -diff --git a/src/drv/cdgl.c b/src/drv/cdgl.c -index df2fcc6..65c8d0d 100644 ---- a/src/drv/cdgl.c -+++ b/src/drv/cdgl.c -@@ -193,6 +193,9 @@ static void cdglStrConvertToUTF8(cdCtxCanvas *ctxcanvas, const char* str, int le - } - #else - { -+ size_t ulen, utf8len; -+ char* utf8; -+ - if (cdgl_iconv == (iconv_t)-1) - { - cdglCheckUtf8Buffer(ctxcanvas, 1); -@@ -200,10 +203,10 @@ static void cdglStrConvertToUTF8(cdCtxCanvas *ctxcanvas, const char* str, int le - return; - } - -- size_t ulen = (size_t)len; -- size_t utf8len = ulen*2; -+ ulen = (size_t)len; -+ utf8len = ulen*2; - cdglCheckUtf8Buffer(ctxcanvas, utf8len); -- char* utf8 = ctxcanvas->utf8_buffer; -+ utf8 = ctxcanvas->utf8_buffer; - - iconv(cdgl_iconv, (char**)&str, &ulen, &utf8, &utf8len); - } --- -1.8.3.4 - - -From 07bc97f916f2beabf6dc11843d36ea5e51d4ceb6 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 26 Sep 2014 13:06:55 +0200 -Subject: remove cd_zlib and cd_freetype - - -diff --git a/src/Makefile b/src/Makefile -index 40c9990..7cc4fdf 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -5,7 +5,7 @@ else - endif - - .PHONY: do_all cd_zlib cd_freetype cd_ftgl cd cdx11 cdgdk cd_pdflib cdpdf cdgl cdcontextplus cdcairo cdlua3 cdluapdf3 cdluagl3 cdlua5 cdluapdf5 cdluagl5 cdluacontextplus5 cdluacairo5 cdluaim5 --do_all: cd_zlib cd_freetype cd_ftgl cd cd_pdflib cdpdf cdgl cdcontextplus cdlua5 cdluapdf5 cdluagl5 cdluacontextplus5 cdluaim5 -+do_all: cd_ftgl cd cd_pdflib cdpdf cdgl cdcontextplus cdlua5 cdluapdf5 cdluagl5 cdluacontextplus5 cdluaim5 - - cd_zlib: - @$(TECMAKE_CMD) MF=cd_zlib --- -1.8.3.4 -