summaryrefslogtreecommitdiff
path: root/databases/mysql4-client/Makefile.common
blob: de3978b156a0c495df20cd0cddb57fdf70f38a43 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# $NetBSD: Makefile.common,v 1.19 2004/10/31 09:24:27 grant Exp $

DISTNAME=		mysql-4.1.7
CATEGORIES=		databases
MASTER_SITES=		http://mirrors.sunsite.dk/mysql/Downloads/MySQL-4.1/ \
			ftp://sunsite.dk/mirrors/mysql/Downloads/MySQL-4.1/ \
			ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-4.1/

MAINTAINER=		xtraeme@NetBSD.org
HOMEPAGE=		http://www.mysql.com/

EXTRACT_USING_PAX=	# defined

PATCHDIR=		${.CURDIR}/../../databases/mysql4-server/patches
DISTINFO_FILE=		${.CURDIR}/../../databases/mysql4-server/distinfo

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

# MYSQL_USER		username of the database administrator
# MYSQL_GROUP		group of the database administrator
# MYSQL_DATADIR		home directory of the database administrator and
#			location of the databases
MYSQL_USER?=		mysql
MYSQL_GROUP?=		mysql
MYSQL_DATADIR?=		${VARBASE}/mysql

# MYSQL_CHARSET		default character set
# MYSQL_EXTRA_CHARSET	additonal character set to be compiled in.
#
MYSQL_CHARSET?=		latin1
MYSQL_EXTRA_CHARSET?=	all

USE_BUILDLINK3=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--localstatedir=${MYSQL_DATADIR}
CONFIGURE_ARGS+=	--with-named-z-libs=z
CONFIGURE_ARGS+=	--without-libwrap
CONFIGURE_ARGS+=	--with-named-curses-libs="-lcurses -ltermcap"

# We always use our own readline, either system- or pkgsrc-supplied.
CONFIGURE_ARGS+=	--without-readline

# This forces mysql.info _not_ to be rebuilt.
CONFIGURE_ARGS+=	--without-docs

# Speed up production one-time builds; see "./configure --help" for
# more information on using or disabling this option.
CONFIGURE_ARGS+=	--disable-dependency-tracking

CONFIGURE_ARGS+=	--without-debug
CONFIGURE_ARGS+=	--without-bench
CONFIGURE_ARGS+=	--with-low-memory
CONFIGURE_ARGS+=	--with-openssl=${BUILDLINK_PREFIX.openssl}
CONFIGURE_ARGS+=	--with-vio

CONFIGURE_ARGS+=	--with-charset=${MYSQL_CHARSET}
CONFIGURE_ARGS+=	--with-extra-charsets=${MYSQL_EXTRA_CHARSET}

# Avoid an ICE in gcc2 on sparc64
CONFIGURE_ENV+=		F77=${FALSE}

CPPFLAGS+=		-Dunix

# force HAVE_CURSES_H on Solaris since the configure script is broken
# and does not properly detect this, breaking the build later on.
.if ${OPSYS} == "SunOS"
CFLAGS+=		-DHAVE_CURSES_H
CXXFLAGS+=		-DHAVE_CURSES_H
.endif

USE_LANGUAGES=		c c++
USE_GNU_TOOLS+=		make
USE_PERL5=		# defined
USE_LIBTOOL=		# defined
LDFLAGS+=		${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql

SUBST_CLASSES+=		mk scripts
SUBST_STAGE.mk=		post-extract
SUBST_FILES.mk=		dbug/Makefile.in heap/Makefile.in isam/Makefile.in \
			merge/Makefile.in mysys/Makefile.in \
			strings/Makefile.in
SUBST_SED.mk=		-e "/^install-exec:/s/install-pkglibLIBRARIES//"
SUBST_MESSAGE.mk=	"Fixing Makefiles."
SUBST_STAGE.scripts=	post-extract
SUBST_FILES.scripts=	scripts/mysql_install_db.sh scripts/mysqld_safe.sh	
SUBST_SED.scripts=	-e "s,chown,${CHOWN},g"
SUBST_MESSAGE.scripts=	"Fixing scripts."

.include "../../security/openssl/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"