aboutsummaryrefslogtreecommitdiffstats
path: root/math/lp_solve/Makefile
blob: eb20fb1f53bc552c667f1f704784b158dfe8991a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# New ports collection makefile for:    lp_solve
# Date created:         31 June 2003
# Whom:         Pedro F. Giffuni <giffunip@asme.org>
#
# $FreeBSD$
#

PORTNAME=   lp_solve
PORTVERSION=    5.5
PORTREVISION=   1
CATEGORIES= math
MASTER_SITES=   ${MASTER_SITE_LOCAL} # http://groups.yahoo.com/group/lp_solve/
MASTER_SITE_SUBDIR= maho
DISTNAME=   ${PORTNAME}_${PORTVERSION}_source

MAINTAINER= ports@FreeBSD.org
COMMENT=    Linear Programming Solver

USE_BISON=  yes
WRKSRC=     ${WRKDIR}/${PORTNAME}_${PORTVERSION}
INSTALLS_SHLIB= yes

pre-build:
    @${REINPLACE_CMD} -e 's:%%CFLAGS%%:${CFLAGS}:g' -e 's:%%CC%%:${CC}:g' ${WRKSRC}/lp_solve/ccc ${WRKSRC}/demo/ccc ${WRKSRC}/lpsolve55/ccc

do-build:
    cd ${WRKSRC}/lp_solve  ; ${SH} -x ccc
    cd ${WRKSRC}/demo      ; ${SH} -x ccc
    cd ${WRKSRC}/lpsolve55 ; ${SH} -x ccc

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/lp_solve/lp_solve ${PREFIX}/bin
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_PROGRAM} ${WRKSRC}/demo/demo ${EXAMPLESDIR}
    ${MKDIR} ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_lib.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_types.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_utils.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_Hash.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_matrix.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_mipbb.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lp_SOS.h ${PREFIX}/include/lpsolve
    ${INSTALL_DATA} ${WRKSRC}/lpsolve55/liblpsolve55.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}/lpsolve55/liblpsolve55.so ${PREFIX}/lib
    ${LN} -sf ${PREFIX}/lib/liblpsolve55.so ${PREFIX}/lib/liblpsolve55.so.1

.include <bsd.port.mk>