X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 1386FDC010E for ; Wed, 30 Sep 2015 15:42:31 +0000 (UTC) Received: from lithium.8pit.net (lithium.8pit.net [141.101.32.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 6FE4FDC00F4 for ; Wed, 30 Sep 2015 15:42:30 +0000 (UTC) Received: from localhost (ip5f5ac8fc.dynamic.kabel-deutschland.de [95.90.200.252]); by lithium.8pit.net (OpenSMTPD) with ESMTPSA id 2ebcfce4; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; for ; Wed, 30 Sep 2015 17:42:28 +0200 (CEST) Date: Wed, 30 Sep 2015 17:42:28 +0200 From: =?iso-8859-1?Q?S=F6ren?= Tempel To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] main/xrdb: build with cpp support Message-ID: <20150930154228.GA18172@francium.lan> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.24 (2015-08-30) X-Virus-Scanned: ClamAV using ClamSMTP --tKW2IUtsqtDRztdT Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="0001-main-mcpp-move-from-testing.patch" Content-Transfer-Encoding: quoted-printable >From 5c777080d905f3c92ae14ada8d03bcdc68fc92d9 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?S=3DC3=3DB6ren=3D20Tempel?=3D Date: Wed, 30 Sep 2015 17:35:13 +0200 Subject: [PATCH 1/2] main/mcpp: move from testing --- main/mcpp/01-zeroc-fixes.patch | 75 ++++++++++++++++++++++++++++++++++= ++++ main/mcpp/02-gniibe-fixes.patch | 33 +++++++++++++++++ main/mcpp/APKBUILD | 65 +++++++++++++++++++++++++++++++++ testing/mcpp/01-zeroc-fixes.patch | 75 ----------------------------------= ---- testing/mcpp/02-gniibe-fixes.patch | 33 ----------------- testing/mcpp/APKBUILD | 65 --------------------------------- 6 files changed, 173 insertions(+), 173 deletions(-) create mode 100644 main/mcpp/01-zeroc-fixes.patch create mode 100644 main/mcpp/02-gniibe-fixes.patch create mode 100644 main/mcpp/APKBUILD delete mode 100644 testing/mcpp/01-zeroc-fixes.patch delete mode 100644 testing/mcpp/02-gniibe-fixes.patch delete mode 100644 testing/mcpp/APKBUILD diff --git a/main/mcpp/01-zeroc-fixes.patch b/main/mcpp/01-zeroc-fixes.patch new file mode 100644 index 0000000..fff5d32 --- /dev/null +++ b/main/mcpp/01-zeroc-fixes.patch @@ -0,0 +1,75 @@ +Description: Fixes by ZeroC, Inc. +Author: ZeroC, Inc. +Bug-Debian: http://bugs.debian.org/611749 + +--- mcpp-2.7.2.orig/src/main.c ++++ mcpp-2.7.2/src/main.c +@@ -326,6 +326,8 @@ static void init_main( void) + =3D FALSE; + option_flags.trig =3D TRIGRAPHS_INIT; + option_flags.dig =3D DIGRAPHS_INIT; ++ sh_file =3D NULL; ++ sh_line =3D 0; + } +=20 + int mcpp_lib_main +--- mcpp-2.7.2.orig/src/support.c ++++ mcpp-2.7.2/src/support.c +@@ -188,7 +188,7 @@ static char * append_to_buffer( + size_t length + ) + { +- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memo= ry */ ++ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more = memory */ + size_t size =3D MAX( BUF_INCR_SIZE, length); +=20 + if (mem_buf_p->buffer =3D=3D NULL) { /* 1st append */ +@@ -1722,6 +1722,8 @@ com_start: + sp -=3D 2; + while (*sp !=3D '\n') /* Until end of line */ + mcpp_fputc( *sp++, OUT); ++ mcpp_fputc( '\n', OUT); ++ wrong_line =3D TRUE; + } + goto end_line; + default: /* Not a comment */ +--- mcpp-2.7.2.orig/src/internal.H ++++ mcpp-2.7.2/src/internal.H +@@ -390,6 +390,8 @@ extern char * const work_end; /* E + 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 */ +=20 + /* main.c */ +@@ -557,6 +559,6 @@ extern void init_system( void); + #endif + #endif +=20 +-#if HOST_HAVE_STPCPY ++#if HOST_HAVE_STPCPY && !defined(stpcpy) + extern char * stpcpy( char * dest, const char * src); + #endif +--- mcpp-2.7.2.orig/src/system.c ++++ mcpp-2.7.2/src/system.c +@@ -3858,6 +3858,9 @@ static int chk_dirp( + } + #endif +=20 ++FILEINFO* sh_file; ++int sh_line; ++ + void sharp( + FILEINFO * sharp_file, + int flag /* Flag to append to the line for GCC */ +@@ -3868,8 +3871,6 @@ void sharp( + * else (i.e. 'sharp_file' is NULL) 'infile'. + */ + { +- static FILEINFO * sh_file; +- static int sh_line; + FILEINFO * file; + int line; +=20 diff --git a/main/mcpp/02-gniibe-fixes.patch b/main/mcpp/02-gniibe-fixes.pa= tch new file mode 100644 index 0000000..cb5aa6c --- /dev/null +++ b/main/mcpp/02-gniibe-fixes.patch @@ -0,0 +1,33 @@ +Description: Simple fixes + * Fix freeing unmalloced memory + The memory of 'in_file' is not malloced, but points to argv[]. + It is wrong to free it. + * When there is no input file specified by argv, it causes error + and fp_in =3D=3D NULL. Check is needed to call fclose for fp_in. +Author: NIIBE Yutaka + +## Fixes the issue reported at: +## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3f= a2d89ec00/ + +Index: mcpp-2.7.2/src/main.c +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000 ++++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000 +@@ -428,16 +428,11 @@ +=20 + fatal_error_exit: + #if MCPP_LIB +- /* Free malloced memory */ +- if (mcpp_debug & MACRO_CALL) { +- if (in_file !=3D stdin_name) +- free( in_file); +- } + clear_filelist(); + clear_symtable(); + #endif +=20 +- if (fp_in !=3D stdin) ++ if (fp_in && fp_in !=3D stdin) + fclose( fp_in); + if (fp_out !=3D stdout) + fclose( fp_out); diff --git a/main/mcpp/APKBUILD b/main/mcpp/APKBUILD new file mode 100644 index 0000000..007b6a4 --- /dev/null +++ b/main/mcpp/APKBUILD @@ -0,0 +1,65 @@ +# Contributor: S=F6ren Tempel +# Maintainer: S=F6ren Tempel +pkgname=3Dmcpp +pkgver=3D2.7.2 +pkgrel=3D0 +pkgdesc=3D"A portable C preprocessor" +url=3D"http://mcpp.sourceforge.net" +arch=3D"all" +license=3D"custom" +depends=3D"" +depends_dev=3D"" +makedepends=3D"" +install=3D"" +subpackages=3D"$pkgname-dev $pkgname-doc $pkgname-libs" +source=3D"http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}= .tar.gz + 01-zeroc-fixes.patch + 02-gniibe-fixes.patch" + +_builddir=3D"$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" + update_config_sub || return 1 + + local i + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure \ + --build=3D$CBUILD \ + --host=3D$CHOST \ + --prefix=3D/usr \ + --sysconfdir=3D/etc \ + --mandir=3D/usr/share/man \ + --infodir=3D/usr/share/info \ + --localstatedir=3D/var \ + --enable-mcpplib \ + --disable-static \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR=3D"$pkgdir" install || return 1 + + mkdir -p "$pkgdir"/usr/share/licenses/$pkgname + mv "$pkgdir"/usr/share/doc/$pkgname/LICENSE \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1 +} + +md5sums=3D"512de48c87ab023a69250edc7a0c7b05 mcpp-2.7.2.tar.gz +e231a2c976ccf14b548deaee840faeb7 01-zeroc-fixes.patch +1801827678e80d0ef73655a88064a35b 02-gniibe-fixes.patch" +sha256sums=3D"3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb= 8864 mcpp-2.7.2.tar.gz +6ed331f58edc7a24e769ac065ab43ed9f09f06487fda37095cacd413b81f522c 01-zeroc= -fixes.patch +30a790e63e387a95e45c2b73b3942948e1e852155250dd769a5598c33d374504 02-gniib= e-fixes.patch" +sha512sums=3D"1ca885cb13fdb684de9d0595a9215b52f48a93a69077d82cdcacafe40d9a= 61fb77b00a3ff2b8890e7bc0a0fcc0c8d70d4093c00c280351cd4459aba67c573235 mcpp-= 2.7.2.tar.gz +86b2e851490e180dfe3028a5a37019ea423924c921ab053a642fb78d4533a87f913ede2928= daf9da4daf60e67795a24521186b40c76961ae99ebeb75f8aa95ad 01-zeroc-fixes.patch +a31a0f2e7430381e5e62ea4257a35891ce9d2f3beed60c6caad3b6d298a58557e9c8502238= 40ef8c6f6c2e8139cf4a4edf29ac93b2532680feafba503fcfaf6d 02-gniibe-fixes.pat= ch" diff --git a/testing/mcpp/01-zeroc-fixes.patch b/testing/mcpp/01-zeroc-fixe= s.patch deleted file mode 100644 index fff5d32..0000000 --- a/testing/mcpp/01-zeroc-fixes.patch +++ /dev/null @@ -1,75 +0,0 @@ -Description: Fixes by ZeroC, Inc. -Author: ZeroC, Inc. -Bug-Debian: http://bugs.debian.org/611749 - ---- mcpp-2.7.2.orig/src/main.c -+++ mcpp-2.7.2/src/main.c -@@ -326,6 +326,8 @@ static void init_main( void) - =3D FALSE; - option_flags.trig =3D TRIGRAPHS_INIT; - option_flags.dig =3D DIGRAPHS_INIT; -+ sh_file =3D NULL; -+ sh_line =3D 0; - } -=20 - int mcpp_lib_main ---- mcpp-2.7.2.orig/src/support.c -+++ mcpp-2.7.2/src/support.c -@@ -188,7 +188,7 @@ static char * append_to_buffer( - size_t length - ) - { -- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memo= ry */ -+ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more = memory */ - size_t size =3D MAX( BUF_INCR_SIZE, length); -=20 - if (mem_buf_p->buffer =3D=3D NULL) { /* 1st append */ -@@ -1722,6 +1722,8 @@ com_start: - sp -=3D 2; - while (*sp !=3D '\n') /* Until end of line */ - mcpp_fputc( *sp++, OUT); -+ mcpp_fputc( '\n', OUT); -+ wrong_line =3D TRUE; - } - goto end_line; - default: /* Not a comment */ ---- mcpp-2.7.2.orig/src/internal.H -+++ mcpp-2.7.2/src/internal.H -@@ -390,6 +390,8 @@ extern char * const work_end; /* E - 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 */ -=20 - /* main.c */ -@@ -557,6 +559,6 @@ extern void init_system( void); - #endif - #endif -=20 --#if HOST_HAVE_STPCPY -+#if HOST_HAVE_STPCPY && !defined(stpcpy) - extern char * stpcpy( char * dest, const char * src); - #endif ---- mcpp-2.7.2.orig/src/system.c -+++ mcpp-2.7.2/src/system.c -@@ -3858,6 +3858,9 @@ static int chk_dirp( - } - #endif -=20 -+FILEINFO* sh_file; -+int sh_line; -+ - void sharp( - FILEINFO * sharp_file, - int flag /* Flag to append to the line for GCC */ -@@ -3868,8 +3871,6 @@ void sharp( - * else (i.e. 'sharp_file' is NULL) 'infile'. - */ - { -- static FILEINFO * sh_file; -- static int sh_line; - FILEINFO * file; - int line; -=20 diff --git a/testing/mcpp/02-gniibe-fixes.patch b/testing/mcpp/02-gniibe-fi= xes.patch deleted file mode 100644 index cb5aa6c..0000000 --- a/testing/mcpp/02-gniibe-fixes.patch +++ /dev/null @@ -1,33 +0,0 @@ -Description: Simple fixes - * Fix freeing unmalloced memory - The memory of 'in_file' is not malloced, but points to argv[]. - It is wrong to free it. - * When there is no input file specified by argv, it causes error - and fp_in =3D=3D NULL. Check is needed to call fclose for fp_in. -Author: NIIBE Yutaka - -## Fixes the issue reported at: -## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3f= a2d89ec00/ - -Index: mcpp-2.7.2/src/main.c -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ---- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000 -+++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000 -@@ -428,16 +428,11 @@ -=20 - fatal_error_exit: - #if MCPP_LIB -- /* Free malloced memory */ -- if (mcpp_debug & MACRO_CALL) { -- if (in_file !=3D stdin_name) -- free( in_file); -- } - clear_filelist(); - clear_symtable(); - #endif -=20 -- if (fp_in !=3D stdin) -+ if (fp_in && fp_in !=3D stdin) - fclose( fp_in); - if (fp_out !=3D stdout) - fclose( fp_out); diff --git a/testing/mcpp/APKBUILD b/testing/mcpp/APKBUILD deleted file mode 100644 index 007b6a4..0000000 --- a/testing/mcpp/APKBUILD +++ /dev/null @@ -1,65 +0,0 @@ -# Contributor: S=F6ren Tempel -# Maintainer: S=F6ren Tempel -pkgname=3Dmcpp -pkgver=3D2.7.2 -pkgrel=3D0 -pkgdesc=3D"A portable C preprocessor" -url=3D"http://mcpp.sourceforge.net" -arch=3D"all" -license=3D"custom" -depends=3D"" -depends_dev=3D"" -makedepends=3D"" -install=3D"" -subpackages=3D"$pkgname-dev $pkgname-doc $pkgname-libs" -source=3D"http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}= .tar.gz - 01-zeroc-fixes.patch - 02-gniibe-fixes.patch" - -_builddir=3D"$srcdir"/$pkgname-$pkgver -prepare() { - cd "$_builddir" - update_config_sub || return 1 - - local i - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./configure \ - --build=3D$CBUILD \ - --host=3D$CHOST \ - --prefix=3D/usr \ - --sysconfdir=3D/etc \ - --mandir=3D/usr/share/man \ - --infodir=3D/usr/share/info \ - --localstatedir=3D/var \ - --enable-mcpplib \ - --disable-static \ - || return 1 - make || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR=3D"$pkgdir" install || return 1 - - mkdir -p "$pkgdir"/usr/share/licenses/$pkgname - mv "$pkgdir"/usr/share/doc/$pkgname/LICENSE \ - "$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1 -} - -md5sums=3D"512de48c87ab023a69250edc7a0c7b05 mcpp-2.7.2.tar.gz -e231a2c976ccf14b548deaee840faeb7 01-zeroc-fixes.patch -1801827678e80d0ef73655a88064a35b 02-gniibe-fixes.patch" -sha256sums=3D"3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb= 8864 mcpp-2.7.2.tar.gz -6ed331f58edc7a24e769ac065ab43ed9f09f06487fda37095cacd413b81f522c 01-zeroc= -fixes.patch -30a790e63e387a95e45c2b73b3942948e1e852155250dd769a5598c33d374504 02-gniib= e-fixes.patch" -sha512sums=3D"1ca885cb13fdb684de9d0595a9215b52f48a93a69077d82cdcacafe40d9a= 61fb77b00a3ff2b8890e7bc0a0fcc0c8d70d4093c00c280351cd4459aba67c573235 mcpp-= 2.7.2.tar.gz -86b2e851490e180dfe3028a5a37019ea423924c921ab053a642fb78d4533a87f913ede2928= daf9da4daf60e67795a24521186b40c76961ae99ebeb75f8aa95ad 01-zeroc-fixes.patch -a31a0f2e7430381e5e62ea4257a35891ce9d2f3beed60c6caad3b6d298a58557e9c8502238= 40ef8c6f6c2e8139cf4a4edf29ac93b2532680feafba503fcfaf6d 02-gniibe-fixes.pat= ch" --=20 2.6.0 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="0002-main-xrdb-build-with-cpp-support.patch" Content-Transfer-Encoding: quoted-printable >From 00409b883b26809008f2e92c45a8215a6f7e04cc Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?S=3DC3=3DB6ren=3D20Tempel?=3D Date: Wed, 30 Sep 2015 17:38:15 +0200 Subject: [PATCH 2/2] main/xrdb: build with cpp support --- main/xrdb/APKBUILD | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main/xrdb/APKBUILD b/main/xrdb/APKBUILD index d28fd5e..444b412 100644 --- a/main/xrdb/APKBUILD +++ b/main/xrdb/APKBUILD @@ -1,14 +1,18 @@ +# Contributor: S=F6ren Tempel +# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=3Dxrdb pkgver=3D1.1.0 -pkgrel=3D0 +pkgrel=3D1 pkgdesc=3D"X server resource database utility" url=3D"http://xorg.freedesktop.org/" arch=3D"all" license=3D"custom" -subpackages=3D"$pkgname-doc" -depends=3D +depends=3D"mcpp" +depends_dev=3D"" makedepends=3D"libxmu-dev libx11-dev" +install=3D"" +subpackages=3D"$pkgname-doc" source=3D"http://xorg.freedesktop.org/releases/individual/app/$pkgname-$pk= gver.tar.bz2" =20 build () { @@ -18,6 +22,9 @@ build () { --host=3D$CHOST \ --prefix=3D/usr \ --mandir=3D/usr/share/man \ + --infodir=3D/usr/share/info \ + --localstatedir=3D/var \ + --with-cpp=3D/usr/bin/mcpp \ || return 1 make || return 1 } @@ -26,6 +33,7 @@ package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR=3D"$pkgdir" install || return 1 } + md5sums=3D"b54c7e3e53b4f332d41ed435433fbda0 xrdb-1.1.0.tar.bz2" sha256sums=3D"73827b6bbfc9d27ca287d95a1224c306d7053cd7b8156641698d7dc541ca= 565b xrdb-1.1.0.tar.bz2" sha512sums=3D"8e2a177653d5aa895c71ed3640e0f1dd9fe8bf5cd6f0c6ff7e372394a2a4= 1c3aa2286905fd9c69e3d140024d235b81a1f32b5d4012b1ac5ac1ed945599dee407 xrdb-= 1.1.0.tar.bz2" --=20 2.6.0 --tKW2IUtsqtDRztdT-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---