Date: Wed, 30 Sep 2009 19:00:11 GMT From: Anonymous <swell.k@gmail.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/139107: [patch] sysutils/jfbterm: convert to bsdmake Message-ID: <200909301900.n8UJ0BoB000762@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/139107; it has been noted by GNATS. From: Anonymous <swell.k@gmail.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/139107: [patch] sysutils/jfbterm: convert to bsdmake Date: Wed, 30 Sep 2009 22:52:56 +0400 Here is a slightly udpated diff. - fix PNG option description - fix WITH_DEBUG so the binary isn't stripped when DEBUG_FLAGS is not defined. Found when tried to debug crash on terminus-font with FONT_HALF_UNI. - honor NOMAN, NOSHARED. Warnings from bsd.compat.mk can be safely ignored. - copy jfbterm.conf.sample to jfbterm.conf if it doesn't exist. --- jfbterm.diff begins here --- Makefile | 57 +++++++++++++++++++++++++++--------- files/BSDmakefile | 71 ++++++++++++++++++++++++++++++++++++++++++++++ files/config.h | 9 +++++ files/patch-screensaver.c | 11 +++++++ pkg-plist | 12 ++++--- 5 files changed, 141 insertions(+), 19 deletions(-) Index: sysutils/jfbterm/Makefile =================================================================== RCS file: /home/csup/ports/sysutils/jfbterm/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- sysutils/jfbterm/Makefile 1 Mar 2009 19:38:06 -0000 1.8 +++ sysutils/jfbterm/Makefile 30 Sep 2009 18:36:52 -0000 @@ -6,6 +6,7 @@ PORTNAME= jfbterm PORTVERSION= 0.6.0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.ac.auone-net.jp/~baba/jfbterm/ \ http://chirashi-no-ura.net/files/ @@ -14,24 +15,52 @@ DISTNAME= ${PORTNAME}-FreeBSD-${PORTVERS MAINTAINER= bsdports@gmail.com COMMENT= Multilanguage can be displayed on the console -LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png -RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/local/unifont.pcf.gz:${PORTSDIR}/x11-fonts/gnu-unifont - -USE_ICONV= yes -USE_GNOME= pkgconfig PKGMESSAGE= ${WRKDIR}/pkg-message SUB_FILES= pkg-message -USE_GMAKE= yes -GNU_CONFIGURE= yes -USE_AUTOTOOLS= autoconf:262 automake:14 -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" \ - --mandir="${LOCALBASE}/man" +MAKEFILE= BSDmakefile + +OPTIONS= ICONV "encodings support" On \ + PNG "splash .png support" On \ + UNIFONT "install pan-unicode font" On +.include <bsd.port.pre.mk> + +.if !defined(NOMAN) MAN1= jfbterm.1 MAN5= jfbterm.conf.5 +.endif + +.if !defined(NOMANCOMPRESS) +MANCOMPRESSED= yes +.endif -post-install: - @${CAT} ${PKGMESSAGE} +.if !defined(WITHOUT_ICONV) +USE_ICONV= yes +.else +MAKE_ENV+= WITHOUT_ICONV= +.endif + +.if !defined(WITHOUT_PNG) +LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png +.else +MAKE_ENV+= WITHOUT_PNG= +.endif + +.if !defined(WITHOUT_UNIFONT) +RUN_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/local/unifont.pcf.gz:${PORTSDIR}/x11-fonts/gnu-unifont +.endif + +post-extract: .SILENT + ${MKDIR} ${WRKSRC}/obj +.for f in BSDmakefile config.h + ${CP} ${FILESDIR}/${f} ${WRKSRC} +.endfor + +post-install: .SILENT + if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \ + ${INSTALL_DATA} ${PREFIX}/etc/${PORTNAME}.conf.sample \ + ${PREFIX}/etc/${PORTNAME}.conf; \ + fi + ${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: sysutils/jfbterm/pkg-plist =================================================================== RCS file: /home/csup/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 30 Sep 2009 18:17:47 -0000 @@ -1,7 +1,9 @@ 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%% 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 30 Sep 2009 17:45:11 -0000 @@ -0,0 +1,71 @@ +PROG = jfbterm +MAN = ${PROG}.1 ${PROG}.conf.5 + +ARCH ?= ${MACHINE_ARCH} +LOCALBASE ?= /usr/local +PREFIX ?= /usr/local +BINDIR ?= ${PREFIX}/bin +MANDIR ?= ${PREFIX}/man/man +DATADIR ?= ${PREFIX}/share/${PROG} +LIBICONV ?= ${LOCALBASE}/lib/libiconv.a +LIBPNG ?= ${LOCALBASE}/lib/libpng.a +INSTALL_DIR ?= ${INSTALL} -d +INSTALL_DATA ?= ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} + +CSTD ?= gnu89 +CFLAGS += -I${LOCALBASE}/include +CFLAGS += -DHAVE_CONFIG_H +CFLAGS += -DSYSCONFDIR=\"${PREFIX}/etc\" +DPADD += ${LIBUTIL} +LDADD += -lutil + +.if ${ARCH:Mamd64} || ${ARCH:Mi386} +CFLAGS += -DENABLE_VGA16FB +.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 +LDADD += -L${LOCALBASE}/lib +LDADD += -liconv +DPADD += ${LIBICONV} +.endif + +.if !defined(WITHOUT_PNG) +CFLAGS += -DWITH_LIBPNG +LDADD += -L${LOCALBASE}/lib +LDADD += -lpng +LDADD += -lz +LDADD += -lm +DPADD += ${LIBPNG} +DPADD += ${LIBZ} +DPADD += ${LIBM} +.endif + +.if !defined(WITHOUT_SETUID) +BINMODE = 4555 +.endif + +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 + +afterinstall: + ${INSTALL_DATA} ${.CURDIR}/jfbterm.conf.sample.FreeBSD \ + ${PREFIX}/etc/${PROG}.conf.sample +.if !defined(NOPORTDATA) + ${INSTALL_DIR} ${DATADIR}/fonts + ${INSTALL_DATA} ${.CURDIR}/fonts/*.pcf.gz ${DATADIR}/fonts + ${INSTALL_DATA} ${.CURDIR}/termcap.jfbterm ${DATADIR} + ${INSTALL_DATA} ${.CURDIR}/terminfo.jfbterm ${DATADIR} +.endif + +.include <bsd.prog.mk> Index: sysutils/jfbterm/files/config.h =================================================================== RCS file: sysutils/jfbterm/files/config.h diff -N sysutils/jfbterm/files/config.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/jfbterm/files/config.h 24 Sep 2009 08:32:40 -0000 @@ -0,0 +1,9 @@ +#define VERSION "0.6.0" +#define GUNZIP_PATH "/usr/bin/gunzip" +#define ENABLE_8BPP 1 +#define ENABLE_15BPP 1 +#define ENABLE_16BPP 1 +#define ENABLE_24BPP 1 +#define ENABLE_32BPP 1 +#define ENABLE_SPLASH_SCREEN 1 +#define ENABLE_256_COLOR 1 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 + --- jfbterm.diff ends here ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909301900.n8UJ0BoB000762>