Update to talloc-2.1.2
Bite the bullet and switch to an upstream version that uses waf*. The plan is to use databases/tdb and devel/libtalloc in the samba4 port, and thus to keep those ports in sync with whatever bundled version comes with the samba4 tarball. * trying to make sense of the waf patches is highly discouraged While here, take maintainership. This is a SHARED_ONLY port, and a python module is now provided. ok sthen@
This commit is contained in:
parent
22f91e604c
commit
9e38e39bfd
@ -1,26 +1,41 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2015/07/03 22:47:25 bentley Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
SHARED_LIBS= talloc 0.0 # .2.0
|
||||
|
||||
COMMENT= hierarchical memory pool system with destructors
|
||||
DISTNAME= talloc-2.0.1
|
||||
REVISION= 2
|
||||
|
||||
DISTNAME= talloc-2.1.2
|
||||
PKGNAME= lib${DISTNAME}
|
||||
|
||||
SHARED_LIBS+= talloc 1.0
|
||||
SHARED_LIBS+= pytalloc-util 0.0
|
||||
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= https://talloc.samba.org/
|
||||
|
||||
MAINTAINER= Jeremie Courreges-Anglas <jca@wxcvbn.org>
|
||||
|
||||
# LGPLv3+
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
||||
WANTLIB += m pthread util ${MODPY_WANTLIB}
|
||||
|
||||
MASTER_SITES= https://samba.org/ftp/talloc/
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ENV= CFLAGS="${CFLAGS} -g"
|
||||
MAKE_FLAGS+= TALLOC_SOLIB=libtalloc.so.${LIBtalloc_VERSION} \
|
||||
SHLD_FLAGS="-g -shared" \
|
||||
SONAMEFLAG="" TALLOC_SONAME=""
|
||||
MODULES= lang/python
|
||||
MODPY_RUNDEP= No
|
||||
MODPY_ADJ_FILES= buildtools/bin/waf
|
||||
|
||||
LIB_DEPENDS= ${MODPY_LIB_DEPENDS}
|
||||
|
||||
WAF_ARGS= -v -j ${MAKE_JOBS}
|
||||
MAKE_FLAGS= WAF_ARGS="${WAF_ARGS}"
|
||||
.for _l _v in ${SHARED_LIBS}
|
||||
MAKE_ENV += LIB${_l:S/-/_/g}_VERSION=${_v}
|
||||
.endfor
|
||||
|
||||
CONFIGURE_STYLE= simple
|
||||
CONFIGURE_ARGS= --mandir="${PREFIX}/man"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (talloc-2.0.1.tar.gz) = W4EFJ0BfKdVPUO/Xi/LInjGPLNi+0AHyLyoUEv0nybQ=
|
||||
SIZE (talloc-2.0.1.tar.gz) = 242426
|
||||
SHA256 (talloc-2.1.2.tar.gz) = Iw14o/ynWhWrD11217uurdPB5pWty7CFky0if1wxg40=
|
||||
SIZE (talloc-2.1.2.tar.gz) = 423706
|
||||
|
11
devel/libtalloc/patches/patch-Makefile
Normal file
11
devel/libtalloc/patches/patch-Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-Makefile,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
--- Makefile.orig Wed Jul 15 22:53:08 2015
|
||||
+++ Makefile Wed Jul 15 22:52:56 2015
|
||||
@@ -1,6 +1,6 @@
|
||||
# simple makefile wrapper to run waf
|
||||
|
||||
-WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
|
||||
+WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf ${WAF_ARGS}
|
||||
|
||||
all:
|
||||
$(WAF) build
|
@ -0,0 +1,55 @@
|
||||
$OpenBSD: patch-buildtools_wafadmin_Tools_ccroot_py,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
- badly computed target name, install fails
|
||||
|
||||
- at build time, encode the full library name + version in the SONAME
|
||||
|
||||
- remove openbsd-specific tests, install fails
|
||||
|
||||
--- buildtools/wafadmin/Tools/ccroot.py.orig Tue Mar 10 06:28:31 2015
|
||||
+++ buildtools/wafadmin/Tools/ccroot.py Thu Jul 16 14:29:24 2015
|
||||
@@ -183,10 +183,6 @@ def get_target_name(self):
|
||||
# include the version in the dll file name,
|
||||
# the import lib file name stays unversionned.
|
||||
name = name + '-' + nums[0]
|
||||
- elif self.env.DEST_OS == 'openbsd':
|
||||
- pattern = '%s.%s' % (pattern, nums[0])
|
||||
- if len(nums) >= 2:
|
||||
- pattern += '.%s' % nums[1]
|
||||
|
||||
return os.path.join(dir, pattern % name)
|
||||
|
||||
@@ -594,7 +590,10 @@ def apply_vnum(self):
|
||||
name2 = libname + '.' + nums[0]
|
||||
|
||||
if self.env.SONAME_ST:
|
||||
- v = self.env.SONAME_ST % name2
|
||||
+ if sys.platform.startswith('openbsd'):
|
||||
+ v = self.env.SONAME_ST % name3
|
||||
+ else:
|
||||
+ v = self.env.SONAME_ST % name2
|
||||
self.env.append_value('LINKFLAGS', v.split())
|
||||
|
||||
bld = self.bld
|
||||
@@ -603,17 +602,12 @@ def apply_vnum(self):
|
||||
path = self.install_path
|
||||
if not path: return
|
||||
|
||||
- if self.env.DEST_OS == 'openbsd':
|
||||
- libname = self.link_task.outputs[0].name
|
||||
- bld.install_as('%s%s%s' % (path, os.sep, libname), node, env=self.env)
|
||||
- else:
|
||||
- bld.install_as(path + os.sep + name3, node, env=self.env)
|
||||
- bld.symlink_as(path + os.sep + name2, name3)
|
||||
- bld.symlink_as(path + os.sep + libname, name3)
|
||||
+ bld.install_as(path + os.sep + name3, node, env=self.env)
|
||||
+ bld.symlink_as(path + os.sep + name2, name3)
|
||||
+ bld.symlink_as(path + os.sep + libname, name3)
|
||||
|
||||
# the following task is just to enable execution from the build dir :-/
|
||||
- if self.env.DEST_OS != 'openbsd':
|
||||
- self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)])
|
||||
+ self.create_task('vnum', node, [node.parent.find_or_declare(name2), node.parent.find_or_declare(name3)])
|
||||
|
||||
def exec_vnum_link(self):
|
||||
for x in self.outputs:
|
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-buildtools_wafadmin_Tools_gcc_py,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
- until waf creates libraries with the correct name out of the box, we
|
||||
need SONAME
|
||||
|
||||
--- buildtools/wafadmin/Tools/gcc.py.orig Thu Jul 16 14:42:05 2015
|
||||
+++ buildtools/wafadmin/Tools/gcc.py Thu Jul 16 14:42:20 2015
|
||||
@@ -114,10 +114,6 @@ def gcc_modifier_aix(conf):
|
||||
v['SHLIB_MARKER'] = ''
|
||||
|
||||
@conftest
|
||||
-def gcc_modifier_openbsd(conf):
|
||||
- conf.env['SONAME_ST'] = []
|
||||
-
|
||||
-@conftest
|
||||
def gcc_modifier_platform(conf):
|
||||
# * set configurations specific for a platform.
|
||||
# * the destination platform is detected automatically by looking at the macros the compiler predefines,
|
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-buildtools_wafadmin_Tools_gxx_py,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
- until waf creates libraries with the correct name out of the box, we
|
||||
need SONAME
|
||||
|
||||
--- buildtools/wafadmin/Tools/gxx.py.orig Thu Jul 16 14:42:07 2015
|
||||
+++ buildtools/wafadmin/Tools/gxx.py Thu Jul 16 14:42:41 2015
|
||||
@@ -112,10 +112,6 @@ def gxx_modifier_aix(conf):
|
||||
v['SHLIB_MARKER'] = ''
|
||||
|
||||
@conftest
|
||||
-def gxx_modifier_openbsd(conf):
|
||||
- conf.env['SONAME_ST'] = []
|
||||
-
|
||||
-@conftest
|
||||
def gxx_modifier_platform(conf):
|
||||
# * set configurations specific for a platform.
|
||||
# * the destination platform is detected automatically by looking at the macros the compiler predefines,
|
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-buildtools_wafsamba_samba_install_py,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
- install_link is used so encode the SONAME; use of SONAME is currenty
|
||||
needed since the installed library is created with an improper name
|
||||
(eg "libsomething.inst.so")
|
||||
|
||||
- no need to setup symlinks on OpenBSD
|
||||
|
||||
--- buildtools/wafsamba/samba_install.py.orig Thu Jul 16 14:21:29 2015
|
||||
+++ buildtools/wafsamba/samba_install.py Thu Jul 16 14:25:29 2015
|
||||
@@ -112,9 +112,12 @@ def install_library(self):
|
||||
elif self.vnum:
|
||||
vnum_base = self.vnum.split('.')[0]
|
||||
install_name = bld.make_libname(target_name, version=self.vnum)
|
||||
- install_link = bld.make_libname(target_name, version=vnum_base)
|
||||
+ if sys.platform.startswith('openbsd'):
|
||||
+ install_link = install_name
|
||||
+ else:
|
||||
+ install_link = bld.make_libname(target_name, version=vnum_base)
|
||||
inst_name = bld.make_libname(t.target)
|
||||
- if not self.private_library:
|
||||
+ if not self.private_library and not sys.platform.startswith('openbsd'):
|
||||
# only generate the dev link for non-bundled libs
|
||||
dev_link = bld.make_libname(target_name)
|
||||
elif getattr(self, 'soname', ''):
|
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-buildtools_wafsamba_wafsamba_py,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
|
||||
- allow the library version to be overriden
|
||||
|
||||
--- buildtools/wafsamba/wafsamba.py.orig Sun Jan 25 05:37:02 2015
|
||||
+++ buildtools/wafsamba/wafsamba.py Thu Jul 16 00:29:33 2015
|
||||
@@ -212,6 +212,12 @@ def SAMBA_LIBRARY(bld, libname, source,
|
||||
realname = bld.map_shlib_extension(realname, python=(target_type=='PYTHON'))
|
||||
link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON'))
|
||||
|
||||
+ if vnum is not None:
|
||||
+ osvnum = os.getenv('LIB' + libname.replace('-', '_') + '_VERSION')
|
||||
+ if osvnum:
|
||||
+ print "Setup-specific version for library %s: %s" % (libname, osvnum)
|
||||
+ vnum = osvnum
|
||||
+
|
||||
# we don't want any public libraries without version numbers
|
||||
if (not private_library and target_type != 'PYTHON' and not realname):
|
||||
if vnum is None and soname is None:
|
14
devel/libtalloc/patches/patch-lib_replace_replace_h
Normal file
14
devel/libtalloc/patches/patch-lib_replace_replace_h
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-lib_replace_replace_h,v 1.1 2015/07/18 02:13:25 jca Exp $
|
||||
--- lib/replace/replace.h.orig Wed Jul 15 22:52:17 2015
|
||||
+++ lib/replace/replace.h Wed Jul 15 22:52:24 2015
|
||||
@@ -60,10 +60,6 @@
|
||||
#undef HAVE_INTTYPES_H
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_MALLOC_H
|
||||
-#include <malloc.h>
|
||||
-#endif
|
||||
-
|
||||
#ifndef __PRI64_PREFIX
|
||||
# if __WORDSIZE == 64 && ! defined __APPLE__
|
||||
# define __PRI64_PREFIX "l"
|
@ -1,9 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2015/03/16 18:07:43 naddy Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.3 2015/07/18 02:13:25 jca Exp $
|
||||
include/pytalloc.h
|
||||
include/talloc.h
|
||||
lib/libtalloc.a
|
||||
@lib lib/libpytalloc-util.so.${LIBpytalloc-util_VERSION}
|
||||
@lib lib/libtalloc.so.${LIBtalloc_VERSION}
|
||||
lib/pkgconfig/pytalloc-util.pc
|
||||
lib/pkgconfig/talloc.pc
|
||||
@comment share/swig/
|
||||
@comment share/swig/1.3.36/
|
||||
@comment share/swig/1.3.36/talloc.i
|
||||
@comment @man man/man3/talloc.3
|
||||
lib/python${MODPY_VERSION}/site-packages/talloc.so
|
||||
@man man/man3/talloc.3
|
||||
|
Loading…
Reference in New Issue
Block a user