diff options
author | Ryan Hill <dirtyepic@gentoo.org> | 2009-07-29 23:37:49 +0000 |
---|---|---|
committer | Ryan Hill <dirtyepic@gentoo.org> | 2009-07-29 23:37:49 +0000 |
commit | 07e8e36159d8d24e07d2c71b80e56cbfe49759bc (patch) | |
tree | 054decb5b88544ba72416586aca23395060ab260 /dev-util | |
parent | Respecting CC variable, closes bug #243948 (diff) | |
download | gentoo-2-07e8e36159d8d24e07d2c71b80e56cbfe49759bc.tar.gz gentoo-2-07e8e36159d8d24e07d2c71b80e56cbfe49759bc.tar.bz2 gentoo-2-07e8e36159d8d24e07d2c71b80e56cbfe49759bc.zip |
Fix build w/ glibc-2.10. (bug #274256)
Remove unicode USE flag - wxGTK-2.8 is always unicode, and configure
option was removed. Use emake install.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/codeblocks/ChangeLog | 10 | ||||
-rw-r--r-- | dev-util/codeblocks/codeblocks-8.02-r1.ebuild | 84 | ||||
-rw-r--r-- | dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch | 154 |
3 files changed, 247 insertions, 1 deletions
diff --git a/dev-util/codeblocks/ChangeLog b/dev-util/codeblocks/ChangeLog index 38553f38a8f4..27b6c23ac12b 100644 --- a/dev-util/codeblocks/ChangeLog +++ b/dev-util/codeblocks/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-util/codeblocks # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/codeblocks/ChangeLog,v 1.14 2009/02/12 04:42:37 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/codeblocks/ChangeLog,v 1.15 2009/07/29 23:37:49 dirtyepic Exp $ + +*codeblocks-8.02-r1 (29 Jul 2009) + + 29 Jul 2009; Ryan Hill <dirtyepic@gentoo.org> +codeblocks-8.02-r1.ebuild, + +files/codeblocks-8.02-gcc44.patch: + Fix build w/ glibc-2.10. (bug #274256) + Remove unicode USE flag - wxGTK-2.8 is always unicode, and configure + option was removed. Use emake install. 12 Feb 2009; Ryan Hill <dirtyepic@gentoo.org> +files/codeblocks-8.02-gcc43.patch, codeblocks-8.02.ebuild: diff --git a/dev-util/codeblocks/codeblocks-8.02-r1.ebuild b/dev-util/codeblocks/codeblocks-8.02-r1.ebuild new file mode 100644 index 000000000000..38c18af3b42b --- /dev/null +++ b/dev-util/codeblocks/codeblocks-8.02-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/codeblocks/codeblocks-8.02-r1.ebuild,v 1.1 2009/07/29 23:37:49 dirtyepic Exp $ + +inherit autotools wxwidgets flag-o-matic eutils + +WX_GTK_VER="2.8" + +DESCRIPTION="Free cross-platform C/C++ IDE" +HOMEPAGE="http://www.codeblocks.org/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +SRC_URI="mirror://sourceforge/codeblocks/${P}-src.tar.bz2" + +IUSE="contrib debug pch static" + +RDEPEND="=x11-libs/wxGTK-${WX_GTK_VER}* + x11-libs/gtk+" + +DEPEND="${RDEPEND} + >=sys-devel/autoconf-2.5.0 + >=sys-devel/automake-1.7 + >=sys-devel/libtool-1.4 + app-arch/zip" + +pkg_setup() { + need-wxwidgets unicode +} + +src_unpack() { + unpack ${A} + epatch "${FILESDIR}/${PV}-version.patch" + epatch "${FILESDIR}"/${P}-gcc43.patch + epatch "${FILESDIR}"/${P}-gcc44.patch + #epatch "${FILESDIR}/${PV}-install-plugins.patch" + cd "${S}" + find src/plugins -name Makefile.am -exec \ + sed -i -e 's#^libdir#pluginsdir#' \ + -e 's#^lib_LTLIBRARIES#plugins_LTLIBRARIES#' \ + '{}' \; + # This one's buggy + sed -i -e 's#^plugins_LTLIBRARIES#lib_LTLIBRARIES#' \ + src/plugins/contrib/wxSmith/Makefile.am + + eautoreconf || die "autoreconf failed" +# ./bootstrap || die "boostrap failed" +} + +src_compile() { + # C::B is picky on CXXFLAG -fomit-frame-pointer + # (project-wizard crash, instability ...) + filter-flags -fomit-frame-pointer + append-flags -fno-strict-aliasing + + cd "${S}" + local myconf="$(use_enable pch)" +# $(use_enable autosave) \ +# $(use_enable class-wizard) \ +# $(use_enable code-completion) \ +# $(use_enable compiler) \ +# $(use_enable debuger) \ +# $(use_enable mime-handler) \ +# $(use_enable open-files-list) \ +# +# $(use_enable projects-importer) \ +# $(use_enable source-formatter) \ +# $(use_enable todo) \ +# $(use_enable xpmanifest) + + if use contrib; then + myconf="${myconf} --with-contrib-plugins=all" + fi + econf --with-wx-config="${WX_CONFIG}" \ + --enable-dependency-tracking \ + $(use_enable debug) \ + $(use_enable static) \ + ${myconf} || die "Died in action: econf ..." + emake || die "Died in action: make ..." +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" +} diff --git a/dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch b/dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch new file mode 100644 index 000000000000..204c39e762ed --- /dev/null +++ b/dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch @@ -0,0 +1,154 @@ +diff -Naurp codeblocks-8.02-orig/src/src/prefix.cpp codeblocks-8.02/src/src/prefix.cpp +--- codeblocks-8.02-orig/src/src/prefix.cpp 2008-02-27 07:15:26.000000000 -0600 ++++ codeblocks-8.02/src/src/prefix.cpp 2009-07-29 17:05:52.797543317 -0600 +@@ -12,7 +12,7 @@ + * Written by: Mike Hearn <mike@theoretic.com> + * Hongli Lai <h.lai@chello.nl> + * http://autopackage.org/ +- * ++ * + * This source code is public domain. You can relicense this code + * under whatever license you want. + * +@@ -202,21 +202,20 @@ br_locate_prefix (void *symbol) + char * + br_prepend_prefix (void *symbol, char *path) + { +- char *tmp, *newpath; +- +- br_return_val_if_fail (symbol != NULL, (char*)NULL); +- br_return_val_if_fail (path != NULL, (char*)NULL); ++ br_return_val_if_fail (symbol != 0, (char*)0); ++ br_return_val_if_fail (path != 0, (char*)0); + +- tmp = br_locate_prefix (symbol); +- if (!tmp) return (char*)NULL; ++ char* tmp = br_locate_prefix (symbol); ++ if (!tmp) return (char*)0; + ++ char *newpath; + if (strcmp (tmp, "/") == 0) + newpath = strdup (path); + else + newpath = br_strcat (tmp, path); + + /* Get rid of compiler warning ("br_prepend_prefix never used") */ +- if (0) br_prepend_prefix (NULL, (char*)NULL); ++ if (0) br_prepend_prefix (0, (char*)0); + + free (tmp); + return newpath; +@@ -240,9 +239,7 @@ static pthread_once_t br_thread_key_once + static void + br_thread_local_store_fini () + { +- char *specific; +- +- specific = (char *) pthread_getspecific (br_thread_key); ++ char* specific = (char *) pthread_getspecific (br_thread_key); + if (specific) + { + free (specific); +@@ -301,11 +298,9 @@ const char * + br_thread_local_store (char *str) + { + #if BR_PTHREADS +- char *specific; +- + pthread_once (&br_thread_key_once, br_thread_local_store_init); + +- specific = (char *) pthread_getspecific (br_thread_key); ++ char* specific = (char *) pthread_getspecific (br_thread_key); + br_str_free (specific); + pthread_setspecific (br_thread_key, str); + +@@ -338,16 +333,13 @@ br_thread_local_store (char *str) + char * + br_strcat (const char *str1, const char *str2) + { +- char *result; +- size_t len1, len2; +- + if (!str1) str1 = ""; + if (!str2) str2 = ""; + +- len1 = strlen (str1); +- len2 = strlen (str2); ++ size_t len1 = strlen (str1); ++ size_t len2 = strlen (str2); + +- result = (char *) malloc (len1 + len2 + 1); ++ char* result = (char *) malloc (len1 + len2 + 1); + memcpy (result, str1, len1); + memcpy (result + len1, str2, len2); + result[len1 + len2] = '\0'; +@@ -360,16 +352,13 @@ br_strcat (const char *str1, const char + static char * + br_strndup (char *str, size_t size) + { +- char *result = (char *) NULL; +- size_t len; ++ br_return_val_if_fail (str != (char *) 0, (char *) 0); + +- br_return_val_if_fail (str != (char *) NULL, (char *) NULL); +- +- len = strlen (str); ++ size_t len = strlen (str); + if (!len) return strdup (""); + if (size > len) size = len; + +- result = (char *) calloc (sizeof (char), len + 1); ++ char* result = (char *) calloc (sizeof (char), len + 1); + memcpy (result, str, size); + return result; + } +@@ -389,16 +378,16 @@ br_strndup (char *str, size_t size) + char * + br_extract_dir (const char *path) + { +- char *end, *result; +- +- br_return_val_if_fail (path != (char *) NULL, (char *) NULL); ++ br_return_val_if_fail (path != (char *) 0, (char *) 0); + +- end = strrchr (path, '/'); ++ const char* end = strrchr (path, '/'); + if (!end) return strdup ("."); + + while (end > path && *end == '/') ++ { + end--; +- result = br_strndup ((char *) path, end - path + 1); ++ } ++ char* result = br_strndup ((char *) path, end - path + 1); + if (!*result) + { + free (result); +@@ -424,15 +413,13 @@ br_extract_dir (const char *path) + char * + br_extract_prefix (const char *path) + { +- char *end, *tmp, *result; +- +- br_return_val_if_fail (path != (char *) NULL, (char *) NULL); ++ br_return_val_if_fail (path != (char *) 0, (char *) 0); + + if (!*path) return strdup ("/"); +- end = strrchr (path, '/'); ++ const char* end = strrchr (path, '/'); + if (!end) return strdup (path); + +- tmp = br_strndup ((char *) path, end - path); ++ char* tmp = br_strndup ((char *) path, end - path); + if (!*tmp) + { + free (tmp); +@@ -441,7 +428,7 @@ br_extract_prefix (const char *path) + end = strrchr (tmp, '/'); + if (!end) return tmp; + +- result = br_strndup (tmp, end - tmp); ++ char* result = br_strndup (tmp, end - tmp); + free (tmp); + + if (!*result) |