aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2014-02-25 02:51:19 +0800
committertijl <tijl@FreeBSD.org>2014-02-25 02:51:19 +0800
commit48691bd09f1dbf23d2e4a5481317af8e16233a65 (patch)
tree15cf72ffe0661541aaffad67b4f5973a65d755a0 /textproc
parent97e80afb3153e688c33798b1f910e0923c7735db (diff)
downloadfreebsd-ports-gnome-48691bd09f1dbf23d2e4a5481317af8e16233a65.tar.gz
freebsd-ports-gnome-48691bd09f1dbf23d2e4a5481317af8e16233a65.tar.zst
freebsd-ports-gnome-48691bd09f1dbf23d2e4a5481317af8e16233a65.zip
- Patch configure so it prefers libc iconv over libiconv.
- Remove CHECK_LEAKS option and associated perl command from post-patch. It doesn't do anything on FreeBSD. - Remove ICONV_TYPECAST option and associated patch. Whether iconv requires a cast depends on the system. It isn't a user option. Just let configure auto-detect this. - Make the perl dependency conditional on the DOCS option. - USES=libtool. This removes another perl command from post-patch. - Replace remaining perl command in post-patch with REINPLACE_CMD.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/sablotron/Makefile24
-rw-r--r--textproc/sablotron/files/patch-configure21
-rw-r--r--textproc/sablotron/files/patch-src__engine__encoding.cpp23
-rw-r--r--textproc/sablotron/pkg-plist3
4 files changed, 29 insertions, 42 deletions
diff --git a/textproc/sablotron/Makefile b/textproc/sablotron/Makefile
index 3c9a806ff57d..7db777151951 100644
--- a/textproc/sablotron/Makefile
+++ b/textproc/sablotron/Makefile
@@ -3,6 +3,7 @@
PORTNAME= Sablot
PORTVERSION= 1.0.3
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= SF/sablotron/sablotron-${PORTVERSION}
@@ -13,35 +14,26 @@ LICENSE= GPLv2
LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
-OPTIONS_DEFINE= CHECK_LEAKS DEBUGGER DISABLE_META DOCS \
- DOCUMENT_ERRORS DOM ICONV_TYPECAST
+OPTIONS_DEFINE= DEBUGGER DISABLE_META DOCS DOCUMENT_ERRORS DOM
-CHECK_LEAKS_DESC= Enable memory leaks checking
DEBUGGER_DESC= Enable debugger
DISABLE_META_DESC= Do not output the META html tag
DOCUMENT_ERRORS_DESC= Allow document errors
DOM_DESC= Use DOM
-ICONV_TYPECAST_DESC= Use iconv typecast
OPTIONS_DEFAULT= DOM DOCUMENT_ERRORS
-CHECK_LEAKS_CONFIGURE_ENABLE= check-leaks
DEBUGGER_CONFIGURE_ENABLE= debugger
DISABLE_META_CONFIGURE_ON= --disable-adding-meta
DOCS_BUILD_DEPENDS= p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser
DOCS_CONFIGURE_ON= --with-html-dir=${DOCSDIR}
+DOCS_USES= perl5
+DOCS_USE= PERL5=build
DOM_CONFIGURE_ENABLE= dom
DOCUMENT_ERRORS_CONFIGURE_ENABLE= document-errors
-ICONV_TYPECAST_CONFIGURE_ENABLE= iconv-typecast
-SHLIB_MAJOR= 70 # API changes counter
-PLIST_SUB+= SHLIB_MAJOR="${SHLIB_MAJOR}"
-
-USES= gmake iconv perl5
-USE_PERL5= build patch
-USE_AUTOTOOLS= libtool
GNU_CONFIGURE= yes
-CONFIGURE_ENV= LIBTOOL=${LIBTOOL}
+USES= gmake iconv libtool
USE_LDCONFIG= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -lexpat ${ICONV_LIB}
@@ -58,12 +50,8 @@ DOC_FILES2= DEBUGGER NOTES
.include <bsd.port.options.mk>
post-patch:
- @${PERL} -pi -e \
- 's!(?<=libsablot_la_LDFLAGS = -version-info )(\d+):(\d+):\1!${SHLIB_MAJOR}:$$1:${SHLIB_MAJOR}!;' \
- ${WRKSRC}/src/engine/Makefile.in
- @${PERL} -pi -e 's!se // !! if $$. = 407' ${WRKSRC}/src/engine/base.h
.if ! ${PORT_OPTIONS:MDOCS}
- @${PERL} -pi -e 's!(?<=SUBDIRS = )(.*)!man!' ${WRKSRC}/doc/Makefile.in
+ @${REINPLACE_CMD} -e '/^SUBDIRS =/s/apidoc//' ${WRKSRC}/doc/Makefile.in
.endif
post-install:
diff --git a/textproc/sablotron/files/patch-configure b/textproc/sablotron/files/patch-configure
new file mode 100644
index 000000000000..977789d1c5c8
--- /dev/null
+++ b/textproc/sablotron/files/patch-configure
@@ -0,0 +1,21 @@
+--- configure.orig
++++ configure
+@@ -22091,14 +22091,13 @@
+ if test ! x$silent = xyes; then
+ exec 6>&1
+ fi
+- #standalone library rules over libc
+- if test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then
++ if test $iconv_in_libc = 1; then
++ echo "$as_me:$LINENO: result: libc" >&5
++echo "${ECHO_T}libc" >&6
++ elif test $iconv_in_iconv = 1 -o $libiconv_in_iconv = 1; then
+ echo "$as_me:$LINENO: result: libiconv" >&5
+ echo "${ECHO_T}libiconv" >&6
+ ICONV_LIB=-liconv
+- elif test $iconv_in_libc = 1; then
+- echo "$as_me:$LINENO: result: libc" >&5
+-echo "${ECHO_T}libc" >&6
+ else
+ echo "$as_me:$LINENO: result: not found (panic)" >&5
+ echo "${ECHO_T}not found (panic)" >&6
diff --git a/textproc/sablotron/files/patch-src__engine__encoding.cpp b/textproc/sablotron/files/patch-src__engine__encoding.cpp
deleted file mode 100644
index afca8521973d..000000000000
--- a/textproc/sablotron/files/patch-src__engine__encoding.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/engine/encoding.cpp.orig 2003-11-21 08:45:11.000000000 +0000
-+++ src/engine/encoding.cpp
-@@ -30,6 +30,7 @@
- * GPL.
- */
- #include <errno.h>
-+#include <sys/param.h>
-
- #include "encoding.h"
- #include "proc.h"
-@@ -278,7 +279,12 @@ eFlag Recoder::conv(Sit S, CDesc cd, con
- errno = 0;
- iconv((iconv_t)(cd -> physCD),
- # ifdef SABLOT_ICONV_CAST_OK
-+#if defined(__FreeBSD__) || \
-+ (defined(__DragonFly__) && __DragonFly_version > 300502)
-+ (const char**)(&inbuf),
-+#else
- (char**)(&inbuf),
-+#endif
- # else
- &inbuf,
- # endif
diff --git a/textproc/sablotron/pkg-plist b/textproc/sablotron/pkg-plist
index c615df6a783f..aa65aaa04da5 100644
--- a/textproc/sablotron/pkg-plist
+++ b/textproc/sablotron/pkg-plist
@@ -9,5 +9,6 @@ include/sxpath.h
lib/libsablot.a
lib/libsablot.la
lib/libsablot.so
-lib/libsablot.so.%%SHLIB_MAJOR%%
+lib/libsablot.so.0
+lib/libsablot.so.0.100.3
man/man1/sabcmd.1.gz