aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2010-09-22 13:40:20 +0800
committerpgollucci <pgollucci@FreeBSD.org>2010-09-22 13:40:20 +0800
commitd909b2c4098b27c5dfe527bcb66adb4f9c9a8dc6 (patch)
tree2dfb858e335d1a0980d65683e1db7ae770ecf320 /sysutils
parentda7437daa172655713739eb2e6e2205c4cf38b43 (diff)
downloadfreebsd-ports-gnome-d909b2c4098b27c5dfe527bcb66adb4f9c9a8dc6.tar.gz
freebsd-ports-gnome-d909b2c4098b27c5dfe527bcb66adb4f9c9a8dc6.tar.zst
freebsd-ports-gnome-d909b2c4098b27c5dfe527bcb66adb4f9c9a8dc6.zip
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. Fix png14 regression Use PREFIX in man pages, config, pkg-message and drop redundant PKGMESSAGE assign as well 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. Tested building with BSDmakefile a bit on NetBSD and using devel/bmake port. Perhaps, it can be included upstream. PR: ports/139107 (bsdmake), ports/146230 (png14), ports/146271 (PREFIX) ports/150759 [this pr] Submitted by: Anonymous <swell.k@gmail.com>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/jfbterm/Makefile140
-rw-r--r--sysutils/jfbterm/files/BSDmakefile81
-rw-r--r--sysutils/jfbterm/files/patch-configure11
-rw-r--r--sysutils/jfbterm/files/patch-screensaver.c11
-rw-r--r--sysutils/jfbterm/files/patch-splash-png.c11
-rw-r--r--sysutils/jfbterm/files/pkg-message.in27
-rw-r--r--sysutils/jfbterm/pkg-descr3
-rw-r--r--sysutils/jfbterm/pkg-plist13
8 files changed, 230 insertions, 67 deletions
diff --git a/sysutils/jfbterm/Makefile b/sysutils/jfbterm/Makefile
index bbf9d1d2dbd1..76728d40649e 100644
--- a/sysutils/jfbterm/Makefile
+++ b/sysutils/jfbterm/Makefile
@@ -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
+ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS_REASON= requires VESA support in kernel
+
+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
-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
-
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.mk>
+. 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.post.mk>
diff --git a/sysutils/jfbterm/files/BSDmakefile b/sysutils/jfbterm/files/BSDmakefile
new file mode 100644
index 000000000000..27212fcfbaaf
--- /dev/null
+++ b/sysutils/jfbterm/files/BSDmakefile
@@ -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>
diff --git a/sysutils/jfbterm/files/patch-configure b/sysutils/jfbterm/files/patch-configure
deleted file mode 100644
index 2428c7605d4e..000000000000
--- a/sysutils/jfbterm/files/patch-configure
+++ /dev/null
@@ -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)
- ;;
- *)
diff --git a/sysutils/jfbterm/files/patch-screensaver.c b/sysutils/jfbterm/files/patch-screensaver.c
new file mode 100644
index 000000000000..eeadf40f0393
--- /dev/null
+++ b/sysutils/jfbterm/files/patch-screensaver.c
@@ -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
+
diff --git a/sysutils/jfbterm/files/patch-splash-png.c b/sysutils/jfbterm/files/patch-splash-png.c
new file mode 100644
index 000000000000..0675d74cafe6
--- /dev/null
+++ b/sysutils/jfbterm/files/patch-splash-png.c
@@ -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)
diff --git a/sysutils/jfbterm/files/pkg-message.in b/sysutils/jfbterm/files/pkg-message.in
deleted file mode 100644
index 815322101d5b..000000000000
--- a/sysutils/jfbterm/files/pkg-message.in
+++ /dev/null
@@ -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
-
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
diff --git a/sysutils/jfbterm/pkg-descr b/sysutils/jfbterm/pkg-descr
index c99a0ad4b9b3..713a000fbb5d 100644
--- a/sysutils/jfbterm/pkg-descr
+++ b/sysutils/jfbterm/pkg-descr
@@ -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
diff --git a/sysutils/jfbterm/pkg-plist b/sysutils/jfbterm/pkg-plist
index 4a87742ae22e..d9fff1fa5783 100644
--- a/sysutils/jfbterm/pkg-plist
+++ b/sysutils/jfbterm/pkg-plist
@@ -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%%