freebsd-ports/devel/simavr/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

91 lines
2.9 KiB
Makefile

PORTNAME= simavr
PORTVERSION= 1.7
DISTVERSIONPREFIX= v
PORTREVISION= 2
CATEGORIES= devel emulators
MAINTAINER= zirias@FreeBSD.org
COMMENT= Simulator for several Atmel AVR chips
WWW= https://github.com/buserror/simavr
LICENSE= GPLv3
BUILD_DEPENDS= avr-gcc:devel/avr-gcc \
bash:shells/bash \
${LOCALBASE}/avr/lib/libc.a:devel/avr-libc
USES= compiler:c11 gl gmake pathfix pkgconfig xorg
USE_GL= gl glu glut
PATHFIX_MAKEFILEIN= Makefile
USE_XORG= xdamage xcb xext xfixes xrandr
USE_GITHUB= yes
GH_ACCOUNT= buserror
USE_LDCONFIG= yes
ALL_TARGET= build-parts
DESTDIRNAME= DUMMYDESTDIR
# Avoid default DESTDIR handling, so we can set a custom
# one that includes PREFIX, as required by unusual upstream
# install targets
MAKE_ARGS= RELEASE=1 PREFIX=${PREFIX} DESTDIR=${STAGEDIR}${PREFIX}
MAKE_ENV= SIMAVR_VERSION=v${PORTVERSION}
OPTIONS_DEFINE= DOCS EXAMPLES
AVR_STRIP_CMD?= avr-strip
DUMPMACHINE= ${CC} -dumpmachine
OBJDIRNAME= obj-$$(${DUMPMACHINE})
post-patch:
${REINPLACE_CMD} -e 's:Linux:FreeBSD:' \
-e 's:unknown:v${PORTVERSION}:' \
${WRKSRC}/simavr/Makefile \
${WRKSRC}/examples/parts/Makefile
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/simavr
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavr.so.1
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsimavrparts.so.1
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/manual/manual.pdf ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/simavr_callgraph.pdf ${STAGEDIR}${DOCSDIR}
post-install-EXAMPLES-on:
.for BOARDELF in ds1338,ds1338demo hd44780,charlcd i2ctest ledramp rotenc,rotenc_test simduino ssd1306,ssd1306demo timer_64led
BOARDELF=${BOARDELF}; \
BOARD=$${BOARDELF%%,*}; \
ELF=$${BOARDELF##*,}; \
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}; \
${INSTALL_PROGRAM} \
${WRKSRC}/examples/board_$${BOARD}/${OBJDIRNAME}/$${ELF}.elf \
${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/$${ELF}; \
${INSTALL_DATA} ${WRKSRC}/examples/board_$${BOARD}/*.[aihc]* \
${WRKSRC}/examples/board_$${BOARD}/Makefile \
${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/;\
${TEST} -f ${WRKSRC}/examples/board_$${BOARD}/README && \
${INSTALL_DATA} ${WRKSRC}/examples/board_$${BOARD}/README \
${STAGEDIR}${EXAMPLESDIR}/board_$${BOARD}/ || ${TRUE}
.endfor
.for AXF in \
ds1338/atmega32_ds1338 \
hd44780/atmega48_charlcd \
i2ctest/atmega1280_i2ctest \
ledramp/atmega48_ledramp \
rotenc/atmega32_rotenc_test \
ssd1306/atmega32_ssd1306 \
timer_64led/atmega168_timer_64led
${AVR_STRIP_CMD} ${STAGEDIR}${EXAMPLESDIR}/board_${AXF}.axf
.endfor
.for EXDIR in parts shared
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${EXDIR}
${INSTALL_DATA} ${WRKSRC}/examples/${EXDIR}/*.[hc] \
${STAGEDIR}${EXAMPLESDIR}/${EXDIR}
.endfor
${INSTALL_DATA} ${WRKSRC}/Makefile.common ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/Makefile ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/Makefile.opengl \
${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>