mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
e87ee9e2a8
- STRIP shared library
55 lines
1.4 KiB
Makefile
55 lines
1.4 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= libtommath
|
|
PORTVERSION= 0.42.0
|
|
CATEGORIES= math
|
|
MASTER_SITES= http://libtom.org/files/
|
|
DISTNAME= ltm-${PORTVERSION}
|
|
|
|
MAINTAINER= gahr@FreeBSD.org
|
|
COMMENT= Comprehensive, modular, and portable mathematical routines
|
|
|
|
OPTIONS_DEFINE= DOCS SHARED
|
|
SHARED_DESC= Build shared library
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
USES= gmake
|
|
USE_BZIP2= yes
|
|
ALL_TARGET= default
|
|
CFLAGS+= -fPIC
|
|
PORTDOCS= *
|
|
|
|
PLIST_FILES= include/tommath.h include/tommath_class.h \
|
|
include/tommath_superclass.h lib/libtommath.a
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
post-patch:
|
|
${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/makefile.shared
|
|
${REINPLACE_CMD} -e 's|DESTDIR=|DESTDIR?=|' ${WRKSRC}/${MAKEFILE}
|
|
|
|
.if ${PORT_OPTIONS:MSHARED}
|
|
BUILD_DEPENDS= libtool:${PORTSDIR}/devel/libtool
|
|
USE_LDCONFIG= yes
|
|
PLIST_FILES+= lib/libtommath.la lib/libtommath.so.0 lib/libtommath.so
|
|
MAKEFILE= makefile.shared
|
|
.else
|
|
MAKEFILE= makefile
|
|
.endif
|
|
|
|
post-install:
|
|
.if ${PORT_OPTIONS:MSHARED}
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtommath.so.0
|
|
.endif
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/bn.pdf ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/poster.pdf ${STAGEDIR}${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/tommath.pdf ${STAGEDIR}${DOCSDIR}
|
|
|
|
regression-test:
|
|
(cd ${WRKSRC}; \
|
|
${SETENV} ${MAKE_ENV} ${GMAKE} -f ${MAKEFILE} mtest test; \
|
|
./mtest/mtest | ./test)
|
|
|
|
.include <bsd.port.mk>
|