diff --git a/media-libs/im/im-3.12.recipe b/media-libs/im/im-3.12.recipe new file mode 100644 index 000000000..ab99de8f0 --- /dev/null +++ b/media-libs/im/im-3.12.recipe @@ -0,0 +1,134 @@ +SUMMARY="A toolkit for digital imaging" +DESCRIPTION="IM is a toolkit for Digital Imaging. IM is based on 4 concepts: \ +Image Representation, Storage, Processing and Capture. Image Visualization is \ +a task that it is left for a graphics library. +It provides support for image capture, several image file formats and many \ +image processing operations. The most popular file formats are supported: \ +TIFF, BMP, PNG, JPEG, GIF and AVI. + +Image representation includes scientific data types (like IEEE floating point \ +data) and attributes (or metadata like GeoTIFF and Exif tags). Animation, \ +video and volumes are supported as image sequences, but there is no digital \ +audio support. + +The main goal of the library is to provide a simple API and abstraction of \ +images for scientific applications. +The toolkit API is written in C. The core library source code is implemented \ +in C++ and it is very portable, it can be compiled in Windows and UNIX with no \ +modifications. New image processing operations can be implemented in C or in \ +C++. + +IM is free software, can be used for public and commercial applications." +HOMEPAGE="http://www.tecgraf.puc-rio.br/im/" +COPYRIGHT="1994-2016 Tecgraf, PUC-Rio." +LICENSE="MIT" +REVISION="1" +SOURCE_URI="http://freefr.dl.sourceforge.net/project/imtoolkit/$portVersion/Docs%20and%20Sources/im-${portVersion}_Sources.tar.gz" +CHECKSUM_SHA256="999ff1a6aa305c4ed5a4ba830266a7aac8737def7f7d4010c398fd4ecddfac9f" +SOURCE_DIR="im" +PATCHES="im-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + im$secondaryArchSuffix = $portVersion + lib:libim$secondaryArchSuffix = $portVersion + lib:libim_fftw$secondaryArchSuffix = $portVersion + lib:libim_jp2$secondaryArchSuffix = $portVersion + lib:libim_process$secondaryArchSuffix = $portVersion + lib:libim_process_omp$secondaryArchSuffix = $portVersion + lib:libim_lzo$secondaryArchSuffix = $portVersion + lib:libimlua51$secondaryArchSuffix = $portVersion + lib:libimlua52$secondaryArchSuffix = $portVersion + lib:libimlua_fftw51$secondaryArchSuffix = $portVersion + lib:libimlua_fftw52$secondaryArchSuffix = $portVersion + lib:libimlua_jp251$secondaryArchSuffix = $portVersion + lib:libimlua_jp252$secondaryArchSuffix = $portVersion + lib:libimlua_process51$secondaryArchSuffix = $portVersion + lib:libimlua_process52$secondaryArchSuffix = $portVersion + lib:libimlua_process_omp51$secondaryArchSuffix = $portVersion + lib:libimlua_process_omp52$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libpng$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + im${secondaryArchSuffix}_devel = $portVersion + devel:libim$secondaryArchSuffix = $portVersion + devel:libim_fftw$secondaryArchSuffix = $portVersion + devel:libim_jp2$secondaryArchSuffix = $portVersion + devel:libim_process$secondaryArchSuffix = $portVersion + devel:libim_process_omp$secondaryArchSuffix = $portVersion + devel:libim_lzo$secondaryArchSuffix = $portVersion + devel:libimlua51$secondaryArchSuffix = $portVersion + devel:libimlua52$secondaryArchSuffix = $portVersion + devel:libimlua_fftw51$secondaryArchSuffix = $portVersion + devel:libimlua_fftw52$secondaryArchSuffix = $portVersion + devel:libimlua_jp251$secondaryArchSuffix = $portVersion + devel:libimlua_jp252$secondaryArchSuffix = $portVersion + devel:libimlua_process51$secondaryArchSuffix = $portVersion + devel:libimlua_process52$secondaryArchSuffix = $portVersion + devel:libimlua_process_omp51$secondaryArchSuffix = $portVersion + devel:libimlua_process_omp52$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + im$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + devel:liblua$secondaryArchSuffix >= 5.1 + devel:libpng$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 +} + +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 libim libim_fftw libim_jp2 libim_process \ + libim_process_omp libim_lzo libimlua51 libimlua_fftw51 libimlua_jp251 \ + libimlua_process51 libimlua_process_omp51 + + packageEntries devel $developDir +} + +TEST() +{ + ln -s ../../lib/Haiku11 bin/Haiku11/lib + cd test + make -f ../tecmake.mak MF=im_info + ! ../bin/Haiku11/im_info `finddir B_SYSTEM_DEVELOP_DIRECTORY`/sample-code/pdflib/data/nesrin.jpg + + make -f ../tecmake.mak MF=im_copy + ! ../bin/Haiku11/im_copy `finddir B_SYSTEM_DEVELOP_DIRECTORY`/sample-code/pdflib/data/nesrin.jpg nesrin.jpg + + # Requires cd and iup. + # make -f ../tecmake.mak MF=im_view + # ../bin/Haiku11/im_view +} diff --git a/media-libs/im/patches/im-3.12.patchset b/media-libs/im/patches/im-3.12.patchset new file mode 100644 index 000000000..afef2e36c --- /dev/null +++ b/media-libs/im/patches/im-3.12.patchset @@ -0,0 +1,77 @@ +From 6fc315d7bfc3b81ebed530f8a6e98e34eba98d8b Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 26 Dec 2018 14:18:48 +0100 +Subject: Add soname for libraries on Haiku + + +diff --git a/tecmake.mak b/tecmake.mak +index 25250b6..e57849c 100755 +--- a/tecmake.mak ++++ b/tecmake.mak +@@ -634,6 +634,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 +-- +2.19.1 + + +From 88d962a815a20217445a2e0c3c043ecbef8b9835 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 26 Dec 2018 14:46:21 +0100 +Subject: Avoid types conflicts in libjasper + + +diff --git a/src/im_jp2.mak b/src/im_jp2.mak +index 49daa8e..50ce27b 100755 +--- a/src/im_jp2.mak ++++ b/src/im_jp2.mak +@@ -44,6 +44,10 @@ else + DEFINES += HAVE_UNISTD_H JAS_TYPES + endif + ++ifneq ($(findstring Haiku, $(TEC_UNAME)), ) ++ DEFINES += HAVE_STDINT_H ++endif ++ + ifneq ($(findstring MacOS, $(TEC_UNAME)), ) + ifneq ($(TEC_SYSMINOR), 4) + BUILD_DYLIB=Yes +-- +2.19.1 + + +From c3f504fdbd25945d5696b179d6e9b6c9c60e9f94 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 26 Dec 2018 14:58:28 +0100 +Subject: Force Lua search path for Haiku + + +diff --git a/tecmake.mak b/tecmake.mak +index e57849c..98297f4 100755 +--- a/tecmake.mak ++++ b/tecmake.mak +@@ -1010,7 +1010,11 @@ 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 +