aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libslang
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2007-09-01 02:33:00 +0800
committergarga <garga@FreeBSD.org>2007-09-01 02:33:00 +0800
commit08a063acd961e1237c7436a79b30f08d2b3ee63d (patch)
tree6d98ec6e95d9ffe2d4dc8d73b3d6314d2db7eca5 /devel/libslang
parentfe0b04b1d843967133c064eeb4e179ab18248000 (diff)
downloadfreebsd-ports-gnome-08a063acd961e1237c7436a79b30f08d2b3ee63d.tar.gz
freebsd-ports-gnome-08a063acd961e1237c7436a79b30f08d2b3ee63d.tar.zst
freebsd-ports-gnome-08a063acd961e1237c7436a79b30f08d2b3ee63d.zip
- Add UTF8 patch obtained from gentoo, it's more stable than old one
PR: ports/114569 Submitted by: Cristian KLEIN <cristi@net.utcluj.ro>
Diffstat (limited to 'devel/libslang')
-rw-r--r--devel/libslang/Makefile28
-rw-r--r--devel/libslang/distinfo12
-rw-r--r--devel/libslang/files/extra-utf8-acs.patch417
-rw-r--r--devel/libslang/pkg-plist3
4 files changed, 28 insertions, 432 deletions
diff --git a/devel/libslang/Makefile b/devel/libslang/Makefile
index 0ea436f01452..8821932fba94 100644
--- a/devel/libslang/Makefile
+++ b/devel/libslang/Makefile
@@ -12,14 +12,15 @@ MASTER_SITES= ftp://space.mit.edu/pub/davis/slang/v1.4/ \
ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v1.4/ \
ftp://ftp.ntua.gr/pub/lang/slang/slang/v1.4/ \
ftp://ftp.plig.org/pub/slang/v1.4/
-DISTNAME= slang-${PORTVERSION}
+DISTFILES= slang-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= garga@FreeBSD.org
COMMENT= Routines for rapid alpha-numeric terminal applications development
-OPTIONS= UTF8 "Enable UTF-8 support - EXPERIMENTAL" off
+OPTIONS= UTF8 "Enable UTF-8 support" off
+
+WRKSRC= ${WRKDIR}/slang-${PORTVERSION}
-USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
@@ -34,17 +35,26 @@ PORTDOCS= *
.include <bsd.port.pre.mk>
.if defined(WITH_UTF8)
-PATCH_SITES+= http://www.emaillab.org/mutt/tools/
-PATCHFILES+= slang-1.4.8-utf8.diff.gz
-PATCH_DIST_STRIP+= -p1
-
-EXTRA_PATCHES= ${FILESDIR}/extra-utf8-acs.patch
+MASTER_SITES+= ${MASTER_SITE_GENTOO:S/$/:utf8/}
+MASTER_SITE_SUBDIR+= distfiles/:utf8
+DISTFILES+= slang-${PORTVERSION}-patches.tar.gz:utf8
+PLIST_SUB= UTF8=""
post-patch:
- @${REINPLACE_CMD} 's,slang-utf8,slang,' ${WRKSRC}/src/Makefile.in
+ @for p in ${WRKDIR}/slang*utf8*.patch; do \
+ ${PATCH} --silent -d ${WRKSRC} -p1 < $$p; \
+ done
+.else
+PLIST_SUB= UTF8="@comment "
.endif
post-install:
+.if defined(WITH_UTF8)
+. for ext in a so so.1
+ ${LN} -sf ${PREFIX}/lib/libslang-utf8.${ext} ${PREFIX}/lib/libslang.${ext}
+. endfor
+.endif
+
.if !defined(NOPORTDOCS)
@cd ${WRKSRC}/src && ${MAKE} install_docs
.endif
diff --git a/devel/libslang/distinfo b/devel/libslang/distinfo
index 9ad959297c99..4c3d5ade4298 100644
--- a/devel/libslang/distinfo
+++ b/devel/libslang/distinfo
@@ -1,6 +1,6 @@
-MD5 (slang-1.4.9.tar.bz2) = 4fbb1a7f1257e065ca830deefe13d350
-SHA256 (slang-1.4.9.tar.bz2) = fa42e57e902f2161dc2b297e0dcb24ca180024770afa379027db582803ffa2fa
-SIZE (slang-1.4.9.tar.bz2) = 631079
-MD5 (slang-1.4.8-utf8.diff.gz) = 2946c6369edbf6c0c0f587a1fdc7c4cf
-SHA256 (slang-1.4.8-utf8.diff.gz) = b41f6bda4378631c3f76756a92b7819a722e14070aba211a452b45fd86a40bea
-SIZE (slang-1.4.8-utf8.diff.gz) = 6369
+MD5 (slang-1.4.9.tar.gz) = c73aa62b2d1b215ca55a7337daa3f543
+SHA256 (slang-1.4.9.tar.gz) = 3969dbafdeac98d078855d29f47a8dab941f1789274cd0981a8b400c397855f8
+SIZE (slang-1.4.9.tar.gz) = 805990
+MD5 (slang-1.4.9-patches.tar.gz) = a69e4f7558e727decb3efa8d9a9e77b6
+SHA256 (slang-1.4.9-patches.tar.gz) = 487174a2b5df8564b99589e789319b37ee75c52d09ce98bfb12656414cdca3fb
+SIZE (slang-1.4.9-patches.tar.gz) = 12132
diff --git a/devel/libslang/files/extra-utf8-acs.patch b/devel/libslang/files/extra-utf8-acs.patch
deleted file mode 100644
index d53933c7792c..000000000000
--- a/devel/libslang/files/extra-utf8-acs.patch
+++ /dev/null
@@ -1,417 +0,0 @@
---- src/slang.h.acs 2002-07-09 00:03:57.000000000 -0400
-+++ src/slang.h 2002-07-09 00:11:06.000000000 -0400
-@@ -1255,6 +1255,8 @@
-
- #ifdef UTF8
- typedef int SLsmg_Char_Type;
-+extern SLtt_Char_Type SLcurses_Acs_Map [128];
-+#define acs_map SLcurses_Acs_Map
- #define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFFFFFF)
- #define SLSMG_EXTRACT_COLOR(x) (((x)>>24)&0xFF)
- #define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(wchar_t)(ch))|((color)<<24))
-@@ -1396,7 +1398,11 @@
- extern void SLsmg_set_screen_start (int *, int *);
- extern void SLsmg_draw_hline (unsigned int);
- extern void SLsmg_draw_vline (int);
-+#ifdef UTF8
-+extern void SLsmg_draw_object (int, int, SLsmg_Char_Type);
-+#else
- extern void SLsmg_draw_object (int, int, unsigned char);
-+#endif
- extern void SLsmg_draw_box (int, int, unsigned int, unsigned int);
- extern int SLsmg_get_column(void);
- extern int SLsmg_get_row(void);
-@@ -1408,6 +1414,9 @@
- extern int SLsmg_Display_Eight_Bit;
- extern int SLsmg_Tab_Width;
-
-+extern int SLsmg_Is_Unicode;
-+extern int SLsmg_Setlocale;
-+
- #define SLSMG_NEWLINE_IGNORED 0 /* default */
- #define SLSMG_NEWLINE_MOVES 1 /* moves to next line, column 0 */
- #define SLSMG_NEWLINE_SCROLLS 2 /* moves but scrolls at bottom of screen */
-@@ -1465,31 +1474,79 @@
- # define SLSMG_BOARD_CHAR '#'
- # define SLSMG_BLOCK_CHAR '#'
- # else
--# define SLSMG_HLINE_CHAR 'q'
--# define SLSMG_VLINE_CHAR 'x'
--# define SLSMG_ULCORN_CHAR 'l'
--# define SLSMG_URCORN_CHAR 'k'
--# define SLSMG_LLCORN_CHAR 'm'
--# define SLSMG_LRCORN_CHAR 'j'
--# define SLSMG_CKBRD_CHAR 'a'
--# define SLSMG_RTEE_CHAR 'u'
--# define SLSMG_LTEE_CHAR 't'
--# define SLSMG_UTEE_CHAR 'w'
--# define SLSMG_DTEE_CHAR 'v'
--# define SLSMG_PLUS_CHAR 'n'
--# define SLSMG_DIAMOND_CHAR '`'
--# define SLSMG_DEGREE_CHAR 'f'
--# define SLSMG_PLMINUS_CHAR 'g'
--# define SLSMG_BULLET_CHAR '~'
--# define SLSMG_LARROW_CHAR ','
--# define SLSMG_RARROW_CHAR '+'
--# define SLSMG_DARROW_CHAR '.'
--# define SLSMG_UARROW_CHAR '-'
--# define SLSMG_BOARD_CHAR 'h'
--# define SLSMG_BLOCK_CHAR '0'
-+# define SLSMG_HLINE_CHAR (acs_map['q'])
-+# define SLSMG_VLINE_CHAR (acs_map['x'])
-+# define SLSMG_ULCORN_CHAR (acs_map['l'])
-+# define SLSMG_URCORN_CHAR (acs_map['k'])
-+# define SLSMG_LLCORN_CHAR (acs_map['m'])
-+# define SLSMG_LRCORN_CHAR (acs_map['j'])
-+# define SLSMG_CKBRD_CHAR (acs_map['a'])
-+# define SLSMG_RTEE_CHAR (acs_map['u'])
-+# define SLSMG_LTEE_CHAR (acs_map['t'])
-+# define SLSMG_UTEE_CHAR (acs_map['v'])
-+# define SLSMG_DTEE_CHAR (acs_map['w'])
-+# define SLSMG_PLUS_CHAR (acs_map['n'])
-+# define SLSMG_DIAMOND_CHAR (acs_map['`'])
-+# define SLSMG_DEGREE_CHAR (acs_map['f'])
-+# define SLSMG_PLMINUS_CHAR (acs_map['g'])
-+# define SLSMG_BULLET_CHAR (acs_map['~'])
-+# define SLSMG_LARROW_CHAR (acs_map[','])
-+# define SLSMG_RARROW_CHAR (acs_map['+'])
-+# define SLSMG_DARROW_CHAR (acs_map['.'])
-+# define SLSMG_UARROW_CHAR (acs_map['-'])
-+# define SLSMG_BOARD_CHAR (acs_map['h'])
-+# define SLSMG_BLOCK_CHAR (acs_map['0'])
-+#
-+# define SLSMG_HLINE_CHAR_TERM 'q'
-+# define SLSMG_VLINE_CHAR_TERM 'x'
-+# define SLSMG_ULCORN_CHAR_TERM 'l'
-+# define SLSMG_URCORN_CHAR_TERM 'k'
-+# define SLSMG_LLCORN_CHAR_TERM 'm'
-+# define SLSMG_LRCORN_CHAR_TERM 'j'
-+# define SLSMG_CKBRD_CHAR_TERM 'a'
-+# define SLSMG_RTEE_CHAR_TERM 'u'
-+# define SLSMG_LTEE_CHAR_TERM 't'
-+# define SLSMG_UTEE_CHAR_TERM 'v'
-+# define SLSMG_DTEE_CHAR_TERM 'w'
-+# define SLSMG_PLUS_CHAR_TERM 'n'
-+# define SLSMG_DIAMOND_CHAR_TERM '`'
-+# define SLSMG_DEGREE_CHAR_TERM 'f'
-+# define SLSMG_PLMINUS_CHAR_TERM 'g'
-+# define SLSMG_BULLET_CHAR_TERM '~'
-+# define SLSMG_LARROW_CHAR_TERM ','
-+# define SLSMG_RARROW_CHAR_TERM '+'
-+# define SLSMG_DARROW_CHAR_TERM '.'
-+# define SLSMG_UARROW_CHAR_TERM '-'
-+# define SLSMG_BOARD_CHAR_TERM 'h'
-+# define SLSMG_BLOCK_CHAR_TERM '0'
- # endif /* AMIGA */
- #endif /* IBMPC_SYSTEM */
-
-+#ifdef UTF8
-+# define SLSMG_HLINE_CHAR_UNICODE 0x2500
-+# define SLSMG_VLINE_CHAR_UNICODE 0x2502
-+# define SLSMG_ULCORN_CHAR_UNICODE 0x250c
-+# define SLSMG_URCORN_CHAR_UNICODE 0x2510
-+# define SLSMG_LLCORN_CHAR_UNICODE 0x2514
-+# define SLSMG_LRCORN_CHAR_UNICODE 0x2518
-+# define SLSMG_RTEE_CHAR_UNICODE 0x2524
-+# define SLSMG_LTEE_CHAR_UNICODE 0x251c
-+# define SLSMG_UTEE_CHAR_UNICODE 0x2534
-+# define SLSMG_DTEE_CHAR_UNICODE 0x252c
-+# define SLSMG_PLUS_CHAR_UNICODE 0x253c
-+# define SLSMG_CKBRD_CHAR_UNICODE 0x2592
-+# define SLSMG_DIAMOND_CHAR_UNICODE 0x25c6
-+# define SLSMG_DEGREE_CHAR_UNICODE 0x00b0
-+# define SLSMG_PLMINUS_CHAR_UNICODE 0x00b1
-+# define SLSMG_BULLET_CHAR_UNICODE 0x00b7
-+# define SLSMG_LARROW_CHAR_UNICODE 0x2190
-+# define SLSMG_RARROW_CHAR_UNICODE 0x2192
-+# define SLSMG_DARROW_CHAR_UNICODE 0x2193
-+# define SLSMG_UARROW_CHAR_UNICODE 0x2191
-+# define SLSMG_BOARD_CHAR_UNICODE 0x2592
-+# define SLSMG_BLOCK_CHAR_UNICODE 0x25ae
-+#endif
-+
- #ifndef IBMPC_SYSTEM
- # define SLSMG_COLOR_BLACK 0x000000
- # define SLSMG_COLOR_RED 0x000001
---- src/slcurses.c.acs 2002-07-09 00:03:57.000000000 -0400
-+++ src/slcurses.c 2002-07-09 00:09:03.000000000 -0400
-@@ -331,40 +331,63 @@
- /* SLtt_set_mono (A_BLINK >> 8, NULL, SLTT_BLINK_MASK); */
- SLtt_set_mono ((A_BOLD|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_BOLD_MASK);
- SLtt_set_mono ((A_REVERSE|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_REV_MASK);
-+
-+ SLcurses_init_acs_map();
-+
-+ return SLcurses_Stdscr;
-+}
-
-+void SLcurses_init_acs_map()
-+{
- if (SLtt_Has_Alt_Charset)
- {
-- SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = SLSMG_ULCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = SLSMG_URCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = SLSMG_LLCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = SLSMG_LRCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = SLSMG_UTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = SLSMG_DTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = SLSMG_LTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = SLSMG_RTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = SLSMG_VLINE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = SLSMG_HLINE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = SLSMG_PLUS_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = SLSMG_CKBRD_CHAR | A_ALTCHARSET;
-+ if (SLsmg_Is_Unicode)
-+ {
-+ SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_UNICODE;
-+ SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_UNICODE;
-+ }
-+ else
-+ {
-+ SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_TERM | A_ALTCHARSET;
-+ }
- }
- else
- {
- /* ugly defaults to use on terminals which don't support graphics */
-- SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = '|';
-- SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = '-';
-- SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = '#';
-+ SLcurses_Acs_Map['l'] = '+';
-+ SLcurses_Acs_Map['k'] = '+';
-+ SLcurses_Acs_Map['m'] = '+';
-+ SLcurses_Acs_Map['j'] = '+';
-+ SLcurses_Acs_Map['v'] = '+';
-+ SLcurses_Acs_Map['w'] = '+';
-+ SLcurses_Acs_Map['t'] = '+';
-+ SLcurses_Acs_Map['u'] = '+';
-+ SLcurses_Acs_Map['x'] = '|';
-+ SLcurses_Acs_Map['q'] = '-';
-+ SLcurses_Acs_Map['n'] = '+';
-+ SLcurses_Acs_Map['a'] = '#';
- }
--
-- return SLcurses_Stdscr;
- }
-
- int SLcurses_wattrset (SLcurses_Window_Type *w, SLtt_Char_Type ch)
---- src/slcurses.h.acs 2002-02-10 02:39:19.000000000 -0500
-+++ src/slcurses.h 2002-07-09 00:03:57.000000000 -0400
-@@ -141,6 +141,7 @@
-
- extern int SLcurses_nodelay (SLcurses_Window_Type *, int);
- extern SLcurses_Window_Type *SLcurses_initscr (void);
-+extern void SLcurses_init_acs_map (void);
- #define initscr SLcurses_initscr
-
- extern int SLcurses_cbreak (void);
-@@ -222,21 +222,21 @@
- extern SLtt_Char_Type SLcurses_Acs_Map [128];
- #define acs_map SLcurses_Acs_Map
-
--#define ACS_ULCORNER (acs_map[SLSMG_ULCORN_CHAR])
--#define ACS_URCORNER (acs_map[SLSMG_URCORN_CHAR])
--#define ACS_LRCORNER (acs_map[SLSMG_LRCORN_CHAR])
--#define ACS_LLCORNER (acs_map[SLSMG_LLCORN_CHAR])
--#define ACS_TTEE (acs_map[SLSMG_UTEE_CHAR])
--#define ACS_LTEE (acs_map[SLSMG_LTEE_CHAR])
--#define ACS_RTEE (acs_map[SLSMG_RTEE_CHAR])
--#define ACS_BTEE (acs_map[SLSMG_DTEE_CHAR])
--#define ACS_PLUS (acs_map[SLSMG_PLUS_CHAR])
--#define ACS_VLINE (acs_map[SLSMG_VLINE_CHAR])
--#define ACS_HLINE (acs_map[SLSMG_HLINE_CHAR])
-+#define ACS_ULCORNER SLSMG_ULCORN_CHAR
-+#define ACS_URCORNER SLSMG_URCORN_CHAR
-+#define ACS_LRCORNER SLSMG_LRCORN_CHAR
-+#define ACS_LLCORNER SLSMG_LLCORN_CHAR
-+#define ACS_TTEE SLSMG_UTEE_CHAR
-+#define ACS_LTEE SLSMG_LTEE_CHAR
-+#define ACS_RTEE SLSMG_RTEE_CHAR
-+#define ACS_BTEE SLSMG_DTEE_CHAR
-+#define ACS_PLUS SLSMG_PLUS_CHAR
-+#define ACS_VLINE SLSMG_VLINE_CHAR
-+#define ACS_HLINE SLSMG_HLINE_CHAR
- #define ACS_S1 '-'
- #define ACS_S9 '-'
- #define ACS_DIAMOND '&'
--#define ACS_CKBOARD (acs_map[SLSMG_CKBRD_CHAR])
-+#define ACS_CKBOARD SLSMG_CKBRD_CHAR
- #define ACS_DEGREE 'o'
- #define ACS_PLMINUS '+'
- #define ACS_BULLET '*'
---- src/slsmg.c.acs 2002-07-09 00:03:57.000000000 -0400
-+++ src/slsmg.c 2002-07-09 00:03:57.000000000 -0400
-@@ -10,6 +10,9 @@
-
- #include "slang.h"
- #include "_slang.h"
-+#include "slcurses.h"
-+
-+#include <locale.h>
-
- typedef struct Screen_Type
- {
-@@ -44,9 +47,9 @@
- */
-
- #ifndef IBMPC_SYSTEM
--#define ALT_CHAR_FLAG 0x80
-+static int ALT_CHAR_FLAG=0x80;
- #else
--#define ALT_CHAR_FLAG 0x00
-+static int ALT_CHAR_FLAG=0x00;
- #endif
-
- #if SLTT_HAS_NON_BCE_SUPPORT && !defined(IBMPC_SYSTEM)
-@@ -54,6 +57,8 @@
- static int Bce_Color_Offset;
- #endif
-
-+int SLsmg_Is_Unicode = 0;
-+int SLsmg_Setlocale = 1;
- int SLsmg_Newline_Behavior = 0;
- int SLsmg_Backspace_Moves = 0;
- /* Backward compatibility. Not used. */
-@@ -184,6 +189,8 @@
- return;/* alt chars not used and the alt bit
- * is used to indicate a blink.
- */
-+ if (SLsmg_Is_Unicode)
-+ ALT_CHAR_FLAG=0x00;
-
- if (i) This_Alt_Char = ALT_CHAR_FLAG;
- else This_Alt_Char = 0;
-@@ -348,6 +355,8 @@
- #ifndef IBMPC_SYSTEM
- int alt_char_set_flag;
-
-+ if (SLsmg_Is_Unicode)
-+ ALT_CHAR_FLAG = 0x00;
- alt_char_set_flag = ((This_Color & ALT_CHAR_FLAG)
- && ((tt_Use_Blink_For_ACS == NULL)
- || (*tt_Use_Blink_For_ACS == 0)));
-@@ -1221,6 +1230,20 @@
- Smg_Inited = 0;
- }
-
-+static void SLsmg_check_unicode(void)
-+{
-+ char *s,*t;
-+
-+ if (SLsmg_Setlocale)
-+ s = setlocale(LC_ALL, "");
-+ else
-+ s = setlocale(LC_ALL, NULL);
-+ if (s && (strstr(s,"UTF-8") || strstr(s,"utf8"))) {
-+ SLsmg_Is_Unicode = 1;
-+ return;
-+ }
-+ SLsmg_Is_Unicode = 0;
-+}
-
- static int init_smg (void)
- {
-@@ -1242,6 +1265,8 @@
- This_Col = This_Row = Start_Col = Start_Row = 0;
-
- This_Alt_Char = 0;
-+ SLsmg_check_unicode ();
-+ SLcurses_init_acs_map ();
- SLsmg_set_color (0);
- Cls_Flag = 1;
- #ifndef IBMPC_SYSTEM
-@@ -1386,7 +1411,11 @@
- }
- }
-
-+#ifdef UTF8
-+void SLsmg_draw_object (int r, int c, SLsmg_Char_Type object)
-+#else
- void SLsmg_draw_object (int r, int c, unsigned char object)
-+#endif
- {
- This_Row = r; This_Col = c;
-
-@@ -1405,7 +1434,7 @@
-
- void SLsmg_draw_hline (unsigned int n)
- {
-- static unsigned char hbuf[16];
-+ SLsmg_Char_Type ch = SLSMG_HLINE_CHAR;
- int count;
- int cmin, cmax;
- int final_col = This_Col + (int) n;
-@@ -1421,11 +1450,6 @@
- return;
- }
-
-- if (hbuf[0] == 0)
-- {
-- SLMEMSET ((char *) hbuf, SLSMG_HLINE_CHAR, 16);
-- }
--
- n = (unsigned int)(cmax - cmin);
- count = n / 16;
-
-@@ -1433,10 +1457,10 @@
- This_Color |= ALT_CHAR_FLAG;
- This_Col = cmin;
-
-- SLsmg_write_nchars ((char *) hbuf, n % 16);
-- while (count-- > 0)
-+ SLsmg_draw_object(This_Row, This_Col, ch);
-+ while (n-- > 0)
- {
-- SLsmg_write_nchars ((char *) hbuf, 16);
-+ SLsmg_draw_object(This_Row, This_Col, ch);
- }
-
- This_Color = save_color;
-@@ -1445,7 +1469,7 @@
-
- void SLsmg_draw_vline (int n)
- {
-- unsigned char ch = SLSMG_VLINE_CHAR;
-+ SLsmg_Char_Type ch = SLSMG_VLINE_CHAR;
- int c = This_Col, rmin, rmax;
- int final_row = This_Row + n;
- int save_color;
-@@ -1466,7 +1490,7 @@
- for (This_Row = rmin; This_Row < rmax; This_Row++)
- {
- This_Col = c;
-- SLsmg_write_nchars ((char *) &ch, 1);
-+ SLsmg_draw_object (This_Row, This_Col, ch);
- }
-
- This_Col = c; This_Row = final_row;
diff --git a/devel/libslang/pkg-plist b/devel/libslang/pkg-plist
index 4763c9570ee8..4e89b8a99bc4 100644
--- a/devel/libslang/pkg-plist
+++ b/devel/libslang/pkg-plist
@@ -4,3 +4,6 @@ include/slcurses.h
lib/libslang.a
lib/libslang.so
lib/libslang.so.1
+%%UTF8%%lib/libslang-utf8.a
+%%UTF8%%lib/libslang-utf8.so
+%%UTF8%%lib/libslang-utf8.so.1