1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00
freebsd-ports/lang/scm/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

106 lines
3.2 KiB
Makefile

PORTNAME= scm
PORTVERSION= 5f2
PORTREVISION= 10
CATEGORIES= lang scheme
MASTER_SITES= http://groups.csail.mit.edu/mac/ftpdir/scm/%SUBDIR%/
MASTER_SITE_SUBDIR= . OLD
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} slib-3b5.zip slib-psd1-3.tar.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} slib-3b5.zip
MAINTAINER= mi@aldan.algebra.com
COMMENT= Scheme interpreter
WWW= https://people.csail.mit.edu/jaffer/SCM
LICENSE= LGPL21
BROKEN_aarch64= fails to link: missing sbrk
BROKEN_riscv64= fails to link: missing sbrk
WRKSRC= ${WRKDIR}/${PORTNAME}
USES= readline zip
HAS_CONFIGURE= yes
CONFIGURE_ENV= --prefix=${PREFIX}
MAKE_JOBS_UNSAFE= yes
CFLAGS:= ${CFLAGS:N-O*} -O0
CFLAGS+= -Wall -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wcast-qual
CFLAGS+= -Wno-unused-label -Wno-uninitialized
SUB_FILES= require.scm
PLIST_SUB= VERSION="${PORTVERSION}"
PKGDEINSTALL= ${PKGINSTALL}
INFO= scm
OPTIONS_DEFINE= X11
OPTIONS_SUB= yes
X11_USES= xorg
X11_USE= xorg=ice,sm,x11,xext
SCM_DATA= COPYING COPYING.LESSER Iedline.scm Idiffer.scm \
Init${PORTVERSION}.scm Link.scm Macexp.scm Macro.scm \
Transcen.scm Tscript.scm build build.scm compile.scm \
hobbit.scm mkimpcat.scm patchlvl.h \
r4rstest.scm rwb-isam.scm scmhob.h scmhob.scm wbtab.scm
SCM_DATA_X11= keysymdef.scm x11.scm xatoms.scm xevent.scm
SCM_MODULES= byte.so bytenumb.so crs.so differ.so edline.so gsubr.so \
ioext.so posix.so ramap.so record.so rgx.so sc2.so \
socket.so unix.so
SCM_MODULES_X11=x.so
.include <bsd.port.options.mk>
.if ${ARCH:Mpowerpc64*}
USES+= compiler:gcc-c++11-lib
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} > 1300000
LIB_DEPENDS+= libgnuregex.so.[6-9]:devel/libgnuregex
.endif
.if ${PORT_OPTIONS:MX11}
SCM_MODULES+= ${SCM_MODULES_X11}
SCM_DATA+= ${SCM_DATA_X11}
.endif
LIBEDIT_SUB1= ${CPPFLAGS}" "${LDFLAGS:M-L*}
LIBEDIT_SUB2= ${LDFLAGS:M-L*}
post-patch:
@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include| ; \
/strip/s|^|#|' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g ; \
s|%%CFLAGS%%|${CFLAGS}|g ; \
s|%%ARCHOBJS%%|${ARCHOBJS}|g ; \
s|editline freebsd "" "|editline freebsd "${LIBEDIT_SUB1}| ; \
s|-lreadline")$$|${LIBEDIT_SUB2} -lreadline")| ; \
s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/build.scm
@${REINPLACE_CMD} -e 's|__osf__|__FreeBSD__|' ${WRKSRC}/gmalloc.c
@${REINPLACE_CMD} -e 's|gnuregex\.h|gnu/regex.h|g' ${WRKSRC}/rgx.c
@${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|g' \
${WRKSRC}/xgen.scm
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
${WRKSRC}/*.info ${WRKSRC}/*.texi
${TOUCH} ${WRKSRC}/scm.core
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/scm ${WRKSRC}/scmlit \
${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/scm.1 ${STAGEDIR}${MANPREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/scm
${INSTALL_DATA} ${WRKDIR}/require.scm ${SCM_DATA:S|^|${WRKSRC}/|} \
${STAGEDIR}${PREFIX}/lib/scm
${INSTALL_LIB} ${SCM_MODULES:S|^|${WRKSRC}/|} \
${STAGEDIR}${PREFIX}/lib/scm
${TAR} -C ${STAGEDIR}${PREFIX}/lib/scm -xf ${DISTDIR}/${DISTFILES:Mslib*.tar.gz} '*.scm'
${INSTALL_DATA} ${WRKDIR}/slib/*.scm ${STAGEDIR}${PREFIX}/lib/scm/slib/
${INSTALL_DATA} ${WRKDIR}/scm/scm.info ${STAGEDIR}${PREFIX}/${INFO_PATH}
.include <bsd.port.post.mk>