From cc83ac38154440239f732731b8df86ce322c615e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 14 Nov 2023 22:34:48 +0000 Subject: gentoo auto-resync : 14:11:2023 - 22:34:48 --- dev-embedded/Manifest.gz | Bin 9234 -> 9234 bytes dev-embedded/sdcc/Manifest | 5 + dev-embedded/sdcc/files/binutils-2.41-acinclude.m4 | 193 +++++++++++++++++++++ .../files/sdcc-4.3.0-autoreconf-libiberty.patch | 15 ++ .../files/sdcc-4.3.0-fix-binutils-dependency.patch | 22 +++ .../files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch | 13 ++ dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild | 174 +++++++++++++++++++ 7 files changed, 422 insertions(+) create mode 100644 dev-embedded/sdcc/files/binutils-2.41-acinclude.m4 create mode 100644 dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch create mode 100644 dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch create mode 100644 dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch create mode 100644 dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild (limited to 'dev-embedded') diff --git a/dev-embedded/Manifest.gz b/dev-embedded/Manifest.gz index a3378b92875b..fea192618a8f 100644 Binary files a/dev-embedded/Manifest.gz and b/dev-embedded/Manifest.gz differ diff --git a/dev-embedded/sdcc/Manifest b/dev-embedded/sdcc/Manifest index 75a8a0757887..18a97df0add9 100644 --- a/dev-embedded/sdcc/Manifest +++ b/dev-embedded/sdcc/Manifest @@ -1,5 +1,9 @@ +AUX binutils-2.41-acinclude.m4 5461 BLAKE2B f34cb039e2d457facb8e234af8ade360e440cf84ace8b113a81e9f6f958858acc4dc7bd21db3f6d8628d41dce149f9d42301f14f946f9667380a772f50f3c920 SHA512 e011d0bc2afb9bb11b34289eab00cc18d1e82ab004e83a0203d5da62a76c212aae2bf2755978601cd8efeebf625c3db97920078f357f36991f0ce23a876cabf9 AUX sdcc-3.8.0-override-override.patch 1078 BLAKE2B f1e1e135b9ee972e8f7f6a08af736de227c8534d181f160b00f6eecef0e7f4366e39fc5a8f6034bfffa64531423d28377c778055d6be8671527971ce183ebab5 SHA512 fbc13832bea859409f2ae525a82927424dd474db9c6077d1311b9775d0a4a8728d79db7465c928271faa54221b53982ee539537e4fe8a70209c0f453b95105aa AUX sdcc-4.2.0-link-tinfo.patch 916 BLAKE2B 7930cf615dbf0be6f44581e0e59d5c8ed59d5ae204153b2b08a2bfb6af8ef69b01fa1584c95dc194881d843edad8bc39dc85ca8b597e120828e49ae30b2c6c74 SHA512 b4ab00ed63be3dad5c0250ce8cd3301830ac2a65f4b8d9034151e285b93057357249a19b9d521f1cfd62173d97baa37a69c7e56d1b0423f9edc2e84b368fcad5 +AUX sdcc-4.3.0-autoreconf-libiberty.patch 696 BLAKE2B 9dce6aca61d3d1f9229c1a13549a5584c48c28a19146215c24a97aebca5bb5c9f74517da2622ea3f86e19e8281fdcbe85a14f7a11fe036e877c1f6de7db5cad7 SHA512 a5408bc3913372327e3bae75cdc57e5765cd3369863fe9d92cd43f9fa6de1c2293ac647231391fda7f5ec0a3c1587a5b44dd228c25ee528da8d9c7b68f29de42 +AUX sdcc-4.3.0-fix-binutils-dependency.patch 569 BLAKE2B 185f644a2c68c9eece5dc37cad9543a86688eea16e80c1ff1460020545404604c2d6870b6a6559b55e4259a3db51dd1ccfb8f2430d8dafffa56ed48bbe3248da SHA512 cd3f2a72c8e3ec5aae9e8473fc11ef8862134ebe9857fa176110918a89fbd8b6b8388533ae4877ade4746518e0d420afab5530c6cf3da6be93940a206e6befe7 +AUX sdcc-4.3.0-fix-mkdir-autoconf-test.patch 395 BLAKE2B 5c509a0f7a4e201c03fd6c7fbed3c95287896acbbb733c7dbd8ae6d3dbd79bcbd795eeb020ef9c11910f01854a6b0746e82cdca6a372ed36c1dfc436562e83d5 SHA512 33184762ca7197eef5724f9c23dacc90081b5f320f773f30e844d1263d7e3b7f2e9812da5832772c56094d226617b12028ce152a1ce69d3156e06fd63af30d1a AUX sdcc-4.3.2-override-override.patch 2178 BLAKE2B 7c60caeb0fb948230f7397b6da6b2b5c7c9f49cfb3679316821db7a5a34deda205deec0957696a4bc5e99007fd1b2527c41f1680e20dbb226e83b948333f8765 SHA512 d958b4691e291c70b2d1b994e39d799a69c65f5d76476d86f29bbdd4e938dded4188b352fab371a24f0c15dc7d89cc7b0f2007b7fbb4ae9802198f7bf8d78f6b DIST sdcc-doc-3.8.0.tar.bz2 965465 BLAKE2B 541ed3ba4d3a23dd3fcea248de84d887fdcd8ddaf3ed0f9f810bf8cb9fcb5b10eb2cd96099d83c5a0fda240cdd3d11fd247e576a67a32047a4f7a705b8401637 SHA512 63319b7c344b320600e6a7c158d1a5e69abe595dfd6b8d32a95f15678c3bc2f6fe72c959516c4b1f812deb089854c6a51c31438ef6a6c7f9fcb4d419d8cce3cf DIST sdcc-doc-4.0.0.tar.bz2 980999 BLAKE2B 6f9478c095e6b4fec27c6ab7a10a8564ae46d754709848b3a7a26a7a2dfecd3833ce3cfe7a41f9033b5a34a1b6e962090d91c9688294dd347e1c98658761c019 SHA512 83bed77b46ad2f028725a3ffe6090d71185f73d4e99c241e7ebd1c509ba1be1911f4b9130c344fa4eb928f48122179b6b71e9d5a27d9f18ff74017c61fae77ff @@ -15,6 +19,7 @@ EBUILD sdcc-3.8.0-r1.ebuild 3187 BLAKE2B abf55593b8719c6812794e47d6c37e50d8d2abf EBUILD sdcc-4.0.0.ebuild 3470 BLAKE2B 504b81f7edc8364dfec17ec35f21825507026d676701d4dacd0df2f3a6f4be22062fb64c1b3e70ce35714c33eacce56081e5ac982c5669814ec7b72423657979 SHA512 1c698e39c4b2c2f57b191b59ac14cf21a9630c471dd8a14723f822a07f29e22ff21955249fff83145f6f242b513f3413d57034e67bfa8e1935ee0310a026d3a6 EBUILD sdcc-4.1.0.ebuild 3626 BLAKE2B a1752f8387a6a45ee1490e74f7e9ed72d48a86a60041df25bee11d17b1b3b584cdf8712bba212fb44bd947855838a27f654304360598fe1cf24f2a6acf3472d8 SHA512 9e0a938dbbacd7f9b2b4b1abd126c84b19e9092697c2423aef626fff45e595ef394e0811003ba17f70c98a7428febf605a36f2937c849b7b816959ee694d5a11 EBUILD sdcc-4.2.0.ebuild 4001 BLAKE2B 0a388266abb18684d2d902f237e289dc4f51fdce4ff2d5be18d2b7636d6064bd3ce55ed52472775055f56041d0bda2d2c7ff8c28e5323bbaad96f1a88459c2ee SHA512 a7af83c54fc8dac1e1a9ea77de587ff90b72608cbd2ea1bd96494462a496f65fff5d33f6f706ca5bc8332cf8d204699dee33e93cdbd245e69128d3e462043c2f +EBUILD sdcc-4.3.0-r1.ebuild 4714 BLAKE2B af69b3087fa561b66874c4e9b6c678b5325ff1e001228cb2487523d049ab8020a7b7a7dab7d2dee973c440d9b94805fe9723612cd1be6748b17e1368fcc6864a SHA512 1baf038a94338f431bae13987e2f550b1349d9e002953ea7d01e5775d35b4eccc190a8d0282d1b2f1f7fac2ab71552585813002800316a21de7d9ded1d31a20d EBUILD sdcc-4.3.0.ebuild 4048 BLAKE2B 0c9dc8f7184c93edacfdcf12c8f980b08ff9b8715bc98f8038b2181fbbbdd093e377885677ffdb5f465fb0596b5eda5dbde5955f6727238c59f552fc8c561cd8 SHA512 b949ec05dfd0c099892bb2f24ff78b54ff9019fcc0f71da9ce2182bbebc11656fac7b2a8843ead01fef816e5be23a689864f3afb4034d53a8b9bd840b4c5eb60 EBUILD sdcc-9999.ebuild 4005 BLAKE2B d318b27b476bfcc240813dce6f29289c6b33a4a15407cfcb6e30d15c12e2b52a4a26bee4b9071798966dbef437125faf1533901847627a82e291a474704fe45e SHA512 39585b4a8b344307a355ffc73002547c7a6f214bfb5b3d7e98ff2ba21a9d4952d619353c0fe6a2b278e119e82de44ea2a0e61f9ef1f7cbb1ed3977f887bd05c8 MISC metadata.xml 3045 BLAKE2B 02b5834889994a4b1426244e087a7593b29de3ac0c29004492e4f466c76980fd448c15258d0bd29cddfd691a5f78ba653fea1bc1f42ad4d5b31afb83ad403b3e SHA512 55ecbf5774eb8b58304d97db64875984d4e016e9ba0476d4a5df94dca28baed1bd4eeead7e54885a33d9b9bd1ebbcb47846ac99f62fca3f11adb03d68880da47 diff --git a/dev-embedded/sdcc/files/binutils-2.41-acinclude.m4 b/dev-embedded/sdcc/files/binutils-2.41-acinclude.m4 new file mode 100644 index 000000000000..03bc955c619b --- /dev/null +++ b/dev-embedded/sdcc/files/binutils-2.41-acinclude.m4 @@ -0,0 +1,193 @@ +dnl Copyright (C) 2000-2023 Free Software Foundation, Inc. +dnl +dnl GCC is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3, or (at your option) +dnl any later version. +dnl +dnl GCC is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with GCC; see the file COPYING3. If not see +dnl . + +dnl See whether strncmp reads past the end of its string parameters. +dnl On some versions of SunOS4 at least, strncmp reads a word at a time +dnl but erroneously reads past the end of strings. This can cause +dnl a SEGV in some cases. +AC_DEFUN([libiberty_AC_FUNC_STRNCMP], +[AC_REQUIRE([AC_FUNC_MMAP]) +AC_CACHE_CHECK([for working strncmp], ac_cv_func_strncmp_works, +[AC_TRY_RUN([ +/* Test by Jim Wilson and Kaveh Ghazi. + Check whether strncmp reads past the end of its string parameters. */ +#include +#include +#include + +#ifdef HAVE_FCNTL_H +#include +#endif + +#ifdef HAVE_SYS_MMAN_H +#include +#endif + +#ifndef MAP_ANON +#ifdef MAP_ANONYMOUS +#define MAP_ANON MAP_ANONYMOUS +#else +#define MAP_ANON MAP_FILE +#endif +#endif + +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif +#ifndef O_RDONLY +#define O_RDONLY 0 +#endif + +#define MAP_LEN 0x10000 + +int +main (void) +{ +#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) + char *p; + int dev_zero; + + dev_zero = open ("/dev/zero", O_RDONLY); + if (dev_zero < 0) + exit (1); + + p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE, dev_zero, 0); + if (p == (char *)-1) + p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_PRIVATE, -1, 0); + if (p == (char *)-1) + exit (2); + else + { + char *string = "__si_type_info"; + char *q = (char *) p + MAP_LEN - strlen (string) - 2; + char *r = (char *) p + 0xe; + + strcpy (q, string); + strcpy (r, string); + strncmp (r, q, 14); + } +#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ + exit (0); +} +], ac_cv_func_strncmp_works=yes, ac_cv_func_strncmp_works=no, + ac_cv_func_strncmp_works=yes) +rm -f core core.* *.core]) +if test $ac_cv_func_strncmp_works = no ; then + AC_LIBOBJ([strncmp]) +fi +]) + +dnl See if errno must be declared even when is included. +AC_DEFUN([libiberty_AC_DECLARE_ERRNO], +[AC_CACHE_CHECK(whether errno must be declared, libiberty_cv_declare_errno, +[AC_TRY_COMPILE( +[#include ], +[int x = errno;], +libiberty_cv_declare_errno=no, +libiberty_cv_declare_errno=yes)]) +if test $libiberty_cv_declare_errno = yes +then AC_DEFINE(NEED_DECLARATION_ERRNO, 1, + [Define if errno must be declared even when is included.]) +fi +]) + +dnl See whether we need a declaration for a function. +AC_DEFUN([libiberty_NEED_DECLARATION], +[AC_MSG_CHECKING([whether $1 must be declared]) +AC_CACHE_VAL(libiberty_cv_decl_needed_$1, +[AC_TRY_COMPILE([ +#include "confdefs.h" +#include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif], +[char *(*pfn) = (char *(*)) $1], +libiberty_cv_decl_needed_$1=no, libiberty_cv_decl_needed_$1=yes)]) +AC_MSG_RESULT($libiberty_cv_decl_needed_$1) +if test $libiberty_cv_decl_needed_$1 = yes; then + AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1, + [Define if $1 is not declared in system header files.]) +fi +])dnl + +# We always want a C version of alloca() compiled into libiberty, +# because native-compiler support for the real alloca is so !@#$% +# unreliable that GCC has decided to use it only when being compiled +# by GCC. This is the part of AC_FUNC_ALLOCA that calculates the +# information alloca.c needs. +AC_DEFUN([libiberty_AC_FUNC_C_ALLOCA], +[AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray, +[AC_EGREP_CPP(webecray, +[#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif +], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, + [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, + [Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP + systems. This function is required for alloca.c support on those + systems.]) break]) + done +fi + +AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +[AC_TRY_RUN([#include + +int +find_stack_direction (void) +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main (void) +{ + exit (find_stack_direction() < 0); +}], + ac_cv_c_stack_direction=1, + ac_cv_c_stack_direction=-1, + ac_cv_c_stack_direction=0)]) +AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction, + [Define if you know the direction of stack growth for your system; + otherwise it will be automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown]) +]) diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch new file mode 100644 index 000000000000..7383f471ca48 --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-autoreconf-libiberty.patch @@ -0,0 +1,15 @@ +Most implicit function declarations left come from the included libiberty. +Add it to eautoreconf to regenerate its tests. +https://bugs.gentoo.org/898594 + +--- a/configure.ac ++++ b/configure.ac +@@ -874,7 +874,7 @@ + test $OPT_DISABLE_PACKIHX = 0 && AC_CONFIG_SUBDIRS(support/packihx) + test $OPT_DISABLE_UCSIM = 0 && AC_CONFIG_SUBDIRS(sim/ucsim) + test $OPT_DISABLE_SDCDB = 0 && AC_CONFIG_SUBDIRS(debugger/mcs51) +-test $OPT_DISABLE_SDBINUTILS = 0 && AC_CONFIG_SUBDIRS(support/sdbinutils) ++test $OPT_DISABLE_SDBINUTILS = 0 && AC_CONFIG_SUBDIRS(support/sdbinutils support/sdbinutils/libiberty) + AC_CONFIG_FILES([doc/Makefile]) + + ####test $OPT_DISABLE_AVR = 0 && AC_CONFIG_FILES([src/avr/Makefile]) diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch new file mode 100644 index 000000000000..cae5ebe473ed --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-binutils-dependency.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/917114 +https://sourceforge.net/p/sdcc/support-requests/193/ + +--- sdcc/Makefile.in ++++ sdcc/Makefile.in +@@ -98,7 +98,6 @@ + ifeq ($(OPT_DISABLE_SDBINUTILS), 0) + TARGETS += sdcc-sdbinutils + PKGS += $(SDCC_SDBINUTILS) +-SDBINUTILS_BINS = sdar$(EXEEXT) sdranlib$(EXEEXT) sdnm$(EXEEXT) sdobjcopy$(EXEEXT) + SDCC_BINUTILS = sdcc-sdbinutils + endif + +@@ -142,7 +141,7 @@ + + tini: checkconf sdcc-tini + +-sdcc-libs: ${SDCC_SDBINUTILS} ++sdcc-libs: ${SDCC_BINUTILS} + for lib in $(SDCC_LIBS); do $(MAKE) -C $$lib; done + + sdcc-cc: sdcc-libs diff --git a/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch new file mode 100644 index 000000000000..9a0be653ba28 --- /dev/null +++ b/dev-embedded/sdcc/files/sdcc-4.3.0-fix-mkdir-autoconf-test.patch @@ -0,0 +1,13 @@ +Fix implicit function declaration in configure logs: mkdir +https://bugs.gentoo.org/898594 + +--- a/support/cpp/configure.ac ++++ b/support/cpp/configure.ac +@@ -2317,6 +2317,7 @@ + ################################################################################ + + # mkdir takes a single argument on some systems. ++AC_CHECK_HEADERS([sys/stat.h]) + gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG + + # File extensions diff --git a/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild b/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild new file mode 100644 index 000000000000..6bfa58b9f7e7 --- /dev/null +++ b/dev-embedded/sdcc/sdcc-4.3.0-r1.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +if [[ ${PV} == "9999" ]] ; then + ESVN_REPO_URI="https://svn.code.sf.net/p/sdcc/code/trunk/sdcc" + inherit subversion +else + SRC_URI=" + https://downloads.sourceforge.net/project/${PN}/sdcc/${PV}/${PN}-src-${PV}.tar.bz2 + doc? ( https://downloads.sourceforge.net/project/${PN}/sdcc-doc/${PV}/${PN}-doc-${PV}.tar.bz2 ) + " + + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Small device C compiler (for various microprocessors)" +HOMEPAGE="https://sdcc.sourceforge.net/" + +LICENSE=" + GPL-2 ZLIB + non-free? ( MicroChip-SDCC ) + packihx? ( public-domain ) +" +SLOT="0" +# in order of configure.ac's AC_DO_PORT stanzas +SDCC_PORTS=" + mcs51 + z80 z180 + r2k r2ka r3ka + sm83 + tlcs90 + ez80-z80 + z80n + ds390 ds400 + pic14 pic16 + hc08 + s08 + stm8 + pdk13 pdk14 pdk15 pdk16 + mos6502 mos65c02 +" +IUSE=" + ${SDCC_PORTS} + +boehm-gc device-lib doc non-free packihx sdcdb +sdcpp ucsim +" + +RDEPEND=" + dev-libs/boost:= + sys-libs/zlib:= + pic14? ( >=dev-embedded/gputils-0.13.7 ) + pic16? ( >=dev-embedded/gputils-0.13.7 ) + boehm-gc? ( dev-libs/boehm-gc:= ) + sdcdb? ( sys-libs/readline:0= ) + ucsim? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} + dev-util/gperf +" +PATCHES=( + "${FILESDIR}"/sdcc-4.3.2-override-override.patch + "${FILESDIR}"/sdcc-4.2.0-link-tinfo.patch + "${FILESDIR}"/${P}-fix-binutils-dependency.patch + "${FILESDIR}"/${P}-fix-mkdir-autoconf-test.patch + "${FILESDIR}"/${P}-autoreconf-libiberty.patch +) + +src_prepare() { + # Fix conflicting variable names between Gentoo and sdcc + find device/lib/pic{14,16} device/non-free/lib/pic{14,16} \( \ + -name 'configure.ac' -o -name 'Makefile.*' \) \ + -exec sed -i 's/\/SDCC_&/g' {} + || die + find device -name 'Makefile.in' \ + -exec sed -i 's/\/SDCC_&/g' {} + || die + # Possible alternative: Patch the following files to not pick up the + # variables from the environment: + # - lib/Makefile.in (PORTDIR ifndef/endif) + # - device/non-free/lib/pic14/Makefile.common.in (ARCH ?= 877) + # - device/non-free/lib/pic16/configure.ac (${ARCH:-18f452}) + # - device/lib/pic14/configure.ac (${ARCH:-16f877}) + # - device/lib/pic16/configure.ac (${ARCH:-18f452}) + + # Make sure timestamps don't get messed up. + [[ ${PV} == "9999" ]] && find "${S}" -type f -exec touch -r . {} + + + mkdir -p support/sdbinutils/bfd/doc || die + + # add acinclude.m4 from binutils to run autoreconf for libiberty + cp "${FILESDIR}"/binutils-2.41-acinclude.m4 support/sdbinutils/libiberty/acinclude.m4 || die + # libiberty configure will check this file and fail if not found + cp install-sh support/sdbinutils/libiberty/ || die + # libiberty configure will fail if this was not set + export libiberty_topdir="${S}"/support/sdbinutils/libiberty + + default + eautoreconf + + # Avoid 'bfd.info' rebuild with 'makeinfo': bug #705424 + # Build dependencies are: eautoreconf->Makefile.in->bfdver.texi->bfd.info + touch support/sdbinutils/bfd/doc/bfdver.texi || die + touch support/sdbinutils/bfd/doc/bfd.info || die +} + +src_configure() { + local myeconfargs=( + ac_cv_prog_STRIP=true + --without-ccache + --enable-sdbinutils + + $(use_enable ucsim) + $(use_enable device-lib) + $(use_enable packihx) + $(use_enable sdcpp) + $(use_enable sdcdb) + $(use_enable non-free) + $(use_enable boehm-gc libgc) + + $(use_enable mcs51 mcs51-port) + $(use_enable z80 z80-port) + $(use_enable z180 z180-port) + $(use_enable r2k r2k-port) + $(use_enable r2ka r2ka-port) + $(use_enable r3ka r3ka-port) + $(use_enable sm83 sm83-port) + $(use_enable tlcs90 tlcs90-port) + $(use_enable ez80-z80 ez80_z80-port) + $(use_enable z80n z80n-port) + $(use_enable ds390 ds390-port) + $(use_enable ds400 ds400-port) + $(use_enable pic14 pic14-port) + $(use_enable pic16 pic16-port) + $(use_enable hc08 hc08-port) + $(use_enable s08 s08-port) + $(use_enable stm8 stm8-port) + $(use_enable pdk13 pdk13-port) + $(use_enable pdk14 pdk14-port) + $(use_enable pdk15 pdk15-port) + $(use_enable pdk16 pdk16-port) + $(use_enable mos6502 mos6502-port) + $(use_enable mos65c02 mos65c02-port) + ) + econf "${myeconfargs[@]}" + + # this does not build: https://sourceforge.net/p/sdcc/bugs/3673/ + # disable for now + rm device/lib/mos65c02/Makefile || die +} + +src_compile() { + default + + # Sanity check, as gputils errors/segfaults don't cause make to stop + local libs=() + use pic14 && libs+=( device/lib/build/pic14/libsdcc.lib ) + use pic16 && libs+=( device/lib/build/pic16/libsdcc.lib ) + for lib in "${libs[@]}"; do + [[ -f "${lib}" ]] || die "Failed to build ${lib}" + done +} + +src_install() { + default + dodoc doc/*.txt + find "${ED}" -type d -name .deps -exec rm -vr {} + || die + + if use doc && [[ ${PV} != "9999" ]]; then + cd "${WORKDIR}"/doc + dodoc -r * + fi +} -- cgit v1.2.3