From 70549776ba7d87b9cd38d67d795681730f3fc1d4 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 30 Sep 2015 23:08:54 +0000 Subject: - Drop 8.x support - Switch to options helpers - Fix installation command Approved by: portmgr blanket --- x11/xvt/Makefile | 91 ++++++-------------------- x11/xvt/files/extra-utmp_patch-src__logging.c | 12 ---- x11/xvt/files/extra-utmpx_patch-src__logging.c | 50 -------------- x11/xvt/files/patch-src_logging.c | 50 ++++++++++++++ 4 files changed, 69 insertions(+), 134 deletions(-) delete mode 100644 x11/xvt/files/extra-utmp_patch-src__logging.c delete mode 100644 x11/xvt/files/extra-utmpx_patch-src__logging.c create mode 100644 x11/xvt/files/patch-src_logging.c diff --git a/x11/xvt/Makefile b/x11/xvt/Makefile index e18abcbe6948..c36ab03dfcdb 100644 --- a/x11/xvt/Makefile +++ b/x11/xvt/Makefile @@ -47,93 +47,40 @@ OPTIONS_DEFAULT=256_COLOR GB LINESPACE MENUBAR NEXT XVT SMART TRANSPARENCY \ CONFIGURE_ARGS= --enable-utmp --enable-lastlog \ --with-xpm --enable-xpm-background --enable-shared \ - --enable-mousewheel --disable-languages + --enable-mousewheel --disable-languages \ + --disable-wtmp LIBS+= -lutil -.include - -.if ${OSVERSION} >= 900007 -CONFIGURE_ARGS+= --disable-wtmp -EXTRA_PATCHES+= ${FILESDIR}/extra-utmpx_patch-src__logging.c -.else -CONFIGURE_ARGS+= --enable-wtmp -EXTRA_PATCHES+= ${FILESDIR}/extra-utmp_patch-src__logging.c -.endif - # enable 256 color -.if ${PORT_OPTIONS:M256_COLOR} -CONFIGURE_ARGS+= --enable-256-color -.endif - +256_COLOR_CONFIGURE_ON= --enable-256-color # enable big5 support -.if ${PORT_OPTIONS:MBIG5} -CONFIGURE_ARGS+= --with-encoding=big5 --enable-languages -.endif - +BIG5_CONFIGURE_ON= --with-encoding=big5 --enable-languages # enable euc japanese support -.if ${PORT_OPTIONS:MEUCJ} -CONFIGURE_ARGS+= --with-encoding=eucj --enable-languages -.endif - +EUCJ_CONFIGURE_ON= --with-encoding=eucj --enable-languages # enable gb support -.if ${PORT_OPTIONS:MGB} -CONFIGURE_ARGS+= --with-encoding=gb --enable-languages -.endif - +GB_CONFIGURE_ON= --with-encoding=gb --enable-languages # enable greek keyboard support -.if ${PORT_OPTIONS:MGREEK} -CONFIGURE_ARGS+= --enable-greek -.endif - +GREEK_CONFIGURE_ON= --enable-greek # enable euc korean support -.if ${PORT_OPTIONS:MKR} -CONFIGURE_ARGS+= --with-encoding=kr --enable-languages -.endif - +KR_CONFIGURE_ON= --with-encoding=kr --enable-languages # enable line-spacing -.if ${PORT_OPTIONS:MLINESPACE} -CONFIGURE_ARGS+= --enable-linespace -.endif - +LINESPACE_CONFIGURE_ON= --enable-linespace # enable menubar -.if ${PORT_OPTIONS:MMENUBAR} -CONFIGURE_ARGS+= --enable-menubar -.endif - +MENUBAR_CONFIGURE_ON= --enable-menubar # enable NeXT style scrollbar -.if ${PORT_OPTIONS:MNEXT} -CONFIGURE_ARGS+= --enable-next-scroll -.endif - +NEXT_CONFIGURE_ON= --enable-next-scroll # enable xvt style scrollbar -.if ${PORT_OPTIONS:MXVT} -CONFIGURE_ARGS+= --enable-xvt-scroll -.endif - +XVT_CONFIGURE_ON= --enable-xvt-scroll # enable shift jis support -.if ${PORT_OPTIONS:MSJIS} -CONFIGURE_ARGS+= --with-encoding=sjis --enable-languages -.endif - +SJIS_CONFIGURE_ON= --with-encoding=sjis --enable-languages # enable smart resize -.if ${PORT_OPTIONS:MSMART} -CONFIGURE_ARGS+= --enable-smart-resize -.endif - +SMART_CONFIGURE_ON= --enable-smart-resize # enable transparency support -.if ${PORT_OPTIONS:MTRANSPARENCY} -CONFIGURE_ARGS+= --enable-transparency -.endif - +TRANSPARENCY_CONFIGURE_ON= --enable-transparency # XIM (X Input Method) protocol support -.if ${PORT_OPTIONS:MXIM} -CONFIGURE_ARGS+= --enable-xim -.endif - +XIM_CONFIGURE_ON= --enable-xim # enable Xterm style scrollbar -.if ${PORT_OPTIONS:MXTERM} -CONFIGURE_ARGS+= --enable-xterm-scroll -.endif +XTERM_CONFIGURE_ON= --enable-xterm-scroll post-patch: @${PERL} -pi -e 's|(PTYCHAR2\s+"[^"]+)"|\1ghijklmnopqrstuv"|' \ @@ -142,6 +89,6 @@ post-patch: post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xvt; \ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxvt.so.1.0.0 ;\ - ${CP} ${WRKSRC}/W11/wrap/xvt.png ${STAGEDIR}${PREFIX}/share/pixmaps/xvt.png + ${INSTALL_DATA} ${WRKSRC}/W11/wrap/xvt.png ${STAGEDIR}${PREFIX}/share/pixmaps/xvt.png -.include +.include diff --git a/x11/xvt/files/extra-utmp_patch-src__logging.c b/x11/xvt/files/extra-utmp_patch-src__logging.c deleted file mode 100644 index d2c539829daa..000000000000 --- a/x11/xvt/files/extra-utmp_patch-src__logging.c +++ /dev/null @@ -1,12 +0,0 @@ ---- src/logging.c.orig 2014-12-09 13:29:03.000000000 -0800 -+++ src/logging.c 2014-12-09 13:29:08.000000000 -0800 -@@ -82,7 +82,8 @@ - else if (sscanf(pty, "pts/%d", &i) == 1) - sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ - #endif -- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) { -+ else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3) && -+ STRNCMP(pty, "pts/", 4)) { - xvt_print_error("can't parse tty name \"%s\"", pty); - return; - } diff --git a/x11/xvt/files/extra-utmpx_patch-src__logging.c b/x11/xvt/files/extra-utmpx_patch-src__logging.c deleted file mode 100644 index ec071a168302..000000000000 --- a/x11/xvt/files/extra-utmpx_patch-src__logging.c +++ /dev/null @@ -1,50 +0,0 @@ ---- src/logging.c.orig 2014-12-09 13:47:18.000000000 -0800 -+++ src/logging.c 2014-12-09 13:47:35.000000000 -0800 -@@ -82,7 +82,8 @@ - else if (sscanf(pty, "pts/%d", &i) == 1) - sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ - #endif -- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) { -+ else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3) && -+ STRNCMP(pty, "pts/", 4)) { - xvt_print_error("can't parse tty name \"%s\"", pty); - return; - } -@@ -137,7 +138,9 @@ - STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", - sizeof(utx->ut_user)); - STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); -+#if 0 - utx->ut_session = getsid(0); -+#endif - utx->ut_tv.tv_sec = time(NULL); - utx->ut_tv.tv_usec = 0; - utx->ut_pid = r->h->cmd_pid; -@@ -202,7 +205,7 @@ - xvt_update_wtmp(XVT_WTMP_FILE, ut); - # endif - # endif --# ifdef HAVE_STRUCT_UTMPX -+# if 0 - updwtmpx(XVT_WTMPX_FILE, utx); - # endif - } -@@ -254,7 +257,9 @@ - if ((tmputx = getutxid(utx))) /* position to entry in utmp file */ - utx = tmputx; - utx->ut_type = DEAD_PROCESS; -+#if 0 - utx->ut_session = getsid(0); -+#endif - utx->ut_tv.tv_sec = time(NULL); - utx->ut_tv.tv_usec = 0; - #endif -@@ -274,7 +279,7 @@ - xvt_update_wtmp(XVT_WTMP_FILE, ut); - # endif - # endif --# ifdef HAVE_STRUCT_UTMPX -+# if 0 - updwtmpx(XVT_WTMPX_FILE, utx); - # endif - } diff --git a/x11/xvt/files/patch-src_logging.c b/x11/xvt/files/patch-src_logging.c new file mode 100644 index 000000000000..ec071a168302 --- /dev/null +++ b/x11/xvt/files/patch-src_logging.c @@ -0,0 +1,50 @@ +--- src/logging.c.orig 2014-12-09 13:47:18.000000000 -0800 ++++ src/logging.c 2014-12-09 13:47:35.000000000 -0800 +@@ -82,7 +82,8 @@ + else if (sscanf(pty, "pts/%d", &i) == 1) + sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ + #endif +- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) { ++ else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3) && ++ STRNCMP(pty, "pts/", 4)) { + xvt_print_error("can't parse tty name \"%s\"", pty); + return; + } +@@ -137,7 +138,9 @@ + STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", + sizeof(utx->ut_user)); + STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); ++#if 0 + utx->ut_session = getsid(0); ++#endif + utx->ut_tv.tv_sec = time(NULL); + utx->ut_tv.tv_usec = 0; + utx->ut_pid = r->h->cmd_pid; +@@ -202,7 +205,7 @@ + xvt_update_wtmp(XVT_WTMP_FILE, ut); + # endif + # endif +-# ifdef HAVE_STRUCT_UTMPX ++# if 0 + updwtmpx(XVT_WTMPX_FILE, utx); + # endif + } +@@ -254,7 +257,9 @@ + if ((tmputx = getutxid(utx))) /* position to entry in utmp file */ + utx = tmputx; + utx->ut_type = DEAD_PROCESS; ++#if 0 + utx->ut_session = getsid(0); ++#endif + utx->ut_tv.tv_sec = time(NULL); + utx->ut_tv.tv_usec = 0; + #endif +@@ -274,7 +279,7 @@ + xvt_update_wtmp(XVT_WTMP_FILE, ut); + # endif + # endif +-# ifdef HAVE_STRUCT_UTMPX ++# if 0 + updwtmpx(XVT_WTMPX_FILE, utx); + # endif + } -- cgit v1.2.3