openbsd-ports/graphics/mapnik/patches/patch-src_build_py

56 lines
2.2 KiB
Plaintext

$OpenBSD: patch-src_build_py,v 1.2 2012/05/05 07:05:16 landry Exp $
Set shlib version, don't do stupid symlinks, dont call ldconfig
--- src/build.py.orig Tue Apr 10 00:56:48 2012
+++ src/build.py Sat May 5 08:15:49 2012
@@ -37,9 +37,6 @@ def call(cmd, silent=True):
elif not silent:
print stderr
-def ldconfig(*args,**kwargs):
- call('ldconfig')
-
if env['LINKING'] == 'static':
lib_env.Append(CXXFLAGS="-fPIC")
@@ -81,7 +78,7 @@ if not env['RUNTIME_LINK'] == 'static':
if env['PLATFORM'] == 'Darwin':
mapnik_libname = 'libmapnik.dylib'
else:
- mapnik_libname = 'libmapnik.so.' + ("%d.%d" % (int(ABI_VERSION[0]),int(ABI_VERSION[1])))
+ mapnik_libname = 'libmapnik.so.${LIBmapnik_VERSION}'
if env['PLATFORM'] == 'Darwin':
if env['FULL_LIB_PATH']:
@@ -325,30 +322,13 @@ if env['PLATFORM'] != 'Darwin':
os.remove(trgt)
os.symlink(os.path.basename(src), trgt)
- major, minor, micro = ABI_VERSION
-
- soFile = "%s.%d.%d.%d" % (os.path.basename(str(mapnik[0])), int(major), int(minor), int(micro))
+ soFile = "%s.${LIBmapnik_VERSION}" % (os.path.basename(str(mapnik[0])))
target = os.path.join(env['MAPNIK_LIB_BASE_DEST'], soFile)
if 'uninstall' not in COMMAND_LINE_TARGETS:
result = env.InstallAs(target=target, source=mapnik)
env.Alias(target='install', source=result)
- if result:
- env.AddPostAction(result, ldconfig)
-
- # Install symlinks
- target1 = os.path.join(env['MAPNIK_LIB_BASE_DEST'], "%s.%d.%d" % (os.path.basename(str(mapnik[0])),int(major), int(minor)))
- target2 = os.path.join(env['MAPNIK_LIB_BASE_DEST'], os.path.basename(str(mapnik[0])))
- if 'uninstall' not in COMMAND_LINE_TARGETS:
- if 'install' in COMMAND_LINE_TARGETS:
- link1 = env.Command(target1, target, symlink)
- env.Alias(target='install', source=link1)
- link2 = env.Command(target2, target1, symlink)
- env.Alias(target='install', source=link2)
- # delete in reverse order..
- env['create_uninstall_target'](env, target2)
- env['create_uninstall_target'](env, target1)
env['create_uninstall_target'](env, target)
else: