You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2014/03/06 10:13:52 UTC
RE: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/ build/generator/templates/ subversion/libsvn_auth_gnome_keyring/ subversion/libsvn_auth_kwallet/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_diff/ subversion/lib
> -----Original Message-----
> From: stsp@apache.org [mailto:stsp@apache.org]
> Sent: woensdag 5 maart 2014 23:46
> To: commits@subversion.apache.org
> Subject: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/
> build/generator/templates/ subversion/libsvn_auth_gnome_keyring/
> subversion/libsvn_auth_kwallet/ subversion/libsvn_client/
> subversion/libsvn_delta/ subversion/libsvn_diff/ subversion/libs...
>
> Author: stsp
> Date: Wed Mar 5 22:45:48 2014
> New Revision: 1574710
>
> URL: http://svn.apache.org/r1574710
> Log:
> Kick off work on pkg-config support (issue #738, and also #4435).
>
> pkg-config support allows API consumers on UNIX-like systems to link
> to Subversion libraries without having to manually specify the correct
> set of linker flags, including the particular flags for dependencies
> required by a particular build of Subversion (bdb, serf, etc.).
> pkg-config uses libsvn_foo.pc files which describe the set of flags
> required to link to libsvn_foo.
> See http://www.freedesktop.org/wiki/Software/pkg-config/ for more
> information.
>
> Make gen-make.py produce .pc.in files for all Subversion libraries,
> and make the configure script produce .pc files from these .pc.in files.
> Dependency declarations and linker flags are based on information
> parsed from build.conf.
>
> Dependencies of Subversion which support pkg-config can be marked
> as such in build.conf, allowing pkg-config to resolve them. The
> name of the dependency's pkg-config script has to be specified
> without the .pc extension, e.g.:
>
> [gnome-keyring]
> type = lib
> external-lib = $(SVN_GNOME_KEYRING_LIBS)
> pkg-config = gnome-keyring-1
>
> Dependencies not aware of pkg-config are added to linker flags directly.
>
> To illustrate, the generated libsvn_client.pc file on my system contains:
>
> [[[
> prefix=/home/stsp/svn/prefix/svn-trunk
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
>
> Name: libsvn_client
> Description: Subversion Client Library
> Version: 1.9.0
> Required: apr-1
> Required.private:
> Libs: -L${libdir} -lsvn_wc -lsvn_ra -lsvn_delta -lsvn_diff -lsvn_subr
> Cflags: -I${includedir}
> ]]]
>
> There is no support for optional dependencies between Subversion libraries
> yet, however. For instance, libsvn_client might or might not be linked to
> libsvn_ra_serf. Such dependencies are currently omitted. Also, I'm not
> sure yet what to do in cases where a dependency might be statically or
> dynamically linked, e.g. sqlite.
>
> The .pc files are not being installed yet. I don't want to expose these
> files to systems using pkg-config until all outstanding issues are resolved.
>
> * build/generator/gen_make.py
> (Generator.write): Generate .pc.in files.
> (Generator.write_pkg_config_dot_in_files): New helper function.
>
> * build/generator/templates/pkg-config.in.ezt: New file, the .pc.in template.
>
> * build.conf: apr, apr-util, serf, gnome-keyring, and sqlite support pkg-config.
> There may be others (kwallet?) but I haven't investiged more yet.
> I also haven't checked yet if all versions of these dependencies support
> pkg-config. The most recent versions do support it.
>
> * configure.ac
> (SVN_APR_MAJOR_VERSION): Declare. APR's major version number is
> needed
> to select the correct pkg-config script name (e.g. apr-1 or apr-2).
> Generate .pc files from pc.in files.
>
> * subversion/libsvn_auth_gnome_keyring, subversion/libsvn_auth_kwallet,
> subversion/libsvn_client, subversion/libsvn_delta, subversion/libsvn_diff,
> subversion/libsvn_fs, subversion/libsvn_fs_base, subversion/libsvn_fs_fs,
> subversion/libsvn_fs_util, subversion/libsvn_fs_x, subversion/libsvn_ra,
> subversion/libsvn_ra_local, subversion/libsvn_ra_serf,
> subversion/libsvn_ra_svn, subversion/libsvn_repos,
> subversion/libsvn_subr,
> subversion/libsvn_wc: Ignore generated .pc and .pc.in files.
>
> Added:
> subversion/trunk/build/generator/templates/pkg-config.in.ezt (with
> props)
> Modified:
> subversion/trunk/build.conf
> subversion/trunk/build/generator/gen_make.py
> subversion/trunk/configure.ac
> subversion/trunk/subversion/libsvn_auth_gnome_keyring/ (props
> changed)
> subversion/trunk/subversion/libsvn_auth_kwallet/ (props changed)
> subversion/trunk/subversion/libsvn_client/ (props changed)
> subversion/trunk/subversion/libsvn_delta/ (props changed)
> subversion/trunk/subversion/libsvn_diff/ (props changed)
> subversion/trunk/subversion/libsvn_fs/ (props changed)
> subversion/trunk/subversion/libsvn_fs_base/ (props changed)
> subversion/trunk/subversion/libsvn_fs_fs/ (props changed)
> subversion/trunk/subversion/libsvn_fs_util/ (props changed)
> subversion/trunk/subversion/libsvn_fs_x/ (props changed)
> subversion/trunk/subversion/libsvn_ra/ (props changed)
> subversion/trunk/subversion/libsvn_ra_local/ (props changed)
> subversion/trunk/subversion/libsvn_ra_serf/ (props changed)
> subversion/trunk/subversion/libsvn_ra_svn/ (props changed)
> subversion/trunk/subversion/libsvn_repos/ (props changed)
> subversion/trunk/subversion/libsvn_subr/ (props changed)
> subversion/trunk/subversion/libsvn_wc/ (props changed)
>
> Modified: subversion/trunk/build.conf
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1574710&r1
> =1574709&r2=1574710&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build.conf (original)
> +++ subversion/trunk/build.conf Wed Mar 5 22:45:48 2014
> @@ -1303,10 +1303,12 @@ testing = skip
> type = lib
> external-lib = $(SVN_APR_LIBS)
> msvc-libs = ws2_32.lib rpcrt4.lib mswsock.lib
> +pkg-config = apr-@SVN_APR_MAJOR_VERSION@
>
> [aprutil]
> type = lib
> external-lib = $(SVN_APRUTIL_LIBS)
> +pkg-config = apr-util-@SVN_APR_MAJOR_VERSION@
>
> [apriconv]
> type = lib
> @@ -1327,6 +1329,7 @@ external-lib = $(SVN_DB_LIBS)
> [gnome-keyring]
> type = lib
> external-lib = $(SVN_GNOME_KEYRING_LIBS)
> +pkg-config = gnome-keyring-1
>
> [kwallet]
> type = lib
> @@ -1363,10 +1366,14 @@ type = lib
> external-lib = $(SVN_SERF_LIBS)
> libs = apr aprutil openssl xml zlib
> msvc-libs = secur32.lib
> +pkg-config = serf-1
> +pkg-config-private = yes
>
> [sqlite]
> type = lib
> external-lib = $(SVN_SQLITE_LIBS)
> +pkg-config = sqlite3
> +pkg-config-private = yes
>
> [xml]
> type = lib
>
> Modified: subversion/trunk/build/generator/gen_make.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_make
> .py?rev=1574710&r1=1574709&r2=1574710&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build/generator/gen_make.py (original)
> +++ subversion/trunk/build/generator/gen_make.py Wed Mar 5 22:45:48
> 2014
> @@ -472,6 +472,8 @@ class Generator(gen_base.GeneratorBase):
>
> self.write_transform_libtool_scripts(install_sources)
>
> + self.write_pkg_config_dot_in_files(install_sources)
> +
> def write_standalone(self):
> """Write autogen-standalone.mk"""
>
> @@ -583,6 +585,64 @@ DIR=`pwd`
> libdep_cache[target_name] = sorted(libs)
> return libdep_cache[target_name]
>
> + def write_pkg_config_dot_in_files(self, install_sources):
> + """Write pkg-config .pc.in files for Subversion libraries."""
> + for target_ob in install_sources:
> + if not (isinstance(target_ob, gen_base.TargetLib) and
> + target_ob.path.startswith('subversion/libsvn_')):
> + continue
> +
> + lib_name = target_ob.name
> + lib_path = self.sections[lib_name].options.get('path')
> + lib_deps = self.sections[lib_name].options.get('libs')
> + lib_desc = self.sections[lib_name].options.get('description')
> + output_path = build_path_join(lib_path, lib_name + '.pc.in')
> + template = ezt.Template(os.path.join('build', 'generator', 'templates',
> + 'pkg-config.in.ezt'),
> + compress_whitespace=False)
> + class _eztdata(object):
> + def __init__(self, **kw):
> + vars(self).update(kw)
> +
> + data = _eztdata(
> + lib_name=lib_name,
> + lib_desc=lib_desc,
> + lib_deps=[],
> + lib_required=[],
> + lib_required_private=[],
> + )
> + for lib_dep in lib_deps.split():
> + if lib_dep == 'apriconv':
> + # apriconv is part of apr-util, skip it
> + continue
> + if lib_dep == 'intl':
> + # this library seems to be used only by the windows build, skip it
> + continue
I would guess this is also used on unix when NLS is enabled?
Or is it assumed that gettext is part of the system libraries?
> + external_lib = self.sections[lib_dep].options.get('external-lib')
> + if external_lib:
> + ### Some of Subversion's internal libraries can appear as external
> + ### libs to handle conditional compilation. Skip these for now.
> + if external_lib in ['$(SVN_RA_LIB_LINK)', '$(SVN_FS_LIB_LINK)']:
> + continue
> + # If the external library is known to support pkg-config,
> + # add it to the Required: or Required.private: section.
> + # Otherwise, add the external library to linker flags.
> + pkg_config = self.sections[lib_dep].options.get('pkg-config')
> + if pkg_config:
> + private = self.sections[lib_dep].options.get('pkg-config-private')
> + if private:
> + data.lib_required_private.append(pkg_config)
> + else:
> + data.lib_required.append(pkg_config)
> + else:
> + # $(EXTERNAL_LIB) -> @EXTERNAL_LIB@
> + data.lib_deps.append('@%s@' % external_lib[2:-1])
> + else:
> + # libsvn_foo -> -lsvn_foo
> + data.lib_deps.append('-l%s' % lib_dep.replace('lib', '', 1))
> +
> + template.generate(open(output_path, 'w'), data)
> +
> class UnknownDependency(Exception):
> "We don't know how to deal with the dependent to link it in."
> pass
Bert
Re: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/
build/generator/templates/ subversion/libsvn_auth_gnome_keyring/ subversion/libsvn_auth_kwallet/
subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_diff/
subversion/lib
Posted by Branko Čibej <br...@wandisco.com>.
On 06.03.2014 13:00, Stefan Sperling wrote:
> On Thu, Mar 06, 2014 at 10:34:33AM +0100, Branko Čibej wrote:
>> On 06.03.2014 10:13, Bert Huijben wrote:
>>>> + if lib_dep == 'intl':
>>>> + # this library seems to be used only by the windows build, skip it
>>>> + continue
>>> I would guess this is also used on unix when NLS is enabled?
>>>
>>> Or is it assumed that gettext is part of the system libraries?
>> Of course we use libintl on Unix, and we can't assume it's a system
>> library. It's not on OSX, which is very much Unix, for example.
> I couldn't find any definition for $(SVN_INTL_LIBS), referenced in
> build.conf here:
>
> [intl]
> type = lib
> external-lib = $(SVN_INTL_LIBS)
>
> This led me to the conclusion that $(SVN_INTL_LIBS) is not defined
> on *nix. But perhaps that conclusion is wrong, and I'm supposed to
> see such a definition somewhere? Or is it only defined in some
> circumstances?
It's not impossible that the NLS config is broken on non-Linux systems;
Linux doesn't require -lintl because the necessary symbols are defined
in glibc.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com
RE: SVN_INTL_LIBS is not defined
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: 'Stefan Sperling' [mailto:stsp@elego.de]
> Sent: donderdag 13 maart 2014 14:34
> To: Bert Huijben
> Cc: 'Branko Čibej'; dev@subversion.apache.org
> Subject: Re: SVN_INTL_LIBS is not defined
>
> On Thu, Mar 13, 2014 at 01:19:18PM +0100, Bert Huijben wrote:
> > It is at least used by the Windows build for dependency tracking. It
uses
> $(SVN_*_LIBS) as pointer to dependency definitions by parsing this
> argument.
>
> Can you show me files in which it is used?
build/generator/gen_win.py has a line
for elib in re.findall('\$\(SVN_([^\)]*)_LIBS\)', dep.external_lib):
(currently line 892)
> > Perhaps the value should be properly defined on !Windows as well instead
> of handling it magically in several scripts.
>
> Sure. We could move -lint into SVN_INTL_LIBS instead of LIBS.
> Perhaps that was the intention in the first place.
Bert
Re: SVN_INTL_LIBS is not defined
Posted by 'Stefan Sperling' <st...@elego.de>.
On Thu, Mar 13, 2014 at 01:19:18PM +0100, Bert Huijben wrote:
> It is at least used by the Windows build for dependency tracking. It uses $(SVN_*_LIBS) as pointer to dependency definitions by parsing this argument.
Can you show me files in which it is used?
> Perhaps the value should be properly defined on !Windows as well instead of handling it magically in several scripts.
Sure. We could move -lint into SVN_INTL_LIBS instead of LIBS.
Perhaps that was the intention in the first place.
RE: SVN_INTL_LIBS is not defined (was: Re: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/ ...)
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Stefan Sperling [mailto:stsp@elego.de]
> Sent: donderdag 13 maart 2014 12:48
> To: Branko Čibej; dev@subversion.apache.org
> Subject: SVN_INTL_LIBS is not defined (was: Re: svn commit: r1574710 - in
> /subversion/trunk: ./ build/generator/ ...)
>
> On Thu, Mar 06, 2014 at 01:00:17PM +0100, Stefan Sperling wrote:
> > On Thu, Mar 06, 2014 at 10:34:33AM +0100, Branko Čibej wrote:
> > > Of course we use libintl on Unix, and we can't assume it's a system
> > > library. It's not on OSX, which is very much Unix, for example.
> >
> > I couldn't find any definition for $(SVN_INTL_LIBS), referenced in
> > build.conf here:
> >
> > [intl]
> > type = lib
> > external-lib = $(SVN_INTL_LIBS)
> >
> > This led me to the conclusion that $(SVN_INTL_LIBS) is not defined
> > on *nix. But perhaps that conclusion is wrong, and I'm supposed to
> > see such a definition somewhere? Or is it only defined in some
> > circumstances?
>
> I found that -lintl gets added to $LIBS if I enable gettext support.
> And that, indeed, libintl is a separate library.
>
> However, I still don't understand what $(SVN_INTL_LIBS) is for.
>
> Is SVN_INTL_LIBS used on any platform? If not, I'd like to remove it because
> it interferes with generation of pkg-config files. Otherwise, I'll need to
> know in which circumstances it is being used.
>
> $ grep -r SVN_INTL_LIBS *
> build-outputs.mk: cd subversion/libsvn_subr && $(LINK_LIB)
> $(libsvn_subr_LDFLAGS) -o libsvn_subr-1.la $(LT_NO_UNDEFINED)
> $(libsvn_subr_OBJECTS) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> $(SVN_XML_LIBS) $(SVN_ZLIB_LIBS) $(SVN_APR_MEMCACHE_LIBS)
> $(SVN_SQLITE_LIBS) $(SVN_MAGIC_LIBS) $(SVN_INTL_LIBS) $(LIBS)
> build.conf:external-lib = $(SVN_INTL_LIBS)
> grep: subversion/tests/cmdline/svn-test-work: No such file or directory
> $ grep -- -lintl Makefile
> SVN_GNOME_KEYRING_LIBS = -L/usr/local/lib -lgnome-keyring -lglib-2.0 -
> lintl
> LIBS = -lintl
> $
It is at least used by the Windows build for dependency tracking. It uses $(SVN_*_LIBS) as pointer to dependency definitions by parsing this argument.
Perhaps the value should be properly defined on !Windows as well instead of handling it magically in several scripts.
Bert
SVN_INTL_LIBS is not defined (was: Re: svn commit: r1574710 - in
/subversion/trunk: ./ build/generator/ ...)
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Mar 06, 2014 at 01:00:17PM +0100, Stefan Sperling wrote:
> On Thu, Mar 06, 2014 at 10:34:33AM +0100, Branko Čibej wrote:
> > Of course we use libintl on Unix, and we can't assume it's a system
> > library. It's not on OSX, which is very much Unix, for example.
>
> I couldn't find any definition for $(SVN_INTL_LIBS), referenced in
> build.conf here:
>
> [intl]
> type = lib
> external-lib = $(SVN_INTL_LIBS)
>
> This led me to the conclusion that $(SVN_INTL_LIBS) is not defined
> on *nix. But perhaps that conclusion is wrong, and I'm supposed to
> see such a definition somewhere? Or is it only defined in some
> circumstances?
I found that -lintl gets added to $LIBS if I enable gettext support.
And that, indeed, libintl is a separate library.
However, I still don't understand what $(SVN_INTL_LIBS) is for.
Is SVN_INTL_LIBS used on any platform? If not, I'd like to remove it because
it interferes with generation of pkg-config files. Otherwise, I'll need to
know in which circumstances it is being used.
$ grep -r SVN_INTL_LIBS *
build-outputs.mk: cd subversion/libsvn_subr && $(LINK_LIB) $(libsvn_subr_LDFLAGS) -o libsvn_subr-1.la $(LT_NO_UNDEFINED) $(libsvn_subr_OBJECTS) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(SVN_XML_LIBS) $(SVN_ZLIB_LIBS) $(SVN_APR_MEMCACHE_LIBS) $(SVN_SQLITE_LIBS) $(SVN_MAGIC_LIBS) $(SVN_INTL_LIBS) $(LIBS)
build.conf:external-lib = $(SVN_INTL_LIBS)
grep: subversion/tests/cmdline/svn-test-work: No such file or directory
$ grep -- -lintl Makefile
SVN_GNOME_KEYRING_LIBS = -L/usr/local/lib -lgnome-keyring -lglib-2.0 -lintl
LIBS = -lintl
$
Re: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/
build/generator/templates/ subversion/libsvn_auth_gnome_keyring/
subversion/libsvn_auth_kwallet/ subversion/libsvn_client/
subversion/libsvn_delta/ subversion/libsvn_diff/ subversion/lib
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Mar 06, 2014 at 10:34:33AM +0100, Branko Čibej wrote:
> On 06.03.2014 10:13, Bert Huijben wrote:
> >> + if lib_dep == 'intl':
> >> + # this library seems to be used only by the windows build, skip it
> >> + continue
> > I would guess this is also used on unix when NLS is enabled?
> >
> > Or is it assumed that gettext is part of the system libraries?
>
> Of course we use libintl on Unix, and we can't assume it's a system
> library. It's not on OSX, which is very much Unix, for example.
I couldn't find any definition for $(SVN_INTL_LIBS), referenced in
build.conf here:
[intl]
type = lib
external-lib = $(SVN_INTL_LIBS)
This led me to the conclusion that $(SVN_INTL_LIBS) is not defined
on *nix. But perhaps that conclusion is wrong, and I'm supposed to
see such a definition somewhere? Or is it only defined in some
circumstances?
Re: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/
build/generator/templates/ subversion/libsvn_auth_gnome_keyring/ subversion/libsvn_auth_kwallet/
subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_diff/
subversion/lib
Posted by Branko Čibej <br...@wandisco.com>.
On 06.03.2014 10:13, Bert Huijben wrote:
>
>> -----Original Message-----
>> From: stsp@apache.org [mailto:stsp@apache.org]
>> Sent: woensdag 5 maart 2014 23:46
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1574710 - in /subversion/trunk: ./ build/generator/
>> build/generator/templates/ subversion/libsvn_auth_gnome_keyring/
>> subversion/libsvn_auth_kwallet/ subversion/libsvn_client/
>> subversion/libsvn_delta/ subversion/libsvn_diff/ subversion/libs...
>>
>> Author: stsp
>> Date: Wed Mar 5 22:45:48 2014
>> New Revision: 1574710
>>
>> URL: http://svn.apache.org/r1574710
>> Log:
>> Kick off work on pkg-config support (issue #738, and also #4435).
>>
>> pkg-config support allows API consumers on UNIX-like systems to link
>> to Subversion libraries without having to manually specify the correct
>> set of linker flags, including the particular flags for dependencies
>> required by a particular build of Subversion (bdb, serf, etc.).
>> pkg-config uses libsvn_foo.pc files which describe the set of flags
>> required to link to libsvn_foo.
>> See http://www.freedesktop.org/wiki/Software/pkg-config/ for more
>> information.
>>
>> Make gen-make.py produce .pc.in files for all Subversion libraries,
>> and make the configure script produce .pc files from these .pc.in files.
>> Dependency declarations and linker flags are based on information
>> parsed from build.conf.
>>
>> Dependencies of Subversion which support pkg-config can be marked
>> as such in build.conf, allowing pkg-config to resolve them. The
>> name of the dependency's pkg-config script has to be specified
>> without the .pc extension, e.g.:
>>
>> [gnome-keyring]
>> type = lib
>> external-lib = $(SVN_GNOME_KEYRING_LIBS)
>> pkg-config = gnome-keyring-1
>>
>> Dependencies not aware of pkg-config are added to linker flags directly.
>>
>> To illustrate, the generated libsvn_client.pc file on my system contains:
>>
>> [[[
>> prefix=/home/stsp/svn/prefix/svn-trunk
>> exec_prefix=${prefix}
>> libdir=${exec_prefix}/lib
>> includedir=${prefix}/include
>>
>> Name: libsvn_client
>> Description: Subversion Client Library
>> Version: 1.9.0
>> Required: apr-1
>> Required.private:
>> Libs: -L${libdir} -lsvn_wc -lsvn_ra -lsvn_delta -lsvn_diff -lsvn_subr
>> Cflags: -I${includedir}
>> ]]]
>>
>> There is no support for optional dependencies between Subversion libraries
>> yet, however. For instance, libsvn_client might or might not be linked to
>> libsvn_ra_serf. Such dependencies are currently omitted. Also, I'm not
>> sure yet what to do in cases where a dependency might be statically or
>> dynamically linked, e.g. sqlite.
>>
>> The .pc files are not being installed yet. I don't want to expose these
>> files to systems using pkg-config until all outstanding issues are resolved.
>>
>> * build/generator/gen_make.py
>> (Generator.write): Generate .pc.in files.
>> (Generator.write_pkg_config_dot_in_files): New helper function.
>>
>> * build/generator/templates/pkg-config.in.ezt: New file, the .pc.in template.
>>
>> * build.conf: apr, apr-util, serf, gnome-keyring, and sqlite support pkg-config.
>> There may be others (kwallet?) but I haven't investiged more yet.
>> I also haven't checked yet if all versions of these dependencies support
>> pkg-config. The most recent versions do support it.
>>
>> * configure.ac
>> (SVN_APR_MAJOR_VERSION): Declare. APR's major version number is
>> needed
>> to select the correct pkg-config script name (e.g. apr-1 or apr-2).
>> Generate .pc files from pc.in files.
>>
>> * subversion/libsvn_auth_gnome_keyring, subversion/libsvn_auth_kwallet,
>> subversion/libsvn_client, subversion/libsvn_delta, subversion/libsvn_diff,
>> subversion/libsvn_fs, subversion/libsvn_fs_base, subversion/libsvn_fs_fs,
>> subversion/libsvn_fs_util, subversion/libsvn_fs_x, subversion/libsvn_ra,
>> subversion/libsvn_ra_local, subversion/libsvn_ra_serf,
>> subversion/libsvn_ra_svn, subversion/libsvn_repos,
>> subversion/libsvn_subr,
>> subversion/libsvn_wc: Ignore generated .pc and .pc.in files.
>>
>> Added:
>> subversion/trunk/build/generator/templates/pkg-config.in.ezt (with
>> props)
>> Modified:
>> subversion/trunk/build.conf
>> subversion/trunk/build/generator/gen_make.py
>> subversion/trunk/configure.ac
>> subversion/trunk/subversion/libsvn_auth_gnome_keyring/ (props
>> changed)
>> subversion/trunk/subversion/libsvn_auth_kwallet/ (props changed)
>> subversion/trunk/subversion/libsvn_client/ (props changed)
>> subversion/trunk/subversion/libsvn_delta/ (props changed)
>> subversion/trunk/subversion/libsvn_diff/ (props changed)
>> subversion/trunk/subversion/libsvn_fs/ (props changed)
>> subversion/trunk/subversion/libsvn_fs_base/ (props changed)
>> subversion/trunk/subversion/libsvn_fs_fs/ (props changed)
>> subversion/trunk/subversion/libsvn_fs_util/ (props changed)
>> subversion/trunk/subversion/libsvn_fs_x/ (props changed)
>> subversion/trunk/subversion/libsvn_ra/ (props changed)
>> subversion/trunk/subversion/libsvn_ra_local/ (props changed)
>> subversion/trunk/subversion/libsvn_ra_serf/ (props changed)
>> subversion/trunk/subversion/libsvn_ra_svn/ (props changed)
>> subversion/trunk/subversion/libsvn_repos/ (props changed)
>> subversion/trunk/subversion/libsvn_subr/ (props changed)
>> subversion/trunk/subversion/libsvn_wc/ (props changed)
>>
>> Modified: subversion/trunk/build.conf
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1574710&r1
>> =1574709&r2=1574710&view=diff
>> ==========================================================
>> ====================
>> --- subversion/trunk/build.conf (original)
>> +++ subversion/trunk/build.conf Wed Mar 5 22:45:48 2014
>> @@ -1303,10 +1303,12 @@ testing = skip
>> type = lib
>> external-lib = $(SVN_APR_LIBS)
>> msvc-libs = ws2_32.lib rpcrt4.lib mswsock.lib
>> +pkg-config = apr-@SVN_APR_MAJOR_VERSION@
>>
>> [aprutil]
>> type = lib
>> external-lib = $(SVN_APRUTIL_LIBS)
>> +pkg-config = apr-util-@SVN_APR_MAJOR_VERSION@
>>
>> [apriconv]
>> type = lib
>> @@ -1327,6 +1329,7 @@ external-lib = $(SVN_DB_LIBS)
>> [gnome-keyring]
>> type = lib
>> external-lib = $(SVN_GNOME_KEYRING_LIBS)
>> +pkg-config = gnome-keyring-1
>>
>> [kwallet]
>> type = lib
>> @@ -1363,10 +1366,14 @@ type = lib
>> external-lib = $(SVN_SERF_LIBS)
>> libs = apr aprutil openssl xml zlib
>> msvc-libs = secur32.lib
>> +pkg-config = serf-1
>> +pkg-config-private = yes
>>
>> [sqlite]
>> type = lib
>> external-lib = $(SVN_SQLITE_LIBS)
>> +pkg-config = sqlite3
>> +pkg-config-private = yes
>>
>> [xml]
>> type = lib
>>
>> Modified: subversion/trunk/build/generator/gen_make.py
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_make
>> .py?rev=1574710&r1=1574709&r2=1574710&view=diff
>> ==========================================================
>> ====================
>> --- subversion/trunk/build/generator/gen_make.py (original)
>> +++ subversion/trunk/build/generator/gen_make.py Wed Mar 5 22:45:48
>> 2014
>> @@ -472,6 +472,8 @@ class Generator(gen_base.GeneratorBase):
>>
>> self.write_transform_libtool_scripts(install_sources)
>>
>> + self.write_pkg_config_dot_in_files(install_sources)
>> +
>> def write_standalone(self):
>> """Write autogen-standalone.mk"""
>>
>> @@ -583,6 +585,64 @@ DIR=`pwd`
>> libdep_cache[target_name] = sorted(libs)
>> return libdep_cache[target_name]
>>
>> + def write_pkg_config_dot_in_files(self, install_sources):
>> + """Write pkg-config .pc.in files for Subversion libraries."""
>> + for target_ob in install_sources:
>> + if not (isinstance(target_ob, gen_base.TargetLib) and
>> + target_ob.path.startswith('subversion/libsvn_')):
>> + continue
>> +
>> + lib_name = target_ob.name
>> + lib_path = self.sections[lib_name].options.get('path')
>> + lib_deps = self.sections[lib_name].options.get('libs')
>> + lib_desc = self.sections[lib_name].options.get('description')
>> + output_path = build_path_join(lib_path, lib_name + '.pc.in')
>> + template = ezt.Template(os.path.join('build', 'generator', 'templates',
>> + 'pkg-config.in.ezt'),
>> + compress_whitespace=False)
>> + class _eztdata(object):
>> + def __init__(self, **kw):
>> + vars(self).update(kw)
>> +
>> + data = _eztdata(
>> + lib_name=lib_name,
>> + lib_desc=lib_desc,
>> + lib_deps=[],
>> + lib_required=[],
>> + lib_required_private=[],
>> + )
>> + for lib_dep in lib_deps.split():
>> + if lib_dep == 'apriconv':
>> + # apriconv is part of apr-util, skip it
>> + continue
>> + if lib_dep == 'intl':
>> + # this library seems to be used only by the windows build, skip it
>> + continue
> I would guess this is also used on unix when NLS is enabled?
>
> Or is it assumed that gettext is part of the system libraries?
Of course we use libintl on Unix, and we can't assume it's a system
library. It's not on OSX, which is very much Unix, for example.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com