mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-06 01:57:40 +00:00
f4be34c3e1
amount of memory With hat: portmgr
96 lines
2.8 KiB
Makefile
96 lines
2.8 KiB
Makefile
# ex:ts=8
|
|
# Ports collection makefile for: stlport
|
|
# Date Created: 2 December 1998
|
|
# Whom: Josh Gilliam <josh@quick.net>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= stlport
|
|
PORTVERSION= 5.1.4
|
|
CATEGORIES= devel
|
|
MASTER_SITES= SF
|
|
PKGNAMESUFFIX= -${COMPILER}
|
|
DISTNAME= STLport-${PORTVERSION:S/.b/-b/}
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Adaptation of SGI\'s Standard Template Library
|
|
|
|
USE_BZIP2= yes
|
|
|
|
.if !exists(/usr/include/wchar.h)
|
|
BROKEN= Requires /usr/include/wchar.h for compilation
|
|
.endif
|
|
|
|
WRKSRC= ${WRKDIR}/STLport-${PORTVERSION:S/.b/b/}/build/lib
|
|
PATCH_WRKSRC= ${WRKDIR}/STLport-${PORTVERSION:S/.b/b/}
|
|
USE_GMAKE= yes
|
|
COMPILER?= gcc
|
|
MAKEFILE= ${COMPILER}.mak
|
|
ALL_TARGET= install
|
|
MAKE_ENV+= CC=${CC} CXX=${CXX}
|
|
MAKE_ARGS+= INSTALLDIR=${PREFIX} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
|
|
PTHREAD_LIBS=${PTHREAD_LIBS}
|
|
PLIST_SUB+= COMPILER=${COMPILER} VER=${PORTVERSION} V2=${PORTVERSION:R} \
|
|
V1=${PORTVERSION:R:R}
|
|
|
|
HAS_CONFIGURE= yes
|
|
CONFIGURE_ARGS= --with-lib-motif=${COMPILER}
|
|
USE_LDCONFIG= yes
|
|
PORTDOCS= *
|
|
|
|
OPTIONS= SHORT_STRING_OPTIM "Enable short string optimization." on \
|
|
PTR_SPECIALIZATIONS "Use pointer types specializations." off \
|
|
TEMPLATE_EXPRESSION "Use template expressions for string." off
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if defined(WITHOUT_SHORT_STRING_OPTIM)
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-no-short-string-optim-user_config.h.diff
|
|
.endif
|
|
|
|
.if defined(WITH_PTR_SPECIALIZATIONS)
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ptr_spec-user_config.h.diff
|
|
.endif
|
|
|
|
.if defined(WITH_TEMPLATE_EXPRESSION)
|
|
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-templ-expr-user_config.h.diff
|
|
.endif
|
|
|
|
pre-configure:
|
|
${REINPLACE_CMD} -e 's|gcc|${COMPILER}|' ${WRKSRC}/gcc.mak \
|
|
${WRKSRC}/../test/unit/gcc.mak
|
|
.for lib in stlport stlportg stlportstlg
|
|
${REINPLACE_CMD} -e 's|-l${lib}$$|-l${lib}_${COMPILER}|' \
|
|
${PATCH_WRKSRC}/build/Makefiles/gmake/app/gcc.mak
|
|
.endfor
|
|
.if ${ARCH} != i386
|
|
. for sdir in app lib
|
|
# Cannot build a shared object with libsupc++
|
|
${REINPLACE_CMD} -e 's|-lsupc++|-lstdc++|' \
|
|
${PATCH_WRKSRC}/build/Makefiles/gmake/${sdir}/gcc.mak
|
|
. endfor
|
|
.endif
|
|
|
|
do-install:
|
|
${MKDIR} "${PREFIX}/include/stlport/"
|
|
(cd ${PATCH_WRKSRC}/stlport/ && ${COPYTREE_SHARE} \* ${PREFIX}/include/stlport/)
|
|
(cd ${PATCH_WRKSRC}/lib; ${TAR} cf - *) | (cd ${PREFIX}/lib; ${TAR} xf -)
|
|
${CHOWN} -h ${BINOWN}:${BINGRP} ${PREFIX}/lib/libstlport*
|
|
${FIND} ${PREFIX}/include/stlport -name \*.orig -delete
|
|
.if !defined(NOPORTDOCS)
|
|
@${MKDIR} ${DOCSDIR}
|
|
${INSTALL_DATA} ${PATCH_WRKSRC}/doc/* ${DOCSDIR}
|
|
.endif
|
|
|
|
.ifndef(PACKAGE_BUILDING)
|
|
regression-test:
|
|
(cd ${WRKSRC}/../test/unit && \
|
|
${SETENV} STLPORT_LIB_DIR="${PATCH_WRKSRC}/lib" \
|
|
${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} && \
|
|
(../../../bin/stl_unit_test || ${TRUE}) && \
|
|
(../../../bin-g/stl_unit_test || ${TRUE}) )
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|