Could  libtalloc and tdb python parts be split into multiple packages so we 
don't have to install python module libs unless there is something python that 
depends on these? Just a thought.


Ian McWilliam

________________________________________
From: owner-po...@openbsd.org [owner-po...@openbsd.org] on behalf of Jérémie 
Courrèges-Anglas [j...@wxcvbn.org]
Sent: Saturday, 18 July 2015 5:35 AM
To: OpenBSD ports
Cc: Ian McWilliam
Subject: [update] devel/libtalloc -> 2.1.2 (samba4)

Similar to the databases/tdb update, let's also bite the bullet with
talloc. The waf patches are slightly different because of the addition
of OpenBSD-specific tests that actually make things worse.
(btw I'm not expecting reviews for the waf parts. ;)

net/ocserv and net/samba still look happy.

Comments / ok?

These two updates would help ongoing efforts on net/samba4, even if
switching the ports tree from samba3 to samba4 will happen later,
post-5.8.

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libtalloc/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- Makefile    3 Jul 2015 22:47:25 -0000       1.5
+++ Makefile    17 Jul 2015 19:27:51 -0000
@@ -2,25 +2,40 @@

 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 <j...@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>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/libtalloc/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    13 Jan 2014 22:49:11 -0000      1.2
+++ distinfo    17 Jul 2015 19:27:51 -0000
@@ -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
Index: patches/patch-Makefile
===================================================================
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile      17 Jul 2015 19:27:51 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- 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
Index: patches/patch-buildtools_wafadmin_Tools_ccroot_py
===================================================================
RCS file: patches/patch-buildtools_wafadmin_Tools_ccroot_py
diff -N patches/patch-buildtools_wafadmin_Tools_ccroot_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildtools_wafadmin_Tools_ccroot_py   17 Jul 2015 19:27:51 
-0000
@@ -0,0 +1,55 @@
+$OpenBSD$
+
+- 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:
Index: patches/patch-buildtools_wafadmin_Tools_gcc_py
===================================================================
RCS file: patches/patch-buildtools_wafadmin_Tools_gcc_py
diff -N patches/patch-buildtools_wafadmin_Tools_gcc_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildtools_wafadmin_Tools_gcc_py      17 Jul 2015 19:27:51 
-0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+- 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,
Index: patches/patch-buildtools_wafadmin_Tools_gxx_py
===================================================================
RCS file: patches/patch-buildtools_wafadmin_Tools_gxx_py
diff -N patches/patch-buildtools_wafadmin_Tools_gxx_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildtools_wafadmin_Tools_gxx_py      17 Jul 2015 19:27:51 
-0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+- 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,
Index: patches/patch-buildtools_wafsamba_samba_install_py
===================================================================
RCS file: patches/patch-buildtools_wafsamba_samba_install_py
diff -N patches/patch-buildtools_wafsamba_samba_install_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildtools_wafsamba_samba_install_py  17 Jul 2015 19:27:51 
-0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+- 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', ''):
Index: patches/patch-buildtools_wafsamba_wafsamba_py
===================================================================
RCS file: patches/patch-buildtools_wafsamba_wafsamba_py
diff -N patches/patch-buildtools_wafsamba_wafsamba_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-buildtools_wafsamba_wafsamba_py       17 Jul 2015 19:27:51 
-0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+- 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:
Index: patches/patch-lib_replace_replace_h
===================================================================
RCS file: patches/patch-lib_replace_replace_h
diff -N patches/patch-lib_replace_replace_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_replace_replace_h 17 Jul 2015 19:27:51 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- 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"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/libtalloc/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   16 Mar 2015 18:07:43 -0000      1.2
+++ pkg/PLIST   17 Jul 2015 19:27:51 -0000
@@ -1,9 +1,9 @@
 @comment $OpenBSD: PLIST,v 1.2 2015/03/16 18:07:43 naddy 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


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to