mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
cd: update to latest version.
This commit is contained in:
142
x11-libs/cd/cd-5.11.1.recipe
Normal file
142
x11-libs/cd/cd-5.11.1.recipe
Normal file
@@ -0,0 +1,142 @@
|
||||
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-2017 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"
|
||||
SOURCE_DIR="cd"
|
||||
PATCHES="cd-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2"
|
||||
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: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: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: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:libpdflib$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
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="
|
||||
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/Lua51/* $libDir
|
||||
rm -rf lib/Haiku11/Lua51
|
||||
cp -r lib/Haiku11/* $libDir
|
||||
|
||||
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
|
||||
}
|
||||
160
x11-libs/cd/patches/cd-5.11.1.patchset
Normal file
160
x11-libs/cd/patches/cd-5.11.1.patchset
Normal file
@@ -0,0 +1,160 @@
|
||||
From a09ed0651077bbf6955e2bc9f36d768185a770e8 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 26 Dec 2018 18:27:16 +0100
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/src/cd_util.c b/src/cd_util.c
|
||||
index f2b13fe..f733a32 100644
|
||||
--- a/src/cd_util.c
|
||||
+++ b/src/cd_util.c
|
||||
@@ -824,14 +824,17 @@ int cdStrTmpFileName(char* filename)
|
||||
strcpy(filename, tmp);
|
||||
free(tmp);
|
||||
#else
|
||||
+ {
|
||||
char* dirname = getenv("TMPDIR");
|
||||
+ int fd;
|
||||
if (!dirname) dirname = "/tmp";
|
||||
strcpy(filename, dirname);
|
||||
strcat(filename, "/~cdXXXXXX");
|
||||
- int fd = mkstemp(filename);
|
||||
+ fd = mkstemp(filename);
|
||||
if (fd == -1)
|
||||
return 0;
|
||||
close(fd);
|
||||
+ }
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 5f875cc7dd2f980d6f1dd1992a246b776a682740 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 26 Dec 2018 18:27:41 +0100
|
||||
Subject: Do not link xrender on Haiku
|
||||
|
||||
|
||||
diff --git a/src/cdcontextplus.mak b/src/cdcontextplus.mak
|
||||
index 2ddfe52..40b00a8 100644
|
||||
--- a/src/cdcontextplus.mak
|
||||
+++ b/src/cdcontextplus.mak
|
||||
@@ -20,11 +20,13 @@ else
|
||||
CHECK_GTK = Yes
|
||||
SRC = cairo/cdcairoplus.c
|
||||
else
|
||||
- CHECK_XRENDER = Yes
|
||||
- SRC = xrender/cdxrender.c xrender/cdxrplus.c
|
||||
- LIBS = Xrender Xft
|
||||
- USE_X11 = Yes
|
||||
- INCLUDES += x11
|
||||
+ ifeq ($(findstring Haiku, $(TEC_SYSNAME)), )
|
||||
+ CHECK_XRENDER = Yes
|
||||
+ SRC = xrender/cdxrender.c xrender/cdxrplus.c
|
||||
+ LIBS = Xrender Xft
|
||||
+ USE_X11 = Yes
|
||||
+ INCLUDES += x11
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
diff --git a/src/cdluacontextplus5.mak b/src/cdluacontextplus5.mak
|
||||
index ee08381..f8a62e4 100644
|
||||
--- a/src/cdluacontextplus5.mak
|
||||
+++ b/src/cdluacontextplus5.mak
|
||||
@@ -12,10 +12,12 @@ LIBS = cdcontextplus
|
||||
ifneq ($(findstring Win, $(TEC_SYSNAME)), )
|
||||
CHECK_GDIPLUS = Yes
|
||||
else
|
||||
- ifdef GTK_DEFAULT
|
||||
- CHECK_GTK = Yes
|
||||
- else
|
||||
- CHECK_XRENDER = Yes
|
||||
+ ifeq ($(findstring Haiku, $(TEC_SYSNAME)), )
|
||||
+ ifdef GTK_DEFAULT
|
||||
+ CHECK_GTK = Yes
|
||||
+ else
|
||||
+ CHECK_XRENDER = Yes
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From a99cbd0311bb58b3c0aa43046b44319b2bff7c49 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 26 Dec 2018 18:28:05 +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
|
||||
--- a/src/config.mak
|
||||
+++ b/src/config.mak
|
||||
@@ -127,6 +127,7 @@ else
|
||||
LIBS += fontconfig
|
||||
endif
|
||||
else ifdef USE_HAIKU
|
||||
+ DEFINES += USE_ICONV
|
||||
SRC += $(SRCHAIKU) $(SRCNULL)
|
||||
LIBS += fontconfig
|
||||
else
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 99caf3836e43cc74465fb38c33665d9620029577 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 26 Dec 2018 18:29:19 +0100
|
||||
Subject: Adjust search paths for Haiku
|
||||
|
||||
|
||||
diff --git a/tecmake.mak b/tecmake.mak
|
||||
index 25250b6..5d9f9ea 100644
|
||||
--- 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 ?= $(shell pkg-config --cflags-only-I lua | cut -b 3-)
|
||||
+ else
|
||||
+ LUA_INC ?= $(LUA)/include
|
||||
+ endif
|
||||
+
|
||||
INCLUDES += $(LUA_INC)
|
||||
|
||||
LUA_BIN ?= $(LUA)/bin/$(TEC_UNAME)
|
||||
--
|
||||
2.19.1
|
||||
|
||||
Reference in New Issue
Block a user