Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # $OpenBSD: Makefile,v 1.2 2017/06/08 15:50:46 czarkoff Exp $
  2. V = 1.0
  3. COMMENT = QR decoder library
  4. DISTNAME = libquirc-$V
  5. GH_ACCOUNT = dlbeer
  6. GH_PROJECT = quirc
  7. GH_TAGNAME = v$V
  8. CATEGORIES = graphics
  9. SHARED_LIBS += quirc 0.0 # 1.0
  10. MAINTAINER = Dmitrij D. Czarkoff <czarkoff@openbsd.org>
  11. # BSD
  12. PERMIT_PACKAGE_CDROM = Yes
  13. WANTLIB += SDL SDL_gfx c jpeg m pthread
  14. LIB_DEPENDS = devel/sdl-gfx \
  15. graphics/jpeg
  16. TEST_DEPENDS = graphics/libqrencode \
  17. graphics/png
  18. MAKE_FLAGS = LIB_VERSION=${LIBquirc_VERSION}
  19. MAKE_ENV = LDFLAGS="${LDFLAGS}"
  20. FAKE_FLAGS = DESTDIR=""
  21. ALL_TARGET = libquirc.a libquirc.so quirc-scanner quirc-demo
  22. TEST_TARGET = qrtest
  23. TESTDIR = ${WRKBUILD}/test_data
  24. CFLAGS += ${PICFLAG} -I${LOCALBASE}/include \
  25. -DQUIRC_MAX_REGIONS=65534
  26. LDFLAGS += -L${LOCALBASE}/lib
  27. pre-test:
  28. @${INSTALL_DATA_DIR} ${TESTDIR}
  29. @qrencode "${DISTNAME} - ${COMMENT}" -o "${TESTDIR}/1.png"
  30. @cat pkg/PLIST | qrencode -o "${TESTDIR}/2.png"
  31. post-test:
  32. @${WRKBUILD}/qrtest ${TESTDIR} | grep '^${TESTDIR:T}' | \
  33. tee ${WRKBUILD}/test.out
  34. @cmp ${WRKBUILD}/test.out ${FILESDIR}/test.out
  35. .include <bsd.port.mk>