summaryrefslogtreecommitdiff
path: root/extra/mcpp
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-05-20 09:26:44 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-05-20 09:26:44 +0200
commit39c366b9fc1b83a741177d0b415a20147a18a3c0 (patch)
tree24b520a26e042f10306b53e0fb579bab6343132b /extra/mcpp
parent6d3d853af3b9042559c2d86a7e3907f97921fb28 (diff)
parentaad2fba0fc475162b566f1577d8e7a020cd9e80d (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/libcss/PKGBUILD extra/kdenetwork/PKGBUILD extra/xorg-server/PKGBUILD testing/openmpi/PKGBUILD testing/xf86-video-ati/PKGBUILD testing/xorg-server/PKGBUILD
Diffstat (limited to 'extra/mcpp')
-rw-r--r--extra/mcpp/PKGBUILD13
-rw-r--r--extra/mcpp/fs28284.patch100
2 files changed, 108 insertions, 5 deletions
diff --git a/extra/mcpp/PKGBUILD b/extra/mcpp/PKGBUILD
index 1e05b23cb..5a0aa05f5 100644
--- a/extra/mcpp/PKGBUILD
+++ b/extra/mcpp/PKGBUILD
@@ -1,24 +1,27 @@
-# $Id: PKGBUILD 137665 2011-09-10 11:18:34Z pierre $
+# $Id: PKGBUILD 159222 2012-05-18 11:58:32Z jgc $
# Maintainer: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=mcpp
pkgver=2.7.2
-pkgrel=3
+pkgrel=4
pkgdesc="Matsui's CPP implementation precisely conformed to standards"
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
url="http://mcpp.sourceforge.net"
depends=('glibc')
options=('!libtool')
-source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'namlen.patch')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ namlen.patch
+ fs28284.patch)
md5sums=('512de48c87ab023a69250edc7a0c7b05'
- '0bfc6177a58e912a9e23e368578dd3fe')
+ '0bfc6177a58e912a9e23e368578dd3fe'
+ 'ba668fc6996e538f2e0c096f9eb282ce')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/namlen.patch"
+ patch -Np1 -i "${srcdir}/fs28284.patch"
./configure --prefix=/usr --enable-mcpplib --disable-static
make
}
diff --git a/extra/mcpp/fs28284.patch b/extra/mcpp/fs28284.patch
new file mode 100644
index 000000000..960203cf4
--- /dev/null
+++ b/extra/mcpp/fs28284.patch
@@ -0,0 +1,100 @@
+diff -c -r -N ../mcpp-2.7.2/src/internal.H ./src/internal.H
+*** ../mcpp-2.7.2/src/internal.H 2008-08-27 10:31:16.000000000 -0230
+--- ./src/internal.H 2009-12-17 21:01:35.000000000 -0330
+***************
+*** 390,395 ****
+--- 390,397 ----
+ extern char identifier[]; /* Lastly scanned name */
+ extern IFINFO ifstack[]; /* Information of #if nesting */
+ extern char work_buf[];
++ extern FILEINFO * sh_file;
++ extern int sh_line;
+ /* Temporary buffer for directive line and macro expansion */
+
+ /* main.c */
+***************
+*** 557,562 ****
+ #endif
+ #endif
+
+! #if HOST_HAVE_STPCPY
+ extern char * stpcpy( char * dest, const char * src);
+ #endif
+--- 559,564 ----
+ #endif
+ #endif
+
+! #if HOST_HAVE_STPCPY && !defined(stpcpy)
+ extern char * stpcpy( char * dest, const char * src);
+ #endif
+diff -c -r -N ../mcpp-2.7.2/src/main.c ./src/main.c
+*** ../mcpp-2.7.2/src/main.c 2008-11-05 05:04:46.000000000 -0330
+--- ./src/main.c 2009-12-17 20:42:42.000000000 -0330
+***************
+*** 326,331 ****
+--- 326,333 ----
+ = FALSE;
+ option_flags.trig = TRIGRAPHS_INIT;
+ option_flags.dig = DIGRAPHS_INIT;
++ sh_file = NULL;
++ sh_line = 0;
+ }
+
+ int mcpp_lib_main
+diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
+*** ../mcpp-2.7.2/src/support.c 2008-06-10 06:02:33.000000000 -0230
+--- ./src/support.c 2009-12-17 20:42:39.000000000 -0330
+***************
+*** 188,194 ****
+ size_t length
+ )
+ {
+! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
+ size_t size = MAX( BUF_INCR_SIZE, length);
+
+ if (mem_buf_p->buffer == NULL) { /* 1st append */
+--- 188,194 ----
+ size_t length
+ )
+ {
+! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
+ size_t size = MAX( BUF_INCR_SIZE, length);
+
+ if (mem_buf_p->buffer == NULL) { /* 1st append */
+***************
+*** 1722,1727 ****
+--- 1722,1729 ----
+ sp -= 2;
+ while (*sp != '\n') /* Until end of line */
+ mcpp_fputc( *sp++, OUT);
++ mcpp_fputc( '\n', OUT);
++ wrong_line = TRUE;
+ }
+ goto end_line;
+ default: /* Not a comment */
+diff -c -r -N ../mcpp-2.7.2/src/system.c ./src/system.c
+*** ../mcpp-2.7.2/src/system.c 2008-11-26 06:23:51.000000000 -0330
+--- ./src/system.c 2009-12-17 20:42:42.000000000 -0330
+***************
+*** 3858,3863 ****
+--- 3858,3866 ----
+ }
+ #endif
+
++ FILEINFO* sh_file;
++ int sh_line;
++
+ void sharp(
+ FILEINFO * sharp_file,
+ int flag /* Flag to append to the line for GCC */
+***************
+*** 3868,3875 ****
+ * else (i.e. 'sharp_file' is NULL) 'infile'.
+ */
+ {
+- static FILEINFO * sh_file;
+- static int sh_line;
+ FILEINFO * file;
+ int line;
+
+--- 3871,3876 ----