pkgsrc-Changes archive

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

CVS commit: pkgsrc/math/nickle



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Sat Jun 17 11:25:19 UTC 2023

Modified Files:
        pkgsrc/math/nickle: Makefile distinfo
Added Files:
        pkgsrc/math/nickle/patches: patch-configure.ac patch-test_Makefile.am
Removed Files:
        pkgsrc/math/nickle/patches: patch-configure

Log Message:
math/nickle: Make this cross-compile.

While here, because for CC_FOR_BUILD it was easiest to just edit
configure.ac and autoreconf anyway, move a configure patch to a
configure.ac patch for some readline symbol detection.

No change to generated file math-tables.5c (which is used only for
testing anyway) in native vs cross compilation.  `bmake test' passes
in native compilation.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/math/nickle/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/math/nickle/distinfo
cvs rdiff -u -r1.1 -r0 pkgsrc/math/nickle/patches/patch-configure
cvs rdiff -u -r0 -r1.1 pkgsrc/math/nickle/patches/patch-configure.ac \
    pkgsrc/math/nickle/patches/patch-test_Makefile.am

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/nickle/Makefile
diff -u pkgsrc/math/nickle/Makefile:1.25 pkgsrc/math/nickle/Makefile:1.26
--- pkgsrc/math/nickle/Makefile:1.25    Thu Apr 20 11:12:15 2023
+++ pkgsrc/math/nickle/Makefile Sat Jun 17 11:25:19 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2023/04/20 11:12:15 tnn Exp $
+# $NetBSD: Makefile,v 1.26 2023/06/17 11:25:19 riastradh Exp $
 
 DISTNAME=      nickle-2.91
 CATEGORIES=    math lang
@@ -9,12 +9,20 @@ HOMEPAGE=     https://nickle.org/
 COMMENT=       Desk calculator language
 LICENSE=       mit
 
+USE_TOOLS+=    autoconf automake autoreconf
+TOOL_DEPENDS+= autoconf-archive>=0:../../devel/autoconf-archive
+
 GNU_CONFIGURE= yes
 
 # suppress detection of DOCBOOK
 CONFIGURE_ENV+=        ac_cv_path_DOCBOOK2PDF=
 
+CONFIGURE_ARGS+=CC_FOR_BUILD=${NATIVE_CC:Q}
+
 TEST_TARGET=   check
 
+pre-configure:
+       ${RUN} cd ${WRKSRC} && autoreconf -fi
+
 .include "../../mk/readline.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/math/nickle/distinfo
diff -u pkgsrc/math/nickle/distinfo:1.20 pkgsrc/math/nickle/distinfo:1.21
--- pkgsrc/math/nickle/distinfo:1.20    Thu Apr 20 11:10:26 2023
+++ pkgsrc/math/nickle/distinfo Sat Jun 17 11:25:19 2023
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.20 2023/04/20 11:10:26 tnn Exp $
+$NetBSD: distinfo,v 1.21 2023/06/17 11:25:19 riastradh Exp $
 
 BLAKE2s (nickle-2.91.tar.gz) = 0c68e83c11f48e370c413811804d20dd331ae08b003d65fd26ebded8b1a9d38f
 SHA512 (nickle-2.91.tar.gz) = 4741cdfad83c84da2c232b965cef52deb7c04f04db9ba1255d420ecd51ba63f9ad249e2e7b5ee4e0be855fdf611d5f5311f2c3cd6631f1211ce65d1e78b0d60f
 Size (nickle-2.91.tar.gz) = 2505408 bytes
 SHA1 (patch-aa) = 4cbb563244883f6c9f7a3594875052f8d9a9e9b3
 SHA1 (patch-builtin-date.c) = 1aa792b5a91f4b808208e73ee38bd539ab0c12fb
-SHA1 (patch-configure) = fbbe0e41f4b9b3617eeb77879623bcdd48864af2
+SHA1 (patch-configure.ac) = 72bf3392df432bc8cdbd36760aad254acf6fe699
 SHA1 (patch-float.c) = f157fc605b617e7b5bdaa192d48e679b596a9228
 SHA1 (patch-lex.c) = f9d5f3f282f97a94195730062525e9f6310bb316
 SHA1 (patch-main.c) = 3f6d009255cdf51d6e5dcfb8ae3c0d49f6991694
+SHA1 (patch-test_Makefile.am) = 17e54a0e2172b0fb65a3d8a8eb615d7cfab5efee

Added files:

Index: pkgsrc/math/nickle/patches/patch-configure.ac
diff -u /dev/null pkgsrc/math/nickle/patches/patch-configure.ac:1.1
--- /dev/null   Sat Jun 17 11:25:19 2023
+++ pkgsrc/math/nickle/patches/patch-configure.ac       Sat Jun 17 11:25:19 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-configure.ac,v 1.1 2023/06/17 11:25:19 riastradh Exp $
+
+Get native compiler for executable compiled and run at build-time.
+
+Add missing configure check for rl_echo_signal_char.
+
+--- configure.ac.orig  2023-04-18 19:55:55.000000000 +0000
++++ configure.ac
+@@ -17,6 +17,7 @@ AM_INIT_AUTOMAKE([foreign])
+ AC_SUBST([RELEASE_DATE])
+ dnl Checks for programs.
+ AC_PROG_CC
++AX_PROG_CC_FOR_BUILD
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AM_PROG_LEX
+@@ -117,6 +118,8 @@ if test "x$ac_cv_header_readline_readlin
+                 AC_DEFINE(HAVE_RL_RESET_AFTER_SIGNAL,1,[Has rl_reset_after_signal]),,[#include <readline/readline.h>])
+     AC_CHECK_DECL(rl_cleanup_after_signal,
+                 AC_DEFINE(HAVE_RL_CLEANUP_AFTER_SIGNAL,1,[Has rl_cleanup_after_signal]),,[#include <readline/readline.h>])
++    AC_CHECK_DECL(rl_echo_signal_char,
++                AC_DEFINE(HAVE_RL_ECHO_SIGNAL_CHAR,1,[Has rl_echo_signal_char]),,[#include <readline/readline.h>])
+ fi
+ 
+ if test "x$prefix" = xNONE; then
Index: pkgsrc/math/nickle/patches/patch-test_Makefile.am
diff -u /dev/null pkgsrc/math/nickle/patches/patch-test_Makefile.am:1.1
--- /dev/null   Sat Jun 17 11:25:19 2023
+++ pkgsrc/math/nickle/patches/patch-test_Makefile.am   Sat Jun 17 11:25:19 2023
@@ -0,0 +1,26 @@
+$NetBSD: patch-test_Makefile.am,v 1.1 2023/06/17 11:25:19 riastradh Exp $
+
+Use native compiler for executable compiled and run at build-time.
+
+--- test/Makefile.am.orig      2023-04-18 19:55:55.000000000 +0000
++++ test/Makefile.am
+@@ -27,7 +27,10 @@ testdir=$(pkgdatadir)/test
+ 
+ test_DATA=$(check_SCRIPTS) $(TABLES)
+ 
+-noinst_PROGRAMS=math-tables
++math-tables$(BUILD_EXEEXT): math-tables.o
++      $(CC_FOR_BUILD) -o $@ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) math-tables.o -lm
++math-tables.o: math-tables.c
++      $(CC_FOR_BUILD) -o $@ $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c math-tables.c
+ 
+ CLEANFILES=$(TABLES)
+ 
+@@ -39,5 +42,5 @@ EXTRA_DIST=$(check_SCRIPTS)
+ 
+ math.5c: $(TABLES)
+ 
+-$(TABLES): math-tables
+-      ./math-tables > $(TABLES)
++$(TABLES): math-tables$(BUILD_EXEEXT)
++      ./math-tables$(BUILD_EXEEXT) > $(TABLES)



Home | Main Index | Thread Index | Old Index