Link C++ flavoured gsoap-plugin with -lgsoap++ (problem on 32bit platforms).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 13 Mar 2011 01:04:51 +0000 (01:04 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 13 Mar 2011 01:04:51 +0000 (01:04 +0000)
Runtime dependency of gsoap-plugin on system's gsoap.

org.glite.lb/configure
org.glite.lbjp-common.gsoap-plugin/Makefile

index 7cb4395..f1cc493 100755 (executable)
@@ -97,6 +97,10 @@ my %externs = (
                prefix=> '/usr',
                pkg => 'gsoap'
        },
+       gsoapxx => {
+               prefix=> '/usr',
+               pkg => 'gsoap++'
+       },
        mysql => {
                prefix=> '/usr'
        },
@@ -235,6 +239,7 @@ $localstatedir=~s/\/$//;
 
 $externs{'mysql-server'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-server'}{prefix} eq '';
 $externs{'mysql-devel'}{prefix}=$externs{mysql}{prefix} if $externs{'mysql-devel'}{prefix} eq '';
+$externs{'gsoapxx'}{prefix}=$externs{gsoap}{prefix} if $externs{'gsoapxx'}{prefix} eq '';
 
 %project = %{$projects{$project}};
 for $_ (keys %{$project{etics_externs}}) {
@@ -301,7 +306,7 @@ if ($mode eq 'build') { for my $ext (keys %externs) {
                my $pkg = $externs{$ext}{pkg};
                my $flagname = uc $externs{$ext}{pkg};
                $flagname =~ s/-[0-9\.]*$//;
-               $flagname =~ s/-/_/g;
+               $flagname =~ y/-\+/_X/;
 
                print "Checking $pkg ... ";
                $env = "PKG_CONFIG_PATH=$pkg_config_env$stagedir$prefix/$libdir/pkgconfig";
@@ -515,7 +520,7 @@ BEGIN{
        'lbjp-common.trio' => [ qw/cppunit:B libtool:B/ ],
        'lbjp-common.jp-interface' => [ qw/cppunit:B log4c:B libtool:B/ ],
        'lbjp-common.gss' =>  [ qw/globus_essentials:R globus:B cares cppunit:B libtool:B/ ],
-       'lbjp-common.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap:B libtool:B/ ],
+       'lbjp-common.gsoap-plugin' =>  [ qw/cppunit:B globus_essentials:R globus:B cares:B gsoap gsoapxx libtool:B/ ],
        'jobid.api-c' =>  [ qw/cppunit:B libtool:B/ ],
        'jobid.api-cpp' =>  [ qw/cppunit:B/ ],
        'jobid.api-java' =>  [ qw/ant:B jdk:B/ ],
@@ -692,6 +697,7 @@ for my $ext (keys %deps_aux) {
 # tag_prefix ........... VCS tag prefix
 # local_prefix ......... prefix (relative to stage)
 # etics_externs ........ ETICS modules names of externals
+#                        (${NAME.location}, ETICS conf. dependencies)
 # etics_projects ....... ETICS project names of externals
 # etics_externs_devel .. ETICS modules names of devel versions of externals
 # need_externs_aux ..... project-specific external dependencies
@@ -716,6 +722,7 @@ for my $ext (keys %deps_aux) {
                        trustmanager=>'org.glite.security.trustmanager',
                        axis=>'axis',
                        lcas=>'org.glite.security.lcas',
+                       gsoapxx=>'-',
                },
                etics_externs_devel => {
                },
@@ -760,6 +767,7 @@ for my $ext (keys %deps_aux) {
                        trustmanager_axis=>'emi.java-security.trustmanager-axis',
                        axis=>'axis1.4',
                        lcas=>'emi.sac.lcas',
+                       gsoapxx=>'-',
                },
                etics_externs_devel => {
                        cares => 'c-ares-devel',
@@ -941,6 +949,7 @@ sub mode_etics {
        for (@{$need_externs{"$subsys.$module"}}) {
            if ($need_externs_type{"$subsys.$module"}->{$_}=~/B/ and (defined $externs{$_} or defined $jar{$_})) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
+               next if ($eext eq '-');
                if ($project ne 'glite') {
                        if ($ge{$_} and not defined $externs{$_}{pkg}) {
                                push @copts, "--with-$_=\${stageDir}";
@@ -1124,6 +1133,7 @@ package.SRPMSLocation = ${moduleDir}/RPMTMP/SRPMS
        for (@{$need_externs{"$subsys.$module"}},@{$need_jars{"$subsys.$module"}}) {
                my $eext = $etics_externs{$_} ? $etics_externs{$_} : $_;
                my $edev = $project{etics_externs_devel}{$_};
+               next if ($eext eq '-');
 
                my $proj = 'externals';
                for my $p (keys %etics_projects) {
index e6b85e3..bc35f80 100644 (file)
@@ -11,6 +11,7 @@ prefix=
 
 glite_location=/opt/glite
 gsoap_prefix=/opt/gsoap
+gsoapxx_prefix?=${gsoap_prefix}
 
 CC=gcc
 
@@ -50,6 +51,7 @@ ext_repository:=${shell if [ -d "${repository}/externals" ]; then \
 
 gsoap_version=${gsoap_default_version}
 gsoap_prefix?=${ext_repository}/${gsoap_name}/${gsoap_version}/${gsoap_platform}
+gsoapxx_prefix?=${gsoap_prefix}
 ifdef lang
 langflavour:=_${lang}
 langsuffix:=.${lang}
@@ -96,7 +98,17 @@ LINK_lang:=${LINKXX}
 endif
 
 gsoaplibdir=$(shell if test -d "${gsoap_prefix}/${libdir}"; then echo "${gsoap_prefix}/${libdir}"; else echo "${gsoap_prefix}/lib"; fi)
+gsoapxxlibdir=$(shell if test -d "${gsoapxx_prefix}/${libdir}"; then echo "${gsoapxx_prefix}/${libdir}"; else echo "${gsoapxx_prefix}/lib"; fi)
 GSOAP_LIBS?=-L${gsoaplibdir} -lgsoap
+GSOAPXX_LIBS?=-L${gsoapxxlibdir} -lgsoap++
+GSOAP_LIBS_lang:=${GSOAP_LIBS}
+ifeq (${lang},c)
+GSOAP_LIBS_lang:=${GSOAP_LIBS}
+endif
+ifeq (${lang},cxx)
+GSOAP_LIBS_lang:=${GSOAPXX_LIBS}
+endif
+
 
 EX_NOTHRLIBS:=-L${stagedir}${prefix}/${libdir} -lglite_security_gss_${nothrflavour}
 EX_THRLIBS:=-L${stagedir}${prefix}/${libdir} -lglite_security_gss_${thrflavour}
@@ -139,7 +151,7 @@ endif
 
 ifeq (${gsoap_version},${gsoap_default_version})
 OBJS_S:=glite_gsplugin${langsuffix}.o
-GSOAP_DEFAULT_LIBS:=${GSOAP_LIBS}
+GSOAP_DEFAULT_LIBS:=${GSOAP_LIBS_lang}
 else
 OBJS_S:=glite_gsplugin${langsuffix}.o stdsoap2${langsuffix}.o
 GSOAP_DEFAULT_LIBS:=