Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2009 14:20:45 +0400
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/139107: [patch] sysutils/jfbterm: convert to bsdmake
Message-ID:  <861vlwej9e.fsf@gmail.com>
Resent-Message-ID: <200909241030.n8OAU8S1072245@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         139107
>Category:       ports
>Synopsis:       [patch] sysutils/jfbterm: convert to bsdmake
>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:   Thu Sep 24 10:30:07 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD 9.0-CURRENT #1 r197441M: Wed Sep 23 18:56:05 UTC 2009     root@luffy:/usr/obj/usr/src/sys/PHOENIX  amd64
>Description:
Dispose of autotools[1]. While here fix these bugs:
- GCC 4.4+ build (#elif with no expression)
- use ENABLE_VGA16FB on amd64 (configure-script expects x86_64)

and
- move libiconv, libpng and gnu-unifont to respective options.
  All ON by default. With all options unset = empty all-depends-list.

Requested by:	paradox <ddkprog@yahoo.com>

[1] This should reduce build time and lessen dependencies with little
    cost of maintaining more clear BSDmakefile and config.h that
    were based on Makefile.am, configure.in and config.h.in.
>How-To-Repeat:
>Fix:
--- jfbterm.diff begins here ---
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	24 Sep 2009 10:12:45 -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,45 @@ 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
 
 MAN1=	jfbterm.1
 MAN5=	jfbterm.conf.5
 
+OPTIONS=	ICONV	"encodings support"		On \
+		PNG	"splash support"		On \
+		UNIFONT	"install pan-unicode font"	On
+
+.include <bsd.port.pre.mk>
+
+.if !defined(NOMANCOMPRESS)
+MANCOMPRESSED=	yes
+.endif
+
+.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
+.for f in BSDmakefile config.h
+	${CP} ${FILESDIR}/${f} ${WRKSRC}
+.endfor
+
 post-install:
 	@${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	24 Sep 2009 07:35:11 -0000
@@ -1,7 +1,7 @@
 bin/jfbterm
 etc/jfbterm.conf.sample
-%%DATADIR%%/fonts/vt100-graphics.pcf.gz
-%%DATADIR%%/termcap.jfbterm
-%%DATADIR%%/terminfo.jfbterm
-@dirrm %%DATADIR%%/fonts
-@dirrm %%DATADIR%%
+%%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	24 Sep 2009 10:15:33 -0000
@@ -0,0 +1,61 @@
+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}
+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\"
+LDADD  += -lutil
+
+.if ${ARCH:Mamd64} || ${ARCH:Mi386}
+CFLAGS += -DENABLE_VGA16FB
+.endif
+
+.if defined(WITH_DEBUG)
+CFLAGS += -DDEBUG
+CFLAGS += -DPCF_DEBUG
+.endif
+
+.if !defined(WITHOUT_ICONV)
+CFLAGS += -DENABLE_UTF8
+CFLAGS += -DENABLE_OTHER_CODING_SYSTEM
+LDADD  += -L${LOCALBASE}/lib
+LDADD  += -liconv
+.endif
+
+.if !defined(WITHOUT_PNG)
+CFLAGS += -DWITH_LIBPNG
+LDADD  += -L${LOCALBASE}/lib
+LDADD  += -lpng
+.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} jfbterm.conf.sample.FreeBSD \
+		${PREFIX}/etc/${PROG}.conf.sample
+.if !defined(NOPORTDATA)
+	${INSTALL_DIR} ${DATADIR}/fonts
+	${INSTALL_DATA} fonts/*.pcf.gz ${DATADIR}/fonts
+	${INSTALL_DATA} termcap.jfbterm ${DATADIR}
+	${INSTALL_DATA} 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 ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861vlwej9e.fsf>