leptonica-1.74.4.recipe revision 722d477e
1SUMMARY="A C library for image processing and analysis operations"
2DESCRIPTION="A powerful open source C library for efficient image processing \
3and image analysis operations. It's long list of features includes:
4* image transformations (scaling, rotation, etc.)
5* change scale and pixel depth
6* pixelwise masking, blending, and enhancement
7* can open and save standard image formats"
8HOMEPAGE="http://www.leptonica.org/"
9COPYRIGHT="2001-2012 Dan Bloomberg"
10LICENSE="BSD (2-clause)"
11REVISION="2"
12SOURCE_URI="http://www.leptonica.org/source/leptonica-$portVersion.tar.gz"
13CHECKSUM_SHA256="29c35426a416bf454413c6fec24c24a0b633e26144a17e98351b6dffaa4a833b"
14PATCHES="leptonica-$portVersion.patchset"
15
16ARCHITECTURES="x86_gcc2 x86 x86_64"
17SECONDARY_ARCHITECTURES="x86_gcc2 x86"
18
19libVersion="5.0.1"
20libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
21
22PROVIDES="
23	leptonica$secondaryArchSuffix = $portVersion
24	lib:liblept$secondaryArchSuffix = $libVersionCompat
25	"
26REQUIRES="
27	haiku$secondaryArchSuffix
28	lib:libgif$secondaryArchSuffix
29	lib:libjpeg$secondaryArchSuffix
30	lib:libpng16$secondaryArchSuffix
31	lib:libtiff$secondaryArchSuffix
32	lib:libwebp$secondaryArchSuffix
33	lib:libz$secondaryArchSuffix
34	"
35
36PROVIDES_devel="
37	leptonica${secondaryArchSuffix}_devel = $portVersion
38	devel:liblept$secondaryArchSuffix = $libVersionCompat
39	"
40REQUIRES_devel="
41	haiku$secondaryArchSuffix
42	leptonica$secondaryArchSuffix == $portVersion base
43	"
44
45PROVIDES_tools="
46	leptonica${secondaryArchSuffix}_tools = $portVersion
47	cmd:adaptmaptest$secondaryArchSuffix = $portVersion
48	cmd:adaptnorm_reg$secondaryArchSuffix = $portVersion
49	cmd:affine_reg$secondaryArchSuffix = $portVersion
50	cmd:alltests_reg$secondaryArchSuffix = $portVersion
51	cmd:alphaops_reg$secondaryArchSuffix = $portVersion
52	cmd:alphaxform_reg$secondaryArchSuffix = $portVersion
53	cmd:arithtest$secondaryArchSuffix = $portVersion
54	cmd:barcodetest$secondaryArchSuffix = $portVersion
55	cmd:baselinetest$secondaryArchSuffix = $portVersion
56	cmd:bilinear_reg$secondaryArchSuffix = $portVersion
57	cmd:binarize_reg$secondaryArchSuffix = $portVersion
58	cmd:bincompare$secondaryArchSuffix = $portVersion
59	cmd:binmorph1_reg$secondaryArchSuffix = $portVersion
60	cmd:binmorph2_reg$secondaryArchSuffix = $portVersion
61	cmd:binmorph3_reg$secondaryArchSuffix = $portVersion
62	cmd:binmorph4_reg$secondaryArchSuffix = $portVersion
63	cmd:binmorph5_reg$secondaryArchSuffix = $portVersion
64	cmd:blend2_reg$secondaryArchSuffix = $portVersion
65	cmd:blend_reg$secondaryArchSuffix = $portVersion
66	cmd:blendcmaptest$secondaryArchSuffix = $portVersion
67	cmd:blendtest1$secondaryArchSuffix = $portVersion
68	cmd:buffertest$secondaryArchSuffix = $portVersion
69	cmd:byteatest$secondaryArchSuffix = $portVersion
70	cmd:ccbordtest$secondaryArchSuffix = $portVersion
71	cmd:cctest1$secondaryArchSuffix = $portVersion
72	cmd:ccthin1_reg$secondaryArchSuffix = $portVersion
73	cmd:ccthin2_reg$secondaryArchSuffix = $portVersion
74	cmd:cmapquant_reg$secondaryArchSuffix = $portVersion
75	cmd:coloring_reg$secondaryArchSuffix = $portVersion
76	cmd:colormask_reg$secondaryArchSuffix = $portVersion
77	cmd:colormorphtest$secondaryArchSuffix = $portVersion
78	cmd:colorquant_reg$secondaryArchSuffix = $portVersion
79	cmd:colorseg_reg$secondaryArchSuffix = $portVersion
80	cmd:colorsegtest$secondaryArchSuffix = $portVersion
81	cmd:colorspacetest$secondaryArchSuffix = $portVersion
82	cmd:compare_reg$secondaryArchSuffix = $portVersion
83	cmd:comparepages$secondaryArchSuffix = $portVersion
84	cmd:comparetest$secondaryArchSuffix = $portVersion
85	cmd:compfilter_reg$secondaryArchSuffix = $portVersion
86	cmd:conncomp_reg$secondaryArchSuffix = $portVersion
87	cmd:contrasttest$secondaryArchSuffix = $portVersion
88	cmd:conversion_reg$secondaryArchSuffix = $portVersion
89	cmd:convertfilestopdf$secondaryArchSuffix = $portVersion
90	cmd:convertfilestops$secondaryArchSuffix = $portVersion
91	cmd:convertformat$secondaryArchSuffix = $portVersion
92	cmd:convertsegfilestopdf$secondaryArchSuffix = $portVersion
93	cmd:convertsegfilestops$secondaryArchSuffix = $portVersion
94	cmd:converttogray$secondaryArchSuffix = $portVersion
95	cmd:converttopdf$secondaryArchSuffix = $portVersion
96	cmd:converttops$secondaryArchSuffix = $portVersion
97	cmd:convolve_reg$secondaryArchSuffix = $portVersion
98	cmd:convolvetest$secondaryArchSuffix = $portVersion
99	cmd:cornertest$secondaryArchSuffix = $portVersion
100	cmd:croptext$secondaryArchSuffix = $portVersion
101	cmd:dewarp_reg$secondaryArchSuffix = $portVersion
102	cmd:dewarptest1$secondaryArchSuffix = $portVersion
103	cmd:dewarptest2$secondaryArchSuffix = $portVersion
104	cmd:dewarptest3$secondaryArchSuffix = $portVersion
105	cmd:digitprep1$secondaryArchSuffix = $portVersion
106	cmd:distance_reg$secondaryArchSuffix = $portVersion
107	cmd:dithertest$secondaryArchSuffix = $portVersion
108	cmd:dna_reg$secondaryArchSuffix = $portVersion
109	cmd:dwalineargen$secondaryArchSuffix = $portVersion
110	cmd:dwamorph1_reg$secondaryArchSuffix = $portVersion
111	cmd:dwamorph2_reg$secondaryArchSuffix = $portVersion
112	cmd:edgetest$secondaryArchSuffix = $portVersion
113	cmd:enhance_reg$secondaryArchSuffix = $portVersion
114	cmd:equal_reg$secondaryArchSuffix = $portVersion
115	cmd:expand_reg$secondaryArchSuffix = $portVersion
116	cmd:extrema_reg$secondaryArchSuffix = $portVersion
117	cmd:falsecolortest$secondaryArchSuffix = $portVersion
118	cmd:fcombautogen$secondaryArchSuffix = $portVersion
119	cmd:fhmtauto_reg$secondaryArchSuffix = $portVersion
120	cmd:fhmtautogen$secondaryArchSuffix = $portVersion
121	cmd:fileinfo$secondaryArchSuffix = $portVersion
122	cmd:findpattern1$secondaryArchSuffix = $portVersion
123	cmd:findpattern2$secondaryArchSuffix = $portVersion
124	cmd:findpattern3$secondaryArchSuffix = $portVersion
125	cmd:findpattern_reg$secondaryArchSuffix = $portVersion
126	cmd:flipdetect_reg$secondaryArchSuffix = $portVersion
127	cmd:flipselgen$secondaryArchSuffix = $portVersion
128	cmd:fmorphauto_reg$secondaryArchSuffix = $portVersion
129	cmd:fmorphautogen$secondaryArchSuffix = $portVersion
130	cmd:fpix_reg$secondaryArchSuffix = $portVersion
131	cmd:fpixcontours$secondaryArchSuffix = $portVersion
132	cmd:gammatest$secondaryArchSuffix = $portVersion
133	cmd:genfonts$secondaryArchSuffix = $portVersion
134	cmd:gifio_reg$secondaryArchSuffix = $portVersion
135	cmd:graphicstest$secondaryArchSuffix = $portVersion
136	cmd:grayfill_reg$secondaryArchSuffix = $portVersion
137	cmd:graymorph1_reg$secondaryArchSuffix = $portVersion
138	cmd:graymorph2_reg$secondaryArchSuffix = $portVersion
139	cmd:graymorphtest$secondaryArchSuffix = $portVersion
140	cmd:grayquant_reg$secondaryArchSuffix = $portVersion
141	cmd:hardlight_reg$secondaryArchSuffix = $portVersion
142	cmd:heap_reg$secondaryArchSuffix = $portVersion
143	cmd:histotest$secondaryArchSuffix = $portVersion
144	cmd:inserttest$secondaryArchSuffix = $portVersion
145	cmd:ioformats_reg$secondaryArchSuffix = $portVersion
146	cmd:iotest$secondaryArchSuffix = $portVersion
147	cmd:jbcorrelation$secondaryArchSuffix = $portVersion
148	cmd:jbrankhaus$secondaryArchSuffix = $portVersion
149	cmd:jbwords$secondaryArchSuffix = $portVersion
150	cmd:kernel_reg$secondaryArchSuffix = $portVersion
151	cmd:lineremoval$secondaryArchSuffix = $portVersion
152	cmd:listtest$secondaryArchSuffix = $portVersion
153	cmd:livre_adapt$secondaryArchSuffix = $portVersion
154	cmd:livre_hmt$secondaryArchSuffix = $portVersion
155	cmd:livre_makefigs$secondaryArchSuffix = $portVersion
156	cmd:livre_orient$secondaryArchSuffix = $portVersion
157	cmd:livre_pageseg$secondaryArchSuffix = $portVersion
158	cmd:livre_seedgen$secondaryArchSuffix = $portVersion
159	cmd:livre_tophat$secondaryArchSuffix = $portVersion
160	cmd:locminmax_reg$secondaryArchSuffix = $portVersion
161	cmd:logicops_reg$secondaryArchSuffix = $portVersion
162	cmd:lowaccess_reg$secondaryArchSuffix = $portVersion
163	cmd:maketile$secondaryArchSuffix = $portVersion
164	cmd:maze_reg$secondaryArchSuffix = $portVersion
165	cmd:misctest1$secondaryArchSuffix = $portVersion
166	cmd:modifyhuesat$secondaryArchSuffix = $portVersion
167	cmd:morphseq_reg$secondaryArchSuffix = $portVersion
168	cmd:morphtest1$secondaryArchSuffix = $portVersion
169	cmd:mtifftest$secondaryArchSuffix = $portVersion
170	cmd:numa_reg$secondaryArchSuffix = $portVersion
171	cmd:numaranktest$secondaryArchSuffix = $portVersion
172	cmd:otsutest1$secondaryArchSuffix = $portVersion
173	cmd:otsutest2$secondaryArchSuffix = $portVersion
174	cmd:overlap_reg$secondaryArchSuffix = $portVersion
175	cmd:pagesegtest1$secondaryArchSuffix = $portVersion
176	cmd:pagesegtest2$secondaryArchSuffix = $portVersion
177	cmd:paint_reg$secondaryArchSuffix = $portVersion
178	cmd:paintmask_reg$secondaryArchSuffix = $portVersion
179	cmd:partitiontest$secondaryArchSuffix = $portVersion
180	cmd:pdfiotest$secondaryArchSuffix = $portVersion
181	cmd:pdfseg_reg$secondaryArchSuffix = $portVersion
182	cmd:pixa1_reg$secondaryArchSuffix = $portVersion
183	cmd:pixa2_reg$secondaryArchSuffix = $portVersion
184	cmd:pixaatest$secondaryArchSuffix = $portVersion
185	cmd:pixadisp_reg$secondaryArchSuffix = $portVersion
186	cmd:pixalloc_reg$secondaryArchSuffix = $portVersion
187	cmd:pixcomp_reg$secondaryArchSuffix = $portVersion
188	cmd:pixmem_reg$secondaryArchSuffix = $portVersion
189	cmd:pixserial_reg$secondaryArchSuffix = $portVersion
190	cmd:pixtile_reg$secondaryArchSuffix = $portVersion
191	cmd:plottest$secondaryArchSuffix = $portVersion
192	cmd:pngio_reg$secondaryArchSuffix = $portVersion
193	cmd:printimage$secondaryArchSuffix = $portVersion
194	cmd:printsplitimage$secondaryArchSuffix = $portVersion
195	cmd:printtiff$secondaryArchSuffix = $portVersion
196	cmd:projection_reg$secondaryArchSuffix = $portVersion
197	cmd:projective_reg$secondaryArchSuffix = $portVersion
198	cmd:psio_reg$secondaryArchSuffix = $portVersion
199	cmd:psioseg_reg$secondaryArchSuffix = $portVersion
200	cmd:pta_reg$secondaryArchSuffix = $portVersion
201	cmd:ptra1_reg$secondaryArchSuffix = $portVersion
202	cmd:ptra2_reg$secondaryArchSuffix = $portVersion
203	cmd:quadtreetest$secondaryArchSuffix = $portVersion
204	cmd:rank_reg$secondaryArchSuffix = $portVersion
205	cmd:rankbin_reg$secondaryArchSuffix = $portVersion
206	cmd:rankhisto_reg$secondaryArchSuffix = $portVersion
207	cmd:ranktest$secondaryArchSuffix = $portVersion
208	cmd:rasterop_reg$secondaryArchSuffix = $portVersion
209	cmd:rasteropip_reg$secondaryArchSuffix = $portVersion
210	cmd:reducetest$secondaryArchSuffix = $portVersion
211	cmd:removecmap$secondaryArchSuffix = $portVersion
212	cmd:renderfonts$secondaryArchSuffix = $portVersion
213	cmd:rotate1_reg$secondaryArchSuffix = $portVersion
214	cmd:rotate2_reg$secondaryArchSuffix = $portVersion
215	cmd:rotatefastalt$secondaryArchSuffix = $portVersion
216	cmd:rotateorth_reg$secondaryArchSuffix = $portVersion
217	cmd:rotateorthtest1$secondaryArchSuffix = $portVersion
218	cmd:rotatetest1$secondaryArchSuffix = $portVersion
219	cmd:runlengthtest$secondaryArchSuffix = $portVersion
220	cmd:scale_reg$secondaryArchSuffix = $portVersion
221	cmd:scaleandtile$secondaryArchSuffix = $portVersion
222	cmd:scaletest1$secondaryArchSuffix = $portVersion
223	cmd:scaletest2$secondaryArchSuffix = $portVersion
224	cmd:seedfilltest$secondaryArchSuffix = $portVersion
225	cmd:seedspread_reg$secondaryArchSuffix = $portVersion
226	cmd:selio_reg$secondaryArchSuffix = $portVersion
227	cmd:sharptest$secondaryArchSuffix = $portVersion
228	cmd:shear2_reg$secondaryArchSuffix = $portVersion
229	cmd:shear_reg$secondaryArchSuffix = $portVersion
230	cmd:sheartest$secondaryArchSuffix = $portVersion
231	cmd:showedges$secondaryArchSuffix = $portVersion
232	cmd:skew_reg$secondaryArchSuffix = $portVersion
233	cmd:skewtest$secondaryArchSuffix = $portVersion
234	cmd:smallpix_reg$secondaryArchSuffix = $portVersion
235	cmd:smoothedge_reg$secondaryArchSuffix = $portVersion
236	cmd:snapcolortest$secondaryArchSuffix = $portVersion
237	cmd:sorttest$secondaryArchSuffix = $portVersion
238	cmd:splitcomp_reg$secondaryArchSuffix = $portVersion
239	cmd:splitimage2pdf$secondaryArchSuffix = $portVersion
240	cmd:string_reg$secondaryArchSuffix = $portVersion
241	cmd:subpixel_reg$secondaryArchSuffix = $portVersion
242	cmd:sudokutest$secondaryArchSuffix = $portVersion
243	cmd:textlinemask$secondaryArchSuffix = $portVersion
244	cmd:threshnorm_reg$secondaryArchSuffix = $portVersion
245	cmd:translate_reg$secondaryArchSuffix = $portVersion
246	cmd:trctest$secondaryArchSuffix = $portVersion
247	cmd:viewertest$secondaryArchSuffix = $portVersion
248	cmd:warper_reg$secondaryArchSuffix = $portVersion
249	cmd:warpertest$secondaryArchSuffix = $portVersion
250	cmd:watershedtest$secondaryArchSuffix = $portVersion
251	cmd:wordsinorder$secondaryArchSuffix = $portVersion
252	cmd:writemtiff$secondaryArchSuffix = $portVersion
253	cmd:writetext_reg$secondaryArchSuffix = $portVersion
254	cmd:xformbox_reg$secondaryArchSuffix = $portVersion
255	cmd:xtractprotos$secondaryArchSuffix = $portVersion
256	cmd:xvdisp$secondaryArchSuffix = $portVersion
257	cmd:yuvtest$secondaryArchSuffix = $portVersion
258	"
259REQUIRES_tools="
260	haiku$secondaryArchSuffix
261	leptonica$secondaryArchSuffix == $portVersion base
262	"
263
264BUILD_REQUIRES="
265	haiku${secondaryArchSuffix}_devel
266	devel:libgif$secondaryArchSuffix
267	devel:libjpeg$secondaryArchSuffix
268	devel:libpng$secondaryArchSuffix
269	devel:libtiff$secondaryArchSuffix
270	devel:libwebp$secondaryArchSuffix
271	devel:libz$secondaryArchSuffix
272	"
273BUILD_PREREQUIRES="
274	cmd:aclocal
275	cmd:autoconf
276	cmd:gcc$secondaryArchSuffix
277	cmd:ld$secondaryArchSuffix
278	cmd:libtoolize$secondaryArchSuffix
279	cmd:make
280	cmd:makeinfo
281	cmd:pkg_config$secondaryArchSuffix
282	"
283
284BUILD()
285{
286	autoreconf -fi
287	# override CFLAGS to make gcc2 happy by not passing the -g option
288	CFLAGS=-O2 runConfigure ./configure
289	make $jobArgs
290}
291
292INSTALL()
293{
294	make install
295
296	# remove libtool file
297	rm $libDir/*.la
298
299	prepareInstalledDevelLib liblept
300	fixPkgconfig
301
302	packageEntries devel \
303		$developDir
304
305	packageEntries tools \
306		$binDir
307}
308