Bug 186257 - [patch] www/newsbeuter: fix crash on FreeBSD 10+
Summary: [patch] www/newsbeuter: fix crash on FreeBSD 10+
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tilman Keskinoz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-29 21:40 UTC by Tijl Coosemans
Modified: 2014-01-30 16:13 UTC (History)
0 users

See Also:


Attachments
newsbeuter.patch (3.16 KB, patch)
2014-01-29 21:40 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tijl Coosemans freebsd_committer 2014-01-29 21:40:00 UTC
The attached patch fixes www/newsbeuter and devel/stfl on FreeBSD 10.

devel/stfl:
- Fix a crash on FreeBSD 10 by indicating the port uses the WCHAR_T
  iconv extension.
- Use more of the port's own build system.  This simplifies the
  Makefile.

www/newsbeuter:
- Indicate the port uses the //TRANSLIT iconv extension.
- Use OPTIONS_SUB.
Comment 1 Edwin Groothuis freebsd_committer 2014-01-29 21:40:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->arved

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Tilman Keskinoz freebsd_committer 2014-01-30 08:56:54 UTC
Hi Tijl,

Patch for newsbeuter looks ok,

Patch for stfl: Did you check there is no problem with libstfl shared
library version number going backwards from 1->0?
If there is no problem, feel free to commit.

regards
arved
Comment 3 Tijl Coosemans freebsd_committer 2014-01-30 12:18:29 UTC
On Thu, 30 Jan 2014 09:56:54 +0100 Tilman Keskinöz wrote:
> Patch for newsbeuter looks ok,
> 
> Patch for stfl: Did you check there is no problem with libstfl shared
> library version number going backwards from 1->0?
> If there is no problem, feel free to commit.


Yes it's a bit risky.  The port did install it with .0 many years ago,
but because upstream still uses .0 the current version must still be
compatible with that old version.  The real problem is when upstream
goes to .1.  That will not be compatible with our old .1 then.  If
that's not going to happen any time soon I think going back to .0 now
and installing stfl like upstream does, is acceptable.  Also, inside
the ports tree only newsbeuter depends on stfl so probably there aren't
that many users outside ports either.

To me this is acceptable but it's your call.  Changing it back to .1
requires some patching though, or I could drop all those changes and
only keep the iconv:wchar_t change?
Comment 4 Tilman Keskinoz freebsd_committer 2014-01-30 12:53:09 UTC
* Tijl Coosemans [Thu, 30 Jan 2014 13:18:29 +0100]:
>> Patch for stfl: Did you check there is no problem with libstfl shared
>> library version number going backwards from 1->0?
>> If there is no problem, feel free to commit.
> 
> Yes it's a bit risky.  The port did install it with .0 many years ago,
> but because upstream still uses .0 the current version must still be
> compatible with that old version.  The real problem is when upstream
> goes to .1.  That will not be compatible with our old .1 then.  If
> that's not going to happen any time soon I think going back to .0 now
> and installing stfl like upstream does, is acceptable.  Also, inside
> the ports tree only newsbeuter depends on stfl so probably there aren't
> that many users outside ports either.
> 
> To me this is acceptable but it's your call.  Changing it back to .1
> requires some patching though, or I could drop all those changes and
> only keep the iconv:wchar_t change?

Hm, i don't know why it was bumped 6 years ago. I think stfl is fairly
stable so we might get away with this.

Please commit then...

regards
arved
Comment 5 dfilter service freebsd_committer 2014-01-30 16:05:33 UTC
Author: tijl
Date: Thu Jan 30 16:05:25 2014
New Revision: 341856
URL: http://svnweb.freebsd.org/changeset/ports/341856
QAT: https://qat.redports.org/buildarchive/r341856/

Log:
  devel/stfl:
  - Fix a crash on FreeBSD 10 by indicating the port uses the WCHAR_T
    iconv extension.
  - Use more of the port's own build system.  This simplifies the Makefile.
  
  www/newsbeuter:
  - Indicate the port uses the //TRANSLIT iconv extension.
  - Use OPTIONS_SUB.
  
  PR:		ports/186257
  Approved by:	arved (maintainer)

Modified:
  head/devel/stfl/Makefile
  head/www/newsbeuter/Makefile

Modified: head/devel/stfl/Makefile
==============================================================================
--- head/devel/stfl/Makefile	Thu Jan 30 16:05:12 2014	(r341855)
+++ head/devel/stfl/Makefile	Thu Jan 30 16:05:25 2014	(r341856)
@@ -3,6 +3,7 @@
 
 PORTNAME=	stfl
 PORTVERSION=	0.22
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://www.clifford.at/stfl/
 
@@ -11,37 +12,30 @@ COMMENT=	Structured Terminal Forms Langu
 
 LICENSE=	GPLv3
 
+USES=		gmake iconv:wchar_t ncurses
 USE_LDCONFIG=	yes
-USES=		gmake iconv ncurses
-ALL_TARGET=	libstfl.so
-PLIST_FILES=	lib/libstfl.so.1 lib/libstfl.so include/stfl.h \
-		libdata/pkgconfig/stfl.pc
+
+PLIST_FILES=	include/stfl.h lib/libstfl.a lib/libstfl.so lib/libstfl.so.0 \
+		lib/libstfl.so.0.22 libdata/pkgconfig/stfl.pc
 CFLAGS+=	-I${LOCALBASE}/include
-LDLIBS+=	-L${LOCALBASE}/lib
-MAKE_ENV=	LDLIBS="${LDLIBS}"
+LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
+MAKE_ENV=	LDLIBS="${LDFLAGS}"
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|\.a|.so|g;/ranlib/d;\
-	s|ar qc|$${CC} $${CFLAGS} $${LDLIBS} -pthread -shared -fPIC -o|;\
-	s|sed -r|sed -E|;s|-Os||;/gcc/d;/-MM/s|-I.|$${CFLAGS}|'\
+	@${REINPLACE_CMD} -e 's|-Os||;/gcc/d;/pkgconfig/s|$$(libdir)|libdata|' \
 		${WRKSRC}/Makefile
-	@${REINPLACE_CMD} -e 's|alloca.h|stdlib.h|' ${WRKSRC}/widgets/*.c
+	@${REINPLACE_CMD} -e '/Libs.private/s|$$| ${ICONV_LIB}|' \
+		${WRKSRC}/stfl.pc.in
 	@${REINPLACE_CMD} -e 's|ncursesw/|${NCURSESINC}/|'\
 		${WRKSRC}/stfl_internals.h
 	@${ECHO_CMD} 'prefix = ${PREFIX}' > ${WRKSRC}/Makefile.cfg
+	@${ECHO_CMD} 'libdir = lib' >> ${WRKSRC}/Makefile.cfg
 
 pre-build:
 	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV}\
-		${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} Makefile.deps
-
-post-build:
-	@cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV}\
-		${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} stfl.pc
+		${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} Makefile.deps
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/libstfl.so ${STAGEDIR}${PREFIX}/lib/libstfl.so.1
-	${LN} -sf ${PREFIX}/lib/libstfl.so.1 ${STAGEDIR}${PREFIX}/lib/libstfl.so
-	${INSTALL_DATA} ${WRKSRC}/stfl.h ${STAGEDIR}${PREFIX}/include/
-	${INSTALL_DATA} ${WRKSRC}/stfl.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
+post-install:
+	${LN} -s libstfl.so.0.22 ${STAGEDIR}${PREFIX}/lib/libstfl.so.0
 
 .include <bsd.port.mk>

Modified: head/www/newsbeuter/Makefile
==============================================================================
--- head/www/newsbeuter/Makefile	Thu Jan 30 16:05:12 2014	(r341855)
+++ head/www/newsbeuter/Makefile	Thu Jan 30 16:05:25 2014	(r341856)
@@ -3,6 +3,7 @@
 
 PORTNAME=	newsbeuter
 PORTVERSION=	2.8
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://newsbeuter.org/downloads/
 
@@ -17,24 +18,16 @@ LIB_DEPENDS=	stfl:${PORTSDIR}/devel/stfl
 		libjson.so:${PORTSDIR}/devel/json-c
 
 OPTIONS_DEFINE= PODCAST
+OPTIONS_DEFAULT=PODCAST
+OPTIONS_SUB=	yes
 PODCAST_DESC=	Podcast client (podbeuter)
 
-OPTIONS_DEFAULT= PODCAST
-
-USES=		gettext iconv ncurses gmake pkgconfig perl5
+USES=		gettext gmake iconv:translit ncurses perl5 pkgconfig
 USE_PERL5=	build
 USE_SQLITE=	yes
 USE_GNOME=	libxml2
 USE_GCC=	any
 
-.include  <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MPODCAST}
-PLIST_SUB+=	PODCAST=""
-.else
-PLIST_SUB+=	PODCAST="@comment "
-.endif
-
 post-patch:
 	${REINPLACE_CMD} -e "s,share/man,man,; \
 			/^prefix/s|=.*|=${PREFIX}|; /^CXX=/d; \
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Tijl Coosemans freebsd_committer 2014-01-30 16:12:54 UTC
State Changed
From-To: open->closed

Committed in r341856.