- Change maintainer email to @FreeBSD.org

- Remove dependencies pulled in by other deps
- Change USE_XORG xi xrandr
- Set PORTSCOUT
- Support STAGEDIR
- Add patch for proper staging [1]

PR:		ports/179602
Submitted by:	nemysis (self), bapt [1]
Approved by:	wg/pawel (mentors)
This commit is contained in:
Rusmir Dusko 2013-10-06 23:44:25 +00:00
parent cac39bcadf
commit a51d1b240a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329643
2 changed files with 49 additions and 25 deletions

View file

@ -6,20 +6,17 @@ PORTVERSION= 2.7.9
CATEGORIES= graphics
MASTER_SITES= SF
MAINTAINER= nemysis@gmx.ch
MAINTAINER= nemysis@FreeBSD.org
COMMENT= Portable framework for OpenGL development
LICENSE= ZLIB
LIB_DEPENDS= pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
drm:${PORTSDIR}/graphics/libdrm
USE_BZIP2= yes
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= compile.sh
ALL_TARGET= x11
INSTALL_TARGET= x11-install
USE_XORG= x11 xau xcb xdamage xdmcp xext xfixes xrandr xrender xxf86vm
USE_XORG= xi xrandr
USE_GL= glu
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
@ -50,8 +47,8 @@ EXAMPLESDIR2= ${EXAMPLESDIR}/tests
EXAMPLES_FILES2= accuracy defaults dynamic events fsaa fsinput iconify \
joysticks peter reopen tearing version
NO_STAGE= yes
.include <bsd.port.options.mk>
# Restrict to stable (even) versions, indicated by the second component.
PORTSCOUT= limit:^2\..*
post-extract:
@${CHMOD} ${BINMODE} ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@ -61,27 +58,25 @@ post-patch:
's|/usr/X11R6|${LOCALBASE}| ; \
/SOFLAGS/s|-soname |-Wl,-soname,| ; \
/CFLAGS_THREAD/s|"-pthread"|"${PTHREAD_CFLAGS}"| ; \
/LFLAGS_THREAD/s|"-pthread"|"${PTHREAD_LIBS}"|' ${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e \
's|lib/pkgconfig|libdata/pkgconfig|g' ${WRKSRC}/lib/x11/Makefile.x11.in
/LFLAGS_THREAD/s|"-pthread"|"${PTHREAD_LIBS}"|' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} \
-e 's|lib/pkgconfig|libdata/pkgconfig|g' \
${WRKSRC}/lib/x11/Makefile.x11.in
post-install:
${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.so ${PREFIX}/lib/libglfw.so.0
${LN} -sf ${PREFIX}/lib/libglfw.so.0 ${PREFIX}/lib/libglfw.so
${INSTALL_DATA} ${WRKSRC}/lib/x11/libglfw.so ${STAGEDIR}${PREFIX}/lib/libglfw.so.0
${LN} -sf ${PREFIX}/lib/libglfw.so.0 ${STAGEDIR}${PREFIX}/lib/libglfw.so
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
@${MKDIR} ${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
.endif
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR2}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2}
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_PROGRAM} ${EXAMPLES_FILES1:S|^|${EXAMPLESSRCDIR1}/|} ${EXAMPLESDIR}
${INSTALL_DATA} ${EXAMPLESSRCDIR1}/*.tga ${EXAMPLESDIR}
@${MKDIR} ${EXAMPLESDIR2}
${INSTALL_PROGRAM} ${EXAMPLES_FILES2:S|^|${EXAMPLESSRCDIR2}/|} ${EXAMPLESDIR2}
.endif
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_PROGRAM} ${EXAMPLES_FILES1:S|^|${EXAMPLESSRCDIR1}/|} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${EXAMPLESSRCDIR1}/*.tga ${STAGEDIR}${EXAMPLESDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR2}
${INSTALL_PROGRAM} ${EXAMPLES_FILES2:S|^|${EXAMPLESSRCDIR2}/|} ${STAGEDIR}${EXAMPLESDIR2}
.include <bsd.port.mk>

View file

@ -0,0 +1,29 @@
--- ./lib/x11/Makefile.x11.in.orig 2013-05-30 16:07:32.000000000 +0200
+++ ./lib/x11/Makefile.x11.in 2013-09-30 12:46:48.994429398 +0200
@@ -26,19 +26,19 @@
# Install GLFW static library
##########################################################################
install: libglfw.a libglfw.pc
- $(INSTALL) -d $(PREFIX)/lib
- $(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a
- $(INSTALL) -d $(PREFIX)/include/GL
- $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h
- $(INSTALL) -d $(PREFIX)/lib/pkgconfig
- $(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) -c -m 644 libglfw.a $(DESTDIR)$(PREFIX)/lib/libglfw.a
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/include/GL
+ $(INSTALL) -c -m 644 ../../include/GL/glfw.h $(DESTDIR)$(PREFIX)/include/GL/glfw.h
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/pkgconfig
+ $(INSTALL) -c -m 644 libglfw.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/libglfw.pc
##########################################################################
# Install GLFW static and shared libraries
##########################################################################
dist-install: libglfw.so install
- $(INSTALL) -c -m 644 libglfw.so $(PREFIX)/lib/libglfw.so
+ $(INSTALL) -c -m 644 libglfw.so $(DESTDIR)$(PREFIX)/lib/libglfw.so
##########################################################################