60d1a83c2a
- Replace ${MASTER_SITE_FOO} with FOO. - Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9% of the time.) - Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and no hint of what it should be was present. - Fix some logic. - And generally, make things more simple and easy to understand. While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and SAMBA macros. Also, replace some EXTRACT_SUFX occurences with USES=tar:*. Checked by: make fetch-urlall-list With hat: portmgr Sponsored by: Absolight
92 lines
2.5 KiB
Makefile
92 lines
2.5 KiB
Makefile
# Created by: Joerg Wunsch <joerg@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= avr-libc
|
|
PORTVERSION= 1.8.1
|
|
PORTREVISION= 1
|
|
PORTEPOCH= 1
|
|
CATEGORIES= devel
|
|
MASTER_SITES= SAVANNAH
|
|
|
|
MAINTAINER= joerg@FreeBSD.org
|
|
COMMENT= C and math library for the Atmel AVR controller family
|
|
|
|
LICENSE= BSD2CLAUSE
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
BUILD_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
|
|
avr-ld:${PORTSDIR}/devel/avr-binutils \
|
|
avr-gcc:${PORTSDIR}/devel/avr-gcc
|
|
RUN_DEPENDS= avr-as:${PORTSDIR}/devel/avr-binutils \
|
|
avr-ld:${PORTSDIR}/devel/avr-binutils \
|
|
avr-gcc:${PORTSDIR}/devel/avr-gcc
|
|
|
|
OPTIONS_DEFINE= DOXYGEN
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ! ${PORT_OPTIONS:MDOXYGEN}
|
|
.undef WITHOUT_AVRLIBCDOCS= true
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MDOXYGEN}
|
|
USE_TEX= latex:build
|
|
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen \
|
|
fig2dev:${PORTSDIR}/print/transfig \
|
|
jpegtopnm:${PORTSDIR}/graphics/netpbm \
|
|
dvips:${PORTSDIR}/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
|
|
# Work around the braind***ness introduced by <bsd.cpu.mk> in freebsd-5.
|
|
# Sorry, the user is no longer be able to override the optimization and
|
|
# debugging settings now.
|
|
MAKE_ENV= NO_CPU_CFLAGS=true
|
|
CFLAGS+= -O
|
|
CXXFLAGS+= -O
|
|
|
|
post-patch:
|
|
.if ! ${PORT_OPTIONS:MDOXYGEN}
|
|
${REINPLACE_CMD} -e '/SUBDIRS/s,examples,,' ${WRKSRC}/doc/Makefile.in
|
|
.endif
|
|
|
|
do-install:
|
|
${RM} -f ${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' \) |\
|
|
${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>
|