freebsd-ports/math/eukleides/Makefile
Muhammad Moinur Rahman 721e5776c9 Mk/**tex.mk: Convert bsd.tex.mk to USES=tex
- Update all the consumers to use USES=tex
- USE_TEX=yes is the old way of writing USES=tex which has been removed
  and replaced in all ports
- Almost all of the USE_TEX features remains unchanged
- Some consumers had the same variables defined both in the mk
  infrastructure and also in the ports which have been removed from the
  ports as those are redundant.

In case any of the consumers are failing to build please make sure that
the nexessary USES=tex is there. Unlike previous USE_TEX=yes will no
longer load the required VARS for tex and related dependencies.

Reviewed by:	portmgr
Approved by:	portmgr (blanket)
2022-12-19 08:44:58 -06:00

60 lines
1.6 KiB
Makefile

PORTNAME= eukleides
PORTVERSION= 1.5.4
PORTREVISION= 6
CATEGORIES= math
MASTER_SITES= http://www.eukleides.org/files/
MAINTAINER= ashish@FreeBSD.org
COMMENT= Euclidean geometry drawing language
WWW= http://www.eukleides.org/
LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING
RUN_DEPENDS= pstoedit:graphics/pstoedit \
getopt>=0:misc/getopt
USES= bison gettext iconv gmake readline tar:bzip2 tex
USE_TEX= latex
INSTALL_TARGET= install PREFIX=${STAGEDIR}${PREFIX}
# Fix build with clang11
CFLAGS+= -fcommon
PORTDOCS= de.pdf fr.pdf
PORTEXAMPLES= greenwich.euk sundial.euk vonkoch.euk
OPTIONS_DEFINE= DOCS EXAMPLES
DOCS_USES= makeinfo
DOCS_USE= TEX=pdftex:build
DOCS_INFO= eukleides
post-patch:
@${GREP} -lR "#!/bin/bash" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|#!/bin/bash|#!/bin/sh|g'
@${GREP} -lR "ginstall-info" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|ginstall-info|install-info|g'
@${EGREP} -lR "%%[[:alpha:]]+%%" ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
-e "s|%%PREFIX%%|${PREFIX}|g" \
-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
-e "s|%%EXAMPLESDIR%%|\$${PREFIX}/${EXAMPLESDIR_REL}|g" \
-e "s|%%DOCSDIR%%|\$${PREFIX}/${DOCSDIR_REL}|g" \
-e "s|%%CFLAGS%%|${CFLAGS}|g"
@${GREP} -lFR "gcc" ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \
-e "s|gcc|${CC}|g"
post-patch-DOCS-off:
@${REINPLACE_CMD} -e '/^install:/ s/install_doc//g' \
-e '/^all:/ s/doc//g' ${WRKSRC}/Makefile
post-patch-EXAMPLES-off:
@${REINPLACE_CMD} -e 's/install_exm$$//g' ${WRKSRC}/Makefile
pre-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
post-install:
@${RM} ${STAGEDIR}${PREFIX}/bin/*.bak*
.include <bsd.port.mk>