freebsd-ports/editors/texmacs/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

92 lines
2.9 KiB
Makefile

PORTNAME= texmacs
PORTVERSION= 1.99.4
PORTREVISION= 5
CATEGORIES= editors print
MASTER_SITES= http://www.texmacs.org/Download/ftp/tmftp/source/
DISTNAME= TeXmacs-${PORTVERSION}-src
MAINTAINER= ports@FreeBSD.org
COMMENT= WYSIWYG scientific text editor
WWW= https://www.texmacs.org/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_FreeBSD_13= assigning to 'bool' from incompatible type 'nullptr_t'
BROKEN_FreeBSD_14= assigning to 'bool' from incompatible type 'nullptr_t'
LIB_DEPENDS= libltdl.so:devel/libltdl \
libguile.so:lang/guile1 \
libgmp.so:math/gmp
RUN_DEPENDS= fig2dev:print/transfig
BROKEN_armv6= fails to compile: call to min is ambiguous
BROKEN_armv7= fails to compile: call to min is ambiguous
USES= cpe desktop-file-utils gmake iconv localbase pkgconfig python \
shared-mime-info shebangfix xorg
USE_TEX= tex:run dvipsk:run
USE_XORG= xext
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-optimize="${CXXFLAGS}" --disable-qt
MAKE_ARGS= CP="${CP} -R -f"
ALL_TARGET= ${PORTNAME:tu}
SHEBANG_FILES= plugins/asymptote/bin/* plugins/dratex/bin/* \
plugins/eukleides/bin/* plugins/feynmf/bin/* \
plugins/mupad/bin/* plugins/texgraph/bin/* \
plugins/xypic/bin/* \
plugins/python/bin/tm_python plugins/sage/bin/tm_sage \
plugins/mathematica/bin/realpath.py
DATADIR= ${PREFIX}/share/TeXmacs
OPTIONS_DEFINE= ASPELL FREETYPE GHOSTSCRIPT IMLIB2 PDF SQLITE
OPTIONS_DEFAULT=ASPELL FREETYPE GHOSTSCRIPT IMLIB2 PDF SQLITE
OPTIONS_SUB= yes
ASPELL_RUN_DEPENDS= aspell:textproc/aspell
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
FREETYPE_CONFIGURE_ENABLE= freetype
FREETYPE_CONFIGURE_ENV_OFF= FREETYPE_CFLAGS=" " FREETYPE_LDFLAGS=" " \
ac_cv_header_ft2build_h=no
GHOSTSCRIPT_USES= ghostscript:x11
GHOSTSCRIPT_CONFIGURE_ON= --with-gs=yes
GHOSTSCRIPT_CONFIGURE_OFF= --with-gs=no
IMLIB2_LIB_DEPENDS= libImlib2.so:graphics/imlib2
IMLIB2_CONFIGURE_WITH= imlib2
PDF_CONFIGURE_ENABLE= pdf-renderer
PDF_LDFLAGS= -lz
PDF_IMPLIES= FREETYPE GHOSTSCRIPT
SQLITE_USES= sqlite
SQLITE_CONFIGURE_ON= --with-sqlite3
post-patch:
@${REINPLACE_CMD} -e \
'/SVNREV\//s|^|#| ; \
s|LIBS="-liconv"|LIBS="-liconv $$LIBS"| ; \
s|/-liconv}|}| ; \
s|"-Wl,-rpath,"|""| ; \
s|\[\[ |[ |g ; \
s| \]\]| ]|g ; \
s|== no|= no| ; \
s|$${QT_PLUGINS_LIST/,/ }|${QT_PLUGINS_LIST}|' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e \
'/require/s|"python"|"${PYTHON_CMD:T}"|' \
${WRKSRC}/plugins/python/progs/init-python.scm
@${REINPLACE_CMD} -e \
's|int tab=.*)|int tab)|' \
${WRKSRC}/src/Kernel/Types/tree.hpp
@${REINPLACE_CMD} -e \
's|int dpi=.*)|int dpi)|' \
${WRKSRC}/src/Typeset/boxes.hpp
post-install:
@${FIND} ${STAGEDIR}${DATADIR} -name "._*" -delete
@${FIND} ${STAGEDIR}${DATADIR} -name "*.bak" -delete
.for f in realpath texmacs.bin tm_axiom tm_graphviz tm_maple_5 tm_r tm_shell
${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/TeXmacs/bin/${f}
.endfor
.include <bsd.port.mk>