| @@ -1,130 +1,130 @@ | | | @@ -1,130 +1,130 @@ |
1 | # $NetBSD: Makefile.common,v 1.33 2008/09/18 11:50:44 taca Exp $ | | 1 | # $NetBSD: Makefile.common,v 1.34 2008/09/20 07:13:22 sketch Exp $ |
2 | # | | 2 | # |
3 | # used by databases/mysql5-client/Makefile | | 3 | # used by databases/mysql5-client/Makefile |
4 | # used by databases/mysql5-server/Makefile | | 4 | # used by databases/mysql5-server/Makefile |
5 | # | | 5 | # |
6 | | | 6 | |
7 | DISTNAME= mysql-5.0.67 | | 7 | DISTNAME= mysql-5.0.67 |
8 | CATEGORIES= databases | | 8 | CATEGORIES= databases |
9 | MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-5.0/} | | 9 | MASTER_SITES= ${MASTER_SITE_MYSQL:=MySQL-5.0/} |
10 | | | 10 | |
11 | MAINTAINER= pkgsrc-users@NetBSD.org | | 11 | MAINTAINER= sketch@NetBSD.org |
12 | HOMEPAGE= http://www.mysql.com/ | | 12 | HOMEPAGE= http://www.mysql.com/ |
13 | | | 13 | |
14 | USE_LIBTOOL= yes | | 14 | USE_LIBTOOL= yes |
15 | GNU_CONFIGURE= yes | | 15 | GNU_CONFIGURE= yes |
16 | | | 16 | |
17 | .include "../../mk/bsd.prefs.mk" | | 17 | .include "../../mk/bsd.prefs.mk" |
18 | .include "options.mk" | | 18 | .include "options.mk" |
19 | | | 19 | |
20 | EXTRACT_USING= bsdtar | | 20 | EXTRACT_USING= bsdtar |
21 | | | 21 | |
22 | # MYSQL_USER username of the database administrator | | 22 | # MYSQL_USER username of the database administrator |
23 | # MYSQL_GROUP group of the database administrator | | 23 | # MYSQL_GROUP group of the database administrator |
24 | # MYSQL_DATADIR home directory of the database administrator and | | 24 | # MYSQL_DATADIR home directory of the database administrator and |
25 | # location of the databases | | 25 | # location of the databases |
26 | MYSQL_USER?= mysql | | 26 | MYSQL_USER?= mysql |
27 | MYSQL_GROUP?= mysql | | 27 | MYSQL_GROUP?= mysql |
28 | MYSQL_DATADIR?= ${VARBASE}/mysql | | 28 | MYSQL_DATADIR?= ${VARBASE}/mysql |
29 | | | 29 | |
30 | PKG_USERS_VARS+= MYSQL_USER | | 30 | PKG_USERS_VARS+= MYSQL_USER |
31 | PKG_GROUPS_VARS+= MYSQL_GROUP | | 31 | PKG_GROUPS_VARS+= MYSQL_GROUP |
32 | | | 32 | |
33 | # MYSQL_CHARSET default character set | | 33 | # MYSQL_CHARSET default character set |
34 | # MYSQL_EXTRA_CHARSET additional character set to be compiled in. | | 34 | # MYSQL_EXTRA_CHARSET additional character set to be compiled in. |
35 | # | | 35 | # |
36 | MYSQL_CHARSET?= latin1 | | 36 | MYSQL_CHARSET?= latin1 |
37 | MYSQL_EXTRA_CHARSET?= all | | 37 | MYSQL_EXTRA_CHARSET?= all |
38 | | | 38 | |
39 | CONFIGURE_ARGS+= --localstatedir=${MYSQL_DATADIR:Q} | | 39 | CONFIGURE_ARGS+= --localstatedir=${MYSQL_DATADIR:Q} |
40 | CONFIGURE_ARGS+= --with-named-z-libs=z | | 40 | CONFIGURE_ARGS+= --with-named-z-libs=z |
41 | CONFIGURE_ARGS+= --without-libwrap | | 41 | CONFIGURE_ARGS+= --without-libwrap |
42 | | | 42 | |
43 | .if ${OPSYS} == "IRIX" | | 43 | .if ${OPSYS} == "IRIX" |
44 | CFLAGS+= -DIRIX5 -DNEEDS_BSTRING_H | | 44 | CFLAGS+= -DIRIX5 -DNEEDS_BSTRING_H |
45 | # libgen is incorrectly detected | | 45 | # libgen is incorrectly detected |
46 | CONFIGURE_ENV+= ac_cv_lib_gen_p2open="no" | | 46 | CONFIGURE_ENV+= ac_cv_lib_gen_p2open="no" |
47 | .endif | | 47 | .endif |
48 | | | 48 | |
49 | BUILD_DEFS+= VARBASE | | 49 | BUILD_DEFS+= VARBASE |
50 | | | 50 | |
51 | # We always use our own readline. Note that these --without-* settings | | 51 | # We always use our own readline. Note that these --without-* settings |
52 | # are confusing, but they just mean "don't use the included readline | | 52 | # are confusing, but they just mean "don't use the included readline |
53 | # or libedit". | | 53 | # or libedit". |
54 | # | | 54 | # |
55 | CONFIGURE_ARGS+= --without-readline | | 55 | CONFIGURE_ARGS+= --without-readline |
56 | CONFIGURE_ARGS+= --without-libedit | | 56 | CONFIGURE_ARGS+= --without-libedit |
57 | | | 57 | |
58 | # Speed up production one-time builds; see "./configure --help" for | | 58 | # Speed up production one-time builds; see "./configure --help" for |
59 | # more information on using or disabling this option. | | 59 | # more information on using or disabling this option. |
60 | CONFIGURE_ARGS+= --disable-dependency-tracking | | 60 | CONFIGURE_ARGS+= --disable-dependency-tracking |
61 | | | 61 | |
62 | CONFIGURE_ARGS+= --without-debug | | 62 | CONFIGURE_ARGS+= --without-debug |
63 | CONFIGURE_ARGS+= --without-bench | | 63 | CONFIGURE_ARGS+= --without-bench |
64 | CONFIGURE_ARGS+= --with-low-memory | | 64 | CONFIGURE_ARGS+= --with-low-memory |
65 | CONFIGURE_ARGS+= --with-zlib-dir=${BUILDLINK_PREFIX.zlib:Q} | | 65 | CONFIGURE_ARGS+= --with-zlib-dir=${BUILDLINK_PREFIX.zlib:Q} |
66 | CONFIGURE_ARGS+= --with-vio | | 66 | CONFIGURE_ARGS+= --with-vio |
67 | | | 67 | |
68 | CONFIGURE_ARGS+= --with-charset=${MYSQL_CHARSET:Q} | | 68 | CONFIGURE_ARGS+= --with-charset=${MYSQL_CHARSET:Q} |
69 | CONFIGURE_ARGS+= --with-extra-charsets=${MYSQL_EXTRA_CHARSET:Q} | | 69 | CONFIGURE_ARGS+= --with-extra-charsets=${MYSQL_EXTRA_CHARSET:Q} |
70 | | | 70 | |
71 | .if !empty(MACHINE_ARCH:Mi386) && ${OPSYS} != "Interix" && \ | | 71 | .if !empty(MACHINE_ARCH:Mi386) && ${OPSYS} != "Interix" && \ |
72 | ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" | | 72 | ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin" |
73 | CONFIGURE_ARGS+= --enable-assembler | | 73 | CONFIGURE_ARGS+= --enable-assembler |
74 | .endif | | 74 | .endif |
75 | | | 75 | |
76 | # Avoid an ICE in gcc2 on sparc64 | | 76 | # Avoid an ICE in gcc2 on sparc64 |
77 | CONFIGURE_ENV+= F77=${FALSE:Q} | | 77 | CONFIGURE_ENV+= F77=${FALSE:Q} |
78 | CONFIGURE_ENV+= mysql_cv_compress="yes" | | 78 | CONFIGURE_ENV+= mysql_cv_compress="yes" |
79 | | | 79 | |
80 | CPPFLAGS+= -Dunix | | 80 | CPPFLAGS+= -Dunix |
81 | CFLAGS+= -DUSE_OLD_FUNCTIONS # 3.23.x compat | | 81 | CFLAGS+= -DUSE_OLD_FUNCTIONS # 3.23.x compat |
82 | | | 82 | |
83 | # force HAVE_CURSES_H on Solaris since the configure script is broken | | 83 | # force HAVE_CURSES_H on Solaris since the configure script is broken |
84 | # and does not properly detect this, breaking the build later on. | | 84 | # and does not properly detect this, breaking the build later on. |
85 | .if ${OPSYS} == "SunOS" | | 85 | .if ${OPSYS} == "SunOS" |
86 | CFLAGS+= -DHAVE_CURSES_H | | 86 | CFLAGS+= -DHAVE_CURSES_H |
87 | CXXFLAGS+= -DHAVE_CURSES_H | | 87 | CXXFLAGS+= -DHAVE_CURSES_H |
88 | .endif | | 88 | .endif |
89 | | | 89 | |
90 | .include "../../mk/pthread.buildlink3.mk" | | 90 | .include "../../mk/pthread.buildlink3.mk" |
91 | | | 91 | |
92 | .if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth") | | 92 | .if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "pth") |
93 | CFLAGS+= -DSIGNALS_DONT_BREAK_READ | | 93 | CFLAGS+= -DSIGNALS_DONT_BREAK_READ |
94 | CXXFLAGS+= -DSIGNALS_DONT_BREAK_READ | | 94 | CXXFLAGS+= -DSIGNALS_DONT_BREAK_READ |
95 | CONFIGURE_ENV+= ac_cv_func_pthread_setschedparam=no | | 95 | CONFIGURE_ENV+= ac_cv_func_pthread_setschedparam=no |
96 | CONFIGURE_ENV+= ac_cv_func_pthread_attr_setschedparam=no | | 96 | CONFIGURE_ENV+= ac_cv_func_pthread_attr_setschedparam=no |
97 | .endif | | 97 | .endif |
98 | | | 98 | |
99 | USE_LANGUAGES= c c++ | | 99 | USE_LANGUAGES= c c++ |
100 | USE_TOOLS+= autoconf autoheader gmake perl:run | | 100 | USE_TOOLS+= autoconf autoheader gmake perl:run |
101 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql | | 101 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/mysql |
102 | | | 102 | |
103 | SUBST_CLASSES= mk | | 103 | SUBST_CLASSES= mk |
104 | SUBST_STAGE.mk= post-patch | | 104 | SUBST_STAGE.mk= post-patch |
105 | SUBST_FILES.mk= dbug/Makefile.in heap/Makefile.in \ | | 105 | SUBST_FILES.mk= dbug/Makefile.in heap/Makefile.in \ |
106 | mysys/Makefile.in strings/Makefile.in | | 106 | mysys/Makefile.in strings/Makefile.in |
107 | SUBST_SED.mk= -e "/^install-exec:/s/install-pkglibLIBRARIES//" | | 107 | SUBST_SED.mk= -e "/^install-exec:/s/install-pkglibLIBRARIES//" |
108 | SUBST_MESSAGE.mk= Fixing Makefiles. | | 108 | SUBST_MESSAGE.mk= Fixing Makefiles. |
109 | | | 109 | |
110 | SUBST_CLASSES+= scr | | 110 | SUBST_CLASSES+= scr |
111 | SUBST_STAGE.scr= post-patch | | 111 | SUBST_STAGE.scr= post-patch |
112 | SUBST_FILES.scr= scripts/mysql_install_db.sh scripts/mysqld_safe.sh \ | | 112 | SUBST_FILES.scr= scripts/mysql_install_db.sh scripts/mysqld_safe.sh \ |
113 | scripts/mysql_secure_installation.sh \ | | 113 | scripts/mysql_secure_installation.sh \ |
114 | support-files/mysql.server.sh | | 114 | support-files/mysql.server.sh |
115 | SUBST_SED.scr= -e "s,chown,${CHOWN},g" | | 115 | SUBST_SED.scr= -e "s,chown,${CHOWN},g" |
116 | SUBST_SED.scr+= -e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g" | | 116 | SUBST_SED.scr+= -e "s,/bin/sh,${RCD_SCRIPTS_SHELL},g" |
117 | SUBST_MESSAGE.scr= Fixing scripts. | | 117 | SUBST_MESSAGE.scr= Fixing scripts. |
118 | | | 118 | |
119 | # Fix broken shared library detection under Mac OS X | | 119 | # Fix broken shared library detection under Mac OS X |
120 | .if ${OPSYS} == "Darwin" | | 120 | .if ${OPSYS} == "Darwin" |
121 | SUBST_CLASSES+= dylib | | 121 | SUBST_CLASSES+= dylib |
122 | SUBST_STAGE.dylib= post-patch | | 122 | SUBST_STAGE.dylib= post-patch |
123 | SUBST_FILES.dylib= configure | | 123 | SUBST_FILES.dylib= configure |
124 | SUBST_SED.dylib= -e "s|\\\$$shrext_cmds|\\.dylib|g" | | 124 | SUBST_SED.dylib= -e "s|\\\$$shrext_cmds|\\.dylib|g" |
125 | .endif | | 125 | .endif |
126 | | | 126 | |
127 | pre-configure: | | 127 | pre-configure: |
128 | cd ${WRKSRC} && autoconf && autoheader | | 128 | cd ${WRKSRC} && autoconf && autoheader |
129 | | | 129 | |
130 | .include "../../devel/zlib/buildlink3.mk" | | 130 | .include "../../devel/zlib/buildlink3.mk" |