2013-04-13 20:03:34 +02:00
|
|
|
# Created by: Pedro F. Giffuni <giffunip@asme.org>
|
2003-07-19 06:33:07 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= lp_solve
|
2011-03-07 14:10:06 +01:00
|
|
|
PORTVERSION= 5.5.2.0
|
2003-07-19 06:33:07 +02:00
|
|
|
CATEGORIES= math
|
2009-08-22 02:28:34 +02:00
|
|
|
MASTER_SITES= SF/lpsolve/lpsolve/${PORTVERSION}
|
2006-09-02 12:03:52 +02:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}_source
|
2003-07-19 06:33:07 +02:00
|
|
|
|
2010-07-07 00:21:14 +02:00
|
|
|
MAINTAINER= mayo@oyam.ca
|
2003-07-19 06:33:07 +02:00
|
|
|
COMMENT= Linear Programming Solver
|
|
|
|
|
2008-08-19 00:08:22 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION:R:R}
|
2008-05-16 15:22:11 +02:00
|
|
|
|
2008-08-19 00:08:22 +02:00
|
|
|
USE_LDCONFIG= yes
|
2006-10-10 04:05:45 +02:00
|
|
|
|
2011-03-04 16:13:44 +01:00
|
|
|
.if defined(TMPDIR)
|
2013-04-13 20:03:34 +02:00
|
|
|
BUILDENV= ${SETENV} TMPDIR="${TMPDIR}"
|
2011-03-04 16:13:44 +01:00
|
|
|
.endif
|
|
|
|
|
2009-08-08 08:24:28 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2014-09-11 17:17:28 +02:00
|
|
|
# probably need to add mips here as well
|
|
|
|
.if ${ARCH} == "i386" || ${ARCH} == "powerpc" || ${ARCH} == armv6
|
2009-08-08 08:24:28 +02:00
|
|
|
LPSOLVE_ARCH= ux32
|
|
|
|
.else
|
|
|
|
LPSOLVE_ARCH= ux64
|
|
|
|
.endif
|
|
|
|
|
2008-08-19 00:08:22 +02:00
|
|
|
post-patch:
|
|
|
|
@${FIND} ${WRKSRC} -name "ccc" | ${XARGS} ${REINPLACE_CMD} -e \
|
|
|
|
"s|^c=.*$$|c='${CC}'|g ; \
|
|
|
|
s|^opts=.*$$|opts='${CFLAGS}'|g ; \
|
|
|
|
s|-fpic|-fPIC|g ; \
|
|
|
|
s|-ldl||g"
|
2003-07-19 06:33:07 +02:00
|
|
|
|
2006-09-02 12:03:52 +02:00
|
|
|
do-build:
|
2011-03-04 16:13:44 +01:00
|
|
|
cd ${WRKSRC}/lp_solve ; ${BUILDENV} ${SH} -x ccc
|
|
|
|
cd ${WRKSRC}/demo ; ${BUILDENV} ${SH} -x ccc
|
|
|
|
cd ${WRKSRC}/lpsolve55 ; ${BUILDENV} ${SH} -x ccc
|
2003-07-19 06:33:07 +02:00
|
|
|
|
|
|
|
do-install:
|
2014-02-05 10:28:07 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/lp_solve/bin/${LPSOLVE_ARCH}/lp_solve ${STAGEDIR}${PREFIX}/bin
|
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/include/lpsolve
|
2009-08-08 08:24:28 +02:00
|
|
|
.for i in declare.h fortify.h ini.h lp_*.h lpkit.h lpsolve.h ufortify.h yacc_read.h
|
2014-02-05 10:28:07 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${PREFIX}/include/lpsolve
|
2008-08-19 00:08:22 +02:00
|
|
|
.endfor
|
2009-08-08 08:24:28 +02:00
|
|
|
.for i in liblpsolve55.a liblpsolve55.so
|
2014-02-05 10:28:07 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/lpsolve55/bin/${LPSOLVE_ARCH}/${i} ${STAGEDIR}${PREFIX}/lib
|
2008-08-19 00:08:22 +02:00
|
|
|
.endfor
|
2014-02-05 10:28:07 +01:00
|
|
|
${LN} -sf liblpsolve55.so ${STAGEDIR}${PREFIX}/lib/liblpsolve55.so.1
|
2008-08-19 00:08:22 +02:00
|
|
|
|
2009-08-08 08:24:28 +02:00
|
|
|
.include <bsd.port.post.mk>
|