freebsd-ports/emulators/qemu-user-static-devel/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

79 lines
2.2 KiB
Makefile

PORTNAME= qemu
PORTVERSION= 6.2.50
PORTREVISION= 2
CATEGORIES= emulators
PKGNAMESUFFIX= -user-static-devel
DIST_SUBDIR= qemu/${PORTVERSION}
MAINTAINER= emulation@FreeBSD.org
COMMENT= QEMU CPU Emulator (github bsd-user branch)
WWW= https://wiki.qemu.org/Main_Page
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
ONLY_FOR_ARCHS= amd64 powerpc powerpc64
CONFLICTS_INSTALL= qemu-user-static
# When static linking we have a build dependency on libglib-2.0.a, otherwise
# we use glib20 in the usual way (shared-lib runtime dependency).
BUILD_DEPENDS= ${LOCALBASE}/lib/libglib-2.0.a:devel/glib20 \
bash:shells/bash \
meson>=0.57.1_1:devel/meson
USES= bison compiler:c11 cpe gmake ninja:build perl5 pkgconfig python:build
USE_GITHUB= yes
GH_TUPLE= qemu-bsd-user:qemu-bsd-user:64ff0f053df \
qemu:keycodemapdb:10739aa:keycodemapdb/ui/keycodemapdb
HAS_CONFIGURE= yes
CONFIGURE_OUTSOURCE= yes
USE_PERL5= build
USE_RC_SUBR= qemu_user_static
SUB_LIST= NAME=qemu_user_static
MAKE_ENV= BSD_MAKE="${MAKE}" V=1
CONFIGURE_ARGS= --prefix=${PREFIX} --cc=${CC} \
--localstatedir=/var \
--extra-ldflags=-L${LOCALBASE}/lib \
--extra-cflags=-I${LOCALBASE}/include \
--enable-debug \
--enable-debug-info \
--static \
--python=${PYTHON_CMD} \
--meson=${LOCALBASE}/bin/meson \
--disable-docs --disable-tools --disable-system \
--disable-capstone \
--extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\"
TEST_TARGET= check
.include <bsd.port.pre.mk>
QEMU_TARGETS= i386-bsd-user arm-bsd-user ppc-bsd-user
.if ${ARCH} == "amd64" || ${ARCH} == "powerpc64" || ${ARCH} == "aarch64"
QEMU_TARGETS+= x86_64-bsd-user riscv64-bsd-user ppc64-bsd-user aarch64-bsd-user
PLIST_SUB+= 64BIT=""
.else
PLIST_SUB+= 64BIT="@comment "
.endif
CONFIGURE_ARGS+= --target-list=${QEMU_TARGETS:ts,}
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
CFLAGS+= -Wno-address-of-packed-member
CFLAGS+= -D_WANT_SEMUN
QEMU_ARCH= ${ARCH:C/amd64/x86_64/:C/powerpc/ppc/}
MAKE_ARGS= ARCH=${QEMU_ARCH}
post-install:
@${RM} -r ${STAGEDIR}${DATADIR}
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
@(cd ${STAGEDIR}${PREFIX}/bin && \
for i in qemu-*; do ${MV} -i $$i $$i-static; done)
.include <bsd.port.post.mk>