From 8aa2dc292a66c9dc7f170dd12657041859b6653d Mon Sep 17 00:00:00 2001 From: John Marino Date: Thu, 7 Aug 2014 23:30:51 +0000 Subject: [PATCH] security/zxid: Upgrade version 1.05 => 1.18 PR: 192481 Submitted by: Ports Fury --- security/zxid/Makefile | 79 +++++++++++++++------------- security/zxid/distinfo | 4 +- security/zxid/files/patch-Makefile | 73 ------------------------- security/zxid/files/patch-pkcs12.c | 13 +++++ security/zxid/files/patch-platform.h | 10 ++++ security/zxid/files/patch-smime.c | 12 ----- security/zxid/pkg-descr | 2 +- security/zxid/pkg-plist | 11 +++- 8 files changed, 78 insertions(+), 126 deletions(-) delete mode 100644 security/zxid/files/patch-Makefile create mode 100644 security/zxid/files/patch-pkcs12.c create mode 100644 security/zxid/files/patch-platform.h delete mode 100644 security/zxid/files/patch-smime.c diff --git a/security/zxid/Makefile b/security/zxid/Makefile index 5f3a863e6edf..aff358a2092e 100644 --- a/security/zxid/Makefile +++ b/security/zxid/Makefile @@ -2,57 +2,64 @@ # $FreeBSD$ PORTNAME= zxid -PORTVERSION= 1.05 -PORTREVISION= 1 +PORTVERSION= 1.18 CATEGORIES= security www MASTER_SITES= http://zxid.org/ MAINTAINER= ports@FreeBSD.org COMMENT= Open Source IdM for the Masses - SAML SSO +LICENSE= APACHE20 + LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl +USES= gmake tar:tgz +USE_OPENSSL= yes +USE_CSTD= gnu89 +MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" \ + LD="${CC}" LDFLAGS="${LDFLAGS}" \ + PREFIX="${PREFIX}" OPENSSL_ROOT="${OPENSSLBASE}" \ + POSTLIBS="${LDFLAGS}" TARGET="${OPSYS:tl}" +ALL_TARGET= default smime libzxid.so.0.0 +USE_LDCONFIG= yes MAKE_JOBS_UNSAFE= yes -CFLAGS+= -D_LSEEK_DECLARED -fPIC -MAKE_ARGS= CC="${CC}" CURL_ROOT="${LOCALBASE}" LD="${CC}" \ - PREFIX="${PREFIX}" OPENSSL_ROOT="${OPENSSLBASE}" -USES= gmake tar:tgz -USE_CSTD= gnu89 -USE_LDCONFIG= yes -USE_OPENSSL= yes +CFLAGS+= -I${LOCALBASE}/include -D_LSEEK_DECLARED -fPIC +LDFLAGS+= -L${LOCALBASE}/lib -ZXID_BINS= smime zxcall zxcot zxdecode zxencdectest zxid zxidhlo \ - zxidhlowsf zxidhrxmlwsc zxidhrxmlwsp zxididp zxidsimple \ - zxidwsctool zxlogview zxpasswd - -NO_STAGE= yes +BROKEN_powerpc= Does not build on ${ARCH} +BROKEN_sparc64= Does not build on ${ARCH} OPTIONS_DEFINE= DOCS -.include +ZXID_BINS= smime zxcall zxcot zxdecode zxencdectest zxidhlo \ + zxidhlowsf zxidhrxmlwsc zxidhrxmlwsp zxididp zxidsimple \ + zxidwsctool zxlogview zxpasswd post-patch: - @${REINPLACE_CMD} -e '/which gcc/d' \ - -e 's/ --export-all-symbols/ /g' \ - ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e \ + '/^LIBS/s|-lpthread|-pthread| ; \ + /^SHARED/s|--export-all-symbols|| ; \ + /which gcc/d' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e \ + 's|||' ${WRKSRC}/zxidconf.c -post-install: - ${MKDIR} ${PREFIX}/include/zxid/ - cd ${WRKSRC}/ && ${INSTALL_PROGRAM} ${ZXID_BINS} ${PREFIX}/bin/ - ${INSTALL_LIB} ${WRKSRC}/libzxid.a ${PREFIX}/lib/ - ${INSTALL_LIB} ${WRKSRC}/libzxid.so.0.0 ${PREFIX}/lib/libzxid.so.0 - ${LN} -sf libzxid.so.0 ${PREFIX}/lib/libzxid.so - cd ${WRKSRC}/ && ${INSTALL_DATA} *.h c/*.h ${PREFIX}/include/zxid/ -.if ${PORT_OPTIONS:MDOCS} - ${MKDIR} ${DOCSDIR}/ - cd ${WRKSRC}/ && ${INSTALL_DATA} *.pd ${DOCSDIR}/ -.endif +do-install: + (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${ZXID_BINS} \ + ${STAGEDIR}${PREFIX}/bin) + @${MKDIR} ${STAGEDIR}${PREFIX}/include/zx + ${LN} -sf ../zxid/zx.h ${STAGEDIR}${PREFIX}/include/zx/zx.h + @${MKDIR} ${STAGEDIR}${PREFIX}/include/zxid + (cd ${WRKSRC} && ${INSTALL_DATA} *.h c/*.h \ + ${STAGEDIR}${PREFIX}/include/zxid) + (cd ${WRKSRC} && ${INSTALL_DATA} libzxid.a \ + ${STAGEDIR}${PREFIX}/lib) + (cd ${WRKSRC} && ${INSTALL_LIB} libzxid.so.0.0 \ + ${STAGEDIR}${PREFIX}/lib) + ${LN} -sf libzxid.so.0.0 ${STAGEDIR}${PREFIX}/lib/libzxid.so + ${LN} -sf libzxid.so.0.0 ${STAGEDIR}${PREFIX}/lib/libzxid.so.0 + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${WRKSRC} && ${INSTALL_DATA} *.pd \ + ${STAGEDIR}${DOCSDIR}) -.include - -.if ${ARCH} == "powerpc" || ${ARCH} == "sparc64" -BROKEN= Does not install -.endif - -.include +.include diff --git a/security/zxid/distinfo b/security/zxid/distinfo index c05df56e22a2..bb96a7b84e35 100644 --- a/security/zxid/distinfo +++ b/security/zxid/distinfo @@ -1,2 +1,2 @@ -SHA256 (zxid-1.05.tgz) = 779de5245b026abfe73d4e7b9306c033c2dd600fc48c9d5eb0251f4c9914e190 -SIZE (zxid-1.05.tgz) = 1800009 +SHA256 (zxid-1.18.tgz) = 80cd65e0fd45d61cbf4f0a0e46c11f8dc7752979676d00ce89719ce3497ec393 +SIZE (zxid-1.18.tgz) = 2075055 diff --git a/security/zxid/files/patch-Makefile b/security/zxid/files/patch-Makefile deleted file mode 100644 index 1accd24da3bb..000000000000 --- a/security/zxid/files/patch-Makefile +++ /dev/null @@ -1,73 +0,0 @@ ---- Makefile.orig 2011-07-25 03:56:45.000000000 +0800 -+++ Makefile 2011-12-29 17:35:47.379562021 +0800 -@@ -36,7 +36,7 @@ - - default: seehelp precheck zxid zxidhlo zxididp zxidhlowsf zxidsimple zxidwsctool zxlogview zxidhrxmlwsc zxidhrxmlwsp zxdecode zxcot zxpasswd zxcall zxencdectest - --all: default precheck_apache samlmod phpzxid javazxid apachezxid smime zxidwspcgi -+all: default smime - - ### This is the authorative spot to set version number. Document in Changes file. - ### c/zxidvers.h is generated from these, see `make updatevers' -@@ -44,7 +44,7 @@ - ZXIDREL=1.02 - - ### Where package is installed (use `make PREFIX=/your/path' to change) --PREFIX=/var/zxid/$(ZXIDREL) -+PREFIX?=/var/zxid/$(ZXIDREL) - - ### Where runtime configuration and temporary data is kept. - ### If you change the following, be sure to edit zxidconf.h as -@@ -72,8 +72,8 @@ - ### - - TOP=$(shell pwd) --CURL_ROOT=/usr/local --OPENSSL_ROOT=/usr/local/ssl -+CURL_ROOT?=/usr/local -+OPENSSL_ROOT?=/usr/local/ssl - PHP_CONFIG=php-config - CSHARP_CONFIG=true - PY_CONFIG=true -@@ -90,14 +90,14 @@ - SWIG=swig - AR=ar -crs - ARX=ar -x --CC=gcc --LD=gcc -+CC?=gcc -+LD?=gcc - GCOV=gcov - LCOV=lcov - GENHTML=genhtml --SHARED_FLAGS=-shared --export-all-symbols -Wl,-whole-archive -Wl,--allow-multiple-definition --SHARED_CLOSE=-Wl,-no-whole-archive --CFLAGS=-g -fpic -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing -+SHARED_FLAGS?=-shared --export-all-symbols -Wl,-whole-archive -Wl,--allow-multiple-definition -+SHARED_CLOSE?=-Wl,-no-whole-archive -+CFLAGS?=-g -fpic -fmessage-length=0 -Wno-unused-label -Wno-unknown-pragmas -fno-strict-aliasing - #CFLAGS += -Os # gcc-3.4.6 miscompiles with -Os on ix86 - CFLAGS += -Wall -Wno-parentheses -DMAYBE_UNUSED='__attribute__ ((unused))' - #LDFLAGS += -Wl,--gc-sections -@@ -1318,7 +1318,7 @@ - endif - - libzxid.so.0.0: $(LIBZXID_A) -- $(LD) $(OUTOPT)libzxid.so.0.0 $(SHARED_FLAGS) $^ $(SHARED_CLOSE) -lcurl -lssl -lcrypt -+ $(LD) $(OUTOPT)libzxid.so.0.0 $(SHARED_FLAGS) $^ $(SHARED_CLOSE) $(LIBS) -lcurl -lssl -lcrypt - - zxid.dll zxidimp.lib: $(LIBZXID_A) - $(LD) $(OUTOPT)zxid.dll $(SHARED_FLAGS) -Wl,--output-def,zxid.def,--out-implib,zxidimp.lib $^ $(SHARED_CLOSE) $(WIN_LIBS) -mdll -@@ -1604,12 +1604,6 @@ - - install: zxid $(LIBZXID_A) libzxid.so.0.0 dir - @$(ECHO) "===== Installing in $(PREFIX) (to change do make install PREFIX=/your/path)" -- -mkdir -p $(PREFIX) $(PREFIX)/bin $(PREFIX)/lib $(PREFIX)/include/zxid $(PREFIX)/doc -- $(CP) zxmkdirs.sh zxcall zxpasswd zxcot zxlogview zxdecode zxencdectest zxcleanlogs.sh zximport-htpasswd.pl zximport-ldif.pl xml-pretty.pl diffy.pl smime send.pl xacml2ldif.pl mockpdp.pl env.cgi zxid-java.sh zxidatsel.pl zxidnewuser.pl zxidcot.pl zxiddash.pl zxidexplo.pl zxidhlo zxidhlo.pl zxidhlo.php zxidhlo.sh zxidhlo-java.sh zxidhlocgi.php zxidhlowsf zxidhrxmlwsc zxidhrxmlwsp zxididp zxidsimple zxidwsctool zxidwspcgi zxtest.pl zxsizeof $(PREFIX)/bin -- $(CP) $(LIBZXID_A) libzxid.so* $(PREFIX)/lib -- $(CP) libzxid.so.0.0 $(PREFIX)/lib -- $(CP) *.h c/*.h $(PREFIX)/include/zxid -- $(CP) *.pd *.dia $(PREFIX)/doc - @$(ECHO) "You will need to copy zxidhlo binary where your web server can find it and" - @$(ECHO) "make sure your web server is configured to recognize zxidhlo as a CGI script." - @$(ECHO) diff --git a/security/zxid/files/patch-pkcs12.c b/security/zxid/files/patch-pkcs12.c new file mode 100644 index 000000000000..42bb5fc225a2 --- /dev/null +++ b/security/zxid/files/patch-pkcs12.c @@ -0,0 +1,13 @@ +--- pkcs12.c.orig ++++ pkcs12.c +@@ -95,6 +95,10 @@ + #define SMIME_INTERNALS /* we want also our internal helper functions */ + #include "smimeutil.h" + ++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10000000L ++#define _STACK STACK ++#endif ++ + /* ================= P K C S 1 2 C O N V E R S I O N S ================ */ + /* Convert pem formatted certificate and private key into PKCS12 + * object suitable for importing to browsers. diff --git a/security/zxid/files/patch-platform.h b/security/zxid/files/patch-platform.h new file mode 100644 index 000000000000..72101f68a509 --- /dev/null +++ b/security/zxid/files/patch-platform.h @@ -0,0 +1,10 @@ +--- platform.h.orig 2013-11-27 10:56:48.000000000 +0900 ++++ platform.h 2014-07-28 07:51:37.000000000 +0900 +@@ -130,6 +130,7 @@ + * NOT MINGW nor WIN32CL (i.e. its Unix) */ + + #include ++#include + + #ifdef __cplusplus + extern "C" { diff --git a/security/zxid/files/patch-smime.c b/security/zxid/files/patch-smime.c deleted file mode 100644 index 86003d2b80f7..000000000000 --- a/security/zxid/files/patch-smime.c +++ /dev/null @@ -1,12 +0,0 @@ ---- smime.c.orig 2011-07-01 22:26:07.000000000 +0800 -+++ smime.c 2011-07-13 10:41:01.570539385 +0800 -@@ -94,9 +94,6 @@ - #include - #include - #include --#ifndef macintosh --# include --#endif - - #define DETACHED_SIG_TYPE_FILE "application/x-detached-file-signature-file" - diff --git a/security/zxid/pkg-descr b/security/zxid/pkg-descr index 08c71f49e127..0b725c90d326 100644 --- a/security/zxid/pkg-descr +++ b/security/zxid/pkg-descr @@ -8,4 +8,4 @@ Scripting languages are supported using SWIG, including Perl, PHP and Java. The "full stack" nature of ZXID means it's self contained and has minimal external library dependencies (see downloads). -WWW: http://zxid.org/ +WWW: http://zxid.org/ diff --git a/security/zxid/pkg-plist b/security/zxid/pkg-plist index 3a0cf5aab111..ce127e9627d9 100644 --- a/security/zxid/pkg-plist +++ b/security/zxid/pkg-plist @@ -3,7 +3,6 @@ bin/zxcall bin/zxcot bin/zxdecode bin/zxencdectest -bin/zxid bin/zxidhlo bin/zxidhlowsf bin/zxidhrxmlwsc @@ -13,15 +12,22 @@ bin/zxidsimple bin/zxidwsctool bin/zxlogview bin/zxpasswd +include/zx/zx.h +include/zxid/akbox.h +include/zxid/aktab.h include/zxid/errmac.h +include/zxid/hiios.h +include/zxid/hiproto.h include/zxid/logprint.h include/zxid/macglue.h include/zxid/platform.h +include/zxid/port.h include/zxid/saml2.h include/zxid/smimeutil.h include/zxid/tas3.h include/zxid/wsf.h include/zxid/yubikey.h +include/zxid/zx.h include/zxid/zx-a-data.h include/zxid/zx-ac-data.h include/zxid/zx-as-data.h @@ -86,7 +92,6 @@ include/zxid/zx-xenc-data.h include/zxid/zx-xml-data.h include/zxid/zx-xs-data.h include/zxid/zx-xsi-data.h -include/zxid/zx.h include/zxid/zx_ext_pt.h include/zxid/zxid.h include/zxid/zxidconf.h @@ -98,6 +103,7 @@ include/zxid/zxwsc.h lib/libzxid.a lib/libzxid.so lib/libzxid.so.0 +lib/libzxid.so.0.0 %%PORTDOCS%%%%DOCSDIR%%/apache.pd %%PORTDOCS%%%%DOCSDIR%%/doc-end.pd %%PORTDOCS%%%%DOCSDIR%%/doc-inc.pd @@ -125,3 +131,4 @@ lib/libzxid.so.0 %%PORTDOCS%%%%DOCSDIR%%/zxid-wsf.pd %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm include/zxid +@dirrm include/zx