aboutsummaryrefslogtreecommitdiffstats
path: root/databases/apq-mysql/Makefile
blob: 13a4dee44a6bea7ede3e868dcf881afdf39df50b (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
48
49
50
51
52
53
54
55
56
57
58
# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$

PORTNAME=   apq-mysql
PORTVERSION=    ${APQ_VERSION}
PORTREVISION=   ${DRV_MYSQL_PR}
CATEGORIES= databases
MASTER_SITES=   LOCAL/marino

MAINTAINER= ports@FreeBSD.org
COMMENT=    APQ Ada95 MySQL database driver

LICENSE=    GPLv2 GMGPL
LICENSE_COMB=   multi

BUILD_DEPENDS=  bash:shells/bash \
        gprbuild:devel/gprbuild \
        ${LOCALBASE}/lib/gnat/apq.gpr:databases/apq
RUN_DEPENDS=    ${LOCALBASE}/lib/gnat/apq.gpr:databases/apq

USES=       ada tar:bzip2 mysql

IGNORE_WITH_MYSQL=  57 80 101m 102m 103m 57p 57w
HAS_CONFIGURE=  yes
WRKPATH=    ${WRKDIR}/build
CONFIGURE_ARGS= --prefix=${PREFIX} \
        --disable-relocatable \
        --work-path=${WRKPATH} \
        --processors=${MAKE_JOBS_NUMBER}

.include "${.CURDIR}/../apq/Makefile.version"

post-patch:
    @${REINPLACE_CMD} -e '/for Object_Dir/d' \
        ${WRKSRC}/src-in/apq-mysql.gpr.in
    ${REINPLACE_CMD} -e 's|processors=2|gprbuild_params="--autoconf=apq.cgpr"|' \
        ${WRKSRC}/configure
    ${REINPLACE_CMD} -e 's|-ws|-ws --autoconf=dummy.cgpr|' \
        ${WRKSRC}/scripts/buildutil.sh

post-configure:
    # The header generated with MySQL 5.6 comes with two instances of
    # double underscore variables, which is illegal in Ada
    ${REINPLACE_CMD} -e 's|__|_|' \
        ${WRKDIR}/build/include/apq-mysql/apq-mysql.ads

do-install:
    ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gnat \
        ${STAGEDIR}${PREFIX}/lib/apq-mysql/static \
        ${STAGEDIR}${PREFIX}/include/apq-mysql
    ${INSTALL_DATA} ${WRKPATH}/include/apq-mysql/* \
        ${STAGEDIR}${PREFIX}/include/apq-mysql
    ${INSTALL_DATA} ${WRKPATH}/lib/apq-mysql/static/*.a* \
        ${STAGEDIR}${PREFIX}/lib/apq-mysql/static
    ${INSTALL_DATA} ${WRKPATH}/lib/gnat/apq-mysql.gpr \
        ${STAGEDIR}${PREFIX}/lib/gnat

.include <bsd.port.mk>