57 lines
1.3 KiB
Makefile
57 lines
1.3 KiB
Makefile
# $OpenBSD: Makefile,v 1.4 2010/11/19 07:23:10 espie Exp $
|
|
|
|
COMMENT= constrained approximate minimum degree
|
|
|
|
VERSION= 2.2.1
|
|
DISTNAME= CAMD-${VERSION}
|
|
PKGNAME= ${DISTNAME:L}
|
|
REVISION= 0
|
|
SHARED_LIBS= camd 0.0
|
|
|
|
CATEGORIES= math
|
|
|
|
HOMEPAGE= http://www.cise.ufl.edu/research/sparse/camd/
|
|
|
|
# LGPL
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
MASTER_SITES= ${HOMEPAGE}/
|
|
WRKDIST= ${WRKDIR}/CAMD
|
|
WRKSRC= ${WRKDIST}/Source
|
|
|
|
BUILD_DEPENDS= math/ufconfig
|
|
RUN_DEPENDS= math/ufconfig
|
|
|
|
MAKE_FILE= ${FILESDIR}/Makefile
|
|
MAKE_ENV= SHLIB_MAJOR=${LIBcamd_VERSION:R} \
|
|
SHLIB_MINOR=${LIBcamd_VERSION:E}
|
|
MAKE_FLAGS= CSRC="${CSRC}"
|
|
FAKE_FLAGS= LIBDIR=${LOCALBASE}/lib DEBUGLIBS=no
|
|
CFLAGS+= -I${WRKDIST}/Include -I${LOCALBASE}/include
|
|
|
|
CSRC= aat 1 2 dump postorder defaults order control info valid preprocess
|
|
|
|
# See bsd.lib.mk:162
|
|
.if ${MACHINE_ARCH:Mmips64*}
|
|
PKG_ARGS+= -Dno_mips64=0
|
|
.else
|
|
PKG_ARGS+= -Dno_mips64=1
|
|
.endif
|
|
|
|
pre-configure:
|
|
@echo "#define DINT 1" > ${WRKSRC}/di.c
|
|
@echo "#define DLONG 1" > ${WRKSRC}/dl.c
|
|
.for s in ${CSRC}
|
|
@cd ${WRKSRC} && cat di.c camd_${s}.c > camd_i_${s}.c
|
|
@cd ${WRKSRC} && cat dl.c camd_${s}.c > camd_l_${s}.c
|
|
.endfor
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/include/camd
|
|
${INSTALL_DATA} ${WRKDIST}/Include/camd.h ${PREFIX}/include/camd
|
|
|
|
.include <bsd.port.mk>
|