openbsd-ports/graphics/tesseract/Makefile

84 lines
2.2 KiB
Makefile
Raw Normal View History

2011-12-22 04:47:50 -05:00
# $OpenBSD: Makefile,v 1.15 2011/12/22 09:47:50 ajacoutot Exp $
COMMENT-main= OCR Engine developed at HP Labs
2011-12-22 04:47:50 -05:00
V= 3.01
DISTNAME= tesseract-${V}
CATEGORIES= graphics textproc
PKGNAME-main= ${DISTNAME}
2011-12-22 04:47:50 -05:00
SHARED_LIBS += tesseract 3.1 # 3.1
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
eng.traineddata.gz
2010-11-07 13:48:24 -05:00
HOMEPAGE= http://tesseract-ocr.googlecode.com/
# Apache License 2.0
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MULTI_PACKAGES= -main
### languages ##########################################################
# language files are unversionned
MAJOR_V= ${V:C/^([0-9]+).*/\1/}
LANG_V= ${MAJOR_V}.20101024
2010-11-07 13:48:24 -05:00
DIST_SUBDIR= tesseract-${LANG_V}
LANGS+= bul cat ces chi_sim chi_tra dan-frak dan deu ell fin fra hun ind
LANGS+= ita jpn kor lav lit nld nor pol por ron rus slk slv spa srp swe
LANGS+= tgl tur ukr vie
.for l in ${LANGS}
COMMENT-${l}= ${l} language data for Tesseract
DISTFILES+= ${l}.traineddata.gz
PKGNAME-${l}= tesseract-${l}-${LANG_V}
MULTI_PACKAGES+=-${l}
2011-12-22 04:47:50 -05:00
REVISION-${l}= 3
2010-11-17 03:05:12 -05:00
RUN_DEPENDS-${l}= ${BASE_PKGPATH}>=${MAJOR_V}
PKG_ARCH-${l}= *
.endfor
### end languages ######################################################
2011-12-22 04:47:50 -05:00
WANTLIB-main= c jpeg m pthread stdc++ z tiff png gif lept webp
2011-12-22 04:47:50 -05:00
LIB_DEPENDS-main=graphics/leptonica
2010-11-07 13:48:24 -05:00
MASTER_SITES= ${HOMEPAGE}/files/
USE_LIBTOOL= Yes
2011-12-22 04:47:50 -05:00
AUTOCONF_VERSION=2.65
AUTOMAKE_VERSION=1.10
BUILD_DEPENDS += ${MODGNU_AUTOCONF_DEPENDS} \
${MODGNU_AUTOMAKE_DEPENDS}
# libtoolize(1)
BUILD_DEPENDS += devel/libtool
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= ${CONFIGURE_SHARED}
2009-02-17 04:19:03 -05:00
pre-configure:
2011-12-22 04:47:50 -05:00
cd ${WRKSRC} && \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
AUTOCONF_VERSION=${AUTOCONF_VERSION} \
./autogen.sh ${CONFIGURE_ARGS}
perl -pi -e 's,-lpthread,-pthread,g' ${WRKSRC}/configure
2009-02-17 04:19:03 -05:00
post-install:
cp ${WRKDIR}/*.traineddata ${PREFIX}/share/tessdata/
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tesseract
${INSTALL_DATA} ${WRKSRC}/doc/*.1 ${PREFIX}/man/man1/
${INSTALL_DATA} ${WRKSRC}/doc/*.5 ${PREFIX}/man/man5/
${INSTALL_DATA} ${WRKSRC}/{eurotext.tif,phototest.tif} \
${PREFIX}/share/examples/tesseract
.include <bsd.port.mk>