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

87 lines
2.2 KiB
Makefile

PORTNAME= avr-libc
PORTVERSION= 2.0.0
PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= SAVANNAH
MAINTAINER= joerg@FreeBSD.org
COMMENT= C and math library for the Atmel AVR controller family
WWW= https://savannah.nongnu.org/projects/avr-libc
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= avr-as:devel/binutils@avr \
avr-ld:devel/binutils@avr \
avr-gcc:devel/avr-gcc
RUN_DEPENDS= avr-as:devel/binutils@avr \
avr-ld:devel/binutils@avr \
avr-gcc:devel/avr-gcc
OPTIONS_DEFINE= DOXYGEN
.include <bsd.port.options.mk>
.if ! ${PORT_OPTIONS:MDOXYGEN}
.undef WITHOUT_AVRLIBCDOCS= true
.endif
.if ${PORT_OPTIONS:MDOXYGEN}
USES+= tex
USE_TEX= latex:build
BUILD_DEPENDS+= doxygen:devel/doxygen \
fig2dev:print/fig2dev \
jpegtopnm:graphics/netpbm \
dvips:print/tex-dvipsk
.endif
USES= gettext-tools tar:bzip2 gmake
HAS_CONFIGURE= yes
CONFIGURE_ENV= CC=avr-gcc PREFIX=${PREFIX}
.if ${PORT_OPTIONS:MDOXYGEN}
CONFIGURE_ARGS= --build=`./config.guess` --host=avr \
--enable-doc --disable-versioned-doc --prefix=${PREFIX} \
--mandir=${PREFIX}/share/doc/avr-libc/man
PLIST_DOC= ${PKGDIR}/pkg-plist.doc
.else
CONFIGURE_ARGS= --build=`./config.guess` --host=avr --prefix=${PREFIX}
PLIST_DOC=
.endif
post-patch:
.if ! ${PORT_OPTIONS:MDOXYGEN}
${REINPLACE_CMD} -e '/SUBDIRS/s,examples,,' ${WRKSRC}/doc/Makefile.in
.endif
do-install:
${RM} ${TMPPLIST}
.if ${PORT_OPTIONS:MDOXYGEN}
(cd ${BUILD_WRKSRC}/doc/api/avr-libc-user-manual && \
${FIND} . -type f \
\( -name '*.html' -or -name '*.css' -or \
-name '*.jpg' -or -name '*.png' \) |\
${GREP} -v '/search/' |\
${SORT} |\
${SED} -e 's|^\.|share/doc/avr-libc/avr-libc-user-manual|' \
>> ${TMPPLIST})
(cd ${BUILD_WRKSRC}/doc/api/man/man3 && \
${FIND} . -type f |\
${SORT} |\
${SED} -e 's|^\.|share/doc/avr-libc/man/man3|' \
>> ${TMPPLIST})
${CAT} ${PLIST_DOC} >> ${TMPPLIST}
.endif
${CAT} ${PLIST} >> ${TMPPLIST}
@for file in ${PLIST_FILES}; do \
${ECHO_CMD} $${file} >> ${TMPPLIST}; \
done
(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE_CMD} ${MAKE_ARGS} install)
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/AUTHORS \
${STAGEDIR}/${DOCSDIR}
.include <bsd.port.mk>