mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-22 20:41:26 +00:00
- 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.
This commit is contained in:
parent
d7ba2fa06e
commit
b8d9710e93
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=345892
@ -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:
|
||||
|
21
textproc/sablotron/files/patch-configure
Normal file
21
textproc/sablotron/files/patch-configure
Normal file
@ -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
|
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user