1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Update libmapi to 2.3.

Switch from samba 4.0 and 4.1 choice to only 4.2. Samba 4.0 and 4.1 are
EOL and marked for deletion.

Keep the switch logic around for possible later use, since samba 4.3
is not supported at this time.

A few patches where obtained from archlinux.
This commit is contained in:
Koop Mast 2016-01-15 12:45:28 +00:00
parent 74e095d44e
commit 2c37f5fc3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=406155
8 changed files with 144 additions and 40 deletions

View File

@ -2,74 +2,89 @@
# $FreeBSD$
PORTNAME= libmapi
PORTVERSION= 2.1
PORTREVISION= 2
PORTVERSION= 2.3
CATEGORIES= mail
MASTER_SITES= http://tracker.openchange.org/attachments/download/${DOWNLOADCODE}/
MASTER_SITES= https://github.com/openchange/openchange/archive/
DISTNAME= openchange-${PORTVERSION}-${CODENAME}
MAINTAINER= kwm@FreeBSD.org
COMMENT= Open Source implementation of Microsoft Exchange protocols
BUILD_DEPENDS= ${SAMBA_DEP} \
${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
p5-Parse-Pidl>=4.0.1:${PORTSDIR}/devel/p5-Parse-Pidl
LIB_DEPENDS= libical.so:${PORTSDIR}/devel/libical \
libnanomsg.so:${PORTSDIR}/net/nanomsg \
libmemcached.so:${PORTSDIR}/databases/libmemcached \
libcheck.so:${PORTSDIR}/devel/libcheck \
libtdb.so:${PORTSDIR}/databases/tdb \
libtevent.so:${PORTSDIR}/devel/tevent \
libtalloc.so:${PORTSDIR}/devel/talloc
RUN_DEPENDS= ${SAMBA_DEP}
CODENAME= QUADRANT
DOWNLOADCODE= 244
CODENAME= VULCAN
WRKSRC= ${WRKDIR}/openchange-openchange-${PORTVERSION}-${CODENAME}
USES= compiler:c++11-lib gmake pathfix pkgconfig python shebangfix \
sqlite
USE_MYSQL= yes
USES= autoreconf:build bison compiler:c++11-lib gmake pathfix \
pkgconfig python shebangfix sqlite
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --with-samba=${LOCALBASE}
CONFIGURE_ENV= ac_cv_path_DOXYGEN="" \
PYTHON_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config
CONFIGURE_ENV= PYTHON_CONFIG=${LOCALBASE}/bin/python${PYTHON_VER}-config \
FLEX=${LOCALBASE}/bin/flex
SHEBANG_FILES= libmapi/conf/mparse.pl \
script/check_exchange \
script/mkproto.pl \
setup/openchange_group \
setup/openchange_migrate \
setup/openchange_neworganization \
setup/openchange_newuser \
setup/openchange_provision
PATHFIX_MAKEFILEIN= Makefile.am
OPTIONS_SUB= yes
OPTIONS_DEFINE= BOOST DOXYGEN SAMBA40
OPTIONS_DEFINE= BOOST DOXYGEN
# SAMBA43
OPTIONS_DEFAULT=BOOST
BOOST_LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs
BOOST_CONFIGURE_ENV_OFF= ov_cv_boost_thread=no
BOOST_DESC= libmapi C++ library (needs boost)
DOXYGEN_BUILD_DEPENDS= doxygen:${PORTSDIR}/devel/doxygen
DOXYGEN_CONFIGURE_ENV_OFF= ac_cv_path_DOXYGEN=""
SAMBA40_DESC= Build agains samba 4.0 instead of 4.1
SAMBA43_DESC= Build agains samba 4.3 instead of 4.2
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSAMBA40}
SAMBA_DEP= samba4>=4.0.1:${PORTSDIR}/net/samba4
PLIST_SUB+= SAMBA=samba4
# no support for samba 4.3 yet
.if ${PORT_OPTIONS:MSAMBA43}
SAMBA_DEP= samba43>=4.3.0:${PORTSDIR}/net/samba43
PLIST_SUB+= SAMBA=samba43
.else
SAMBA_DEP= samba41>=4.1.0:${PORTSDIR}/net/samba41
PLIST_SUB+= SAMBA=samba41
SAMBA_DEP= samba42>=4.2.0:${PORTSDIR}/net/samba42
PLIST_SUB+= SAMBA=samba42
.endif
CONFIGURE_ARGS+= --disable-pymapi
# --enable-openchange-qt4 Compile OpenChange Qt4 wrapper.
post-patch:
@${REINPLACE_CMD} -e "s/mkdir --parent/mkdir -p/g; \
s,(libdir)/pkgconfig,(prefix)/libdata/pkgconfig,g" \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|<endian.h>|<sys/endian.h>|g' \
${WRKSRC}/configure.ac
pre-configure:
@cd ${WRKSRC} && sh autogen.sh
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/openchange
cd ${WRKSRC}/doc/doxygen/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/openchange/
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/bin/*
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/lib/lib*.so.*
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/lib/shared-modules/dcerpc_server/dcesrv_mapiproxy.so
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/lib/shared-modules/dcerpc_server/*.so
@${STRIP_CMD} ${STAGEDIR}/${PREFIX}/modules/dcerpc_mapiproxy*/*.so
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (openchange-2.1-QUADRANT.tar.gz) = fc75863ab77646ae9c92e3f9f61c5104422359bb3339cfff7d6342562e1e978f
SIZE (openchange-2.1-QUADRANT.tar.gz) = 1898567
SHA256 (openchange-2.3-VULCAN.tar.gz) = 46ffdc779bb7bf6a823f6d1a78c5ca3f5548b981ad90164214a68279b403a05e
SIZE (openchange-2.3-VULCAN.tar.gz) = 2088008

View File

@ -1,16 +1,16 @@
--- Makefile.orig 2014-05-05 15:10:56.000000000 +0200
+++ Makefile 2014-05-05 15:11:14.000000000 +0200
@@ -246,9 +246,6 @@
$(INSTALL) -m 0644 gen_ndr/property.h $(DESTDIR)$(includedir)/gen_ndr/
$(INSTALL) -m 0644 gen_ndr/ndr_exchange.h $(DESTDIR)$(includedir)/gen_ndr/
--- Makefile.orig 2015-05-16 17:22:04.000000000 +0200
+++ Makefile 2015-12-20 13:01:04.141904000 +0100
@@ -255,9 +255,6 @@
$(INSTALL) -m 0644 gen_ndr/ndr_property.h $(DESTDIR)$(includedir)/gen_ndr/
$(INSTALL) -m 0644 gen_ndr/asyncemsmdb.h $(DESTDIR)$(includedir)/gen_ndr/
$(INSTALL) -m 0644 gen_ndr/ndr_asyncemsmdb.h $(DESTDIR)$(includedir)/gen_ndr/
- @$(SED) $(DESTDIR)$(includedir)/libmapi/*.h
- @$(SED) $(DESTDIR)$(includedir)/libmapi/socket/*.h
- @$(SED) $(DESTDIR)$(includedir)/gen_ndr/*.h
libmapi-installscript:
$(INSTALL) -d $(DESTDIR)$(datadir)/setup/profiles
@@ -388,7 +385,6 @@
@@ -401,7 +398,6 @@
$(INSTALL) -m 0644 libmapi++/profile.h $(DESTDIR)$(includedir)/libmapi++/
$(INSTALL) -m 0644 libmapi++/property_container.h $(DESTDIR)$(includedir)/libmapi++/
$(INSTALL) -m 0644 libmapi++/session.h $(DESTDIR)$(includedir)/libmapi++/
@ -18,7 +18,7 @@
libmapixx-libs-clean:
rm -f libmapi++/src/*.po
@@ -559,7 +555,6 @@
@@ -572,7 +568,6 @@
@echo "[*] install: libmapiadmin headers"
$(INSTALL) -d $(DESTDIR)$(includedir)/libmapiadmin
$(INSTALL) -m 0644 libmapiadmin/libmapiadmin.h $(DESTDIR)$(includedir)/libmapiadmin/
@ -26,7 +26,7 @@
libmapiadmin-uninstallpc:
rm -f $(DESTDIR)$(libdir)/pkgconfig/libmapiadmin.pc
@@ -630,7 +625,6 @@
@@ -643,7 +638,6 @@
@echo "[*] install: libocpf headers"
$(INSTALL) -d $(DESTDIR)$(includedir)/libocpf
$(INSTALL) -m 0644 libocpf/ocpf.h $(DESTDIR)$(includedir)/libocpf/
@ -34,7 +34,7 @@
libocpf-uninstallpc:
rm -f $(DESTDIR)$(libdir)/pkgconfig/libocpf.pc
@@ -794,7 +788,6 @@
@@ -830,7 +824,6 @@
endif
$(INSTALL) -m 0644 mapiproxy/libmapiserver/libmapiserver.h $(DESTDIR)$(includedir)/
$(INSTALL) -m 0644 mapiproxy/libmapiserver.pc $(DESTDIR)$(libdir)/pkgconfig
@ -42,11 +42,11 @@
libmapiserver-clean:
rm -f mapiproxy/libmapiserver/*.po mapiproxy/libmapiserver/*.o
@@ -881,7 +874,6 @@
@@ -920,7 +913,6 @@
$(INSTALL) -m 0644 mapiproxy/libmapiserver.pc $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -d $(DESTDIR)$(datadir)/setup/mapistore
$(INSTALL) -m 0644 setup/mapistore/*.ldif $(DESTDIR)$(datadir)/setup/mapistore/
- @$(SED) $(DESTDIR)$(includedir)/mapistore/*.h
libmapistore-clean: $(OC_MAPISTORE_CLEAN)
rm -f mapiproxy/libmapistore/*.po mapiproxy/libmapistore/*.o
rm -f libmapistore.$(SHLIBEXT).$(LIBMAPISTORE_SO_VERSION)

View File

@ -0,0 +1,10 @@
--- libocpf/lex.l.orig 2016-01-14 11:16:14.988281000 +0100
+++ libocpf/lex.l 2016-01-14 11:16:21.702227000 +0100
@@ -29,7 +29,6 @@
#include "libocpf/lex.h"
#define YY_EXTRA_TYPE struct ocpf_context *
-#define YY_NO_UNPUT
static void unterminated(struct ocpf_context *, const char *, unsigned int);

View File

@ -0,0 +1,36 @@
https://aur.archlinux.org/cgit/aur.git/log/openchange-issue-249.patch?h=openchange
diff -rupN a/mapiproxy/dcesrv_mapiproxy.c b/mapiproxy/dcesrv_mapiproxy.c
--- mapiproxy/dcesrv_mapiproxy.c 2015-06-16 15:41:56.599106174 -0700
+++ mapiproxy/dcesrv_mapiproxy.c 2015-06-16 15:43:29.597211031 -0700
@@ -134,10 +134,10 @@ static NTSTATUS mapiproxy_op_connect(str
switch (dce_call->pkt.ptype) {
case DCERPC_PKT_BIND:
- b->assoc_group_id = dce_call->pkt.u.bind.assoc_group_id;
+ status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.bind.assoc_group_id);
break;
case DCERPC_PKT_ALTER:
- b->assoc_group_id = dce_call->pkt.u.alter.assoc_group_id;
+ status = dcerpc_binding_set_assoc_group_id(b, dce_call->pkt.u.alter.assoc_group_id);
break;
default:
break;
@@ -154,7 +154,7 @@ static NTSTATUS mapiproxy_op_connect(str
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
+ dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
} else {
status = dcerpc_pipe_connect(dce_call->context,
@@ -169,7 +169,7 @@ static NTSTATUS mapiproxy_op_connect(str
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- dce_call->context->assoc_group->id = private->c_pipe->assoc_group_id;
+ dce_call->context->assoc_group->id = dcerpc_binding_get_assoc_group_id(private->c_pipe->binding);
}
private->connected = true;

View File

@ -0,0 +1,10 @@
--- mapiproxy/libmapistore/backends/namedprops_backend.h.orig 2016-01-14 11:22:39.236271000 +0100
+++ mapiproxy/libmapistore/backends/namedprops_backend.h 2016-01-14 11:23:03.580475000 +0100
@@ -25,6 +25,7 @@
#include <talloc.h>
#include <stdbool.h>
#include <stdint.h>
+#include <time.h>
#include "mapiproxy/libmapistore/mapistore_errors.h"
#include <param.h>

View File

@ -0,0 +1,10 @@
--- utils/ocnotify.c.orig 2016-01-14 11:24:28.465644000 +0100
+++ utils/ocnotify.c 2016-01-14 11:24:39.248704000 +0100
@@ -23,6 +23,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <time.h>
#include <talloc.h>
#include <param.h>

View File

@ -2,13 +2,18 @@ bin/check_fasttransfer
bin/exchange2ical
bin/exchange2mbox
bin/mapiprofile
bin/mapipropsdump
bin/mapitest
bin/ocnotify
bin/openchange-testsuite
bin/openchangeclient
bin/openchangemapidump
bin/openchangepfadmin
bin/schemaIDGUID
bin/test_asyncnotif
include/gen_ndr/asyncemsmdb.h
include/gen_ndr/exchange.h
include/gen_ndr/ndr_asyncemsmdb.h
include/gen_ndr/ndr_exchange.h
include/gen_ndr/ndr_property.h
include/gen_ndr/property.h
@ -37,6 +42,7 @@ include/libmapi/mapi_provider.h
include/libmapi/mapicode.h
include/libmapi/mapidefs.h
include/libmapi/nspi.h
include/libmapi/oc_log.h
include/libmapi/property_altnames.h
include/libmapi/property_tags.h
include/libmapi/socket/netif.h
@ -50,39 +56,47 @@ include/mapistore/mapistore_errors.h
include/mapistore/mapistore_nameid.h
lib/libmapi.so
lib/libmapi.so.0
lib/libmapi.so.2.0
lib/libmapi.so.2.3
lib/libmapiadmin.so
lib/libmapiadmin.so.0
lib/libmapiadmin.so.2.0
lib/libmapiadmin.so.2.3
%%BOOST%%lib/libmapipp.so
%%BOOST%%lib/libmapipp.so.0
%%BOOST%%lib/libmapipp.so.2.0
%%BOOST%%lib/libmapipp.so.2.3
lib/libmapiproxy.so
lib/libmapiproxy.so.0
lib/libmapiproxy.so.2.0
lib/libmapiproxy.so.2.3
lib/libmapiserver.so
lib/libmapiserver.so.0
lib/libmapiserver.so.2.0
lib/libmapiserver.so.2.3
lib/libmapistore.so
lib/libmapistore.so.0
lib/libmapistore.so.2.0
lib/libmapistore.so.2.3
lib/libocpf.so
lib/libocpf.so.0
lib/libocpf.so.2.0
lib/libocpf.so.2.3
lib/nagios/check_exchange
%%PYTHON_SITELIBDIR%%/openchange/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/mailbox.py
%%PYTHON_SITELIBDIR%%/openchange/migration/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/migration/directory.py
%%PYTHON_SITELIBDIR%%/openchange/migration/indexing.py
%%PYTHON_SITELIBDIR%%/openchange/migration/mapistore_namedprops.py
%%PYTHON_SITELIBDIR%%/openchange/migration/named_properties.py
%%PYTHON_SITELIBDIR%%/openchange/migration/openchangedb.py
%%PYTHON_SITELIBDIR%%/openchange/provision.py
%%PYTHON_SITELIBDIR%%/openchange/tests/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/tests/test_mailbox.py
%%PYTHON_SITELIBDIR%%/openchange/tests/test_migration.py
%%PYTHON_SITELIBDIR%%/openchange/tests/test_provision.py
%%PYTHON_SITELIBDIR%%/openchange/urlutils.py
%%PYTHON_SITELIBDIR%%/openchange/utils/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/utils/fdunix.py
%%PYTHON_SITELIBDIR%%/openchange/utils/packets.py
%%PYTHON_SITELIBDIR%%/openchange/urlutils.py
%%PYTHON_SITELIBDIR%%/openchange/web/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/web/auth/__init__.py
%%PYTHON_SITELIBDIR%%/openchange/web/auth/NTLMAuthHandler.py
%%PYTHON_SITELIBDIR%%/openchange/web/auth/__init__.py
lib/shared-modules/dcerpc_server/dcesrv_asyncemsmdb.so
lib/shared-modules/dcerpc_server/dcesrv_mapiproxy.so
%%BOOST%%libdata/pkgconfig/libmapi++.pc
libdata/pkgconfig/libmapi.pc
@ -98,6 +112,9 @@ modules/dcerpc_mapiproxy/mpm_pack.so
modules/dcerpc_mapiproxy_server/exchange_ds_rfr.so
modules/dcerpc_mapiproxy_server/exchange_emsmdb.so
modules/dcerpc_mapiproxy_server/exchange_nsp.so
sbin/openchange_group
sbin/openchange_migrate
sbin/openchange_neworganization
sbin/openchange_newuser
sbin/openchange_provision
share/mapitest/lzfu/testcase.rtf
@ -119,7 +136,11 @@ share/openchange/pictures/middle_bg.jpg
share/openchange/pictures/nav_tab.gif
share/openchange/pictures/pixel_grey.gif
share/%%SAMBA%%/setup/AD/oc_provision_configuration.ldif
share/%%SAMBA%%/setup/AD/oc_provision_configuration_as_main-disabled.ldif
share/%%SAMBA%%/setup/AD/oc_provision_configuration_as_main.ldif
share/%%SAMBA%%/setup/AD/oc_provision_configuration_finalize.ldif
share/%%SAMBA%%/setup/AD/oc_provision_configuration_new_server.ldif
share/%%SAMBA%%/setup/AD/oc_provision_configuration_org.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_attributes.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_auxiliary_class.ldif
@ -130,8 +151,10 @@ share/%%SAMBA%%/setup/AD/oc_provision_schema_possSuperior.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_sub_CfgProtocol.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_sub_mailGateway.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_subcontainer.ldif
share/%%SAMBA%%/setup/AD/oc_provision_schema_update.ldif
share/%%SAMBA%%/setup/AD/prefixMap.txt
share/%%SAMBA%%/setup/AD/provision_schema_basedn_modify.ldif
share/%%SAMBA%%/setup/AD/update_now.ldif
share/setup/mapistore/mapistore_namedprops.ldif
share/setup/openchangedb/oc_provision_openchange_init.ldif
share/setup/openchangedb/oc_provision_openchange_mailbox.ldif