diff --git a/media-libs/im/im-3.8.recipe b/media-libs/im/im-3.8.recipe new file mode 100644 index 000000000..3fca99b2d --- /dev/null +++ b/media-libs/im/im-3.8.recipe @@ -0,0 +1,102 @@ +SUMMARY="IM is a toolkit for Digital Imaging." +HOMEPAGE="http://www.tecgraf.puc-rio.br/im/" +SRC_URI="http://freefr.dl.sourceforge.net/project/imtoolkit/3.8.1/Docs%20and%20Sources/im-3.8.1_Sources.tar.gz" +CHECKSUM_MD5="7cb22f5a145463fc943198faf31c76f1" +REVISION="1" +ARCHITECTURES="x86_gcc2" +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:libimlua51$secondaryArchSuffix = $portVersion + lib:libimlua_fftw51$secondaryArchSuffix = $portVersion + lib:libimlua_jp251$secondaryArchSuffix = $portVersion + lib:libimlua_process51$secondaryArchSuffix = $portVersion + lib:libimlua_process_omp51$secondaryArchSuffix = $portVersion + + lib:libimlua52$secondaryArchSuffix = $portVersion + lib:libimlua_fftw52$secondaryArchSuffix = $portVersion + lib:libimlua_jp252$secondaryArchSuffix = $portVersion + lib:libimlua_process52$secondaryArchSuffix = $portVersion + lib:libimlua_process_omp52$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku >= $haikuVersion + lib:libz +" + +BUILD_REQUIRES=" + haiku_devel$secondaryArchSuffix >= $haikuVersion + cmd:make + cmd:gcc$secondaryArchSuffix + cmd:which + devel:liblua +" + +SOURCE_DIR="im" +PATCHES="im-3.8.patchset" +BUILD() +{ + cd src + make +} + +INSTALL() +{ + mkdir -p $developLibDir + mkdir -p $libDir + mkdir -p $includeDir + + rm lib/Haiku11/libz.* + cp lib/Haiku11/*.so $libDir + cp lib/Haiku11/*.a $developLibDir + cp include/* $includeDir + + # Won't work, the libs have no soname... +# prepareInstalledDevelLib libim +# libim libim_fftw libim_jp2 libim_process libim_process_omp \ +# libimlua51 libimlua_fftw51 libimlua_jp251 libimlua_process51 libimlua_process_omp51 \ +# libimlua52 libimlua_fftw52 libimlua_jp252 libimlua_process52 libimlua_process_omp52 + + packageEntries devel $developDir +} + +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:libimlua51$secondaryArchSuffix = $portVersion + devel:libimlua_fftw51$secondaryArchSuffix = $portVersion + devel:libimlua_jp251$secondaryArchSuffix = $portVersion + devel:libimlua_process51$secondaryArchSuffix = $portVersion + devel:libimlua_process_omp51$secondaryArchSuffix = $portVersion + + devel:libimlua52$secondaryArchSuffix = $portVersion + devel:libimlua_fftw52$secondaryArchSuffix = $portVersion + devel:libimlua_jp252$secondaryArchSuffix = $portVersion + devel:libimlua_process52$secondaryArchSuffix = $portVersion + devel:libimlua_process_omp52$secondaryArchSuffix = $portVersion +" + +LICENSE="MIT" +COPYRIGHT="1994-2012 Tecgraf, PUC-Rio." +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. +" diff --git a/media-libs/im/patches/im-3.8.patchset b/media-libs/im/patches/im-3.8.patchset new file mode 100644 index 000000000..05772cb31 --- /dev/null +++ b/media-libs/im/patches/im-3.8.patchset @@ -0,0 +1,40 @@ +From 25622aa79bc39c13f2d8f55a6a0572e34d06b962 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Thu, 14 Nov 2013 21:46:53 +0100 +Subject: Make tecmake aware of Haiku and the lack of libm. + + +diff --git a/tec_uname b/tec_uname +index cc89349..fc982e0 100755 +--- a/tec_uname ++++ b/tec_uname +@@ -148,6 +148,11 @@ ComputeSystemPaths() + + TEC_SYSTEM_INC=/usr/include + ++ if [ $TEC_SYSNAME == Haiku ]; then ++ TEC_SYSTEM_LIB=`finddir B_SYSTEM_LIB_DIRECTORY` ++ TEC_SYSTEM_INC=`finddir B_SYSTEM_HEADERS_DIRECTORY` ++ fi ++ + TEC_LUA_LIB=$TEC_SYSTEM_LIB/lua/$LUA_VER + } + +diff --git a/tecmake.mak b/tecmake.mak +index f799a07..f317af2 100755 +--- a/tecmake.mak ++++ b/tecmake.mak +@@ -1177,7 +1177,9 @@ ifdef USE_X11 + STDINCS += $(X11_INC) + endif + +-LIBS += m ++ifneq "$(TEC_SYSNAME)" "Haiku" ++ LIBS += m ++endif + + ifneq ($(findstring cygw, $(TEC_UNAME)), ) + WIN_OTHER := Yes +-- +1.8.3.4 +