pkgsrc-Changes archive

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

CVS commit: pkgsrc/math/sc-im



Module Name:    pkgsrc
Committed By:   vins
Date:           Thu Feb 13 16:43:50 UTC 2025

Modified Files:
        pkgsrc/math/sc-im: Makefile distinfo options.mk
        pkgsrc/math/sc-im/patches: patch-src_Makefile

Log Message:
math/sc-im: update to 0.8.4

# pkgsrc changes
* make threads and x11 support opt-in
* do not require bison
* fix Lua detection from pkg-config
* package builds fine with lua54: use LUA_PACKAGE

# upstream changes
v0.8.4

06/12/2023: :datefmt does not remove text content anymore
        allowing future edition - work on item 3 of issue 769
06/11/2023: avoid changing cell's color after :format - issue 819
06/11/2023: avoid blanking cell's text content after :datefmt
06/10/2023: fix number 2 of issue 769
06/02/2023: fix configuration variable name in file.c:
        import_delimited_to_text
06/01/2023: restore transpose
06/01/2023: added input_edit_mode setting PR 626
06/01/2023: work on issue 708: xlsx file import
06/01/2023: Fix issue 784: get row number and column or cell that calls
        a LUA script with PR 814.
06/01/2023: merged PR 783 that gets rid of issue 778 - changed load_rc
        load_file order.06/01/2023: merged PR 776
06/01/2023: merged PR 789
06/01/2023: fix issue in csv import - 816
02/03/2024: fix issue 868
17/05/2024: fix missing include
20/05/2024: PR 871
02/07/2024: Modify Makefile to work with brew's ncurses
10/07/2024: PR 880 / 861
16/07/2024: work on issue 878
23/07/2024: work on issue 875 / 879


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 pkgsrc/math/sc-im/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/math/sc-im/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/math/sc-im/options.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/math/sc-im/patches/patch-src_Makefile

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

Modified files:

Index: pkgsrc/math/sc-im/Makefile
diff -u pkgsrc/math/sc-im/Makefile:1.54 pkgsrc/math/sc-im/Makefile:1.55
--- pkgsrc/math/sc-im/Makefile:1.54     Thu Feb 13 11:55:27 2025
+++ pkgsrc/math/sc-im/Makefile  Thu Feb 13 16:43:50 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.54 2025/02/13 11:55:27 sjmulder Exp $
+# $NetBSD: Makefile,v 1.55 2025/02/13 16:43:50 vins Exp $
 
-DISTNAME=      sc-im-0.8.3
-PKGREVISION=   10
+DISTNAME=      sc-im-0.8.4
 CATEGORIES=    math
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=andmarti1424/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -17,7 +16,7 @@ INSTALL_DIRS= src
 .include "../../mk/bsd.prefs.mk"
 
 # pkg-config to avoid broken Makefile self-configuration
-USE_TOOLS+=    gmake pkg-config bison bash:run
+USE_TOOLS+=    gmake pkg-config yacc sed bash:run
 
 # error: 'for' loop initial declarations are only allowed in C99 mode
 FORCE_C_STD=   c99
@@ -31,15 +30,18 @@ CFLAGS+=    -D_XOPEN_SOURCE
 # formats/ods.c forgets to include some header(s), fixed in 0.8.4
 CFLAGS+=       -Wno-error=implicit-function-declaration
 
+SUBST_CLASSES+=                pkgsrc
+SUBST_STAGE.pkgsrc=    pre-configure
+SUBST_FILES.pkgsrc=    src/Makefile
+SUBST_VARS.pkgsrc=     CC PREFIX PKGMANDIR SED YACC
+SUBST_MESSAGE.pkgsrc=  Replacing pkgsrc placeholders
+
 MAKE_ENV+=     CFLAGS_CURSES=${BUILDLINK_CFLAGS.ncurses:Q}
 MAKE_ENV+=     LDLIBS_CURSES=${BUILDLINK_LDADD.ncurses:Q}
 MAKE_ENV+=     CFLAGS_DL=${BUILDLINK_CFLAGS.dl:Q}
 MAKE_ENV+=     LDLIBS_DL=${BUILDLINK_LDADD.dl:Q}
 MAKE_ENV+=     LDLIBS=${LDLIBS:Q}
 
-MAKE_FLAGS+=   prefix=${PREFIX}
-MAKE_FLAGS+=   MANDIR=${PREFIX}/${PKGMANDIR}/man1
-
 .include "options.mk"
 
 # tries to access internal cchar_t struct, incompatible with

Index: pkgsrc/math/sc-im/distinfo
diff -u pkgsrc/math/sc-im/distinfo:1.7 pkgsrc/math/sc-im/distinfo:1.8
--- pkgsrc/math/sc-im/distinfo:1.7      Wed Apr 19 13:38:53 2023
+++ pkgsrc/math/sc-im/distinfo  Thu Feb 13 16:43:50 2025
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.7 2023/04/19 13:38:53 sjmulder Exp $
+$NetBSD: distinfo,v 1.8 2025/02/13 16:43:50 vins Exp $
 
-BLAKE2s (sc-im-0.8.3.tar.gz) = 8b541d5b13b6f0e75f28ee2a6f44908e07c471cb7c260d7014ba3e655ba1bc36
-SHA512 (sc-im-0.8.3.tar.gz) = a3d7cf99c7c959d24ebf7e525abb665c02690674c9b3cdf5b234dcdb376fd73e9488bda522106802932084bbfd239928e39b35743c7051178aa14edf61ec2cb8
-Size (sc-im-0.8.3.tar.gz) = 1664440 bytes
-SHA1 (patch-src_Makefile) = d75c6716d96aae6c28e1cbedf30dc4b3d4167eac
+BLAKE2s (sc-im-0.8.4.tar.gz) = c8ede8331995e70853d95924dd46640845af196561dfe34584fecf37f6fd605e
+SHA512 (sc-im-0.8.4.tar.gz) = 8cbd701569f13285d6cb630e239a4fab5673dd886e069561552e1be40d08179ebad15c3dd72dfb232d2575e21a08e0499b1993cf361c536792c2951d00d712a6
+Size (sc-im-0.8.4.tar.gz) = 1672884 bytes
+SHA1 (patch-src_Makefile) = cbc4b7c54d56abc62ae1148c982b6845de006ed8

Index: pkgsrc/math/sc-im/options.mk
diff -u pkgsrc/math/sc-im/options.mk:1.4 pkgsrc/math/sc-im/options.mk:1.5
--- pkgsrc/math/sc-im/options.mk:1.4    Mon Jul 26 01:03:28 2021
+++ pkgsrc/math/sc-im/options.mk        Thu Feb 13 16:43:50 2025
@@ -1,9 +1,17 @@
-# $NetBSD: options.mk,v 1.4 2021/07/26 01:03:28 sjmulder Exp $
+# $NetBSD: options.mk,v 1.5 2025/02/13 16:43:50 vins Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.sc-im
-PKG_SUPPORTED_OPTIONS+=        color xls xlsx lua
+PKG_SUPPORTED_OPTIONS+=        color xls xlsx lua threads x11
 PKG_SUGGESTED_OPTIONS+=        color xls xlsx lua
 
+CHECK_BUILTIN.pthread:= yes
+.include "../../mk/pthread.builtin.mk"
+CHECK_BUILTIN.pthread:= no
+
+.if ${USE_BUILTIN.pthread:tl} == yes
+PKG_SUGGESTED_OPTIONS+=        threads
+.endif
+
 .include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mcolor)
@@ -25,5 +33,22 @@ LDLIBS+=     -lxlsxwriter -lcrypto -lminizip
 .endif
 
 .if !empty(PKG_OPTIONS:Mlua)
-.include "../../lang/lua51/buildlink3.mk"
+MAKE_ENV+=   LUA_PKGNAME=${LUA_PACKAGE:S/lua/lua-/:S/5/5./}
+.include "../../lang/lua/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mthreads)
+.  include "../../mk/pthread.buildlink3.mk"
+PTHREAD_AUTO_VARS=      yes
+PTHREAD_OPTS+=          require
+CFLAGS+=               -DHAVE_PTHREAD
+.endif
+
+.if !empty(PKG_OPTIONS:Mx11)
+DEPENDS+=      xclip-[0-9]*:../../x11/xclip
+CFLAGS+=       -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
+CFLAGS+=       -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
+.else
+CFLAGS+=       -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
+CFLAGS+=       -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
 .endif

Index: pkgsrc/math/sc-im/patches/patch-src_Makefile
diff -u pkgsrc/math/sc-im/patches/patch-src_Makefile:1.4 pkgsrc/math/sc-im/patches/patch-src_Makefile:1.5
--- pkgsrc/math/sc-im/patches/patch-src_Makefile:1.4    Wed Apr 19 13:38:54 2023
+++ pkgsrc/math/sc-im/patches/patch-src_Makefile        Thu Feb 13 16:43:50 2025
@@ -1,11 +1,41 @@
-$NetBSD: patch-src_Makefile,v 1.4 2023/04/19 13:38:54 sjmulder Exp $
+$NetBSD: patch-src_Makefile,v 1.5 2025/02/13 16:43:50 vins Exp $
 
 - Make libdl and curses flags overridable
-- Make color support opt in so we can control it
+- Make color, threads and x11 support opt in so we can control it
 - Remove hardcoded paths for NetBSD
 
---- src/Makefile.orig  2023-01-12 17:57:03.000000000 +0000
+--- src/Makefile.orig  2024-08-16 14:46:09.000000000 +0000
 +++ src/Makefile
+@@ -2,14 +2,14 @@
+ name = sc-im
+ 
+ # The base directory where everything should be installed.
+-prefix  = /usr/local
++prefix  = @PREFIX@
+ 
+ EXDIR   = $(prefix)/bin
+ HELPDIR = $(prefix)/share/$(name)
+ LIBDIR  = $(prefix)/share/doc/$(name)
+ 
+ # This is where the man page goes.
+-MANDIR  = $(prefix)/share/man/man1
++MANDIR  = @PREFIX@/@PKGMANDIR@/man1
+ 
+ # History directory, relative to $HOME
+ HISTORY_DIR= .cache
+@@ -19,9 +19,9 @@ CONFIG_DIR= .config/sc-im
+ CONFIG_FILE=scimrc
+ 
+ # Change these to your liking or use `make CC=gcc` etc
+-#CC   = cc
+-#YACC = bison -y
+-#SED  = sed
++CC   = @CC@
++YACC = @YACC@
++SED  = @SED@
+ 
+ LDLIBS += -lm
+ 
 @@ -37,7 +37,7 @@ CFLAGS += -DDFLT_PAGER=\"less\"
  # Sets default editor. Its use in case EDITOR env variable is not set
  CFLAGS += -DDFLT_EDITOR=\"vim\"
@@ -15,7 +45,37 @@ $NetBSD: patch-src_Makefile,v 1.4 2023/0
  # Command history file, relative to HISTORY_DIR directory. Comment out to disable commandline history
  CFLAGS += -DHISTORY_FILE=\"$(HISTORY_FILE)\" -DHISTORY_DIR=\"$(HISTORY_DIR)\"
  # Configuration file, relative to CONFIG_DIR directory
-@@ -94,25 +94,27 @@ endif
+@@ -60,14 +60,14 @@ CFLAGS += -DMOUSE
+ #to copy to tmux clipboard:
+ #CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""tmux load-buffer"\"
+ #to copy to X clipboard:
+-CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
++#CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""xclip -i -selection clipboard <"\"
+ #to copy to OSX clipboard:
+ #CFLAGS += -DDEFAULT_COPY_TO_CLIPBOARD_CMD=\""pbcopy <"\"
+ #
+ # Choose one of the proposed commands for pasting from different clipboards:
+ # You can later change it at runtime.
+ #CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""tmux show-buffer"\"
+-CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
++#CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""xclip -o -selection clipboard"\"
+ #CFLAGS += -DDEFAULT_PASTE_FROM_CLIPBOARD_CMD=\""pbpaste"\"
+ 
+ # Command to open file or link under cursor
+@@ -76,11 +76,7 @@ CFLAGS += -DDEFAULT_OPEN_FILE_UNDER_CURS
+ # Autobackup. If you unset this, no backup check nor autobackup feature will be available.
+ CFLAGS += -DAUTOBACKUP
+ # Have threads? Set these two, if you want the autobackup feature to work with threads.
+-CFLAGS += -DHAVE_PTHREAD
+-
+-ifneq ($(shell uname -s),Darwin)
+-  LDLIBS += -pthread
+-endif
++#CFLAGS += -DHAVE_PTHREAD
+ 
+ # Check for gnuplot existence
+ ifneq (, $(shell which gnuplot))
+@@ -94,22 +90,24 @@ endif
  
  # dynamic linking (not available in BSD)
  ifneq ($(shell uname -s | grep -o BSD),BSD)
@@ -29,15 +89,11 @@ $NetBSD: patch-src_Makefile,v 1.4 2023/0
    # Any system with pkg-config
  
    # NOTE: ncursesw (required)
-   ifeq ($(shell uname -s),Darwin)
-     # macOS' ncurses is built with wide-char support
--    LDFLAGS += -lncurses
-+    LDLIBS_CURSES ?= -lncurses
-   else ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
+   ifneq ($(shell pkg-config --exists ncursesw || echo 'no'),no)
 -    CFLAGS += $(shell pkg-config --cflags ncursesw)
 -    LDLIBS += $(shell pkg-config --libs ncursesw)
 +    CFLAGS_CURSES ?= $(shell pkg-config --cflags ncursesw)
-+    LDLIBS_CURSES ?= $(shell pkg-config --libs ncursesw)
++    LDLIBS_CURSES += $(shell pkg-config --libs ncursesw)
    else ifneq ($(shell pkg-config --exists ncurses || echo 'no'),no)
      # hopefully this includes wide character support then
 -    CFLAGS += $(shell pkg-config --cflags ncurses)
@@ -50,12 +106,10 @@ $NetBSD: patch-src_Makefile,v 1.4 2023/0
    endif
  
    # NOTE: libxlsreader (libxls) is required for xls file reading support
-@@ -153,21 +155,14 @@ else ifeq ($(shell uname -s),Darwin)
-   # macOS without pkg-config
- 
-   # macOS' ncurses is built with wide-char support
--  LDFLAGS += -lncurses
--else ifeq ($(shell uname -s),NetBSD)
+@@ -148,19 +146,14 @@ ifneq (, $(shell which pkg-config))
+     endif
+   endif
+ else ifeq ($(shell uname -s),NetBSD)
 -  # NetBSD without pkg-config
 -
 -  CFLAGS  += -I/usr/pkg/include
@@ -77,3 +131,16 @@ $NetBSD: patch-src_Makefile,v 1.4 2023/0
  OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard actions/*.c) $(wildcard formats/*.c) $(wildcard cmds/*.c) $(wildcard utils/*.c)) gram.o
  
  .PHONY : all clean install docs man_install man_uninstall
+@@ -201,10 +194,10 @@ gram.c : y.tab.c
+ y.tab.h : gram.y | gram.c
+ 
+ experres.h : gram.y eres.sed
+-      sed -f eres.sed < $< > $@
++      $(SED) -f eres.sed < $< > $@
+ 
+ statres.h : gram.y sres.sed
+-      sed -f sres.sed < $< > $@
++      $(SED) -f sres.sed < $< > $@
+ 
+ pvmtbl.o: sc.h pvmtbl.c
+       $(CC) ${CFLAGS} -c -DPSC pvmtbl.c



Home | Main Index | Thread Index | Old Index