[csw-devel] SF.net SVN: gar:[7721] csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Dec 23 10:31:15 CET 2009
Revision: 7721
http://gar.svn.sourceforge.net/gar/?rev=7721&view=rev
Author: wahwah
Date: 2009-12-23 09:31:15 +0000 (Wed, 23 Dec 2009)
Log Message:
-----------
mysql5: Making the mysql-5.1.x branch more similar to the trunk
Modified Paths:
--------------
csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile
Modified: csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile 2009-12-23 09:13:34 UTC (rev 7720)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x/Makefile 2009-12-23 09:31:15 UTC (rev 7721)
@@ -3,10 +3,16 @@
# $Id$
GARNAME = mysql5
-GARVERSION = 5.1.40
+BASE_VERSION = 5.1
+PATCHLEVEL = 40
+GARVERSION = $(BASE_VERSION).$(PATCHLEVEL)
CATEGORIES = server
+# Useful when making a series of builds on the same day
+GARFLAVOR ?= DBG
+
DISTNAME = mysql-$(GARVERSION)
+SPKG_SOURCEURL = http://www.mysql.com/
DESCRIPTION = Multithreaded SQL database server
define BLURB
@@ -14,24 +20,32 @@
(Structured Query Language) database server.
endef
-GARFLAVOR = DBG
-
# Change prefix to /opt/csw/mysql5
prefix = /opt/csw/mysql5
+localstatedir = /var/opt/csw/mysql5
sysconfdir = /etc/opt/csw/mysql5
-localstatedir = /var/opt/csw/mysql5
+
+# Where to put the init script
global_sysconfdir = /etc/opt/csw
+# Where to link the binaries
global_bindir = /opt/csw/bin
-INITSMF = $(global_sysconfdir)/init\.d/cswmysql5
+INITSMF = $(global_sysconfdir)/init\.d/cswmysql-$(BASE_VERSION)
+PACKAGES = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
+PACKAGES += CSWmysql5rt CSWmysql5test
+
PATCHFILES = 0001-Use-libc-not-libcrypt.patch
PATCHFILES += 0002-cast-user_info-pw_gid-to-gid_t.patch
PATCHFILES += 0003-OpenCSW-perl-for-tests.patch
PATCHFILES += 0004-basedir-and-datadir-in-the-cnf-files.patch
-PACKAGES = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
-PACKAGES += CSWmysql5rt CSWmysql5test
+SPKG_DESC_CSWmysql5 = Multithreaded SQL database
+SPKG_DESC_CSWmysql5bench = MySQL 5 benchmarking
+SPKG_DESC_CSWmysql5client = MySQL 5 client binaries
+SPKG_DESC_CSWmysql5devel = MySQL 5 header files
+SPKG_DESC_CSWmysql5rt = MySQL 5 runtime files
+SPKG_DESC_CSWmysql5test = MySQL 5 testing files
CATALOGNAME_CSWmysql5 = $(GARNAME)
CATALOGNAME_CSWmysql5bench = $(GARNAME)bench
@@ -46,13 +60,6 @@
INCOMPATIBLE_PKGS_CSWmysql5devel = CSWmysql4devel
INCOMPATIBLE_PKGS_CSWmysql5test = CSWmysql4test
-SPKG_DESC_CSWmysql5 = Multithreaded SQL database
-SPKG_DESC_CSWmysql5bench = MySQL 5 benchmarking
-SPKG_DESC_CSWmysql5client = MySQL 5 client binaries
-SPKG_DESC_CSWmysql5devel = MySQL 5 header files
-SPKG_DESC_CSWmysql5rt = MySQL 5 runtime files
-SPKG_DESC_CSWmysql5test = MySQL 5 testing files
-
# Defining the client programs, which are going to pick up the 32- and 64-bit
# binaries, symbolic links, isaexec stuff and man pages.
CSWmysql5client_programs = myisamlog
@@ -72,8 +79,32 @@
CSWmysql5client_programs += perror
CSWmysql5client_programs += replace
+# Without this EXTRA_LD_OPTIONS setting, /opt/csw/bin/mysql fails with a shared
+# library not found. EXTRA_LIB was tried too, but did not work, as the -R path
+# ended up with having two $ISALIST tokens.
+#
+# Without this setting it looks for:
+# /opt/csw/mysql5/lib/amd64/libmysqlclient.so.15
+# The library is at:
+# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
+EXTRA_LD_OPTIONS = -R$(libdir)/\$$ISALIST/mysql
+
+COMMON_CFLAGS = -mt -fsimple=1 -ftrap=%none -xbuiltin=%all -xlibmil -xlibmopt
+
+EXTRA_CFLAGS = $(EXTRA_CFLAGS_$(GARCH))
+EXTRA_CFLAGS_sparc = -xO4 -xstrconst $(COMMON_CFLAGS)
+EXTRA_CFLAGS_i386 = -xO3 -nofstore -xregs=no%frameptr $(COMMON_CFLAGS)
+
+EXTRA_CXXFLAGS = $(EXTRA_CXXFLAGS_$(GARCH))
+EXTRA_CXXFLAGS_sparc = -xO4 $(COMMON_CFLAGS)
+EXTRA_CXXFLAGS_i386 = -xO3 -nofstore -xregs=no%frameptr $(COMMON_CFLAGS)
+
+
CSWmysql5devel_programs += mysql_config
+# Enable 64 bits build
+BUILD64 = 1
+
PKGFILES_CSWmysql5bench = $(prefix)/sql-bench.*
PKGFILES_CSWmysql5client = $(bindir)
PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
@@ -97,7 +128,7 @@
REQUIRED_PKGS_CSWmysql5devel = CSWmysql5
REQUIRED_PKGS_CSWmysql5test = CSWmysql5 CSWperl
-MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/
+MASTER_SITES = ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-$(BASE_VERSION)/
DISTFILES = mysql-$(GARVERSION).tar.gz
DISTFILES += cswmysql5 quick_start-csw README.CSW ChangeLog
DISTFILES += CSWmysql5.preinstall
@@ -112,25 +143,17 @@
# MySQL-5.1.40 doesn't compile without setting EXTRA_INC.
EXTRA_INC = /opt/csw/include
EXTRA_LIB = /opt/csw/lib
-EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
-EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
+# EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
+# EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
-# Without this EXTRA_LD_OPTIONS setting, /opt/csw/bin/mysql fails with a shared
-# library not found. EXTRA_LIB was tried too, but did not work, as the -R path
-# ended up with having two $ISALIST tokens.
-#
-# Without this setting it looks for:
-# /opt/csw/mysql5/lib/amd64/libmysqlclient.so.15
-# The library is at:
-# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
-EXTRA_LD_OPTIONS = -R/opt/csw/mysql5/lib/\$$ISALIST/mysql
-
# Set ./configure options
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --disable-assembler
-CONFIGURE_ARGS += --without-docs
+# Why not have a docs package?
+# CONFIGURE_ARGS += --without-docs
CONFIGURE_ARGS += --enable-local-infile
-CONFIGURE_ARGS += --with-extra-charsets=all
+#CONFIGURE_ARGS += --with-extra-charsets=all
+CONFIGURE_ARGS += --with-extra-charsets=complex
CONFIGURE_ARGS += --with-low-memory
CONFIGURE_ARGS += --with-pthread
CONFIGURE_ARGS += --with-readline
@@ -138,49 +161,62 @@
CONFIGURE_ARGS += --with-ssl=/opt/csw
CONFIGURE_ARGS += --with-plugins=max-no-ndb
CONFIGURE_ARGS += --with-comment
+CONFIGURE_ARGS += --with-mysqld-libs=-lmtmalloc
+CONFIGURE_ARGS += --with-big-tables
+CONFIGURE_ARGS += --enable-thread-safe-client
CONFIGURE_ARGS_DBG = --with-debug
CONFIGURE_ARGS += $(CONFIGURE_ARGS_$(GARFLAVOR))
# TODO: Make the tests pass. They don't at the moment.
-# TEST_SCRIPTS =
+SKIPTEST ?= 1
+TEST_SCRIPTS = custom
TEST_TARGETS = check
-# Enable 64 bits build
-BUILD64 = 1
USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
-PROTOTYPE_MODIFIERS = ownmysql
-PROTOTYPE_FILES_ownmysql = /var/opt/csw/mysql5
-PROTOTYPE_USER_ownmysql = mysql
-PROTOTYPE_GROUP_ownmysql = mysql
-PROTOTYPE_PERMS_ownmysql = 0700
-PROTOTYPE_CLASS_ownmysql = ugfiles
+PROTOTYPE_MODIFIERS = dbdir
+PROTOTYPE_FILES_dbdir = $(localstatedir)
+PROTOTYPE_USER_dbdir = mysql
+PROTOTYPE_GROUP_dbdir = mysql
+PROTOTYPE_PERMS_dbdir = 0700
+PROTOTYPE_CLASS_dbdir = ugfiles
SPKG_CLASSES = none ugfiles
include gar/category.mk
-post-install-modulated:
- ginstall -m 755 -d $(DESTDIR)$(localstatedir)
- ginstall -m 755 -d $(DESTDIR)$(datadir)/mysql/doc
- ginstall -m 644 $(FILEDIR)/ChangeLog $(DESTDIR)$(datadir)/mysql/doc
- ginstall -m 644 $(FILEDIR)/README.CSW $(DESTDIR)$(datadir)/mysql/doc
- ginstall -m 755 -d $(DESTDIR)/opt/csw/share/mysql/doc
+CFLAGS := $(filter-out -I%,$(CFLAGS))
+
+test-custom:
+ alias sh=/usr/bin/bash; cd $(WORKSRC)/mysql-test; perl mysql-test-run.pl --mem --big-test --force --skip-test=archive-big --skip-test=/gis/
+
+pre-configure-modulated:
+ # To work around the libtool version mismatch problem.
+ cd $(WORKSRC) && autoreconf --force --install --symlink
+
+post-merge:
+ ginstall -m 755 -d $(PKGROOT)$(localstatedir)
+ ginstall -m 755 -d $(PKGROOT)$(datadir)/mysql/doc
+ ginstall -m 644 $(FILEDIR)/ChangeLog $(PKGROOT)$(datadir)/mysql/doc
+ ginstall -m 644 $(FILEDIR)/README.CSW $(PKGROOT)$(datadir)/mysql/doc
+ ginstall -m 755 -d $(PKGROOT)/opt/csw/share/mysql/doc
ln -sf ../../../mysql5/share/mysql/doc/README.CSW \
- $(DESTDIR)/opt/csw/share/mysql/doc/README.CSW
- ginstall -m 755 -d $(DESTDIR)/etc/opt/csw/init.d
- ginstall -m 755 $(FILEDIR)/cswmysql5 $(DESTDIR)/etc/opt/csw/init.d
- ginstall -m 755 $(FILEDIR)/quick_start-csw $(DESTDIR)$(datadir)/mysql
- ginstall -m 755 -d $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+ $(PKGROOT)/opt/csw/share/mysql/doc/README.CSW
+ ginstall -m 755 -d $(PKGROOT)/etc/opt/csw/init.d
+ ginstall -m 755 $(FILEDIR)/cswmysql5 $(PKGROOT)/etc/opt/csw/init.d
+ ginstall -m 755 $(FILEDIR)/quick_start-csw $(PKGROOT)$(datadir)/mysql
+ ginstall -m 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
ginstall -m 644 $(FILEDIR)/cswusergroup \
- $(DESTDIR)$(global_sysconfdir)/pkg/CSWmysql5
+ $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
# A symlink for mysql5 include files
- ginstall -m 755 -d $(DESTDIR)/opt/csw/include
- ln -s ../mysql5/include/mysql $(DESTDIR)/opt/csw/include/mysql
+ ginstall -m 755 -d $(PKGROOT)/opt/csw/include
+ ln -s ../mysql5/include/mysql $(PKGROOT)/opt/csw/include/mysql
# Create symlinks to binaries
- ginstall -m 755 -d $(DESTDIR)$(global_bindir)
- for f in $(DESTDIR)$(bindir)/*; do \
- ln -s ../mysql5/bin/`basename $$f` $(DESTDIR)$(global_bindir)/`basename $$f`; \
+ ginstall -m 755 -d $(PKGROOT)$(global_bindir)
+ for f in $(PKGROOT)$(bindir)/*; do \
+ ln -s ../mysql5/bin/`basename $$f` \
+ $(PKGROOT)$(global_bindir)/`basename $$f`; \
done
+ gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64
@$(MAKECOOKIE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list