[csw-devel] SF.net SVN: gar:[16531] csw/mgar/pkg/sqsh/trunk/Makefile
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Thu Dec 15 23:33:54 CET 2011
Revision: 16531
http://gar.svn.sourceforge.net/gar/?rev=16531&view=rev
Author: dmichelsen
Date: 2011-12-15 22:33:54 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
sqsh/trunk: Several compile and link issues fixed
Modified Paths:
--------------
csw/mgar/pkg/sqsh/trunk/Makefile
Modified: csw/mgar/pkg/sqsh/trunk/Makefile
===================================================================
--- csw/mgar/pkg/sqsh/trunk/Makefile 2011-12-15 21:23:38 UTC (rev 16530)
+++ csw/mgar/pkg/sqsh/trunk/Makefile 2011-12-15 22:33:54 UTC (rev 16531)
@@ -2,22 +2,16 @@
VERSION = 2.1.7
CATEGORIES = utils
-#PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
+# Sybase is available on Solaris 9 sparc 32 and 64 bit and Solaris 10 amd64
+PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386
+PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386
# using this recipe as a reference for how to work with Sybase OCS
# under CSW:
#
# http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/cpan/DBD-Sybase/trunk/Makefile
-#
-#
-# Hardwired to skip the tests
-ifeq ($(VERSION),2.1.7)
-#TEST_TARGET = check
-TEST_SCRIPTS =
-endif
-
-DESCRIPTION = powerful SQL shell with advanced scripting ability for Sybase
+DESCRIPTION = Powerful SQL shell with advanced scripting ability for Sybase
define BLURB
Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell),
it is intended as a replacement for the venerable 'isql' program
@@ -34,75 +28,82 @@
SF_PROJ = sqsh
MASTER_SITES = $(SF_MIRRORS)
-DISTFILES = $(NAME)-$(VERSION).tar.gz
-DISTFILES += $(PATCHFILES)
-DISTNAME = $(NAME)-$(VERSION)
+DISTFILES = $(DISTNAME).tar.gz
-EXTRA_DOCS = $(PATCHFILES)
-
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
-
-# If the url used to check for software update is different of MASTER_SITES, then
-# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES
-# UPSTREAM_MASTER_SITES =
-
-#BUILD64 = 1
-
EXTRA_MODULATORS = DBDRIVER
MODULATIONS_DBDRIVER = ocs
-# uncomment below to build for FreeTDS too
MODULATIONS_DBDRIVER += freetds
+# I just don't have Sybase i386 32 bit
SKIP_MODULATIONS = isa-i386-dbdriver-ocs
-PACKAGES = CSWsqsh-ocs CSWsqsh-freetds
+PACKAGES += CSWsqsh-ocs
+SPKG_DESC_CSWsqsh-ocs = $(DESCRIPTION) (Linked against Sybase OCS)
+PKGFILES_CSWsqsh-ocs += $(call baseisadirs,$(bindir),sqsh-ocs)
+PKGFILES_CSWsqsh-ocs += $(sysconfdir)/.*-ocs.*
+RUNTIME_DEP_PKGS_CSWsqsh-ocs += CSWfreetds
+RUNTIME_DEP_PKGS_CSWsqsh-ocs += CSWlibreadline6
+# This is for libintl.so which is provided by Sybase and should be used from there,
+# it is not to be taken from the development package CSWggettext-dev
+CHECKPKG_OVERRIDES_CSWsqsh-ocs += missing-dependency|CSWggettext-dev
+# The Sybase package can not be released due to license restrictions
+CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libcomn.so|is|needed|by|opt/csw/bin/sqsh-ocs
+CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libtcl.so|is|needed|by|opt/csw/bin/sqsh-ocs
+CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libcs.so|is|needed|by|opt/csw/bin/sqsh-ocs
+# This is for /usr/local/lib/sqsh/help, this is not in the distribution, don't know where to find that, ignore for now.
+CHECKPKG_OVERRIDES_CSWsqsh-ocs += file-with-bad-content|/usr/local|root/opt/csw/bin/sqsh-ocs
-CATALOGNAME_CSWsqsh-ocs = sqsh_ocs
-CATALOGNAME_CSWsqsh-freetds = sqsh_freetds
-
-SPKG_DESC_CSWsqsh-ocs = $(DESCRIPTION) (Linked against Sybase OCS)
+PACKAGES += CSWsqsh-freetds
SPKG_DESC_CSWsqsh-freetds = $(DESCRIPTION) (Linked against FreeTDS)
-
+# PKGFILES is catchall
RUNTIME_DEP_PKGS_CSWsqsh-freetds += CSWfreetds
-RUNTIME_DEP_PKGS_CSWsqsh-freetds += CSWggettextrt
-RUNTIME_DEP_PKGS_CSWsqsh-ocs += CSWsqsh-freetds
+RUNTIME_DEP_PKGS_CSWsqsh-freetds += CSWlibreadline6
+# This is for /usr/local/lib/sqsh/help, this is not in the distribution, don't know where to find that, ignore for now.
+CHECKPKG_OVERRIDES_CSWsqsh-freetds += file-with-bad-content|/usr/local|root/opt/csw/bin/sqsh-freetds
+# Only the staticlibtds is searched by default, change to shared lib
+REINPLACEMENTS += libtds-a
+REINPLACE_MATCH_libtds-a = libtds.a
+REINPLACE_WITH_libtds-a = libct.so
+REINPLACE_FILES_libtds-a += configure
+
+REINPLACEMENTS += libtds-l
+REINPLACE_MATCH_libtds-l = -ltds
+REINPLACE_WITH_libtds-l = -lct
+REINPLACE_FILES_libtds-l += configure
+
SYBASE_ocs = /opt/csw/sybase/OCS-12_5
SYBASE_freetds = /opt/csw
SYBASE = $(SYBASE_$(DBDRIVER))
-LD_LIBRARY_PATH = $(SYBASE)/lib
-
NOISALIST = 1
EXTRA_LIB = $(SYBASE)/lib
-LD_OPTIONS =
-EXTRA_LINKER_FLAGS = $(RUNPATH_LINKER_FLAGS)
-#EXTRA_LINKER_FLAGS_CSWsqsh-freetds = -ltds
+EXTRA_CONFIGURE_EXPORTS = SYBASE INCDIRS LIBDIRS
+CONFIGURE_ENV_INCDIRS = $(includedir)
+CONFIGURE_ENV_LIBDIRS = $(SYBASE)/lib:$(libdir)
-EXTRA_CONFIGURE_EXPORTS = SYBASE LD_LIBRARY_PATH
+CONFIGURE_ARGS = $(DIRPATHS)
+CONFIGURE_ARGS += --enable-shared --disable-nls
+CONFIGURE_ARGS += --with-readline
-EXTRA_TEST_EXPORTS = LD_LIBRARY_PATH
+# There is no testsuite
+TEST_SCRIPTS =
-PKGFILES_CSWsqsh-ocs = /opt/csw/bin/sqsh-ocs
+MERGE_SCRIPTS_isa-default-dbdriver-ocs = copy-all
+MERGE_SCRIPTS_isa-default-dbdriver-freetds = copy-only
+MERGE_DIRS_isa-default-dbdriver-freetds = $(DBDSYBASEDIR)
+EXTRA_PAX_ARGS = -s ",/sqsh$$,/sqsh-$(DBDRIVER),p"
+EXTRA_PAX_ARGS += -s ",/sqshrc$$,/sqshrc-$(DBDRIVER),p"
+
+PRESERVECONF += $(foreach D,$(MODULATIONS_DBDRIVER),$(sysconfdir)/sqshrc-$D)
+
ALTERNATIVES_CSWsqsh-ocs = ocs
ALTERNATIVES_CSWsqsh-freetds = freetds
ALTERNATIVE_ocs = /opt/csw/bin/sqsh sqsh /opt/csw/bin/sqsh-ocs 200
-#ALTERNATIVE_ocs += EDIR)/Sybase.bs bs $(DBDSYBASEDIR)/Sybase-ocs.bs
+ALTERNATIVE_ocs += /etc/opt/csw/sqshrc sqshrc /etc/opt/csw/sqshrc-ocs
ALTERNATIVE_freetds = /opt/csw/bin/sqsh sqsh /opt/csw/bin/sqsh-freetds 100
-#ALTERNATIVE_freetds += $(DBDSYBASEDIR)/Sybase.bs bs $(DBDSYBASEDIR)/Sybase-freetds.bs
+ALTERNATIVE_freetds += /etc/opt/csw/sqshrc sqshrc /etc/opt/csw/sqshrc-freetds
-CONFIGURE_ARGS = $(DIRPATHS)
-CONFIGURE_ARGS += --enable-shared --disable-nls
-# this should be enabled if available on build machine
-CONFIGURE_ARGS += --with-readline
-
-# These are provided by the Sybase OCS libraries
-CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libcs.so|is|needed|by|opt/csw/lib/perl/site_perl/auto/DBD/Sybase/Sybase-ocs.so
-CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libcomn.so|is|needed|by|opt/csw/lib/perl/site_perl/auto/DBD/Sybase/Sybase-ocs.so
-CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libtcl.so|is|needed|by|opt/csw/lib/perl/site_perl/auto/DBD/Sybase/Sybase-ocs.so
-CHECKPKG_OVERRIDES_CSWsqsh-ocs += soname-not-found|libct.so|is|needed|by|opt/csw/lib/perl/site_perl/auto/DBD/Sybase/Sybase-ocs.so
-
include gar/category.mk
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