aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2022-03-19 19:20:14 +0000
committerDaniel Engberg <diizzy@FreeBSD.org>2022-03-19 19:49:06 +0000
commit3f8a4349680cd01439ce8846f8addc55723ff7de (patch)
treefd1c8e846957da84701230a9ec54a4a4194cdda4
parentc3c1502372cad26671f7550d0e54d2cc77e47b3a (diff)
downloadports-3f8a4349680cd01439ce8846f8addc55723ff7de.tar.gz
ports-3f8a4349680cd01439ce8846f8addc55723ff7de.zip
devel/tclxml: Prepare for libxml2 update
The build passes CC arguments to LD. Convert to using CC for linking. Add missing library dependencies that get picked up automatically, to ensure a consistent build as a port (outside poudriere). Sort Makefile to canonical portlint/portclippy ordering. * This patch was submitted privately and I'd like to thank Matthias for guidance and fixing remaining issues * PR: 262288 Reported by: antoine (via exp-run) Approved by: portmgr (blanket)
-rw-r--r--devel/tclxml/Makefile19
-rw-r--r--devel/tclxml/files/patch-configure20
2 files changed, 31 insertions, 8 deletions
diff --git a/devel/tclxml/Makefile b/devel/tclxml/Makefile
index 19a4e2967ea5..86276132197a 100644
--- a/devel/tclxml/Makefile
+++ b/devel/tclxml/Makefile
@@ -2,7 +2,7 @@
PORTNAME= tclxml
PORTVERSION= 3.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel tcl
MASTER_SITES= LOCAL/bf SF/tclxml/TclXML/${PORTVERSION}
@@ -12,25 +12,28 @@ COMMENT= API for parsing XML documents using Tcl
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-LIB_DEPENDS= libxslt.so:textproc/libxslt
+LIB_DEPENDS= libicui18n.so:devel/icu libxslt.so:textproc/libxslt
RUN_DEPENDS?= dtplite:devel/tcllib
-PORTDOCS= README.xml html.xsl man.macros nroff.xsl tcldoc-1.0.dtd \
- tcldom.html tcldom.xml tclxml.css tclxml.html tclxml.xml \
- tclxslt.html tclxslt.xml transform.tcl txt.xsl
+USES= gnome tar:xz tcl:tea
-USES= tcl:tea tar:xz
TCL_PKG= Tclxml${PORTVERSION}
-PLIST_SUB= PORTVERSION=${PORTVERSION}
+USE_GNOME= libxml2
XML_CONFIG?= ${LOCALBASE}/bin/xml2-config
USE_LDCONFIG= ${PREFIX}/lib/${TCL_PKG}
CONFIGURE_ARGS+=XML_CONFIG="${XML_CONFIG}"
-OPTIONS_DEFINE= DOCS
MAKE_ENV+= TCLLIBPATH=${STAGEDIR}/${PREFIX}/lib
TEST_TARGET= test
+PLIST_SUB= PORTVERSION=${PORTVERSION}
+PORTDOCS= README.xml html.xsl man.macros nroff.xsl tcldoc-1.0.dtd \
+ tcldom.html tcldom.xml tclxml.css tclxml.html tclxml.xml \
+ tclxslt.html tclxslt.xml transform.tcl txt.xsl
+
+OPTIONS_DEFINE= DOCS
+
post-patch:
@${REINPLACE_CMD} -e '/^TCLSH_ENV[[:blank:]]*=/,/[^\]$$/d' \
${WRKSRC}/Makefile.in
diff --git a/devel/tclxml/files/patch-configure b/devel/tclxml/files/patch-configure
new file mode 100644
index 000000000000..c001f6a49e71
--- /dev/null
+++ b/devel/tclxml/files/patch-configure
@@ -0,0 +1,20 @@
+--- configure.orig 2022-03-16 21:59:50 UTC
++++ configure
+@@ -8580,14 +8580,14 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
+ FreeBSD-*|DragonFly-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+- SHLIB_LD="ld -Bshareable -x"
++ SHLIB_LD="${CC} -shared -Wl,-x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+- LDFLAGS="$LDFLAGS -export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
++ LD_SEARCH_FLAGS='-Wl,-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`