aboutsummaryrefslogtreecommitdiffstats
path: root/devel/staf
diff options
context:
space:
mode:
authorbrd <brd@FreeBSD.org>2016-06-16 05:21:06 +0800
committerbrd <brd@FreeBSD.org>2016-06-16 05:21:06 +0800
commit780eec00064ea17ee49746cfe0ace43a60d10875 (patch)
tree060e31954d21f612a72191557bf71fde3f7f0983 /devel/staf
parentd27c966e8fd2a87cac3870b1fd1e54d402e44473 (diff)
downloadfreebsd-ports-gnome-780eec00064ea17ee49746cfe0ace43a60d10875.tar.gz
freebsd-ports-gnome-780eec00064ea17ee49746cfe0ace43a60d10875.tar.zst
freebsd-ports-gnome-780eec00064ea17ee49746cfe0ace43a60d10875.zip
Build the zip service in devel/staf
Submitted by: asomers Approved by: bdrewery (implicit), kozlov.sergey.404@gmail.com (maintainer) Differential Revision: https://reviews.freebsd.org/D6680
Diffstat (limited to 'devel/staf')
-rw-r--r--devel/staf/Makefile7
-rw-r--r--devel/staf/files/patch-services_zip_STAFZipLocalFileHeaderCommon.cpp19
-rw-r--r--devel/staf/files/patch-services_zip_makefile.zip121
-rw-r--r--devel/staf/files/patch-services_zip_unix_STAFZipLocalFileHeader.cpp10
-rw-r--r--devel/staf/pkg-plist1
5 files changed, 156 insertions, 2 deletions
diff --git a/devel/staf/Makefile b/devel/staf/Makefile
index 3a4f84f1bfe4..0b3a29b60881 100644
--- a/devel/staf/Makefile
+++ b/devel/staf/Makefile
@@ -3,6 +3,7 @@
PORTNAME= staf
PORTVERSION= 3.4.23
+PORTREVISION= 1
CATEGORIES= devel net
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/V${PORTVERSION}
DISTNAME= STAF${PORTVERSION:S/.//g}-src
@@ -26,6 +27,7 @@ MAKE_ARGS= OS_NAME="freebsd" \
LINKFLAGS="${LDFLAGS}" \
STAF_USE_SSL=${STAF_USE_SSL} \
STAF_USE_IPV6=${STAF_USE_IPV6} \
+ ZLIB_ROOT=/usr \
BUILD_TYPE=${STAF_BUILD_TYPE} \
PROJECTS="${STAF_PROJECTS}"
@@ -59,11 +61,12 @@ USE_RC_SUBR= stafproc
SUB_LIST+= STAF_VAR_DIR=${STAF_VAR_DIR}
PLIST_SUB+= STAF_VAR_DIR=${STAF_VAR_DIR}
-STAF_PROJECTS= staf connprov_tcp connprov_localipc
+STAF_PROJECTS= staf connprov_tcp connprov_localipc zip
STAF_BIN_FILES= STAF STAFProc STAFReg STAFLoop STAFExecProxy FmtLog
STAF_LIB_FILES= libHello.so libSTAF.so libSTAFDSLS.so libSTAFDeviceService.so \
libSTAFEXECPROXY.so libSTAFLIPC.so libSTAFLog.so \
- libSTAFMon.so libSTAFPool.so libSTAFReg.so libSTAFTCP.so
+ libSTAFMon.so libSTAFPool.so libSTAFReg.so libSTAFTCP.so \
+ libSTAFZip.so
STAF_PYLIB_FILES= PySTAFLog.py PySTAFMon.py
STAF_SSL_FILES= CAList.crt STAFDefault.crt STAFDefault.key
STAF_PYTHON_VERSIONS= 22 23 24 25 26 27 30 31 32 33 34
diff --git a/devel/staf/files/patch-services_zip_STAFZipLocalFileHeaderCommon.cpp b/devel/staf/files/patch-services_zip_STAFZipLocalFileHeaderCommon.cpp
new file mode 100644
index 000000000000..0bf1439b1a94
--- /dev/null
+++ b/devel/staf/files/patch-services_zip_STAFZipLocalFileHeaderCommon.cpp
@@ -0,0 +1,19 @@
+--- services/zip/STAFZipLocalFileHeaderCommon.cpp.orig 2016-06-01 19:08:03 UTC
++++ services/zip/STAFZipLocalFileHeaderCommon.cpp
+@@ -12,7 +12,6 @@
+ #include <map>
+
+ #include "zlib.h"
+-#include "zutil.h"
+
+ #include "STAFZip.h"
+ #include "STAFZipUtil.h"
+@@ -366,7 +365,7 @@ STAFRC_t STAFZipLocalFileHeader::flush(F
+ uInt level = 9;
+
+ err = deflateInit2(&stream, level,
+- Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, 0);
++ Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY);
+
+
+ if (err != Z_OK)
diff --git a/devel/staf/files/patch-services_zip_makefile.zip b/devel/staf/files/patch-services_zip_makefile.zip
new file mode 100644
index 000000000000..75a8745b5a6f
--- /dev/null
+++ b/devel/staf/files/patch-services_zip_makefile.zip
@@ -0,0 +1,121 @@
+--- services/zip/makefile.zip.orig 2015-09-28 13:33:59 UTC
++++ services/zip/makefile.zip
+@@ -15,14 +15,19 @@ CleanupTargets += cleanup_stafzip
+ $(stafzip_targets): SUBSYS_REL := services/zip
+ SUBSYS_REL := services/zip
+
++# Location of zlib headers
++ZLIB_INCLUDEDIRS ?= $(ZLIB_ROOT:/=)/include
++# Name of the zip library to link against
++ZLIB_LIBNAME=z
++
+ #=====================================================================
+ # C/C++ Info Flags
+ #=====================================================================
+
+ $(stafzip_targets): OBJS = $(stafzip_objs)
+-$(stafzip_targets): LIBS = STAF STAFZlib
++$(stafzip_targets): LIBS = STAF $(ZLIB_LIBNAME)
+ $(stafzip_targets): CFLAGS := $(CC_EXPORT_SHARED_LIB_SYMBOLS)
+-$(stafzip_targets): INCLUDEDIRS := $(ZLIB_SOURCEDIR)
++$(stafzip_targets): INCLUDEDIRS := $(ZLIB_INCLUDEDIRS)
+
+ stafzip_objs :=\
+ STAFZip\
+@@ -43,7 +48,7 @@ stafzip_objs :=\
+ stafzip_objs := $(foreach obj,$(stafzip_objs),$(O)/services/zip/$(obj)$(OS_OE))
+ stafzip_dependents := $(stafzip_objs:$(OS_OE)=.d)
+ $(stafzip_dependents): SUBSYS_REL := services/zip
+-$(stafzip_dependents): INCLUDEDIRS := $(ZLIB_SOURCEDIR)
++$(stafzip_dependents): INCLUDEDIRS := $(ZLIB_INCLUDEDIRS)
+
+ ifeq ($(OS_NAME),win32)
+ stafzip_objs += $(SR_SRC)/STAFZip.def
+@@ -61,86 +66,8 @@ include $(InferenceRules)
+
+ # STAFZIP targets
+
+-$(REL)/lib/$(LIB_STAFZIP): $(stafzip_objs) $(LIB_STAF_FP) $(REL)/lib/$(subst Name,STAFZlib,$(DLL)) $(MAKEFILE_NAME)
++$(REL)/lib/$(LIB_STAFZIP): $(stafzip_objs) $(LIB_STAF_FP) $(MAKEFILE_NAME)
+ $(SHARED_LIB_IT)
+
+ cleanup_stafzip:
+ -@$(DEL) $(O)/services/zip/* $(OUT_ERR_TO_DEV_NULL)
+-
+-
+-#=====================================================================
+-# zLib section
+-#=====================================================================
+-
+-LIB_STAFZLIB = $(subst Name,STAFZlib,$(DLL))
+-
+-stafzlib_targets += $(REL)/lib/$(LIB_STAFZLIB)
+-
+-Targets += $(stafzlib_targets)
+-CleanupTargets += cleanup_stafzlib
+-
+-$(stafzlib_targets): SUBSYS_REL := libs/zlib
+-SUBSYS_REL := libs/zlib
+-
+-#=====================================================================
+-# C/C++ Info Flags
+-#=====================================================================
+-
+-$(stafzlib_targets): OBJS = $(stafzlib_objs)
+-$(stafzlib_targets): LIBS =
+-$(stafzlib_targets): CFLAGS := $(CC_EXPORT_SHARED_LIB_SYMBOLS)
+-
+-# The Solaris gcc compiler does not support the GNU C extension attribute,
+-# visibility (*hidden*), which is used by zlib 1.2.5 source code. Setting
+-# the NO_VIZ compiler flag resolves this problem when building zlib on
+-# Solaris.
+-
+-ifeq ($(OS_NAME),solaris)
+- $(stafzlib_targets): CFLAGS += -DNO_VIZ
+-endif
+-
+-$(stafzlib_targets): LIBDIRS = $(SR_SRC)
+-
+-stafzlib_objs :=\
+- zutil\
+- uncompr\
+- trees\
+- inftrees\
+- inflate\
+- inffast\
+- infback\
+- gzclose\
+- gzread\
+- gzwrite\
+- gzlib\
+- deflate\
+- crc32\
+- compress\
+- adler32
+-
+-stafzlib_objs := $(foreach obj,$(stafzlib_objs),$(O)/libs/zlib/$(obj)$(OS_OE))
+-stafzlib_dependents := $(stafzlib_objs:$(OS_OE)=.d)
+-$(stafzlib_dependents): SUBSYS_REL := libs/zlib
+-
+-ifeq ($(OS_NAME),win32)
+- stafzlib_objs += $(ZLIB_SOURCEDIR)/win32/zlib.def
+-endif
+-
+-# Include dependencies
+-ifneq ($(InCleanup), "1")
+- include $(stafzlib_dependents)
+-endif
+-
+-# Include inference rules
+-$(O)/$(SUBSYS_REL)/%$(OS_OE): $(ZLIB_SOURCEDIR)/%.c
+- $(COMPILE_IT_C)
+-$(O)/$(SUBSYS_REL)/%.d: $(ZLIB_SOURCEDIR)/%.c
+- $(C_DEPEND_IT_C)
+-
+-# STAFZLIB targets
+-
+-$(REL)/lib/$(LIB_STAFZLIB): $(stafzlib_objs) $(LIB_STAF_FP) $(MAKEFILE_NAME)
+- $(SHARED_LIB_IT)
+-
+-cleanup_stafzlib:
+- -@$(DEL) $(O)/libs/zlib/* $(OUT_ERR_TO_DEV_NULL)
diff --git a/devel/staf/files/patch-services_zip_unix_STAFZipLocalFileHeader.cpp b/devel/staf/files/patch-services_zip_unix_STAFZipLocalFileHeader.cpp
new file mode 100644
index 000000000000..1a82866adfd7
--- /dev/null
+++ b/devel/staf/files/patch-services_zip_unix_STAFZipLocalFileHeader.cpp
@@ -0,0 +1,10 @@
+--- services/zip/unix/STAFZipLocalFileHeader.cpp.orig 2016-06-01 19:08:10 UTC
++++ services/zip/unix/STAFZipLocalFileHeader.cpp
+@@ -13,7 +13,6 @@
+ #include <map>
+
+ #include "zlib.h"
+-#include "zutil.h"
+
+ #include "STAFZip.h"
+ #include "STAFZipUtil.h"
diff --git a/devel/staf/pkg-plist b/devel/staf/pkg-plist
index 8efcf6a24806..9d9a84620b53 100644
--- a/devel/staf/pkg-plist
+++ b/devel/staf/pkg-plist
@@ -58,6 +58,7 @@ lib/libSTAFMon.so
lib/libSTAFPool.so
lib/libSTAFReg.so
lib/libSTAFTCP.so
+lib/libSTAFZip.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/staf.pth
%%PYTHON%%%%PYTHON_SITELIBDIR%%/staf/PYSTAF.so
%%PYTHON%%%%PYTHON_2%%%%PYTHON_SITELIBDIR%%/staf/PySTAF.py