summaryrefslogtreecommitdiff
path: root/databases/p5-DBD-Oracle/Makefile
blob: eb08ea5b0a1f18e556398bfcef361625466f86eb (plain)
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
# $NetBSD: Makefile,v 1.30 2021/05/24 19:49:33 wiz Exp $

DISTNAME=	DBD-Oracle-1.74
PKGNAME=	p5-${DISTNAME}
PKGREVISION=	5
CATEGORIES=	databases perl5
MASTER_SITES=	${MASTER_SITE_PERL_CPAN:=DBD/}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://metacpan.org/release/DBD-Oracle
COMMENT=	Perl DBI/DBD driver for Oracle databases
LICENSE=	${PERL5_LICENSE}

PERL5_PACKLIST=	auto/DBD/Oracle/.packlist

PKG_OPTIONS_VAR=	PKG_OPTIONS.p5-DBD-Oracle

PKG_SUPPORTED_OPTIONS=	# empty
PKG_SUGGESTED_OPTIONS=	# empty

PKG_OPTIONS_REQUIRED_GROUPS=	oralib
PKG_OPTIONS_GROUP.oralib=	lib32 libsys libbase
PKG_SUGGESTED_OPTIONS=		libsys

.include "../../mk/bsd.prefs.mk"
.include "../../mk/bsd.options.mk"

.if !defined(ORACLE_HOME)
PKG_FAIL_REASON+=	"You must set ORACLE_HOME to the location of your Oracle installation"
.elif !exists(${ORACLE_HOME})
PKG_FAIL_REASON+=	"The location of ORACLE_HOME does not exist"
.endif

BUILDLINK_PASSTHRU_DIRS+=	${ORACLE_HOME}

.if !empty(PKG_OPTIONS:Mlib32)
LDFLAGS+=	-L${ORACLE_HOME}/lib32
LDFLAGS+=	${COMPILER_RPATH_FLAG}${ORACLE_HOME}/lib32
.elif !empty(PKG_OPTIONS:Mlibsys)
LDFLAGS+=	-L${ORACLE_HOME}/lib
LDFLAGS+=	${COMPILER_RPATH_FLAG}${ORACLE_HOME}/lib
.elif !empty(PKG_OPTIONS:Mlibbase)
LDFLAGS+=	-L${ORACLE_HOME}
LDFLAGS+=	${COMPILER_RPATH_FLAG}${ORACLE_HOME}
.endif

CFLAGS+=	-I${ORACLE_HOME}/rdbms/public/
LDFLAGS+=	-lclntsh

.include "../../databases/p5-DBI/buildlink3.mk"

.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"