1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/graphics/glfw2/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

75 lines
2.1 KiB
Makefile

PORTNAME= glfw
PORTVERSION= 2.7.9
PORTREVISION= 3
CATEGORIES= graphics
MASTER_SITES= SF
PKGNAMESUFFIX= 2
MAINTAINER= ports@FreeBSD.org
COMMENT= Portable framework for OpenGL development
WWW= https://www.glfw.org/
LICENSE= ZLIB
LICENSE_FILE= ${WRKSRC}/COPYING.txt
CONFLICTS_INSTALL= glfw
USES= gl tar:bzip2 xorg
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= compile.sh
ALL_TARGET= x11
INSTALL_TARGET= x11-install
USE_XORG= xi xrandr
USE_GL= glu
USE_LDCONFIG= yes
MAKE_JOBS_UNSAFE= yes
CFLAGS+= -w
PLIST_FILES= include/GL/glfw.h lib/libglfw.a lib/libglfw.so \
lib/libglfw.so.0 libdata/pkgconfig/libglfw.pc
PORTDOCS= *
PORTEXAMPLES= *
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}${PKGNAMESUFFIX}
OPTIONS_DEFINE= DOCS EXAMPLES
# Restrict to stable (even) versions, indicated by the second component.
PORTSCOUT= limit:^2\..*
post-extract:
@${CHMOD} +x ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
post-patch:
@${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|; \
/SOFLAGS/s|-soname |-Wl,-soname,|' \
${WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} \
-e 's|lib/pkgconfig|libdata/pkgconfig|g' \
${WRKSRC}/lib/x11/Makefile.x11.in
post-install:
${INSTALL_LIB} ${WRKSRC}/lib/x11/libglfw.so ${STAGEDIR}${PREFIX}/lib/libglfw.so.0
${LN} -sf libglfw.so.0 ${STAGEDIR}${PREFIX}/lib/libglfw.so
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} *.html ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/docs && ${INSTALL_DATA} *.pdf *.sty *.tex *.txt ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in boing gears heightmap listmodes mipmaps mtbench mthello pong3d splitview triangle wave
${INSTALL_PROGRAM} ${WRKSRC}/examples/${f} ${STAGEDIR}${EXAMPLESDIR}
.endfor
${INSTALL_DATA} ${WRKSRC}/examples/*.tga ${STAGEDIR}${EXAMPLESDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/tests
.for f in accuracy defaults dynamic events fsaa fsinput iconify joysticks peter reopen tearing version
${INSTALL_PROGRAM} ${WRKSRC}/tests/${f} ${STAGEDIR}${EXAMPLESDIR}/tests
.endfor
.include <bsd.port.mk>