aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-01-26 13:16:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-26 14:21:31 +0000
commita47ca09836f147a0d6d9e3db0f705821bd2110cf (patch)
tree7ae3a0f45cb594cc5d5a8d75f245a88cf68fc834
parentb0e117ca1ceb6fc8b559e6ab6e3cba91a8a6fee5 (diff)
downloadaports-a47ca09836f147a0d6d9e3db0f705821bd2110cf.tar.bz2
aports-a47ca09836f147a0d6d9e3db0f705821bd2110cf.tar.xz
main/bacula: fix building with ccache
reported upstream: http://bugs.bacula.org/view.php?id=2118
-rw-r--r--main/bacula/APKBUILD12
-rw-r--r--main/bacula/configure-detect-gcc.patch81
2 files changed, 89 insertions, 4 deletions
diff --git a/main/bacula/APKBUILD b/main/bacula/APKBUILD
index cfc25c95f5..53613b42da 100644
--- a/main/bacula/APKBUILD
+++ b/main/bacula/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="bacula"
pkgver=7.0.5
-pkgrel=0
+pkgrel=1
pkgdesc="Enterprise ready, network based backup program"
url="http://www.bacula.org"
arch="all"
@@ -24,6 +24,7 @@ source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgn
bacula-fd-init
bacula-fd-conf
fix-headers.patch
+ configure-detect-gcc.patch
"
_builddir="$srcdir/$pkgname-$pkgver"
@@ -152,7 +153,8 @@ b1b328013634c98119663730e3e2da7e bacula-dir-init
afe2f9a4d79d7d96eb9372d003d10f86 bacula-sd-conf
6ae93e570f95fa845fa534c2d2efaac0 bacula-fd-init
4500ce2d62bf9df33c07f70dc40f7b85 bacula-fd-conf
-b84924f161f193d8441316ee4abc3064 fix-headers.patch"
+b84924f161f193d8441316ee4abc3064 fix-headers.patch
+260871cf8415b6e6e3fa33d1103acffa configure-detect-gcc.patch"
sha256sums="1457849eb33011b43371801b62ffa13d29bebe51be8d5a36da563b87bb094a49 bacula-7.0.5.tar.gz
5a8f830983dc12710aa422c7cb7c1cb5a97bbadd1d0bc94f6223127659038dc4 bacula-dir-init
5891bdb3a8ec581f8a2fd404a5a8995d8950d80da71a3b732474fb45e80d22c2 bacula-dir-conf
@@ -160,7 +162,8 @@ sha256sums="1457849eb33011b43371801b62ffa13d29bebe51be8d5a36da563b87bb094a49 ba
88808b3b971825acffc9dc3b6d418e52d9bd89df8527052c555cba4336ead784 bacula-sd-conf
12a62dd9c7a7931060c2c21e52cb9069a3774ebe7c8370455068e2dded0c2f80 bacula-fd-init
64124036c19e849cc580b981887be35b5746acb584397190a0afe2797b2d1ace bacula-fd-conf
-f74d95cd0dab90326e0eeee45b30b4af52d61f9e8a16547ce879533d2e85d460 fix-headers.patch"
+f74d95cd0dab90326e0eeee45b30b4af52d61f9e8a16547ce879533d2e85d460 fix-headers.patch
+ecf64bf8ea837c0f54d157b7b4b2dd49209d2f78e5d74a3a03696073ffb4ba79 configure-detect-gcc.patch"
sha512sums="df7908769fd13a1cb2e0491d3773577db40c0f1c010b887c6dc6d7e0bc0b408fbfc260e6d5a2a34975e5b424152c7f558b33aeedea45f366636739295641394b bacula-7.0.5.tar.gz
c120fdf566c33465aeb8609e43fc503dd16e5262c992f9c055eea457e3d512924d2ffa7e8d2be23ed9d90944fbc40cc8097117b0b0ae855ad879d5fe6eede1d9 bacula-dir-init
e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef bacula-dir-conf
@@ -168,4 +171,5 @@ ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9f
80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909 bacula-sd-conf
e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa bacula-fd-init
ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc bacula-fd-conf
-215a0b5bc038658ed821a85c6e70df70cb66ca2a970f1e27ae9690c54372410f2d677f1b04b380dfedcff516c96ba91200850917b20454a871a99958d0d24604 fix-headers.patch"
+215a0b5bc038658ed821a85c6e70df70cb66ca2a970f1e27ae9690c54372410f2d677f1b04b380dfedcff516c96ba91200850917b20454a871a99958d0d24604 fix-headers.patch
+f6c0f79e270790d2f3564a76d58b6ce5b7b4348247ad31c782363e3a51604bc53d5b11b232469241ae59c1982f65fb5bbb744537a8b94a2bd2ce3395a57a344f configure-detect-gcc.patch"
diff --git a/main/bacula/configure-detect-gcc.patch b/main/bacula/configure-detect-gcc.patch
new file mode 100644
index 0000000000..2d0c647da7
--- /dev/null
+++ b/main/bacula/configure-detect-gcc.patch
@@ -0,0 +1,81 @@
+This fixes building with ccache
+http://bugs.bacula.org/view.php?id=2118
+
+diff --git a/autoconf/configure.in b/autoconf/configure.in
+index 47d45de..2a6a194 100644
+--- a/autoconf/configure.in
++++ b/autoconf/configure.in
+@@ -87,17 +87,6 @@ AC_PROG_CXX
+ AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
+ AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
+
+-BASECC=`basename $CC`
+-have_gcc=no
+-if test "x$BASECC" = xgcc; then
+- AC_DEFINE(HAVE_GCC)
+- have_gcc=yes
+-fi
+-AC_PATH_PROG(CXX, $CXX, $CXX)
+-if test ! -e $CXX; then
+- AC_MSG_ERROR(Unable to find C++ compiler)
+-fi
+-
+ dnl -------------------------------------------------------
+ dnl Check for programs.
+ dnl ------------------------------------------------------
+@@ -2854,10 +2843,18 @@ AC_DEFINE(FDLIBS)
+
+ CFLAGS=${CFLAGS--O}
+
+-if test x$have_gcc = xyes ; then
++dnl
++dnl Check if gcc
++dnl
++AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
++ #if !defined (__GNUC__)
++ #error "not gcc"
++ #endif
++ ]])], [
+ CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
+ CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
+-fi
++])
++
+ LDFLAGS=${LDFLAGS--O}
+ CPPFLAGS="$CPPFLAGS"
+ CFLAGS="$CFLAGS"
+diff --git a/src/findlib/file_attrs.c b/src/findlib/file_attrs.c
+index 9268ce1..42036bb 100644
+--- a/src/findlib/file_attrs.c
++++ b/src/findlib/file_attrs.c
+@@ -368,7 +368,7 @@ void encode_stat(char *buf, struct stat *statp, int stat_size, int32_t LinkFI, i
+ #ifdef HAVE_TYPEOF
+ #define plug(st, val) st = (typeof st)val
+ #else
+- #if !HAVE_GCC & HAVE_SUN_OS
++ #if !defined(__GNUC__) & HAVE_SUN_OS
+ /* Sun compiler does not handle templates correctly */
+ #define plug(st, val) st = val
+ #elif __sgi
+diff --git a/src/lib/bsys.c b/src/lib/bsys.c
+index 40e048e..f352db0 100644
+--- a/src/lib/bsys.c
++++ b/src/lib/bsys.c
+@@ -859,7 +859,7 @@ void allow_os_suspensions()
+ #endif
+
+
+-#if HAVE_BACKTRACE && HAVE_GCC
++#if HAVE_BACKTRACE && defined(__GNUC__)
+ #include <cxxabi.h>
+ #include <execinfo.h>
+ void stack_trace()
+@@ -910,6 +910,6 @@ void stack_trace()
+ }
+ actuallyfree(stack_strings); /* malloc()ed by backtrace_symbols */
+ }
+-#else /* HAVE_BACKTRACE && HAVE_GCC */
++#else /* HAVE_BACKTRACE && defined(__GNUC__) */
+ void stack_trace() {}
+-#endif /* HAVE_BACKTRACE && HAVE_GCC */
++#endif /* HAVE_BACKTRACE && defined(__GNUC__) */