Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # $OpenBSD: Makefile,v 1.15 2015/03/17 23:43:25 bcallah Exp $
  2. COMMENT= load PNG graphics files and bind them to an OpenGL texture
  3. VERSION= 1.45
  4. DISTNAME= glpng
  5. PKGNAME= glpng-${VERSION}
  6. REVISION = 5
  7. SHARED_LIBS= glpng 0.0
  8. CATEGORIES= graphics
  9. EXTRACT_SUFX= .zip
  10. HOMEPAGE= http://www.fifi.org/doc/libglpng-dev/glpng.html
  11. # BSD-like
  12. PERMIT_PACKAGE_CDROM= Yes
  13. MASTER_SITES= http://mirrors.nycbug.org/pub/distfiles/
  14. WANTLIB= GL png>=5
  15. LIB_DEPENDS= graphics/png
  16. TEST_IS_INTERACTIVE= x11
  17. TEST_DEPENDS= graphics/freeglut
  18. DIST_SUBDIR= ${DISTNAME}-${VERSION}
  19. WRKDIST= ${WRKDIR}
  20. WRKSRC= ${WRKDIST}/src
  21. MAKE_FILE= ${FILESDIR}/Makefile
  22. MAKE_ENV= SHLIB_MAJOR=${LIBglpng_VERSION:R} \
  23. SHLIB_MINOR=${LIBglpng_VERSION:E}
  24. FAKE_FLAGS= LIBDIR=${LOCALBASE}/lib DEBUGLIBS=no
  25. CFLAGS+= -I${X11BASE}/include -I${LOCALBASE}/include \
  26. -I${WRKDIR}/include
  27. post-install:
  28. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/glpng
  29. ${INSTALL_DATA_DIR} ${PREFIX}/include/GL/
  30. ${INSTALL_DATA} ${WRKDIR}/include/GL/glpng.h \
  31. ${PREFIX}/include/GL
  32. ${INSTALL_DATA} ${WRKDIR}/glpng.htm \
  33. ${PREFIX}/share/doc/glpng/glpng.html
  34. do-test:
  35. cd ${WRKDIR}/Example \
  36. && ${CC} ${CFLAGS} -o Test Test.c -lm -lz \
  37. -L${X11BASE}/lib -lGLU -lXi -lXmu \
  38. -L${LOCALBASE}/lib -lglut \
  39. -L${WRKBUILD} -lglpng \
  40. && LD_LIBRARY_PATH=${WRKSRC} ./Test
  41. .include <bsd.port.mk>