blob: 60bc9c9a0a25cb40ce267ceab6d2de379a1cb449 (
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# $NetBSD: Makefile.common,v 1.28 2007/12/14 13:36:52 tron Exp $
DISTNAME= mysql-5.0.51
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-5.0/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.mysql.com/
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
EXTRACT_USING= pax
# 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
PKG_USERS_VARS+= MYSQL_USER
PKG_GROUPS_VARS+= MYSQL_GROUP
# MYSQL_CHARSET default character set
# MYSQL_EXTRA_CHARSET additional character set to be compiled in.
#
MYSQL_CHARSET?= latin1
MYSQL_EXTRA_CHARSET?= all
CONFIGURE_ARGS+= --localstatedir=${MYSQL_DATADIR:Q}
CONFIGURE_ARGS+= --with-named-z-libs=z
CONFIGURE_ARGS+= --without-libwrap
CONFIGURE_ARGS+= --with-named-curses-libs="-lcurses -ltermcap"
.if ${OPSYS} == "IRIX"
CFLAGS+= -DIRIX5 -DNEEDS_BSTRING_H
# libgen is incorrectly detected
CONFIGURE_ENV+= ac_cv_lib_gen_p2open="no"
.endif
# We always use our own readline, either system- or pkgsrc-supplied.
CONFIGURE_ARGS+= --without-readline
CONFIGURE_ARGS+= --without-libedit
# 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-zlib-dir=${BUILDLINK_PREFIX.zlib:Q}
CONFIGURE_ARGS+= --with-vio
CONFIGURE_ARGS+= --with-charset=${MYSQL_CHARSET:Q}
CONFIGURE_ARGS+= --with-extra-charsets=${MYSQL_EXTRA_CHARSET:Q}
.if !empty(MACHINE_ARCH:Mi386) && ${OPSYS} != "Interix" && \
${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
CONFIGURE_ARGS+= --enable-assembler
.endif
# Avoid an ICE in gcc2 on sparc64
CONFIGURE_ENV+= F77=${FALSE:Q}
CONFIGURE_ENV+= mysql_cv_compress="yes"
CPPFLAGS+= -Dunix
CFLAGS+= -DUSE_OLD_FUNCTIONS # 3.23.x compat
# 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
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth")
CFLAGS+= -DSIGNALS_DONT_BREAK_READ
CXXFLAGS+= -DSIGNALS_DONT_BREAK_READ
CONFIGURE_ENV+= ac_cv_func_pthread_setschedparam=no
CONFIGURE_ENV+= ac_cv_func_pthread_attr_setschedparam=no
.endif
USE_LANGUAGES= c c++
USE_TOOLS+= autoconf gmake perl:run
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql
SUBST_CLASSES= mk
SUBST_STAGE.mk= post-patch
SUBST_FILES.mk= dbug/Makefile.in heap/Makefile.in \
mysys/Makefile.in strings/Makefile.in
SUBST_SED.mk= -e "/^install-exec:/s/install-pkglibLIBRARIES//"
SUBST_MESSAGE.mk= Fixing Makefiles.
SUBST_CLASSES+= scr
SUBST_STAGE.scr= post-patch
SUBST_FILES.scr= scripts/mysql_install_db.sh scripts/mysqld_safe.sh \
scripts/mysql_secure_installation.sh \
support-files/mysql.server.sh
SUBST_SED.scr= -e "s,chown,${CHOWN},g"
SUBST_SED.scr+= -e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g"
SUBST_MESSAGE.scr= Fixing scripts.
# Fix broken shared library detection under Mac OS X
.if ${OPSYS} == Darwin
SUBST_CLASSES+= dylib
SUBST_STAGE.dylib= post-patch
SUBST_FILES.dylib= configure
SUBST_SED.dylib= -e "s|\\\$$shrext_cmds|\\.dylib|g"
.endif
pre-configure:
cd ${WRKSRC} && autoconf
.include "../../devel/zlib/buildlink3.mk"
|