Updated Xalan C++ to 1.8.0 and fixed to work with Xerces C++ 2.6.0

Based on PR:	ports/73259
Submitted by:	Douglas Thrift
Heavily hacked on by: Bjoern A. Zeeb (maintainer)
This commit is contained in:
Volker Stolz 2005-01-17 17:45:52 +00:00
parent 44af68883a
commit af049c5ab8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=126659
8 changed files with 102 additions and 147 deletions

View file

@ -7,30 +7,43 @@
# ------------------------------------------------------------------------------
PORTNAME= xalan-c
PORTVERSION= 1.7.0
PORTVERSION= 1.8.0
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_APACHE_XML:S/$/:msax,docs/}
MASTER_SITE_SUBDIR= ${PORTNAME}/source/:msax ${PORTNAME}/docs/:docs
.if defined(DEBUG)
PKGNAMESUFFIX+= -debug
.endif
DISTNAME= Xalan-C_${PORTVERSION:S/./_/g}-src:msax
DISTFILES+= Xalan-C_${PORTVERSION:S/./_/g}-src${EXTRACT_SUFX}:msax
.if !defined(NOPORTDOCS)
DISTFILES+= ${DOCS_TARBALL}:docs
EXTRACT_ONLY= Xalan-C_${PORTVERSION:S/./_/g}-src${EXTRACT_SUFX}
.endif
MAINTAINER= bzeeb+freebsdports@zabbadoz.net
COMMENT= XSLT processor from the Apache XML Project
OPTIONS= INMEM "Use inmem locale system." on \
ICU "Use ICU locale system." off \
NLS "Use nls locale system." off \
TRANSCODER_ICU "Use ICU transcoder (if used in xerces-c2)." off \
SAMPLES "Copy sample binaries and sources." on \
PORTDOCS "Copy documentation." on \
DEBUG "Include debugging information, do not strip." off
.include <bsd.port.pre.mk>
# move this further down though portlint might not like it but without
# this I will not be able to make use of make config in the future.
.if defined(WITH_DEBUG)
PKGNAMESUFFIX+= -debug
.endif
.if defined(WITHOUT_PORTDOCS)
NOPORTDOCS= yes
.endif
.if !defined(NOPORTDOCS)
DISTFILES+= ${DOCS_TARBALL}:docs
EXTRACT_ONLY= Xalan-C_${PORTVERSION:S/./_/g}-src${EXTRACT_SUFX}
DOCS_TARBALL= Xalan-C_${PORTVERSION:S/./_/g}-docs${EXTRACT_SUFX}
.endif
# we need the _extracted_ xerces-c2 port sources to build this one
# (installed version of port is enough)
XERCESC_LIB_VER?= 25
XERCESC_LIB_VER?= 26
LIB_DEPENDS+= xerces-c.${XERCESC_LIB_VER}:${PORTSDIR}/textproc/xerces-c2
XERCESCROOT?= ${LOCALBASE}
@ -50,9 +63,19 @@ CONFIGURE_ENV+= XALANCROOT=${WRKSRC}
CONFIGURE_ENV+= XERCESCROOT=${XERCESCROOT}
CONFIGURE_ENV+= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
CONFIGURE_ARGS+= -p freebsd -c ${CC} -x ${CXX} \
CONFIGURE_ARGS+= -p freebsd -c ${CC} -x ${CXX} -l ${PTHREAD_LIBS} \
-z -I${LOCALBASE}/include -C --prefix=${PREFIX}
.if defined(WITH_INMEM)
LOCALSYS= inmem
.endif
.if defined(WITH_ICU)
LOCALSYS= icu
.endif
.if defined(WITH_NLS)
LOCALSYS= nls
.endif
.if !defined(LOCALSYS)
CONFIGURE_ARGS+= -m inmem
PLIST_SUB+= LOCALSYS_INMEM=""
@ -62,7 +85,7 @@ PLIST_SUB+= LOCALSYS_NLS="@comment "
CONFIGURE_ARGS+= -m icu
PLIST_SUB+= LOCALSYS_INMEM=""
PLIST_SUB+= LOCALSYS_NLS="@comment "
TRANSCODER= icu
WITH_TRANSCODER_ICU= icu
.elif (${LOCALSYS} == "nls")
CONFIGURE_ARGS+= -m nls
PLIST_SUB+= LOCALSYS_INMEM="@comment "
@ -74,7 +97,7 @@ PLIST_SUB+= LOCALSYS_NLS="@comment "
.endif
.endif
.if defined(TRANSCODER) && (${TRANSCODER} == "icu")
.if defined(WITH_TRANSCODER_ICU)
PKGNAMESUFFIX+= -icu
LIB_DEPENDS+= icuuc.28:${PORTSDIR}/devel/icu2
ICUROOT?= ${LOCALBASE}
@ -91,19 +114,11 @@ MAKE_ENV+= LDFLAGS='-L${LOCALBASE}/lib -liconv'
PLIST_SUB+= ICUDEP="@comment "
.endif
.if defined(DEBUG)
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= -d
STRIP=
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502126
BROKEN= "Does not compile on FreeBSD >= 5.x"
.else
BROKEN= "Broken dependency"
.endif
.if defined(ARCH) && \
(${ARCH} == "alpha" || ${ARCH} == "sparc64" || \
${ARCH} == "amd64" || ${ARCH} == "ia64")
@ -119,7 +134,7 @@ PLIST_SUB+= XALANC_LIB=${XALANC_LIB} \
XALANMSG_LIB=${XALANMSG_LIB} \
XALANC_LIB_VERSION=${XALANC_LIB_VERSION}
.if !defined(NO_SAMPLES)
.if !defined(WITHOUT_SAMPLES)
PLIST_SUB+= NO_SAMPLES=""
ALL_TARGET?= all samples
SAMPLE_BINS= CompileStylesheet DocumentBuilder ExternalFunction \
@ -135,30 +150,21 @@ PLIST_SUB+= NO_SAMPLES="@comment "
PORTDOCS= *
.endif
pre-everything::
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
@${ECHO} ''
@${ECHO} 'You may use the following build options by defining'
@${ECHO} 'them on the command line with -D'
@${ECHO} ''
@${ECHO} 'NO_SAMPLES do not copy sample binaries and sources'
@${ECHO} 'NOPORTDOCS do not include documentation'
@${ECHO} 'DEBUG include debugging information, do not strip'
@${ECHO} ''
@${ECHO} 'Also you may set the following options (without -D):'
@${ECHO} ''
@${ECHO} 'LOCALSYS=[inmem|nls|icu] default:inmem'
@${ECHO} 'TRANSCODER=icu (most likely if xerces-c2 also' \
'compiled with icu support)'
@${ECHO} ''
@/bin/sleep 2
.endif
SCRIPTS_ENV= WITH_INMEM="${WITH_INMEM}" \
WITH_ICU="${WITH_ICU}" \
WITH_NLS="${WITH_NLS}"
pre-extract:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/check-config-options
post-patch:
${RM} -f ${WRKSRC}/src/xalanc/PlatformSupport/XalanArrayAllocator.hpp.orig
post-install:
.if !defined(DEBUG)
.if !defined(WITH_DEBUG)
@${STRIP_CMD} ${PREFIX}/lib/${XALANC_LIB}
.endif
.if !defined(NO_SAMPLES)
.if !defined(WITHOUT_SAMPLES)
.for i in ${SAMPLE_BINS}
@${INSTALL_PROGRAM} ${WRKSRC}/bin/$i ${PREFIX}/bin
.endfor
@ -171,8 +177,8 @@ post-install:
cd ${DOCSDIR} && \
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${_DISTDIR}/${DOCS_TARBALL} ${EXTRACT_AFTER_ARGS} && \
${MV} ${DOCSDIR}/Xalan-C_${PORTVERSION:S/./_/g}-docs/* ${DOCSDIR} && \
${RMDIR} ${DOCSDIR}/Xalan-C_${PORTVERSION:S/./_/g}-docs
${MV} ${DOCSDIR}/docs/* ${DOCSDIR} && \
${RMDIR} ${DOCSDIR}/docs
.endif
post-clean:

View file

@ -1,4 +1,4 @@
MD5 (Xalan-C_1_7_0-src.tar.gz) = 911a952fb1cccc0d97b54ff32b9a52f7
SIZE (Xalan-C_1_7_0-src.tar.gz) = 1357604
MD5 (Xalan-C_1_7_0-docs.tar.gz) = 73021aa1e8f0a7d03839861fc1399bec
SIZE (Xalan-C_1_7_0-docs.tar.gz) = 12128515
MD5 (Xalan-C_1_8_0-src.tar.gz) = fca5101f56608311f8121591f022bc2c
SIZE (Xalan-C_1_8_0-src.tar.gz) = 1351965
MD5 (Xalan-C_1_8_0-docs.tar.gz) = 3bbd4eff456e7051879558d04db9fa4d
SIZE (Xalan-C_1_8_0-docs.tar.gz) = 8743423

View file

@ -1,46 +1,12 @@
! fix FreeBSD specific threading and linking things
--- samples/runConfigure.orig Sun Feb 29 11:16:27 2004
+++ samples/runConfigure Sun Feb 29 11:17:16 2004
@@ -333,7 +333,13 @@
elif test $platform = "aix"; then
threadingLibs="-lpthreads"
elif test $platform = "freebsd"; then
- threadingLibs="-pthread -lc_r"
+ if test -n "${PTHREAD_LIBS}" ; then
+ threadingLibs="${PTHREAD_LIBS}"
+ threadingDefines="${PTHREAD_CFLAGS}"
+ else
+ threadingLibs="-lpthread"
+ threadingDefines=""
+ fi
elif test $platform = "netbsd"; then
threadingLibs="-pthread -lpthread"
elif test $platform = "hp-10"; then
--- Makefile.incl.in.orig Sun Feb 29 11:13:13 2004
+++ Makefile.incl.in Sun Feb 29 11:13:41 2004
@@ -200,7 +200,7 @@
ifdef XALAN_USE_ICU
LD_RPATH_PRE = -Wl,-rpath,
PLATFORM_LIB_LINK_OPTIONS = $(LD_RPATH_PRE)${ICUROOT}/lib
- PLATFORM_LIB_LINK_OPTIONS += -licuuc -licudata -lgcc
+ PLATFORM_LIB_LINK_OPTIONS += -licuuc -licudata
ALLLIBS += -L${ICUROOT}
endif
Xalan-C CVS: xml-xalan/c/src/xalanc/PlatformSupport/XalanArrayAllocator.hpp?r1=1.6&r2=1.7
--- src/xalanc/PlatformSupport/XalanArrayAllocator.hpp.orig Mon Dec 13 21:34:54 2004
+++ src/xalanc/PlatformSupport/XalanArrayAllocator.hpp Mon Dec 13 21:35:22 2004
@@ -170,7 +170,7 @@
ListEntryType& theNewEntry = m_list.back();
--- runConfigure.orig Sun Feb 29 11:13:46 2004
+++ runConfigure Sun Feb 29 11:16:14 2004
@@ -470,7 +470,13 @@
elif test $platform = "aix"; then
threadingLibs="-lpthreads"
elif test $platform = "freebsd"; then
- threadingLibs="-pthread -lc_r"
+ if test -n "${PTHREAD_LIBS}" ; then
+ threadingLibs="${PTHREAD_LIBS}"
+ threadingDefines="${PTHREAD_CFLAGS}"
+ else
+ threadingLibs="-lpthread"
+ threadingDefines=""
+ fi
elif test $platform = "netbsd"; then
threadingLibs="-pthread -lpthread"
elif test $platform = "hp-10"; then
// Resize the vector to the appropriate size...
- theNewEntry.second.resize(theBlockSize, VectorType::value_type(0));
+ theNewEntry.second.resize(theBlockSize, value_type(0));
// Set the number of free spaces accordingly...
theNewEntry.first = theBlockSize - theCount;

View file

@ -1,12 +1,11 @@
! taken from xalan-c CVS
--- samples/ThreadSafe/ThreadSafe.cpp.orig Sun Feb 29 21:07:39 2004
+++ samples/ThreadSafe/ThreadSafe.cpp Sun Feb 29 21:07:55 2004
@@ -95,7 +95,7 @@
#elif defined(XALAN_POSIX2_AVAILABLE)
#include <pthread.h>
#include <unistd.h>
- typedef unsigned long theThreadIDType;
+ typedef pthread_t theThreadIDType;
typedef pthread_t theThreadType;
#else
--- src/xalanc/Makefile.in.orig Mon Dec 13 22:00:00 2004
+++ src/xalanc/Makefile.in Mon Dec 13 22:01:57 2004
@@ -253,7 +253,7 @@
$(MKINSTALLDIRS) $(DESTDIR)/$(includedir)/xalanc
for hdir in $(ALL_HEADERS_DIRS); do \
$(MKINSTALLDIRS) $(DESTDIR)/$(includedir)/xalanc/$$hdir; \
- cp $(XALANCROOT)/src/xalanc/$$hdir/*.h* \
+ $(INSTALL_DATA) $(XALANCROOT)/src/xalanc/$$hdir/*.h* \
$(DESTDIR)/$(includedir)/xalanc/$$hdir \
2> /dev/null; \
done

View file

@ -1,16 +0,0 @@
! taken from xalan-c CVS
--- ./src/xalanc/Utils/Makefile.in.orig Sun Feb 29 21:26:41 2004
+++ ./src/xalanc/Utils/Makefile.in Sun Feb 29 21:28:01 2004
@@ -95,10 +95,10 @@ ifeq ($(MESSAGELOADER),INMEM)
locale: $(MESSAGELIB)
-$(MESSAGELIB): $(XALANMSGLIB_SRC)/LocalMsgData.hpp
+$(MESSAGELIB): $(XALANMSGLIB_SRC)/include/LocalMsgData.hpp
$(MAKE) -C XalanMsgLib
-$(XALANMSGLIB_SRC)/LocalMsgData.hpp : $(XSL_BIN_DIR)/MsgCreator $(XLIFF_FILE_NAME)
+$(XALANMSGLIB_SRC)/include/LocalMsgData.hpp : $(XSL_BIN_DIR)/MsgCreator $(XLIFF_FILE_NAME)
$(XSL_BIN_DIR)/MsgCreator $(XLIFF_FILE_NAME) -TYPE $(MESSAGELOADER) -LOCALE $(LOCALE)
@$(MOVE) LocalMsgIndex.hpp $(XSL_NLS_DIR)/include
@$(MOVE) LocalMsgData.hpp $(XSL_NLS_DIR)/include

View file

@ -1,25 +0,0 @@
! fix INSTALL_{PROGRAM->DATA}
--- src/xalanc/Utils/Makefile.in.orig Sun Feb 29 21:26:41 2004
+++ src/xalanc/Utils/Makefile.in Sun Feb 29 21:28:01 2004
@@ -202,7 +202,7 @@
-${MKDIR} -p $(XSL_NLS_DIR)/include
doCommonInstall:
- $(INSTALL_PROGRAM) $(XSL_NLS_DIR)/include/LocalMsgIndex.hpp $(XALANCROOT)/src/xalanc/PlatformSupport
+ $(INSTALL_DATA) $(XSL_NLS_DIR)/include/LocalMsgIndex.hpp $(XALANCROOT)/src/xalanc/PlatformSupport
doClean:
$(MAKE) -C XalanMsgLib $@
--- Makefile.in.orig Sun Feb 29 21:30:03 2004
+++ Makefile.in Sun Feb 29 21:30:17 2004
@@ -85,8 +85,8 @@
install-extras:
$(MKINSTALLDIRS) $(DESTDIR)/$(prefix)
- $(INSTALL_PROGRAM) $(XALANCROOT)/../KEYS.txt $(DESTDIR)/$(prefix)
- $(INSTALL_PROGRAM) $(XALANCROOT)/License $(DESTDIR)/$(prefix)
+ $(INSTALL_DATA) $(XALANCROOT)/../KEYS.txt $(DESTDIR)/$(prefix)
+ $(INSTALL_DATA) $(XALANCROOT)/License $(DESTDIR)/$(prefix)

View file

@ -16,6 +16,7 @@ include/xalanc/DOMSupport/XalanNamespacesStack.hpp
%%ICUDEP%%include/xalanc/ICUBridge/ICUXalanNumberFormatFactory.hpp
%%ICUDEP%%include/xalanc/ICUBridge/ICUXalanNumberFormatProxy.hpp
include/xalanc/Include/AIXDefinitions.hpp
include/xalanc/Include/CygwinDefinitions.hpp
include/xalanc/Include/GCCDefinitions.hpp
include/xalanc/Include/HPUXDefinitions.hpp
include/xalanc/Include/IntelDefinitions.hpp
@ -65,7 +66,6 @@ include/xalanc/PlatformSupport/XalanDOMStringAllocator.hpp
include/xalanc/PlatformSupport/XalanDOMStringCache.hpp
include/xalanc/PlatformSupport/XalanDOMStringHashTable.hpp
include/xalanc/PlatformSupport/XalanDOMStringPool.hpp
include/xalanc/PlatformSupport/XalanDecimalFormat.hpp
include/xalanc/PlatformSupport/XalanDecimalFormatSymbols.hpp
include/xalanc/PlatformSupport/XalanEncodingPropertyCache.hpp
include/xalanc/PlatformSupport/XalanFStreamOutputStream.hpp
@ -298,6 +298,7 @@ include/xalanc/XSLT/XalanElemVariableAllocator.hpp
include/xalanc/XSLT/XalanNumberingResourceBundle.hpp
include/xalanc/XSLT/XalanSourceTreeDocumentAllocator.hpp
include/xalanc/XSLT/XalanSourceTreeDocumentFragmentAllocator.hpp
include/xalanc/XSLT/XalanSpaceNodeTester.hpp
include/xalanc/XalanDOM/XalanAttr.hpp
include/xalanc/XalanDOM/XalanCDATASection.hpp
include/xalanc/XalanDOM/XalanCharacterData.hpp

View file

@ -0,0 +1,24 @@
#!/bin/sh
# $FreeBSD$
rc=0
if test -n "${WITH_NLS}"; then
rc=$(expr $rc + 1)
fi
if test -n "${WITH_ICU}"; then
rc=$(expr $rc + 1)
fi
if test -n "${WITH_INMEM}"; then
rc=$(expr $rc + 1)
fi
if test ${rc} -gt 1; then
echo "ERROR: please re-run make config and" >&2
echo "only select one of the three locale systems." >&2
exit 254
fi
exit 0
# end