pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cross/xtensa-esp32-elf-binutils xtensa-esp32-elf-binut...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/79a57b42f76e
branches:  trunk
changeset: 376804:79a57b42f76e
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed Apr 13 23:09:09 2022 +0000

description:
xtensa-esp32-elf-binutils: convert to Makefile.common

so we can target esp32s2 and esp32s3 in companion packages

diffstat:

 cross/xtensa-esp32-elf-binutils/Makefile        |  41 +-------------------
 cross/xtensa-esp32-elf-binutils/Makefile.common |  48 +++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 38 deletions(-)

diffs (101 lines):

diff -r f46667690d00 -r 79a57b42f76e cross/xtensa-esp32-elf-binutils/Makefile
--- a/cross/xtensa-esp32-elf-binutils/Makefile  Wed Apr 13 22:02:36 2022 +0000
+++ b/cross/xtensa-esp32-elf-binutils/Makefile  Wed Apr 13 23:09:09 2022 +0000
@@ -1,42 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2022/04/13 21:02:33 tnn Exp $
-
-DISTNAME=      binutils-2.35.2
-PKGNAME=       ${DISTNAME:C/.*binutils(-gdb)?/xtensa-esp32-elf-binutils/}
-CATEGORIES=    cross
-MASTER_SITES=  ${MASTER_SITE_GNU:=binutils/}
-EXTRACT_SUFX=  .tar.xz
-# Espressif overlays
-DISTFILES=     ${DEFAULT_DISTFILES}
-DISTFILES+=    crosstool-NG-esp-2021r2-patch3.tar.gz
-SITES.crosstool-NG-esp-2021r2-patch3.tar.gz=   -https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/crosstool-NG-esp-2021r2-patch3.tar.gz
-
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      https://github.com/espressif/binutils-gdb
-COMMENT=       Cross binutils for Espressif ESP32 bare metal environment
-LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+# $NetBSD: Makefile,v 1.5 2022/04/13 23:09:09 tnn Exp $
 
-INFO_FILES=            yes
-GNU_CONFIGURE=         yes
-GNU_CONFIGURE_STRICT=  no # several sub-configures know --enable-nls
-USE_LIBTOOL=           yes
-USE_TOOLS+=            gmake makeinfo
-
-OBJDIR=                        ../build
-CONFIGURE_DIRS=                ${OBJDIR}
-CONFIGURE_SCRIPT=      ${WRKSRC}/configure
-GNU_CONFIGURE_PREFIX=  ${PREFIX}/xtensa-esp32-elf
+ESP32_TYPE=    esp32
 
-CONFIGURE_ARGS+=       --disable-werror
-CONFIGURE_ARGS+=       --target=xtensa-esp32-elf
-CONFIGURE_ARGS+=       --enable-multilib
-CONFIGURE_ARGS+=       --disable-nls
-CONFIGURE_ARGS+=       --disable-gdb
-
-post-extract:
-       ${CP} -r ${WRKDIR}/overlays/xtensa_esp32/binutils/. \
-           ${WRKSRC}/.
-
-pre-configure:
-       ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
+.include "Makefile.common"
 
 .include "../../mk/bsd.pkg.mk"
diff -r f46667690d00 -r 79a57b42f76e cross/xtensa-esp32-elf-binutils/Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/xtensa-esp32-elf-binutils/Makefile.common   Wed Apr 13 23:09:09 2022 +0000
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile.common,v 1.1 2022/04/13 23:09:09 tnn Exp $
+
+# used by cross/xtensa-esp32-elf-binutils/Makefile
+# used by cross/xtensa-esp32s2-elf-binutils/Makefile
+# used by cross/xtensa-esp32s3-elf-binutils/Makefile
+
+DISTNAME=      binutils-2.35.2
+PKGNAME=       ${DISTNAME:C/.*binutils(-gdb)?/xtensa-${ESP32_TYPE}-elf-binutils/}
+CATEGORIES=    cross
+MASTER_SITES=  ${MASTER_SITE_GNU:=binutils/}
+EXTRACT_SUFX=  .tar.xz
+# Espressif overlays
+DISTFILES=     ${DEFAULT_DISTFILES}
+DISTFILES+=    crosstool-NG-esp-2021r2-patch3.tar.gz
+SITES.crosstool-NG-esp-2021r2-patch3.tar.gz=   -https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/crosstool-NG-esp-2021r2-patch3.tar.gz
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/espressif/binutils-gdb
+COMMENT=       Cross binutils for Espressif ${ESP32_TYPE:tu} bare metal environment
+LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
+
+INFO_FILES=            yes
+GNU_CONFIGURE=         yes
+GNU_CONFIGURE_STRICT=  no # several sub-configures know --enable-nls
+USE_LIBTOOL=           yes
+USE_TOOLS+=            gmake makeinfo
+
+#PATCHDIR=     ${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/patches
+DISTINFO_FILE= ${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/distinfo
+DESCR_SRC=     ${.CURDIR}/../../cross/xtensa-esp32-elf-binutils/DESCR
+
+OBJDIR=                        ../build
+CONFIGURE_DIRS=                ${OBJDIR}
+CONFIGURE_SCRIPT=      ${WRKSRC}/configure
+GNU_CONFIGURE_PREFIX=  ${PREFIX}/xtensa-${ESP32_TYPE}-elf
+
+CONFIGURE_ARGS+=       --disable-werror
+CONFIGURE_ARGS+=       --target=xtensa-${ESP32_TYPE}-elf
+CONFIGURE_ARGS+=       --enable-multilib
+CONFIGURE_ARGS+=       --disable-nls
+CONFIGURE_ARGS+=       --disable-gdb
+
+post-extract:
+       ${CP} -r ${WRKDIR}/overlays/xtensa_${ESP32_TYPE}/binutils/. \
+           ${WRKSRC}/.
+
+pre-configure:
+       ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}



Home | Main Index | Thread Index | Old Index