Date: Mon, 20 Sep 2010 20:00:05 +0400 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/150759: [patch] sysutils/jfbterm: use make(1) and OPTIONS Message-ID: <8639t4be2i.fsf@gmail.com> Resent-Message-ID: <201009201610.o8KGA4D2028888@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 150759 >Category: ports >Synopsis: [patch] sysutils/jfbterm: use make(1) and OPTIONS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Sep 20 16:10:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: LOCALBASE = /usr/pkg While default is good I prefer below conf: term: xterm # sharing screen sessions with X11 splash.image: .wallpaper.png splash.tint: 8 fontset: iso10646.1,pcf,L,/usr/pkg/lib/X11/fonts/terminus-font/ter-x32n.pcf.gz mouse.type: SysMouse mouse.device: /dev/sysmouse mouse.cursor.color: 10 cursor.color: 7 video.mode: 1600x1200x32 >Description: Since ports/139107 (bsdmake), ports/146230 (png14), ports/146271 (PREFIX) were forcedly closed by pgollucci@ here is a cumulative and fresh diff. I'm re-adding ONLY_FOR_ARCHS that was removed by lippe@ in r1.5 because while it builds fine the package may not work on archs without VESA support. All options are ON in order for package to work with default configuration. FYI, I tested building with BSDmakefile a bit on NetBSD and using devel/bmake port. Perhaps, it can be included upstream. >How-To-Repeat: $ make install $ jfbterm No need to manually configure: - termcap(5) will be spammed with jfbterm record, currently it's not removed upon deinstall - vesa.ko will be kld_load()'ed automatically by the setuid binary >Fix: --- a.diff begins here --- Index: sysutils/jfbterm/Makefile =================================================================== RCS file: /a/.cvsup/ports/sysutils/jfbterm/Makefile,v retrieving revision 1.12 diff -u -p -r1.12 Makefile --- sysutils/jfbterm/Makefile 15 Sep 2010 18:35:13 -0000 1.12 +++ sysutils/jfbterm/Makefile 17 Sep 2010 05:30:50 -0000 @@ -6,33 +6,127 @@ PORTNAME= jfbterm PORTVERSION= 0.6.1 -PORTREVISION= 1 +DISTVERSIONPREFIX=${OPSYS}- +PORTREVISION= 2 CATEGORIES= sysutils -MASTER_SITES= http://www.ac.auone-net.jp/~baba/jfbterm/ \ +MASTER_SITES= http://www.ac.auone-net.jp/~baba/${PORTNAME}/ \ http://chirashi-no-ura.net/files/ -DISTNAME= ${PORTNAME}-FreeBSD-${PORTVERSION} MAINTAINER= bsdports@gmail.com -COMMENT= Multilanguage can be displayed on the console +COMMENT= Multilingual terminal emulator for framebuffer -LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png -RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/local/unifont.pcf.gz:${PORTSDIR}/x11-fonts/gnu-unifont +LICENSE= BSD +LICENSE_FILE= ${WRKSRC}/COPYING -USE_ICONV= yes -USE_GNOME= pkgconfig -PKGMESSAGE= ${WRKDIR}/pkg-message -SUB_FILES= pkg-message -USE_GMAKE= yes -GNU_CONFIGURE= yes -USE_AUTOTOOLS= autoconf:267 automake:14 -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" \ - --mandir="${LOCALBASE}/man" - -MAN1= jfbterm.1 -MAN5= jfbterm.conf.5 +ONLY_FOR_ARCHS= i386 pc98 +ONLY_FOR_ARCHS_REASON= requires VESA support in kernel -post-install: - @${CAT} ${PKGMESSAGE} +MAKE_JOBS_SAFE= yes +MAKEFILE= ${FILESDIR}/BSDmakefile +MAKE_ENV+= VERSION=${PORTVERSION} GUNZIP=${GUNZIP_CMD:N-*} +PLIST_SUB+= TERMCAP_ADD_RECORD="@exec ${TERMCAP_ADD_RECORD}" + +CAP_MKDB?= /usr/bin/cap_mkdb + +OPTIONS= ICONV "encodings support" On \ + PNG "splash .png support" On \ + TERMCAP "add entry to termcap(5) file" On \ + UNIFONT "install pan-unicode font" On + +.if !defined(WITHOUT_SETUID) +BINMODE?= 4555 +.endif + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 800504 +ONLY_FOR_ARCHS+=amd64 +.endif + +.if !defined(INSTALL_AS_USER) +TERMCAP_FILE?= /usr/share/misc/termcap +.else +TERMCAP_FILE?= ~/.termcap +.endif + +.if !defined(NO_INSTALL_MANPAGES) +MAN1= ${PORTNAME}.1 +MAN5= ${PORTNAME}.conf.5 +.endif + +.if defined(WITHOUT_ICONV) +MAKE_ENV+= WITHOUT_ICONV= +.endif + +.if !exists(/usr/include/iconv.h) +. if !defined(WITHOUT_ICONV) +. if !defined(NO_SHARED) +USE_ICONV= yes +. else +BUILD_DEPENDS+= ${LOCALBASE}/lib/libiconv.a:${PORTSDIR}/converters/libiconv +. endif +. else +BUILD_DEPENDS+= ${LOCALBASE}/include/iconv.h:${PORTSDIR}/converters/libiconv +. endif +.endif + +.if !defined(WITHOUT_PNG) +. if !defined(NO_SHARED) +LIB_DEPENDS+= png.6:${PORTSDIR}/graphics/png +. else +BUILD_DEPENDS+= ${LOCALBASE}/lib/libpng.a:${PORTSDIR}/graphics/png +. endif +.else +MAKE_ENV+= WITHOUT_PNG= +.endif + +.if !defined(WITHOUT_TERMCAP) +TERMCAP_ADD_RECORD= \ + if ${GREP} -q '^jfbterm|' ${TERMCAP_FILE}; then else \ + ${CAT} ${PREFIX}/share/jfbterm/termcap.jfbterm \ + >>${TERMCAP_FILE}; \ + if [ -f ${TERMCAP_FILE}.db ]; then \ + ${CAP_MKDB} ${TERMCAP_FILE}; \ + fi \ + fi +.else +TERMCAP_ADD_RECORD= ${DO_NADA} +.endif + +.if !defined(WITHOUT_UNIFONT) +RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/local/unifont.pcf.gz:${PORTSDIR}/x11-fonts/gnu-unifont +.endif + +post-extract: .SILENT + cd ${WRKSRC} && ${RM} -f \ + aclocal.m4 config.* configure install-sh \ + missing mkinstalldirs stamp-h* Makefile Makefile.in + ${CP} ${WRKSRC}/${PORTNAME}.conf.sample.${OPSYS} \ + ${WRKSRC}/${PORTNAME}.conf.sample + +post-patch: .SILENT + ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' \ + ${WRKSRC}/*.[0-9] ${WRKSRC}/*.conf.sample + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc + if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \ + ${INSTALL_DATA} ${PREFIX}/etc/${PORTNAME}.conf.sample \ + ${PREFIX}/etc/${PORTNAME}.conf; \ + fi +.if !defined(NO_INSTALL_MANPAGES) + ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/${MAN5} ${MAN1PREFIX}/man/man5 +.endif +.if !defined(NOPORTDATA) + ${MKDIR} ${DATADIR}/fonts + ${INSTALL_DATA} ${WRKSRC}/termcap.jfbterm ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/terminfo.jfbterm ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/fonts/*.pcf.gz ${DATADIR}/fonts +.endif +.if !defined(WITHOUT_TERMCAP) + ${TERMCAP_ADD_RECORD} +.endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: sysutils/jfbterm/pkg-descr =================================================================== RCS file: /a/.cvsup/ports/sysutils/jfbterm/pkg-descr,v retrieving revision 1.1 diff -u -p -r1.1 pkg-descr --- sysutils/jfbterm/pkg-descr 19 Mar 2008 06:43:16 -0000 1.1 +++ sysutils/jfbterm/pkg-descr 20 Sep 2010 15:25:46 -0000 @@ -1,4 +1,5 @@ -Multilanguage can be displayed on the console in using the frame buffer. +JFBTERM/ME takes advantages of framebuffer device to display +multilingual text on console. jfbterm WWW: http://sourceforge.jp/projects/jfbterm Index: sysutils/jfbterm/pkg-plist =================================================================== RCS file: /a/.cvsup/ports/sysutils/jfbterm/pkg-plist,v retrieving revision 1.1 diff -u -p -r1.1 pkg-plist --- sysutils/jfbterm/pkg-plist 19 Mar 2008 06:43:16 -0000 1.1 +++ sysutils/jfbterm/pkg-plist 14 Sep 2010 20:49:03 -0000 @@ -1,7 +1,10 @@ bin/jfbterm +@unexec if cmp -s %D/etc/jfbterm.conf.sample %D/etc/jfbterm.conf; then rm -f %D/etc/jfbterm.conf; fi etc/jfbterm.conf.sample -%%DATADIR%%/fonts/vt100-graphics.pcf.gz -%%DATADIR%%/termcap.jfbterm -%%DATADIR%%/terminfo.jfbterm -@dirrm %%DATADIR%%/fonts -@dirrm %%DATADIR%% +@exec if [ ! -f %D/etc/jfbterm.conf ]; then cp -p %D/%F %B/jfbterm.conf; fi +%%PORTDATA%%%%DATADIR%%/fonts/vt100-graphics.pcf.gz +%%PORTDATA%%%%DATADIR%%/termcap.jfbterm +%%PORTDATA%%%%DATADIR%%/terminfo.jfbterm +%%PORTDATA%%@dirrm %%DATADIR%%/fonts +%%PORTDATA%%@dirrm %%DATADIR%% +%%PORTDATA%%%%TERMCAP_ADD_RECORD%% Index: sysutils/jfbterm/files/BSDmakefile =================================================================== RCS file: sysutils/jfbterm/files/BSDmakefile diff -N sysutils/jfbterm/files/BSDmakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/jfbterm/files/BSDmakefile 14 Sep 2010 19:34:45 -0000 @@ -0,0 +1,81 @@ +PROG = jfbterm +MAN = ${PROG}.1 ${PROG}.conf.5 + +VERSION ?= 0.6.1 + +ARCH ?= ${MACHINE_ARCH} +LOCALBASE ?= /usr/local +PREFIX ?= ${LOCALBASE} +LIBUTIL ?= /usr/lib/libutil.a +LIBARCH ?= /usr/lib/lib${ARCH}.a +LIBICONV ?= ${LOCALBASE}/lib/libiconv.a +LIBPNG ?= ${LOCALBASE}/lib/libpng.a +GUNZIP ?= /usr/bin/gunzip + +CSTD ?= gnu89 +CFLAGS += -DVERSION=\"${VERSION}\" +CFLAGS += -DGUNZIP_PATH=\"${GUNZIP}\" +CFLAGS += -DSYSCONFDIR=\"${PREFIX}/etc\" +LDFLAGS += -L${LOCALBASE}/lib +LDADD += ${DPADD:C|.*/lib(.*)\.a$|-l\1|} +DPADD += ${LIBUTIL} + +CFLAGS += -DENABLE_8BPP +CFLAGS += -DENABLE_15BPP +CFLAGS += -DENABLE_16BPP +CFLAGS += -DENABLE_24BPP +CFLAGS += -DENABLE_32BPP +CFLAGS += -DENABLE_SPLASH_SCREEN +CFLAGS += -DENABLE_256_COLOR + +SRCS = main.c console.c framebuffer.c memctl.c accessor.c palette.c \ + eastasianwidth.c font.c picofont.c getcap.c pcf.c pen.c term.c \ + utilities.c privilege.c csv.c vterm.c vtermlow.c cursor.c \ + splash-bmp.c splash-png.c splash.c bell.c screensaver.c mouse.c \ + clipboard.c keyboard.c + +.if !defined(OPSYS) +OPSYS != uname -s +.endif + +.if ${ARCH:Mamd64} || ${ARCH:Mx86_64} || ${ARCH:Mi386} +. if ${OPSYS:MLinux} || ${OPSYS:MFreeBSD} +CFLAGS += -DENABLE_VGA16FB +. elif ${OPSYS:MNetBSD} +DPADD += ${LIBARCH} +. endif +.endif + +.if exists(/usr/include/iconv.h) && ${OPSYS:MFreeBSD} +CFLAGS += -DLIBICONV_PLUG +CFLAGS += -nostdinc +CFLAGS += -isystem/usr/include +.endif +CFLAGS += -isystem${LOCALBASE}/include + +.if exists(/usr/include/utmp.h) +CFLAGS += -DHAVE_UTMP_H +.endif + +.if defined(WITH_DEBUG) +DEBUG_FLAGS ?= -g +CFLAGS += -DDEBUG +CFLAGS += -DPCF_DEBUG +.endif + +.if !defined(WITHOUT_ICONV) +CFLAGS += -DENABLE_UTF8 +CFLAGS += -DENABLE_OTHER_CODING_SYSTEM +. if !${CFLAGS:M-DLIBICONV_PLUG} && ${OPSYS:MFreeBSD} +DPADD += ${LIBICONV} +. endif +.endif + +.if !defined(WITHOUT_PNG) +CFLAGS += -DWITH_LIBPNG +DPADD += ${LIBPNG} +DPADD += ${LIBM} +DPADD += ${LIBZ} +.endif + +.include <bsd.prog.mk> Index: sysutils/jfbterm/files/patch-configure =================================================================== RCS file: sysutils/jfbterm/files/patch-configure diff -N sysutils/jfbterm/files/patch-configure --- sysutils/jfbterm/files/patch-configure 12 Mar 2010 20:39:12 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- configure.in.orig 2009-02-10 19:40:45.000000000 -0500 -+++ configure.in 2010-02-22 16:37:33.000000000 -0500 -@@ -111,7 +111,7 @@ - case $system in - Linux|FreeBSD) - case $machine in -- i?86|x86_64) -+ amd64|i?86|x86_64) - AC_DEFINE(ENABLE_VGA16FB) - ;; - *) Index: sysutils/jfbterm/files/patch-screensaver.c =================================================================== RCS file: sysutils/jfbterm/files/patch-screensaver.c diff -N sysutils/jfbterm/files/patch-screensaver.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/jfbterm/files/patch-screensaver.c 24 Sep 2009 08:42:21 -0000 @@ -0,0 +1,11 @@ +--- screensaver.c~ ++++ screensaver.c +@@ -61,7 +61,7 @@ + #define UNBLANK (V_DISPLAY_ON) + #elif defined (__NetBSD__) || defined (__OpenBSD__) + #define UNBLANK (WSDISPLAYIO_VIDEO_ON) +-#elif ++#else + #error not implement + #endif + Index: sysutils/jfbterm/files/patch-splash-png.c =================================================================== RCS file: sysutils/jfbterm/files/patch-splash-png.c diff -N sysutils/jfbterm/files/patch-splash-png.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/jfbterm/files/patch-splash-png.c 2 May 2010 08:59:29 -0000 @@ -0,0 +1,11 @@ +--- splash-png.c~ ++++ splash-png.c +@@ -103,7 +103,7 @@ u_char *read_png_file(FILE *stream, u_in + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png_ptr); + if (bit_depth == 16) Index: sysutils/jfbterm/files/pkg-message.in =================================================================== RCS file: sysutils/jfbterm/files/pkg-message.in diff -N sysutils/jfbterm/files/pkg-message.in --- sysutils/jfbterm/files/pkg-message.in 22 Apr 2008 15:39:30 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,27 +0,0 @@ - --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -Please execute the following matters. - - -Load VESA kernel module - # kldload vesa - -When you want to read automatically when starting, -please write vesa_load="YES" in /boot/loader.conf - -Add terminal capability of jfbterm. - # cat %%LOCALBASE%%/share/jfbterm/termcap.jfbterm >> /usr/share/misc/termcap - # cap_mkdb /usr/share/misc/termcap - -Prepare configuration file - # cp /usr/local/etc/jfbterm.conf.sample /usr/local/etc/jfbterm.conf - -Please confirm details on author's page. - http://www.ac.auone-net.jp/~baba/jfbterm/ - -changelog - http://chirashi-no-ura.net/files/changelog-jfbterm-en.txt - http://chirashi-no-ura.net/files/changelog-jfbterm-ja_JP.UTF-8.txt - --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8639t4be2i.fsf>