[csw-devel] SF.net SVN: gar:[7783] csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Dec 28 20:47:28 CET 2009


Revision: 7783
          http://gar.svn.sourceforge.net/gar/?rev=7783&view=rev
Author:   wahwah
Date:     2009-12-28 19:47:28 +0000 (Mon, 28 Dec 2009)

Log Message:
-----------
mysql5: Added symlinks to allow other programs to find the shared libraries. http://www.opencsw.org/bugtrack/view.php?id=4098

Modified Paths:
--------------
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw/Makefile

Property Changed:
----------------
    csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw/


Property changes on: csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw
___________________________________________________________________
Modified: svn:externals
   - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-git

   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-checkpkg


Modified: csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw/Makefile
===================================================================
--- csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw/Makefile	2009-12-28 14:18:44 UTC (rev 7782)
+++ csw/mgar/pkg/mysql5/branches/mysql-5.1.x-optcsw/Makefile	2009-12-28 19:47:28 UTC (rev 7783)
@@ -2,14 +2,15 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-GARNAME = mysql5
+PROJ_NAME = mysql
+GARNAME = $(PROJ_NAME)5
 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
+GARFLAVOR ?= DBG
 
 DISTNAME = mysql-$(GARVERSION)
 SPKG_SOURCEURL = http://www.mysql.com/
@@ -20,137 +21,152 @@
   (Structured Query Language) database server.
 endef
 
-bindir_install = $(prefix)/bin/$(GARNAME)/$(BASE_VERSION)
-datadir=$(prefix)/share/$(GARNAME)/$(BASE_VERSION)
-docdir=$(prefix)/share/doc/$(GARNAME)/$(BASE_VERSION)
-includedir=$(prefix)/include/$(GARNAME)/$(BASE_VERSION)
-infodir=$(prefix)/share/$(GARNAME)/$(BASE_VERSION)/info
-libdir_install =$(prefix)/lib/$(GARNAME)/$(BASE_VERSION)
-libexecdir_install =$(prefix)/libexec/$(GARNAME)/$(BASE_VERSION)
-lispdir=$(prefix)/share/$(GARNAME)/$(BASE_VERSION)/emacs/site-lisp
-localstatedir = /var$(prefix)/$(GARNAME)/$(BASE_VERSION)
-mandir=$(prefix)/share/$(GARNAME)/$(BASE_VERSION)/man
-sbindir_install = $(prefix)/sbin/$(GARNAME)/$(BASE_VERSION)
-sharedstatedir=$(prefix)/share/$(GARNAME)/$(BASE_VERSION)
-sourcedir=$(prefix)/src/$(GARNAME)/$(BASE_VERSION)
-sysconfdir = /etc$(prefix)/$(GARNAME)/$(BASE_VERSION)
+bindir_install = $(prefix)/libexec/$(PROJ_NAME)/$(BASE_VERSION)/bin
+datadir = $(prefix)/share/$(PROJ_NAME)/$(BASE_VERSION)
+docdir = $(prefix)/share/doc/$(PROJ_NAME)/$(BASE_VERSION)
+includedir = $(prefix)/include/$(PROJ_NAME)/$(BASE_VERSION)
+infodir = $(prefix)/share/$(PROJ_NAME)/$(BASE_VERSION)/info
+libdir_install = $(prefix)/lib/$(PROJ_NAME)/$(BASE_VERSION)
+libexecdir_install = $(prefix)/libexec/$(PROJ_NAME)/$(BASE_VERSION)
+lispdir = $(prefix)/share/$(PROJ_NAME)/$(BASE_VERSION)/emacs/site-lisp
+localstatedir = /var$(prefix)/$(PROJ_NAME)/$(BASE_VERSION)
+mandir = $(prefix)/share/$(PROJ_NAME)/$(BASE_VERSION)/man
+sbindir_install = $(prefix)/sbin/$(PROJ_NAME)/$(BASE_VERSION)
+sharedstatedir = $(prefix)/share/$(PROJ_NAME)/$(BASE_VERSION)
+sourcedir = $(prefix)/src/$(PROJ_NAME)/$(BASE_VERSION)
+sysconfdir = /etc$(prefix)/$(PROJ_NAME)/$(BASE_VERSION)
 
 # Where to put the init script
-global_sysconfdir = /etc$(prefix)
+global_sysconfdir = /etc/opt/csw
 # Where to link the binaries
-global_bindir = /opt$(prefix)
+global_bindir = /opt/csw/bin
 
-INITSMF = $(global_sysconfdir)/init\.d/cswmysql-$(BASE_VERSION)
+INITSMF = $(global_sysconfdir)/init\.d/csw$(GARNAME)
 
-PACKAGES  = CSWmysql5 CSWmysql5bench CSWmysql5client CSWmysql5devel
-PACKAGES += CSWmysql5rt CSWmysql5test
+PACKAGES  = CSW$(GARNAME) CSW$(GARNAME)bench CSW$(GARNAME)client CSW$(GARNAME)devel
+PACKAGES += CSW$(GARNAME)rt CSW$(GARNAME)test
 
 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
 
-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
+SPKG_DESC_CSW$(GARNAME)       = Multithreaded SQL database
+SPKG_DESC_CSW$(GARNAME)bench  = MySQL $(BASE_VERSION) benchmarking
+SPKG_DESC_CSW$(GARNAME)client = MySQL $(BASE_VERSION) client binaries
+SPKG_DESC_CSW$(GARNAME)devel  = MySQL $(BASE_VERSION) header files
+SPKG_DESC_CSW$(GARNAME)rt     = MySQL $(BASE_VERSION) runtime files
+SPKG_DESC_CSW$(GARNAME)test   = MySQL $(BASE_VERSION) testing files
 
+CATALOGNAME_CSW$(GARNAME)       = $(GARNAME)
+CATALOGNAME_CSW$(GARNAME)bench  = $(GARNAME)bench
+CATALOGNAME_CSW$(GARNAME)client = $(GARNAME)client
+CATALOGNAME_CSW$(GARNAME)devel  = $(GARNAME)devel
+CATALOGNAME_CSW$(GARNAME)rt     = $(GARNAME)rt
+CATALOGNAME_CSW$(GARNAME)test   = $(GARNAME)test
 
-CATALOGNAME_CSWmysql5       = $(GARNAME)
-CATALOGNAME_CSWmysql5bench  = $(GARNAME)bench
-CATALOGNAME_CSWmysql5client = $(GARNAME)client
-CATALOGNAME_CSWmysql5devel  = $(GARNAME)devel
-CATALOGNAME_CSWmysql5rt     = $(GARNAME)rt
-CATALOGNAME_CSWmysql5test   = $(GARNAME)test
 
-INCOMPATIBLE_PKGS_CSWmysql5bench  = CSWmysql4bench
-INCOMPATIBLE_PKGS_CSWmysql5client = CSWmysql4client
-INCOMPATIBLE_PKGS_CSWmysql5       = CSWmysql4
-INCOMPATIBLE_PKGS_CSWmysql5devel  = CSWmysql4devel
-INCOMPATIBLE_PKGS_CSWmysql5test   = CSWmysql4test
+ARCHALL_CSWmysql5bench = 1
 
 # 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
-CSWmysql5client_programs += myisampack
-CSWmysql5client_programs += mysql
-CSWmysql5client_programs += mysqlaccess
-CSWmysql5client_programs += mysqladmin
-CSWmysql5client_programs += mysqlbin
-CSWmysql5client_programs += mysqlbinlog
-CSWmysql5client_programs += mysqlcheck
-CSWmysql5client_programs += mysql_client_test
-CSWmysql5client_programs += mysqldump
-CSWmysql5client_programs += mysqlhotcopy
-CSWmysql5client_programs += mysqlimport
-CSWmysql5client_programs += mysqlshow
-CSWmysql5client_programs += mysql_zap
-CSWmysql5client_programs += perror
-CSWmysql5client_programs += replace
+CSW$(GARNAME)client_programs  = myisamlog
+CSW$(GARNAME)client_programs += myisampack
+CSW$(GARNAME)client_programs += mysql
+CSW$(GARNAME)client_programs += mysqlaccess
+CSW$(GARNAME)client_programs += mysqladmin
+CSW$(GARNAME)client_programs += mysqlbin
+CSW$(GARNAME)client_programs += mysqlbinlog
+CSW$(GARNAME)client_programs += mysqlcheck
+CSW$(GARNAME)client_programs += mysql_client_test
+CSW$(GARNAME)client_programs += mysqldump
+CSW$(GARNAME)client_programs += mysqlhotcopy
+CSW$(GARNAME)client_programs += mysqlimport
+CSW$(GARNAME)client_programs += mysqlshow
+CSW$(GARNAME)client_programs += mysql_zap
+CSW$(GARNAME)client_programs += perror
+CSW$(GARNAME)client_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
+# /opt/csw/$(GARNAME)/lib/amd64/libmysqlclient.so.15
 # The library is at:
-# /opt/csw/mysql5/lib/amd64/mysql/libmysqlclient.so.15
+# /opt/csw/$(GARNAME)/lib/amd64/mysql/libmysqlclient.so.15
 EXTRA_LD_OPTIONS  = -R$(libdir)/\$$ISALIST/mysql
 
-CSWmysql5devel_programs += mysql_config
+CSW$(GARNAME)devel_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)))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5client += $(foreach bin_name,$(CSWmysql5client_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),$(mandir)/man1/$(bin_name)\.1)
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/bin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(foreach bin_name,$(CSWmysql5devel_programs),/opt/csw/sbin/$(bin_name))
-PKGFILES_CSWmysql5devel  += $(mandir)/man1/mysql_config\.1
-PKGFILES_CSWmysql5devel  += $(prefix)/include.*
-PKGFILES_CSWmysql5devel  += /opt/csw/include/mysql
+PKGFILES_CSW$(GARNAME)bench   = $(prefix)/sql-bench.*
+PKGFILES_CSW$(GARNAME)client  = $(bindir)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)client += $(foreach bin_name,$(CSW$(GARNAME)client_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(call baseisadirs,$(bindir),$(bin_name)))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),$(mandir)/man1/$(bin_name)\.1)
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/bin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(foreach bin_name,$(CSW$(GARNAME)devel_programs),/opt/csw/sbin/$(bin_name))
+PKGFILES_CSW$(GARNAME)devel  += $(mandir)/man1/mysql_config\.1
+PKGFILES_CSW$(GARNAME)devel  += $(prefix)/include.*
+PKGFILES_CSW$(GARNAME)devel  += /opt/csw/include/mysql
 
-PKGFILES_CSWmysql5rt      = $(prefix)/lib/.*\.so.*
-PKGFILES_CSWmysql5test    = $(prefix)/mysql-test.*
+PKGFILES_CSW$(GARNAME)rt      = $(libdir)
+PKGFILES_CSW$(GARNAME)rt     += $(libdir)/.*
+PKGFILES_CSW$(GARNAME)test    = $(prefix)/mysql-test.*
 
-REQUIRED_PKGS_CSWmysql5bench       = CSWmysql5
-REQUIRED_PKGS_CSWmysql5client      = CSWmysql5rt
-REQUIRED_PKGS_CSWmysql5            = CSWmysql5client CSWmysql5rt
-REQUIRED_PKGS_CSWmysql5devel       = CSWmysql5
-REQUIRED_PKGS_CSWmysql5test        = CSWmysql5 CSWperl
+REQUIRED_PKGS_CSW$(GARNAME)            = CSW$(GARNAME)client
+REQUIRED_PKGS_CSW$(GARNAME)           += CSW$(GARNAME)rt
+REQUIRED_PKGS_CSW$(GARNAME)           += CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)           += CSWzlib
+REQUIRED_PKGS_CSW$(GARNAME)rt          = CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)rt         += CSWzlib
+REQUIRED_PKGS_CSW$(GARNAME)bench       = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)bench      += CSWperl
+REQUIRED_PKGS_CSW$(GARNAME)client      = CSW$(GARNAME)rt
+REQUIRED_PKGS_CSW$(GARNAME)client     += CSWosslrt
+REQUIRED_PKGS_CSW$(GARNAME)client     += CSWncurses
+REQUIRED_PKGS_CSW$(GARNAME)client     += CSWzlib
+REQUIRED_PKGS_CSW$(GARNAME)devel       = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)test        = CSW$(GARNAME)
+REQUIRED_PKGS_CSW$(GARNAME)test       += CSWperl
 
 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
-DISTFILES += CSWmysql5.postinstall
+DISTFILES += csw$(GARNAME) quick_start-csw README.CSW ChangeLog
+DISTFILES += CSW$(GARNAME).preinstall
+DISTFILES += CSW$(GARNAME).postinstall
 DISTFILES += cswusergroup
 
 UFILES_REGEX = mysql-(\d+(?:\.\d+)*).tar.gz
 
-REQUIRED_PKGS = CSWncurses CSWzlib
+# TODO: Do the proper prerequsite pkgs.
 PREREQUISITE_PKGS = $(REQUIRED_PKGS)
 
 # MySQL-5.1.40 doesn't compile without setting EXTRA_INC.
 EXTRA_INC = /opt/csw/include
 EXTRA_LIB = /opt/csw/lib
+
+# The following EXTRA_CFLAGS are necessary to compile on Solaris 8. Otherwise
+# the following problem occurs:
+#
+# "handler/i_s.cc", line 159: Error: The function "localtime_r" must have a
+# prototype.
 EXTRA_CFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 EXTRA_CXXFLAGS = -mt -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__
 
 # Set ./configure options
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --disable-assembler
+# Why not have a docs package?
 # CONFIGURE_ARGS += --without-docs
 CONFIGURE_ARGS += --enable-local-infile
+CONFIGURE_ARGS += --with-charset=utf8
 CONFIGURE_ARGS += --with-extra-charsets=all
 CONFIGURE_ARGS += --with-low-memory
 CONFIGURE_ARGS += --with-pthread
@@ -159,15 +175,19 @@
 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
 
 
-USERGROUP = /etc/opt/csw/pkg/CSWmysql5/cswusergroup
+USERGROUP = /etc/opt/csw/pkg/CSW$(GARNAME)/cswusergroup
 
 PROTOTYPE_MODIFIERS = dbdir
 PROTOTYPE_FILES_dbdir = $(localstatedir)
@@ -182,6 +202,21 @@
 
 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 following libtool version mismatch problem:
+	# libtool: Version mismatch error.  This is libtool 2.2.6, but the
+	# libtool: definition of this LT_INIT comes from libtool 2.2.6b.
+	# libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
+	# http://lists.opencsw.org/pipermail/maintainers/2009-December/005066.html
+	cd $(WORKSRC) && autoreconf --force --install --symlink
+	@$(MAKECOOKIE)
+
 post-merge:
 	ginstall -m 755 -d $(PKGROOT)$(localstatedir)
 	ginstall -m 755 -d $(PKGROOT)$(datadir)/mysql/doc
@@ -191,18 +226,26 @@
 	# ln -sf ../../../mysql5/share/mysql/doc/README.CSW \
 	# 	$(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)/csw$(GARNAME) $(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 755 -d $(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	ginstall -m 644 $(FILEDIR)/cswusergroup \
-		        $(PKGROOT)$(global_sysconfdir)/pkg/CSWmysql5
+		        $(PKGROOT)$(global_sysconfdir)/pkg/CSW$(GARNAME)
 	## A symlink for mysql5 include files
 	## 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 $(PKGROOT)$(global_bindir)
 	for f in $(PKGROOT)$(bindir)/*; do \
-		ln -s mysql/$(BASE_VERSION)/`basename $$f` $(PKGROOT)$(global_bindir)/`basename $$f`; \
+		ln -s ../..$(bindir)/`basename $$f` \
+		      $(PKGROOT)$(global_bindir)/`basename $$f`; \
 	done
+	# /opt/csw/$(GARNAME)/lib/sparc9/mysql -- by GAR, it's logical
+	# /opt/csw/$(GARNAME)/lib/mysql/sparcv9 -- expected by other packages
+	gln -s ../$(ISA_DEFAULT64)/mysql $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT64)
+	# For other applications to link against
 	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/64
+	gln -s $(ISA_DEFAULT64) $(PKGROOT)$(libdir)/mysql/64
+	gln -s . $(PKGROOT)$(libdir)/$(ISA_DEFAULT)
+	gln -s . $(PKGROOT)$(libdir)/mysql/$(ISA_DEFAULT)
 	@$(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