[arch-commits] Commit in gdc/trunk (PKGBUILD system_zlib.diff)

Михаил Страшун dicebot at archlinux.org
Thu Jun 4 14:10:29 UTC 2015


    Date: Thursday, June 4, 2015 @ 16:10:29
  Author: dicebot
Revision: 134782

upgpkg: gdc 5.1.0-2

Bug: GDC wasn't using system zlib

Added:
  gdc/trunk/system_zlib.diff
Modified:
  gdc/trunk/PKGBUILD

------------------+
 PKGBUILD         |    7 +++-
 system_zlib.diff |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-06-04 14:02:57 UTC (rev 134781)
+++ PKGBUILD	2015-06-04 14:10:29 UTC (rev 134782)
@@ -5,7 +5,7 @@
 
 pkgname=('gdc' 'libgphobos-devel')
 pkgver=5.1.0
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="https://github.com/D-Programming-GDC/GDC"
 license=('GPL')
@@ -13,9 +13,10 @@
 options=('!emptydirs' '!buildflags')
 source=(
     "ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2"
-    "gdc::git://github.com/D-Programming-GDC/GDC.git#branch=gdc-5"
+    "gdc::git://github.com/D-Programming-GDC/GDC.git#tag=v2.066.1_gcc5"
     "git+https://github.com/D-Programming-GDC/GDMD.git"
     "folders.diff"
+    "system_zlib.diff"
 )
 sha256sums=(
     'b7dafdf89cbb0e20333dbf5b5349319ae06e3d1a30bf3515b5488f7e89dca5ad'
@@ -22,6 +23,7 @@
     'SKIP'
     'SKIP'
     'ea5c80a28026393bd4627485602660a4a01d9fbc65299e95e768013e197bad20'
+    '1bf81cde6a7bad096f76db2f20ad8ab2801cd0ab2dd2fa0219503073e8dae480'
 )
 
 groups=('dlang' 'dlang-gdc')
@@ -41,6 +43,7 @@
 
     cd $srcdir/gdc
     git apply $srcdir/folders.diff # fix gdc_include_path
+    git apply $srcdir/system_zlib.diff # use correct system zlib
     ./setup-gcc.sh ../gcc-$pkgver
 
     mkdir $srcdir/gcc-build

Added: system_zlib.diff
===================================================================
--- system_zlib.diff	                        (rev 0)
+++ system_zlib.diff	2015-06-04 14:10:29 UTC (rev 134782)
@@ -0,0 +1,86 @@
+diff --git a/gcc/d/d-spec.cc b/gcc/d/d-spec.cc
+index a43cb34..e4bb527 100644
+--- a/gcc/d/d-spec.cc
++++ b/gcc/d/d-spec.cc
+@@ -96,7 +96,7 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
+   /* The number of arguments being added to what's in argv, other than
+      libraries.  We use this to track the number of times we've inserted
+      -xd/-xnone.  */
+-  int added = 0;
++  int added = 1; /* -lz */
+ 
+   /* The new argument list will be contained in this.  */
+   cl_decoded_option *new_decoded_options;
+@@ -462,6 +462,14 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
+       j++;
+     }
+ 
++  /* Use the up-to-date system zlib with libphobos */
++  {
++      generate_option (OPT_l, "z", 1, CL_DRIVER,
++              &new_decoded_options[j]);
++      added_libraries++;
++      j++;
++  }
++
+   /* Add `-lgphobos' if we haven't already done so.  */
+   if (library > 0 && phobos)
+     {
+diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am
+index de99b58..d174646 100644
+--- a/libphobos/src/Makefile.am
++++ b/libphobos/src/Makefile.am
+@@ -92,8 +92,6 @@ Z_OBJS=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o \
+        zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o \
+        zlib/trees.o zlib/uncompr.o zlib/zutil.o
+ 
+-ZLIB_OBJS=@ZLIB_OBJS@
+-
+ 
+ # modules which require some kind of operating system
+ OS_OBJS=std/file.o std/mmfile.o std/path.o std/process.o \
+@@ -113,7 +111,7 @@ WINDOWS_OBJS=std/c/windows/com.o std/c/windows/stat.o std/c/wcharh.o \
+ 
+ D_EXTRA_OBJS=@D_EXTRA_OBJS@
+ 
+-ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS) $(ZLIB_OBJS)
++ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS)
+ 
+ 
+ libgphobos2.a : $(ALL_PHOBOS_OBJS) ../libdruntime/libgdruntime.a
+diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in
+index 6d3a91f..803e4aa 100644
+--- a/libphobos/src/Makefile.in
++++ b/libphobos/src/Makefile.in
+@@ -150,7 +150,6 @@ SHELL = @SHELL@
+ STRIP = @STRIP@
+ VERSION = @VERSION@
+ WERROR = @WERROR@
+-ZLIB_OBJS = @ZLIB_OBJS@
+ abs_builddir = @abs_builddir@
+ abs_srcdir = @abs_srcdir@
+ abs_top_builddir = @abs_top_builddir@
+@@ -272,7 +271,7 @@ WINDOWS_OBJS = std/c/windows/com.o std/c/windows/stat.o std/c/wcharh.o \
+ 	     std/windows/charset.o std/windows/iunknown.o std/windows/registry.o \
+ 	     std/windows/syserror.o std/internal/windows/advapi32.o
+ 
+-ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS) $(ZLIB_OBJS)
++ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS)
+ 
+ # Work around what appears to be a GNU make bug handling MAKEFLAGS
+ # values defined in terms of make variables, as is the case for CC and
+diff --git a/libphobos/src/etc/c/zlib.d b/libphobos/src/etc/c/zlib.d
+index 65b1d92..b41b63a 100644
+--- a/libphobos/src/etc/c/zlib.d
++++ b/libphobos/src/etc/c/zlib.d
+@@ -37,8 +37,8 @@ import core.stdc.config;
+ 
+ extern (C):
+ 
+-const char[] ZLIB_VERSION = "1.2.3";
+-const ZLIB_VERNUM = 0x1230;
++const char[] ZLIB_VERSION = "1.2.8";
++const ZLIB_VERNUM = 0x1280;
+ 
+ /*
+      The 'zlib' compression library provides in-memory compression and



More information about the arch-commits mailing list