Bug 158946 - [patch] sysutils/tmux -- update to 1.5, take maintainship
Summary: [patch] sysutils/tmux -- update to 1.5, take maintainship
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: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-15 13:20 UTC by Pietro Cerutti
Modified: 2011-07-15 17:00 UTC (History)
0 users

See Also:


Attachments
file.diff (7.47 KB, patch)
2011-07-15 13:20 UTC, Pietro Cerutti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti freebsd_committer freebsd_triage 2011-07-15 13:20:09 UTC
Wen, I'm ready to take the port now.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-15 13:20:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 wenheping 2011-07-15 13:28:04 UTC
I agree.
Please commit it.

wen
Comment 3 Pan Tsu 2011-07-15 13:42:09 UTC
It needlessly links against librt on FreeBSD for clock_gettime(2).
Here are two ways to fix, the second can be sent upstream.

--- a.diff begins here ---
diff --git Makefile Makefile
index 92ab6d1..d290206 100644
--- Makefile
+++ Makefile
@@ -55,6 +55,7 @@ EXTRA_PATCHES=	${PATCHDIR}/extra-patch-tty-keys.c
 post-patch:
 	@${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' \
 		${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h ${WRKSRC}/CHANGES
+	${REINPLACE_CMD} -e '/LIBS=/s/-lrt//' ${WRKSRC}/${CONFIGURE_SCRIPT}
 .if defined(WITH_LIBEVENT_STATIC)
 	${REINPLACE_CMD} -e '4534s|$$ac_res |${LESTATIC} |' ${WRKSRC}/${CONFIGURE_SCRIPT}
 .endif
--- a.diff ends here ---

--- b.diff begins here ---
Index: configure.ac
===================================================================
--- configure.ac	(revision 2561)
+++ configure.ac	(working copy)
@@ -102,7 +102,7 @@ AM_CONDITIONAL(IS_GLIBC, test "x$found_glibc" = xy
 AC_MSG_RESULT($found_glibc)
 
 # Look for clock_gettime. Must come before event_init.
-AC_CHECK_LIB(rt, clock_gettime)
+AC_SEARCH_LIBS(clock_gettime, rt)
 
 # Look for libevent.
 AC_SEARCH_LIBS(event_init, [event event-1.4 event2], found_libevent=yes, found_libevent=no)
--- b.diff ends here ---
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2011-07-15 15:41:22 UTC
This is a good idea, I like version 2 very much, but patching that way
means rebuilding ${CONFIGURE_SCRIPT}, which means

-HAS_CONFIGURE= yes
+USE_AUTOTOOLS= autoconf

in our Makefile, with subsequent boost in the number of dependent ports
from 1 (only libevent) to 11 (all the autotools stuff).

For this reason, I'll propose 2 upstream and go with 1 for the moment.

Thanks a lot!

On 2011-Jul-15, 16:42, Pan Tsu wrote:
> It needlessly links against librt on FreeBSD for clock_gettime(2).
> Here are two ways to fix, the second can be sent upstream.
> 
> --- a.diff begins here ---
> diff --git Makefile Makefile
> index 92ab6d1..d290206 100644
> --- Makefile
> +++ Makefile
> @@ -55,6 +55,7 @@ EXTRA_PATCHES=	${PATCHDIR}/extra-patch-tty-keys.c
>  post-patch:
>  	@${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' \
>  		${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h ${WRKSRC}/CHANGES
> +	${REINPLACE_CMD} -e '/LIBS=/s/-lrt//' ${WRKSRC}/${CONFIGURE_SCRIPT}
>  .if defined(WITH_LIBEVENT_STATIC)
>  	${REINPLACE_CMD} -e '4534s|$$ac_res |${LESTATIC} |' ${WRKSRC}/${CONFIGURE_SCRIPT}
>  .endif
> --- a.diff ends here ---
> 
> --- b.diff begins here ---
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 2561)
> +++ configure.ac	(working copy)
> @@ -102,7 +102,7 @@ AM_CONDITIONAL(IS_GLIBC, test "x$found_glibc" = xy
>  AC_MSG_RESULT($found_glibc)
>  
>  # Look for clock_gettime. Must come before event_init.
> -AC_CHECK_LIB(rt, clock_gettime)
> +AC_SEARCH_LIBS(clock_gettime, rt)
>  
>  # Look for libevent.
>  AC_SEARCH_LIBS(event_init, [event event-1.4 event2], found_libevent=yes, found_libevent=no)
> --- b.diff ends here ---


-- 
Pietro Cerutti
The FreeBSD Project
gahr@FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-07-15 15:48:41 UTC
gahr        2011-07-15 14:48:32 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/tmux        Makefile distinfo 
  Removed files:
    sysutils/tmux/files  extra-patch-fb7 extra-patch-kqueue 
                         extra-patch-kqueue_and_fb7 
                         patch-hostname.diff 
  Log:
  - Update to 1.5
  - Take maintainship
  - Do not link against librt if not needed
  
  PR:             158946
  Submitted by:   gahr@FreeBSD.org
  Enhanced by:    Pan Tsu <inyaoo@gmail.com>
  
  Revision  Changes    Path
  1.31      +17 -46    ports/sysutils/tmux/Makefile
  1.16      +2 -2      ports/sysutils/tmux/distinfo
  1.2       +0 -18     ports/sysutils/tmux/files/extra-patch-fb7 (dead)
  1.2       +0 -10     ports/sysutils/tmux/files/extra-patch-kqueue (dead)
  1.2       +0 -20     ports/sysutils/tmux/files/extra-patch-kqueue_and_fb7 (dead)
  1.2       +0 -32     ports/sysutils/tmux/files/patch-hostname.diff (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Pietro Cerutti freebsd_committer freebsd_triage 2011-07-15 15:53:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!