Commit 603e3d22 authored by marcochapeau's avatar marcochapeau
Browse files

* First attempts at a sensible way of handling API version vs. package version

* Fix install path of jack.pc


git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2092 0c269be4-1314-0410-8aa9-9f06e86f4224
parent e71bc2c4
......@@ -22,11 +22,16 @@
import os
from string import Template
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=7
JACK_MICRO_VERSION=1
JACK_MAJOR_VERSION=1
JACK_MINOR_VERSION=9
JACK_MICRO_VERSION=0
JACKAPI_MAJOR_VERSION=0
JACKAPI_MINOR_VERSION=1
JACKAPI_MICRO_VERSION=0
JACK_VERSION="%u.%u.%u" % (JACK_MAJOR_VERSION, JACK_MINOR_VERSION, JACK_MICRO_VERSION)
JACKAPI_VERSION="%u.%u.%u" % (JACKAPI_MAJOR_VERSION, JACKAPI_MINOR_VERSION, JACKAPI_MICRO_VERSION)
platform = ARGUMENTS.get('OS', str(Platform()))
......@@ -99,6 +104,10 @@ env['JACK_MAJOR_VERSION'] = JACK_MAJOR_VERSION
env['JACK_MINOR_VERSION'] = JACK_MINOR_VERSION
env['JACK_MICRO_VERSION'] = JACK_MICRO_VERSION
env['JACK_VERSION'] = JACK_VERSION
env['JACKAPI_MAJOR_VERSION'] = JACKAPI_MAJOR_VERSION
env['JACKAPI_MINOR_VERSION'] = JACKAPI_MINOR_VERSION
env['JACKAPI_MICRO_VERSION'] = JACKAPI_MICRO_VERSION
env['JACKAPI_VERSION'] = JACKAPI_VERSION
# make sure the necessary dirs exist
if not os.path.isdir('cache/' + build_base):
......@@ -179,10 +188,6 @@ env.AppendUnique(CFLAGS = ['-fPIC', '-DUSE_POSIX_SHM'])
env.AppendUnique(CFLAGS = ['-DJACKMP'])
env.AppendUnique(CPPFLAGS = ['-DJACKMP'])
env.Alias('install', env['LIBDIR'])
env.Alias('install', env['INCLUDEDIR'])
env.Alias('install', env['BINDIR'])
if env['FULL_MIMIC']:
env['SERVER'] = 'jackd'
env['CLIENTLIB'] = 'jack'
......@@ -195,6 +200,11 @@ else:
env['WRAPPERLIB'] = 'jack'
env['ADDON_DIR'] = env.subst(env['LIBDIR']) + "/jackmp"
env.Alias('install', env['LIBDIR'])
env.Alias('install', env['INCLUDEDIR'])
env.Alias('install', env['BINDIR'])
env.Alias('install', env['ADDON_DIR'])
env['PREFIX'] = env.subst(env['PREFIX'])
env['BINDIR'] = env.subst(env['BINDIR'])
env['LIBDIR'] = env.subst(env['LIBDIR'])
......@@ -204,7 +214,7 @@ env.ScanReplace('jack.pc.in')
# jack.pc is always updated in case of config changes
# (PREFIX or JACK_VERSION for instance)
AlwaysBuild('jack.pc')
pkg_config_dir = env['PREFIX']+"/lib/pkgconfig/"
pkg_config_dir = env['LIBDIR']+"/pkgconfig/"
env.Install(pkg_config_dir, 'jack.pc')
env.Alias('install', pkg_config_dir)
......
......@@ -147,8 +147,8 @@ jack_headers = [
# Each platform should get it's own environment
libenv = env.Copy()
if env['PLATFORM'] == 'posix':
libenv.Append(SHLIBSUFFIX='.' + env['JACK_VERSION'])
libenv.Append(SHLINKFLAGS='-Wl,-soname,${str(TARGET.file).split(".")[0]}.so.' + str(env['JACK_MAJOR_VERSION']))
libenv.Append(SHLIBSUFFIX='.' + env['JACKAPI_VERSION'])
libenv.Append(SHLINKFLAGS='-Wl,-soname,${str(TARGET.file).split(".")[0]}.so.' + str(env['JACKAPI_MAJOR_VERSION']))
clientlib = libenv.SharedLibrary(env['CLIENTLIB'], srcfiles_common_clientlib)
serverlib = libenv.SharedLibrary(env['SERVERLIB'], srcfiles_common_serverlib)
......@@ -165,11 +165,11 @@ if env['PLATFORM'] == 'posix':
if not env['FULL_MIMIC']:
libs.append((env['WRAPPERLIB'], wrapperlib))
for lib_name, lib in libs:
env.Command('#/common/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), lib, symlinkcmd)
env.Command('#/common/lib' + lib_name + '.so', '#/common/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), env['LIBDIR'] + '/lib' + lib_name + '.so.' + env['JACK_VERSION'], symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']), symlinkcmd)
env.Alias('install', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACK_MAJOR_VERSION']))
env.Command('#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), lib, symlinkcmd)
env.Command('#/common/lib' + lib_name + '.so', '#/common/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), env['LIBDIR'] + '/lib' + lib_name + '.so.' + env['JACKAPI_VERSION'], symlinkcmd)
env.Command(env['LIBDIR'] + '/lib' + lib_name + '.so', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']), symlinkcmd)
env.Alias('install', env['LIBDIR'] + '/lib' + lib_name + '.so.' + str(env['JACKAPI_MAJOR_VERSION']))
# Headers
for header in jack_headers:
......
......@@ -28,7 +28,7 @@ Import('env')
env.AppendUnique(CPPPATH=['#/', '#/common'])
# A symlinking command
symlinkcmd = 'ln -nsf $SOURCE.name $TARGET'
symlinkcmd = 'rm -f $TARGET;ln -nsf $SOURCE.name $TARGET'
#
# Source files section
......@@ -80,5 +80,5 @@ if env['BUILD_EXAMPLES']:
for example_lib, example_lib_source in example_libs.items():
lib = clientenv.SharedLibrary(example_lib, example_lib_source)
if clientenv['INSTALL_EXAMPLES']:
clientenv.InstallAs(clientenv['ADDON_DIR'] + '/' + example_lib + '.so', lib)
clientenv.Alias('install', clientenv['ADDON_DIR'] + '/' + example_lib + '.so')
env.InstallAs(env['ADDON_DIR'] + '/' + example_lib + '.so', lib)
env.Alias('install', env['ADDON_DIR'] + '/' + example_lib + '.so')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment