Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # $OpenBSD: Makefile,v 1.42 2017/05/31 08:08:17 espie Exp $
  2. ONLY_FOR_ARCHS-java = i386 amd64
  3. COMMENT-main = syntactic parser of different languages
  4. COMMENT-java = Java bindings for link-grammar
  5. COMMENT-python = Python bindings for link-grammar
  6. VERSION = 5.3.16
  7. DISTNAME = link-grammar-${VERSION}
  8. PKGNAME-main = ${DISTNAME}
  9. PKGNAME-java = link-grammar-java-${VERSION}
  10. PKGNAME-python = py-link-grammar-${VERSION}
  11. REVISION-java = 0
  12. SHARED_LIBS += link-grammar 4.0 # 8.7
  13. SHARED_LIBS += link-grammar-java 4.0 # 8.7
  14. CATEGORIES = textproc
  15. HOMEPAGE = http://www.abisource.com/projects/link-grammar/
  16. # LGPLv2.1
  17. PERMIT_PACKAGE_CDROM = Yes
  18. WANTLIB += hunspell-1.6 m sqlite3 ${LIBECXX}
  19. WANTLIB-main += ${WANTLIB} c pthread
  20. WANTLIB-java += ${WANTLIB} link-grammar pthread
  21. WANTLIB-python += ${WANTLIB} ${MODPY_WANTLIB}
  22. WANTLIB-python += link-grammar pthread util
  23. MASTER_SITES = http://www.abisource.com/downloads/link-grammar/${VERSION}/
  24. MODULES = lang/python
  25. MODPY_ADJ_FILES = bindings/python-examples/tests.py
  26. # -std=c++03
  27. COMPILER = clang
  28. MULTI_PACKAGES = -main -java -python
  29. PSEUDO_FLAVORS = no_java
  30. .include <bsd.port.arch.mk>
  31. BUILD_DEPENDS = devel/swig
  32. LIB_DEPENDS= databases/sqlite3
  33. LIB_DEPENDS-main = ${LIB_DEPENDS} \
  34. textproc/hunspell
  35. LIB_DEPENDS-java = ${BUILD_PKGPATH},-main
  36. LIB_DEPENDS-python = ${MODPY_LIB_DEPENDS} \
  37. ${BUILD_PKGPATH},-main
  38. RUN_DEPENDS-main = # empty
  39. RUN_DEPENDS-java = ${MODJAVA_RUN_DEPENDS}
  40. RUN_DEPENDS-python = ${MODPYTHON_RUN_DEPENDS}
  41. TEST_DEPENDS = ${BUILD_PKGPATH},-python
  42. SUBST_VARS = VERSION
  43. CONFIGURE_STYLE = gnu
  44. ADD_CFLAGS = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/openbsd
  45. ADD_CFLAGS += -I${LOCALBASE}/include
  46. CONFIGURE_ENV = CFLAGS="${CFLAGS} ${ADD_CFLAGS}" \
  47. CPPFLAGS="${CPPFLAGS} ${ADD_CFLAGS}" \
  48. LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
  49. CONFIGURE_ARGS = --enable-perl-bindings \
  50. --enable-python-bindings \
  51. --with-hunspell-dictdir=${LOCALBASE}/share/mozilla-dicts
  52. .if ${BUILD_PACKAGES:M-java}
  53. MODULES += java
  54. MODJAVA_VER = 1.6+
  55. BUILD_DEPENDS += devel/apache-ant
  56. .else
  57. CONFIGURE_ARGS += --disable-java-bindings
  58. .endif
  59. pre-configure:
  60. sed -i -e 's,-O2,,g;' -e 's,-O3,,g' ${WRKSRC}/configure
  61. post-install:
  62. rm ${PREFIX}/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/clinkgrammar.{a,la}
  63. rm ${WRKINST}${MODPY_SITEPKG}/linkgrammar/_clinkgrammar.{a,la}
  64. .include <bsd.port.mk>