From 085666acefbc1e4a07d0f90ef86221cd33faa7bb Mon Sep 17 00:00:00 2001 From: Ashish SHUKLA Date: Wed, 7 Sep 2011 20:20:25 +0000 Subject: - Add fix for GNU Emacs bug report# 8522 which affects users of euc-japan keyboard-coding-system[1] - Fix portlint warnings - Update PATCH_SITES Submitted by: hrs[1] --- editors/emacs/Makefile | 13 ++++---- editors/emacs/files/patch-src_coding.c | 51 ++++++++++++++++++++++++++++++++ editors/emacs23/Makefile | 13 ++++---- editors/emacs23/files/patch-src_coding.c | 51 ++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 editors/emacs/files/patch-src_coding.c create mode 100644 editors/emacs23/files/patch-src_coding.c diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile index b074b08a202d..00feacd91d74 100644 --- a/editors/emacs/Makefile +++ b/editors/emacs/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= ${EMACS_VER} -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 2 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} @@ -17,6 +17,9 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}a MAINTAINER= ashish@FreeBSD.org COMMENT= GNU editing macros +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + MAKE_JOBS_UNSAFE= yes CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-24.* \ @@ -28,13 +31,11 @@ EMACS_VER= 23.3 GNU_CONFIGURE= yes USE_GMAKE= yes USE_BZIP2= yes -CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" +CPPFLAGS= "-I${LOCALBASE}/include" +CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --localstatedir=/var WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -LICENSE= GPLv3 -LICENSE_FILE= ${WRKSRC}/COPYING - MAN1= b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ grep-changelog.1 rcs-checkin.1 PLIST_SUB= EMACS_VER=${EMACS_VER} @@ -200,7 +201,7 @@ CONFIGURE_ARGS+= --without-xim .endif .if defined(WITH_CANNA) -PATCH_SITES+= http://wahjava.users.sourceforge.net/%SUBDIR%/ ${MASTER_SITE_LOCAL} +PATCH_SITES+= http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL} PATCH_SITE_SUBDIR+= ashish PATCHFILES+= emacs23.3canna-20110316.diff.gz PATCH_DIST_STRIP= -p1 diff --git a/editors/emacs/files/patch-src_coding.c b/editors/emacs/files/patch-src_coding.c new file mode 100644 index 000000000000..9dd1a5e0f45d --- /dev/null +++ b/editors/emacs/files/patch-src_coding.c @@ -0,0 +1,51 @@ + +$FreeBSD$ + +--- src/coding.c.orig ++++ src/coding.c +@@ -3853,8 +3853,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_2); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * N sequence is recognized as SS2 in some ISO2022 ++ * encodings. As a workaround, mark invalid only if ++ * N + GR in a 7-bit encoding or N + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case 'O': /* invocation of single-shift-3 */ +@@ -3867,8 +3879,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_3); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * O sequence by arrow keys is recognized as SS3 in ++ * some ISO2022 encodings. As a workaround, mark invalid only if ++ * O + GR in a 7-bit encoding or O + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case '0': case '2': case '3': case '4': /* start composition */ diff --git a/editors/emacs23/Makefile b/editors/emacs23/Makefile index b074b08a202d..00feacd91d74 100644 --- a/editors/emacs23/Makefile +++ b/editors/emacs23/Makefile @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= ${EMACS_VER} -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 2 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} @@ -17,6 +17,9 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}a MAINTAINER= ashish@FreeBSD.org COMMENT= GNU editing macros +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + MAKE_JOBS_UNSAFE= yes CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-24.* \ @@ -28,13 +31,11 @@ EMACS_VER= 23.3 GNU_CONFIGURE= yes USE_GMAKE= yes USE_BZIP2= yes -CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" +CPPFLAGS= "-I${LOCALBASE}/include" +CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ARGS= --localstatedir=/var WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -LICENSE= GPLv3 -LICENSE_FILE= ${WRKSRC}/COPYING - MAN1= b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ grep-changelog.1 rcs-checkin.1 PLIST_SUB= EMACS_VER=${EMACS_VER} @@ -200,7 +201,7 @@ CONFIGURE_ARGS+= --without-xim .endif .if defined(WITH_CANNA) -PATCH_SITES+= http://wahjava.users.sourceforge.net/%SUBDIR%/ ${MASTER_SITE_LOCAL} +PATCH_SITES+= http://distfiles.pirateparty.in/%SUBDIR%/ ${MASTER_SITE_LOCAL} PATCH_SITE_SUBDIR+= ashish PATCHFILES+= emacs23.3canna-20110316.diff.gz PATCH_DIST_STRIP= -p1 diff --git a/editors/emacs23/files/patch-src_coding.c b/editors/emacs23/files/patch-src_coding.c new file mode 100644 index 000000000000..9dd1a5e0f45d --- /dev/null +++ b/editors/emacs23/files/patch-src_coding.c @@ -0,0 +1,51 @@ + +$FreeBSD$ + +--- src/coding.c.orig ++++ src/coding.c +@@ -3853,8 +3853,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_2); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * N sequence is recognized as SS2 in some ISO2022 ++ * encodings. As a workaround, mark invalid only if ++ * N + GR in a 7-bit encoding or N + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case 'O': /* invocation of single-shift-3 */ +@@ -3867,8 +3879,20 @@ + else + charset = CHARSET_FROM_ID (charset_id_3); + ONE_MORE_BYTE (c1); +- if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0)) +- goto invalid_code; ++ /* ++ * O sequence by arrow keys is recognized as SS3 in ++ * some ISO2022 encodings. As a workaround, mark invalid only if ++ * O + GR in a 7-bit encoding or O + GL in an 8-bit ++ * encoding. ++ */ ++ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) { ++ if (c1 < 0x20 || c1 >= 0x80) ++ goto invalid_code; ++ } ++ else { ++ if (c1 < 0xA0) ++ goto invalid_code; ++ } + break; + + case '0': case '2': case '3': case '4': /* start composition */ -- cgit v1.2.3