mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
im: add tests and some extra fixes
- Use system zlib - Link tests dynamically with the libs
This commit is contained in:
@@ -50,9 +50,6 @@ BUILD()
|
||||
{
|
||||
cd src
|
||||
make
|
||||
|
||||
# The build system rebuilds libz, but let's use the system one.
|
||||
rm ../lib/Haiku11/libz.*
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
@@ -72,6 +69,21 @@ INSTALL()
|
||||
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
|
||||
}
|
||||
|
||||
PROVIDES_devel="
|
||||
im${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libim$secondaryArchSuffix = $portVersion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 8fa357e184a5b8892e9355a85368803dde4f7d01 Mon Sep 17 00:00:00 2001
|
||||
From 40fa92950357dfe54b1daf2306dda354110f26ef Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Thu, 14 Nov 2013 21:46:53 +0100
|
||||
Subject: Make tecmake aware of Haiku and the lack of libm.
|
||||
@@ -60,3 +60,90 @@ index f799a07..c955869 100755
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 42565b425877585c937807201a9a0766f4286977 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 17 Nov 2013 13:11:00 +0100
|
||||
Subject: im: do not build zlib and use system one.
|
||||
|
||||
Also adjust the tests to look for the system zlib.
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 12153b5..11d90ed 100755
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -7,7 +7,7 @@ endif
|
||||
|
||||
.PHONY: do_all im_zlib im im_jp2 im_process im_fftw imlua3 imlua5 imlua_jp2 imlua_process5 imlua_fftw5 $(WINLIBS)
|
||||
#do_all: im im_jp2 im_process im_fftw imlua3 imlua5 imlua_jp2 imlua_process5 imlua_fftw5
|
||||
-do_all: im_zlib im im_jp2 im_process im_process_omp im_fftw imlua5 imlua_jp2 imlua_process5 imlua_process_omp5 imlua_fftw5 $(WINLIBS)
|
||||
+do_all: im im_jp2 im_process im_process_omp im_fftw imlua5 imlua_jp2 imlua_process5 imlua_process_omp5 imlua_fftw5 $(WINLIBS)
|
||||
|
||||
im_zlib:
|
||||
@$(TECMAKE_CMD) MF=im_zlib
|
||||
diff --git a/test/im_copy.mak b/test/im_copy.mak
|
||||
index 15867ee..fe4bbb5 100755
|
||||
--- a/test/im_copy.mak
|
||||
+++ b/test/im_copy.mak
|
||||
@@ -8,8 +8,6 @@ USE_IM = Yes
|
||||
|
||||
IM = ..
|
||||
|
||||
-USE_STATIC = Yes
|
||||
-
|
||||
ifneq ($(findstring Win, $(TEC_SYSNAME)), )
|
||||
LIBS = im_wmv im_avi vfw32 wmvcore
|
||||
endif
|
||||
diff --git a/test/im_info.mak b/test/im_info.mak
|
||||
index 211e7af..32aeabb 100755
|
||||
--- a/test/im_info.mak
|
||||
+++ b/test/im_info.mak
|
||||
@@ -7,5 +7,3 @@ SRC = im_info.cpp
|
||||
USE_IM = Yes
|
||||
|
||||
IM = ..
|
||||
-
|
||||
-USE_STATIC = Yes
|
||||
diff --git a/test/im_view.mak b/test/im_view.mak
|
||||
index 45e4363..66699c7 100644
|
||||
--- a/test/im_view.mak
|
||||
+++ b/test/im_view.mak
|
||||
@@ -10,5 +10,3 @@ USE_IUP3 = Yes
|
||||
USE_IM = Yes
|
||||
|
||||
IM = ..
|
||||
-
|
||||
-USE_STATIC = Yes
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 7345811a3dc6a7f47efb0c47df974ca2f8ede0d8 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 17 Nov 2013 14:19:01 +0100
|
||||
Subject: Fix off-by-one error in im_copy test.
|
||||
|
||||
|
||||
diff --git a/test/im_copy.cpp b/test/im_copy.cpp
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index f664ad2..c6d70d6
|
||||
--- a/test/im_copy.cpp
|
||||
+++ b/test/im_copy.cpp
|
||||
@@ -74,11 +74,11 @@ int main(int argc, char* argv[])
|
||||
int image_count;
|
||||
imFileGetInfo(ifile, format, compression, &image_count);
|
||||
|
||||
- ofile = imFileNew(argv[2], (argc < 3)? format: argv[3], &error);
|
||||
+ ofile = imFileNew(argv[2], (argc < 4)? format: argv[3], &error);
|
||||
if (!ofile)
|
||||
goto man_error;
|
||||
|
||||
- if (argc < 4)
|
||||
+ if (argc < 5)
|
||||
imFileSetInfo(ofile, compression);
|
||||
else
|
||||
imFileSetInfo(ofile, argv[4]);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user